Commit c47c3741 by 王志慧

commit

2 parents 46a2b9c4 3740c66f
const url = '/rop-scrm-entmicro/router'
export default {
/**引流获客列表 */
getEntmicroChannelCodeList(data) {
data.method = 'entmicro.api.code.listEntmicroChannelCodeList'
return window.$HTTP({
url,
data,
returnAll: true
})
}
}
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 returnAll = true const returnAll = true
export default { export default {
/**获取群聊列表 */ /**获取群聊列表 */
getList(data) { getList(data) {
data.method = 'org.ore.api.one.template.list' data.method = 'entmicro.api.one.template.list'
data.pageSize = 9999 data.pageSize = 9999
data.pageNum = 1 data.pageNum = 1
return window.$HTTP({ return window.$HTTP({
...@@ -14,7 +15,7 @@ export default { ...@@ -14,7 +15,7 @@ export default {
}, },
/** 根据userid获取客户详情 */ /** 根据userid获取客户详情 */
getDetail(data) { getDetail(data) {
data.method = 'org.ore.api.customer.detail.single' data.method = 'entmicro.api.customer.detail.single'
return window.$HTTP({ return window.$HTTP({
url, url,
data, data,
...@@ -23,7 +24,7 @@ export default { ...@@ -23,7 +24,7 @@ export default {
}, },
/** 保存新的群聊 */ /** 保存新的群聊 */
addChat(data) { addChat(data) {
data.method = 'org.ore.api.group.one.insert' data.method = 'entmicro.api.group.one.insert'
return window.$HTTP({ return window.$HTTP({
url, url,
data, data,
......
...@@ -12,11 +12,13 @@ import wxConfig from './wxConfig' ...@@ -12,11 +12,13 @@ import wxConfig from './wxConfig'
import liveBroadcast from './liveBroadcast' import liveBroadcast from './liveBroadcast'
import groupCustomer from './groupCustomer' import groupCustomer from './groupCustomer'
import groupTag from './groupTag' import groupTag from './groupTag'
import entmicroApi from './entmicroApi'
export { export {
ssoApi, ssoApi,
groupChat, groupChat,
wxConfig, wxConfig,
liveBroadcast, liveBroadcast,
groupCustomer, groupCustomer,
groupTag groupTag,
entmicroApi
} }
\ No newline at end of file \ No newline at end of file
...@@ -61,7 +61,10 @@ img { ...@@ -61,7 +61,10 @@ img {
.sticky { .sticky {
position: static; position: static;
} }
<<<<<<< HEAD
=======
>>>>>>> 3740c66fa0b551c1f79096dbfcb78300ec6a912a
.buttomLine { .buttomLine {
position: absolute; position: absolute;
left: 0; left: 0;
......
...@@ -8,9 +8,12 @@ ...@@ -8,9 +8,12 @@
> >
<div class="content"> <div class="content">
<div class="title flex"> <div class="title flex">
会员套餐名称 {{obj.codeState}}
<div class="all flex"> <div
<template v-if="true"> class="all flex"
@click="selectAll"
>
<template v-if="all">
<div class="sprite-icon icon-active"></div> <div class="sprite-icon icon-active"></div>
</template> </template>
<template v-else> <template v-else>
...@@ -20,20 +23,19 @@ ...@@ -20,20 +23,19 @@
</div> </div>
</div> </div>
<div class="img-box"> <div class="img-box">
<template v-for="(item,ind) in 17"> <template v-for="(item,index) in obj.imgList">
<div <div
:key="ind" :key="index"
class="item" class="item"
@click="choose({item,index})"
> >
<img src="@/assets/images/test.jpg"> <img :src="item.autoUrl">
<div class="radio-box"> <div class="radio-box">
<template v-if="item.active"> <template v-if="item.active">
<div class="sprite-icon icon-active"></div> <div class="sprite-icon icon-active"></div>
</template> </template>
<template v-else> <template v-else>
<div class="radio"> <div class="radio"></div>
</div>
</template> </template>
</div> </div>
</div> </div>
...@@ -53,21 +55,59 @@ ...@@ -53,21 +55,59 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: 'ResourcePopup', name: 'ResourcePopup',
props: ['value'], props: {
data () { value: Boolean,
data: {
type: Object,
default: () => {}
}
},
data() {
return { return {
show: false show: false,
obj: {},
all: false
} }
}, },
watch: { watch: {
'value' (n) { value(n) {
this.show = n this.show = n
},
data(n) {
console.log('123', n)
this.obj = n
this.checkAll()
} }
}, },
mounted () { mounted() {},
},
methods: { methods: {
close () { choose({ item, index }) {
item.active = !item.active
this.$set(this.obj.imgList, index, item)
this.checkAll()
},
checkAll() {
let { imgList } = this.obj
try {
imgList.map(e => {
if (!e.active) throw false
})
} catch (error) {
this.all = error
return
}
this.all = true
},
selectAll() {
let {
all,
obj: { imgList }
} = this
imgList.map(e => (e.active = !all))
this.all = !all
this.obj.imgList = imgList
},
close() {
this.show = false this.show = false
this.$emit('close') this.$emit('close')
} }
......
<template> <template>
<div class="layout"> <div class="layout">
<div class="search sticky"> <div class="search sticky">
<search /> <search @search="search" />
</div> </div>
<scroll-view <scroll-view
class="content" class="content"
@ReachBottom="onReachBottom" @ReachBottom="onReachBottom"
ref="scrollView" ref="scrollView"
> >
<template v-for="(i,index) in 10"> <template v-if="flag">
<div <template v-if="list.length">
class="box" <template v-for="(i,index) in list">
:key="index" <div
> class="box"
<div :key="index"
>
<!-- <div
class="share text-center" class="share text-center"
@click="share(i)" @click="share(i)"
> >
转发 转发
<div class="sprite-icon icon-attract-customer-share"></div> <div class="sprite-icon icon-attract-customer-share"></div>
</div> </div> -->
<div class="title text-hide">渠道活码名称大概到这个位置…</div> <div class="title text-hide">{{i.codeName}}</div>
<div class="name-list"> <div class="name-list">
<div class="label">使用人员:</div> <div class="label">使用人员:</div>
<div class="value">张三、C李四、小陈总、飞天小猪、海的小心心、陈五、金七</div> <div class="value">{{i.staffName}}</div>
</div>
<div class="remark">
备注:{{i.remark || '- -'}}
</div>
<div class="img-box">
<template v-for="(item,ind) in 9">
<div
:key="ind"
class="item"
>
<img src="@/assets/images/test.jpg">
</div> </div>
</template> <div class="remark">
</div> 备注:{{i.codeRemark || '- -'}}
</div> </div>
<div class="img-box">
<template v-for="(item,ind) in i.imgList">
<div
:key="ind"
class="item"
v-if="ind < 9"
>
<img
:src="item.autoUrl"
@click="previewImage(i.imgList,ind)"
>
</div>
</template>
</div>
</div>
</template>
</template>
<template v-else>
<van-empty description="暂无内容" />
</template>
</template> </template>
</scroll-view> </scroll-view>
<resource-popup <resource-popup
v-model="showPopup" v-model="showPopup"
@close="showPopup = false" @close="showPopup = false"
:data="currentItem"
/> />
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import { ImagePreview, Notify } from 'vant'
import { entmicroApi } from '@/api'
export default { export default {
name: '', name: '',
data () { data() {
return { return {
showPopup: false showPopup: false,
codeNameOrStaffName: '',
list: [],
currentItem: {},
flag: false
} }
}, },
mounted () { mounted() {
this.getList()
}, },
methods: { methods: {
share () { getList() {
let { codeNameOrStaffName } = this
let obj = {}
if (codeNameOrStaffName) obj.codeNameOrStaffName = codeNameOrStaffName
this.showLoading()
entmicroApi.getEntmicroChannelCodeList(obj).then(({ code, data, message }) => {
this.hideLoading()
if (code == '0') {
data.map(e => {
let imgList = [
{
id: e.id,
autoUrl: e.qrCode
}
]
if (e.codeInfo && e.codeInfo.length) {
e.codeInfo.map(i => {
imgList.push(i)
})
}
e.imgList = imgList
})
this.list = data
} else {
Notify(message)
}
this.flag = true
})
},
previewImage(list, startPosition) {
let images = []
list.map(e => images.push(e.autoUrl))
ImagePreview({
images,
startPosition
})
},
share(e) {
this.showPopup = true this.showPopup = true
this.currentItem = e
},
search(e) {
console.log(e)
this.codeNameOrStaffName = e
this.flag = false
this.getList()
}, },
onReachBottom () { onReachBottom() {
console.log('触底') console.log('触底')
this.$refs.scrollView.loading = false this.$refs.scrollView.loading = false
this.$refs.scrollView.finished = true this.$refs.scrollView.finished = true
...@@ -114,7 +178,7 @@ export default { ...@@ -114,7 +178,7 @@ export default {
margin-bottom: 8px; margin-bottom: 8px;
.label { .label {
color: #666666; color: #666666;
width: 60px; width: 70px;
flex-shrink: 0; flex-shrink: 0;
} }
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<div class="business-card"> <div class="business-card">
<div class="business-card-top"> <div class="business-card-top">
<div class="imgBox"> <div class="imgBox">
<img :src="businessCard.avatar" alt="" /> <img class="img" :src="businessCard.avatar" alt="" />
</div> </div>
<div class="textBox"> <div class="textBox">
<div class="title">{{ businessCard.customerName }}</div> <div class="title">{{ businessCard.customerName }}</div>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<template v-if="item.userList"> <template v-if="item.userList">
<!-- <div :style="{ 'width': item.imgs.length > 4 ? 14.67 : (item.imgs.length > 1 ? 22 : 44) + 'px', 'height': item.imgs.length > 4 ? 14.67 : (item.imgs.length > 1 ? 22 : 44) + 'px' }" v-for="img in item.imgs" :key='img.id'> --> <!-- <div :style="{ 'width': item.imgs.length > 4 ? 14.67 : (item.imgs.length > 1 ? 22 : 44) + 'px', 'height': item.imgs.length > 4 ? 14.67 : (item.imgs.length > 1 ? 22 : 44) + 'px' }" v-for="img in item.imgs" :key='img.id'> -->
<div :class="[item.userList.length > 4 ? 'head-img-five' : item.userList.length > 1 ? 'head-img-two' : 'head-img-one', 'head-img']" v-for="user in item.userList" :key="user.id"> <div :class="[item.userList.length > 4 ? 'head-img-five' : item.userList.length > 1 ? 'head-img-two' : 'head-img-one', 'head-img']" v-for="user in item.userList" :key="user.id">
<img src="@/assets/images/user.png" alt="" /> <!-- <img src="@/assets/images/user.png" alt="" /> -->
</div> </div>
</template> </template>
</div> </div>
...@@ -34,14 +34,16 @@ ...@@ -34,14 +34,16 @@
<div class="textBox"> <div class="textBox">
<div class="title">{{ item.groupName }}{{ '(' + item.userList.length + ')' }}</div> <div class="title">{{ item.groupName }}{{ '(' + item.userList.length + ')' }}</div>
<div class="nameBox"> <div class="nameBox">
<span class="wechatNumber" v-for="user in item.userList" :key="user.id">{{ '@' + user.staffName }}</span> <span class="wechatNumber welcomeSpan" v-for="user in item.userList" :key="user.id">{{ '@' + user.staffName }}</span>
</div> </div>
</div> </div>
<van-button @click="showDialog(item)" style="margin-left: auto" size="small" color="#5850FF">{{ item.chatId == null ? '创建群聊' : '加入群聊' }}</van-button> <van-button @click="showDialog(item)" style="margin-left: auto" size="small" color="#5850FF">{{ item.chatId == null ? '创建群聊' : '加入群聊' }}</van-button>
</div> </div>
<div class="groups-item-bottom"> <div class="groups-item-bottom">
<div class="welcomeTitle">入群欢迎语</div> <div class="welcomeTitle">入群欢迎语</div>
<div class="welcomeWords" v-for="content in item.attachmentList" :key="content.index">{{ content.attType == 1 ? content.attContent : '' }}</div> <div class="welcomeWords" v-for="content in item.attachmentList" :key="content.index">
<span class="welcomeSpan">{{ content.attType == 1 ? content.attContent : '' }}</span>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -60,14 +62,11 @@ ...@@ -60,14 +62,11 @@
v-for="user in dialogMessage" v-for="user in dialogMessage"
:key="user.id" :key="user.id"
> >
<img src="@/assets/images/user.png" alt="" /> <!-- <img src="@/assets/images/user.png" alt="" /> -->
</div> </div>
</div> </div>
</div> </div>
</van-dialog> </van-dialog>
<div class="fixedButtom">
<div class="buttomLine"></div>
</div>
</div> </div>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
...@@ -124,13 +123,14 @@ export default { ...@@ -124,13 +123,14 @@ export default {
this.insertParams.externalUserId = this.userId this.insertParams.externalUserId = this.userId
this.insertParams.templateId = this.templateId this.insertParams.templateId = this.templateId
// console.log(this.insertParams, '99999999') // console.log(this.insertParams, '99999999')
//打开刚创建的群聊
if (this.addGroupParams.chatId == '') { if (this.addGroupParams.chatId == '') {
window.$wx.openExistedChatWithMsg({ chatId: res.chatId }).then(res => { //保存新群
console.log(this.addGroupParams.chatId, '55555') groupChat.addChat(this.insertParams).then(res => {
//保存新群 console.log(res, '???')
groupChat.addChat(this.insertParams).then(res => { //打开刚创建的群聊
console.log(res, '???') window.$wx.openExistedChatWithMsg({ chatId: this.insertParams.chatId }).then(res => {
console.log(this.addGroupParams.chatId, '55555')
}) })
}) })
} }
...@@ -161,13 +161,13 @@ export default { ...@@ -161,13 +161,13 @@ export default {
console.log(res, '11111') console.log(res, '11111')
this.userId = res this.userId = res
let externalUserId = this.userId let externalUserId = this.userId
let merchantId = 1
//获取客户信息 //获取客户信息
groupChat.getDetail({ externalUserId, merchantId }).then(res => { groupChat.getDetail({ externalUserId }).then(res => {
console.log(res, '333') console.log(res.data, 'data')
this.businessCard = res.data
}) })
//获取列表信息 //获取列表信息
groupChat.getList({ externalUserId, merchantId }).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.data
...@@ -178,21 +178,13 @@ export default { ...@@ -178,21 +178,13 @@ export default {
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped>
</style>
<style>
.container { .container {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #f7f7f7; background: #f7f7f7;
padding: 14px 16px 0px 16px; padding: 14px 16px 0px 16px;
position: absolute;
-webkit-box-sizing: border-box;
box-sizing: border-box; box-sizing: border-box;
top: 0;
left: 0;
overflow-y: auto;
overflow: hidden;
} }
.business-card { .business-card {
margin: 0; margin: 0;
...@@ -203,7 +195,6 @@ export default { ...@@ -203,7 +195,6 @@ export default {
vertical-align: baseline; vertical-align: baseline;
background: transparent; background: transparent;
background: #fff; background: #fff;
-webkit-box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1);
width: 232px; width: 232px;
margin-left: 55px; margin-left: 55px;
...@@ -309,6 +300,7 @@ export default { ...@@ -309,6 +300,7 @@ export default {
} }
.container-bottom { .container-bottom {
padding-top: 15px; padding-top: 15px;
height: calc(100vh - 167px);
} }
.groups-item { .groups-item {
width: 323px; width: 323px;
...@@ -320,8 +312,8 @@ export default { ...@@ -320,8 +312,8 @@ export default {
margin-top: 10px; margin-top: 10px;
} }
.groups-list { .groups-list {
height: 572px; overflow-y: scroll;
overflow: scroll; height: calc(100% - 21px);
} }
.groups-item-top { .groups-item-top {
display: flex; display: flex;
...@@ -350,18 +342,6 @@ export default { ...@@ -350,18 +342,6 @@ export default {
line-height: 17px; line-height: 17px;
margin-top: 2px; margin-top: 2px;
} }
.fixedButtom {
position: -webkit-sticky;
position: sticky;
bottom: 0;
background: #ffffff;
opacity: 1;
z-index: 99;
align-items: center;
height: 5px;
width: 100%;
padding: 21px 0px 8px 0px;
}
.buttomLine { .buttomLine {
width: 134px; width: 134px;
height: 5px; height: 5px;
...@@ -389,4 +369,14 @@ export default { ...@@ -389,4 +369,14 @@ export default {
color: #3a3a3a; color: #3a3a3a;
line-height: 22px; line-height: 22px;
} }
.welcomeSpan {
overflow: hidden;
width: 100px;
white-space: nowrap;
text-overflow: ellipsis;
}
.img {
width: 44.01px;
height: 44.01px;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!