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