Commit 62e5a703 by 王志慧

commit

1 parent a499fecd
......@@ -12,5 +12,15 @@ export default {
data,
returnAll
})
}
},
//用来判断是否待通过状态
updateCustomerWork (data={}) {
data.method = 'entmicro.api.dracScrmWork.updateCustomerWork'
return window.$HTTP({
url,
data,
returnAll
})
},
}
......@@ -31,4 +31,6 @@ export default {
returnAll
})
},
}
......@@ -282,6 +282,18 @@ const WxConfig = {
})
})
},
/** 打开个人信息页接口 */
openUserProfile(params) {
// "type": 1, //1表示该userid是企业成员,2表示该userid是外部联系人
// "userid": "wmEAlECwAAHrbWYDetiu3Af13xlYDAAA" //可以是企业成员,也可以是外部联系人
return new Promise((resolve) => {
wx.invoke('openUserProfile', params, res => {
if(res.err_msg != "openUserProfile:ok") {
resolve(res)
}
})
})
},
/**使用企业微信内置地图查看位置接口 */
openLocation(obj) {
/**
......
......@@ -5,9 +5,11 @@
<template>
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<template v-for="(item, index) in customerList">
<div :key="index" class="item flex">
<div :key="index" class="item flex" @click="openUserProfile(item)">
<div class="avatar">
<div class="sprite-icon icon-avatar"></div>
<div class="sprite-icon icon-avatar">
<img :src="item.avatar" alt="" />
</div>
</div>
<div class="info">
<div class="phone flex name">{{ item.customerName }}</div>
......@@ -27,6 +29,7 @@
</template>
<script type='text/ecmascript-6'>
import { groupTag } from '@/api'
export default {
name: '',
data() {
......@@ -39,145 +42,37 @@ export default {
},
methods: {
onReachBottom() {
console.log('触底')
this.$refs.scrollView.loading = false
this.$refs.scrollView.finished = true
},
// 消息盒子-好友列表
init() {
let search = {
taskId: 'cb3b9128e620413c931601a6d439d365',
status: this.status
}
this.customerList = [
{
id: null,
userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
customerName: '王欣伟',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
type: 1,
createdTime: '2021-11-14 17:17:38',
status: 2
},
{
id: null,
userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
customerName: '曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷',
customerPhone: '13476670746',
avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
type: 2,
createdTime: '2021-09-18 14:27:35',
status: 1
},
{
id: null,
userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
customerName: '爱就在一起',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
type: 1,
createdTime: '2021-08-31 14:51:06',
status: 0
},
{
id: null,
userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
customerName: '李崇源',
customerPhone: '13476670746',
avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
type: 2,
createdTime: '2021-08-24 09:39:05',
status: 1
},
{
id: null,
userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
customerName: '王欣伟',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
type: 1,
createdTime: '2021-11-14 17:17:38',
status: 2
},
{
id: null,
userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
customerName: '曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷',
customerPhone: '13476670746',
avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
type: 2,
createdTime: '2021-09-18 14:27:35',
status: 1
},
{
id: null,
userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
customerName: '爱就在一起',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
type: 1,
createdTime: '2021-08-31 14:51:06',
status: 0
},
{
id: null,
userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
customerName: '李崇源',
customerPhone: '13476670746',
avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
type: 2,
createdTime: '2021-08-24 09:39:05',
status: 1
},
{
id: null,
userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
customerName: '王欣伟',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
type: 1,
createdTime: '2021-11-14 17:17:38',
status: 2
},
{
id: null,
userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
customerName: '曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷',
customerPhone: '13476670746',
avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
type: 2,
createdTime: '2021-09-18 14:27:35',
status: 1
},
{
id: null,
userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
customerName: '爱就在一起',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
type: 1,
createdTime: '2021-08-31 14:51:06',
status: 0
},
{
id: null,
userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
customerName: '李崇源',
customerPhone: '13476670746',
avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
type: 2,
createdTime: '2021-08-24 09:39:05',
status: 1
}
]
console.log(this.customerList)
groupCustomer.getCustomerList(search).then(res => {
console.log(res)
groupTag.getcustomerList().then(res => {
if (res.code == 0) {
this.customerList = res.data
if (this.customerList.length > 0) {
this.customerList.forEach(item => {
this.$set(item, 'isChecked', false)
})
}
} else {
this.customerList = []
}
})
},
//打开个人信息页
openUserProfile(data) {
let seach = {
userIds: data.userid, //参与会话的企业成员列表,格式为userid1;userid2;...,用分号隔开。
type: 1
}
console.log(seach)
window.$wx = wxConfig
window.$wx.init(['openUserProfile']).then(() => {
window.$wx.openUserProfile(seach).then(res => {
console.log(res)
})
})
}
}
}
......
<template>
<div :class="['container-add', copywriting!=''?`page-type-${tabIndex}`:'']" >
<div :class="['container-add', copywriting != '' ? `page-type-${tabIndex}` : '']">
<tip :title="title"></tip>
<template v-if="customerList.length > 0">
<div class="customerList-add">
......@@ -61,7 +61,7 @@ export default {
}
},
created() {
this.init()
this.init()
},
computed: {
......@@ -114,6 +114,8 @@ export default {
},
//加好友
addFriend(data) {
groupCustomer.updateCustomerWork(() => {})
window.$wx = wxConfig
window.$wx.init(['navigateToAddCustomer', 'setClipboardData']).then(() => {
this.setClipboardData(data.customerPhone) //复制
......
......@@ -2,7 +2,7 @@
<div class="container-wrap">
<tab :list="list" :sticky="sticky" :index="tabIndex" @change="changeTabs" ></tab>
<!-- 已通过 -->
<tag :isTitle="isTitle" v-if="tabIndex == 2" id="tabId"></tag>
<tag :isTitle="isTitle" v-if="tabIndex == 2" id="tabId"></tag>
<!-- 添加 待通过 全部-->
<add v-else :tabIndex="tabIndex" id="tabId"></add>
</div>
......
......@@ -96,6 +96,7 @@ export default {
taskId: this.taskId,
status: 2
}
this.allChecked = false
groupCustomer.getCustomerList(search).then(res => {
if (res.code == 0) {
this.customerList = res.data
......@@ -122,7 +123,7 @@ export default {
groupTag.getcustomerList(obj).then(res => {
if (res.code == 0) {
this.customerList = res.data
this.title = `您共有 ${this.customerList.length}位客户可添加标签`
this.title = `您共有${this.customerList.length}位客户可添加标签`
if (this.customerList.length > 0) {
this.customerList.forEach(item => {
this.$set(item, 'isChecked', false)
......@@ -173,7 +174,12 @@ export default {
this.checkList = []
this.externalUserIds = []
this.keyWord = ''
this.init()
console.log(this.isTitle)
if (this.isTitle) {
this.init()
} else {
this.initAll()
}
},
//打开会话
gotoInfo(item) {
......@@ -183,7 +189,6 @@ export default {
groupName: '', // 会话名称。单聊时该参数传入空字符串""即可。
chatId: ''
}
console.log(seach)
window.$wx = wxConfig
window.$wx.init(['openEnterpriseChat']).then(() => {
window.$wx.openEnterpriseChat(seach).then(res => {
......@@ -203,8 +208,7 @@ export default {
.customerList {
// background: #fff;
.content {
// height: calc(100vh - 164px);
height: calc(100vh - 90px);
height: calc(100vh - 164px);
}
.customer {
padding: 0 16px;
......
......@@ -81,7 +81,11 @@ export default {
if (this.tagList[index].taggingList[ids].isChecked) {
this.checkAll.push({ ...this.tagList[index].taggingList[ids] })
} else {
this.checkAll.splice(index, 1)
for (let i = 0; i < this.checkAll.length; i++) {
if (this.tagList[index].taggingList[ids].taggingId == this.checkAll[i].taggingId) {
this.checkAll.splice(i--, 1)
}
}
}
},
close(data, value) {
......@@ -202,7 +206,6 @@ export default {
}
.tag-container {
padding: 10px 16px;
overflow-y: auto;
.tag-type {
padding-bottom: 24px;
.tag-title {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!