...
|
...
|
@@ -163,22 +163,20 @@ Page(Object.assign({ |
|
|
title: '加载中...',
|
|
|
mask: true,
|
|
|
});
|
|
|
},
|
|
|
|
|
|
setTimeout(() => {
|
|
|
app = app || getApp();
|
|
|
|
|
|
if (this.data.scene) {
|
|
|
this.loadDataFromCode().then(() => {
|
|
|
this.init().then(() => {
|
|
|
this._showRepeat();
|
|
|
});
|
|
|
});
|
|
|
} else {
|
|
|
onShow() {
|
|
|
if (this.data.scene) {
|
|
|
this.loadDataFromCode().then(() => {
|
|
|
this.init().then(() => {
|
|
|
this._showRepeat();
|
|
|
});
|
|
|
}
|
|
|
}, 1000);
|
|
|
});
|
|
|
} else {
|
|
|
this.init().then(() => {
|
|
|
this._showRepeat();
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
|
|
|
loadDataFromCode() {
|
...
|
...
|
@@ -231,12 +229,6 @@ Page(Object.assign({ |
|
|
});
|
|
|
},
|
|
|
|
|
|
onShow() {
|
|
|
this.init().then(() => {
|
|
|
this._showRepeat();
|
|
|
});
|
|
|
},
|
|
|
|
|
|
onShareAppMessage: function(res) {
|
|
|
let params = {
|
|
|
TITLE: this.data.productName,
|
...
|
...
|
@@ -393,9 +385,6 @@ Page(Object.assign({ |
|
|
(this.data.originUid && this.data.originUid !== this.data.uid)) {
|
|
|
productSourceType = PRODUCT_SOURCE_TYPE.SHARE;
|
|
|
}
|
|
|
|
|
|
let isFollowedServiceNumber = res.data && res.data.isFollowedServiceNumber ? res.data.isFollowedServiceNumber : false;
|
|
|
|
|
|
this.setData({
|
|
|
productSkn: res.data.productSkn ? res.data.productSkn : '',
|
|
|
productName: res.data.productName ? res.data.productName : '',
|
...
|
...
|
@@ -410,7 +399,6 @@ Page(Object.assign({ |
|
|
productDesc,
|
|
|
snapData,
|
|
|
productSourceType,
|
|
|
isFollowedServiceNumber,
|
|
|
isNew: res.data.isNew ? res.data.isNew : '',
|
|
|
currentTime: res.data.currentTime ? res.data.currentTime : '',
|
|
|
oldSaleTime: res.data.oldSaleTime ? res.data.oldSaleTime : '',
|
...
|
...
|
@@ -662,11 +650,16 @@ Page(Object.assign({ |
|
|
showCancel: false,
|
|
|
success(res) {
|
|
|
if (res.confirm) {
|
|
|
wx.showToast({
|
|
|
icon: 'none',
|
|
|
title: '公众号“YOHOBUY有货”,已复制成功,打开微信去搜索关注吧!',
|
|
|
duration: 3000
|
|
|
});
|
|
|
wx.setClipboardData({
|
|
|
data: 'YOHOBUY有货',
|
|
|
success(res) {
|
|
|
wx.showToast({
|
|
|
icon: 'none',
|
|
|
title: '公众号“YOHOBUY有货”,已复制成功,打开微信去搜索关注吧!',
|
|
|
duration: 3000
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
})
|
...
|
...
|
@@ -776,6 +769,8 @@ Page(Object.assign({ |
|
|
}).then(() => {
|
|
|
return this.getAssistInfo();
|
|
|
}).then(() => {
|
|
|
return this.getUserWechatRelateInfo();
|
|
|
}).then(() => {
|
|
|
wx.hideLoading();
|
|
|
});
|
|
|
},
|
...
|
...
|
@@ -812,6 +807,21 @@ Page(Object.assign({ |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
//用户是否关注过有货服务号
|
|
|
getUserWechatRelateInfo() {
|
|
|
if (!this.data.uid) {
|
|
|
return Promise.resolve();
|
|
|
}
|
|
|
|
|
|
let uid = this.data.uid;
|
|
|
return detailModel.getUserWechatRelateInfo(uid).then(result => {
|
|
|
if (result.code === 200 && result.data.isSubscribe) {
|
|
|
this.setData({
|
|
|
isSubscribe: result.data.isSubscribe,
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
_showRepeat() {
|
|
|
if (this.data.queueStatus === QUEUE_STATUS.QUEUE_HELP) {
|
|
|
this.setData({
|
...
|
...
|
|