xuqiaoying 3 жил өмнө
parent
commit
4a09d54065

+ 4 - 0
.hbuilderx/launch.json

@@ -2,6 +2,10 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
+     	"app-plus" : 
+     	{
+     		"launchtype" : "local"
+     	},
      	"default" : 
      	{
      		"launchtype" : "local"

+ 4 - 1
App.vue

@@ -14,7 +14,10 @@ export default {
     });
   },
   methods: {},
-  onShow: function () {},
+  onShow: function (option) {
+    console.log('onShow监听小程序显示', option, option.scene)
+    this.$store.commit('setScene', option.scene || 0)
+  },
   onHide: function () {
     uni.$emit("playPause");
   },

+ 2 - 2
common/request.js

@@ -5,8 +5,8 @@ import api from './api.js'
 var num = 1
 //接口api   
 // export const BASE_URL = 'https://api.xyyxt.net'   //release
-// export const BASE_URL = 'https://test.xyyxt.net'   //预发布
-export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
+export const BASE_URL = 'https://test.xyyxt.net'   //预发布
+// export const BASE_URL = 'http://120.79.166.78:19012' // 测试环境
 // export const BASE_URL = 'http://42.192.164.187:19005'    //test(后端本地)
 // export const BASE_URL = 'http://192.168.1.222:5055'    //后端本地更新到222
 // export const BASE_URL = 'http://192.168.1.24:5055'    //后端本地

+ 6 - 6
pages.json

