|
|
import detailModel from '../../../models/product/detail';
|
|
|
import formatImage from '../../../utils/formatImage';
|
|
|
import config from '../../../common/config';
|
|
|
import common from '../../../models/common';
|
|
|
import Yas from '../../../common/yas';
|
|
|
|
|
|
import {
|
...
|
...
|
@@ -12,7 +11,7 @@ import { |
|
|
stringify
|
|
|
} from '../../../vendors/query-stringify';
|
|
|
import wx from '../../../utils/wx';
|
|
|
|
|
|
import commonService from '../../../models/common.js';
|
|
|
let app = getApp();
|
|
|
let router = global.router;
|
|
|
let yas;
|
...
|
...
|
@@ -81,7 +80,7 @@ const QUEUE_SUCCESS = { |
|
|
const OFFLINE_STATUS = {
|
|
|
OFFLINE: 1,
|
|
|
OFFLINE_OVER: 0
|
|
|
}
|
|
|
};
|
|
|
const YB_TO_ASSIST_C = 'YB_TO_ASSIST_C';
|
|
|
const YB_ASSIST_SUCCESS_L = 'YB_ASSIST_SUCCESS_L';
|
|
|
const YB_INVITE_ASSIST_C = 'YB_INVITE_ASSIST_C';
|
...
|
...
|
@@ -140,6 +139,7 @@ Page(Object.assign({ |
|
|
image_src: '../../../static/images/share_wxpeng@2x.png'
|
|
|
}]
|
|
|
},
|
|
|
isFollow: false
|
|
|
},
|
|
|
onLoad: function(query) {
|
|
|
let limitProductCode = query.limitProductCode ? query.limitProductCode : '';
|
...
|
...
|
@@ -168,8 +168,9 @@ Page(Object.assign({ |
|
|
});
|
|
|
|
|
|
let userInfo = app.getUserInfo();
|
|
|
|
|
|
if (!userInfo.wechat || !this.getUserWechatId()) {
|
|
|
this.goLogin({'login': '0', 'type': 'redirectTo'});
|
|
|
this.goLogin({login: '0', type: 'redirectTo'});
|
|
|
return;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -545,20 +546,13 @@ Page(Object.assign({ |
|
|
return;
|
|
|
}
|
|
|
|
|
|
common.addWechatFormId({
|
|
|
formId: e.detail.formId,
|
|
|
uid: this.data.uid,
|
|
|
miniapp_type: app.getMiniappType(),
|
|
|
openId: app.getOpenID()
|
|
|
});
|
|
|
|
|
|
this.share();
|
|
|
},
|
|
|
assistAction() {
|
|
|
let userInfo = app.getUserInfo();
|
|
|
|
|
|
if (!userInfo.wechat || !this.getUserWechatId()) {
|
|
|
this.goLogin({'login': '0'});
|
|
|
this.goLogin({login: '0'});
|
|
|
return;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -622,7 +616,7 @@ Page(Object.assign({ |
|
|
let userInfo = app.getUserInfo();
|
|
|
|
|
|
if (!userInfo.wechat || !this.getUserWechatId()) {
|
|
|
this.goLogin({'login': '0'});
|
|
|
this.goLogin({login: '0'});
|
|
|
return;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -710,6 +704,23 @@ Page(Object.assign({ |
|
|
}
|
|
|
});
|
|
|
},
|
|
|
toFollow() {
|
|
|
let that = this;
|
|
|
|
|
|
if (this.data.isFollow) {
|
|
|
return;
|
|
|
}
|
|
|
let tmplIds = ['WhCBCAO2ci_gSrDSzpMExhYAdnhlF0aqgr2YWzJG4EM', '3KKWG1j-1ui2wE19aLcpCVSoKTsbWpnlmPIBLesHJqs'];
|
|
|
|
|
|
commonService.postTmplId({
|
|
|
tmplIds
|
|
|
}).then(res => {
|
|
|
that.setData({
|
|
|
isFollow: true
|
|
|
});
|
|
|
});
|
|
|
|
|
|
},
|
|
|
assistCancel() {
|
|
|
this.reload();
|
|
|
},
|
...
|
...
|
@@ -785,8 +796,8 @@ Page(Object.assign({ |
|
|
},
|
|
|
|
|
|
goLogin(params) {
|
|
|
let login = parseInt(params['login']) || 1;
|
|
|
let type = params['type'] || 'navigateTo';
|
|
|
let login = parseInt(params.login) || 1;
|
|
|
let type = params.type || 'navigateTo';
|
|
|
let data = {};
|
|
|
|
|
|
if (this.data.originUid) {
|
...
|
...
|
|