Commit eabe4c1c by 李伟康

提交

1 parent 55832d66
......@@ -64,41 +64,49 @@ Page({
} = await wx.p.api.solitaireApi.getActivityRedEnvelopeDetail({
id: activityId
})
if (linkId || awardInfoId) this.jumpRedEnvelopeH5({
activityId,
linkId,
source
/**接龙奖品回显 */
if (awardInfoId) this.jumpRedEnvelopeH5({
activityId
}, () => {
this.jump()
})
else {
const {
code,
data,
errId,
message
} = await wx.p.api.questionnaireApi.bindRedEnvelopeLink({
if (linkId) this.jumpRedEnvelopeH5({
activityId,
bindingSource: source,
wechatName: userInfo.nickName,
businessId
linkId,
source
})
if (code == 0) {
if (data.id && data.link) {
// /**sourceType 0-自研,1-外采 */
if (sourceType == 1) {
this.showRedModel()
this.jumpUrl = data.link
} else this.jumpRedEnvelopeH5({
activityId,
linkId: data.id,
source
})
else {
const {
code,
data,
errId,
message
} = await wx.p.api.questionnaireApi.bindRedEnvelopeLink({
activityId,
bindingSource: source,
wechatName: userInfo.nickName,
businessId
})
if (code == 0) {
if (data.id && data.link) {
// /**sourceType 0-自研,1-外采 */
if (sourceType == 1) {
this.showRedModel()
this.jumpUrl = data.link
} else this.jumpRedEnvelopeH5({
activityId,
linkId: data.id,
source
})
} else throw {
message,
errId
}
} else throw {
message,
errId
}
} else throw {
message,
errId
}
}
} catch ({
......@@ -125,7 +133,7 @@ Page({
activityId,
linkId,
source
}) {
}, callBack) {
const {
awardInfoId,
merchantId,
......@@ -156,7 +164,8 @@ Page({
if (recordId) query += `&recordId=${recordId}`
if (awardInfoId) query += `&awardInfoId=${awardInfoId}`
this.linkQuery = query
this.showRedModel()
if (callBack) callBack()
else this.showRedModel()
},
showRedModel() {
this.setData({
......
......@@ -254,6 +254,7 @@ Page({
businessId: id
})
},
/**红包活动回显 */
async getRedEnvelopeAwardInfo({
awardInfoId,
params
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!