Commit 77fb9c50 by 前端

Merge branch 'SAAS+V4.46' of http://192.168.3.233:8090/glsx/gl_tape into feature_v1.1.0

2 parents 6f9f6034 190dece2
Showing 363 changed files with 1404 additions and 581 deletions
...@@ -4,16 +4,20 @@ ...@@ -4,16 +4,20 @@
"version" : "0.0", "version" : "0.0",
"configurations" : [ "configurations" : [
{ {
"app-plus" : { "app-plus" :
"launchtype" : "remote" {
"launchtype" : "local"
}, },
"default" : { "default" :
{
"launchtype" : "local" "launchtype" : "local"
}, },
"h5" : { "h5" :
{
"launchtype" : "local" "launchtype" : "local"
}, },
"mp-weixin" : { "mp-weixin" :
{
"launchtype" : "local" "launchtype" : "local"
}, },
"provider" : "aliyun", "provider" : "aliyun",
......
...@@ -7,18 +7,18 @@ ...@@ -7,18 +7,18 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
<script> <script>
var wv const PATH = ['/pages/common/caseDetail']
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { Ws } from '@/ws/Ws.js' import { Ws } from '@/ws/Ws.js'
import utils from '@/utils/utils'
export default { export default {
computed: { computed: {
...mapState('audio', ['isEnd', 'isStart']) ...mapState('audio', ['isEnd', 'isStart'])
}, },
onLoad() { onLoad() {},
},
onLaunch: async function () { onLaunch: async function () {
// this.init()
this.setAPPVersion() this.setAPPVersion()
setTimeout(() => { setTimeout(() => {
plus.screen.unlockOrientation() //解除锁定屏幕方向 plus.screen.unlockOrientation() //解除锁定屏幕方向
...@@ -30,6 +30,66 @@ export default { ...@@ -30,6 +30,66 @@ export default {
new Ws().connect() new Ws().connect()
}, },
methods: { methods: {
async handleCheck() {
const { textList, tempFileURL, version } = uni.$storage.get('mock_data')
const res = utils.compareVersions(plus?.runtime?.version, version)
if (res > -1) {
return
}
const e = {
result: {
is_silently: false,
is_mandatory: true,
name: '',
title: '',
contents: textList.join('\n'),
version: version,
url: tempFileURL,
stable_publish: true
}
}
checkUpdate(e)
},
init() {
uni.addInterceptor('navigateTo', {
//监听跳转
invoke(e) {
console.log('******** invoke-navigateTo ********', e.url.split('?').shift())
if (PATH.includes(e.url.split('?').shift())) {
console.log(888)
}
}
})
//2
uni.addInterceptor('redirectTo', {
//监听关闭本页面跳转
invoke(e) {
console.log('******** redirectTo ********', e.url)
}
})
uni.addInterceptor('switchTab', {
//监听tabBar跳转
invoke(e) {
console.log('******** switchTab ********', e.url)
}
})
//4
uni.addInterceptor('navigateBack', {
//监听返回
invoke(e) {
console.log('******** navigateBack ********', e)
}
})
},
setAPPVersion() { setAPPVersion() {
let version = plus.runtime.version let version = plus.runtime.version
let storageVersion = uni.$storage.get('storageVersion') let storageVersion = uni.$storage.get('storageVersion')
...@@ -43,6 +103,7 @@ export default { ...@@ -43,6 +103,7 @@ export default {
}, },
onShow: async function () { onShow: async function () {
this.handleCheck()
// const systemInfo = await uni.$api.systemApi.getMockData(); // const systemInfo = await uni.$api.systemApi.getMockData();
// if (systemInfo.isCheckedUpdate) { // if (systemInfo.isCheckedUpdate) {
// checkUpdate(); // checkUpdate();
...@@ -68,6 +129,7 @@ export default { ...@@ -68,6 +129,7 @@ export default {
body { body {
// overflow: hidden; // overflow: hidden;
} }
page { page {
font-size: 28rpx; font-size: 28rpx;
height: 100%; height: 100%;
...@@ -129,6 +191,7 @@ button::after { ...@@ -129,6 +191,7 @@ button::after {
.button-hover { .button-hover {
transform: translate(1rpx, 1rpx); transform: translate(1rpx, 1rpx);
} }
.webview-container { .webview-container {
position: absolute; position: absolute;
width: 100rpx; width: 100rpx;
......
/*
* @Description:
* @Author: huyue
* @Date: 2024-09-05 14:05:25
* @LastEditors: huyue
* @LastEditTime: 2024-09-13 11:08:55
*/
import http from "../request/http"; import http from "../request/http";
module.exports = { module.exports = {
...@@ -55,4 +62,31 @@ module.exports = { ...@@ -55,4 +62,31 @@ module.exports = {
...data, ...data,
}); });
}, },
/**轻改素材配置 */
getBoutiqueMaterialConfig (data) {
return http.post({
method: "dj.api.boutique.recepiton.material.merchant.detail",
projectName: "boutique",
...data,
});
},
/** 案例视频 */
getCaseList(data) {
return http.post({
method: "dj.api.smartcarlife.recepiton.material.case.find",
projectName: "boutique",
...data
})
},
/** 获取类目 */
getCategory(data) {
return http.post({
method: "dj.api.boutique.recepiton.material.merchant.category",
projectName: "boutique",
...data
})
}
}; };
import http from "../request/http"; import http from '../request/http'
import environment from "@/env"; import environment from '@/env'
module.exports = { module.exports = {
/**获取APP更新 */ /**获取APP更新 */
getAPPVersion (data) { getAPPVersion(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.recepiton.findVersion', method: 'dj.api.smartcarlife.recepiton.findVersion',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
// 查询接待素材 // 查询接待素材
findSoureList (data) { findSoureList(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.recepiton.soure.findSoureList", method: 'dj.api.smartcarlife.recepiton.soure.findSoureList',
projectName: "boutique", projectName: 'boutique',
...data ...data
}); })
}, },
// 查询门店支付配置 // 查询门店支付配置
findPayInfo (data) { findPayInfo(data) {
return http.post({ return http.post({
method: method: 'dj.api.smartcarlife.recepiton.pay.findPayInfoConfigListByMerchantId',
"dj.api.smartcarlife.recepiton.pay.findPayInfoConfigListByMerchantId", projectName: 'boutique',
projectName: "boutique", ...data
...data, })
});
}, },
// 接待客户信息保存 // 接待客户信息保存
saveRecCustomer (data) { saveRecCustomer(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.recepiton.customer.saveRecCustomer", method: 'dj.api.smartcarlife.recepiton.customer.saveRecCustomer',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
getToken (data) { searchRecordingEndTime(data) {
return http.post({
method: 'dj.api.smartcarlife.recepiton.customer.searchRecordingEndTime',
projectName: 'boutique',
...data
})
},
getToken(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.recepiton.customer.oss.getToken", method: 'dj.api.smartcarlife.recepiton.customer.oss.getToken',
projectName: "boutique", projectName: 'boutique'
}); })
}, },
// 历史订单列表 // 历史订单列表
getQuotationList (data) { getQuotationList(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page", method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/** 获取门店主营车品牌 */ /** 获取门店主营车品牌 */
getMerchantCarBrandList (merchantIdList) { getMerchantCarBrandList(merchantIdList) {
return http.post({ return http.post(
{
method: 'merchants.api.open.merchant.info', method: 'merchants.api.open.merchant.info',
projectName: 'merchants', projectName: 'merchants',
merchantIdList, merchantIdList,
merchantInfoSwitch: { merchantInfoSwitch: {
brandFlag: true brandFlag: true
} }
}, false, 'merchant') },
false,
'merchant'
)
}, },
/** /**
* 车型 * 车型
* *
*/ */
getCarBrandsList (data) { getCarBrandsList(data) {
return http.post( return http.post(
{ {
method: "scrm.api.carlife.common.getCarSeriesList", method: 'scrm.api.carlife.common.getCarSeriesList',
...data, ...data
}, },
false, false,
"scrm" 'scrm'
); )
}, },
/** /**
* 推荐人 * 推荐人
*/ */
getEmployeeList (data) { getEmployeeList(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.employee.getByMerchantId", method: 'dj.api.smartcarlife.employee.getByMerchantId',
projectName: "boutique", projectName: 'boutique',
sceneList: [0], sceneList: [0],
...data, ...data
}); })
}, },
/** 查询接待记录列表 */ /** 查询接待记录列表 */
getReceptionList (data) { getReceptionList(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.reception.customer.page", method: 'dj.api.smartcarlife.reception.customer.page',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
}, },
/** 接待统计 */ /** 接待统计 */
getReceptionStatistics (data) { getReceptionStatistics(data) {
return http.post({
method: 'dj.api.smartcarlife.reception.customer.statistics',
projectName: 'boutique',
...data
})
},
/** 埋点进入 */
addRecord(data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.reception.customer.statistics", method: 'dj.api.customer.dynamic.record.add',
projectName: "boutique", projectName: 'boutique',
...data, ...data
}); })
},
/** 埋点离开 */
leaveRecord(data) {
return http.post({
method: 'dj.api.customer.dynamic.record.leave',
projectName: 'boutique',
...data
})
}, },
/**创建小程序码 */ /**创建小程序码 */
createQrcode (data) { createQrcode(data) {
const envVersion = { const envVersion = {
0: 'develop', 0: 'develop',
1: 'develop', 1: 'develop',
...@@ -112,10 +139,15 @@ module.exports = { ...@@ -112,10 +139,15 @@ module.exports = {
3: 'release', 3: 'release',
4: 'trial' 4: 'trial'
}[environment.index] }[environment.index]
data.projectName = "wechat" data.projectName = 'wechat'
return http.fetch("scrm.api.wechat.miniprogram.createQrcode", { return http.fetch(
'scrm.api.wechat.miniprogram.createQrcode',
{
envVersion, envVersion,
...data ...data
}, true, 'scrm');
}, },
}; true,
'scrm'
)
}
}
...@@ -90,4 +90,12 @@ module.exports = { ...@@ -90,4 +90,12 @@ module.exports = {
...data, ...data,
}); });
}, },
/**素材详情 查询素材详情 */
getMaterialDetail (data) {
return http.post({
method: 'dj.api.smartcarlife.customervisits.getMaterialById',
projectName: "boutique",
...data,
});
},
} }
\ No newline at end of file \ No newline at end of file
...@@ -11,10 +11,17 @@ const serverConfig = { ...@@ -11,10 +11,17 @@ const serverConfig = {
mockTimer: {}, mockTimer: {},
mockCache: null, mockCache: null,
}, },
boutiqueServerConfig = {
mockRequestCount: null,
mockTimer: {},
mockCache: null,
},
configModule = 'app-tape', configModule = 'app-tape',
bydConfigModule = 'byd-pad-config', bydConfigModule = 'byd-pad-config',
boutiqueConfigModule = 'boutique-pad-config',
configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`, configUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${configModule}&env=${env}`,
bydConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${bydConfigModule}&env=${env}` bydConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${bydConfigModule}&env=${env}`,
boutiqueConfigUrl = `https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=${boutiqueConfigModule}&env=${env}`
/**获取mock数据 */ /**获取mock数据 */
const getMockData = async (immediate = false) => { const getMockData = async (immediate = false) => {
...@@ -124,7 +131,44 @@ const getBydMockData = async (immediate = false) => { ...@@ -124,7 +131,44 @@ const getBydMockData = async (immediate = false) => {
bydServerConfig.mockRequestCount = null; bydServerConfig.mockRequestCount = null;
return Promise.reject(error); return Promise.reject(error);
} }
}; }
/**
*获取轻改配置
*/
const getBoutiqueMockData = async (immediate = false) => {
const MOCKDATA = uni.$storage.get('boutique_mock_data')
try {
if (!immediate && MOCKDATA && Date.now() - MOCKDATA.createTime < 5 * 60e3) {
return Promise.resolve(MOCKDATA);
} else {
if (!boutiqueServerConfig.mockRequestCount || immediate) {
boutiqueServerConfig.mockCache = null;
boutiqueServerConfig.mockRequestCount = Date.now();
const data = await http.uni_request({ url: boutiqueConfigUrl });
data.createTime = Date.now();
boutiqueServerConfig.mockCache = data;
uni.$storage.set('boutique_mock_data', data);
return Promise.resolve(data);
} else {
const key = Date.now();
return new Promise((resolve) => {
boutiqueServerConfig.mockTimer[key] = setInterval(() => {
if (boutiqueServerConfig.mockCache) {
clearInterval(boutiqueServerConfig.mockTimer[key]);
boutiqueServerConfig.mockRequestCount = null;
resolve(boutiqueServerConfig.mockCache);
}
}, 1e3);
});
}
}
} catch (error) {
console.log(error)
if (boutiqueServerConfig.mockTimer[key]) clearInterval(boutiqueServerConfig.mockTimer[key]);
boutiqueServerConfig.mockRequestCount = null;
return Promise.reject(error);
}
}
// 图片版本号 // 图片版本号
const getImageVersion = async () => { const getImageVersion = async () => {
const accountInfo = await getMockData() const accountInfo = await getMockData()
...@@ -136,5 +180,6 @@ module.exports = { ...@@ -136,5 +180,6 @@ module.exports = {
getMockData, getMockData,
imgToBase64, imgToBase64,
updateMockData, updateMockData,
getBydMockData getBydMockData,
getBoutiqueMockData
} }
\ No newline at end of file \ No newline at end of file
...@@ -14,13 +14,13 @@ const HOST = { ...@@ -14,13 +14,13 @@ const HOST = {
ip: "http://192.168.1.169:8292", ip: "http://192.168.1.169:8292",
}; };
class Request { class Request {
get(params, returnAll = false, hostType) { get (params, returnAll = false, hostType) {
return this.request("GET", params, returnAll, hostType); return this.request("GET", params, returnAll, hostType);
} }
post(params, returnAll = false, hostType) { post (params, returnAll = false, hostType) {
return this.request("POST", params, returnAll, hostType); return this.request("POST", params, returnAll, hostType);
} }
fetch(method, data, returnAll = true, hostType) { fetch (method, data, returnAll = true, hostType) {
return this.post( return this.post(
{ {
method, method,
...@@ -30,11 +30,11 @@ class Request { ...@@ -30,11 +30,11 @@ class Request {
hostType hostType
); );
} }
request(RequestMethods, params, returnAll, hostType = "dj") { request (RequestMethods, params, returnAll, hostType = "dj") {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let _this = this; let _this = this;
uni.getNetworkType({ uni.getNetworkType({
success(res) { success (res) {
if (res.networkType == "none") { if (res.networkType == "none") {
uni.hideLoading(); uni.hideLoading();
// uni.showToast({ // uni.showToast({
...@@ -63,10 +63,16 @@ class Request { ...@@ -63,10 +63,16 @@ class Request {
header, header,
dataType: "json", dataType: "json",
responseType: "text", responseType: "text",
success(response) { success (response) {
/**业务代码 */ /**业务代码 */
let { data } = response; let { data, statusCode } = response;
if (!data) return reject(); if (!data || statusCode != 200) {
uni.hideLoading()
let errMsg = ''
if (!data) errMsg = '获取数据失败,请重试。'
else errMsg = '服务器暂时不可用,请稍后再次尝试。'
return reject(errMsg);
}
let { code, message } = data; let { code, message } = data;
if (returnAll) { if (returnAll) {
resolve(data); resolve(data);
...@@ -89,7 +95,7 @@ class Request { ...@@ -89,7 +95,7 @@ class Request {
} }
} }
}, },
fail(error) { fail (error) {
uni.hideLoading(); uni.hideLoading();
console.error(`${params.method}接口异常:`, error); console.error(`${params.method}接口异常:`, error);
uni.showToast({ uni.showToast({
...@@ -103,7 +109,7 @@ class Request { ...@@ -103,7 +109,7 @@ class Request {
}); });
reject(error); reject(error);
}, },
complete() { complete () {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, },
}); });
...@@ -111,7 +117,7 @@ class Request { ...@@ -111,7 +117,7 @@ class Request {
}); });
}); });
} }
getData(params, hostType = "scrm") { getData (params, hostType = "scrm") {
let projectName = params.projectName; let projectName = params.projectName;
if (!projectName) projectName = this.getRopProject(params.method); if (!projectName) projectName = this.getRopProject(params.method);
else delete params.projectName; else delete params.projectName;
...@@ -143,11 +149,11 @@ class Request { ...@@ -143,11 +149,11 @@ class Request {
params.appKey = appKey; params.appKey = appKey;
return sign(params, secret, noSignAttr); return sign(params, secret, noSignAttr);
} }
getRopProject(method) { getRopProject (method) {
const projectName = method.split(".")[2]; const projectName = method.split(".")[2];
return projectName; return projectName;
} }
uni_request({ uni_request ({
url, url,
method = "GET", method = "GET",
data = {}, data = {},
...@@ -163,7 +169,7 @@ class Request { ...@@ -163,7 +169,7 @@ class Request {
header, header,
dataType, dataType,
responseType, responseType,
success(response) { success (response) {
resolve(response.data); resolve(response.data);
}, },
}); });
......
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -970,7 +970,7 @@ export default { ...@@ -970,7 +970,7 @@ export default {
position: absolute; position: absolute;
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0);
pointer-events: none; pointer-events: none;
z-index: 9; z-index: 99;
} }
.draw-canvas { .draw-canvas {
pointer-events: auto; pointer-events: auto;
......
...@@ -47,6 +47,21 @@ ...@@ -47,6 +47,21 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: 'CarBrands', name: 'CarBrands',
props: {
carBrandKey: {//品牌key
type: String,
default: 'carBrand'
},
carModelKey: {//车型key
type: String,
default: 'carModel'
},
echoData: {
type: Object,
default: () => ({})
},
customBoolean: Boolean
},
data () { data () {
return { return {
carlist: [], carlist: [],
...@@ -68,21 +83,30 @@ export default { ...@@ -68,21 +83,30 @@ export default {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
carModel () { carModel () {
return this.$store.state.user.customerInfo.carModel return this.customBoolean ? this.echoData[this.carModelKey] : this.$store.state.user.customerInfo.carModel
}, },
carBrandList () { carBrandList () {
return this.$store.state.user.carBrands || [] return this.$store.state.user.carBrands || []
}, },
carBrand () { carBrand () {
return this.$store.state.user.customerInfo.carBrand return this.customBoolean ? this.echoData[this.carBrandKey] : this.$store.state.user.customerInfo.carBrand
},
boutiqueDefaultCarBrandId () {
return this.$store.state.user.boutiqueDefaultCarBrandId
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
autoSelect () { autoSelect (index = 0, autoHideLoading = true) {
const { carBrandList } = this const { carBrandList, boutiqueDefaultCarBrandId } = this
if (carBrandList.length) this.selectCar(carBrandList[0], true) let carIndex = 0
if (boutiqueDefaultCarBrandId) {
carIndex = carBrandList.findIndex(e => e.id == boutiqueDefaultCarBrandId)
if (carIndex < 0) carIndex = 0
}
if (index < 0) index = 0
if (carBrandList.length) this.selectCar(carBrandList[carIndex], true, index, autoHideLoading)
}, },
open () { open () {
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
...@@ -116,7 +140,7 @@ export default { ...@@ -116,7 +140,7 @@ export default {
this.$refs.carBrandListVisible.open() this.$refs.carBrandListVisible.open()
this.carBrandListOff = true this.carBrandListOff = true
}, },
selectCar (e, auto = false) { selectCar (e, auto = false, index, autoHideLoading = true) {
let { clickFlga } = this let { clickFlga } = this
if (clickFlga) return if (clickFlga) return
this.clickFlga = true this.clickFlga = true
...@@ -128,8 +152,9 @@ export default { ...@@ -128,8 +152,9 @@ export default {
} }
const carList = uni.getStorageSync(`${e.id}_${e.brandId}_carlist`) const carList = uni.getStorageSync(`${e.id}_${e.brandId}_carlist`)
if (carList) { if (carList) {
this.clickFlga = false
this.carlist = carList this.carlist = carList
if (auto && carList.length) this.handleSelect(carList[0]) if (auto && carList.length) this.handleSelect(carList[index])
else this.$refs.carBoxVisible.open() else this.$refs.carBoxVisible.open()
} else { } else {
if (!auto) uni.showLoading({ if (!auto) uni.showLoading({
...@@ -137,14 +162,14 @@ export default { ...@@ -137,14 +162,14 @@ export default {
}) })
} }
uni.$api.commonApi.getCarBrandsList({ uni.$api.commonApi.getCarBrandsList({
brandId: 2978||e.brandId, brandId: e.brandId,
childBrandId:3454|| e.id childBrandId: e.id
}).then(res => { }).then(res => {
uni.hideLoading() if (autoHideLoading) uni.hideLoading()
this.carlist = res this.carlist = res
if (res) uni.setStorageSync(`${e.id}_${e.brandId}_carlist`, res) if (res) uni.setStorageSync(`${e.id}_${e.brandId}_carlist`, res)
if (!carList) { if (!carList) {
if (auto && res.length) this.handleSelect(res[0]) if (auto && res.length) this.handleSelect(res[index])
else this.$refs.carBoxVisible.open() else this.$refs.carBoxVisible.open()
} }
this.clickFlga = false this.clickFlga = false
...@@ -182,19 +207,19 @@ export default { ...@@ -182,19 +207,19 @@ export default {
.select-box { .select-box {
margin: 40rpx 0; margin: 40rpx 0;
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(4, 1fr);
gap: 20rpx; gap: 32rpx;
overflow-y: scroll; overflow-y: scroll;
max-height: 50vh; max-height: 50vh;
padding-bottom: 60rpx; padding-bottom: 60rpx;
.select-item { .select-item {
text-align: center; text-align: center;
height: 68rpx; height: 68rpx;
line-height: 68rpx; line-height: 44rpx;
opacity: 1; opacity: 1;
border: 2rpx solid #dce0e6; border: 2rpx solid #dce0e6;
color: #292d33; color: #333;
font-size: 28rpx; font-size: 32rpx;
border-radius: 8rpx; border-radius: 8rpx;
&.checked { &.checked {
border: 2rpx solid #292d33; border: 2rpx solid #292d33;
......
...@@ -30,8 +30,9 @@ ...@@ -30,8 +30,9 @@
</template> </template>
</template> </template>
<template v-else> <template v-else>
<view class="loading flex"> <view class="nothing flex">
暂无 <view class="icon"></view>
未匹配到客户信息
</view> </view>
</template> </template>
</template> </template>
...@@ -98,13 +99,13 @@ export default { ...@@ -98,13 +99,13 @@ export default {
left: 0; left: 0;
top: 88rpx; top: 88rpx;
width: 100%; width: 100%;
height: 236rpx; height: 352rpx;
background: #ffffff; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
opacity: 0;
z-index: -1; z-index: -1;
opacity: 0;
.customer-title { .customer-title {
font-size: 28rpx; font-size: 24rpx;
color: #999999; color: #999999;
line-height: 40rpx; line-height: 40rpx;
padding: 16rpx 24rpx 8rpx; padding: 16rpx 24rpx 8rpx;
...@@ -115,11 +116,25 @@ export default { ...@@ -115,11 +116,25 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
justify-content: center; justify-content: center;
color: #999999;
.icon { .icon {
animation: rotate-loading 1s linear infinite; animation: rotate-loading 1s linear infinite;
} }
} }
.nothing {
width: 100%;
height: 100%;
font-size: 24rpx;
color: #c7ccd7;
flex-direction: column;
.icon {
margin-top: 52rpx;
width: 96rpx;
height: 96rpx;
background-image: url('@/assets/images/common/nothing.webp');
background-size: 100%;
}
}
.item { .item {
width: 100%; width: 100%;
height: 48rpx; height: 48rpx;
...@@ -143,7 +158,7 @@ export default { ...@@ -143,7 +158,7 @@ export default {
} }
} }
.is-show { .is-show {
z-index: 1;
opacity: 1; opacity: 1;
z-index: 2;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -3,13 +3,11 @@ ...@@ -3,13 +3,11 @@
ref="customerTagstVisible" ref="customerTagstVisible"
position="bottom" position="bottom"
:isFooter="false" :isFooter="false"
title="请选择客户标签" :title="title"
:maxHeight="1000" :maxHeight="1040"
@close="$emit('close')" @close="$emit('close')"
> >
<view <view class="select-views">
class="select-views"
>
<template v-for="(i,index) in list"> <template v-for="(i,index) in list">
<view <view
class="select-group" class="select-group"
...@@ -18,7 +16,7 @@ ...@@ -18,7 +16,7 @@
<view class="select-title">{{ i.labelName }}</view> <view class="select-title">{{ i.labelName }}</view>
<view class="select-box"> <view class="select-box">
<view <view
class="select-item" class="select-item flex"
:class="{ checked: checkedItem(item) }" :class="{ checked: checkedItem(item) }"
@click="handleSelect(item)" @click="handleSelect(item)"
v-for="(item, ind) in i.nextList" v-for="(item, ind) in i.nextList"
...@@ -31,18 +29,17 @@ ...@@ -31,18 +29,17 @@
</view> </view>
</template> </template>
<view class="footer-btns flex"> </view>
<view class="footer-btns">
<view <view
class="btn cancel" class="btn cancel"
@click="close" @click="clearSwitch ? clear() : close()"
>取消</view> >{{cancelText}}</view>
<view <view
class="btn" :class="['btn',{disabled: disabled}]"
@click="choose" @click="choose"
>确定</view> >确定</view>
</view> </view>
</view>
</MessageBox> </MessageBox>
</template> </template>
...@@ -50,7 +47,27 @@ ...@@ -50,7 +47,27 @@
export default { export default {
name: 'CustomerTags', name: 'CustomerTags',
props: { props: {
chooseList: Array chooseList: Array,
title: {
type: String,
default: '请选择客户标签'
},
disabledSwitch: {
type: Boolean,
default: true
},
cancelText: {
type: String,
default: '取消'
},
clearSwitch: {
type: Boolean,
default: false
},
sceneNumber: {
type: [Number, String],
default: -1
}
}, },
data () { data () {
return { return {
...@@ -76,6 +93,9 @@ export default { ...@@ -76,6 +93,9 @@ export default {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
disabled () {
return this.disabledSwitch && this.component_chooseList.length == 0
}
}, },
mounted () { mounted () {
}, },
...@@ -83,10 +103,11 @@ export default { ...@@ -83,10 +103,11 @@ export default {
open () { open () {
this.$refs.customerTagstVisible.open() this.$refs.customerTagstVisible.open()
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
{ sceneType } = userInfo; { sceneType } = userInfo,
{ sceneNumber } = this
uni.$api.customerApi uni.$api.customerApi
.findCustomerTags({ .findCustomerTags({
scene: sceneType, scene: sceneNumber > -1 ? sceneNumber : sceneType,
}) })
.then((res) => { .then((res) => {
this.list = res || [] this.list = res || []
...@@ -108,8 +129,13 @@ export default { ...@@ -108,8 +129,13 @@ export default {
return component_chooseList.findIndex(e => e.labelId == item.labelId) != -1 return component_chooseList.findIndex(e => e.labelId == item.labelId) != -1
}, },
choose () { choose () {
if (this.disabled) return
this.$emit('select', this.component_chooseList) this.$emit('select', this.component_chooseList)
this.close(); this.close();
},
clear () {
this.component_chooseList = []
this.$forceUpdate()
} }
} }
} }
...@@ -120,6 +146,7 @@ export default { ...@@ -120,6 +146,7 @@ export default {
overflow-y: scroll; overflow-y: scroll;
max-height: 60vh; max-height: 60vh;
position: relative; position: relative;
padding-bottom: 128rpx;
.select-group { .select-group {
margin: 32rpx 0; margin: 32rpx 0;
.select-title { .select-title {
...@@ -130,18 +157,21 @@ export default { ...@@ -130,18 +157,21 @@ export default {
.select-box { .select-box {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(4, 1fr);
gap: 20rpx; gap: 32rpx;
.select-item { .select-item {
text-align: center; text-align: center;
height: 68rpx; justify-content: center;
line-height: 68rpx;
opacity: 1; opacity: 1;
border: 2rpx solid #dce0e6; border: 2rpx solid #dce0e6;
color: #292d33; color: #333;
font-size: 28rpx; font-size: 32rpx;
border-radius: 8rpx; border-radius: 8rpx;
position: relative; position: relative;
box-sizing: border-box;
padding: 13rpx 40rpx;
word-break: break-all;
line-height: 44rpx;
.sprite-icon { .sprite-icon {
display: none; display: none;
position: absolute; position: absolute;
...@@ -159,8 +189,9 @@ export default { ...@@ -159,8 +189,9 @@ export default {
} }
} }
} }
.footer-btns { }
position: sticky; .footer-btns {
position: absolute;
left: 0; left: 0;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
...@@ -168,6 +199,7 @@ export default { ...@@ -168,6 +199,7 @@ export default {
background: #ffffff; background: #ffffff;
box-sizing: border-box; box-sizing: border-box;
padding-top: 32rpx; padding-top: 32rpx;
display: flex;
justify-content: center; justify-content: center;
gap: 0 34rpx; gap: 0 34rpx;
.btn { .btn {
...@@ -186,6 +218,8 @@ export default { ...@@ -186,6 +218,8 @@ export default {
background: #dae9ff; background: #dae9ff;
color: #2c66f7; color: #2c66f7;
} }
.disabled {
background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%);
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<MessageBox <MessageBox ref="employeeBoxVisible" position="bottom" :isFooter="false" :title="`请选择${title}`" :maxHeight="1000" @close="$emit('close')">
ref="employeeBoxVisible"
position="bottom"
:isFooter="false"
:title="`请选择${title}`"
:maxHeight="1000"
@close="$emit('close')"
>
<view class="select-box"> <view class="select-box">
<view <view class="select-item" :class="{ checked: salesUuid == item.uuid }" @click="handleSelect(item)" v-for="(item, index) in employeeList" :key="index">
class="select-item"
:class="{ checked: salesUuid == item.uuid }"
@click="handleSelect(item)"
v-for="(item, index) in employeeList"
:key="index"
>
{{ item.staffName }} {{ item.staffName }}
</view> </view>
</view> </view>
</MessageBox> </MessageBox>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
export default { export default {
name: 'Employee', name: 'Employee',
props: { props: {
title: { title: {
type: String, type: String,
default: '销售' default: '销售'
},
salesPropsUuid: {
type: String,
default: ''
} }
}, },
data () { data () {
...@@ -47,7 +38,7 @@ export default { ...@@ -47,7 +38,7 @@ export default {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
salesUuid () { salesUuid () {
return this.$store.state.user.customerInfo.salesUuid return this.$store.state.user.customerInfo.salesUuid || this.salesPropsUuid
}, },
employeeList () { employeeList () {
return this.$store.state.user.employeeList return this.$store.state.user.employeeList
...@@ -81,23 +72,23 @@ export default { ...@@ -81,23 +72,23 @@ export default {
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.select-box { .select-box {
margin: 40rpx 0; margin: 40rpx 0;
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(4, 1fr);
gap: 20rpx; gap: 32rpx;
overflow-y: scroll; overflow-y: scroll;
max-height: 50vh; max-height: 50vh;
padding-bottom: 60rpx; padding-bottom: 60rpx;
.select-item { .select-item {
text-align: center; text-align: center;
height: 68rpx; height: 68rpx;
line-height: 68rpx; line-height: 44rpx;
opacity: 1; opacity: 1;
border: 2rpx solid #dce0e6; border: 2rpx solid #dce0e6;
color: #292d33; color: #333;
font-size: 28rpx; font-size: 32rpx;
border-radius: 8rpx; border-radius: 8rpx;
&.checked { &.checked {
border: 2rpx solid #292d33; border: 2rpx solid #292d33;
......
<template> <template>
<view class="step"> <view class="step">
<MessageBox <MessageBox ref="formRef" @cancel="cancel" @confirm="submit" :cancelBtnText="`${step == 1 ? '取消' : '上一步'}`" :confirmBtnText="`${sceneType == 0 ? (step == 1 ? '下一步' : '完成接待') : '完成接待'}`" :title="`${step == 1 ? '客户信息完善' : '结果反馈'}`" :popupW="820" :maxHeight="820" :isAutoClose="false">
ref="formRef"
@cancel="cancel"
@confirm="submit"
:cancelBtnText="`${step == 1? '取消' : '上一步'}`"
:confirmBtnText="`${sceneType == 0 ?step == 1? '下一步' : '完成接待': '完成接待'}`"
:title="`${step == 1? '客户信息完善' : '结果反馈'}`"
:popupW="820"
:maxHeight="820"
:isAutoClose="false"
>
<view name="content"> <view name="content">
<template v-if="step == 1"> <template v-if="step == 1">
<template v-if="!check(true)"> <template v-if="!check(true)">
<view <view class="error-tip" v-if="errorTip">以下信息不能为空,请完善信息后保存</view>
class="error-tip" <view class="pop-tips" v-else>{{ tips }}</view>
v-if="errorTip"
>以下信息不能为空,请完善信息后保存</view>
<view
class="pop-tips"
v-else
>{{tips}}</view>
</template> </template>
<view class="form"> <view class="form">
<template v-for="(i, index) in formObject"> <template v-for="(i, index) in formObject">
<view <view class="form-item" :key="index">
class="form-item" <view :class="['label', { required: i.required }]">{{ i.label }}</view>
:key="index" <view :class="['value', { error: showError(i.key) && i.required }, { disabled: customerType == 0 || i.disabled }]">
>
<view :class="['label',{required:i.required}]">{{ i.label }}</view>
<view :class="['value', { error: showError(i.key) && i.required },{disabled:customerType == 0}]">
<template v-if="i.type == 'input'"> <template v-if="i.type == 'input'">
<input <input :type="i.inputType" :maxlength="i.maxlength" v-model="formData[i.key]" class="input" :placeholder="i.placeholder" :disabled="customerType == 0" @input="inputCustomer" placeholder-style="color:#c9c9c9;" />
:type="i.inputType"
:maxlength="i.maxlength"
v-model="formData[i.key]"
class="input"
:placeholder="i.placeholder"
:disabled="customerType == 0"
@input="inputCustomer"
placeholder-style="color:#c9c9c9;"
/>
</template> </template>
<template v-else> <template v-else>
<view <view :class="['select', `${formData[i.key] ? '' : 'placeholder'}`]" @click="showPopup(i)">
:class="['select', `${formData[i.key]? '' : 'placeholder'}`]"
@click="showPopup(i.popKey)"
>
{{ formData[i.key] || i.placeholder }} {{ formData[i.key] || i.placeholder }}
<uni-icons <uni-icons class="arrow" type="down" :size="16"></uni-icons>
class="arrow"
type="down"
:size="16"
></uni-icons>
</view> </view>
</template> </template>
</view> </view>
...@@ -64,42 +29,25 @@ ...@@ -64,42 +29,25 @@
<template v-else> <template v-else>
<view class="pop-tips">请完善本次接待结果</view> <view class="pop-tips">请完善本次接待结果</view>
<view class="choose-box"> <view class="choose-box">
<template v-for="(i,index) in resultList"> <template v-for="(i, index) in resultList">
<view <view :class="['choose-item', `${i.status == receptionStatus ? (i.status == 1 ? 'success' : 'error') : ''}`]" :key="index" @click="chooseResult(i.status)">
:class="['choose-item', `${i.status == receptionStatus ? i.status == 1 ? 'success' : 'error' : ''}`]" <view :class="['sprite-icon', `icon-face-${i.status == receptionStatus ? `${i.icon}-active` : i.icon}`]"></view>
:key="index" {{ i.text }}
@click="chooseResult(i.status)"
>
<view :class="['sprite-icon' , `icon-face-${i.status == receptionStatus ? `${i.icon}-active` : i.icon }`]"></view>
{{ i.text}}
</view> </view>
</template> </template>
</view> </view>
</template> </template>
</view> </view>
</MessageBox> </MessageBox>
<car-brands <car-brands ref="carBrandListVisible" @select="handleSelect($event, 'carBrandListVisible')" />
ref="carBrandListVisible" <employee ref="employeeBoxVisible" @select="handleSelect($event, 'employeeBoxVisible')" />
@select="handleSelect($event,'carBrandListVisible')" <uni-popup ref="successRef" type="message">
/> <uni-popup-message type="success" message="数据保存成功" :duration="1500"></uni-popup-message>
<employee
ref="employeeBoxVisible"
@select="handleSelect($event,'employeeBoxVisible')"
/>
<uni-popup
ref="successRef"
type="message"
>
<uni-popup-message
type="success"
message="数据保存成功"
:duration="1500"
></uni-popup-message>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import Employee from '@/components/Employee.vue' import Employee from '@/components/Employee.vue'
import CarBrands from '@/components/CarBrands.vue' import CarBrands from '@/components/CarBrands.vue'
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
...@@ -109,8 +57,8 @@ const formObject_boutique = [{ ...@@ -109,8 +57,8 @@ const formObject_boutique = [{
key: "customerName", key: "customerName",
type: "input", type: "input",
inputType: "text", inputType: "text",
maxlength: 50, maxlength: 20,
placeholder: '请输入姓名', placeholder: '请输入车主姓名',
required: true required: true
}, },
{ {
...@@ -118,7 +66,8 @@ const formObject_boutique = [{ ...@@ -118,7 +66,8 @@ const formObject_boutique = [{
key: "carModel", key: "carModel",
type: "select", type: "select",
popKey: "carBrandListVisible", popKey: "carBrandListVisible",
placeholder: '请选择品牌车型' placeholder: '请选择品牌车型',
disabled: true
}, },
{ {
label: "车主电话", label: "车主电话",
...@@ -126,7 +75,7 @@ const formObject_boutique = [{ ...@@ -126,7 +75,7 @@ const formObject_boutique = [{
type: "input", type: "input",
inputType: "tel", inputType: "tel",
maxlength: 11, maxlength: 11,
placeholder: '请输入电话', placeholder: '请输入车主电话',
required: true required: true
}, },
{ {
...@@ -161,7 +110,7 @@ export default { ...@@ -161,7 +110,7 @@ export default {
type: "input", type: "input",
inputType: "text", inputType: "text",
maxlength: 50, maxlength: 50,
placeholder: '请输入姓名', placeholder: '请输入车主姓名',
required: true required: true
}, },
{ {
...@@ -170,7 +119,7 @@ export default { ...@@ -170,7 +119,7 @@ export default {
type: "input", type: "input",
inputType: "tel", inputType: "tel",
maxlength: 11, maxlength: 11,
placeholder: '请输入电话', placeholder: '请输入车主电话',
required: true required: true
}, },
{ {
...@@ -221,7 +170,7 @@ export default { ...@@ -221,7 +170,7 @@ export default {
tips () { tips () {
let { sceneType, titleTips } = this, let { sceneType, titleTips } = this,
text = titleTips || '检测到“交车告知书”中未填写客户档案,请填写后再完成接待。' text = titleTips || '检测到“交车告知书”中未填写客户档案,请填写后再完成接待。'
if (sceneType == 1) text = '请确认“精品加装服务说明页”中的客户信息,并点击完成接待结束客户接待。' if (sceneType == 1) text = '请确认“车型加装选购页”中的客户信息,并点击「完成接待」结束客户接待。'
return text return text
} }
}, },
...@@ -245,10 +194,10 @@ export default { ...@@ -245,10 +194,10 @@ export default {
if (key == 'phoneNumber' && this.formData[key]) flag = !phoneRex.test(this.formData[key]) if (key == 'phoneNumber' && this.formData[key]) flag = !phoneRex.test(this.formData[key])
return this.errorTip && flag return this.errorTip && flag
}, },
showPopup (e) { showPopup ({ popKey, disabled }) {
let { customerType } = this let { customerType } = this
if (customerType == 0) return if (customerType == 0 || disabled) return
this.$refs[e].open(); this.$refs[popKey].open();
}, },
// 取消 // 取消
cancel () { cancel () {
...@@ -266,7 +215,13 @@ export default { ...@@ -266,7 +215,13 @@ export default {
this.formObject.map(e => { this.formObject.map(e => {
if (e.required) { if (e.required) {
if (!this.formData[e.key]) throw false if (!this.formData[e.key]) throw false
if (!all && e.key == 'phoneNumber' && !phoneRex.test(this.formData[e.key])) throw false if (!all && e.key == 'phoneNumber' && !phoneRex.test(this.formData[e.key])) {
uni.showToast({
title: "请输入正确的车主电话",
icon: "none",
});
throw false
}
} }
}) })
} catch (error) { } catch (error) {
...@@ -298,7 +253,6 @@ export default { ...@@ -298,7 +253,6 @@ export default {
}, },
success (receptionStatus) { success (receptionStatus) {
this.$refs.successRef.open(); this.$refs.successRef.open();
this.setReceptionStatus(receptionStatus);
this.$emit('submit', receptionStatus) this.$emit('submit', receptionStatus)
}, },
inputCustomer () { inputCustomer () {
...@@ -339,12 +293,13 @@ export default { ...@@ -339,12 +293,13 @@ export default {
}, },
chooseResult (val) { chooseResult (val) {
this.receptionStatus = val this.receptionStatus = val
this.setReceptionStatus(val);
} }
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.pop-tips { .pop-tips {
background: rgba(44, 102, 247, 0.1); background: rgba(44, 102, 247, 0.1);
color: #2c66f7; color: #2c66f7;
......
<template>
<view
class="case-item"
@click="jumpDetail(item)"
>
<image
class="img"
:src="item.cover || 'https://img02.glsx.com.cn/weapp/resource/app-tape/common/default-cover.webp'"
:style="imgStyle"
mode="aspectFill"
></image>
<view class="case-info">
<view class="case-name text-hide">{{ item.title }}</view>
<template v-for="(j, ind) in caseInfo">
<view
class="case-text flex"
:key="ind"
>
<view class="case-label">{{ j.label }}:</view>
<view :class="['case-value', j.class]">
<template v-if="j.format">
{{ j.format(item) }}
</template>
<template v-else>
{{ item[j.key] || '--' }}
</template>
</view>
</view>
</template>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'CaseItem',
props: {
item: Object,
source: {
type: Number,
default: 1
},
visitsId: [Number, String],
imgStyle: String
},
data () {
return {
caseInfo: [
{
label: '业务场景',
class: 'text-hide',
format: (val) => {
// 业务场景:0-会员权益/升级;1-精品升级;2-次新车转化;3-售后众筹;4-积分商城
return val ? {
0: '会员权益/升级',
1: '精品升级',
2: '次新车转化',
3: '售后众筹',
4: '积分商城'
}[val.scene] : '--'
}
},
{
label: '客户标签',
key: 'tags',
class: 'text-hide'
},
{
label: '适用套餐',
key: 'goods',
class: 'text-two-line'
},
],
}
},
mounted () {
},
methods: {
jumpDetail (item) {
const { source, visitsId } = this
let params = `id=${item.id}&source=${source}`
if (visitsId) params += `&visitsId=${visitsId}`
// 类型:0-图片;1-视频;2-pdf;3-富文本
let url = `/pages/common/caseDetail?${params}`
if (item.type != 3) {
let fileUrl = item?.detailInfos[0]?.image
if (item.type == 2) url = `/pages/common/webview?fileUrl=${fileUrl}&title=${item.title}&${params}`
if (item.type == 1 || item.type == 0) url = `/pages/boutique/preview?tabName=${item.title}&sourceType=${item.type == 1 ? 2 : 1}&detailUrl=${fileUrl}&${params}`
}
uni.navigateTo({
url: `${url}`
})
},
}
}
</script>
<style scoped lang='scss'>
.case-item {
width: 100%;
height: 100%;
background: #ffffff;
box-shadow: 0 8rpx 24rpx 0 #2c66f71a;
border-radius: 16rpx;
display: flex;
flex-direction: column;
overflow: hidden;
.img {
width: 100%;
height: 324rpx;
}
.case-name {
font-weight: 500;
font-size: 28rpx;
color: #333333;
line-height: 48rpx;
padding: 16rpx 32rpx 8rpx;
}
.case-text {
align-items: flex-start;
font-size: 24rpx;
color: #666666;
line-height: 40rpx;
padding: 0 32rpx;
margin-bottom: 4rpx;
}
.case-label {
width: 120rpx;
flex-shrink: 0;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -48,8 +48,27 @@ ...@@ -48,8 +48,27 @@
></view> ></view>
</view> </view>
</view> </view>
<view
class="scene-box flex"
v-if="firstIndex == 2"
>
<view class="scene-tabs flex">
<template v-for="(i, index) in sceneList">
<view
:class="['tab flex', { active: caseParams.scene == i.id }]"
:key="index"
@click="changeScene(i.id)"
>{{ i.text }}</view>
</template>
</view>
<view
class="search-btn flex"
@click="$refs.customerTagstVisible.open()"
>标签筛选</view>
</view>
<scroll-view <scroll-view
:class="['record-list', {'type-1':firstIndex == 1}]" :class="['record-list', recordClass]"
scroll-y scroll-y
@scrolltolower="pageonReachBottom" @scrolltolower="pageonReachBottom"
> >
...@@ -58,6 +77,19 @@ ...@@ -58,6 +77,19 @@
<template v-if="list.length && list[0] && list[0].length"> <template v-if="list.length && list[0] && list[0].length">
<template v-for="(i,index) in list"> <template v-for="(i,index) in list">
<template v-for="(item,cindex) in i"> <template v-for="(item,cindex) in i">
<template v-if="firstIndex == 2">
<view
class="case-item"
:key="item.id"
>
<case-item
:item="item"
:source="2"
imgStyle="height:290rpx"
/>
</view>
</template>
<template v-else>
<view <view
class="item" class="item"
:key="item.id" :key="item.id"
...@@ -73,7 +105,7 @@ ...@@ -73,7 +105,7 @@
>{{ >{{
{ {
1: "成交", 1: "成交",
2: "战败", 0: "战败",
}[item.receptionResult] }[item.receptionResult]
}}</view> }}</view>
<view class="name"> <view class="name">
...@@ -82,7 +114,7 @@ ...@@ -82,7 +114,7 @@
<template v-for="(k, ind) in itemObject"> <template v-for="(k, ind) in itemObject">
<view <view
class="info flex" class="info flex"
:key="ind" :key="`${item.id}-${ind}`"
v-if="showItem(k.key)" v-if="showItem(k.key)"
> >
<view class="label">{{ k.label }}</view> <view class="label">{{ k.label }}</view>
...@@ -142,13 +174,14 @@ ...@@ -142,13 +174,14 @@
</template> </template>
</template> </template>
</template> </template>
</template>
<template v-else> <template v-else>
<view class="nothing flex"> <view class="nothing flex">
<image <image
class="icon" class="icon"
src="../../../assets/images/home/nothing.webp" src="../../../assets/images/home/nothing.webp"
/> />
暂无接待记录 {{firstIndex == 2 ? '暂无推荐话术' : '暂无接待记录'}}
</view> </view>
</template> </template>
</template> </template>
...@@ -175,21 +208,37 @@ ...@@ -175,21 +208,37 @@
:show.sync="showInfo" :show.sync="showInfo"
@refresh="refresh" @refresh="refresh"
/> />
<customer-tags
ref="customerTagstVisible"
@select="handleSelect"
title="筛选"
cancelText="清除筛选"
:chooseList="tagsList"
:disabledSwitch="false"
clearSwitch
:sceneNumber="caseParams.scene"
></customer-tags>
</view> </view>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import dayjs from 'dayjs' import dayjs from 'dayjs'
import CustomerInfo from './CustomerInfo.vue' import CustomerInfo from './CustomerInfo.vue'
import CaseItem from './CaseItem.vue'
import CustomerTags from '../../CustomerTags.vue'
export default { export default {
components: { components: {
CustomerInfo CustomerInfo,
CaseItem,
CustomerTags
}, },
name: '', name: '',
data () { data () {
return { return {
tagsList: [],
typeList: [ typeList: [
{ tabName: '未接待' }, { tabName: '未接待' },
{ tabName: '已接待' }, { tabName: '已接待' },
{ tabName: '客户案例广场' },
], ],
firstIndex: 0, firstIndex: 0,
firstLeft: ['0rpx', '352rpx', '756rpx'], firstLeft: ['0rpx', '352rpx', '756rpx'],
...@@ -200,6 +249,10 @@ export default { ...@@ -200,6 +249,10 @@ export default {
{ text: '本月' }, { text: '本月' },
{ text: '全部' } { text: '全部' }
], ],
sceneList: [
{ text: '会员权益/升级', id: 0 },
{ text: '轻改升级', id: 1 },
],
itemObject: [ itemObject: [
{ label: '车主电话', key: 'ownerPhone' }, { label: '车主电话', key: 'ownerPhone' },
{ label: '品牌车型', key: 'brandModel' }, { label: '品牌车型', key: 'brandModel' },
...@@ -214,9 +267,15 @@ export default { ...@@ -214,9 +267,15 @@ export default {
list: [], list: [],
flag: false, flag: false,
nothing: false, nothing: false,
pageSize: 18, pageSize: 12,
customerId: '', customerId: '',
showInfo: false, showInfo: false,
caseParams: {
scene: 0,
status: 1,
showChannel: 2,
},
} }
}, },
computed: { computed: {
...@@ -225,6 +284,12 @@ export default { ...@@ -225,6 +284,12 @@ export default {
return { return {
transform: `translate(calc(${dateIndex * 184}rpx), -50%)` transform: `translate(calc(${dateIndex * 184}rpx), -50%)`
} }
},
recordClass () {
return {
1: 'type-1',
2: 'type-2'
}[this.firstIndex]
} }
}, },
mounted () { mounted () {
...@@ -236,7 +301,8 @@ export default { ...@@ -236,7 +301,8 @@ export default {
this.list = [] this.list = []
this.pageNum = 1; this.pageNum = 1;
this.nothing = false this.nothing = false
this.getReceptionList() if (this.firstIndex == 2) this.getMaterialResponsePage()
else this.getReceptionList()
}, },
changeType (index) { changeType (index) {
if (this.firstIndex == index) return // 点击同一个 if (this.firstIndex == index) return // 点击同一个
...@@ -302,17 +368,24 @@ export default { ...@@ -302,17 +368,24 @@ export default {
seconds seconds
} }
}, },
changeIndex (index, isType = false) { changeIndex (index) {
if (this.dateIndex == index && !isType) return if (this.dateIndex == index) return
this.dateIndex = index this.dateIndex = index
this.refresh() this.refresh()
}, },
changeScene (id) {
if (this.caseParams.scene == id) return
this.tagsList = []
this.caseParams.scene = id
this.refresh()
},
pageonReachBottom () { pageonReachBottom () {
let { pageNum, total, nothing, pageSize } = this let { pageNum, total, nothing, pageSize } = this
if (!nothing) nothing = 'nothing' if (!nothing) nothing = 'nothing'
if (Math.ceil(total / pageSize) > pageNum) { if (Math.ceil(total / pageSize) > pageNum) {
this.pageNum += 1 this.pageNum += 1
this.getReceptionList() if (this.firstIndex == 2) this.getMaterialResponsePage()
else this.getReceptionList()
} else this.nothing = true } else this.nothing = true
}, },
getDateRange (type) { getDateRange (type) {
...@@ -383,6 +456,52 @@ export default { ...@@ -383,6 +456,52 @@ export default {
animationType: 'pop-in', animationType: 'pop-in',
animationDuration: 100 animationDuration: 100
}) })
},
async getMaterialResponsePage () {
try {
uni.showLoading({
mask: true
})
let { shopMerchantId } = uni.$storage.get("userInfo"),
{ pageSize, pageNum, caseParams, tagsList } = this,
customerLabelList = []
tagsList.map(e => customerLabelList.push({
labelId: e.labelId
}))
let params = {
currentPage: pageNum,
pageSize,
customerLabelList,
merchantId: shopMerchantId,
...caseParams
}
const { list, total } = await uni.$api.customerApi.getMaterialResponsePage(params)
uni.hideLoading()
list.map(e => {
let tags = [],
goods = []
e.customerLabelInfoList?.map(item => {
tags.push(item.labelName)
})
e.productPackageInfoList?.map(item => {
goods.push(item.upgradeGoodsName)
})
e.tags = tags.join('、')
e.goods = goods.join('、')
})
this.list[pageNum - 1] = list
this.flag = true
this.total = total
this.$forceUpdate()
} catch (error) {
console.log(error)
uni.hideLoading()
this.flag = true
}
},
handleSelect (list) {
this.tagsList = list
this.refresh()
} }
} }
} }
...@@ -465,7 +584,7 @@ export default { ...@@ -465,7 +584,7 @@ export default {
} }
} }
.record-list { .record-list {
height: calc(100% - 248rpx); height: calc(100% - 242rpx);
position: relative; position: relative;
z-index: 4; z-index: 4;
} }
...@@ -481,6 +600,17 @@ export default { ...@@ -481,6 +600,17 @@ export default {
} }
} }
} }
.type-2 {
height: calc(100% - 248rpx);
.list {
padding-top: 48rpx;
.item {
.name {
max-width: 416rpx;
}
}
}
}
.list { .list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -599,6 +729,10 @@ export default { ...@@ -599,6 +729,10 @@ export default {
opacity: 1; opacity: 1;
} }
} }
.case-item {
width: 444rpx;
height: 552rpx;
}
} }
} }
.add-btn { .add-btn {
...@@ -633,7 +767,7 @@ export default { ...@@ -633,7 +767,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
width: fit-content; width: fit-content;
height: 76rpx; height: 68rpx;
background-color: #f2f2f2; background-color: #f2f2f2;
border-radius: 16rpx; border-radius: 16rpx;
margin-left: 64rpx; margin-left: 64rpx;
...@@ -652,7 +786,7 @@ export default { ...@@ -652,7 +786,7 @@ export default {
} }
.tab { .tab {
width: 184rpx; width: 184rpx;
height: 76rpx; height: 68rpx;
justify-content: center; justify-content: center;
font-size: 28rpx; font-size: 28rpx;
color: #1f2133; color: #1f2133;
...@@ -661,11 +795,12 @@ export default { ...@@ -661,11 +795,12 @@ export default {
} }
.active { .active {
opacity: 1; opacity: 1;
font-weight: 500;
} }
.active-btn { .active-btn {
position: absolute; position: absolute;
width: 184rpx; width: 184rpx;
height: 76rpx; height: 68rpx;
background: #ffffff; background: #ffffff;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
...@@ -674,6 +809,43 @@ export default { ...@@ -674,6 +809,43 @@ export default {
} }
} }
} }
.scene-box {
position: relative;
top: 0;
z-index: 3;
margin-top: -8rpx;
padding: 0 64rpx;
.scene-tabs {
gap: 0 24rpx;
.tab {
height: 80rpx;
background: #f2f2f2;
border-radius: 16rpx;
padding: 0 32rpx;
justify-content: center;
font-size: 28rpx;
color: #666666;
line-height: 44rpx;
transition: all 0.15s;
}
.active {
font-weight: 500;
color: #2d66f7;
background: #2d66f71a;
}
}
.search-btn {
margin-left: auto;
&::after {
content: '';
border: 12rpx solid transparent;
border-left-color: #000;
margin-left: 12rpx;
transform: translateY(-2rpx);
}
}
}
.nothing { .nothing {
width: 100%; width: 100%;
flex-direction: column; flex-direction: column;
......
...@@ -89,6 +89,10 @@ ...@@ -89,6 +89,10 @@
<car-brands <car-brands
ref="carBrandVisible" ref="carBrandVisible"
@select="handleSelect($event,'carBrandVisible')" @select="handleSelect($event,'carBrandVisible')"
:echoData="customerInfo"
carBrandKey="carBrand"
carModelKey="brandModel"
customBoolean
/> />
<customer-tags <customer-tags
ref="customerTagstVisible" ref="customerTagstVisible"
...@@ -182,6 +186,8 @@ export default { ...@@ -182,6 +186,8 @@ export default {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
if (!newval) return if (!newval) return
const { sceneType } = uni.$storage.get("userInfo");
default_customerForm[0].maxlength = sceneType == 1 ? 20 : 50
this.$store.dispatch("clearCustomerInfo"); this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory") this.$store.dispatch("clearHistory")
this.customerForm = JSON.parse(JSON.stringify(default_customerForm)) this.customerForm = JSON.parse(JSON.stringify(default_customerForm))
...@@ -266,6 +272,7 @@ export default { ...@@ -266,6 +272,7 @@ export default {
if (popkey == 'carBrandVisible') { if (popkey == 'carBrandVisible') {
this.$refs.carBrandVisible.close() this.$refs.carBrandVisible.close()
this.customerInfo.brandModel = item.name this.customerInfo.brandModel = item.name
this.customerInfo.carBrand = item.carChildsBrandName
} else if (popkey == 'customerTagstVisible') { } else if (popkey == 'customerTagstVisible') {
let names = [], let names = [],
ids = [] ids = []
...@@ -290,7 +297,7 @@ export default { ...@@ -290,7 +297,7 @@ export default {
e.error = false e.error = false
}) })
let { customerInfo, customerForm, customerTag } = this, let { customerInfo, customerForm, customerTag } = this,
{ shopMerchantId,sceneType } = uni.$storage.get("userInfo"), { shopMerchantId, sceneType } = uni.$storage.get("userInfo"),
targetApi = customerInfo.id ? 'updateVisitsInfo' : 'saveVisitsInfo', targetApi = customerInfo.id ? 'updateVisitsInfo' : 'saveVisitsInfo',
params = { params = {
customerTag, customerTag,
...@@ -303,17 +310,44 @@ export default { ...@@ -303,17 +310,44 @@ export default {
}) })
if (customerInfo.id) params.id = customerInfo.id if (customerInfo.id) params.id = customerInfo.id
params.customerTagName = params.customerTagName.replace(/|/g, ',') params.customerTagName = params.customerTagName.replace(/|/g, ',')
const res = await uni.$api.customerApi[targetApi](params) uni.showLoading({
mask: true
})
const res = await uni.$api.customerApi[targetApi](params),
_this = this
if (res) { if (res) {
/**1:成功,2:重复 */
if (res == '1') {
this.$refs.successRef.open() this.$refs.successRef.open()
setTimeout(() => { setTimeout(() => {
uni.hideLoading()
this.back() this.back()
this.$emit('refresh') this.$emit('refresh')
}, 1e3) }, 1e3)
} else {
uni.showModal({
content: '存在与该手机号相同的接待记录,系统将自动归类到已接待',
showCancel: false,
confirmText: '确认',
confirmColor: '#347BFF',
success (res) {
if (res.confirm) {
_this.back()
_this.$emit('refresh')
}
}
})
uni.hideLoading()
} }
} else {
uni.hideLoading()
}
} catch (error) { } catch (error) {
let index = this.customerForm.findIndex(e => e.key == error) let index = this.customerForm.findIndex(e => e.key == error)
this.customerForm[index].error = true this.customerForm[index].error = true
this.clickFlag = false
uni.hideLoading()
} }
} }
} }
...@@ -347,7 +381,7 @@ export default { ...@@ -347,7 +381,7 @@ export default {
height: 96rpx; height: 96rpx;
z-index: 9; z-index: 9;
text-align: center; text-align: center;
font-weight: 500; font-weight: 700;
font-size: 32rpx; font-size: 32rpx;
color: #1a1a1a; color: #1a1a1a;
line-height: 96rpx; line-height: 96rpx;
......
<template>
<view class="bg">
<view class="top">
<view
class="top-one"
:style="randomize"
></view>
</view>
<view class="bottom">
<view
class="bottom-one"
:style="randomize"
></view>
<view
class="bottom-two"
:style="randomize"
></view>
<view
class="bottom-three"
:style="randomize"
></view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
dateKey: null,
}
},
computed:{
randomize () {
let { dateKey } = this;
const maxX = uni.getSystemInfoSync().windowWidth - 300,
maxY = uni.getSystemInfoSync().windowHeight - 100,
x = Math.floor(Math.random() * maxX),
y = Math.floor(Math.random() * maxY);
return `transform:translate(${x}px,${y}px);${dateKey};`;
},
},
mounted () {
setInterval(() => {
this.dateKey = Date.now();
}, 5e3);
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.bg {
position: absolute;
z-index: -2;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
background-image: linear-gradient(180deg, #f2f6ff 0%, #f7f9ff 100%);
overflow: hidden;
.top {
position: absolute;
top: 0;
left: 0;
width: 100%;
&-one {
position: absolute;
top: -1600rpx;
right: 128rpx;
width: 2012rpx;
height: 2012rpx;
opacity: 0.3;
background: #fff;
box-shadow: inset 2rpx 2rpx 0 2rpx #ffffff80;
border-radius: 50% / 25%;
transition: all 2s;
z-index: 2;
&::before {
position: absolute;
width: 856.56rpx;
height: 153.54rpx;
right: 150rpx;
top: 0;
opacity: 0.6;
background: #ebfdff;
filter: blur(36rpx);
content: '';
}
}
&::before {
position: absolute;
content: '';
right: 0;
top: 0;
width: 890.36rpx;
height: 174.84rpx;
opacity: 0.2;
background: #3582ee;
filter: blur(100rpx);
}
&::after {
width: 274.32rpx;
height: 410.02rpx;
opacity: 0.16;
background-image: linear-gradient(125deg, #65b8f7 36%, #3582ee 79%);
filter: blur(74rpx);
position: absolute;
content: '';
right: 0;
top: 24rpx;
}
}
.bottom {
position: absolute;
width: 1291.3rpx;
height: 316rpx;
left: 0;
bottom: 0;
z-index: 2;
&::before {
content: '';
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
opacity: 0.11;
background: #3582ee;
filter: blur(100rpx);
}
&::after {
width: 1484.32rpx;
height: 160.02rpx;
opacity: 0.12;
background-image: linear-gradient(125deg, #65b8f8 36%, #3582ee 79%);
filter: blur(74rpx);
position: absolute;
left: 480rpx;
bottom: 0;
content: '';
}
&-one {
position: absolute;
left: 0;
bottom: 44rpx;
width: 643.02rpx;
height: 258.78rpx;
opacity: 0.4;
background: #ebfffd;
filter: blur(36rpx);
transition: all 2s;
}
&-two {
position: absolute;
width: 450rpx;
height: 450rpx;
opacity: 0.24;
background: #ffffff;
box-shadow: inset 2rpx 2rpx 0 2rpx #ffffff80;
border: 100%;
left: -225rpx;
bottom: -225rpx;
border-radius: 100%;
transition: all 2s;
}
&-three {
width: 762.7rpx;
height: 210.92rpx;
opacity: 0.16;
box-shadow: inset 2rpx 2rpx 0 2rpx #ffffff80;
background-color: fff;
position: fixed;
left: 0;
top: 0;
border-radius: 50%;
transition: all 2s;
z-index: 2;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -4,50 +4,36 @@ ...@@ -4,50 +4,36 @@
<view class="user-avatar sprite-icon icon-avatar"></view> <view class="user-avatar sprite-icon icon-avatar"></view>
<view class="user-name">{{ userInfo.name }}</view> <view class="user-name">{{ userInfo.name }}</view>
</view> </view>
<view :class="['left-tabs', {'three':tabs.length == 3}]"> <view :class="['left-tabs', { three: tabs.length == 3 }]">
<template v-for="(i, index) in tabs"> <template v-for="(i, index) in tabs">
<view <view :class="['tab-item', { tabActive: tabIndex == index }]" :key="index" @click="changeIndex(index)">
:class="['tab-item', { tabActive: tabIndex == index }]"
:key="index"
@click="changeIndex(index)"
>
<view class="icon-box"> <view class="icon-box">
<view :class="[ <view :class="['sprite-icon', `icon-${i.icon}${tabIndex == index ? '-active' : ''}`]"></view>
'sprite-icon',
`icon-${i.icon}${tabIndex == index ? '-active' : ''}`,
]"></view>
</view> </view>
{{ i.label }} {{ i.label }}
<view class="dot" v-if="i.icon == 'record' && perRecordNumber"></view>
</view> </view>
</template> </template>
</view> </view>
<view class="left-footer"> <view class="left-footer">
<view <view class="btn" @click="$refs.kfRef.open()">
class="btn"
@click="$refs.kfRef.open()"
>
<view class="sprite-icon icon-feedback"></view> <view class="sprite-icon icon-feedback"></view>
</view> </view>
<view <view class="btn" @click="$refs.settingRef.open()">
class="btn"
@click="$refs.settingRef.open()"
>
<view class="sprite-icon icon-setting"></view> <view class="sprite-icon icon-setting"></view>
</view> </view>
</view> </view>
<!-- 客服弹框 --> <!-- 客服弹框 -->
<kf-box ref="kfRef" /> <kf-box ref="kfRef" />
<!-- 设置弹框 --> <!-- 设置弹框 -->
<setting-box <setting-box ref="settingRef" @stopAudio="$emit('stopAudio')" />
ref="settingRef"
@stopAudio="$emit('stopAudio')"
/>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import KfBox from "./KfBox"; import KfBox from "./KfBox";
import SettingBox from "./SettingBox"; import SettingBox from "./SettingBox";
import { STORAGE_OBJECTkEY } from '@/utils/cache/constantData'
export default { export default {
components: { KfBox, SettingBox }, components: { KfBox, SettingBox },
props:{ props:{
...@@ -74,6 +60,11 @@ export default { ...@@ -74,6 +60,11 @@ export default {
if(n.shopMerchantId) this.haveCustomerAccess(n.shopMerchantId) if(n.shopMerchantId) this.haveCustomerAccess(n.shopMerchantId)
} }
}, },
computed: {
perRecordNumber() {
return this.$store.state.audio.perRecordNumber
}
},
mounted () { mounted () {
}, },
methods: { methods: {
...@@ -96,7 +87,7 @@ export default { ...@@ -96,7 +87,7 @@ export default {
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.left-side { .left-side {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -134,6 +125,16 @@ export default { ...@@ -134,6 +125,16 @@ export default {
color: #8a98b5; color: #8a98b5;
text-align: center; text-align: center;
padding-bottom: 96rpx; padding-bottom: 96rpx;
position: relative;
.dot {
width: 16rpx;
height: 16rpx;
background: #f24724;
border-radius: 50%;
position: absolute;
right: 20rpx;
top: 20rpx;
}
.icon-box { .icon-box {
width: 112rpx; width: 112rpx;
height: 112rpx; height: 112rpx;
...@@ -213,5 +214,4 @@ export default { ...@@ -213,5 +214,4 @@ export default {
padding-left: 60rpx; padding-left: 60rpx;
} }
} }
</style> </style>
...@@ -29,17 +29,20 @@ ...@@ -29,17 +29,20 @@
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import checkUpdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js"; import checkUpdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js";
import utils from '@/utils/utils'
export default { export default {
name: 'SettingBox', name: 'SettingBox',
data () { data() {
return { return {
version: '', version: '',
deviceId:'' deviceId: ''
} }
}, },
mounted () { mounted() {
this.version = plus?.runtime?.version || '1.0.0' this.version = plus?.runtime?.version || '1.0.0'
const {deviceId} = uni.getDeviceInfo() const {
deviceId
} = uni.getDeviceInfo()
this.deviceId = deviceId this.deviceId = deviceId
}, },
methods: { methods: {
...@@ -54,44 +57,66 @@ export default { ...@@ -54,44 +57,66 @@ export default {
} }
}); });
}, },
async handleCheck() { async handleCheck() {
try { const {
await checkUpdate() textList,
this.close() tempFileURL,
} catch (error) { version
} = uni.$storage.get('mock_data')
const res = utils.compareVersions(this.version,version)
if(res > -1) {
uni.showToast({ uni.showToast({
title: '目前已是最新版本', title: '目前已是最新版本',
duration: 2000, duration: 2000,
icon: 'none' icon: 'none'
}); });
return
}
this.close()
const e = {
result: {
"is_silently": false,
"is_mandatory": true,
"name": "",
"title": "",
"contents": textList.join('\n'),
"version": version,
"url": tempFileURL,
"stable_publish": true,
},
} }
checkUpdate(e)
}, },
open () { open() {
this.$refs.popup.open("center"); this.$refs.popup.open("center");
}, },
close () { close() {
this.$refs.popup.close() this.$refs.popup.close()
}, },
changeAccount () { changeAccount() {
uni.reLaunch({ uni.reLaunch({
url: '/pages/common/accountItems' url: '/pages/common/accountItems'
}) })
}, },
// 退出 // 退出
logout () { logout() {
let _this = this let _this = this
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: '是否退出当前账号?', content: '是否退出当前账号?',
confirmColor: '#347BFF', confirmColor: '#347BFF',
async success (res) { async success(res) {
if (res.confirm) { if (res.confirm) {
_this.$emit('stopAudio') _this.$emit('stopAudio')
try { try {
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
const { code, message } = await uni.$api.userApi.logout(), const {
code,
message
} = await uni.$api.userApi.logout(),
userInfo = uni.$storage.get("userInfo") userInfo = uni.$storage.get("userInfo")
console.log(code) console.log(code)
if (code == 0) { if (code == 0) {
...@@ -117,8 +142,9 @@ export default { ...@@ -117,8 +142,9 @@ export default {
} }
}) })
}, },
jump (type) { jump(type) {
let url = type == 'icp' ? 'https://beian.miit.gov.cn/' : 'https://img01.glsx.com.cn/weapp/resource/saas/app/privacy.html' let url = type == 'icp' ? 'https://beian.miit.gov.cn/' :
'https://img01.glsx.com.cn/weapp/resource/saas/app/privacy.html'
uni.navigateTo({ uni.navigateTo({
url: `/pages/common/webview?url=${url}` url: `/pages/common/webview?url=${url}`
}) })
...@@ -139,6 +165,7 @@ export default { ...@@ -139,6 +165,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
.close { .close {
position: absolute; position: absolute;
width: 120rpx; width: 120rpx;
...@@ -147,20 +174,24 @@ export default { ...@@ -147,20 +174,24 @@ export default {
right: 0; right: 0;
justify-content: center; justify-content: center;
} }
.app-info { .app-info {
flex-direction: column; flex-direction: column;
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
.sprite-icon { .sprite-icon {
margin-bottom: 12rpx; margin-bottom: 12rpx;
box-shadow: 0 0 24rpx 0 #3682ef33; box-shadow: 0 0 24rpx 0 #3682ef33;
border-radius: 40rpx; border-radius: 40rpx;
} }
.version { .version {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
} }
.check-box { .check-box {
width: 120rpx; width: 120rpx;
padding: 10rpx 0rpx 4rpx; padding: 10rpx 0rpx 4rpx;
...@@ -173,8 +204,10 @@ export default { ...@@ -173,8 +204,10 @@ export default {
box-sizing: border-box; box-sizing: border-box;
} }
} }
.btn-box { .btn-box {
margin-top: 120rpx; margin-top: 120rpx;
.btn { .btn {
width: 384rpx; width: 384rpx;
height: 64rpx; height: 64rpx;
...@@ -186,25 +219,30 @@ export default { ...@@ -186,25 +219,30 @@ export default {
color: #3b73ff; color: #3b73ff;
margin-bottom: 16rpx; margin-bottom: 16rpx;
} }
.logout { .logout {
background: #ffffff; background: #ffffff;
color: #333333; color: #333333;
border: 2rpx solid #e8e8e8; border: 2rpx solid #e8e8e8;
} }
} }
.a { .a {
font-size: 24rpx; font-size: 24rpx;
color: #2c66f7; color: #2c66f7;
margin: 48rpx 0 16rpx; margin: 48rpx 0 16rpx;
} }
.icp { .icp {
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
} }
.app-code { .app-code {
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
line-height: 40rpx; line-height: 40rpx;
.icon-clone { .icon-clone {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
......
<template>
<view class="data-container">
<view class="nav-bar" @click="$emit('cancel')">
<view class="back" @click="$emit('update:showPayPage', false)">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">接待记录</view>
</view>
<view class="error-tip" v-if="errorTip">以下信息不能为空,请完善信息后保存</view>
<view class="form">
<template v-for="(i, index) in formObject">
<view :class="['form-item', { active: focusIndex == index }]" :key="index">
<view class="label required">{{ i.label }}</view>
<view :class="['value', { error: showError(i.key) }]">
<template v-if="i.type == 'input'">
<input :type="i.inputType" :maxlength="i.maxlength" v-model="customerInfo[i.key]" class="input" :placeholder="i.placeholder" @focus="focusIndex = index" @blur="resetFocusIndex" />
</template>
<template v-else>
<view :class="['select flex', { placeholderStyle: !customerInfo[i.key] }]" @click="showPopup(i.popKey, index)">
<view class="text-hide">{{ customerInfo[i.key] || i.placeholder }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</template>
</view>
</view>
</template>
</view>
<view class="footer-box">
<view class="cancel-btn" @click="$emit('cancel')">取消</view>
<view class="submit-btn" @click="handleSave">提交</view>
</view>
<car-brands ref="carBrandListVisible" @select="handleSelect($event, 'carBrandListVisible')" />
<employee ref="employeeBoxVisible" :salesPropsUuid="customerInfo.salesUuid" @select="handleSelect($event, 'employeeBoxVisible')" />
<MessageBox ref="receptionStatusVisible" position="bottom" :isFooter="false" title="请选择接待结果" :maxHeight="1000">
<view class="select-box">
<view class="select-item" :class="{ checked: customerInfo.receptionStatus == item.label }" @click="selectReception(item.label)" v-for="(item, index) in receptionList" :key="index">
{{ item.label }}
</view>
</view>
</MessageBox>
</view>
</template>
<script type="text/ecmascript-6">
import CarBrands from '@/components/CarBrands.vue'
import Employee from '@/components/Employee.vue'
import CustomerAutocomplete from '@/components/CustomerAutocomplete.vue'
const phoneRex = /^[1]([3-9])[0-9]{9}$/;
import utils from "@/utils/utils";
export default {
components: {
CarBrands,
Employee,
CustomerAutocomplete
},
props: {
customerInfoVal: {
type: Object,
default: () => ({})
}
},
data() {
return {
errorTip:false,
receptionList: [{
label: '成交',
value: 1
},
{
label: '战败',
value: 0
}
],
formObject: [{
label: "车主姓名",
placeholder: '车主姓名',
key: 'customerName',
type: 'input',
inputType: 'text',
maxlength: 50
},
{
label: "车主电话",
placeholder: '车主电话',
key: 'phoneNumber',
type: 'input',
inputType: 'tel',
maxlength: 11
},
{
label: "品牌车型",
placeholder: '品牌车型',
key: 'carModel',
type: 'select',
popKey: 'carBrandListVisible'
},
{
label: "接待结果",
key: "receptionStatus",
type: "select",
popKey: "receptionStatusVisible",
placeholder: '请选择',
},
{
label: "销售姓名",
key: "salesName",
type: "select",
popKey: "employeeBoxVisible",
placeholder: '请选择',
},
],
focusIndex: -1,
customerInfo:{}
}
},
mounted() {
this.customerInfo = utils.deepClone(this.customerInfoVal)
console.log(this.customerInfo)
const i = this.receptionList.findIndex(e => e.value === this.customerInfo.receptionStatus)
this.$set(this.customerInfo, 'receptionStatus', i == -1?'':this.receptionList[i].label)
},
methods: {
selectReception(value) {
this.customerInfo.receptionStatus = value
this.$refs.receptionStatusVisible.close()
},
showError(key) {
let flag = !this.customerInfo[key]
if (key == 'phoneNumber' && this.customerInfo[key]) flag = !phoneRex.test(this.customerInfo[key])
return flag
},
handleSave() {
const result = this.check(true)
if (!result) return this.errorTip = true
const i = this.receptionList.findIndex(e => e.label == this.customerInfo.receptionStatus)
this.customerInfo.receptionStatus = this.receptionList[i].value
this.$emit('submit',this.customerInfo)
},
check(all = false) {
let flag = true
try {
this.formObject.map(e => {
if (!this.customerInfo[e.key]) throw false
if (!all && e.key == 'phoneNumber' && !phoneRex.test(this.customerInfo[e.key])) {
uni.showToast({
title: "请输入正确的车主电话",
icon: "none",
});
throw false
}
})
} catch (error) {
flag = error
}
return flag
},
handleSelect(item, popkey) {
this.$refs[popkey].close()
console.log(item, popkey)
if (popkey == 'employeeBoxVisible') {
this.customerInfo.salesUuid = item.uuid
this.customerInfo.salesName = item.staffName
} else {
this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name
}
this.resetFocusIndex()
this.errorTip = false
},
showPopup(e, index) {
this.focusIndex = index
this.$refs[e].open()
},
resetFocusIndex() {
this.focusIndex = -1
this.errorTip = false
}
}
}
</script>
<style scoped lang="scss">
.error-tip {
font-size: 28rpx;
padding: 32rpx 60rpx 24rpx;
margin-top: 100rpx;
margin-bottom: -80rpx;
text-align: center;
background-color: rgb(254, 237, 234);
color: #f45c3d;
}
.data-container {
background: #ffffff59;
border-radius: 48rpx;
margin: 80rpx 66rpx 80rpx 0;
height: calc(100% - 160rpx);
box-shadow: inset 0 0 16rpx 0 #ffffff;
border: 2rpx solid #fff;
box-sizing: border-box;
position: relative;
.nav-bar {
position: absolute;
width: 100%;
height: 96rpx;
left: 0;
top: 28rpx;
z-index: 9;
text-align: center;
font-weight: 700;
font-size: 32rpx;
color: #1a1a1a;
line-height: 96rpx;
.back {
position: absolute;
left: 0;
top: 0;
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
}
}
.form {
display: flex;
flex-wrap: wrap;
gap: 80rpx 160rpx;
padding: 80rpx;
margin-top: 60rpx;
&-item {
width: calc(50% - 80rpx);
display: flex;
align-items: center;
color: #6c6c70;
font-size: 30rpx;
height: 80rpx;
box-sizing: border-box;
.label {
position: relative;
margin-left: auto;
flex-shrink: 0;
width: 124rpx;
margin-right: 30rpx;
}
.required {
&::before {
content: '*';
color: #ff0000;
position: absolute;
left: -20rpx;
top: 50%;
transform: translate(0, -50%);
}
}
.value {
height: 80rpx;
flex: 1;
border: 2rpx solid #e8e8ea;
background: #ffffff;
margin-left: 32rpx;
box-sizing: border-box;
padding: 0 40rpx;
border-radius: 8rpx;
&.error {
border: 2rpx solid #f24724;
border-radius: 8rpx;
}
.input,
.select {
width: 100%;
height: 100%;
border: none !important;
outline: none;
padding: 0 !important;
font-size: 30rpx;
color: #333;
&::placeholder {
color: #c9c9c9;
}
}
.placeholderStyle {
color: #999999;
}
.arrow {
color: #999 !important;
margin-left: auto;
flex-shrink: 0;
}
}
}
// .active {
// &::after {
// position: absolute;
// left: -2rpx;
// top: -2rpx;
// width: calc(100% + 4rpx);
// height: calc(100% + 4rpx);
// content: '';
// background-image: linear-gradient(#2f6af7, #75bcff);
// box-shadow: 0 0 0 8rpx #2c66f71a;
// border-radius: 16rpx;
// }
// }
}
.footer-box {
display: flex;
align-items: center;
justify-content: center;
gap: 34rpx;
padding: 0 280rpx;
.cancel-btn {
height: 80rpx;
background: #dae9ff;
border-radius: 48rpx;
line-height: 80rpx;
text-align: center;
color: #2c66f7;
flex: 1;
}
.submit-btn {
height: 80rpx;
background-image: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
border-radius: 48rpx;
line-height: 80rpx;
text-align: center;
flex: 1;
color: #ffffff;
}
}
}
.select-box {
margin: 40rpx 0;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 20rpx;
overflow-y: scroll;
max-height: 50vh;
padding-bottom: 60rpx;
.select-item {
text-align: center;
height: 68rpx;
line-height: 68rpx;
opacity: 1;
border: 2rpx solid #dce0e6;
color: #292d33;
font-size: 28rpx;
border-radius: 8rpx;
&.checked {
border: 2rpx solid #292d33;
}
}
}
</style>
<template> <template>
<view class="container" @click="handleTouchStart"> <view class="container" @click="handleTouchStart">
<view :class="['home', { show: !id }]"> <view :class="['home', { show: !id }]">
<home-animation></home-animation>
<left-side :userInfo="userInfo" :tabIndex.sync="tabIndex" @changeTab="$emit('changeTab', $event)" @stopAudio="stopAudio" /> <left-side :userInfo="userInfo" :tabIndex.sync="tabIndex" @changeTab="$emit('changeTab', $event)" @stopAudio="stopAudio" />
<view class="right-side"> <view class="right-side">
<template v-if="tabIndex == 0"> <template v-if="tabIndex == 0">
...@@ -28,7 +27,7 @@ ...@@ -28,7 +27,7 @@
<slot name="detail" /> <slot name="detail" />
</view> </view>
<!-- 未点击开始接待,弹窗 --> <!-- 未点击开始接待,弹窗 -->
<MessageBox ref="previewRef" @confirm="$emit('preview')" :popupW="704" content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」" confirmBtnText="预览素材"></MessageBox> <MessageBox ref="previewRef" @confirm="$emit('preview')" :popupW="704" content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」" confirmBtnText="预览素材" @cancel="$emit('previewCancel')" @close="$emit('previewClose')"></MessageBox>
<!-- 停留弹框 --> <!-- 停留弹框 -->
<MessageBox ref="tipBox" @cancel="tipCancel" @confirm="tipConfirm" content="系统检测到您在当前页面停留较久,是否仍在客户接待中?" cancelBtnText="否" confirmBtnText="是"></MessageBox> <MessageBox ref="tipBox" @cancel="tipCancel" @confirm="tipConfirm" content="系统检测到您在当前页面停留较久,是否仍在客户接待中?" cancelBtnText="否" confirmBtnText="是"></MessageBox>
<!-- 退出弹框 --> <!-- 退出弹框 -->
...@@ -59,20 +58,17 @@ ...@@ -59,20 +58,17 @@
import RecordList from './components/RecordList.vue' import RecordList from './components/RecordList.vue'
import myClick from '@/mixin/click' import myClick from '@/mixin/click'
import uploader from '@/mixin/uploader.js' import uploader from '@/mixin/uploader.js'
import HomeAnimation from './components/HomeAnimation.vue'
import CustomerFile from './components/CustomerFile.vue' import CustomerFile from './components/CustomerFile.vue'
import LeftSide from './components/LeftSide.vue' import LeftSide from './components/LeftSide.vue'
import { Ws } from '@/ws/Ws.js'
import config from '@/config.js'
export default { export default {
mixins: [myClick, uploader], mixins: [myClick, uploader],
components: { RecordList, HomeAnimation, CustomerFile, LeftSide }, components: { RecordList, CustomerFile, LeftSide },
props: { props: {
id: [String, Number], id: [String, Number],
finishDoneText: String, finishDoneText: String,
finishContene: { finishContene: {
type: String, type: String,
default: '当前操作视为强制退出接待,若需正常流程完成接待请点击“完成接待”' default: '当前操作视为强制退出接待,若需正常流程完成接待请点击「完成接待」'
} }
}, },
data() { data() {
...@@ -99,13 +95,22 @@ export default { ...@@ -99,13 +95,22 @@ export default {
else return 'CustomerFile' else return 'CustomerFile'
} }
}, },
methods: { methods: {}
}
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.container { .container {
position: relative; position: relative;
&::after {
content: '';
position: absolute;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
background-image: url('@/assets/images/common/home-bg.webp');
background-size: 100% 100%;
}
.home, .home,
.detail { .detail {
position: fixed; position: fixed;
...@@ -143,6 +148,16 @@ export default { ...@@ -143,6 +148,16 @@ export default {
padding-top: 92rpx; padding-top: 92rpx;
height: 100vh; height: 100vh;
box-sizing: border-box; box-sizing: border-box;
position: relative;
animation: show-box 0.15s forwards;
}
@keyframes show-box {
0% {
left: 100%;
}
100% {
left: 0;
}
} }
.start { .start {
&-btn { &-btn {
......
...@@ -35,6 +35,12 @@ ...@@ -35,6 +35,12 @@
@blur="resetFocusIndex" @blur="resetFocusIndex"
:data-key="i.key" :data-key="i.key"
/> />
<customer-autocomplete
:showType="i.inputType"
:searchValue="customerInfo[i.key]"
:show="focusIndex == index"
@choose="chooseCustomer"
/>
<template v-if="i.unit"> <template v-if="i.unit">
<view class="unit">{{i.unit}}</view> <view class="unit">{{i.unit}}</view>
</template> </template>
...@@ -75,8 +81,9 @@ ...@@ -75,8 +81,9 @@
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import CarBrands from '@/components/CarBrands.vue' import CarBrands from '@/components/CarBrands.vue'
import InsuranceTable from './components/InsuranceTable.vue' import InsuranceTable from './components/InsuranceTable.vue'
import CustomerAutocomplete from '@/components/CustomerAutocomplete.vue'
export default { export default {
components: { CarBrands, InsuranceTable }, components: { CarBrands, InsuranceTable, CustomerAutocomplete },
props: { props: {
penSwitch: Boolean, penSwitch: Boolean,
show: Boolean, show: Boolean,
...@@ -178,6 +185,15 @@ export default { ...@@ -178,6 +185,15 @@ export default {
} }
} }
}, },
chooseCustomer (e) {
this.customerInfo = {
...this.customerInfo,
phoneNumber: e.ownerPhone,
customerName: e.ownerName,
carModel: e.brandModel
}
this.inputCustomer()
}
} }
} }
</script> </script>
......
...@@ -126,14 +126,10 @@ export default { ...@@ -126,14 +126,10 @@ export default {
handler (newval) { handler (newval) {
this.$refs.popupRef?.close() this.$refs.popupRef?.close()
this.flag = false this.flag = false
this.scrollTop = 1000 this.scrollTop = -1
setTimeout(() => { setTimeout(() => {
this.scrollTop = 0 this.scrollTop = 0
}, 100); }, 100);
}
},
show (n) {
if (n) {
const { storageKey } = this, const { storageKey } = this,
insuranceList = uni.getStorageSync(storageKey) insuranceList = uni.getStorageSync(storageKey)
if (insuranceList) { if (insuranceList) {
...@@ -141,6 +137,11 @@ export default { ...@@ -141,6 +137,11 @@ export default {
this.insuranceList = JSON.parse(JSON.stringify(insuranceList)) this.insuranceList = JSON.parse(JSON.stringify(insuranceList))
this.flag = true this.flag = true
} }
}
},
show (n) {
if (n) {
this.getMerchantInsuranceList() this.getMerchantInsuranceList()
} }
}, },
...@@ -258,8 +259,8 @@ export default { ...@@ -258,8 +259,8 @@ export default {
return processedString return processedString
}, },
choose(item, index) { choose (item, index) {
if(this.isPreview) return if (this.isPreview) return
this.insuranceList[index].checked = !item.checked this.insuranceList[index].checked = !item.checked
}, },
} }
......
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
export default { export default {
name: 'ReceptionSence', name: 'ReceptionSence',
props: { props: {
customerInfo:Object customerInfo: Object
}, },
data () { data () {
return { return {
list:[], list: [],
id:'' id: ''
} }
}, },
watch: { watch: {
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
watchCustomerInfo() { watchCustomerInfo () {
return this.customerInfo return this.customerInfo
}, },
}, },
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
}) })
.then((res) => { .then((res) => {
this.list = res || [] this.list = res || []
}).catch(err =>{ }).catch(err => {
this.list = [] this.list = []
}) })
}, },
...@@ -90,15 +90,15 @@ export default { ...@@ -90,15 +90,15 @@ export default {
.select-box { .select-box {
margin: 40rpx 0; margin: 40rpx 0;
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(4, 1fr);
gap: 20rpx; gap: 32rpx;
overflow-y: scroll; overflow-y: scroll;
max-height: 50vh; max-height: 50vh;
padding-bottom: 60rpx; padding-bottom: 60rpx;
.select-item { .select-item {
text-align: center; text-align: center;
height: 68rpx; height: 68rpx;
line-height: 68rpx; line-height: 44rpx;
opacity: 1; opacity: 1;
border: 2rpx solid #dce0e6; border: 2rpx solid #dce0e6;
color: #292d33; color: #292d33;
......
<template> <template>
<view class="tool-box"> <view class="tool-box" :style="toolStyle">
<view <view
:class="['btn', {hideIcon:!show}]" :class="['btn', {hideIcon:!show}]"
@click="show = false" @click="show = false"
...@@ -64,13 +64,27 @@ export default { ...@@ -64,13 +64,27 @@ export default {
idKey: { idKey: {
type: String, type: String,
default: 'id' default: 'id'
} },
toolStyle:String
}, },
data () { data () {
return { return {
show: true show: true
} }
}, },
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
watch: {
watchStatus: {
immediate: true,
handler (newval) {
this.show = true
}
},
},
methods: { methods: {
hide () { hide () {
this.show = true this.show = true
...@@ -97,7 +111,7 @@ export default { ...@@ -97,7 +111,7 @@ export default {
right: 40rpx; right: 40rpx;
top: calc(5% + 140rpx); top: calc(5% + 140rpx);
z-index: 998; z-index: 998;
width: 128rpx; width: 120rpx;
.btn { .btn {
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
......
const target = ["ip", "dev", "uat", "prod", "beta"]; const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 2; const index = 2
/** /**
* *
0本地 0本地
...@@ -12,110 +12,110 @@ const secretKey = { ...@@ -12,110 +12,110 @@ const secretKey = {
ip: {}, ip: {},
dev: { dev: {
sso: { sso: {
appKey: "8b31ae1009ccb0f96130ca4bd90e3d89", appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: "02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b", secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b'
}, }
}, },
uat: { uat: {
sso: { sso: {
appKey: "8b31ae1009ccb0f96130ca4bd90e3d89", appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: "02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b", secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b'
}, }
}, },
prod: { prod: {
sso: { sso: {
appKey: "8b31ae1009ccb0f96130ca4bd90e3d89", appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: "02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b", secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b'
}, }
}, },
beta: { beta: {
sso: { sso: {
appKey: "8b31ae1009ccb0f96130ca4bd90e3d89", appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: "02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b", secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b'
}, }
}, }
}[target[index]]; }[target[index]]
const domain = { const domain = {
// ip: 'http://192.168.2.94:8558', // ip: 'http://192.168.2.94:8558',
// ip: 'http://192.168.2.3:8315', // ip: 'http://192.168.2.3:8315',
ip: "http://192.168.1.170:8315", ip: 'http://192.168.1.170:8315',
/**登录: 192.168.2.3:8315 /**登录: 192.168.2.3:8315
商城: 192.168.2.3:8558 */ 商城: 192.168.2.3:8558 */
dev: "https://scrm.dev.glsx.com.cn", dev: 'https://scrm.dev.glsx.com.cn',
uat: "https://scrm.test.glsx.com.cn", uat: 'https://scrm.test.glsx.com.cn',
beta: "https://scrm.beta.glsx.com.cn", beta: 'https://scrm.beta.glsx.com.cn',
prod: "https://scrm.glsx.com.cn", prod: 'https://scrm.glsx.com.cn'
}[target[index]]; }[target[index]]
const djDomain = { const djDomain = {
ip: "http://192.168.2.59:8292", ip: 'http://192.168.2.59:8292',
// ip: 'http://192.168.2.80:8558', // ip: 'http://192.168.2.80:8558',
dev: "http://dj.dev.glsx.com.cn", dev: 'http://dj.dev.glsx.com.cn',
beta: "https://dj.beta.glsx.com.cn", //预发布 appid: wx9f91c1ec493eb425 beta: 'https://dj.beta.glsx.com.cn', //预发布 appid: wx9f91c1ec493eb425
uat: "https://dj.test.glsx.com.cn", //测试 appid: wxe10067a63c1856ac uat: 'https://dj.test.glsx.com.cn', //测试 appid: wxe10067a63c1856ac
prod: "https://dj.glsx.com.cn", prod: 'https://dj.glsx.com.cn',
pet: "https://cdptest.glsx.com.cn", //压测 appid: wx7ce755e425603084 pet: 'https://cdptest.glsx.com.cn' //压测 appid: wx7ce755e425603084
}[target[index]]; }[target[index]]
const merchantDomain = { const merchantDomain = {
ip: "http://rop-merchant.dev.glsx.com.cn", ip: 'http://rop-merchant.dev.glsx.com.cn',
dev: "http://rop-merchant.dev.glsx.com.cn", dev: 'http://rop-merchant.dev.glsx.com.cn',
beta: "https://rop-merchant.beta.glsx.com.cn", beta: 'https://rop-merchant.beta.glsx.com.cn',
uat: "https://rop-merchant.test.glsx.com.cn", uat: 'https://rop-merchant.test.glsx.com.cn',
prod: "https://commodity.glsx.com.cn", prod: 'https://commodity.glsx.com.cn',
pet: "", pet: ''
}[target[index]]; }[target[index]]
const djSecretKey = { const djSecretKey = {
ip: {}, ip: {},
dev: { dev: {
appKey: "48e5e13229b82c1b4e6e8c96151f0637", appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b", secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}, },
uat: { uat: {
appKey: "48e5e13229b82c1b4e6e8c96151f0637", appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b", secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}, },
beta: { beta: {
appKey: "48e5e13229b82c1b4e6e8c96151f0637", appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b", secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}, },
prod: { prod: {
appKey: "d7ffc3346fc9a45bccaaa35300d59022", appKey: 'd7ffc3346fc9a45bccaaa35300d59022',
secret: "4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353", secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
}, },
pet: { pet: {
appKey: "d7ffc3346fc9a45bccaaa35300d59022", appKey: 'd7ffc3346fc9a45bccaaa35300d59022',
secret: "4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353", secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
}, }
}[target[index]]; }[target[index]]
const pathEnum = { const pathEnum = {
sso: "/rop-scrm-sso/", sso: '/rop-scrm-sso/',
shopmall: "/rop-scrm-shopmall/", shopmall: '/rop-scrm-shopmall/',
coupon: "/rop-scrm-coupon/", coupon: '/rop-scrm-coupon/',
carlife: "/rop-scrm-carlife/", carlife: '/rop-scrm-carlife/',
live: "/rop-scrm-live/", live: '/rop-scrm-live/',
equity: "/rop-scrm-equity/", equity: '/rop-scrm-equity/',
entmicro: "/rop-scrm-entmicro/", entmicro: '/rop-scrm-entmicro/',
wechat: "/rop-scrm-wechat/", wechat: '/rop-scrm-wechat/',
boutiquecoupon: "/rop-scrm-boutiquecoupon/", boutiquecoupon: '/rop-scrm-boutiquecoupon/',
material: "/rop-scrm-marketing/", //素材 material: '/rop-scrm-marketing/', //素材
sop: "/rop-scrm-sop/", sop: '/rop-scrm-sop/',
customercollect: "/rop-scrm-bigdatautil/", customercollect: '/rop-scrm-bigdatautil/',
mindworkplate: "/rop-dj-smartcarlife/", mindworkplate: '/rop-dj-smartcarlife/',
drac: "/rop-scrm-entmicro/", drac: '/rop-scrm-entmicro/',
busassistant: "/rop-scrm-busassistant/", busassistant: '/rop-scrm-busassistant/',
boutique: "/rop-dj-car-boutique/", boutique: '/rop-dj-car-boutique/',
merchants: "/rop-merchants/", merchants: '/rop-merchants/'
}; }
const CONFIG_ENV_MAP = { const CONFIG_ENV_MAP = {
1: "develop", 1: 'develop',
2: "test", 2: 'test',
3: "production", 3: 'production',
4: "beta", 4: 'beta'
}; }
module.exports = { module.exports = {
index, index,
domain, domain,
...@@ -124,5 +124,5 @@ module.exports = { ...@@ -124,5 +124,5 @@ module.exports = {
env: CONFIG_ENV_MAP[index], env: CONFIG_ENV_MAP[index],
djDomain, djDomain,
merchantDomain, merchantDomain,
djSecretKey, djSecretKey
}; }
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!