Ver Fonte

关注公众号

xuqiaoying há 3 anos atrás
pai
commit
51b5427e8a
4 ficheiros alterados com 82 adições e 30 exclusões
  1. 2 2
      common/request.js
  2. 70 26
      pages/index/index.vue
  3. 10 2
      pages2/msg/detail.vue
  4. BIN
      static/index/official.png

+ 2 - 2
common/request.js

@@ -6,8 +6,8 @@ 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:19013' // 测试环境
-// export const BASE_URL = 'http://42.192.164.187:19005'    //test
+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'    //后端本地
 // export const BASE_URL = 'http://192.168.1.7:5055'    //后端本地

+ 70 - 26
pages/index/index.vue

@@ -174,12 +174,23 @@
 			<u-icon name="close"></u-icon>
 			<official-account @load='bindload'></official-account>
 		</view> -->
-		<view class="weixin_official_account" v-if="isLogin && (isFollow != 1) && curClose" :style="{'opacity':opacity}">
-			<text class="txt">关注【祥粤学校】公众号,通知不再错过</text>
-			<button type="default" class="btn btn-official">去关注<official-account class="official-account" id="official_account" @click.native="toFollows"></official-account>
-			</button>
-			<u-icon name="close" class="icon-close" @click="closeOff"></u-icon>
+		<view v-if="isLogin && (isFollow != 1) && curClose" class="officials">
+			<view class="weixin_official_account" :style="{'opacity':opacity}">
+				<image class="off_logo" src="/static/index/official.png"></image>
+				<view>
+					<view class="one">关注 “祥粤学校” 公众号</view>
+					<view class="two">学习提醒、 报考通知不会错过</view>
+				</view>
+				<button type="default" class="btn btn-official" >
+					去关注
+					<official-account class="official-account" id="official_account"></official-account>
+				</button>
+				<view class="close_icon">
+					<u-icon name="close" class="icon-close" @click="closeOff"></u-icon>
+				</view>
+			</view>
 		</view>
+		
 	</view>
 </template>
 
@@ -282,8 +293,7 @@ export default {
 		})
 	},
 	onShow() {
-		let userInfo = this.$store.state.userInfo
-		this.isFollow = userInfo && userInfo.userFollowWx // 不是1就是没关注
+		this.getInfo() // 判断有没有关注公众号		
 		this.isClickOff() //关注公众号,每天最多显示1次;当天学员关闭弹窗后,无需再显示
 
 		uni.removeStorageSync('goPath')
@@ -320,7 +330,17 @@ export default {
 	},
 	methods: {
 		...mapActions(['getUserInfo','appCommonConfig']),
-
+		getInfo() {
+			// /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)
+				}
+			})
+		},
 		// 每天最多显示1次;当天学员关闭弹窗后,无需再显示
 		isClickOff() {
 			//当天23:59:59秒 转换成的毫秒数
@@ -339,6 +359,7 @@ export default {
 			}
 		},
 		closeOff() {
+			console.log('关闭')
 			this.curClose = false
 			uni.setStorageSync("curClose", '1')
 		},
@@ -1217,41 +1238,52 @@ page {
 	font-weight: bold;
 	color: #32467B;
 }
-.official {
+.officials {
 	width:100%;
+	height: 104rpx;
 	position:fixed;
 	bottom: 0;
 	left: 0;
-	background-color: #fff;
+	z-index: 20211208;
+	display: flex;
+	align-items: center;
+	justify-content: center;
 }
 .weixin_official_account {
 	position: fixed;
-	z-index: 20211208;
 	bottom: 0;
 	left: 0;
-	// transform: translateX(-50%);
 	display: flex;
 	align-items: center;
 	justify-content: space-between;
-	width: 100%;
-	height: 84rpx;
+	width: 718rpx;
+	height: 104rpx;
 	padding: 0 32rpx;
-	background: #EEF6FF;
-	// border-radius: 6rpx;
-
-	.txt {
+	margin-left: 16rpx;
+	background: #3A3F54;
+	border-radius: 16rpx;
+	.off_logo {
+		width: 48rpx;
+		height: 48rpx;
+		margin-right: 24rpx;
+	}
+	.one {
+		color: #fff;
 		font-size: 24rpx;
-		color: #3577E8;
+		font-weight: 500;
+	}
+	.two {
+		color: #BCBEC7;
+		font-size: 20rpx;
 	}
-
 	.btn {
 		position: relative;
-		width: 136rpx;
+		width: 128rpx;
 		height: 56rpx;
 		line-height: 56rpx;
 		padding: 0;
-		background: #3577E8;
-		border-radius: 80rpx;
+		background: linear-gradient(274deg, #408BF6 0%, #40B4F6 100%);
+		border-radius: 156rpx;
 		overflow: hidden;
 		text-align: center;
 		font-size: 24rpx;
@@ -1260,12 +1292,24 @@ page {
 		.official-account {
 			position: absolute;
 			z-index: 20211209;
-			right: -14px;
-			top: -40px;
+			right: -9px;
+			top: -38px;
 			opacity: 0;
 		}
 	}
-
+	.close_icon {
+		width: 40rpx;
+		height: 40rpx;
+		background: #FFFFFF;
+		opacity: 0.2;
+		display: flex;
+		align-items: center;
+		position: absolute;
+		top: 0;
+		right: 0;
+		color: #fff;
+		border-radius: 0rpx 16rpx;
+	}
 	.icon-close {
 		display: flex;
 		align-items: center;

+ 10 - 2
pages2/msg/detail.vue

@@ -71,7 +71,8 @@ export default {
 	},
 	methods: {
 		getTitleName() {
-			if ([28,29,30,31,32].includes(+this.listData.remindId)) { // 要先判断督学消息的显示
+			// 28-已开通商品课程2天后学员未上课,29-已开通商品课程5天后学员未上课,31-近3天学员没有学习,32-近5天学员没有学习
+			if ([28,29,31,32].includes(+this.listData.remindId)) { // 要先判断督学消息的显示
 				return this.listData.remind
 			} else {
 				return this.listData.systemStatus === 2 ? this.listData.informVo.informName : this.listData.systemStatus === 1 ? this.listData.remind : ''
@@ -100,7 +101,10 @@ export default {
 				case 10:
 				case 12:
 				case 18:
-					
+				case 28:
+				case 29:
+				case 31:
+				case 32:
 					//课程
 					if(item.goodsType == 1) {
 						this.$api.orderInfo({
@@ -463,6 +467,10 @@ export default {
 				case 21:
 				case 22:
 				case 23:
+				case 28:
+				case 29:
+				case 31:
+				case 32:
 					arsty = '立刻学习';
 					break;
 				case 2:

BIN
static/index/official.png