Commit 9078260d by 李伟康

commit

1 parent fd1c5927
// const url = 'http://192.168.2.42:8064/rop-scrm-entmicro/router'
const url = '/rop-scrm-entmicro/router'
const returnAll = true
export default {
/**获取群聊列表 */
getList(data) {
data.method = 'entmicro.api.one.template.list'
data.pageSize = 9999
data.pageNum = 1
return window.$HTTP({
url,
data,
returnAll
})
},
/** 根据userid获取客户详情 */
getDetail(data) {
data.method = 'entmicro.api.customer.detail.single'
return window.$HTTP({
url,
data,
returnAll
})
},
/** 保存新的群聊 */
addChat(data) {
data.method = 'entmicro.api.group.one.insert'
return window.$HTTP({
url,
data,
returnAll
})
},
/** 获取群后缀 */
getSuffix(data) {
data.method = 'entmicro.api.group.template.timstamp.get'
return window.$HTTP({
url,
data,
returnAll
})
},
/**获取群聊列表 */
getList(data) {
data.method = 'entmicro.api.one.template.list'
data.pageSize = 9999
data.pageNum = 1
return window.$HTTP({
url,
data
})
},
/** 根据userid获取客户详情 */
getDetail(data) {
data.method = 'entmicro.api.customer.detail.single'
return window.$HTTP({
url,
data
})
},
/** 保存新的群聊 */
addChat(data) {
data.method = 'entmicro.api.group.one.insert'
return window.$HTTP({
url,
data
})
},
/** 获取群后缀 */
getSuffix(data) {
data.method = 'entmicro.api.group.template.timstamp.get'
return window.$HTTP({
url,
data
})
}
}
// const url = 'http://192.168.3.191:8064/rop-scrm-entmicro/router'
const url = '/rop-scrm-entmicro/router'
const returnAll = true
export default {
/**消息盒子-好友列表 */
getCustomerList(data={}) {
data.method = 'entmicro.api.dracScrmWork.findWorkDetail'
return window.$HTTP({
url,
data,
returnAll
})
},
//用来判断是否待通过状态
updateCustomerWork (data={}) {
data.method = 'entmicro.api.dracScrmWork.updateCustomerWork'
return window.$HTTP({
url,
data,
returnAll
})
},
/**消息盒子-好友列表 */
getCustomerList(data = {}) {
data.method = 'entmicro.api.dracScrmWork.findWorkDetail'
return window.$HTTP({
url,
data
})
},
//用来判断是否待通过状态
updateCustomerWork(data = {}) {
data.method = 'entmicro.api.dracScrmWork.updateCustomerWork'
return window.$HTTP({
url,
data
})
}
}
// const url = 'http://192.168.2.42:8064/rop-scrm-entmicro/router'
const url = '/rop-scrm-entmicro/router'
const returnAll = true
export default {
/**获取打标签的客户列表 */
getcustomerList(data={}) {
data.method = 'entmicro.api.qywechat.tagging.customer.list'
return window.$HTTP({
url,
data,
returnAll
})
},
/**标签数据获取 */
gettagList(data={}) {
data.method = 'entmicro.api.qywechat.tagging.info'
return window.$HTTP({
url,
data,
returnAll
})
},
/**给客户打标签 */
putCustomertag (data={}) {
data.method = 'entmicro.api.qywechat.tagging.put.customer'
return window.$HTTP({
url,
data,
returnAll
})
},
/**获取打标签的客户列表 */
getcustomerList(data = {}) {
data.method = 'entmicro.api.qywechat.tagging.customer.list'
return window.$HTTP({
url,
data
})
},
/**标签数据获取 */
gettagList(data = {}) {
data.method = 'entmicro.api.qywechat.tagging.info'
return window.$HTTP({
url,
data
})
},
/**给客户打标签 */
putCustomertag(data = {}) {
data.method = 'entmicro.api.qywechat.tagging.put.customer'
return window.$HTTP({
url,
data
})
}
}
// const url = 'http://192.168.2.94:8115/rop-scrm-live/router'
const url = 'https://scrm.test.glsx.com.cn/rop-scrm-live/router'
const returnAll = true
export default {
/**获取详情信息 */
getDetail(data) {
data.method = 'scrm.api.live.merchant.get.task'
return window.$HTTP({
url,
data,
returnAll
})
},
}
\ No newline at end of file
/**获取详情信息 */
getDetail(data) {
data.method = 'scrm.api.live.merchant.get.task'
return window.$HTTP({
url,
data
})
}
}
......@@ -2,20 +2,42 @@
<div class="layout">
<div class="tips flex">请完善以下客户信息</div>
<template v-if="customerList.length > 0">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<scroll-view
class="content"
@ReachBottom="onReachBottom"
ref="scrollView"
>
<template v-for="(item, index) in customerList">
<div :key="index" class="item flex" @click="openUserProfile(item)">
<div
:key="index"
class="item flex"
@click="openUserProfile(item)"
>
<div class="avatar">
<div class="sprite-icon icon-avatar">
<img :src="item.avatar" alt="" v-if="item.avatar" />
<img src="../../assets/images/user.png" alt="" v-else />
<img
:src="item.avatar"
alt=""
v-if="item.avatar"
/>
<img
src="../../assets/images/user.png"
alt=""
v-else
/>
</div>
</div>
<div class="info">
<div class="phone flex name">{{ item.customerName }}</div>
<div class="tags flex" v-if="item.labels.length > 0">
<div
class="tags flex"
v-if="item.labels.length > 0"
>
<template v-for="(i, ind) in item.labels.slice(0, 3)">
<div :key="ind" class="tag text-center">{{ i.labelValue }}</div>
<div
:key="ind"
class="tag text-center"
>{{ i.labelValue }}</div>
</template>
</div>
</div>
......@@ -24,7 +46,10 @@
</template>
</scroll-view>
</template>
<empty v-else description="暂无数据" />
<empty
v-else
description="暂无数据"
/>
</div>
</template>
......@@ -60,12 +85,8 @@ export default {
taskId: this.taskId,
status: 0
}
groupCustomer.getCustomerList(search).then(res => {
if (res.code == 0) {
this.customerList = res.data
} else {
this.customerList = []
}
groupCustomer.getCustomerList(search).then(res => {
this.customerList = res || []
})
},
//打开个人信息页
......
......@@ -3,11 +3,30 @@
<tip :title="title"></tip>
<template v-if="customerList.length > 0">
<div class="customerList-add">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<div class="customer-add" v-for="(item, index) in customerList" :key="index">
<div class="customer-add-portrait" v-if="tabIndex == 3">
<img :src="item.avatar" alt="" v-if="item.avatar" />
<img src="../../assets/images/user.png" alt="" v-else />
<scroll-view
class="content"
@ReachBottom="onReachBottom"
ref="scrollView"
>
<div
class="customer-add"
v-for="(item, index) in customerList"
:key="index"
>
<div
class="customer-add-portrait"
v-if="tabIndex == 3"
>
<img
:src="item.avatar"
alt=""
v-if="item.avatar"
/>
<img
src="../../assets/images/user.png"
alt=""
v-else
/>
</div>
<div :class="{ 'customer-add-info': true, 'customer-add-all-info': tabIndex === 3 }">
<div class="customer-add-info-number">{{ item.customerPhone }}</div>
......@@ -15,30 +34,48 @@
</div>
<template v-if="item.status == 0">
<div class="customer-add-friend flex">
<div class="sprite-icon icon-customer-add" @click="addFriend(item)"></div>
<div
class="sprite-icon icon-customer-add"
@click="addFriend(item)"
></div>
<div class="customer-add-friend-text">加好友</div>
</div>
<div class="line"></div>
<div class="customer-add-friend flex" @click="callPhone(item.customerPhone)">
<div
class="customer-add-friend flex"
@click="callPhone(item.customerPhone)"
>
<div class="sprite-icon icon-customer-phone"></div>
<div class="customer-add-friend-text">拨打电话</div>
</div>
</template>
<div class="customer-add-stay" v-else-if="item.status == 1">待通过</div>
<div class="customer-add-pass" v-else-if="item.status == 2">已通过</div>
<div
class="customer-add-stay"
v-else-if="item.status == 1"
>待通过</div>
<div
class="customer-add-pass"
v-else-if="item.status == 2"
>已通过</div>
<div class="buttomLine"></div>
</div>
</scroll-view>
</div>
<template v-if="tabIndex == 0 && copywriting != ''">
<div class="copy-box">
<div class="sprite-icon icon-customer-copy" @click="copy"></div>
<div
class="sprite-icon icon-customer-copy"
@click="copy"
></div>
<div class="title">客户好友申请文案</div>
<div>{{ copywriting }}</div>
</div>
</template>
</template>
<empty v-else description="暂无数据" />
<empty
v-else
description="暂无数据"
/>
</div>
</template>
<script>
......@@ -100,11 +137,7 @@ export default {
status: this.tabIndex == 3 ? '' : this.tabIndex
}
groupCustomer.getCustomerList(search).then(res => {
if (res.code == 0) {
this.customerList = res.data
} else {
this.customerList = []
}
this.customerList = res || []
})
},
onReachBottom() {
......
......@@ -182,19 +182,19 @@ export default {
this.addGroupParams.externalUserIds.push(this.userId)
//获取客户信息
groupChat.getDetail({ externalUserId }).then(res => {
console.log(res.data, 'data')
this.businessCard = res.data
console.log(res, 'data')
this.businessCard = res
})
//获取列表信息
groupChat.getList({ externalUserId }).then(res => {
console.log(res, '444')
// this.groupList = res
this.groupList = res.data
this.groupList = res
let suffixList = []
for (var a = 0; a < this.groupList.length; a++) {
suffixList.push(this.groupList[a].id)
groupChat.getSuffix({ id: suffixList[a] }).then(res => {
this.suffix.push(res.data)
this.suffix.push(res)
console.log(this.suffix, 'suffix')
})
}
......
<template>
<div class="container">
<div class="box" v-if="showBox">
<div
class="box"
v-if="showBox"
>
<div class="top">
<div class="top-title">{{ detail.name }}直播活动</div>
<div class="iconBox" @click="copyMessage(this.massMessage)">
<div
class="iconBox"
@click="copyMessage(this.massMessage)"
>
<!-- <img src=".\imgs\copy.png" alt=""> -->
</div>
</div>
<div class="mass-message">{{ detail.promotion }}</div>
<div class="mass-time">直播时间:{{ date }}</div>
<div class="imgBox">
<img :src="detail.postImgUrl" alt="" />
<img
:src="detail.postImgUrl"
alt=""
/>
</div>
</div>
<div class="fixedButtom" v-if="showBox">
<div
class="fixedButtom"
v-if="showBox"
>
<div class="item-container">
<div class="icon-container">
<div class="icon-box" @click="share('wechat')">
<img src="@/assets/images/wechat.png" alt="" />
<div
class="icon-box"
@click="share('wechat')"
>
<img
src="@/assets/images/wechat.png"
alt=""
/>
</div>
</div>
<div class="icon-instruction">分享朋友圈</div>
</div>
<div class="item-container" style="margin-left: 61px">
<div class="icon-container" @click="share('customer')">
<div
class="item-container"
style="margin-left: 61px"
>
<div
class="icon-container"
@click="share('customer')"
>
<div class="icon-box">
<img src="@/assets/images/customer.png" alt="" />
<img
src="@/assets/images/customer.png"
alt=""
/>
</div>
</div>
<div class="icon-instruction">分享客户</div>
</div>
<div class="item-container" style="margin-left: 61px">
<div class="icon-container" @click="share('group')">
<div
class="item-container"
style="margin-left: 61px"
>
<div
class="icon-container"
@click="share('group')"
>
<div class="icon-box">
<img src="@/assets/images/group.png" alt="" />
<img
src="@/assets/images/group.png"
alt=""
/>
</div>
</div>
<div class="icon-instruction">分享客户群</div>
......@@ -59,15 +95,11 @@ export default {
let { taskId } = this.getQuery()
//获取界面详情数据
liveBroadcast.getDetail({ taskId }).then(res => {
console.log(res,'789')
if (res.code !== '0') {
this.showBox = false
Notify(res.message)
} else if (res.code == '0') {
this.detail = res.data
console.log(this.detail.startTime, 'this.detail.startTime')
this.formatDate(this.detail.startTime, this.detail.endTime)
}
console.log(res, '789')
this.detail = res
console.log(this.detail.startTime, 'this.detail.startTime')
this.formatDate(this.detail.startTime, this.detail.endTime)
this.showBox = res ? true : false
})
//初始化微信方法
window.$wx = wxConfig
......
<template>
<div class="tagContainer">
<search placeholder="请输入关键字" v-if="isTitle" :keyword="keyWord" @search="searchkeyWord"></search>
<search
placeholder="请输入关键字"
v-if="isTitle"
:keyword="keyWord"
@search="searchkeyWord"
></search>
<tip :title="title"></tip>
<template v-if="customerList && customerList.length > 0">
<div class="customerList">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<div class="customer" v-for="(item, index) in customerList" :key="item.id" @click="gotoInfo(item)">
<scroll-view
class="content"
@ReachBottom="onReachBottom"
ref="scrollView"
>
<div
class="customer"
v-for="(item, index) in customerList"
:key="item.id"
@click="gotoInfo(item)"
>
<div class="checked-box">
<template v-if="item.isChecked">
<div class="sprite-icon icon-customer-active" @click.stop="toggleHandle(index)"></div>
<div
class="sprite-icon icon-customer-active"
@click.stop="toggleHandle(index)"
></div>
</template>
<template v-else>
<div class="checked" @click.stop="toggleHandle(index)"></div>
<div
class="checked"
@click.stop="toggleHandle(index)"
></div>
</template>
</div>
<div class="customer-portrait">
<img :src="item.avatar" alt="" v-if="item.avatar"/>
<img src="../../assets/images/user.png" alt="" v-else />
<img
:src="item.avatar"
alt=""
v-if="item.avatar"
/>
<img
src="../../assets/images/user.png"
alt=""
v-else
/>
</div>
<div class="customer-info">
<div class="customer-info-name">
......@@ -28,7 +56,10 @@
</div>
<div class="date">{{ new Date(item.createdTime.replace(/-/g, '/')).format('yyyy-MM-dd') }}添加</div>
</div>
<img class="icon" src="../../assets/images/icon/arrow.png" />
<img
class="icon"
src="../../assets/images/icon/arrow.png"
/>
<div class="buttomLine"></div>
</div>
</scroll-view>
......@@ -36,10 +67,16 @@
<div class="footer">
<div class="checked-box">
<template v-if="allChecked">
<div class="sprite-icon icon-customer-active" @click.stop="checkAll()"></div>
<div
class="sprite-icon icon-customer-active"
@click.stop="checkAll()"
></div>
</template>
<template v-else>
<div class="checked" @click.stop="checkAll()"></div>
<div
class="checked"
@click.stop="checkAll()"
></div>
</template>
</div>
......@@ -47,13 +84,25 @@
全选
<label>已选{{ checkList.length }}个客户</label>
</div>
<van-button class="my-button" round color="#5850FF" @click="handleTag">批量打标签</van-button>
<van-button
class="my-button"
round
color="#5850FF"
@click="handleTag"
>批量打标签</van-button>
</div>
</template>
</div>
</template>
<empty v-else description="暂无数据" />
<make @success="successHandle" :externalUserIds="externalUserIds" ref="popRefs"></make>
<empty
v-else
description="暂无数据"
/>
<make
@success="successHandle"
:externalUserIds="externalUserIds"
ref="popRefs"
></make>
</div>
</template>
<script>
......@@ -108,15 +157,11 @@ export default {
}
this.allChecked = false
groupCustomer.getCustomerList(search).then(res => {
if (res.code == 0) {
this.customerList = res.data
this.title = `已有${this.customerList.length}位客户已通过您的好友申请!`
this.customerList.forEach(item => {
this.$set(item, 'isChecked', false)
})
} else {
this.customerList = []
}
this.customerList = res || []
this.title = `已有${this.customerList.length}位客户已通过您的好友申请!`
this.customerList.forEach(item => {
this.$set(item, 'isChecked', false)
})
})
},
getuserInfo() {
......@@ -131,17 +176,12 @@ export default {
}
this.allChecked = false
groupTag.getcustomerList(obj).then(res => {
if (res.code == 0) {
this.customerList = res.data
this.title = `您共有${this.customerList.length}位客户可添加标签`
if (this.customerList.length > 0) {
this.customerList.forEach(item => {
this.$set(item, 'isChecked', false)
})
}
} else {
this.customerList = []
this.title = `共${this.customerList.length}位客户可添加标签`
this.customerList = res || []
this.title = `您共有${this.customerList.length}位客户可添加标签`
if (this.customerList.length > 0) {
this.customerList.forEach(item => {
this.$set(item, 'isChecked', false)
})
}
})
},
......
......@@ -107,8 +107,8 @@ export default {
keyWord: this.keyWord
}
groupTag.gettagList(obj).then(res => {
if (res.data && res.data.length > 0) {
this.tagList = res.data
if (res && res.length > 0) {
this.tagList = res
if (this.tagList.length > 0) {
for (let i = 0; i < this.tagList.length; i++) {
this.tagList[i].checked = false
......@@ -176,7 +176,7 @@ export default {
taggingInfo: JSON.stringify(taggingInfo)
}
groupTag.putCustomertag(obj).then(res => {
if (res.data) Toast('标签批量添加成功')
if (res) Toast('标签批量添加成功')
this.clearData()
})
this.$emit('success')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!