|
@@ -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() {
|
|
|
|
|
|
},
|