Commit ace1844a by 杨明

fixed

1 parent c19d05a8
const url = '/rop-scrm-entmicro/router'
// const url = 'http://192.168.1.78:8064/rop-scrm-entmicro/router'
export default {
/** 访客记录分页列表 */
cardRecordPage(data) {
data.method = 'entmicro.api.business.cardRecord.page'
return window.$HTTP({
url,
data
})
},
/** 访客记录 */
cardRecord(data) {
data.method = 'entmicro.api.business.card.cardRecord'
return window.$HTTP({
url,
data
})
}
}
......@@ -3,8 +3,8 @@
* @version: 1.0.0
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-06-17 18:23:27
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-09-07 14:27:07
*/
import groupChat from './groupChat'
import ssoApi from './ssoApi'
......@@ -15,4 +15,5 @@ import groupTag from './groupTag'
import entmicroApi from './entmicroApi'
import detailApi from './detail'
import solicitApi from './solicit'
export { ssoApi, groupChat, wxConfig, liveBroadcast, groupCustomer, groupTag, entmicroApi, detailApi, solicitApi }
import businessApi from './business'
export { ssoApi, groupChat, wxConfig, liveBroadcast, groupCustomer, groupTag, entmicroApi, detailApi, solicitApi, businessApi }
......@@ -20,14 +20,13 @@ export default {
returnAll
})
},
/** 获取userid */
getuserInfo(data={}) {
data.method = 'scrm.api.sso.user.getLoginInfo'
return window.$HTTP({
url,
data,
returnAll
})
}
}
\ No newline at end of file
/** 获取userid */
getuserInfo(data = {}) {
data.method = 'scrm.api.sso.user.getLoginInfo'
return window.$HTTP({
url,
data,
returnAll
})
}
}
......@@ -17,7 +17,7 @@ import store from './store'
import api from './api'
import { fetchConfig, cfg } from '@/config'
import '@/assets/css/index.scss'
import { bus, tools, store as local, util,constants } from './utils'
import { bus, tools, store as local, util, constants } from './utils'
import './utils/util'
import 'components'
import { components } from '@/plugins/vant'
......
......@@ -71,7 +71,7 @@ const pages = {
title: '客户记录',
backgroundColor: '#F7F7F7'
}
},
}
],
tag: [
{
......@@ -91,6 +91,15 @@ const pages = {
}
}
],
proxy: [
{
name: 'index',
meta: {
title: '名片访问记录',
backgroundColor: '#F7F7F7'
}
}
],
customerDetails: [
{
name: 'index',
......
......@@ -3,8 +3,8 @@
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-07-06 12:02:21
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2022-09-02 17:34:51
*/
import { ssoApi } from '@/api'
import { store, util } from 'utils'
......@@ -16,15 +16,15 @@ const state = {
lastPath: ''
}
const mutations = {
SET_PAGE_META (state, meta) {
SET_PAGE_META(state, meta) {
state.pageMeta = meta
},
PUSH_KEEP (state, name) {
PUSH_KEEP(state, name) {
if (!state.keepAlives.includes(name)) {
state.keepAlives.push(name)
}
},
REMOVE_KEEP (state, names) {
REMOVE_KEEP(state, names) {
state.keepAlives = state.keepAlives.reduce((arr, name) => {
if (!names.includes(name)) {
return arr.push(name)
......@@ -32,28 +32,28 @@ const mutations = {
return arr
}, [])
},
SET_LAST_PATH (state, path) {
SET_LAST_PATH(state, path) {
state.lastPath = path
}
}
const actions = {
setPageMeta ({ commit }, meta) {
setPageMeta({ commit }, meta) {
document.title = meta.title
commit('SET_PAGE_META', meta)
},
setLoginToken ({ commit }, val) {
setLoginToken({ commit }, val) {
commit('SET_LOGIN_TOKEN', val)
},
setAccountList ({ commit }, list) {
setAccountList({ commit }, list) {
commit('SET_ACCOUNT_LIST', list)
},
pushKeep ({ commit }, name) {
pushKeep({ commit }, name) {
commit('PUSH_KEEP', name)
},
removeKeep ({ commit }, names) {
removeKeep({ commit }, names) {
commit('REMOVE_KEEP', names)
},
login ({ dispatch }) {
login({ dispatch }) {
let [redirectUrl] = window.location.href.split('?')
// 以下是 本地调试
if (process.env.NODE_ENV == 'development') {
......@@ -126,7 +126,7 @@ const actions = {
window.location.href = `${url}?redirect_uri=${encodeURIComponent(redirectUrl)}&corpId=${corpId}&agentId=${agentId}`
}
},
navigation ({ dispatch }) {
navigation({ dispatch }) {
let { sessionId, corpId, id, activityId, agentId } = getParams()
const storage_corpId = util.getLocalStorage('dj_scrm_corpId')
if (!corpId) corpId = storage_corpId && storage_corpId.corpId
......@@ -154,7 +154,7 @@ const actions = {
}
state.showWindow = true
},
registerHttp ({ }, sessionId = '') {
registerHttp({}, sessionId = '') {
window.$HTTP = new Http({ ...window.$fetchConfig, alert: Notify, headers: { token: sessionId } })
}
}
......
<template>
<div>
<template v-if="count">
<div class="proxy-list proxy-header">
<div class="proxy-item">访客</div>
<div class="proxy-item">联系电话</div>
<div class="proxy-item">最后访问日期</div>
<div class="proxy-item">操作</div>
</div>
<div class="proxy-body">
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list v-model="loading" :finished="finished" finished-text="已经到底啦" @load="onLoad">
<div class="proxy-list" v-for="item in dataList" :key="item.id">
<div class="proxy-item proxy-nickname">
<label>{{ item.nickName }}</label>
{{ item.type == 1 ? '@微信' : '' }}
</div>
<div class="proxy-item">{{ item.phone }}</div>
<div class="proxy-item">{{ item.lastTime }}</div>
<div class="proxy-item" @click="popupShow(item)">访问记录</div>
</div>
</van-list>
</van-pull-refresh>
</div>
<van-popup v-model="show" position="bottom" round :style="{ 'min-height': '40%', 'max-height': '80%', 'overflow-y': 'hidden' }">
<div class="popup-header">
<div class="popup-title">访问记录</div>
<div class="popup-icon"><van-icon name="cross" @click="show = false" /></div>
</div>
<div class="popup-content">
<div class="popup-content-header">
<div class="popup-item">序号</div>
<div class="popup-item">访问页面</div>
<div class="popup-item">访问时间</div>
</div>
<div class="popup-content-body" v-for="(item, index) in detailList" :key="item.id">
<div class="popup-item">{{ index + 1 }}</div>
<div class="popup-item">{{ item.pageName }}</div>
<div class="popup-item">{{ item.createdTime }}</div>
</div>
</div>
</van-popup>
</template>
<van-empty description="暂无数据" v-else />
</div>
</template>
<script>
import { businessApi } from '@/api'
export default {
data() {
return {
dataList: [],
detailList: [],
loading: false,
finished: false,
refreshing: false,
show: false,
count: 1,
pageNum: 0,
pageSize: 20
}
},
methods: {
cardRecordPage() {
this.loading = true
const { pageNum, pageSize } = this
businessApi.cardRecordPage({ pageNum, pageSize }).then(res => {
if (res) {
const dataList = res.data
this.dataList = this.dataList.concat(dataList)
this.count = res.count
if (this.dataList.length <= this.count) {
if (this.count === 0) {
this.finished = true
} else {
this.finished = false
}
}
this.loading = false
}
})
},
popupShow(item) {
this.show = true
this.detailList = item.recordRelationList
},
onLoad() {
this.pageNum++
this.loading = true
const num = this.count / this.pageSize
if (Number.isInteger(num)) {
this.number = num
} else {
this.number = parseInt(num) + 1
}
if (this.dataList.length < this.count) {
if (this.pageNum <= this.number) {
this.cardRecordPage()
this.loading = false
}
} else {
this.loading = false
this.finished = true
}
},
onRefresh() {
this.dataList = []
this.pageNum = 1
this.cardRecordPage()
if (this.refreshing) {
this.content = this.dataList
this.dataList = this.content
this.refreshing = false
}
this.loading = false
}
}
}
</script>
<style lang="scss" scoped>
.proxy-body {
position: absolute;
top: 48px;
height: calc(100% - 48px);
width: 100%;
left: 0px;
::v-deep {
.van-pull-refresh__track {
overflow: auto;
}
}
}
.proxy-list {
height: 48px;
line-height: 48px;
background: #ffffff;
box-shadow: inset 0 -1px 0 0 #f2f2f2;
display: flex;
&.proxy-header {
position: fixed;
width: 100%;
top: 0px;
left: 0px;
background: #f2f2f2;
.proxy-item {
&:last-child {
color: #414141;
}
}
}
.proxy-item {
font-size: 13px;
color: #414141;
text-align: center;
&.proxy-nickname {
color: #2cca74;
label {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
color: #414141;
max-width: 70px;
}
}
&:first-child {
width: 120px;
display: flex;
align-items: center;
justify-content: center;
}
&:last-child,
&:nth-child(2),
&:nth-child(3) {
flex: 1;
}
&:last-child {
color: #3975c6;
}
}
}
.popup-header {
height: 56px;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0px 16px;
.popup-title {
font-weight: 500;
font-size: 16px;
color: #222222;
}
}
.popup-content {
max-height: calc(80vh - 50px);
overflow: auto;
&-header {
display: flex;
height: 40px;
line-height: 48px;
background: #f2f2f2;
text-align: center;
.popup-item {
font-weight: 600;
font-size: 14px;
color: #333333;
}
}
&-body {
display: flex;
height: 48px;
line-height: 48px;
background: #ffffff;
border: 1px solid #e5e5e5;
text-align: center;
}
.popup-item {
font-size: 14px;
color: #666666;
&:first-child {
width: 60px;
}
&:nth-child(2),
&:nth-child(3) {
flex: 1;
}
}
}
</style>
......@@ -51,7 +51,7 @@ const spritesmithFunction = data => {
return `${shared}\n${perSprite}`
}
module.exports = {
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main-test/', // 署应用包时的基本 URL。 vue-router hash 模式使用
publicPath: IS_PROD ? './' : '/dj-scrm-wx-work-main-yy/', // 署应用包时的基本 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: '/dj-scrm-wx-work-attachment-customer/', // 署应用包时的基本 URL。 vue-router history模式使用
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!