|
@@ -139,18 +139,17 @@ export default {
|
139
|
139
|
const updataTag = ref([])
|
140
|
140
|
const h5CustomerDynamicList = ref([])
|
141
|
141
|
const h5CustomerOrderList = ref([])
|
142
|
|
- const configInfo = ref(null)
|
143
|
142
|
const self_url = ref()
|
144
|
143
|
const pageLoading = ref(false)
|
145
|
|
- // const configInfo = {
|
146
|
|
- // corpid:'wwc8d3e33f8e096671',
|
147
|
|
- // external_userid:'wmezvKNwAAF17OWc13Hg6X0ob31ijZmg',
|
148
|
|
- // user_id:'bc85094e2cfd56a8bd6cd726bd98b14b'
|
149
|
|
- // }
|
|
144
|
+ const configInfo = {
|
|
145
|
+ corpid:'',
|
|
146
|
+ external_userid:'',
|
|
147
|
+ user_id:''
|
|
148
|
+ }
|
150
|
149
|
onBeforeMount(() => {//组件挂载之前
|
151
|
150
|
self_url.value = window.location.href
|
152
|
151
|
if(getQueryString('againJump')){
|
153
|
|
- configInfo.value.corpid = getQueryString('corpid')
|
|
152
|
+ configInfo.corpid = getQueryString('corpid')
|
154
|
153
|
pageLoading.value = true;
|
155
|
154
|
getWxConfig(()=>{
|
156
|
155
|
getCurExternalContact()//获取企业外部联系人ID
|
|
@@ -197,9 +196,9 @@ export default {
|
197
|
196
|
return v.tag_md5
|
198
|
197
|
});
|
199
|
198
|
(proxy as any).$axios.post("/api/h5/portrait/h5CustomerTagUpdate", {
|
200
|
|
- corpid:configInfo.value.value.corpid,
|
201
|
|
- external_userid:configInfo.value.external_userid,
|
202
|
|
- user_id:configInfo.value.user_id,
|
|
199
|
+ corpid:configInfo.corpid,
|
|
200
|
+ external_userid:configInfo.external_userid,
|
|
201
|
+ user_id:configInfo.user_id,
|
203
|
202
|
selected_tag_id_list:selected_tag_id_list
|
204
|
203
|
},true).then((res) => {
|
205
|
204
|
tag_visible.value = false;
|
|
@@ -210,9 +209,9 @@ export default {
|
210
|
209
|
}
|
211
|
210
|
function get_user_info(){//获取客户信息
|
212
|
211
|
(proxy as any).$axios.get("/api/h5/portrait/customerDetail", {
|
213
|
|
- corpid:configInfo.value.corpid,
|
214
|
|
- external_userid:configInfo.value.external_userid,
|
215
|
|
- user_id:configInfo.value.user_id,
|
|
212
|
+ corpid:configInfo.corpid,
|
|
213
|
+ external_userid:configInfo.external_userid,
|
|
214
|
+ user_id:configInfo.user_id,
|
216
|
215
|
},true).then((res) => {
|
217
|
216
|
//请求成功
|
218
|
217
|
let data = res.rst;
|
|
@@ -225,9 +224,9 @@ export default {
|
225
|
224
|
}
|
226
|
225
|
function get_h5CustomerDynamicList(){//客户画像-动态
|
227
|
226
|
(proxy as any).$axios.get("/api/h5/portrait/h5CustomerDynamicList",{
|
228
|
|
- corpid:configInfo.value.corpid,
|
229
|
|
- external_userid:configInfo.value.external_userid,
|
230
|
|
- user_id:configInfo.value.user_id,
|
|
227
|
+ corpid:configInfo.corpid,
|
|
228
|
+ external_userid:configInfo.external_userid,
|
|
229
|
+ user_id:configInfo.user_id,
|
231
|
230
|
},true).then((res) => {
|
232
|
231
|
//请求成功
|
233
|
232
|
let data = res.rst;
|
|
@@ -238,9 +237,9 @@ export default {
|
238
|
237
|
}
|
239
|
238
|
function get_h5CustomerOrderList(){//客户画像-订单
|
240
|
239
|
(proxy as any).$axios.get("/api/h5/portrait/h5CustomerOrderList", {
|
241
|
|
- corpid:configInfo.value.corpid,
|
242
|
|
- external_userid:configInfo.value.external_userid,
|
243
|
|
- user_id:configInfo.value.user_id,
|
|
240
|
+ corpid:configInfo.corpid,
|
|
241
|
+ external_userid:configInfo.external_userid,
|
|
242
|
+ user_id:configInfo.user_id,
|
244
|
243
|
page:1,
|
245
|
244
|
page_size:20,
|
246
|
245
|
},true).then((res) => {
|
|
@@ -254,11 +253,11 @@ export default {
|
254
|
253
|
function wx_getuserinfo(){//获取访问用户身份//通过code获取用户信息
|
255
|
254
|
return new Promise((resolve,reject)=>{
|
256
|
255
|
(proxy as any).$axios.get("/api/oauth2/userInfo", {
|
257
|
|
- corpid:configInfo.value.corpid,
|
|
256
|
+ corpid:configInfo.corpid,
|
258
|
257
|
code:getQueryString('code'),
|
259
|
258
|
},true).then((res) => {
|
260
|
259
|
let data = res.rst;
|
261
|
|
- configInfo.value.user_id = data.user_id;
|
|
260
|
+ configInfo.user_id = data.user_id;
|
262
|
261
|
resolve('')
|
263
|
262
|
}).catch( err => {
|
264
|
263
|
console.log(err,'err')
|
|
@@ -272,7 +271,7 @@ export default {
|
272
|
271
|
let promise2 = new Promise((resolve,reject) => {
|
273
|
272
|
wx.invoke('getCurExternalContact', {}, function(res){
|
274
|
273
|
if(res.err_msg == "getCurExternalContact:ok"){
|
275
|
|
- configInfo.value.external_userid = res.userId;
|
|
274
|
+ configInfo.external_userid = res.userId;
|
276
|
275
|
|
277
|
276
|
}else {
|
278
|
277
|
//错误处理
|