Commit 89f2e444 by 李伟康

引流获客

1 parent f3bf6a20
const url = '/rop-scrm-entmicro/router'
export default {
/**引流获客列表 */
getEntmicroChannelCodeList(data) {
data.method = 'entmicro.api.code.listEntmicroChannelCodeList'
return window.$HTTP({
url,
data,
returnAll: true
})
}
}
......@@ -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
......@@ -8,39 +8,50 @@
@ReachBottom="onReachBottom"
ref="scrollView"
>
<template v-for="(i,index) in list">
<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">{{i.codeState}}</div>
<div class="name-list">
<div class="label">使用人员:</div>
<div class="value">{{i.staffName}}</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">
</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"
......@@ -51,14 +62,17 @@
</template>
<script type='text/ecmascript-6'>
import { ImagePreview, Notify } from 'vant'
import { entmicroApi } from '@/api'
export default {
name: '',
data() {
return {
showPopup: false,
codeStateOrStaffName: '',
codeNameOrStaffName: '',
list: [],
currentItem: {}
currentItem: {},
flag: false
}
},
mounted() {
......@@ -66,19 +80,14 @@ export default {
},
methods: {
getList() {
let { codeStateOrStaffName } = this
let data = {
method: 'cn.com.glsx.entmicro.code.listEntmicroChannelCodeList'
}
if(codeStateOrStaffName) data.codeStateOrStaffName = codeStateOrStaffName
window
.$HTTP({
url: 'http://192.168.3.191:8064/rop-scrm-entmicro/router',
data
})
.then(res => {
console.log(res)
res.map(e => {
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,
......@@ -92,9 +101,20 @@ export default {
}
e.imgList = imgList
})
this.list = res
})
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
......@@ -102,7 +122,8 @@ export default {
},
search(e) {
console.log(e)
this.codeStateOrStaffName = e
this.codeNameOrStaffName = e
this.flag = false
this.getList()
},
onReachBottom() {
......@@ -157,7 +178,7 @@ export default {
margin-bottom: 8px;
.label {
color: #666666;
width: 60px;
width: 70px;
flex-shrink: 0;
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!