Commit 307933fc by xinla

客户画像问题

1 parent 48e7232e
......@@ -80,7 +80,7 @@ export default {
], //必填
success: (res) => {
// 回调
this.$toast('agentId成功:')
// this.$toast('agentId成功:')
this.$store.state.agentConfigStatus = true
},
fail: (res) => {
......
......@@ -2,7 +2,6 @@
<div>
<!-- 头部 -->
<div class="header">
<span class="title"> 社群关系 </span>
<van-icon
name="cross"
......@@ -97,9 +96,13 @@ export default {
commonGroup: [], // 共同的群聊
// externalUserid: "wmiGuBCgAAIH-T9ekaE-Q52N2lKWeInw",
externalUserid: '',
userid: this.$store.state.userId, // 员工Id
}
},
computed: {
userId() {
return this.$store.state.userId // 员工Id
},
},
created() {
this.externalUserid = this.$route.query.customerId
......
......@@ -25,7 +25,7 @@
>{{
form.remark
? form.remark
: form.name + "_" + form.remarkCorpName
: form.name + '_' + form.remarkCorpName
}}
&nbsp; &nbsp;</span
><span
......@@ -124,8 +124,8 @@
</div>
</template>
<script>
import { getCustomerInfo, getWeCustomerInfo } from "@/api/portrait";
import { getUserInfo } from "@/api/common";
import { getCustomerInfo, getWeCustomerInfo } from '@/api/portrait'
import { getUserInfo } from '@/api/common'
export default {
data() {
return {
......@@ -137,59 +137,62 @@ export default {
// 接口开始
// 表单数据
form: {
externalUserid: "", // 客户Id
userId: this.$store.state.userId, // 员工Id
name: "", // 昵称
remarkMobiles: "", // 手机号
birthday: "", // 客户生日
age: "", // 年龄
email: "", // 邮箱
address: "", // 地址
qq: "", // qq
position: "", // 职业
remarkCorpName: "", // 公司
description: "", // 其他描述
externalUserid: '', // 客户Id
userId: '', // 员工Id
name: '', // 昵称
remarkMobiles: '', // 手机号
birthday: '', // 客户生日
age: '', // 年龄
email: '', // 邮箱
address: '', // 地址
qq: '', // qq
position: '', // 职业
remarkCorpName: '', // 公司
description: '', // 其他描述
},
};
}
},
computed: {
// 获取客户年龄
userId() {
return this.$store.state.userId // 员工Id
},
},
created() {
this.form.externalUserid = this.$route.query.customerId;
this.form.externalUserid = this.$route.query.customerId
// 获取客户详细信息
getCustomerInfo({
externalUserid: this.form.externalUserid,
userId: this.form.userId,
userId: this.userId,
})
.then(({ data }) => {
console.log(data);
this.form = data;
console.log(this.form);
console.log(data)
this.form = data
console.log(this.form)
})
.catch((err) => {
console.log(err);
});
console.log(err)
})
},
methods: {
// 选择生日
edit() {
this.flage = !this.flage;
this.flage = !this.flage
},
// 点击保存按钮提交表单
saveUserInformation() {
this.flage = !this.flage;
this.flage = !this.flage
getWeCustomerInfo(this.form)
.then((data) => {
console.log(data);
console.log(data)
})
.catch((err) => {
console.log(err);
});
console.log(err)
})
},
},
};
}
</script>
<style lang="less" scoped>
......
......@@ -18,9 +18,21 @@
<div class="img"><img :src="form.avatar" alt="" /></div>
<div class="right">
<div>
<span>{{ form.remark ? form.remark: form.name+"_"+form.remarkCorpName }} &nbsp; &nbsp;</span
><span class="icon iconfont icon-man" v-if="form.gender == 1"></span>
<span class="icon iconfont icon-xingbie" v-else-if="form.gender ==2"></span>
<span
>{{
form.remark
? form.remark
: form.name + '_' + form.remarkCorpName
}}
&nbsp; &nbsp;</span
><span
class="icon iconfont icon-man"
v-if="form.gender == 1"
></span>
<span
class="icon iconfont icon-xingbie"
v-else-if="form.gender == 2"
></span>
<van-icon name="manager" color="#9c9c9c" v-else />
</div>
<div class="c9">
......@@ -389,7 +401,7 @@ export default {
// externalUserid: "wm2H-nDQAACG5x4XjsM1OoW8UVfpbn3A", // 客户Id
// externalUserid: "wmiGuBCgAAgeijfvvpJ62cBfwrB-c4kw",
externalUserid: '',
userId: this.$store.state.userId, // 员工Id
// userId: this.$store.state.userId, // 员工Id
form: {
name: '', // 昵称
remarkMobiles: '', // 手机号
......@@ -438,6 +450,9 @@ export default {
},
},
computed: {
userId() {
return this.$store.state.userId
},
// activeLabel : () => {
// this.addTag.forEach((value) => {
// value.name == this.name
......@@ -726,6 +741,7 @@ export default {
},
getCustomerInfo() {
this.$toast('userId:' + this.userId)
getCustomerInfo({
externalUserid: this.externalUserid,
userId: this.userId,
......@@ -934,6 +950,6 @@ export default {
color: #2c8cf0;
}
.icon-xingbie {
color: pink;
color: pink;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!