Commit a0b6a992 by 胡悦
2 parents 4fb97ad6 c47c3741
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
"glsx-common": "^1.4.8", "glsx-common": "^1.4.8",
"lib-flexible": "^0.3.2", "lib-flexible": "^0.3.2",
"postcss-loader": "^6.2.0", "postcss-loader": "^6.2.0",
"sass-loader": "^7.3.1",
"sha1": "^1.1.1", "sha1": "^1.1.1",
"storejs": "^1.1.0", "storejs": "^1.1.0",
"vant": "^2.12.21", "vant": "^2.12.21",
...@@ -41,7 +42,6 @@ ...@@ -41,7 +42,6 @@
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"postcss-px-to-viewport": "^1.1.1", "postcss-px-to-viewport": "^1.1.1",
"postcss-pxtorem": "^5.1.1", "postcss-pxtorem": "^5.1.1",
"sass-loader": "^8.0.2",
"script-ext-html-webpack-plugin": "^2.1.4", "script-ext-html-webpack-plugin": "^2.1.4",
"vue-loader": "^15.9.8", "vue-loader": "^15.9.8",
"vue-template-compiler": "^2.6.11", "vue-template-compiler": "^2.6.11",
......
<template> <template>
<div id="app"> <div id="app">
<template v-if="showWindow">
<router-view /> <router-view />
</template>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'App' name: 'App',
data() {
return {
showWindow: false
}
},
watch: {
watchFlag: {
immediate: true,
handler(newval) {
this.showWindow = newval
this.hideLoading()
}
}
},
computed: {
watchFlag() {
return this.$store.state.app.showWindow
}
}
} }
</script> </script>
<style lang="scss"></style> <style lang="scss"></style>
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,
......
const url = 'http://192.168.3.191:8064/rop-scrm-entmicro/router'
const returnAll = true
export default {
/**消息盒子-好友列表 */
getCustomerList(data) {
data.method = 'org.ore.api.dracScrmWork.findWorkDetail'
return window.$HTTP({
url,
data,
returnAll
})
}
}
const url = 'http://192.168.3.191:8064/rop-scrm-entmicro/router'
const returnAll = true
export default {
/**获取打标签的客户列表 */
getcustomerList(data) {
data.method = 'org.ore.api.qywechat.tagging.customer.list'
return window.$HTTP({
url,
data,
returnAll
})
},
/**标签数据获取 */
gettaggingList(data) {
data.method = 'org.ore.api.qywechat.tagging.info'
return window.$HTTP({
url,
data,
returnAll
})
},
}
...@@ -9,8 +9,16 @@ ...@@ -9,8 +9,16 @@
import groupChat from './groupChat' import groupChat from './groupChat'
import ssoApi from './ssoApi' import ssoApi from './ssoApi'
import wxConfig from './wxConfig' import wxConfig from './wxConfig'
import liveBroadcast from './liveBroadcast'
import groupCustomer from './groupCustomer'
import groupTag from './groupTag'
import entmicroApi from './entmicroApi'
export { export {
ssoApi, ssoApi,
groupChat, groupChat,
wxConfig wxConfig,
liveBroadcast,
groupCustomer,
groupTag,
entmicroApi
} }
\ No newline at end of file \ No newline at end of file
// 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 returnAll = true
export default {
/**获取详情信息 */
getDetail(data) {
data.method = 'scrm.api.live.merchant.get.task'
return window.$HTTP({
url,
data,
returnAll
})
},
}
\ No newline at end of file \ No newline at end of file
...@@ -61,3 +61,12 @@ img { ...@@ -61,3 +61,12 @@ img {
.sticky { .sticky {
position: static; position: static;
} }
.buttomLine {
position: absolute;
left: 0;
bottom: 0;
width: 375px;
height: 1px;
opacity: 0.3;
background-color: #c3c3c3;
}
\ No newline at end of file \ No newline at end of file
<template>
<van-empty class="custom-image" :image="empty" :description="description" />
</template>
<script>
export default {
name: 'empty',
data() {
return {
empty: require('../assets/images/empty.png')
}
},
props: {
description: {
type: String,
default: '暂无数据'
}
}
}
</script>
<style lang="scss" scoped>
.custom-image {
padding-top: 79px;
}
.custom-image /deep/ .van-empty__image {
width: 88px;
height: 56px;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -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
}
}, },
mounted () { data(n) {
console.log('123', n)
this.obj = n
this.checkAll()
}
}, },
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')
} }
......
...@@ -38,4 +38,7 @@ export default { ...@@ -38,4 +38,7 @@ export default {
overflow-y: scroll; overflow-y: scroll;
box-sizing: border-box; box-sizing: border-box;
} }
.van-list{
background-color: #ffffff;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="hint">
<div class="tip">{{ title }}</div>
<div class="date" v-if="time">{{ time }}</div>
</div>
</template>
<script>
export default {
name: 'tip',
data() {
return {
time: this.date
}
},
props: {
title: {
type: String,
default: ''
},
date: {
type: String,
default: ''
}
},
methods: {}
}
</script>
<style lang="scss" scoped>
.hint {
padding: 10px 16px;
width: 375px;
height: 40px;
background: #f7f7f7;
box-shadow: 0px 1px 0px 0px #e9e9e9;
box-sizing: border-box;
display: flex;
justify-content: center;
justify-content: space-between;
.tip {
color: #545454;
font-size: 16px;
line-height: 20px;
text-align: left;
letter-spacing: 0px;
}
.date {
font-size: 12px;
font-weight: 500;
color: #545454;
line-height: 20px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -26,15 +26,15 @@ Vue.prototype.api = api ...@@ -26,15 +26,15 @@ Vue.prototype.api = api
Vue.prototype.bus = bus Vue.prototype.bus = bus
Vue.prototype.tools = tools Vue.prototype.tools = tools
Vue.prototype.local = local Vue.prototype.local = local
Vue.prototype.to = function(name, params) { Vue.prototype.to = function (name, params) {
if (name === -1) { if (name === -1) {
router.go(-1) router.go(-1)
return return
} }
router.push({ name, params }) router.push({ name, params })
} }
// 移动端适配 rem // 移动端适配 rem
// import 'lib-flexible/flexible.js' // import 'lib-flexible/flexible.js'
Vue.config.productionTip = false Vue.config.productionTip = false
......
const pages = { const pages = {
customerGroup: [{ customerGroup: [{
name: 'index', name: 'index'
}, },
{ name: 'mass' } { name: 'mass' }
], ],
...@@ -23,8 +23,16 @@ const pages = { ...@@ -23,8 +23,16 @@ const pages = {
title: '完善信息', title: '完善信息',
backgroundColor: '#F7F7F7' backgroundColor: '#F7F7F7'
} }
}, { }],
name: 'detail', tag: [{
name: 'index',
meta: {
title: '批量打标签',
backgroundColor: '#F7F7F7'
}
}],
customerDetails: [{
name: 'index',
meta: { meta: {
title: '查看客户详情', title: '查看客户详情',
backgroundColor: '#F7F7F7' backgroundColor: '#F7F7F7'
...@@ -37,6 +45,7 @@ const pages = { ...@@ -37,6 +45,7 @@ const pages = {
} }
}] }]
} }
const redirect = '' const redirect = ''
......
...@@ -35,8 +35,6 @@ const mutations = { ...@@ -35,8 +35,6 @@ const mutations = {
SET_LAST_PATH(state, path) { SET_LAST_PATH(state, path) {
state.lastPath = path state.lastPath = path
} }
} }
const actions = { const actions = {
// 设置name // 设置name
...@@ -70,36 +68,39 @@ const actions = { ...@@ -70,36 +68,39 @@ const actions = {
const code = getParams('code') const code = getParams('code')
if (code) { if (code) {
const { corpId } = util.getLocalStorage('dj_scrm_corpId') const { corpId } = util.getLocalStorage('dj_scrm_corpId')
ssoApi.login({ ssoApi
.login({
code, code,
corpId corpId
}).then(({ code, data, message }) => { })
.then(({ code, data, message }) => {
console.log(data) console.log(data)
// const { baseURL } = window.$fetchConfig.request // const { baseURL } = window.$fetchConfig.request
const [baseURL] = redirectUrl.split('/dj-scrm-wx-work-main/') const [baseURL] = redirectUrl.split('/dj-scrm-wx-work-main/')
let url = `${baseURL}/dj-scrm-wx-work-main/#/` let url = `${baseURL}/dj-scrm-wx-work-main/#/`
let route = state.lastPath == 'coupon' ? '' : state.lastPath || '' let route = state.lastPath == 'coupon' ? '' : state.lastPath || ''
route = route.replace('.', '/') route = route.replace('.', '/')
state.showWindow = true
if (code == '0') { if (code == '0') {
if (data.loginList.length) { if (data.loginList.length) {
if (data.loginList.length > 1) { if (data.loginList.length > 1) {
let userInfo = data.loginList[0] let userInfo = data.loginList[0]
let { merchantId, accountName } = userInfo let { merchantId, accountName } = userInfo
let loginAccount = accountName let loginAccount = accountName
ssoApi.selectAccount({ ssoApi
.selectAccount({
loginAccount, loginAccount,
merchantId, merchantId,
loginToken: data.loginToken, loginToken: data.loginToken,
loginSource: 'WW', loginSource: 'WW',
loginType: 3 loginType: 3
}).then(res => { })
.then(res => {
util.removeLocalStorage('dj_scrm_loginToken') util.removeLocalStorage('dj_scrm_loginToken')
util.removeLocalStorage('dj_scrm_accountList') util.removeLocalStorage('dj_scrm_accountList')
util.setLocalStorage('dj_scrm_userInfo', res.data) util.setLocalStorage('dj_scrm_userInfo', res.data)
util.setSessionId(res.data.sessionId) util.setSessionId(res.data.sessionId)
dispatch('registerHttp', res.data.sessionId) dispatch('registerHttp', res.data.sessionId)
state.showWindow = true
window.location.replace(`${url}${route}`) window.location.replace(`${url}${route}`)
}) })
} else { } else {
...@@ -109,11 +110,13 @@ const actions = { ...@@ -109,11 +110,13 @@ const actions = {
dispatch('registerHttp', userInfo.sessionId) dispatch('registerHttp', userInfo.sessionId)
// 只有一个账号 history.back() // 只有一个账号 history.back()
console.log(`${redirectUrl}${route}`) console.log(`${redirectUrl}${route}`)
// window.location.replace(`${redirectUrl}${route}`) state.showWindow = true
window.location.replace(`${redirectUrl}${route}`)
} }
} else { } else {
/**没有账号 */ /**没有账号 */
// window.location.href = `${url}common/nothing` // window.location.href = `${url}common/nothing`
Notify('没有账号')
} }
} else { } else {
/**账号过期 (暂时没有字段判断是否过期) */ /**账号过期 (暂时没有字段判断是否过期) */
...@@ -125,7 +128,7 @@ const actions = { ...@@ -125,7 +128,7 @@ const actions = {
util.showLoading() util.showLoading()
let appid = getParams('corpId') //从链接获取 let appid = getParams('corpId') //从链接获取
let dj_scrm = util.getLocalStorage('dj_scrm_corpId') let dj_scrm = util.getLocalStorage('dj_scrm_corpId')
if (!appid) appid = dj_scrm && dj_scrm.corpId || 'ww7ee69c648ae1b7e6' if (!appid) appid = (dj_scrm && dj_scrm.corpId) || 'ww7ee69c648ae1b7e6'
// //
util.setLocalStorage('dj_scrm_corpId', { corpId: appid }) util.setLocalStorage('dj_scrm_corpId', { corpId: appid })
// 'ww657a2d4ae89a4424' // 'ww657a2d4ae89a4424'
...@@ -138,13 +141,12 @@ const actions = { ...@@ -138,13 +141,12 @@ const actions = {
let url = `${baseURL}/dj-scrm-wx-work-main/#/` let url = `${baseURL}/dj-scrm-wx-work-main/#/`
window.location.href = `${url}?redirect_uri=${redirectUrl}&corpId=${storage_corpId.corpId}` window.location.href = `${url}?redirect_uri=${redirectUrl}&corpId=${storage_corpId.corpId}`
} }
}, },
navigation({ dispatch }) { navigation({ dispatch }) {
let { sessionId, corpId } = getParams() let { sessionId, corpId } = getParams()
const storage_sessionId = util.getSessionId() const storage_sessionId = util.getSessionId()
const storage_corpId = util.getLocalStorage('dj_scrm_corpId') const storage_corpId = util.getLocalStorage('dj_scrm_corpId')
if (!corpId) corpId = storage_corpId && storage_corpId.corpId || 'ww7ee69c648ae1b7e6' if (!corpId) corpId = (storage_corpId && storage_corpId.corpId) || 'ww7ee69c648ae1b7e6'
util.setLocalStorage('dj_scrm_corpId', { corpId }) util.setLocalStorage('dj_scrm_corpId', { corpId })
if (sessionId || storage_sessionId) { if (sessionId || storage_sessionId) {
state.showWindow = true state.showWindow = true
...@@ -159,7 +161,7 @@ const actions = { ...@@ -159,7 +161,7 @@ const actions = {
state.showWindow = true state.showWindow = true
}, },
registerHttp({}, sessionId = '') { registerHttp({}, sessionId = '') {
window.$HTTP = new Http({...window.$fetchConfig, alert: Notify, headers: { token: sessionId } }) window.$HTTP = new Http({ ...window.$fetchConfig, alert: Notify, headers: { token: sessionId } })
} }
} }
const getParams = name => { const getParams = name => {
......
...@@ -125,6 +125,9 @@ const setClipboardData = data => { ...@@ -125,6 +125,9 @@ const setClipboardData = data => {
data, data,
success(res) { success(res) {
Toast('复制成功') Toast('复制成功')
},
fail(res){
console.log(res)
} }
}) })
} }
...@@ -152,6 +155,9 @@ const toTop = () => { ...@@ -152,6 +155,9 @@ const toTop = () => {
const getParams = () => { const getParams = () => {
return window.vm.$route.params return window.vm.$route.params
} }
const getQuery = () => {
return window.vm.$route.query
}
const watchPageBack = () => { const watchPageBack = () => {
return new Promise(resolve => { return new Promise(resolve => {
if (window.$back) { if (window.$back) {
...@@ -183,7 +189,8 @@ const utils = { ...@@ -183,7 +189,8 @@ const utils = {
throttle, throttle,
decimal, decimal,
dialog, dialog,
toTop toTop,
getQuery
} }
Object.keys(utils).map(key => { Object.keys(utils).map(key => {
......
<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">
<template v-if="list.length">
<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">渠道活码名称大概到这个位置…</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>
<div class="remark"> <div class="remark">
备注:{{i.remark || '- -'}} 备注:{{i.codeRemark || '- -'}}
</div> </div>
<div class="img-box"> <div class="img-box">
<template v-for="(item,ind) in 9"> <template v-for="(item,ind) in i.imgList">
<div <div
:key="ind" :key="ind"
class="item" class="item"
v-if="ind < 9"
>
<img
:src="item.autoUrl"
@click="previewImage(i.imgList,ind)"
> >
<img src="@/assets/images/test.jpg">
</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"
@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;
} }
} }
......
<template> <template>
<div class="layout"> <div class="layout">
<div class="tips flex"> <div class="tips flex">请完善以下客户信息</div>
请完善以下客户信息
</div>
<template> <template>
<template> <template>
<scroll-view <scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
class="content" <template v-for="(item, index) in customerList">
@ReachBottom="onReachBottom" <div :key="index" class="item flex">
ref="scrollView"
>
<template v-for="(item,index) in 10">
<div
:key="index"
class="item flex"
>
<div class="avatar"> <div class="avatar">
<div class="sprite-icon icon-avatar"></div> <div class="sprite-icon icon-avatar"></div>
</div> </div>
<div class="info"> <div class="info">
<div class="phone flex"> <div class="phone flex name">{{ item.customerName }}</div>
恒河猴
</div>
<div class="tags flex"> <div class="tags flex">
<template v-for="(i,ind) in 5"> <template v-for="(i, ind) in 5">
<div <div :key="ind" class="tag text-center">{{ index }}{{ ind }}恒河猴</div>
:key="ind"
class="tag text-center"
>
{{index}}{{ind}}恒河猴
</div>
</template> </template>
</div> </div>
</div> </div>
...@@ -45,17 +29,155 @@ ...@@ -45,17 +29,155 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: '', name: '',
data () { data() {
return { return {
customerList: []
} }
}, },
mounted () { created() {
this.init()
}, },
methods: { methods: {
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
},
// 消息盒子-好友列表
init() {
let search = {
taskId: 'cb3b9128e620413c931601a6d439d365',
status: this.status
}
this.customerList = [
{
id: null,
userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
customerName: '王欣伟',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
type: 1,
createdTime: '2021-11-14 17:17:38',
status: 2
},
{
id: null,
userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
customerName: '曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷',
customerPhone: '13476670746',
avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
type: 2,
createdTime: '2021-09-18 14:27:35',
status: 1
},
{
id: null,
userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
customerName: '爱就在一起',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
type: 1,
createdTime: '2021-08-31 14:51:06',
status: 0
},
{
id: null,
userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
customerName: '李崇源',
customerPhone: '13476670746',
avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
type: 2,
createdTime: '2021-08-24 09:39:05',
status: 1
},
{
id: null,
userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
customerName: '王欣伟',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
type: 1,
createdTime: '2021-11-14 17:17:38',
status: 2
},
{
id: null,
userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
customerName: '曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷',
customerPhone: '13476670746',
avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
type: 2,
createdTime: '2021-09-18 14:27:35',
status: 1
},
{
id: null,
userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
customerName: '爱就在一起',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
type: 1,
createdTime: '2021-08-31 14:51:06',
status: 0
},
{
id: null,
userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
customerName: '李崇源',
customerPhone: '13476670746',
avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
type: 2,
createdTime: '2021-08-24 09:39:05',
status: 1
},
{
id: null,
userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
customerName: '王欣伟',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
type: 1,
createdTime: '2021-11-14 17:17:38',
status: 2
},
{
id: null,
userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
customerName: '曾琪aaaa啊啊啊啊啊啊啊啊aaaaaaaa嗷嗷嗷',
customerPhone: '13476670746',
avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
type: 2,
createdTime: '2021-09-18 14:27:35',
status: 1
},
{
id: null,
userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
customerName: '爱就在一起',
customerPhone: '13476670746',
avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
type: 1,
createdTime: '2021-08-31 14:51:06',
status: 0
},
{
id: null,
userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
customerName: '李崇源',
customerPhone: '13476670746',
avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
type: 2,
createdTime: '2021-08-24 09:39:05',
status: 1
}
]
console.log(this.customerList)
groupCustomer.getCustomerList(search).then(res => {
console.log(res)
if (res.code == 0) {
this.customerList = res.data
}
})
} }
} }
} }
...@@ -71,6 +193,12 @@ export default { ...@@ -71,6 +193,12 @@ export default {
height: auto; height: auto;
padding: 16px 16px 12px 16px; padding: 16px 16px 12px 16px;
box-sizing: border-box; box-sizing: border-box;
.name {
width: 50px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.tags { .tags {
flex-wrap: wrap; flex-wrap: wrap;
.tag { .tag {
......
<template>
<div :class="['container-add', `page-type-${tabIndex}`]">
<tip :title="title"></tip>
<template v-if="data.length > 0">
<div class="customerList-add">
<scroll-view class="content" @ReachBottom="onReachBottom" ref="scrollView">
<div class="customer-add" v-for="(item, index) in data" :key="index">
<div class="customer-add-portrait" v-if="tabIndex == 3">
<img :src="item.avatar" />
</div>
<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-name">{{ item.customerName }}</div>
</div>
<template v-if="item.status == 0">
<div class="customer-add-friend flex">
<div class="sprite-icon icon-customer-add" @click="addFriend(item)">
</div>
<div class="customer-add-friend-text">加好友</div>
</div>
<div class="line"></div>
<div class=" customer-add-friend flex" @click="callPhone(item.customerPhone)">
<div class="sprite-icon icon-customer-phone">
</div>
<div class="customer-add-friend-text">拨打电话</div>
</div>
</template>
<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>
</scroll-view>
</div>
<template v-if="tabIndex == 0 && copywriting != ''">
<div class="copy-box">
<div class="sprite-icon icon-customer-copy" @click="copy"></div>
<div class="title">客户好友申请文案</div>
<div>{{ copywriting }}</div>
</div>
</template>
</template>
<empty v-else description="暂无数据" />
</div>
</template>
<script>
import { wxConfig } from '@/api'
export default {
name: 'customerDetails',
data() {
return {
check: true,
customerList: this.data,
copywriting: '我是深圳福田宝马4S店的售后经理王俊凯,添加企业微信,帮你解决您购车售后任何问题。'
}
},
props: {
data: {
type: Array,
default: () => []
},
tabIndex: {
type: Number,
default: 0
}
},
computed: {
title() {
switch (this.tabIndex) {
case 0:
return `您共有${this.data.length}位客户待添加!`
case 1:
return `您共有${this.data.length}位客户待通过!`
case 3:
return `您共有${this.data.length}位客户!`
default:
return `您共有${this.data.length}位客户待添加!`
}
}
},
methods: {
onReachBottom() {
this.$refs.scrollView.loading = false
this.$refs.scrollView.finished = true
},
//拨打电话
callPhone(phone) {
this.makePhoneCall(phone)
},
//加好友
addFriend(data) {
window.$wx = wxConfig
window.$wx.init(['navigateToAddCustomer', 'setClipboardData']).then(() => {
//获取userId
this.setClipboardData({ data: data.customerPhone }) //复制
window.$wx.navigateToAddCustomer().then(res => {
console.log(res)
})
})
},
//文案拷贝
copy() {
window.$wx = wxConfig
window.$wx.init(['setClipboardData']).then(() => {
this.setClipboardData({ data: this.copywriting }) //复制
})
}
}
}
</script>
<style lang="scss" scoped>
.container-add {
width: 100%;
.customerList-add {
// background: #fff;
.content {
height: calc(100vh - 90px);
}
.customer-add {
padding: 16px 16px;
width: 375px;
box-sizing: border-box;
display: flex;
align-items: center;
position: relative;
.customer-add-portrait {
img {
width: 44px;
height: 44px;
}
}
.customer-add-info {
text-align: left;
padding-right: 119px;
.customer-add-info-number {
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 22px;
margin-bottom: 6px;
width: 110px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.customer-add-info-name {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
white-space: nowrap;
width: 110px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.customer-add-all-info {
text-align: left;
padding: 0 59px 0 16px !important;
.customer-add-info-number {
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 22px;
margin-bottom: 6px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 110px;
}
.customer-add-info-name {
font-size: 14px;
font-weight: 400;
color: #333333;
line-height: 20px;
white-space: nowrap;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 110px;
}
}
.customer-add-friend {
width: 36px;
margin: 0 auto;
flex-direction: column;
.customer-add-friend-text {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
white-space: nowrap;
margin-top: 7px;
}
}
.line {
margin: 0 13px 0 16px;
width: 1px;
height: 42px;
background: rgba(0, 0, 0, 0.1);
}
.customer-add-stay {
font-size: 12px;
font-weight: 400;
color: #5850ff;
line-height: 17px;
margin-left: 78px;
white-space: nowrap;
}
.customer-add-pass {
font-size: 12px;
font-weight: 400;
color: #666666;
line-height: 17px;
margin-left: 81px;
white-space: nowrap;
}
}
}
.stickyfix {
height: 130px;
background: #ffffff;
box-shadow: 0px 1px 0px 0px #e9e9e9;
box-sizing: border-box;
padding: 10px 16px;
position: fixed;
left: 0;
bottom: 0;
z-index: 99;
}
.copy-box {
height: 130px;
box-sizing: border-box;
padding: 10px 16px;
font-weight: 500;
font-size: 14px;
color: #333333;
word-break: break-all;
position: relative;
background: #ffffff;
box-shadow: 0px 1px 0px 0px #e9e9e9;
.sprite-icon {
position: absolute;
top: 10px;
right: 15px;
}
.title {
margin-bottom: 16px;
}
}
}
.page-type-0 {
.content {
height: calc(100vh - 220px) !important;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div class="container-wrap">
<tab :list="list" :sticky="sticky" :index="tabIndex" @change="changeTabs"></tab>
<!-- 添加 待通过 全部-->
<add v-if="tabIndex == 0 || tabIndex == 1 || tabIndex == 3" :tabIndex="tabIndex" :data="customerList"></add>
<!-- 已通过 -->
<tag :isTitle="isTitle" v-else-if="tabIndex == 2" :data="customerList"></tag>
</div>
</template>
<script>
import add from './add'
import tag from '../tag/index.vue'
import { groupCustomer } from '@/api'
export default {
name: 'customerDetails',
data() {
return {
list: ['待添加', '待通过', '已通过', '全部'], //0.待添加 1.待接受 2.已完成
sticky: true,
isTitle: false, //是否显示search组件
tabIndex: 0,
status: 0,
taskId: this.$route.query.taskId?this.$route.query.taskId:'',
customerList: [],
// customerList : [
// {
// id: null,
// userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
// customerName: '王欣伟',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
// type: 1,
// createdTime: '2021-11-14 17:17:38',
// status: 2
// },
// {
// id: null,
// userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
// customerName: '曾琪',
// customerPhone: '13476670746',
// avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
// type: 2,
// createdTime: '2021-09-18 14:27:35',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
// customerName: '爱就在一起',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
// type: 1,
// createdTime: '2021-08-31 14:51:06',
// status: 0
// },
// {
// id: null,
// userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
// customerName: '李崇源',
// customerPhone: '13476670746',
// avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
// type: 2,
// createdTime: '2021-08-24 09:39:05',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
// customerName: '王欣伟',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
// type: 1,
// createdTime: '2021-11-14 17:17:38',
// status: 2
// },
// {
// id: null,
// userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
// customerName: '曾琪',
// customerPhone: '13476670746',
// avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
// type: 2,
// createdTime: '2021-09-18 14:27:35',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
// customerName: '爱就在一起',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
// type: 1,
// createdTime: '2021-08-31 14:51:06',
// status: 0
// },
// {
// id: null,
// userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
// customerName: '李崇源',
// customerPhone: '13476670746',
// avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
// type: 2,
// createdTime: '2021-08-24 09:39:05',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAY_3bc9griISYSmgyx_FuQw',
// customerName: '王欣伟',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/Q3auHgzwzM7CwgjO4zXia5tmwgfKRK1IXhialS5hiaVMt15SlniciaRRHDA/0',
// type: 1,
// createdTime: '2021-11-14 17:17:38',
// status: 2
// },
// {
// id: null,
// userid: 'wodMreDgAAJ4g8Q6XpoIcNFXtr_M42xA',
// customerName: '曾琪',
// customerPhone: '13476670746',
// avatar: 'http://wework.qpic.cn/bizmail/TzKjFfYqwUNTjchjy3lQW3u9HibSkzuicPdrkZWhP7p9KTSysersUWWA/0',
// type: 2,
// createdTime: '2021-09-18 14:27:35',
// status: 1
// },
// {
// id: null,
// userid: 'wmdMreDgAAvkJ7PZmeph-HYoSLmkMUFQ',
// customerName: '爱就在一起',
// customerPhone: '13476670746',
// avatar: 'http://wx.qlogo.cn/mmhead/A7sq8BD8oexpibZTkv1gC7uib0sOrUZuhfPgrK7aicuib4JqRDq1bed4kQ/0',
// type: 1,
// createdTime: '2021-08-31 14:51:06',
// status: 0
// },
// {
// id: null,
// userid: 'wodMreDgAAcjbEcZ4kycsCEeb0sGqDkA',
// customerName: '李崇源',
// customerPhone: '13476670746',
// avatar: 'https://wework.qpic.cn/wwhead/duc2TvpEgSQO4BpE0WZSZ8I5J6rakCVOgvErIPJwQaxPiaq5xiblVNTV8pMYcrcHjRPAvHhZQWxy8/0',
// type: 2,
// createdTime: '2021-08-24 09:39:05',
// status: 1
// }
// ],
}
},
components: {
add,
tag
},
created() {
this.init()
},
methods: {
// 消息盒子-好友列表
init() {
let search = {
taskId:this.taskId,
status: this.status
}
groupCustomer.getCustomerList(search).then(res => {
console.log(res)
if (res.code == 0) {
this.customerList = res.data
}
})
},
changeTabs(e) {
if (e == 3) {
this.status = ''
} else {
this.status = e
}
this.tabIndex = e
this.init()
}
}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file \ No newline at end of file
...@@ -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 => { groupChat.addChat(this.insertParams).then(res => {
console.log(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;
...@@ -221,7 +212,6 @@ export default { ...@@ -221,7 +212,6 @@ export default {
align-items: center; align-items: center;
width: 44.01px; width: 44.01px;
height: 44.01px; height: 44.01px;
text-align: center;
background: #e1e1e1; background: #e1e1e1;
} }
.itemsBox { .itemsBox {
...@@ -310,6 +300,7 @@ export default { ...@@ -310,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;
...@@ -321,8 +312,8 @@ export default { ...@@ -321,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;
...@@ -351,18 +342,6 @@ export default { ...@@ -351,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;
...@@ -390,4 +369,14 @@ export default { ...@@ -390,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
<template> <template>
<div class="container"> <div class="container">
<div class="box"> <div class="box" v-if="showBox">
<div class="top"> <div class="top">
<div class="top-title">{{ massTitle }}直播活动</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">{{ massMessage }}</div> <div class="mass-message">{{ detail.promotion }}</div>
<div class="mass-time">直播时间:{{ massTime }}</div> <div class="mass-time">直播时间:{{ date }}</div>
<div class="imgBox"> <div class="imgBox">
<img src="" alt="" /> <img :src="detail.postImgUrl" alt="" />
</div> </div>
</div> </div>
<div class="fixedButtom"> <div class="fixedButtom" v-if="showBox">
<div class="line-container"> <div class="item-container">
<div class="buttomLine"></div> <div class="icon-container">
<div class="icon-box" @click="share('wechat')">
<img src="@/assets/images/wechat.png" alt="" />
</div>
</div>
<div class="icon-instruction">分享朋友圈</div>
</div>
<div class="item-container" style="margin-left: 61px">
<div class="icon-container" @click="share('customer')">
<div class="icon-box">
<img src="@/assets/images/customer.png" alt="" />
</div>
</div>
<div class="icon-instruction">分享客户</div>
</div>
<div class="item-container" style="margin-left: 61px">
<div class="icon-container" @click="share('group')">
<div class="icon-box">
<img src="@/assets/images/group.png" alt="" />
</div>
</div>
<div class="icon-instruction">分享客户群</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script type='text/ecmascript-6'>
import { liveBroadcast, wxConfig } from '@/api'
import { Notify } from 'vant'
export default { export default {
name: 'mass', name: 'mass',
data() { data() {
return { return {
massTitle: 'songshu', detail: {},
massMessage: 'xxxxx', date: '',
massTime: '10' showBox: true
} }
}, },
activated() {}, activated() {},
deactivated() {}, deactivated() {},
mounted() {}, mounted() {
let { taskId } = this.getQuery()
//获取界面详情数据
liveBroadcast.getDetail({ taskId }).then(res => {
console.log(res,'789')
if (res.code !== '0') {
this.showBox = false
Notify(res.message)
} else if (res.code == '0') {
this.detail = res.data
console.log(this.detail.startTime, 'this.detail.startTime')
this.formatDate(this.detail.startTime, this.detail.endTime)
}
})
//初始化微信方法
window.$wx = wxConfig
window.$wx.init(['shareToExternalContact', 'shareToExternalChat', 'shareToExternalMoments']).then(() => {
console.log(res, 'init')
})
},
methods: { methods: {
// 复制内容 // 复制内容
closeMessage(val) { // closeMessage(val) {
cloneText(val) // cloneText(val)
Toast('复制成功') // Toast('复制成功')
// }
share(object) {
console.log(object)
let text = {
content: this.detail.promotion + '\n' + '直播时间' + ' ' + this.date
}
let attachments = [
{
msgtype: 'image',
image: {
imgUrl: this.detail.postImgUrl
}
}
]
//分享到朋友圈
if (object == 'wechat') {
window.$wx.shareToExternalMoments({ text, attachments }).then(res => {})
}
//分享给客户
if (object == 'customer') {
window.$wx.shareToExternalContact({ text, attachments }).then(res => {})
}
//分享给客户群
if (object == 'group') {
window.$wx.shareToExternalChat({ text, attachments }).then(res => {})
}
},
//更改日期格式
formatDate(startTime, endTime) {
var endItems = endTime.split(' ')
var items = startTime.split('-')
var enditem = endItems[1].split(':')
console.log(enditem, 'endTime')
var item = items[2].split(' ')
var time = item[1].split(':')
var date = items[0] + '年' + items[1] + '月' + item[0] + '日' + ' ' + time[0] + ':' + time[1] + '-' + enditem[0] + ':' + enditem[1]
this.date = date
} }
} }
} }
</script> </script>
<style> <style>
.fixedButtom { .fixedButtom {
display: flex;
flex-direction: row;
position: -webkit-sticky; position: -webkit-sticky;
position: sticky; position: fixed;
bottom: 0; bottom: 0;
background: #fff;
opacity: 1; opacity: 1;
z-index: 99; z-index: 99;
align-items: center; box-sizing: border-box;
text-align: center;
padding: 20px 33px 20px 32px;
background: #ffffff;
box-shadow: 0px -2px 8px 0px rgba(224, 224, 224, 0.5);
border-radius: 16px 16px 0px 0px;
width: 100%; width: 100%;
padding: 21px 0px 0px 0px;
} }
.buttomLine { .buttomLine {
width: 134px; width: 134px;
...@@ -69,7 +153,7 @@ export default { ...@@ -69,7 +153,7 @@ export default {
} }
.container { .container {
background: #f7f7f7; background: #f7f7f7;
padding: 16px 16px 0px 16px; padding: 16px 0px 0px 0px;
height: 100px; height: 100px;
} }
.box { .box {
...@@ -84,6 +168,8 @@ export default { ...@@ -84,6 +168,8 @@ export default {
-webkit-box-shadow: 0 10px 20px 0 rgba(88, 80, 255, 0.1); -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);
margin-bottom: 24px; margin-bottom: 24px;
margin-left: 16px;
margin-right: 16px;
} }
.top { .top {
display: flex; display: flex;
...@@ -122,5 +208,31 @@ export default { ...@@ -122,5 +208,31 @@ export default {
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
line-height: 16px; line-height: 16px;
margin-top: 10px;
}
.icon-container {
display: flex;
justify-content: center;
align-items: center;
width: 50px;
height: 50px;
background-color: #e9e8ff;
border-radius: 50%;
margin: 0px 5px 0px 5px;
}
.icon-box {
width: 26px;
height: 26px;
}
.icon-instruction {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #424242;
line-height: 17px;
margin-top: 9px;
}
.item-container {
width: 60px;
} }
</style> </style>
<!-- home -->
<template>
<div class="container">
<template v-if="showWindow">
<transition name="fade">
<keep-alive v-if="$route.meta.keepAlive">
<router-view></router-view>
</keep-alive>
</transition>
<transition name="fade">
<router-view v-if="!$route.meta.keepAlive"></router-view>
</transition>
<template v-if="$route.meta.isTab">
<tab-bar :data="tabList"></tab-bar>
</template>
</template>
</div>
</template>
<script>
export default {
data () {
return {
showWindow: false
}
},
watch: {
watchFlag: {
immediate: true,
handler (newval) {
this.showWindow = newval
this.hideLoading()
}
}
},
computed: {
watchFlag () {
return this.$store.state.app.showWindow
}
},
mounted () {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<van-popup v-model="tagShow" position="bottom" :style="{ height: '90%' }">
<div class="container-pop">
<!-- <search placeholder="请输入关键字" :keyword="keyword" @search="searchKeyword"></search> -->
<div class="close-container" v-if="checkAll.length > 0">
<div class="nav-icon">
<img src="../../assets/images/icon/nav-icon.png" />
</div>
<template v-for="(closeTag, i) in checkAll">
<div class="close-tag" @click="close(closeTag, i)" :key="i">
{{ closeTag.text }}
<img src="../../assets/images/icon/close-icon.png" />
</div>
</template>
</div>
<div class="tag-container">
<template v-if="tagList.length > 0">
<div class="tag-type" v-for="(item, index) in tagList" :key="index">
<div class="tag-title">{{ item.type }}</div>
<div class="tag-list">
<template v-for="(tag, ids) in item.tags">
<div :key="ids" :class="{ tag: true, active: tag.isChecked }" @click="chooseTag(index, ids)">{{ tag.text }}</div>
</template>
</div>
</div>
</template>
<empty v-else description="没有找到你搜索的内容" />
</div>
<div class="pop-footer">
<div class="reset" @click="reset">重置</div>
<van-button class="my-pop-button" round color="#5850FF" @click="handleTag">打标签</van-button>
</div>
</div>
</van-popup>
</template>
<script>
import { groupTag } from '@/api'
export default {
name: 'make',
data() {
return {
keyword: '',
tagList: [
{
type: '客户等级',
tags: [
{ text: '核心' },
{
text: '重要'
},
{
text: '一般'
}
]
},
{
type: '保养周期',
tags: [
{ text: '半年' },
{
text: '一年'
}
]
},
{
type: '客户意向',
tags: [
{
text: '意见非常好,可以立即跟进'
},
{
text: '重要'
}
]
}
],
checkAll: [],
tagShow: false
}
},
created() {
this.init()
},
methods: {
chooseTag(index, ids) {
this.tagList[index].tags[ids].isChecked = !this.tagList[index].tags[ids].isChecked
this.add(index, ids)
},
add(index, ids) {
this.checkAll.push(this.tagList[index].tags[ids])
},
close(data, value) {
console.log(data)
this.checkAll.splice(value, 1)
for (let i = 0; i < this.tagList.length; i++) {
for (let j = 0; j < this.tagList[i].tags.length; j++) {
if (this.tagList[i].tags[j].text == data.text) {
this.tagList[i].tags[j].isChecked = false
}
}
}
},
toggle() {
this.tagShow = !this.tagShow
},
init() {
if (this.tagList.length > 0) {
for (let i = 0; i < this.tagList.length; i++) {
for (let j = 0; j < this.tagList[i].tags.length; j++) {
this.$set(this.tagList[i].tags[j], 'isChecked', false)
}
}
}
// groupTag.gettaggingList().then(res => {
// console.log(res)
// this.tagList = res.data
// })
},
searchKeyword(e) {
this.keyword = e
},
//打标签
handleTag() {
this.$emit('success')
},
//重置
reset() {
this.checkAll = []
for (let i = 0; i < this.tagList.length; i++) {
for (let j = 0; j < this.tagList[i].tags.length; j++) {
if (this.tagList[i].tags[j].isChecked) {
this.tagList[i].tags[j].isChecked = false
}
}
}
}
}
}
</script>
<style lang="scss" scoped>
.container-pop {
width: 100%;
.tag-container {
padding: 10px 16px;
overflow-y: auto;
.tag-type {
padding-bottom: 24px;
.tag-title {
font-size: 16px;
font-weight: 500;
color: #333333;
line-height: 22px;
padding-bottom: 16px;
}
.tag-list {
display: flex;
align-items: center;
.tag {
padding: 4px 12px;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 20px;
background: #eeeeee;
border-radius: 14px;
margin-left: 12px;
}
.active {
color: #5850ff;
background: rgba(88, 80, 255, 0.15);
}
}
}
}
.pop-footer {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 16px;
position: fixed;
bottom: 51px;
box-sizing: border-box;
.reset {
font-size: 16px;
font-weight: 600;
color: #333333;
line-height: 22px;
}
.my-pop-button {
font-size: 14px;
font-weight: 400;
color: #ffffff;
line-height: 20px;
width: 148px;
height: 36px;
box-shadow: 0px 2px 4px 0px rgba(88, 80, 255, 0.3);
}
}
.close-container {
display: flex;
position: relative;
padding: 12px 16px 12px 41px;
flex-wrap: wrap;
.nav-icon {
width: 19px;
height: 17px;
position: absolute;
left: 16px;
top: 16px;
img {
width: 100%;
}
}
.close-tag {
padding: 4px 25px 4px 12px;
font-size: 14px;
font-weight: 400;
color: #5850ff;
line-height: 20px;
background: rgba(88, 80, 255, 0.15);
border-radius: 14px;
margin-right: 6px;
margin-bottom: 6px;
box-sizing: border-box;
position: relative;
img {
position: absolute;
width: 8px;
height: 8px;
right: 12px;
top: 10px;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
const path = require('path') const path = require('path')
const defaultSettings = require('./src/config/conf.js') const defaultSettings = require('./src/config/conf.js')
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
const resolve = dir => path.join(__dirname, dir) const resolve = dir => path.join(__dirname, dir)
// page title // page title
const name = defaultSettings.title || 'vue mobile template' const name = defaultSettings.title || 'vue mobile template'
...@@ -49,9 +48,8 @@ const spritesmithFunction = data => { ...@@ -49,9 +48,8 @@ const spritesmithFunction = data => {
return `${shared}\n${perSprite}` return `${shared}\n${perSprite}`
} }
module.exports = { module.exports = {
publicPath: IS_PROD ? './' : '/dj-scrm-wx-group-chat/',
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main/', // 署应用包时的基本 URL。 vue-router hash 模式使用 // publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main/', // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-attachment-customer/', // 署应用包时的基本 URL。 vue-router hash 模式使用 // publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-attachment-customer/', // 署应用包时的基本 URL。 vue-router hash 模式使用
// publicPath: '/dj-scrm-wx-work-attachment-customer/', // 署应用包时的基本 URL。 vue-router history模式使用 // publicPath: '/dj-scrm-wx-work-attachment-customer/', // 署应用包时的基本 URL。 vue-router history模式使用
outputDir: 'dist', // 生产环境构建文件的目录 outputDir: 'dist', // 生产环境构建文件的目录
...@@ -86,7 +84,7 @@ module.exports = { ...@@ -86,7 +84,7 @@ module.exports = {
scss: { scss: {
// 向全局sass样式传入共享的全局变量, $src可以配置图片cdn前缀 // 向全局sass样式传入共享的全局变量, $src可以配置图片cdn前缀
// 详情: https://cli.vuejs.org/guide/css.html#passing-options-to-pre-processor-loaders // 详情: https://cli.vuejs.org/guide/css.html#passing-options-to-pre-processor-loaders
prependData: ` additionalData: `
@import "assets/css/mixin.scss"; @import "assets/css/mixin.scss";
@import "assets/css/variables.scss"; @import "assets/css/variables.scss";
$cdn: "${defaultSettings.cdn}"; $cdn: "${defaultSettings.cdn}";
...@@ -134,11 +132,9 @@ module.exports = { ...@@ -134,11 +132,9 @@ module.exports = {
// config.externals = externals // config.externals = externals
// } // }
}, },
chainWebpack: config => { chainWebpack: config => {
config.plugins.delete('preload') // TODO: need test config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test config.plugins.delete('prefetch') // TODO: need test
// 别名 alias // 别名 alias
config.resolve.alias config.resolve.alias
.set('@', resolve('src')) .set('@', resolve('src'))
...@@ -148,7 +144,6 @@ module.exports = { ...@@ -148,7 +144,6 @@ module.exports = {
.set('components', resolve('src/components')) .set('components', resolve('src/components'))
.set('plugins', resolve('src/components')) .set('plugins', resolve('src/components'))
.set('utils', resolve('src/utils')) .set('utils', resolve('src/utils'))
/** /**
* 添加CDN参数到htmlWebpackPlugin配置中 * 添加CDN参数到htmlWebpackPlugin配置中
*/ */
...@@ -160,7 +155,6 @@ module.exports = { ...@@ -160,7 +155,6 @@ module.exports = {
// } // }
// return args // return args
// }) // })
/** /**
* 设置保留空格 * 设置保留空格
*/ */
...@@ -184,7 +178,6 @@ module.exports = { ...@@ -184,7 +178,6 @@ module.exports = {
config config
// https://webpack.js.org/configuration/devtool/#development // https://webpack.js.org/configuration/devtool/#development
.when(!IS_PROD, config => config.devtool('cheap-source-map')) .when(!IS_PROD, config => config.devtool('cheap-source-map'))
config.when(IS_PROD, config => { config.when(IS_PROD, config => {
config config
.plugin('ScriptExtHtmlWebpackPlugin') .plugin('ScriptExtHtmlWebpackPlugin')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!