浏览代码

commit -m 美博会

zhengjinyi 4 年之前
父节点
当前提交
52a8ffed4f
共有 4 个文件被更改,包括 20 次插入6 次删除
  1. 11 1
      App.vue
  2. 3 3
      components/cm-module/activity/activity_01.vue
  3. 4 0
      pages/tabBar/home/index.vue
  4. 2 2
      services/ajax.env.js

+ 11 - 1
App.vue

@@ -58,7 +58,13 @@
 				}
 			})
 			this.refresh()
-			this.$store.dispatch('setActivityFn',true)
+			if(uni.getStorageSync('isActivityStatus')){
+				const  lockTime = uni.getStorageSync('lockTime')
+				const  eTime = this.diffTime(lockTime)
+				this.$store.dispatch('setActivityFn',eTime)
+			}else{
+				this.$store.dispatch('setActivityFn',true)
+			}
 		},
 		methods:{
 			refresh(){
@@ -74,6 +80,10 @@
 						console.log('授权失败============>:'+'用户授权失败,提醒用户重新授权')
 					})
 				},TIME)
+			},
+			diffTime(t){
+				let date = Date.now();
+				return (date -t) < 2*60*1000 ? false : true
 			}
 		},
 		onShow: function() {

+ 3 - 3
components/cm-module/activity/activity_01.vue

@@ -69,7 +69,7 @@
 		left: 0;
 		top: 100%;
 		opacity: 0;
-		background: rgba(0,0,0,.5);
+		background: rgba(0,0,0,.2);
 		z-index: 99999;
 		image{
 			width: 606rpx;
@@ -80,12 +80,12 @@
 	.tui-alert-show {
 		top: 0;
 		opacity: 1;
-		animation:rundtop 0.5s;
+		// animation:rundtop 0.5s;
 	}
 	.tui-alert-hide{
 		top: 100%;
 		opacity: 0;
-		animation:rundbottom 0.5s;
+		// animation:rundbottom 0.5s;
 	}
 	.icon-2guanbi{
 		display: block;

+ 4 - 0
pages/tabBar/home/index.vue

@@ -160,9 +160,13 @@
 			handleClick(data){
 				this.$api.navigateTo(`/h5/pages/activity/meobohui`)
 				this.$store.commit('setActivity',data)
+				uni.setStorageSync('lockTime',Date.now())	
+				uni.setStorageSync('isActivityStatus',true)	
 			},
 			handleCancelClick(data){
 				this.$store.commit('setActivity',data)
+				uni.setStorageSync('lockTime',Date.now())
+				uni.setStorageSync('isActivityStatus',true)	
 			},
 		},
 		onPageScroll(e){//实时获取到滚动的值

+ 2 - 2
services/ajax.env.js

@@ -4,8 +4,8 @@ if(process.env.NODE_ENV === 'development'){
 	// URL_CONFIG = 'http://192.168.2.68:8008'	 //涛涛联调地址
 	// URL_CONFIG = 'http://192.168.2.67:8008'	 //裴裴联调地址
 	// URL_CONFIG = 'http://192.168.2.75:8008'	 //超超联调地址
-    // URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
-	URL_CONFIG = 'https://spi.caimei365.com'
+    URL_CONFIG = 'https://spi-b.caimei365.com'	 //采美测试地址
+	// URL_CONFIG = 'https://spi.caimei365.com'
 }else{
     // 生产环境
 	// URL_CONFIG = 'https://spi-b.caimei365.com'