|
@@ -37,7 +37,7 @@
|
|
<div class="tips">{{item.couponExplain}}</div>
|
|
<div class="tips">{{item.couponExplain}}</div>
|
|
<div class="number">剩余数量:{{item.remainder}}张</div>
|
|
<div class="number">剩余数量:{{item.remainder}}张</div>
|
|
</div>
|
|
</div>
|
|
- <div v-if="item.receivingStatus===1 || 1===1" class="btn" @click="receiveCouponRewards(item)"></div>
|
|
|
|
|
|
+ <div v-if="item.receivingStatus===1" class="btn" @click="receiveCouponRewards(item)"></div>
|
|
<div v-else-if="item.receivingStatus===2" class="btn-collect"></div>
|
|
<div v-else-if="item.receivingStatus===2" class="btn-collect"></div>
|
|
<div v-else-if="item.receivingStatus===3" class="btn-nocoupon"></div>
|
|
<div v-else-if="item.receivingStatus===3" class="btn-nocoupon"></div>
|
|
</div>
|
|
</div>
|
|
@@ -91,7 +91,7 @@ import { Toast } from 'vant';
|
|
const RSA = require('../../../plugins/wx_rsa');
|
|
const RSA = require('../../../plugins/wx_rsa');
|
|
const webUni = require('../../../plugins/uni');
|
|
const webUni = require('../../../plugins/uni');
|
|
export default {
|
|
export default {
|
|
- name: 'Lottery',
|
|
|
|
|
|
+ name: 'doubleEleven',
|
|
auth: false,
|
|
auth: false,
|
|
components: {
|
|
components: {
|
|
},
|
|
},
|
|
@@ -128,6 +128,7 @@ export default {
|
|
this.client = 7;
|
|
this.client = 7;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ this.visit()
|
|
|
|
|
|
},
|
|
},
|
|
head: {
|
|
head: {
|
|
@@ -138,23 +139,15 @@ export default {
|
|
setInterval(() => {
|
|
setInterval(() => {
|
|
_this.getCoupons()
|
|
_this.getCoupons()
|
|
}, 600000);
|
|
}, 600000);
|
|
- this.makePoint('优惠券')
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- makePoint(positionButton) {
|
|
|
|
- const now = new Date();
|
|
|
|
- this.$axios.$post('/public/v5/buriedPointRecord/reportRecords', [
|
|
|
|
|
|
+ visit() {
|
|
|
|
+ this.$axios.$post('/user/v5/userAccess/user/visit',
|
|
{
|
|
{
|
|
- client: this.client,
|
|
|
|
- eventCode: '优惠券',
|
|
|
|
- userName: this.$auth.user.username,
|
|
|
|
- positionButton,
|
|
|
|
- operationTime: now
|
|
|
|
- .toISOString()
|
|
|
|
- .replace(/T/g, ' ')
|
|
|
|
- .replace(/\.[\d]{3}Z/, ''),
|
|
|
|
|
|
+ loginType: this.token ? 1 : 2,
|
|
|
|
+ accessType: 13
|
|
},
|
|
},
|
|
- ]);
|
|
|
|
|
|
+ );
|
|
},
|
|
},
|
|
goOrder()
|
|
goOrder()
|
|
{
|
|
{
|
|
@@ -164,26 +157,16 @@ export default {
|
|
} else if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
|
|
} else if (this.$userAgent.isSzx && this.$userAgent.isAndroid) {
|
|
window.native.startPurchasePage(productId);
|
|
window.native.startPurchasePage(productId);
|
|
} else if (this.$userAgent.isSzx && this.$userAgent.isIos) {
|
|
} else if (this.$userAgent.isSzx && this.$userAgent.isIos) {
|
|
- window.webkit.messageHandlers.activity202211.postMessage({productId});
|
|
|
|
|
|
+ window.webkit.messageHandlers.activity202211.postMessage(productId);
|
|
} else if (this.$userAgent.isMiniProgram) {
|
|
} else if (this.$userAgent.isMiniProgram) {
|
|
- // this.$wx.miniProgram.navigateTo({
|
|
|
|
- // url:
|
|
|
|
- // '/packageA/order/status/index?record=' +
|
|
|
|
- // JSON.stringify({
|
|
|
|
- // payActive: this.payType === 'wxPay' ? 1 : 0,
|
|
|
|
- // myOrderNum: res.data.myOrderNum,
|
|
|
|
- // }),
|
|
|
|
- // });
|
|
|
|
|
|
+ this.$wx.miniProgram.navigateTo({
|
|
|
|
+ url:
|
|
|
|
+ '/packageA/order/buy/index',
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
- // // 使用postMessage 方法可以发送消息到应用, 消息内容需要在data 对象中,否则webview无法接收到
|
|
|
|
- // webUni.webView.postMessage({
|
|
|
|
- // data: {
|
|
|
|
- // payType: this.payType === 'aliPay' ? 3 : 2,
|
|
|
|
- // orderNum: res.data.myOrderNum,
|
|
|
|
- // buyType: 1,
|
|
|
|
- // price: this.actualPrice,
|
|
|
|
- // },
|
|
|
|
- // });
|
|
|
|
|
|
+ webUni.webView.navigateTo({
|
|
|
|
+ url: '/pages/order/order?productId=' + productId
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async getCoupons()
|
|
async getCoupons()
|