@@ -89,7 +89,7 @@
 					}
 				}
 			}, {
-				"path": "wd/menu",
+				"path": "wd/menu", //没有用到
 				"style": {
 					"navigationBarTitleText": "基本资料",
 					"navigationStyle": "custom", // 隐藏系统导航栏
@@ -99,7 +99,7 @@
 					}
 				}
 			}, {
-				"path": "wd/edu_info",
+				"path": "wd/edu_info", //没有用到
 				"style": {
 					"navigationBarTitleText": "教育信息",
 					"navigationStyle": "custom", // 隐藏系统导航栏
@@ -146,7 +146,7 @@
 				}
 			},
 			{
-				"path": "wd/class",
+				"path": "wd/class", //暂时不用
 				"style": {
 					"navigationBarTitleText": "我的网课",
 					"navigationStyle": "custom", // 隐藏系统导航栏
@@ -214,7 +214,7 @@
 				}
 			},
 			{
-				"path": "exam/index",
+				"path": "exam/index", // 暂时不用
 				"style": {
 					"navigationBarTitleText": "我的考试",
 					"navigationStyle": "custom", // 隐藏系统导航栏
@@ -864,7 +864,7 @@
 				}
 			}
 		},{
-			"path": "mockRecord/mock_record_list",
+			"path": "mockRecord/mock_record_list", // 没有用到
 			"style": {
 				"navigationBarTitleText": "模考记录",
 				"navigationBarBackgroundColor": "#0386FD",
@@ -900,7 +900,7 @@
 				}
 			}
 		},{
-			"path": "liveDetail/list",
+			"path": "liveDetail/list", // 暂时不用
 			"style": {
 				"navigationBarTitleText": "直播课列表",
 				"navigationBarBackgroundColor": "#0386FD",

+ 29 - 14
pages/index/index.vue

@@ -17,7 +17,7 @@
 				<view class="dot" :class="{'active':index == current}" v-for="(swiper,index) in list" :key="index"></view>
 			</view>
 		</view>
-		<view class="content" :class="{'botms': isLogin && (isFollow != 1) && curClose}">
+		<view class="content">
 			<!-- <view class="notice" v-if="infoNums">
 				<view class="notice__content">
 					<image src="/static/icon/msg_icon1.png" class="icon"></image>
@@ -174,8 +174,13 @@
 			<u-icon name="close"></u-icon>
 			<official-account @load='bindload'></official-account>
 		</view> -->
-		<view v-if="isLogin && (isFollow != 1) && curClose" class="officials">
-			<view class="weixin_official_account" :style="{'opacity':opacity}">
+		<!-- v-if="isLogin && (isFollow != 1) && curClose" -->
+		<!-- <view class="officialsss">
+			<text>asdsufd</text>
+			<official-account></official-account>
+		</view> -->
+		<view :style="{'opacity':opacity}" class="officials">
+			<view class="weixin_official_account">
 				<image class="off_logo" src="/static/index/official.png"></image>
 				<view>
 					<view class="one">关注 “祥粤学校” 公众号</view>
@@ -295,7 +300,7 @@ export default {
 	onShow() {
 		this.getInfo() // 判断有没有关注公众号		
 		this.isClickOff() //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
-
+		console.log('this.$store.state.scene', this.$store.state.scene)
 		uni.removeStorageSync('goPath')
 		this.courseList();
 		this.bankList();
@@ -334,10 +339,11 @@ export default {
 			// /app/user/getInfo 登录用户信息
 			this.$api.getInfo().then(res => {
 				if(res.data.code == 200){
-					console.log('---res', res.data)
 					this.$store.state.userInfo = res.data.data
 					this.isFollow = res.data.data.userFollowWx // 不是1就是没关注
-					console.log('有没有关注', this.isFollow)
+					console.log('有没有关注', this.isFollow, this.isFollow != 1)
+					this.opacity = [1011,1017,1025,1047,1124].includes(this.$store.state.scene) && this.isLogin && (this.isFollow != 1) && this.curClose ? 1 : 0
+					console.log('this.opacity', this.opacity)
 				}
 			})
 		},
@@ -357,9 +363,10 @@ export default {
 			}else{
 				uni.setStorageSync("endTime", end) //存入当天晚上23:59:59秒的毫秒数
 			}
+			this.opacity = [1011,1017,1025,1047,1124].includes(this.$store.state.scene) && this.isLogin && (this.isFollow != 1) && this.curClose ? 1 : 0
+			console.log('this.opacity-', this.opacity)
 		},
 		closeOff() {
-			console.log('关闭')
 			this.curClose = false
 			uni.setStorageSync("curClose", '1')
 		},
@@ -772,7 +779,7 @@ page {
 		overflow: hidden;
 		padding:0 16rpx;
 		background: rgba(234, 238, 241, 1);
-		
+		padding-bottom: 100rpx;
 		.notice {
 			background:#fff;
 			border-radius: 16rpx;
@@ -1044,9 +1051,9 @@ page {
 			}
 		}
 	}
-	.botms {
-		padding-bottom: 100rpx;
-	}
+	// .botms {
+	// 	padding-bottom: 100rpx;
+	// }
 	
 	.my-list {
 		margin:32rpx 0;
@@ -1241,13 +1248,19 @@ page {
 	font-weight: bold;
 	color: #32467B;
 }
+.officialsss {
+	position: fixed;
+	left: 0;
+	bottom: 100rpx;
+	width: 100%;
+}
 .officials {
 	width:100%;
 	height: 104rpx;
 	position:fixed;
 	bottom: 0;
 	left: 0;
-	z-index: 20211208;
+	z-index: 999;
 	display: flex;
 	align-items: center;
 	justify-content: center;
@@ -1258,7 +1271,7 @@ page {
 	left: 0;
 	display: flex;
 	align-items: center;
-	justify-content: space-between;
+	// justify-content: space-between;
 	width: 718rpx;
 	height: 104rpx;
 	padding: 0 32rpx;
@@ -1281,6 +1294,8 @@ page {
 	}
 	.btn {
 		position: relative;
+		top: 0;
+    	left: 35rpx;
 		width: 128rpx;
 		height: 56rpx;
 		line-height: 56rpx;
@@ -1294,7 +1309,7 @@ page {
 
 		.official-account {
 			position: absolute;
-			z-index: 20211209;
+			z-index: 1000;
 			right: -9px;
 			top: -38px;
 			opacity: 0;

+ 4 - 0
store/index.js

@@ -26,6 +26,7 @@ const store = new Vuex.Store({
 		liveLast:null,
 		tabNums: 0, // '我的'右上角的数字
 		sysTime:0, //系统时间
+		scene: 0, //进入小程序的场景值
 		tabLists: [{
 			iconPath: "/static/nav1.png",
 			selectedIconPath: "/static/nav1_on.png",
@@ -180,6 +181,9 @@ const store = new Vuex.Store({
 		setPlayVID(state, provider) {
 			state.playVID = provider.playVID;
 		},
+		setScene(state, scene) {
+			state.scene = scene
+		}
 	},
 	actions: {
 		/**