Commit 9078260d by 李伟康

commit

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