Commit 5406cb4a by 李伟康

修复

1 parent be9d1cb9
...@@ -72,6 +72,7 @@ Page({ ...@@ -72,6 +72,7 @@ Page({
const { const {
code, code,
data, data,
errId,
message message
} = await wx.p.api.questionnaireApi.bindRedEnvelopeLink({ } = await wx.p.api.questionnaireApi.bindRedEnvelopeLink({
activityId, activityId,
...@@ -91,18 +92,30 @@ Page({ ...@@ -91,18 +92,30 @@ Page({
linkId: data.id, linkId: data.id,
source source
}) })
} else throw message } else throw {
} else throw message message,
errId
} }
} catch (error) { } else throw {
if (error) wx.showModal({ message,
errId
}
}
} catch ({
message,
errId
}) {
if (message) wx.showModal({
title: '温馨提示', title: '温馨提示',
content: error, content: message,
confirmText: '知道了', confirmText: '知道了',
showCancel: false, showCancel: false,
confirmColor: '#F13C3D', confirmColor: '#F13C3D',
success: function (res) { success: function (res) {
if (res.confirm) wx.p.router.switchTab('/pages/tab/mine/index') //错误统一跳转至我的 if (res.confirm) {
if (errId == '202207218' || errId == '202207224') wx.p.router.redirectTo('/packageActivity/pages/redEnvelope/record/record')
else wx.p.router.switchTab('/pages/tab/mine/index') //错误统一跳转至我的
}
} }
}) })
} }
......
...@@ -51,6 +51,7 @@ Page({ ...@@ -51,6 +51,7 @@ Page({
}) })
this.setData({ this.setData({
list: [...list, ...data], list: [...list, ...data],
flag: true,
total total
}) })
wx.hideLoading() wx.hideLoading()
......
...@@ -21,6 +21,7 @@ page { ...@@ -21,6 +21,7 @@ page {
top: 20rpx; top: 20rpx;
font-weight: 500; font-weight: 500;
color: #52C41A; color: #52C41A;
&-0, &-0,
&-1, &-1,
&-6, &-6,
...@@ -124,3 +125,16 @@ page { ...@@ -124,3 +125,16 @@ page {
margin-top: 42rpx; margin-top: 42rpx;
} }
} }
.nothing {
font-weight: 500;
font-size: 13px;
color: #999999;
flex-direction: column;
.icon {
width: 422rpx;
height: 380rpx;
margin: 208rpx 0 32rpx;
}
}
\ No newline at end of file \ No newline at end of file
<view class="layout isFullSucreen"> <view class="layout isFullSucreen">
<block wx:if="{{flag}}">
<block wx:if="{{list.length}}">
<block wx:for="{{list}}" wx:key="index"> <block wx:for="{{list}}" wx:key="index">
<view class="item flex"> <view class="item flex">
<view class="status status-{{item.status}}">{{item.statusStr}}</view> <view class="status status-{{item.status}}">{{item.statusStr}}</view>
...@@ -26,6 +28,16 @@ ...@@ -26,6 +28,16 @@
<block wx:if="{{nothing}}"> <block wx:if="{{nothing}}">
<view class="list-nothing ">到底啦!!</view> <view class="list-nothing ">到底啦!!</view>
</block> </block>
</block>
<block wx:else>
<view class="nothing flex">
<view class="icon">
<glsx-image src="activity/nothing.png"></glsx-image>
</view>
暂无中奖记录
</view>
</block>
</block>
</view> </view>
<van-overlay show="{{ showCodeBox }}"> <van-overlay show="{{ showCodeBox }}">
......
...@@ -207,7 +207,7 @@ Page({ ...@@ -207,7 +207,7 @@ Page({
isOpenMember: true, isOpenMember: true,
addWelfareOfficer: 'bg-member-welfare' addWelfareOfficer: 'bg-member-welfare'
}) })
} else wx.p.router.go('/packageActivity/pages/redEnvelope/index/index', { } else wx.p.router.redirectTo('/packageActivity/pages/redEnvelope/index/index', {
activityId: data.activityRedEnvelopeId, activityId: data.activityRedEnvelopeId,
businessId: equityFreeCardId, businessId: equityFreeCardId,
source: 0, source: 0,
......
...@@ -38,7 +38,7 @@ Component({ ...@@ -38,7 +38,7 @@ Component({
activityRedEnvelopeId: activityId, activityRedEnvelopeId: activityId,
nickName: userInfo.nickName nickName: userInfo.nickName
}) })
if (response.isActivityRedEnvelopeFlag && !response.isReceiveFlag) wx.p.router.go('/packageActivity/pages/redEnvelope/index/index', { if (response.isActivityRedEnvelopeFlag && !response.isReceiveFlag) wx.p.router.redirectTo('/packageActivity/pages/redEnvelope/index/index', {
activityId, activityId,
businessId: data.id, businessId: data.id,
merchantId, merchantId,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!