Commit 3740c66f by zhouzy
2 parents a1b1f547 432dc342
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' ...@@ -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
...@@ -8,19 +8,21 @@ ...@@ -8,19 +8,21 @@
@ReachBottom="onReachBottom" @ReachBottom="onReachBottom"
ref="scrollView" ref="scrollView"
> >
<template v-if="flag">
<template v-if="list.length">
<template v-for="(i,index) in list"> <template v-for="(i,index) in list">
<div <div
class="box" class="box"
:key="index" :key="index"
> >
<div <!-- <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">{{i.codeState}}</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">{{i.staffName}}</div> <div class="value">{{i.staffName}}</div>
...@@ -35,12 +37,21 @@ ...@@ -35,12 +37,21 @@
class="item" class="item"
v-if="ind < 9" v-if="ind < 9"
> >
<img :src="item.autoUrl"> <img
:src="item.autoUrl"
@click="previewImage(i.imgList,ind)"
>
</div> </div>
</template> </template>
</div> </div>
</div> </div>
</template> </template>
</template>
<template v-else>
<van-empty description="暂无内容" />
</template>
</template>
</scroll-view> </scroll-view>
<resource-popup <resource-popup
v-model="showPopup" v-model="showPopup"
...@@ -51,14 +62,17 @@ ...@@ -51,14 +62,17 @@
</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,
codeStateOrStaffName: '', codeNameOrStaffName: '',
list: [], list: [],
currentItem: {} currentItem: {},
flag: false
} }
}, },
mounted() { mounted() {
...@@ -66,19 +80,14 @@ export default { ...@@ -66,19 +80,14 @@ export default {
}, },
methods: { methods: {
getList() { getList() {
let { codeStateOrStaffName } = this let { codeNameOrStaffName } = this
let data = { let obj = {}
method: 'cn.com.glsx.entmicro.code.listEntmicroChannelCodeList' if (codeNameOrStaffName) obj.codeNameOrStaffName = codeNameOrStaffName
} this.showLoading()
if(codeStateOrStaffName) data.codeStateOrStaffName = codeStateOrStaffName entmicroApi.getEntmicroChannelCodeList(obj).then(({ code, data, message }) => {
window this.hideLoading()
.$HTTP({ if (code == '0') {
url: 'http://192.168.3.191:8064/rop-scrm-entmicro/router', data.map(e => {
data
})
.then(res => {
console.log(res)
res.map(e => {
let imgList = [ let imgList = [
{ {
id: e.id, id: e.id,
...@@ -92,8 +101,19 @@ export default { ...@@ -92,8 +101,19 @@ export default {
} }
e.imgList = imgList e.imgList = imgList
}) })
this.list = data
this.list = res } else {
Notify(message)
}
this.flag = true
})
},
previewImage(list, startPosition) {
let images = []
list.map(e => images.push(e.autoUrl))
ImagePreview({
images,
startPosition
}) })
}, },
share(e) { share(e) {
...@@ -102,7 +122,8 @@ export default { ...@@ -102,7 +122,8 @@ export default {
}, },
search(e) { search(e) {
console.log(e) console.log(e)
this.codeStateOrStaffName = e this.codeNameOrStaffName = e
this.flag = false
this.getList() this.getList()
}, },
onReachBottom() { onReachBottom() {
...@@ -157,7 +178,7 @@ export default { ...@@ -157,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;
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!