Procházet zdrojové kódy

新增关闭弹窗按钮,修改活动时间判断

asd123a20 před 2 roky
rodič
revize
6e311412ed

+ 11 - 11
pages/activity/details.vue

@@ -78,7 +78,7 @@
 				const endActiveTime = Date.parse(res.data.endTime);
 
 				// 报名按钮状态设置
-				if (!statusInfo.status && newDateTime > startTime && newDateTime < endTime && newDateTime > startActiveTime && newDateTime < endActiveTime) {
+				if (!statusInfo.status && newDateTime > startTime && newDateTime < endTime) {
 					this.buttonGroup[0].backgroundColor = '#ff0000';
 					this.buttonGroup[0].text = '报名活动';
 					delete this.buttonGroup[0].status
@@ -86,19 +86,19 @@
 					this.buttonGroup[1].disable = true;
 					this.buttonGroup[1].backgroundColor = '#999';
 				}
-				if (statusInfo.status && newDateTime > startTime && newDateTime < endTime && newDateTime > startActiveTime && newDateTime < endActiveTime) {
-					this.buttonGroup[0].backgroundColor = '#999';
+				if (statusInfo.status && newDateTime > startTime && newDateTime < endTime) {
+					this.buttonGroup[0].backgroundColor = '#ffa200';
 					this.buttonGroup[0].text = '取消报名';
 					this.buttonGroup[0].status = true;
 					delete this.buttonGroup[1].disable;
 					this.buttonGroup[1].backgroundColor = '#ffa200';
 				}
-				if (newDateTime < startTime || newDateTime < startActiveTime) {
+				if (newDateTime < startTime) {
 					this.buttonGroup[0].backgroundColor = '#999';
 					this.buttonGroup[0].text = '报名未开始';
 					this.buttonGroup[0].disable = true;
 				}
-				if (newDateTime > endTime || newDateTime > endActiveTime) {
+				if (newDateTime > endTime) {
 					this.buttonGroup[0].backgroundColor = '#999';
 					this.buttonGroup[0].text = '报名已结束';
 					this.buttonGroup[0].disable = true;
@@ -120,12 +120,12 @@
 						this.buttonGroup[1].backgroundColor = '#999';
 						this.buttonGroup[1].disable = true;		
 					}
-					if(newDateTime > endActiveTime){
-						this.buttonGroup[1].text = '活动已结束';
-						this.buttonGroup[1].backgroundColor = '#999';
-						this.buttonGroup[1].disable = true;		
-					}
-					if(statusInfo.status && newDateTime < endActiveTime && newDateTime > startActiveTime){
+					// if(newDateTime > endActiveTime){
+					// 	this.buttonGroup[1].text = '活动已结束';
+					// 	this.buttonGroup[1].backgroundColor = '#999';
+					// 	this.buttonGroup[1].disable = true;		
+					// }
+					if(statusInfo.status && newDateTime > startActiveTime){
 						this.buttonGroup[1].text = '获取积分';
 						this.buttonGroup[1].backgroundColor = '#ffa200';
 						delete this.buttonGroup[1].disable;

+ 4 - 3
pages/activity/index.vue

@@ -58,7 +58,8 @@
 					const startTime = Date.parse(e.startTime);
 					if (e.status == 0 || isDateTime < startTime) e.statusText = '未开始';
 					if (e.status !== 3 && isDateTime < endTime && isDateTime > startTime) e.statusText = '进行中';
-					if (e.status == 3 || isDateTime > endTime) e.statusText = '已结束';
+					if (isDateTime > endTime && e.status !== 3) e.statusText = '积分发放中';
+					if (e.status == 3) e.statusText = '已结束';
 					e.image = BASE_URL.fileUrl + e.image;
 					return e;
 				})
@@ -85,8 +86,8 @@
 	position: relative;
 }
 .slot-image {
-	width: 50px;
-	height: 50px;
+	width: 80px;
+	height: 80px;
 }
 .status {
 	position: absolute;

+ 25 - 4
pages/index/index.vue

@@ -3,6 +3,9 @@
 		<!-- 动画 -->
 		<uni-transition ref="ani" class="dhbox" custom-class="transition" :mode-class="modeClass" v-if="dhshow" :show="dhshow" :styles="styles">
 			<img src="https://fuyu.scapp.cn/static/wxa/dh.jpg" class="dhimg">
+			<view class="to" @click="show">
+				跳过
+			</view>
 		</uni-transition>
 		<view v-show="!dhshow">
 			<view class="page-section page-section-spacing swiper">
@@ -60,14 +63,14 @@
 				indicatorDots: false,
 				bannerList: [],
 				govern: [],
-				construct: []
+				construct: [],
+				timeout: null
 			}
 		},
 		async mounted() {
 			wx.hideTabBar();
-			setTimeout(() => {
-				this.dhshow = !this.dhshow;
-				wx.showTabBar();
+			this.timeout = setTimeout(() => {
+				this.show();
 			}, 3000)
 			const config = await requestLogin.getJson();
 			const { list, bannerList, governList, construct } = config.data;
@@ -90,6 +93,11 @@
 			})
 		},
 		methods: {
+			show() {
+				clearTimeout(this.timeout);
+				this.dhshow = !this.dhshow;
+				wx.showTabBar();
+			},
 			morBtn() {
 				uni.switchTab({ url: '/pages/policy/index' });
 			},
@@ -203,4 +211,17 @@
 		height: 100%;
 		display: block;
 	}
+	.to {
+		width: 60px;
+		height: 20px;
+		opacity: 0.8;
+		background-color: #000;
+		color: #fff;
+		position: absolute;
+		top: 10px;
+		right: 10px;
+		text-align: center;
+		border-radius: 12px;
+		font-size: 12px;
+	}
 </style>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/build/mp-weixin/pages/report/index.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/build/mp-weixin/pages/report/index.wxml


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/activity/details.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/activity/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/index/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages/report/index.js.map


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/activity/details.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/activity/index.js


+ 2 - 2
unpackage/dist/dev/mp-weixin/pages/activity/index.wxss

@@ -3,8 +3,8 @@
 	position: relative;
 }
 .slot-image {
-	width: 50px;
-	height: 50px;
+	width: 80px;
+	height: 80px;
 }
 .status {
 	position: absolute;

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml


+ 13 - 0
unpackage/dist/dev/mp-weixin/pages/index/index.wxss

@@ -74,4 +74,17 @@
 	height: 100%;
 	display: block;
 }
+.to {
+	width: 60px;
+	height: 20px;
+	opacity: 0.8;
+	background-color: #000;
+	color: #fff;
+	position: absolute;
+	top: 10px;
+	right: 10px;
+	text-align: center;
+	border-radius: 12px;
+	font-size: 12px;
+}
 

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/report/index.js


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 1 - 1
unpackage/dist/dev/mp-weixin/pages/report/index.wxml


+ 1 - 1
unpackage/dist/dev/mp-weixin/project.config.json

@@ -8,7 +8,7 @@
     "urlCheck": false,
     "es6": true,
     "postcss": true,
-    "minified": false,
+    "minified": true,
     "newFeature": true,
     "bigPackageSizeSupport": true,
     "babelSetting": {