Commit 307933fc by xinla

客户画像问题

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