ソースを参照

Merge branch 'dev-4.9.3' of http://192.168.32.253:3000/Software/android-cloud-H5 into dev-4.9.3

heyang 3 年 前
コミット
15bb0d2029
共有2 個のファイルを変更した62 個の追加25 個の削除を含む
  1. 54 21
      microserviceUserH5/vcloud/actFission.html
  2. 8 4
      microserviceUserH5/vcloud/share.html

+ 54 - 21
microserviceUserH5/vcloud/actFission.html

@@ -340,7 +340,8 @@
 			el: '#app',
 			data: {
 				isshow: false,
-				token: GetRequest().token ? GetRequest().token :'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyYW5kb20iOiI3MTY0OCIsImNsaWVudCI6IjAiLCJleHAiOjE2NDAzMTk5NTIsInVzZXJuYW1lIjoiYWRtaW4ifQ.PAV3biqh1JjiTHB5nyOlBjVMOk5II3Q8o4_OuYAMVCg',
+				token: GetRequest().token ? GetRequest().token :
+					'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyYW5kb20iOiIxNTA2MSIsImNsaWVudCI6IjAiLCJleHAiOjE2NDA0MDYwNTMsInVzZXJuYW1lIjoieWVtZW5nbWVuZzAxIn0.35gCTt6Xd5_52NaRaBKnRh2uJSTNj-y8uK35XouDLdI',
 				rewardList: [],
 				queryParams: {
 					pageNum: 1,
@@ -348,6 +349,7 @@
 				},
 				isDisable: false,
 				finished: false,
+				flag: true,
 				loading: false,
 				finishedText: '没有更多了',
 				offset: 100,
@@ -356,13 +358,14 @@
 				defaultImg: 'this.src="' + "../static/offImg/tou.png" + '"',
 				actStatus: 0, //0活动状态 1开始
 				marqueeList: [],
+				timer:null,
 			},
 			created() {
 				this.getAwardPage(); //获取奖励列表
 			},
 			mounted() {
-				this.getActDetailList();//获取活动上下架
-			//	this.getActDetail();
+				this.getActDetailList(); //获取活动上下架
+				//	this.getActDetail();
 				this.getMarquee(); //跑马灯
 
 				//this.getList();
@@ -373,21 +376,36 @@
 					if (this.actStatus != 1) {
 						return
 					}
-					systemBuriedPoint({ pointName: 'dt_裂变_h5_分享攻略' }).then(res=>{
+					this.stopManyClick(() => {
+						systemBuriedPoint({
+							pointName: 'dt_裂变_h5_分享攻略'
+						}).then(res => {
+
+						})
+						const {
+							title,
+							content,
+							gotoUrl,
+							shareImg
+						} = this.shareInfo;
+						console.log({
+							title: title,
+							content: content,
+							gotoUrl: gotoUrl,
+							shareImg: shareImg
+						});
+						if (isAndroid) {
+							window.native.share(title, content, gotoUrl, shareImg)
+						} else if (isIOS) {
+							window.webkit.messageHandlers.share.postMessage({
+								title: title,
+								content: content,
+								gotoUrl: gotoUrl,
+								shareImg: shareImg
+							});
+						}
+					});
 
-					})
-					const {
-						title,
-						content,
-						gotoUrl,
-						shareImg
-					} = this.shareInfo;
-					console.log({title:title,content:content,gotoUrl:gotoUrl,shareImg:shareImg});
-					if (isAndroid) {
-						window.native.share(title, content, gotoUrl, shareImg)
-					} else if (isIOS) {
-						window.webkit.messageHandlers.share.postMessage({title:title,content:content,gotoUrl:gotoUrl,shareImg:shareImg});
-					}
 				},
 				standarImg(id) {
 					return `${fileCenterApi}/file-center/fileOperate/getImage?id=${id}`;
@@ -395,13 +413,13 @@
 				// getActDetail(){
 				// 	getActDetail(this.token).then(res => {
 				// 		if (res.status === 0) {
-							
+
 				// 		} else {
 				// 			this.$toast(res.msg);
 				// 		}
 				// 	})
 				// },
-				getActDetailList(){ //获取活动状态
+				getActDetailList() { //获取活动状态
 					this.$toast.loading({
 						duration: 0,
 						message: '加载中...',
@@ -418,7 +436,7 @@
 						}
 					})
 				},
-				
+
 				getAwardPage() { //获取活动列表
 					getAwardPage(this.token, this.queryParams).then(res => {
 						if (res.status == 0) {
@@ -462,7 +480,8 @@
 					})
 				},
 				goGetReward(id) {
-					getCheck(this.token).then(res => {
+					this.stopManyClick(()=>{
+						getCheck(this.token).then(res => {
 						if (res.status === 0) {
 							if (isAndroid) {
 								window.native.activatePhone(1, id)
@@ -479,8 +498,22 @@
 							this.$toast(res.msg);
 						}
 					})
+					})
+					
 
 				},
+				stopManyClick(fn) { //防抖
+					if (this.flag) {
+						fn();
+					}
+					this.flag = false;
+					if (this.timer) {
+						clearTimeout(this.timer);
+					}
+					this.timer = setTimeout(() => {
+						this.flag = true
+					}, 1500);
+				},
 				download() {
 
 				},

+ 8 - 4
microserviceUserH5/vcloud/share.html

@@ -7,7 +7,7 @@
 	<meta name="description" content="分享朋友">
 	<title></title>
 	<link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
-	<link rel="stylesheet" href="../static/css/index.css">
+	<link rel="stylesheet" href="../static/css/index.css?v=1.0.0.1">
 	<link rel="stylesheet" href="../static/css/vant.css" />
 	<script src="../static/js/vender/vue/vue.min.js"></script>
 	<script src="../static/js/vender/vue/vant.min.js"></script>
@@ -26,21 +26,24 @@
 			height: 1.36rem;
 			padding: 0 1.14rem;
 			width: 100%;
+			display: flex;
+			justify-content: center;
 			left: 0;
 		}
 
 		.footer img {
-			width: 100%;
+	        width: 5.22rem;
 			height: 100%;
 		}
 
 		.hideContainer {
-			width: 100%;
+			width: 7.5rem;
 			display: flex; 
 			justify-content: center;
 			align-items: center;
 			height: calc(100vh - 1.36rem);
 			text-align: center;
+			margin: 0 auto;
 
 		}
 
@@ -57,7 +60,8 @@
 		}
 
 		.top-content {
-			width: 100%;
+			width: 7.5rem;
+			margin: 0 auto;
 			padding: 0.2rem 0.3rem;
 
 		}