...
|
...
|
@@ -13,15 +13,6 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
this.invitecode(params),
|
|
|
this.checkApply(params)
|
|
|
]).then(res => {
|
|
|
let checkStatus = _.get(res[1], 'data.status', 0);
|
|
|
let checkUrl = helpers.urlFormat('/activity/have-gain/apply', {}); // 未申请
|
|
|
|
|
|
if (checkStatus === 1) { // 审核中
|
|
|
checkUrl = helpers.urlFormat('/activity/have-gain/verify', {});
|
|
|
} else if (checkStatus === 2) { // 审核成功
|
|
|
checkUrl = 'https://activity.yoho.cn/feature/2213.html?title=说明详情&openby:yohobuy={"action":"go.h5","params":{"title": "说明详情", url":"https://activity.yoho.cn/feature/2213.html"}}'; // eslint-disable-line
|
|
|
}
|
|
|
|
|
|
let share = (_.get(res[0], 'data.context', '')).match(/(\d+)/g);
|
|
|
let gainList = [
|
|
|
{
|
...
|
...
|
@@ -31,7 +22,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
totalCouponNum: _.get(share, '[1]', 0),
|
|
|
isShow: true
|
|
|
}, {
|
|
|
url: checkUrl,
|
|
|
url: _.get(res[1], 'data.checkUrl', ''),
|
|
|
img: '//img10.static.yhbimg.com/article/2017/06/20/12/01a50a1f45b97365e758d6890858998310.jpg?imageView2/{mode}/w/{width}/h/{height}', // eslint-disable-line
|
|
|
isShow: false
|
|
|
}
|
...
|
...
|
@@ -66,6 +57,19 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
data: Object.assign({
|
|
|
method: 'app.union.shareOrder.checkApply'
|
|
|
}, params)
|
|
|
}).then(res => {
|
|
|
let checkStatus = _.get(res, 'data.status', 0);
|
|
|
let checkUrl = helpers.urlFormat('/activity/have-gain/apply', {}); // 未申请
|
|
|
|
|
|
if (checkStatus === 1) { // 审核中
|
|
|
checkUrl = helpers.urlFormat('/activity/have-gain/verify', {});
|
|
|
} else if (checkStatus === 2) { // 审核成功
|
|
|
checkUrl = 'https://activity.yoho.cn/feature/2213.html?title=说明详情&openby:yohobuy={"action":"go.h5","params":{"title": "说明详情", url":"https://activity.yoho.cn/feature/2213.html"}}'; // eslint-disable-line
|
|
|
}
|
|
|
|
|
|
_.set(res, 'data.checkUrl', checkUrl);
|
|
|
|
|
|
return res;
|
|
|
});
|
|
|
}
|
|
|
|
...
|
...
|
|