Commit 59f99a86 by xuyl

更改接口,修复标签展示问题,以及欢迎语没有回显问题

1 parent 05a7edfe
......@@ -6,7 +6,7 @@
* @param {*} params
* @returns
*/
import { http, http_tag } from '@/main'
import { http } from '@/main'
let session = 'mini-c38a80dd-cf48-4491-8933-fb2eb57fb4ca-rop'
const getListApi = params => {
params.method = 'entmicro.api.staff.listFollowerStaffByPage'
......@@ -31,7 +31,7 @@ const getFollower = params => {
const querylabeltree = params => {
params.method = 'scrm.api.datahub.labelgroup.queryLabelTree'
params.sessionId = session
return http_tag({
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
......@@ -40,7 +40,7 @@ const querylabeltree = params => {
}
const queryCrowdtree = params => {
params.method = 'scrm.api.datahub.user.queryCrowdTree'
return http_tag({
return http({
url: '/rop-scrm-datahub/router',
method: 'POST',
data: params,
......
......@@ -303,8 +303,8 @@ export default {
})
this.tagJson = tagJsonList
this.autoWelcome = res.autoWelcome == '0' ? true : false
if (res.welcomeInfo && res.welcomeInfo.length != 0) {
const previewList = res.welcomeInfo.map(item => {
if (res.welcomeList && res.welcomeList.length != 0) {
const previewList = res.welcomeList.map(item => {
if (item.attType == 7) item.attContent = JSON.parse(item.attContent)
return item
})
......
......@@ -13,7 +13,7 @@
<GLTableButton :buttonList="tableButtonList" :buttonItem="scope.scope" :buttonNum="3"></GLTableButton>
</div>
<div slot="visitCont" slot-scope="scope">
<div class="visitCont" @click="visitCisitCont(scope.scope.cardName)">{{ scope.scope.visitCont }}</div>
<div class="visitCont" @click="visitCisitCont(scope.scope.cardName)">{{ scope.scope.visitCont || '--' }}</div>
</div>
<div slot="qrCode" slot-scope="scope">
<el-popover placement="bottom" width="400" trigger="hover">
......@@ -34,12 +34,12 @@
</div>
</div>
</el-popover>
<template v-if="scope.scope.tagJson && scope.scope.tagJson.length <= 3 && scope.scope.tagJson.length > 0">
<div v-for="(item, index) in scope.scope.tagJson" :key="index">
<template v-if="JSON.parse(scope.scope.tagJson) && JSON.parse(scope.scope.tagJson).length <= 3 && JSON.parse(scope.scope.tagJson).length > 0">
<div v-for="(item, index) in JSON.parse(scope.scope.tagJson)" :key="index">
<GLTitle :content="item.name" class="accountType-row accountType-row-tag"></GLTitle>
</div>
</template>
<div v-if="!scope.scope.tagJson || (scope.scope.tagJson && scope.scope.tagJson.length == 0)">--</div>
<div v-if="!JSON.parse(scope.scope.tagJson) || (JSON.parse(scope.scope.tagJson) && JSON.parse(scope.scope.tagJson).length == 0)">--</div>
</div>
<div slot="cardName" slot-scope="scope">
<div class="codeName">{{ scope.scope.cardName }}</div>
......@@ -238,24 +238,10 @@ export default {
}
this.loading = true
// this.$apis.channel.listChannelCodeByPage
this.$apis.businessCard.getBussinessCardListApi(params).then(res => {
this.loading = false
if (res) {
this.tableData = res.data
this.tableData.forEach(item => {
this.$set(item, 'tagJsonList', [])
const tagJson = eval(item.tagJson)
if (tagJson && tagJson.length > 0) {
tagJson.forEach(itm => {
let name = itm.name.split(',')
name.forEach((tag, index) => {
item.tagJsonList.push({ name: tag })
console.log(item.tagJsonList)
})
})
}
})
this.tableTotal = res.count
}
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!