Authored by 邱骏

排队页增加Storage:queueMsgShow,防止重复弹出中奖提示

... ... @@ -73,7 +73,8 @@ const ASSIST_SUCCESS = {
const QUEUE_SUCCESS = {
UNKNOWN: 0,
OK: 1,
REPEAT: 2
REPEAT: 2,
FULL: 3
};
const YB_SHARE_RESULT_L = 'YB_SHARE_RESULT_L';
... ... @@ -283,7 +284,8 @@ Page(Object.assign({
productSourceType = PRODUCT_SOURCE_TYPE.ORIGIN;
} else if (!this.data.originUnionID && !this.data.originUid) {
productSourceType = PRODUCT_SOURCE_TYPE.ORIGIN;
} else if (this.data.originUnionID && this.data.originUnionID !== app.getUnionID()) {
} else if ((this.data.originUnionID && this.data.originUnionID !== app.getUnionID()) ||
(this.data.originUid && this.data.originUid !== this.data.uid)) {
productSourceType = PRODUCT_SOURCE_TYPE.SHARE;
}
... ... @@ -504,6 +506,10 @@ Page(Object.assign({
this.setData({
queueSuccess: QUEUE_SUCCESS.REPEAT
});
} else if (result.code === 402) {
this.setData({
queueSuccess: QUEUE_SUCCESS.FULL
});
} else {
yas.report(YB_ASSIST_SUCCESS_L, {
ASSIST_RESULT: ASSIST_FAIL,
... ... @@ -611,10 +617,9 @@ Page(Object.assign({
},
init() {
wx.showLoading();
return Promise.all([
this.productInfo(),
this.getUid()
]).then(() => {
return this.getUid().then(() => {
return this.productInfo();
}).then(() => {
return this.getAssistInfo();
}).then(() => {
wx.hideLoading();
... ...
... ... @@ -408,6 +408,28 @@
</view>
</yoho-alert>
<yoho-alert wx:if="{{queueSuccess === 3}}" bindcancel="hideAlert">
<view class="modal-content">
<view class="modal-title">
<view class="sub-title">助力失败</view>
<view class="sub-title2">
<view>助力人数已满,</view>
<view>自己也来参加吧~</view>
</view>
</view>
<view class="modal-btn">
<view class="modal-ok" bindtap="restartSelfShare">
我也要参加
</view>
<view class="modal-cancel" bindtap="goQueueList">
查看详情
</view>
</view>
</view>
</yoho-alert>
<yoho-alert wx:if="{{error}}" bindcancel="hideAlert">
<view class="modal-content">
<view class="modal-title">
... ...
... ... @@ -33,7 +33,7 @@
"list": []
},
"miniprogram": {
"current": 4,
"current": 0,
"list": [
{
"id": 0,
... ...