默认提交
Showing
2 changed files
with
21 additions
and
4 deletions
| ... | @@ -11,6 +11,7 @@ Page({ | ... | @@ -11,6 +11,7 @@ Page({ |
| 11 | prizeInfo: null, //扫码结果 | 11 | prizeInfo: null, //扫码结果 |
| 12 | userInfo: {}, //用户信息 | 12 | userInfo: {}, //用户信息 |
| 13 | scaning: false, | 13 | scaning: false, |
| 14 | errMsg: "", | ||
| 14 | }, | 15 | }, |
| 15 | onShareAppMessage() {}, | 16 | onShareAppMessage() {}, |
| 16 | showAuth() { | 17 | showAuth() { |
| ... | @@ -82,7 +83,8 @@ Page({ | ... | @@ -82,7 +83,8 @@ Page({ |
| 82 | url: app.api.scanIntegralQrcode, | 83 | url: app.api.scanIntegralQrcode, |
| 83 | data: { | 84 | data: { |
| 84 | qrCodeCode: code | 85 | qrCodeCode: code |
| 85 | } | 86 | }, |
| 87 | toast: false, | ||
| 86 | }).then((result) => { | 88 | }).then((result) => { |
| 87 | wx.hideLoading(); | 89 | wx.hideLoading(); |
| 88 | this.setData({ | 90 | this.setData({ |
| ... | @@ -107,6 +109,19 @@ Page({ | ... | @@ -107,6 +109,19 @@ Page({ |
| 107 | wx.setNavigationBarTitle({ | 109 | wx.setNavigationBarTitle({ |
| 108 | title: '奖金获取失败' | 110 | title: '奖金获取失败' |
| 109 | }) | 111 | }) |
| 112 | if (err && err.errMsg) { | ||
| 113 | this.setData({ | ||
| 114 | errMsg: err.errMsg | ||
| 115 | }) | ||
| 116 | } | ||
| 117 | if (err && err.code == 1020) { | ||
| 118 | wx.showModal({ | ||
| 119 | title: '温馨提示', | ||
| 120 | content: err && err.errMsg || '本期扫码有奖活动已经结束', | ||
| 121 | showCancel: false, | ||
| 122 | success(res) {} | ||
| 123 | }) | ||
| 124 | } | ||
| 110 | }); | 125 | }); |
| 111 | } else { | 126 | } else { |
| 112 | this.setData({ | 127 | this.setData({ | ... | ... |
| ... | @@ -23,12 +23,14 @@ | ... | @@ -23,12 +23,14 @@ |
| 23 | <text wx:if="{{prizeInfo.qrCodeStatus == 2}}" class="tips tips1"> | 23 | <text wx:if="{{prizeInfo.qrCodeStatus == 2}}" class="tips tips1"> |
| 24 | 此产品码已被扫过!\n若有异常,请联系客服 | 24 | 此产品码已被扫过!\n若有异常,请联系客服 |
| 25 | </text> | 25 | </text> |
| 26 | <!-- 码已经被使用 --> | 26 | <!-- 用户身份限制 --> |
| 27 | <text wx:elif="{{prizeInfo.qrCodeStatus == 3}}" class="tips tips1"> | 27 | <text wx:elif="{{prizeInfo.qrCodeStatus == 3}}" class="tips tips1"> |
| 28 | 奖金获取失败!\n产品奖金码获取对象为:\n电工及终端消费者。 | 28 | 奖金获取失败!\n产品奖金码获取对象为:\n电工及终端消费者。 |
| 29 | </text> | 29 | </text> |
| 30 | <!-- 其他异常 --> | 30 | <!-- 0、码不存在 --> |
| 31 | <text wx:else class="tips tips1">此产品码已被扫过!\n若有异常,请联系客服</text> | 31 | <text wx:elif="{{prizeInfo.qrCodeStatus == 0}}" class="tips tips1">此产品码不存在!\n若有异常,请联系客服</text> |
| 32 | <text wx:else class="tips tips1">{{errMsg}}\n若有异常,请联系客服</text> | ||
| 33 | <!-- <text wx:else class="tips tips1">此产品码不可用!\n若有异常,请联系客服</text> --> | ||
| 32 | <view class="btn-wrap"> | 34 | <view class="btn-wrap"> |
| 33 | <!-- 非 产品奖金码获取对象为:电工及终端消费者。 --> | 35 | <!-- 非 产品奖金码获取对象为:电工及终端消费者。 --> |
| 34 | <block wx:if="{{prizeInfo.qrCodeStatus == 3}}"> | 36 | <block wx:if="{{prizeInfo.qrCodeStatus == 3}}"> | ... | ... |
-
Please register or sign in to post a comment