Commit 198fed9f by 前端

Merge branch 'SAAS+V4.45' into 'master'

上线合并

See merge request !16
2 parents d76776f1 e99ced9e
Showing 56 changed files with 1265 additions and 761 deletions
...@@ -2,14 +2,15 @@ ...@@ -2,14 +2,15 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-07 17:09:53 * @Date: 2024-04-07 17:09:53
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-08-30 17:28:05 * @LastEditTime: 2024-09-24 11:01:24
* @FilePath: \gl_tape\App.vue * @FilePath: \gl_tape\App.vue
* @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>
const PATH = ['/pages/common/caseDetail'] 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 utils from '@/utils/utils'
export default { export default {
computed: { computed: {
...mapState('audio', ['isEnd', 'isStart']) ...mapState('audio', ['isEnd', 'isStart'])
...@@ -26,6 +27,26 @@ export default { ...@@ -26,6 +27,26 @@ export default {
}) })
}, },
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() { init() {
uni.addInterceptor('navigateTo', { uni.addInterceptor('navigateTo', {
//监听跳转 //监听跳转
...@@ -79,6 +100,7 @@ export default { ...@@ -79,6 +100,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();
......
/*
* @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
})
}
}; };
...@@ -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({
...@@ -47,11 +47,11 @@ class Request { ...@@ -47,11 +47,11 @@ class Request {
let header = let header =
RequestMethods === "POST" RequestMethods === "POST"
? { ? {
"content-type": "application/x-www-form-urlencoded", "content-type": "application/x-www-form-urlencoded",
} }
: { : {
"Cache-Control": "no-cache", "Cache-Control": "no-cache",
}; };
let projectName = params.projectName; let projectName = params.projectName;
if (!projectName) projectName = _this.getRopProject(params.method); if (!projectName) projectName = _this.getRopProject(params.method);
const path = pathEnum[projectName]; const path = pathEnum[projectName];
...@@ -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({
...@@ -97,13 +103,13 @@ class Request { ...@@ -97,13 +103,13 @@ class Request {
typeof error == "string" typeof error == "string"
? error ? error
: error.errMsg : error.errMsg
? error.errMsg ? error.errMsg
: JSON.stringify(error) || "系统异常", : JSON.stringify(error) || "系统异常",
icon: "error", icon: "error",
}); });
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);
}, },
}); });
......
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1310rpx 1044rpx;} .sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1310rpx 1044rpx;}
.icon-addr { width: 32rpx; height: 32rpx; background-position: -1165rpx -617rpx;} .icon-addr { width: 32rpx; height: 32rpx; background-position: -1165rpx -617rpx;}
.icon-aito { width: 320rpx; height: 36rpx; background-position: -830rpx -617rpx;} .icon-aito { width: 320rpx; height: 36rpx; background-position: -830rpx -617rpx;}
.icon-arrow-bottom { width: 48rpx; height: 48rpx; background-position: -765rpx -558rpx;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1212rpx -617rpx;} .icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1212rpx -617rpx;}
.icon-avatar { width: 96rpx; height: 96rpx; background-position: -635rpx -726rpx;} .icon-avatar { width: 96rpx; height: 96rpx; background-position: -635rpx -726rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -333rpx -853rpx;} .icon-back { width: 128rpx; height: 50rpx; background-position: -333rpx -853rpx;}
.icon-bao { width: 196rpx; height: 220rpx; background-position: -830rpx -382rpx;} .icon-bao { width: 196rpx; height: 220rpx; background-position: -830rpx -382rpx;}
.icon-boutique-config-0 { width: 44rpx; height: 44rpx; background-position: -476rpx -853rpx;}
.icon-boutique-config-1 { width: 44rpx; height: 44rpx; background-position: -535rpx -853rpx;}
.icon-boutique-config-2 { width: 44rpx; height: 44rpx; background-position: -594rpx -853rpx;}
.icon-byd { width: 184rpx; height: 36rpx; background-position: -1041rpx -557rpx;} .icon-byd { width: 184rpx; height: 36rpx; background-position: -1041rpx -557rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -1259rpx -617rpx;} .icon-change-account { width: 32rpx; height: 32rpx; background-position: -1259rpx -617rpx;}
.icon-clone { width: 24rpx; height: 24rpx; background-position: -781rpx -509rpx;} .icon-clone { width: 24rpx; height: 24rpx; background-position: -781rpx -509rpx;}
...@@ -23,34 +27,35 @@ ...@@ -23,34 +27,35 @@
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: -830rpx -191rpx;} .icon-first-nav { width: 464rpx; height: 176rpx; background-position: -830rpx -191rpx;}
.icon-home-active { width: 112rpx; height: 112rpx; background-position: -127rpx -726rpx;} .icon-home-active { width: 112rpx; height: 112rpx; background-position: -127rpx -726rpx;}
.icon-home { width: 112rpx; height: 112rpx; background-position: -254rpx -726rpx;} .icon-home { width: 112rpx; height: 112rpx; background-position: -254rpx -726rpx;}
.icon-icon-arrow { width: 32rpx; height: 32rpx; background-position: -1160rpx -668rpx;} .icon-icon-arrow { width: 32rpx; height: 32rpx; background-position: -1215rpx -668rpx;}
.icon-icon-close { width: 72rpx; height: 72rpx; background-position: -285rpx -964rpx;} .icon-icon-close { width: 72rpx; height: 72rpx; background-position: -285rpx -964rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1207rpx -668rpx;} .icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1262rpx -668rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -1254rpx -668rpx;} .icon-icon-male { width: 32rpx; height: 32rpx; background-position: -781rpx -415rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -781rpx -415rpx;} .icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -781rpx -462rpx;}
.icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -503rpx -415rpx;} .icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -503rpx -415rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -781rpx -462rpx;} .icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -653rpx -853rpx;}
.icon-invisible { width: 40rpx; height: 40rpx; background-position: -885rpx -668rpx;} .icon-info_shield { width: 40rpx; height: 40rpx; background-position: -885rpx -668rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -765rpx -621rpx;} .icon-invisible { width: 40rpx; height: 40rpx; background-position: -940rpx -668rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -476rpx -853rpx;} .icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -700rpx -853rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -523rpx -853rpx;} .icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -747rpx -853rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -570rpx -853rpx;} .icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -794rpx -853rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -841rpx -853rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -1041rpx -382rpx;} .icon-logo { width: 160rpx; height: 160rpx; background-position: -1041rpx -382rpx;}
.icon-mask-del { width: 80rpx; height: 80rpx; background-position: -95rpx -964rpx;} .icon-mask-del { width: 80rpx; height: 80rpx; background-position: -95rpx -964rpx;}
.icon-mask-edit { width: 80rpx; height: 80rpx; background-position: -190rpx -964rpx;} .icon-mask-edit { width: 80rpx; height: 80rpx; background-position: -190rpx -964rpx;}
.icon-no-insurance-data { width: 488rpx; height: 296rpx; background-position: 0rpx -415rpx;} .icon-no-insurance-data { width: 488rpx; height: 296rpx; background-position: 0rpx -415rpx;}
.icon-pause { width: 40rpx; height: 40rpx; background-position: -940rpx -668rpx;} .icon-pause { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: -646rpx -415rpx;} .icon-pen-active { width: 120rpx; height: 120rpx; background-position: -646rpx -415rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -503rpx -558rpx;} .icon-pen { width: 120rpx; height: 120rpx; background-position: -503rpx -558rpx;}
.icon-play { width: 40rpx; height: 40rpx; background-position: -995rpx -668rpx;} .icon-play { width: 40rpx; height: 40rpx; background-position: -1050rpx -668rpx;}
.icon-qr-success { width: 96rpx; height: 96rpx; background-position: -1190rpx -726rpx;} .icon-qr-success { width: 96rpx; height: 96rpx; background-position: -1190rpx -726rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -765rpx -558rpx;} .icon-qw { width: 48rpx; height: 48rpx; background-position: -765rpx -621rpx;}
.icon-record-active { width: 112rpx; height: 112rpx; background-position: -381rpx -726rpx;} .icon-record-active { width: 112rpx; height: 112rpx; background-position: -381rpx -726rpx;}
.icon-record { width: 112rpx; height: 112rpx; background-position: -508rpx -726rpx;} .icon-record { width: 112rpx; height: 112rpx; background-position: -508rpx -726rpx;}
.icon-scan { width: 32rpx; height: 32rpx; background-position: -617rpx -853rpx;} .icon-scan { width: 32rpx; height: 32rpx; background-position: -888rpx -853rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: 0rpx -853rpx;} .icon-scene-0 { width: 96rpx; height: 96rpx; background-position: 0rpx -853rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -111rpx -853rpx;} .icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -111rpx -853rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -1050rpx -668rpx;} .icon-search { width: 40rpx; height: 40rpx; background-position: -1105rpx -668rpx;}
.icon-second-nav { width: 480rpx; height: 176rpx; background-position: -830rpx 0rpx;} .icon-second-nav { width: 480rpx; height: 176rpx; background-position: -830rpx 0rpx;}
.icon-setting { width: 64rpx; height: 64rpx; background-position: -372rpx -964rpx;} .icon-setting { width: 64rpx; height: 64rpx; background-position: -372rpx -964rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -222rpx -853rpx;} .icon-store { width: 96rpx; height: 96rpx; background-position: -222rpx -853rpx;}
...@@ -58,5 +63,5 @@ ...@@ -58,5 +63,5 @@
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -451rpx -964rpx;} .icon-tool-file { width: 60rpx; height: 60rpx; background-position: -451rpx -964rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -526rpx -964rpx;} .icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -526rpx -964rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -601rpx -964rpx;} .icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -601rpx -964rpx;}
.icon-total { width: 32rpx; height: 32rpx; background-position: -664rpx -853rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -1105rpx -668rpx;}
\ No newline at end of file \ No newline at end of file
.icon-total { width: 32rpx; height: 32rpx; background-position: -935rpx -853rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -1160rpx -668rpx;}
\ No newline at end of file \ No newline at end of file
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

1.19 MB | W: | H:

1.2 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -75,14 +75,23 @@ export default { ...@@ -75,14 +75,23 @@ export default {
}, },
carBrand () { carBrand () {
return this.$store.state.user.customerInfo.carBrand return 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,9 +125,9 @@ export default { ...@@ -116,9 +125,9 @@ 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
this.selectItem = { this.selectItem = {
carBrand: e.brandName, carBrand: e.brandName,
...@@ -128,8 +137,9 @@ export default { ...@@ -128,8 +137,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({
...@@ -140,11 +150,11 @@ export default { ...@@ -140,11 +150,11 @@ export default {
brandId: e.brandId, brandId: e.brandId,
childBrandId: 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
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
@click="close" @click="close"
>取消</view> >取消</view>
<view <view
class="btn" :class="['btn',{disabled:component_chooseList.length == 0}]"
@click="choose" @click="choose"
>确定</view> >确定</view>
</view> </view>
...@@ -105,6 +105,7 @@ export default { ...@@ -105,6 +105,7 @@ 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.component_chooseList.length == 0) return
this.$emit('select', this.component_chooseList) this.$emit('select', this.component_chooseList)
this.close(); this.close();
} }
...@@ -186,5 +187,8 @@ export default { ...@@ -186,5 +187,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
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
:key="index" :key="index"
> >
<view :class="['label',{required:i.required}]">{{ i.label }}</view> <view :class="['label',{required:i.required}]">{{ i.label }}</view>
<view :class="['value', { error: showError(i.key) && i.required },{disabled:customerType == 0}]"> <view :class="['value', { error: showError(i.key) && i.required },{disabled:customerType == 0 || i.disabled}]">
<template v-if="i.type == 'input'"> <template v-if="i.type == 'input'">
<input <input
:type="i.inputType" :type="i.inputType"
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<template v-else> <template v-else>
<view <view
:class="['select', `${formData[i.key]? '' : 'placeholder'}`]" :class="['select', `${formData[i.key]? '' : 'placeholder'}`]"
@click="showPopup(i.popKey)" @click="showPopup(i)"
> >
{{ formData[i.key] || i.placeholder }} {{ formData[i.key] || i.placeholder }}
<uni-icons <uni-icons
...@@ -109,8 +109,8 @@ const formObject_boutique = [{ ...@@ -109,8 +109,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 +118,8 @@ const formObject_boutique = [{ ...@@ -118,7 +118,8 @@ const formObject_boutique = [{
key: "carModel", key: "carModel",
type: "select", type: "select",
popKey: "carBrandListVisible", popKey: "carBrandListVisible",
placeholder: '请选择品牌车型' placeholder: '请选择品牌车型',
disabled: true
}, },
{ {
label: "车主电话", label: "车主电话",
...@@ -126,7 +127,7 @@ const formObject_boutique = [{ ...@@ -126,7 +127,7 @@ const formObject_boutique = [{
type: "input", type: "input",
inputType: "tel", inputType: "tel",
maxlength: 11, maxlength: 11,
placeholder: '请输入电话', placeholder: '请输入车主电话',
required: true required: true
}, },
{ {
...@@ -161,7 +162,7 @@ export default { ...@@ -161,7 +162,7 @@ export default {
type: "input", type: "input",
inputType: "text", inputType: "text",
maxlength: 50, maxlength: 50,
placeholder: '请输入姓名', placeholder: '请输入车主姓名',
required: true required: true
}, },
{ {
...@@ -170,7 +171,7 @@ export default { ...@@ -170,7 +171,7 @@ export default {
type: "input", type: "input",
inputType: "tel", inputType: "tel",
maxlength: 11, maxlength: 11,
placeholder: '请输入电话', placeholder: '请输入车主电话',
required: true required: true
}, },
{ {
...@@ -221,7 +222,7 @@ export default { ...@@ -221,7 +222,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 +246,10 @@ export default { ...@@ -245,10 +246,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 +267,13 @@ export default { ...@@ -266,7 +267,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) {
......
...@@ -465,7 +465,7 @@ export default { ...@@ -465,7 +465,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;
} }
...@@ -633,7 +633,7 @@ export default { ...@@ -633,7 +633,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 +652,7 @@ export default { ...@@ -652,7 +652,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 +661,12 @@ export default { ...@@ -661,11 +661,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%);
......
...@@ -182,6 +182,8 @@ export default { ...@@ -182,6 +182,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))
......
<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
...@@ -424,7 +424,7 @@ export default { ...@@ -424,7 +424,7 @@ export default {
} }
} }
.record-content { .record-content {
padding: 96rpx 0; padding: 96rpx 0 80rpx;
.data-container { .data-container {
background: #ffffff; background: #ffffff;
border-radius: 48rpx; border-radius: 48rpx;
...@@ -479,12 +479,12 @@ export default { ...@@ -479,12 +479,12 @@ export default {
} }
} }
.record-list { .record-list {
height: calc(100% - 248rpx); height: calc(100% - 242rpx);
position: relative; position: relative;
z-index: 4; z-index: 4;
} }
.type-1 { .type-1 {
height: calc(100% - 128rpx); height: calc(100% - 126rpx);
margin-top: -48rpx; margin-top: -48rpx;
.list { .list {
padding-top: 48rpx; padding-top: 48rpx;
...@@ -679,12 +679,13 @@ export default { ...@@ -679,12 +679,13 @@ export default {
width: 184rpx; width: 184rpx;
height: 76rpx; height: 76rpx;
justify-content: center; justify-content: center;
font-weight: 500; font-size: 28rpx;
font-size: 32rpx; color: #1f2133b3;
color: #1f2133;
z-index: 10; z-index: 10;
} }
.active { .active {
color: #1f2133;
font-weight: 500;
} }
.active-btn { .active-btn {
position: absolute; position: absolute;
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<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() {
...@@ -56,24 +57,6 @@ export default { ...@@ -56,24 +57,6 @@ export default {
} }
}); });
}, },
/** 比较版本号的大小
**/
compareVersions(version1, version2) {
const v1 = version1.split('.').map(v => +v) // 转化成数字数组
const v2 = version2.split('.').map(v => +v)
const b1 = v1.every(v => !isNaN(v)) // 判断数组的每一项是否是数字
const b2 = v2.every(v => !isNaN(v)) // 如果不是则返回错误信息
if (!b1 || !b2) return '版本号错误,只能包含数字、.'
const len = Math.max(v1.length, v2.length)
for (let i = 0; i < len; i++) {
const num1 = v1[i] || 0
const num2 = v2[i] || 0
if (num1 > num2) return 1 // 如果版本号1大于版本号2,则输出1
if (num1 < num2) return -1 // 反之则输出 -1
}
// 如果版本号1 等于版本号2,则输出0
return 0
},
async handleCheck() { async handleCheck() {
const { const {
...@@ -81,7 +64,7 @@ export default { ...@@ -81,7 +64,7 @@ export default {
tempFileURL, tempFileURL,
version version
} = uni.$storage.get('mock_data') } = uni.$storage.get('mock_data')
const res = this.compareVersions(this.version,version) const res = utils.compareVersions(this.version,version)
if(res > -1) { if(res > -1) {
uni.showToast({ uni.showToast({
title: '目前已是最新版本', title: '目前已是最新版本',
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
@click="handleTouchStart" @click="handleTouchStart"
> >
<view :class="['home', { show: !id }]"> <view :class="['home', { show: !id }]">
<home-animation></home-animation>
<left-side <left-side
:userInfo="userInfo" :userInfo="userInfo"
:tabIndex.sync="tabIndex" :tabIndex.sync="tabIndex"
...@@ -55,6 +54,9 @@ ...@@ -55,6 +54,9 @@
:popupW="704" :popupW="704"
content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」" content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」"
confirmBtnText="预览素材" confirmBtnText="预览素材"
@cancel="$emit('previewCancel')"
@close="$emit('previewClose')"
></MessageBox> ></MessageBox>
<!-- 停留弹框 --> <!-- 停留弹框 -->
<MessageBox <MessageBox
...@@ -105,18 +107,17 @@ ...@@ -105,18 +107,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';
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 () {
...@@ -149,6 +150,16 @@ export default { ...@@ -149,6 +150,16 @@ export default {
<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;
......
<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
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name" : "展业助手", "name" : "展业助手",
"appid" : "__UNI__D3BD3DF", "appid" : "__UNI__D3BD3DF",
"description" : "", "description" : "",
"versionName" : "1.6.0", "versionName" : "1.9.0",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
......
...@@ -16,7 +16,7 @@ const UPLOAD_STATUS = { ...@@ -16,7 +16,7 @@ const UPLOAD_STATUS = {
import { mapMutations, mapState } from 'vuex' import { mapMutations, mapState } from 'vuex'
import utils from '@/utils/utils.js' import utils from '@/utils/utils.js'
export default { export default {
data() { data () {
return { return {
voicePath: '', voicePath: '',
timer: null, timer: null,
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
reaction: 1 reaction: 1
} }
}, },
mounted() { mounted () {
// 获取当前页面栈数组 // 获取当前页面栈数组
const pages = getCurrentPages() const pages = getCurrentPages()
const currentPage = pages[pages.length - 1] const currentPage = pages[pages.length - 1]
...@@ -38,23 +38,23 @@ export default { ...@@ -38,23 +38,23 @@ export default {
...mapState('audio', ['receptionStatus', 'booksList', 'audioInfo']), ...mapState('audio', ['receptionStatus', 'booksList', 'audioInfo']),
...mapState(['user.customerInfo']) ...mapState(['user.customerInfo'])
}, },
created() { created () {
console.log('created') console.log('created')
}, },
onHide() { onHide () {
console.log('隐藏') console.log('隐藏')
// recorderManager.stop(); // recorderManager.stop();
// recorderManager.start({ // recorderManager.start({
// duration: 10000, // duration: 10000,
// }); // });
}, },
onShow() { onShow () {
// console.log(utils.requestAndroidPermission()); // console.log(utils.requestAndroidPermission());
}, },
methods: { methods: {
...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setAudioInfo']), ...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setAudioInfo']),
// //关闭提示 // //关闭提示
tipCancel() { tipCancel () {
this.stopAudio() this.stopAudio()
this.setReceptionStatus(0) this.setReceptionStatus(0)
this.setAudioInfo({ endReasonType: 1 }) this.setAudioInfo({ endReasonType: 1 })
...@@ -67,11 +67,11 @@ export default { ...@@ -67,11 +67,11 @@ export default {
} }
}, },
//结束提示 //结束提示
tipConfirm() { tipConfirm () {
this.times = 0 this.times = 0
this.$refs.tipBox?.close() this.$refs.tipBox?.close()
}, },
closeAudio() { closeAudio () {
this.times = 0 this.times = 0
clearInterval(this.timer) clearInterval(this.timer)
this.timer = null this.timer = null
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
this.setReceptionStatus(0) this.setReceptionStatus(0)
this.setAudioInfo({ endReasonType: 1 }) this.setAudioInfo({ endReasonType: 1 })
}, },
getParams() { getParams () {
const { shopMerchantId, phone, sceneType, uuid, name, merchantId, channelType, merchantName } = uni.$storage.get('userInfo'), const { shopMerchantId, phone, sceneType, uuid, name, merchantId, channelType, merchantName } = uni.$storage.get('userInfo'),
{ customerName, phoneNumber, salesUuid, carModel, staffName } = this.$store.state.user.customerInfo, { customerName, phoneNumber, salesUuid, carModel, staffName } = this.$store.state.user.customerInfo,
receptionCustomerPaySourceList = this.booksList.map(item => { receptionCustomerPaySourceList = this.booksList.map(item => {
...@@ -91,27 +91,39 @@ export default { ...@@ -91,27 +91,39 @@ export default {
}), }),
{ receptionStartTime, receptionEndTime, endReasonType } = this.audioInfo, { receptionStartTime, receptionEndTime, endReasonType } = this.audioInfo,
{ deviceId: appCode } = uni.getDeviceInfo(), { deviceId: appCode } = uni.getDeviceInfo(),
params = { receptionTrack = this.$store.state.user.receptionTrack,
receptionCustomerMaterialPointList = []
Object.keys(receptionTrack).map(key => {
receptionCustomerMaterialPointList.push({
...receptionTrack[key],
merchantId: shopMerchantId,
businessScene: sceneType,
staffUuid: uuid, staffUuid: uuid,
staffName: name, staffName: name,
serviceMerchantId: merchantId, })
carModel, })
endReasonType, //原因 1.异常 0.正常 let params = {
customerName, staffUuid: uuid,
phoneNumber, staffName: name,
appCode, serviceMerchantId: merchantId,
loginPhone: phone, carModel,
salesName: staffName, endReasonType, //原因 1.异常 0.正常
salesUuid, customerName,
receptionStatus: this.receptionStatus, //接待结果 1.成交 0.战败 phoneNumber,
receptionStartTime, appCode,
receptionEndTime, loginPhone: phone,
receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径 salesName: staffName,
merchantId: shopMerchantId, salesUuid,
merchantName, receptionStatus: this.receptionStatus, //接待结果 1.成交 0.战败
bussinessType: sceneType == 0 ? 1 : 2, // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改 receptionStartTime,
channelType: channelType || 1 //1问界 2 比亚迪 3 其他 receptionEndTime,
} receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
merchantId: shopMerchantId,
merchantName,
bussinessType: sceneType == 0 ? 1 : 2, // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
channelType: channelType || 1, //1问界 2 比亚迪 3 其他
receptionCustomerMaterialPointList
}
return params return params
}, },
/** /**
...@@ -119,7 +131,7 @@ export default { ...@@ -119,7 +131,7 @@ export default {
* @param {旧的文件路径} oldFilePath * @param {旧的文件路径} oldFilePath
* @param {新的文件名} newFileName * @param {新的文件名} newFileName
*/ */
RenameFile(oldFilePath, newFileName) { RenameFile (oldFilePath, newFileName) {
plus.io.resolveLocalFileSystemURL(oldFilePath, entry => { plus.io.resolveLocalFileSystemURL(oldFilePath, entry => {
entry.getParent(_oldFile => { entry.getParent(_oldFile => {
entry.moveTo(_oldFile, '/' + newFileName, newFilePath => { entry.moveTo(_oldFile, '/' + newFileName, newFilePath => {
...@@ -178,7 +190,7 @@ export default { ...@@ -178,7 +190,7 @@ export default {
this.handleSave(newFilePath) this.handleSave(newFilePath)
}) })
}, 300), }, 300),
handleSave(file) { handleSave (file) {
const audioList = [...this.audioInfo.audioList, file] const audioList = [...this.audioInfo.audioList, file]
if (file) { if (file) {
this.setAudioInfo({ audioList }) this.setAudioInfo({ audioList })
...@@ -190,7 +202,7 @@ export default { ...@@ -190,7 +202,7 @@ export default {
this.setAudioInfo({ endReasonType: 0, audioStatus: 'finish' }) this.setAudioInfo({ endReasonType: 0, audioStatus: 'finish' })
}, },
/**保存记录*/ /**保存记录*/
async saveRecord() { async saveRecord () {
const params = this.getParams() const params = this.getParams()
const unlock = await uni.$recordManager.lock() const unlock = await uni.$recordManager.lock()
const path = await utils.getFileSaveFolderOnClient() const path = await utils.getFileSaveFolderOnClient()
...@@ -256,7 +268,7 @@ export default { ...@@ -256,7 +268,7 @@ export default {
recorderManager.stop() recorderManager.stop()
}, 1500), }, 1500),
//监听点击事件 //监听点击事件
initTime() { initTime () {
if (this.audioInfo.audioStatus != 'start') return if (this.audioInfo.audioStatus != 'start') return
this.timer = setInterval(() => { this.timer = setInterval(() => {
// console.log(this.times); // console.log(this.times);
...@@ -268,11 +280,11 @@ export default { ...@@ -268,11 +280,11 @@ export default {
} }
}, 1000 * 10) }, 1000 * 10)
}, },
handleTouchStart() { handleTouchStart () {
this.times = 0 this.times = 0
} }
}, },
beforeCreate() { beforeCreate () {
clearInterval(this.timer) clearInterval(this.timer)
this.timer = null this.timer = null
} }
......
import loginMixin from './loginMixin' import loginMixin from './loginMixin'
import receptionTrackMixin from './receptionTrackMixin'
module.exports = { module.exports = {
loginMixin loginMixin,
receptionTrackMixin
} }
export default {
watch: {
id: {
immediate: true,
handler (key) {
if (!key || this.type == 'preview') return
let item = this.media.find(e => e.id == key),
value = this.receptionTrack[key]
if (value) {
value.openCount += 1
value.entryTime = Date.now()
} else {
value = {
openCount: 1,
materialName: item.detailTitle,
materialId: item.id,
stayDuration: 0,
entryTime: Date.now()
}
}
this.$store.dispatch("setReceptionTrack", { key, value })
}
}
},
computed: {
receptionTrack () {
return this.$store.state.user.receptionTrack
}
},
methods: {
receptionTrackLeave (keyName = 'id') {
if (this.type == 'preview') return
let key = this[keyName],
value = this.receptionTrack[key]
value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value })
if (keyName == 'id' && key == 1) {
let [receptionRef] = this.$refs.media1
receptionRef.previewLeave && receptionRef.previewLeave(receptionRef.currentItem)
}
}
}
}
\ No newline at end of file \ No newline at end of file
<template> <template>
<view class="container"> <view class="container" @click="hideSelect">
<view class="bg"></view> <view class="bg"></view>
<view class="box"> <view class="box">
<view class="select-box">
<view class="select" @click.stop="selectType">
{{selectIndex}}
<view class="sprite-icon icon-arrow-bottom"></view>
</view>
<view class="pop-box" v-show="isSelect">
<view v-for="i in selectList" :key="i.label" class="type-item" :class="i.value == selectIndex ? 'active' : ''" @click="chooseType(i)">{{i.label}}</view>
<!-- <view class="type-item active">全部</view>
<view class="type-item">视频</view>
<view class="type-item">图片</view>
<view class="type-item">PDF</view> -->
</view>
</view>
<view class="input-box"> <view class="input-box">
<input <input
type="text" type="text"
...@@ -11,14 +24,15 @@ ...@@ -11,14 +24,15 @@
@blur="input($event)" @blur="input($event)"
@focus="focus" @focus="focus"
/> />
<view class="input-tips" v-if="!isSearch" <view
>搜索图片/视频名称<uni-icons class="input-tips"
v-if="!isSearch"
>搜索图片/视频名称<uni-icons
type="search" type="search"
class="icon" class="icon"
color="#999" color="#999"
size="20" size="20"
></uni-icons ></uni-icons></view>
></view>
<uni-icons <uni-icons
v-if="isSearch" v-if="isSearch"
type="closeempty" type="closeempty"
...@@ -29,63 +43,105 @@ ...@@ -29,63 +43,105 @@
></uni-icons> ></uni-icons>
</view> </view>
<scroll-view class="record-box" scroll-y> <scroll-view
class="record-box"
scroll-y
:scroll-top="scrollTop"
>
<view class="list"> <view class="list">
<template v-if="list.length"> <template v-if="list.length">
<template v-for="item in list"> <template v-for="item in list">
<view class="item" :key="item.id"> <view
<view class="item-autio" @click="playVideo(item)"> class="item"
<image :src="item.coverUrl" class="cover-box"></image> :key="item.id"
>
<view
class="item-autio"
@click="playVideo(item)"
>
<image
:src="item.thumbnailUrl"
class="cover-box"
></image>
<image <image
v-if="item.sourceType == 2" v-if="item.materialFormat == 1"
src="../../assets/images/boutique/play.png" src="../../assets/images/boutique/play.png"
class="play-box" class="play-box"
></image> ></image>
</view> </view>
<view class="item-desc">{{ item.tabName }}</view> <view class="item-desc">{{ item.name }}</view>
</view> </view>
</template> </template>
</template> </template>
<template v-else> <template v-else>
<view class="nothing flex"> <view class="nothing flex">
<image class="icon" src="../../assets/images/home/nothing.webp" /> <image
class="icon"
src="../../assets/images/home/nothing.webp"
/>
暂无数据 暂无数据
</view> </view>
</template> </template>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view class="popup-box" v-if="popupShow"> <view
class="popup-box"
v-if="popupShow"
>
<view class="nav-bar"> <view class="nav-bar">
<view class="back" @click="back"> <view
<uni-icons type="left" :size="24" color="#fff"></uni-icons> class="back"
@click="back"
>
<uni-icons
type="left"
:size="24"
color="#fff"
></uni-icons>
</view> </view>
<view class="title">{{ title }}</view> <view class="title">{{ title }}</view>
</view> </view>
<view class="popup-body"> <view class="popup-body">
<video ref="videoPlayer" :src="videoSrc" controls></video> <video
ref="videoPlayer"
:src="videoSrc"
controls
></video>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import utils from "@/utils/utils";
export default { export default {
name: '', name: 'case',
data () { data () {
return { return {
name:'', name: '',
list: [], list: [],
popupShow:false, searchList: [],
isSearch:false, popupShow: false,
videoSrc: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4', isSearch: false,
videoSrc: '',
isSelect: false,
selectIndex: '全部',
selectList: [
{
label: '全部',
value: '全部'
},
],
scrollTop: 0
} }
}, },
props: { props: {
views: { views: {
type: Array, type: Array,
default: () => [] default: () => []
} },
show: Boolean
}, },
computed: { computed: {
watchStatus () { watchStatus () {
...@@ -93,42 +149,96 @@ export default { ...@@ -93,42 +149,96 @@ export default {
}, },
}, },
watch: { watch: {
watchStatus:{ watchStatus: {
handler() { handler(val) {
this.name = ''; this.selectIndex = '全部'
this.isSearch = false // console.log(val)
this.list = this.views // this.name = '';
// this.isSearch = false
// this.list = this.views
// this.init()
},
immediate: true
},
show: {
handler(newValue) {
if(newValue) this.init()
}, },
immediate:true immediate:true
} }
}, },
mounted() {
this.init()
this.getCategory()
},
methods: { methods: {
playVideo(item) { playVideo (item) {
const {tabName,sourceType,detailUrl} = item this.$emit('preview',item)
uni.navigateTo({
url: `/pages/boutique/preview?tabName=${tabName}&sourceType=${sourceType}&detailUrl=${detailUrl}`
})
}, },
focus() { focus () {
this.isSearch = true this.isSearch = true
}, },
init() { init () {
this.name = ''; this.name = '';
this.isSelect = false
setTimeout(() => { setTimeout(() => {
this.isSearch = false this.isSearch = false
this.list = this.views // this.list = this.views
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex)
}, 300); }, 300);
}, },
handleClear() { handleClear () {
this.init() this.name = ''
this.isSearch = false
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex)
}, },
input(e) { input(e) {
this.name = e.detail.value this.name = e.detail.value
if(this.name == '') if (this.name == '')
this.isSearch = false this.isSearch = false
this.list = this.views.filter(i=>i.tabName.includes(this.name)) // this.list = this.searchList.filter(i => i.name.includes(this.name))
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex, this.name)
},
selectType() {
this.isSelect = !this.isSelect
},
hideSelect() {
this.isSelect = false
},
chooseType(val) {
console.log(val)
this.selectIndex = val.value
this.isSelect = false
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex, this.name)
}, },
async getCaseList(category = '', name = '') {
const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; // 44217687
const params = { merchantId: shopMerchantId, category }
if (name) params.materialName = name
const res = await uni.$api.boutiqueApi.getCaseList(params)
console.log(res)
this.list = res.list
this.searchList = res.list
this.scrollTop = 1
setTimeout(() => {
this.scrollTop = 0
}, 100);
},
async getCategory() {
const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo;
const res = await uni.$api.boutiqueApi.getCategory({ merchantId: shopMerchantId })
console.log(res)
const _list = res.map(item => {
return {
label: item,
value: item
}
})
this.selectList = [...this.selectList, ..._list]
}
}, },
} }
</script> </script>
...@@ -146,13 +256,49 @@ export default { ...@@ -146,13 +256,49 @@ export default {
height: 800rpx; height: 800rpx;
position: absolute; position: absolute;
left: 0; left: 0;
background-image: url("../../assets/images/boutique/record-bg.png"); background-image: url('../../assets/images/boutique/record-bg.png');
background-size: 100% 100%; background-size: 100% 100%;
top: 0; top: 0;
} }
.box { .box {
padding: 64rpx; padding: 64rpx;
margin-top: 90rpx; margin-top: 90rpx;
position: relative;
.select-box {
position: absolute;
right: 24rpx;
top: -18rpx;
z-index: 1;
.select {
display: flex;
align-items: center;
justify-content: flex-end;
margin-bottom: 8rpx;
}
.arrow-bottom {
width: 48rpx;
height: 48rpx;
}
.pop-box {
width: 368rpx;
// height: 248rpx;
background: #FFFFFF;
border-radius: 16rpx;
padding: 16rpx 0;
.type-item {
padding: 0 24rpx;
margin-bottom: 8rpx;
height: 48rpx;
line-height: 48rpx;
&:last-child {
margin-bottom: 0;
}
&.active {
background-color: #ECF1FF;
}
}
}
}
.input-box { .input-box {
position: relative; position: relative;
.input { .input {
...@@ -224,11 +370,19 @@ export default { ...@@ -224,11 +370,19 @@ export default {
} }
} }
.item-desc { .item-desc {
height: 140rpx; // height: 140rpx;
padding: 24rpx 28rpx; padding: 24rpx 28rpx;
font-size: 32rpx; font-size: 32rpx;
color: #333333; color: #333333;
border-radius: 48rpx; border-radius: 48rpx;
text-align: center;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2; // 控制多行的行数
-webkit-box-orient: vertical;
padding-bottom: 0;
} }
} }
} }
......
<template>
<view
class="picture"
v-show="!!detailUrl"
>
<template v-if="isLoading">
<div class="loadding">
<image
class="gif"
src="../../../assets/images/boutique/loadding.gif"
/>
资源加载中
</div>
</template>
<image
class="detail-img"
:src="detailUrl"
mode="widthFix"
@load="load"
/>
</view>
</template>
<script type="text/ecmascript-6">
export default {
name: 'Picture',
props: {
imgUrl: {
type: String,
default: '',
}
},
data () {
return {
detailUrl: '',
isLoading: true
}
},
watch: {
imgUrl (val) {
this.detailUrl = val
this.isLoading = true
}
},
methods: {
load(e) {
this.isLoading = false
}
},
}
</script>
<style scoped lang="scss">
.picture {
font-size: 0;
position: absolute;
top: 0;
width: 100%;
z-index: 998;
min-height: 100vh;
background-color: #fff;
}
.nav-bar {
position: fixed;
width: 100%;
height: 96rpx;
left: 0;
top: 48rpx;
z-index: 9;
display: flex;
align-items: center;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
}
.title {
width: 100%;
text-align: center;
}
}
.detail-img {
width: 100%;
height: auto;
object-fit: cover;
}
.loadding {
font-size: 12px;
color: #999;
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
overflow: hidden;
.gif {
width: 64rpx;
height: 64rpx;
margin-bottom: 32rpx;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<uni-popup
ref="qr"
type="center"
:is-mask-click="false"
animation
class="qrPopup"
>
<view class="box">
<template v-if="count > 0">
<view class="icon-close-box count">{{count}}</view>
</template>
<template v-else>
<view
class="icon-close-box flex"
@click="close"
>
<uni-icons
class="icon-close"
type="closeempty"
:size="16"
color="#1A1A1A"
></uni-icons>
</view>
</template>
<view class="content flex">
<view class="title flex">
<view class="sprite-icon icon-scan"></view>
请让客户扫码领取
</view>
<template v-if="received">
<view class="received flex">
<view class="sprite-icon icon-qr-success"></view>
<view class="received-title">客户领券成功</view>
<view class="received-text">车主已领取该礼券,请前往客户邀约列表查看</view>
</view>
</template>
<template v-else>
<view class="qr-box">
<image :src="url" />
</view>
</template>
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'QRBox',
props: {
url: {
type: String,
default: '',
},
received: Boolean
},
data () {
return {
count: 4
}
},
mounted () {
},
methods: {
open () {
this.$refs.qr.open();
this.count = 3
this.countDown()
},
close () {
this.$refs.qr.close();
this.$emit('close')
},
countDown(){
setTimeout(() => {
if(this.count > 0){
this.count--
this.countDown()
}
}, 1000)
}
}
}
</script>
<style scoped lang='scss'>
.qrPopup {
z-index: 99 !important;
}
.box {
width: 1040rpx;
height: 800rpx;
background: #ffffff;
border-radius: 48rpx;
position: relative;
.icon-close-box {
position: absolute;
padding: 48rpx;
top: 0;
right: 0;
}
.count{
color: #999999;
}
.content {
flex-direction: column;
.title {
padding: 80rpx 0 48rpx;
font-weight: 500;
font-size: 32rpx;
color: #333333;
.sprite-icon {
margin-right: 12rpx;
}
}
.qr-box {
width: 560rpx;
height: 560rpx;
background: #ffffff;
box-shadow: 0 0 24rpx 0 #0000001a;
border-radius: 32rpx;
padding: 40rpx;
box-sizing: border-box;
image {
width: 100%;
height: 100%;
vertical-align: top;
}
}
.received {
width: 560rpx;
height: 560rpx;
background: #f9f9f9;
border-radius: 32rpx;
flex-direction: column;
justify-content: center;
&-title {
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin: 16rpx 0 48rpx;
}
&-text {
font-size: 28rpx;
color: #666666;
margin: 0 56rpx;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<uni-popup
ref="riskInformed"
type="center"
:is-mask-click="false"
animation
class="risk-popup"
>
<view class="box">
<view
class="icon-close-box flex"
@click="close"
>
<uni-icons
class="icon-close"
type="closeempty"
:size="16"
color="#fff"
></uni-icons>
</view>
<image
class="img"
:src="popupImg"
/>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'RiskInformedBox',
props: {
popupImg: String
},
data () {
return {
}
},
mounted () {
},
methods: {
open () {
this.$refs.riskInformed.open();
},
close () {
this.$refs.riskInformed.close();
},
}
}
</script>
<style scoped lang='scss'>
.risk-popup {
z-index: 99 !important;
}
.box {
width: 1862rpx;
height: 1176rpx;
background: #ffffff;
border-radius: 48rpx;
position: relative;
.icon-close-box {
position: absolute;
top: 32rpx;
right: 48rpx;
width: 48rpx;
height: 48rpx;
justify-content: center;
border-radius: 100%;
background: rgb(121, 123, 127);
z-index: 2;
}
.img {
width: 100%;
height: 100%;
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -18,27 +18,35 @@ ...@@ -18,27 +18,35 @@
color="#000" color="#000"
></uni-icons> ></uni-icons>
</view> </view>
<view class="title">{{ title }}</view> <view
class="title"
v-if="id != 1"
>{{ title }}</view>
</view> </view>
<template v-for="(item, index) in media"> <template v-for="(item, index) in media">
<view <view
:class="['view', { showView: id == item.sort }]" :class="['view', { showView: id == item.id }]"
:key="index" :key="index"
> >
<component <component
:is="componentName(item.sort)" :is="item.componentName"
:views="item.receptionSourceDetailList || []" :views="item.receptionSourceDetailList || []"
:ref="'media' + item.sort" :ref="'media' + item.id"
:title="item.detailTitle || ''" :title="item.detailTitle || ''"
:madiaId="item.sort" :madiaId="item.id"
:customerType="customerType" :customerType="customerType"
@jumpPage="jumpPage" @jumpPage="jumpPage"
:show="id == item.sort" :show="id == item.id"
@reception="reception" @reception="reception"
:tabId="tabId"
:currentCar="currentCar"
:type="type"
:popupImg="item.popupImg"
@preview="onPreview"
/> />
</view> </view>
</template> </template>
<template v-if="type != 'preview'"> <template v-if="showTool()">
<tool-box <tool-box
ref="toolRef" ref="toolRef"
:data="toolList" :data="toolList"
...@@ -46,7 +54,7 @@ ...@@ -46,7 +54,7 @@
@choose="choose" @choose="choose"
@finish="open" @finish="open"
:id="id" :id="id"
idKey="sort" toolStyle="top:calc(50% - 160rpx);"
/> />
</template> </template>
<finish-step <finish-step
...@@ -56,6 +64,14 @@ ...@@ -56,6 +64,14 @@
:customerType="customerType" :customerType="customerType"
@back="backInvitation" @back="backInvitation"
/> />
<picture-box :imgUrl="currentImgUrl($refs.media1)" />
<preview
ref="preview"
isComponents
:show.sync="showPreview"
:mediaObject="mediaObject"
@previewBack="onPreviewBack"
/>
</view> </view>
</template> </template>
<script> <script>
...@@ -67,6 +83,9 @@ import { mapMutations } from "vuex"; ...@@ -67,6 +83,9 @@ import { mapMutations } from "vuex";
import invitation from "./invitation.vue"; import invitation from "./invitation.vue";
import Case from "./case.vue"; import Case from "./case.vue";
import history from "./history.vue"; import history from "./history.vue";
import { receptionTrackMixin } from '@/mixin/index.js'
import PictureBox from './components/Picture.vue'
import preview from './preview.vue'
export default { export default {
components: { components: {
ToolBox, ToolBox,
...@@ -75,7 +94,9 @@ export default { ...@@ -75,7 +94,9 @@ export default {
Reception, Reception,
invitation, invitation,
Case, Case,
history history,
PictureBox,
preview
}, },
props: { props: {
id: [String, Number], id: [String, Number],
...@@ -85,66 +106,66 @@ export default { ...@@ -85,66 +106,66 @@ export default {
default: "preview", default: "preview",
}, },
customerType: Number, customerType: Number,
historyId: [Number, String] toolList: Array,
tabId: Number,
currentCar: String
}, },
mixins: [receptionTrackMixin],
data () { data () {
return { return {
showPreview: false,
mediaObject: null
}; };
}, },
watch: {
},
computed: { computed: {
title () { title () {
let { id } = this, let { id } = this,
name = this.media.find((e) => e.sort == id)?.detailTitle || ""; name = this.media.find((e) => e.id == id)?.detailTitle || "";
return name; return name;
}, },
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus; return this.$store.state.user.historyStatus;
}, },
toolList () { receptionTrack () {
return JSON.parse(JSON.stringify(this.media)).sort(function (a, b) { return this.$store.state.user.receptionTrack
return a.shortSort - b.shortSort },
}) watchCustomerInfo () {
} return this.$store.state.user.customerInfo
},
},
mounted () {
}, },
mounted () { },
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
componentName (id) {
let name = "";
if ([2, 4, 5].includes(id)) name = "membranes";
else
name = {
1: "reception",
7: "invitation",
3: "Case",
6: 'history'
}[id];
return name;
},
open () { open () {
this.$refs.stepRef.open(); this.$refs.stepRef.open();
}, },
/**切换素材 */ /**切换素材 */
choose (e) { choose (e) {
if (this.id == 1) this.$refs.media1[0].closeAllPopup(); Object.keys(this.$refs).map(refKey => {
this.jumpPage({ id: e.sort }) let ref = this.$refs[refKey];
if (ref) {
if (Array.isArray(ref)) ref = ref[0]
ref.closeAllPopup && ref.closeAllPopup()
}
})
this.receptionTrackLeave()
this.jumpPage({ id: e.id })
}, },
back () { back () {
if (this.historyId) {
this.jumpPage({ id: this.historyId })
this.$emit('update:historyId', '')
return
}
this.$refs?.toolRef?.hide(); this.$refs?.toolRef?.hide();
this.$emit("back"); this.$emit("back");
}, },
done (e) { done (e) {
this.$refs.toolRef.hide(); this.$refs.toolRef.hide();
this.$refs.stepRef.close(); this.$refs.stepRef.close();
this.receptionTrackLeave()
this.$emit("done", e); this.$emit("done", e);
this.clearCustomerReceivedTimer()
}, },
jumpPage ({ id, historyId }) { jumpPage ({ id }) {
this.$emit('update:historyId', historyId || '')
this.$emit("update:id", Number(id)); this.$emit("update:id", Number(id));
}, },
/**回店客户 */ /**回店客户 */
...@@ -159,24 +180,94 @@ export default { ...@@ -159,24 +180,94 @@ export default {
}); });
return return
} }
this.$store.dispatch('setCustomerInfo', { let customer = {
customerName: item.customerName, customerName: item.customerName,
carModel: item.carSeriesName, carModel: item.carSeriesName,
phoneNumber: item.customerPhone, phoneNumber: item.customerPhone,
salesUuid: item.userId, salesUuid: item.userId,
staffName: item.employeeName, staffName: item.employeeName,
receiveCouponDate: item.receiveCouponDate receiveCouponDate: item.receiveCouponDate,
}) customerCouponId: item.customerCouponId
this.$emit('reception') }
let [reception] = this.$refs.media1
reception?.clearCustomerReceivedTimer()
this.$emit('reception', customer)
}, },
backInvitation () { backInvitation () {
this.jumpPage({ id: 7 }) this.jumpPage({ id: 3 })
setTimeout(() => { setTimeout(() => {
uni.showToast({ uni.showToast({
title: '请选择回店客户', title: '请选择回店客户',
icon: 'none' icon: 'none'
}) })
}, 1e3) }, 1e3)
},
clearCustomerReceivedTimer () {
let [reception] = this.$refs.media1
reception?.clearCustomerReceivedTimer()
reception?.clearSkuState()
},
currentImgUrl (receptionRef) {
return receptionRef ? receptionRef[0].currentImgUrl : ''
},
onPreview (item) {
const { materialUrl, materialFormat, name, id, materialType } = item
this.mediaObject = {
...item,
tabName: name,
sourceType: materialFormat == 1 ? 2 : 1,
detailUrl: materialUrl
}
this.showPreview = true
if (this.type == 'preview') return
let key = `case-${materialFormat}-${id}`,
value = this.receptionTrack[key]
if (value) {
value.openCount += 1
value.entryTime = Date.now()
} else {
value = {
openCount: 1,
materialName: name,
materialId: id,
stayDuration: 0,
entryTime: Date.now(),
materialType
}
}
this.$store.dispatch("setReceptionTrack", { key, value })
},
onPreviewBack () {
this.showPreview = false
if (this.type == 'preview') return this.mediaObject = null
const { materialFormat, id } = this.mediaObject,
key = `case-${materialFormat}-${id}`,
value = this.receptionTrack[key]
value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value })
this.mediaObject = null
},
hidePicture () {
let [receptionRef] = this.$refs.media1,
flag = false
if (this.id == 1 && receptionRef.currentImgUrl) {
receptionRef.showPicture(false)
flag = true
}
if (this.id == 4 && this.mediaObject) {
this.onPreviewBack()
flag = true
}
return flag
},
showTool () {
let { type, watchCustomerInfo, customerType } = this
let flag = false
if (type != 'preview') {
flag = true
if (customerType == 0 && !watchCustomerInfo.phoneNumber) flag = false
}
return flag
} }
}, },
}; };
...@@ -191,13 +282,15 @@ export default { ...@@ -191,13 +282,15 @@ export default {
height: 96rpx; height: 96rpx;
left: 0; left: 0;
top: 48rpx; top: 48rpx;
z-index: 9; z-index: 999;
pointer-events: none;
.back { .back {
height: 100%; height: 100%;
aspect-ratio: 1/1; aspect-ratio: 1/1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
pointer-events: auto;
} }
.title { .title {
position: absolute; position: absolute;
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
:class="['tab flex', { active: groupIndex == item.id }]" :class="['tab flex', { active: groupIndex == item.id }]"
:key="index" :key="index"
@click="changeIndex(item.id)" @click="changeIndex(item.id)"
>{{ item.text }}</view >{{ item.text }}</view>
>
</template> </template>
<view :class="['active-btn', `active-btn-${groupIndex - 1}`]"></view> <view :class="['active-btn', `active-btn-${groupIndex - 1}`]"></view>
</view> </view>
...@@ -57,7 +56,10 @@ ...@@ -57,7 +56,10 @@
/> />
</view> </view>
<template v-for="(k, ind) in itemObject"> <template v-for="(k, ind) in itemObject">
<view class="info flex" :key="ind"> <view
class="info flex"
:key="ind"
>
<view class="label">{{ k.label }}</view> <view class="label">{{ k.label }}</view>
<view :class="{ value: true, bold: k.isBold }">{{ <view :class="{ value: true, bold: k.isBold }">{{
k.format k.format
...@@ -79,9 +81,7 @@ ...@@ -79,9 +81,7 @@
</view> </view>
<view class="info flex"> <view class="info flex">
<view class="label">实收金额</view> <view class="label">实收金额</view>
<view class="value bold" <view class="value bold">¥ <text>{{ item.totalPrice.toFixed(2) }}</text></view>
>¥ <text>{{ item.totalPrice.toFixed(2) }}</text></view
>
</view> </view>
</view> </view>
</view> </view>
...@@ -118,8 +118,16 @@ ...@@ -118,8 +118,16 @@
</view> </view>
</view> </view>
<view class="tabel-container"> <view class="tabel-container">
<table class="tabel-box" cellspacing="0" border="0" cellpadding="0"> <table
<tr v-for="i in goodsList" :key="i.id"> class="tabel-box"
cellspacing="0"
border="0"
cellpadding="0"
>
<tr
v-for="i in goodsList"
:key="i.id"
>
<td>{{ i.goodsName }}</td> <td>{{ i.goodsName }}</td>
<td>{{ i.goodsPositionName || "-" }}</td> <td>{{ i.goodsPositionName || "-" }}</td>
<td>{{ i.number }}</td> <td>{{ i.number }}</td>
...@@ -134,80 +142,93 @@ ...@@ -134,80 +142,93 @@
import dayjs from 'dayjs' import dayjs from 'dayjs'
import Record from "@/mixin/record"; import Record from "@/mixin/record";
export default { export default {
name: '', name: '',
mixins:[Record], mixins: [Record],
props: { props: {
show: Boolean show: Boolean
}, },
data() { data () {
return { return {
imageUrl: require('@/assets/images/noviceGuide/step1-1.webp'), groupIndex: 1,
groupIndex:1, goodsList: [],
goodsList:[], name: '',
name: '', dateList: [
dateList: [ { text: '车窗膜', id: 1 },
{ text: '车窗膜',id:1 }, { text: '其他精品', id: 2 }
{ text: '其他精品',id:2 } ],
], itemObject: [
itemObject: [ { label: '车架号', key: 'standNo' },
{ label: '车架号', key: 'standNo' }, { label: '工单号', key: 'orderCode' },
{ label: '工单号', key: 'orderCode' }, { label: '交易流水号', key: 'outTradeNo' },
{ label: '交易流水号', key: 'outTradeNo' }, { label: '订单时间', key: 'orderTime', format: true },
{ label: '订单时间', key: 'orderTime',format:true }, { label: '销售顾问', key: 'employeeName' }
{ label: '销售顾问', key: 'employeeName' } ],
], }
} },
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
}, },
watch:{ },
show: { watch: {
handler() { show: {
this.changeIndex(1,true) handler (newValue) {
}, if (newValue) this.changeIndex(1, true)
immediate:true },
} immediate: true
}, },
methods: { watchStatus: {
formatTime(val,key) { immediate: true,
return dayjs(val).format("YYYY-MM-DD HH:mm:ss") handler (newval) {
this.closeAllPopup()
}
}, },
//下拉分页
pageonReachBottom() {
let { pageNum, total, nothing, pageSize } = this
if (!nothing) nothing = 'nothing'
if (Math.ceil(total / pageSize) > pageNum) {
this.pageNum += 1
this.getRecordList()
} else this.nothing = true
},
handleLook(data) {
this.$refs.historyRef.open()
this.goodsList = data
},
changeIndex(index,isStart=false) {
if (this.groupIndex == index && !isStart) return
this.flag = false
this.nothing = false
this.total = 0
this.list = []
this.pageNum = 1
this.groupIndex = index
this.getRecordList()
},
getRecordList() {
const { pageNum, pageSize,groupIndex } = this,
userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo;
this.getList('historyDealOrderPage',{
merchantIds: [shopMerchantId],
sceneTypes:[1],
pageNum,
pageSize,
goodsTypeGroup:groupIndex
})
} },
methods: {
closeAllPopup () {
this.$refs.historyRef?.close()
},
formatTime (val, key) {
return dayjs(val).format("YYYY-MM-DD HH:mm:ss")
},
//下拉分页
pageonReachBottom () {
let { pageNum, total, nothing, pageSize } = this
if (!nothing) nothing = 'nothing'
if (Math.ceil(total / pageSize) > pageNum) {
this.pageNum += 1
this.getRecordList()
} else this.nothing = true
}, },
handleLook (data) {
this.$refs.historyRef.open()
this.goodsList = data
},
changeIndex (index, isStart = false) {
if (this.groupIndex == index && !isStart) return
this.flag = false
this.nothing = false
this.total = 0
this.list = []
this.pageNum = 1
this.groupIndex = index
this.getRecordList()
},
getRecordList () {
const { pageNum, pageSize, groupIndex } = this,
userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo;
this.getList('historyDealOrderPage', {
merchantIds: [shopMerchantId],
sceneTypes: [1],
pageNum,
pageSize,
goodsTypeGroup: groupIndex
})
}
},
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
...@@ -225,7 +246,7 @@ export default { ...@@ -225,7 +246,7 @@ export default {
height: 800rpx; height: 800rpx;
position: absolute; position: absolute;
left: 0; left: 0;
background-image: url("../../assets/images/boutique/record-bg.png"); background-image: url('../../assets/images/boutique/record-bg.png');
background-size: 100% 100%; background-size: 100% 100%;
top: 0; top: 0;
} }
...@@ -284,7 +305,7 @@ export default { ...@@ -284,7 +305,7 @@ export default {
border-radius: 370rpx; border-radius: 370rpx;
left: 0; left: 0;
top: 0; top: 0;
content: ""; content: '';
} }
.tab { .tab {
...@@ -420,11 +441,7 @@ export default { ...@@ -420,11 +441,7 @@ export default {
right: 0; right: 0;
width: 350rpx; width: 350rpx;
height: 100%; height: 100%;
background: linear-gradient( background: linear-gradient(to left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
to left,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 100%
);
} }
.info { .info {
margin-top: 16rpx; margin-top: 16rpx;
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
</view> </view>
<MessageBox <MessageBox
ref="receptionTips" ref="receptionTips"
content="是否接待当前客户,确定接待直接进入\n「精品加装服务说明」" content="是否接待当前客户,确定接待直接进入\n「车型加装选购页」"
cancelBtnText="取消" cancelBtnText="取消"
confirmBtnText="确定接待" confirmBtnText="确定接待"
@confirm="jumpPage" @confirm="jumpPage"
...@@ -109,8 +109,8 @@ export default { ...@@ -109,8 +109,8 @@ export default {
}, },
watch:{ watch:{
show:{ show:{
handler() { handler(val) {
this.init() if(val) this.init()
this.$refs.receptionTips?.close() this.$refs.receptionTips?.close()
}, },
immediate:true immediate:true
......
<template> <template>
<view class="popup-box"> <view
class="popup-box"
v-if="popupShow"
>
<view class="nav-bar"> <view class="nav-bar">
<view class="back" @click="back"> <view
<uni-icons type="left" :size="20" color="#fff"></uni-icons> class="back"
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#fff"
></uni-icons>
</view> </view>
<view class="title">{{ title }}</view> <view class="title">{{ title }}</view>
</view> </view>
<view class="popup-body"> <view class="popup-body">
<video ref="videoPlayer" :src="detailUrl" controls v-if="sourceType == 2"></video> <video
<view class="img-detail" v-else><image @click="back" :src="detailUrl" :style="{ width: width + 'px' }" /></view> ref="videoPlayer"
:src="detailUrl"
controls
v-if="sourceType == 2"
></video>
<view
class="img-detail"
v-else
>
<image
@click="back"
:src="detailUrl"
:style="{ width: width + 'px' }"
/>
</view>
</view> </view>
</view> </view>
</template> </template>
<script type="text/ecmascript-6"> <script type="text/ecmascript-6">
import report from "@/mixin/report.js"; import report from "@/mixin/report.js";
export default { export default {
props: {
isComponents: Boolean,
show: Boolean,
mediaObject: Object
},
data () { data () {
return { return {
width:0, width: 0,
title: '11', title: '',
sourceType: '', sourceType: '',
detailUrl: '' detailUrl: ''
} }
}, },
mixins:[report], watch:{
onLoad (options) { show:{
const {tabName,sourceType,detailUrl} = options immediate: true,
this.title = tabName handler (n) {
this.sourceType = sourceType if (n) {
this.detailUrl = detailUrl console.log(this.mediaObject)
const _this = this this.init(this.mediaObject)
uni.getImageInfo({ }
src: detailUrl, // 替换为你的图片路径
success (img) {
uni.createSelectorQuery().select('.img-detail').boundingClientRect(function(rect) {
_this.width = rect.height*img.height/img.width
}).exec();
},
fail: function (error) {
console.error('获取图片信息失败:', error);
} }
}); }
},
computed: {
popupShow () {
let status = true
if (this.isComponents) status = this.show
return status
},
},
mixins: [report],
onLoad (options) {
this.init(options)
}, },
methods: { methods: {
back() { init (options) {
uni.navigateBack() const { tabName, sourceType, detailUrl } = options
} this.title = tabName
this.sourceType = sourceType
this.detailUrl = detailUrl
const _this = this
uni.getImageInfo({
src: detailUrl, // 替换为你的图片路径
success (img) {
uni.createSelectorQuery().select('.img-detail').boundingClientRect(function (rect) {
_this.width = rect.height * img.height / img.width
}).exec();
},
fail: function (error) {
console.error('获取图片信息失败:', error);
}
});
},
back () {
if (this.isComponents) this.$emit('previewBack')
else uni.navigateBack()
},
} }
} }
</script> </script>
...@@ -59,7 +110,7 @@ export default { ...@@ -59,7 +110,7 @@ export default {
height: 100vh; height: 100vh;
background: #000; background: #000;
padding: 60rpx 0rpx; padding: 60rpx 0rpx;
z-index: 100; z-index: 999;
.nav-bar { .nav-bar {
width: 100%; width: 100%;
height: 96rpx; height: 96rpx;
......
<template> <template>
<view class="detail-box"> <view
class="detail-box"
@click="closeToolTip"
>
<view class="nav-bar"> <view class="nav-bar">
<view class="back" @click="back"> <view
<uni-icons type="left" :size="20" color="#000"></uni-icons> class="back"
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view> </view>
车主详情 车主详情
</view> </view>
...@@ -10,27 +20,60 @@ ...@@ -10,27 +20,60 @@
<view class="title">车主信息</view> <view class="title">车主信息</view>
<view class="customer-info"> <view class="customer-info">
<template v-for="(item, index) in customerForm"> <template v-for="(item, index) in customerForm">
<view class="item flex" :key="index"> <view
class="item flex"
:key="index"
>
<view class="label">{{ item.label }}</view> <view class="label">{{ item.label }}</view>
<view class="value text-hide">{{ customerInfo[item.key] }}</view> <view
class="value text-hide"
:id="item.key"
>
{{ customerInfo[item.key] }}
</view>
<template v-if="item.showTooltipIcon">
<view
class="sprite-icon icon-customer-detail"
@click.stop="showTooltipBox(item)"
></view>
<view
class="tooltip-box"
v-if="item.showTooltip"
@click.stop
> {{ customerInfo[item.key] }}</view>
</template>
</view> </view>
</template> </template>
</view> </view>
</view> </view>
<view class="case-box box"> <view class="case-box box">
<view class="title flex">推荐套餐</view> <view class="title flex">推荐套餐</view>
<scroll-view class="case-scroll-box" scroll-y @scrolltolower="pageonReachBottom"> <scroll-view
class="case-scroll-box"
scroll-y
@scrolltolower="pageonReachBottom"
>
<view class="case-list"> <view class="case-list">
<template v-if="flag"> <template v-if="flag">
<template v-if="list.length && list[0] && list[0].length"> <template v-if="list.length && list[0] && list[0].length">
<template v-for="i in list"> <template v-for="i in list">
<template v-for="item in i"> <template v-for="item in i">
<view class="case-item" :key="item.id" @click="jumpDetail(item)"> <view
<image class="img" :src="item.cover"></image> class="case-item"
:key="item.id"
@click="jumpDetail(item)"
>
<image
class="img"
:src="item.cover"
></image>
<view class="case-info"> <view class="case-info">
<view class="case-name text-hide">{{ item.title }}</view> <view class="case-name text-hide">{{ item.title }}</view>
<template v-for="(j, ind) in caseInfo"> <template v-for="(j, ind) in caseInfo">
<view class="case-text flex" :key="ind"> <view
class="case-text flex"
:key="ind"
>
<view class="case-label">{{ j.label }}:</view> <view class="case-label">{{ j.label }}:</view>
<view :class="['case-value', j.class]"> <view :class="['case-value', j.class]">
<template v-if="j.format"> <template v-if="j.format">
...@@ -49,7 +92,7 @@ ...@@ -49,7 +92,7 @@
</template> </template>
<template v-else> <template v-else>
<view class="nothing flex"> <view class="nothing flex">
<image class="icon" src="@/assets/images/home/nothing.webp" /> <view class="icon"></view>
暂无推荐套餐 暂无推荐套餐
</view> </view>
</template> </template>
...@@ -101,6 +144,7 @@ export default { ...@@ -101,6 +144,7 @@ export default {
{ {
label: '客户标签', label: '客户标签',
key: 'customerTagName', key: 'customerTagName',
hasTooltip: true
}], }],
caseInfo: [ caseInfo: [
{ {
...@@ -136,7 +180,7 @@ export default { ...@@ -136,7 +180,7 @@ export default {
total: 0, total: 0,
flag: false, flag: false,
nothing: false, nothing: false,
pageSize: 8, pageSize: 8
} }
}, },
onLoad (options) { onLoad (options) {
...@@ -164,11 +208,15 @@ export default { ...@@ -164,11 +208,15 @@ export default {
async findVisitsInfo (id) { async findVisitsInfo (id) {
const customerInfo = await uni.$api.customerApi.findVisitsInfo({ const customerInfo = await uni.$api.customerApi.findVisitsInfo({
id id
}) }),
{ customerForm } = this
customerInfo.customerTagName = customerInfo.customerTagName.replace(/,/g, '|') customerInfo.customerTagName = customerInfo.customerTagName.replace(/,/g, '|')
customerInfo.arrivalDate = dayjs(customerInfo.arrivalDate).format("YYYY.MM.DD") customerInfo.arrivalDate = dayjs(customerInfo.arrivalDate).format("YYYY.MM.DD")
this.customerInfo = customerInfo this.customerInfo = customerInfo
this.getMaterialResponsePage() this.getMaterialResponsePage()
this.$nextTick(() => {
this.checkTextWidth(customerForm.find(e => e.hasTooltip))
})
}, },
showPopup () { showPopup () {
this.arrowPopup = true this.arrowPopup = true
...@@ -198,7 +246,6 @@ export default { ...@@ -198,7 +246,6 @@ export default {
showChannel: 2, showChannel: 2,
scene: sceneType scene: sceneType
} }
console.log(params)
const { list, total } = await uni.$api.customerApi.getMaterialResponsePage(params) const { list, total } = await uni.$api.customerApi.getMaterialResponsePage(params)
uni.hideLoading() uni.hideLoading()
list.map(e => { list.map(e => {
...@@ -220,7 +267,6 @@ export default { ...@@ -220,7 +267,6 @@ export default {
this.$forceUpdate() this.$forceUpdate()
} catch (error) { } catch (error) {
uni.hideLoading() uni.hideLoading()
console.log(error)
this.flag = true this.flag = true
} }
}, },
...@@ -261,6 +307,25 @@ export default { ...@@ -261,6 +307,25 @@ export default {
this.getMaterialResponsePage() this.getMaterialResponsePage()
} else this.nothing = true } else this.nothing = true
}, },
checkTextWidth (item) {
if (!item) return
let query = uni.createSelectorQuery().in(this)
query.select(`#${item.key}`).boundingClientRect((data) => {
if (data.width > 410) item.showTooltipIcon = true
this.$forceUpdate()
}).exec()
},
showTooltipBox (item) {
item.showTooltip = !item.showTooltip
this.$forceUpdate()
},
closeToolTip () {
let item = this.customerForm.find(e => e.hasTooltip)
if (item.showTooltipIcon) {
item.showTooltip = false
this.$forceUpdate()
}
}
} }
} }
</script> </script>
...@@ -338,17 +403,19 @@ export default { ...@@ -338,17 +403,19 @@ export default {
.customer-box { .customer-box {
height: 292rpx; height: 292rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
position: relative;
z-index: 2;
.customer-info { .customer-info {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding: 0 48rpx; padding: 0 48rpx;
gap: 12rpx 38rpx;
.item { .item {
width: 50%; width: 1042rpx;
flex-shrink: 0; flex-shrink: 0;
font-size: 28rpx; font-size: 28rpx;
margin-bottom: 12rpx;
line-height: 44rpx; line-height: 44rpx;
position: relative;
.label { .label {
color: #292d3399; color: #292d3399;
width: 160rpx; width: 160rpx;
...@@ -357,6 +424,25 @@ export default { ...@@ -357,6 +424,25 @@ export default {
.value { .value {
color: #292d33; color: #292d33;
} }
.icon-customer-detail {
flex-shrink: 0;
margin-left: 16rpx;
}
.tooltip-box {
position: absolute;
right: 0;
top: 60rpx;
width: 792rpx;
background: #ffffffcc;
box-shadow: inset 0 0 16rpx 0 #ffffff;
border-radius: 16rpx;
backdrop-filter: blur(8rpx);
box-sizing: border-box;
padding: 24rpx 28rpx;
font-size: 28rpx;
color: #292d33;
line-height: 44rpx;
}
} }
} }
} }
...@@ -417,6 +503,8 @@ export default { ...@@ -417,6 +503,8 @@ export default {
width: 676rpx; width: 676rpx;
height: 284rpx; height: 284rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
background-image: url('@/assets/images/home/nothing.webp');
background-size: 100% 100%;
} }
} }
.end-text { .end-text {
......
...@@ -91,7 +91,7 @@ import FinishStep from '@/components/FinishStep.vue'; ...@@ -91,7 +91,7 @@ import FinishStep from '@/components/FinishStep.vue';
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import informationEntry from './components/informationEntry.vue' import informationEntry from './components/informationEntry.vue'
import insurance from '@/components/Insurance/Insurance.vue' import insurance from '@/components/Insurance/Insurance.vue'
import {receptionTrackMixin} from '@/mixin/index.js'
export default { export default {
components: { components: {
ToolBox, ToolBox,
...@@ -114,6 +114,7 @@ export default { ...@@ -114,6 +114,7 @@ export default {
}, },
toolList: Array toolList: Array
}, },
mixins: [receptionTrackMixin],
data () { data () {
return { return {
drawStatus: false, drawStatus: false,
...@@ -150,7 +151,8 @@ export default { ...@@ -150,7 +151,8 @@ export default {
isByd () { isByd () {
const { channelType } = uni.$storage.get("userInfo") const { channelType } = uni.$storage.get("userInfo")
return channelType == 2 return channelType == 2
} },
}, },
watch: { watch: {
watchStatus: { watchStatus: {
...@@ -178,6 +180,7 @@ export default { ...@@ -178,6 +180,7 @@ export default {
ref.closeAllPopup && ref.closeAllPopup() ref.closeAllPopup && ref.closeAllPopup()
} }
}) })
this.receptionTrackLeave()
this.$emit('update:id', e.id) this.$emit('update:id', e.id)
}, },
back () { back () {
...@@ -188,6 +191,7 @@ export default { ...@@ -188,6 +191,7 @@ export default {
this.showPayPage = false this.showPayPage = false
this.$refs.toolRef.hide() this.$refs.toolRef.hide()
this.$refs.stepRef.close() this.$refs.stepRef.close()
this.receptionTrackLeave()
this.$emit('done', e) this.$emit('done', e)
}, },
toPay () { toPay () {
...@@ -203,7 +207,7 @@ export default { ...@@ -203,7 +207,7 @@ export default {
} }
}, },
touchEnd (e) { touchEnd (e) {
if(this.modeName) return if (this.modeName) return
try { try {
let { toolList, drawStatus, startX, screenWidth, id, scaleValueObject, productModelStatus } = this let { toolList, drawStatus, startX, screenWidth, id, scaleValueObject, productModelStatus } = this
if (!e || !e.changedTouches || drawStatus || toolList.length == 0 || e.changedTouches.length === 0) return if (!e || !e.changedTouches || drawStatus || toolList.length == 0 || e.changedTouches.length === 0) return
...@@ -216,6 +220,7 @@ export default { ...@@ -216,6 +220,7 @@ export default {
if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1 && !productModelStatus) { if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1 && !productModelStatus) {
const { nextId, modeName } = this.getNextId(index, toolList, startX, halfScreenWidth) const { nextId, modeName } = this.getNextId(index, toolList, startX, halfScreenWidth)
this.modeName = modeName this.modeName = modeName
this.receptionTrackLeave()
this.$emit('update:id', nextId) this.$emit('update:id', nextId)
setTimeout(() => { setTimeout(() => {
this.modeName = '' this.modeName = ''
...@@ -243,7 +248,8 @@ export default { ...@@ -243,7 +248,8 @@ export default {
scale (e) { scale (e) {
let { id } = this let { id } = this
this.scaleValueObject[id] = e this.scaleValueObject[id] = e
} },
}, },
}; };
......
...@@ -182,11 +182,12 @@ export default { ...@@ -182,11 +182,12 @@ export default {
uni.$api.systemApi.updateMockData({ uni.$api.systemApi.updateMockData({
moduleList, moduleList,
toolList, toolList,
}, ['moduleList', 'toolList'],'byd_mock_data') }, ['moduleList', 'toolList'], 'byd_mock_data')
this.setViewInfo(moduleList, toolList) this.setViewInfo(moduleList, toolList)
} else { } else {
let { moduleList, toolList, let { moduleList, toolList,
default_moduleList, default_toolList, default_moduleList, default_toolList,
boutiqueDefaultCarBrandId
} = await uni.$api.systemApi.getMockData(true) } = await uni.$api.systemApi.getMockData(true)
if (this.channelType == 3) { if (this.channelType == 3) {
/**其他品牌 */ /**其他品牌 */
...@@ -220,6 +221,7 @@ export default { ...@@ -220,6 +221,7 @@ export default {
moduleList, moduleList,
toolList toolList
}, ["moduleList", 'toolList']) }, ["moduleList", 'toolList'])
this.$store.state.user.boutiqueDefaultCarBrandId = boutiqueDefaultCarBrandId
this.setViewInfo(moduleList, toolList) this.setViewInfo(moduleList, toolList)
} }
} }
...@@ -269,6 +271,7 @@ export default { ...@@ -269,6 +271,7 @@ export default {
this.type = ""; this.type = "";
this.setReceptionStatus(e); this.setReceptionStatus(e);
this.$store.dispatch("clearHistory") this.$store.dispatch("clearHistory")
this.$store.dispatch('clearReceptionTrack')
}, 1500); }, 1500);
}, },
back () { back () {
...@@ -296,6 +299,7 @@ export default { ...@@ -296,6 +299,7 @@ export default {
this.$store.dispatch("clearCustomerInfo"); this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory"); this.$store.dispatch("clearHistory");
this.$refs.home.setBooks([]); this.$refs.home.setBooks([]);
this.$store.dispatch('clearReceptionTrack')
}, },
openStep () { openStep () {
this.$refs.home.finishRef.close(); this.$refs.home.finishRef.close();
......
...@@ -24,6 +24,13 @@ export default { ...@@ -24,6 +24,13 @@ export default {
employeeList: [], employeeList: [],
paymentType: [], paymentType: [],
haveCustomerAccess: false, haveCustomerAccess: false,
boutiqueMediaConfig: {
M5: [],
M7: [],
M9: []
},
receptionTrack: {}, //接待记录埋点
boutiqueDefaultCarBrandId: ''
}; };
}, },
mutations: { mutations: {
...@@ -72,5 +79,12 @@ export default { ...@@ -72,5 +79,12 @@ export default {
setEmployeeList ({ state }, value) { setEmployeeList ({ state }, value) {
state.employeeList = value; state.employeeList = value;
}, },
setReceptionTrack ({ state }, { key, value }) {
state.receptionTrack[key] = value
// console.log(JSON.parse(JSON.stringify(state.receptionTrack)))
},
clearReceptionTrack ({ state }) {
state.receptionTrack = {}
},
}, },
}; };
...@@ -70,4 +70,13 @@ ...@@ -70,4 +70,13 @@
.byd-layout { .byd-layout {
background-image: url('@/assets/images/media/byd-media-bg.webp'); background-image: url('@/assets/images/media/byd-media-bg.webp');
}
@media screen and (min-width: 500px){
.fixforpc-width{
min-width: auto !important;
width: fit-content !important;
padding: 20rpx 46rpx !important;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -21,5 +21,6 @@ export const STORAGE_OBJECTkEY = { ...@@ -21,5 +21,6 @@ export const STORAGE_OBJECTkEY = {
recordSuccessList: "recordSuccessList", recordSuccessList: "recordSuccessList",
historyList: "historyList", historyList: "historyList",
storageVersion: "storageVersion", storageVersion: "storageVersion",
byd_mock_data:'byd_mock_data' byd_mock_data:'byd_mock_data',
boutique_mock_data:'boutique_mock_data'
}; };
/* /*
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-08 17:16:46 * @Date: 2024-04-08 17:16:46
* @LastEditors: limin * @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-07-02 09:32:33 * @LastEditTime: 2024-09-23 17:40:40
* @FilePath: \gl_tape\utils\utils.js * @FilePath: \gl_tape\utils\utils.js
* @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
*/ */
function convertDateTimeFormat(dateTimeStr, separator = "-") { function convertDateTimeFormat(dateTimeStr, separator = '-') {
const date = new Date(dateTimeStr); const date = new Date(dateTimeStr)
const year = date.getFullYear(); const year = date.getFullYear()
const month = ("0" + (date.getMonth() + 1)).slice(-2); // 月份是从0开始的 const month = ('0' + (date.getMonth() + 1)).slice(-2) // 月份是从0开始的
const day = ("0" + date.getDate()).slice(-2); const day = ('0' + date.getDate()).slice(-2)
const hours = ("0" + date.getHours()).slice(-2); const hours = ('0' + date.getHours()).slice(-2)
const minutes = ("0" + date.getMinutes()).slice(-2); const minutes = ('0' + date.getMinutes()).slice(-2)
const seconds = ("0" + date.getSeconds()).slice(-2); const seconds = ('0' + date.getSeconds()).slice(-2)
return `${year}${separator}${month}${separator}${day} ${hours}:${minutes}:${seconds}`; return `${year}${separator}${month}${separator}${day} ${hours}:${minutes}:${seconds}`
} }
function deepClone(value) { function deepClone(value) {
// 排除原始类型的情况,函数时也满足此条件 // 排除原始类型的情况,函数时也满足此条件
if (typeof value !== "object" || value === null) { if (typeof value !== 'object' || value === null) {
return value; return value
} }
// 克隆结果:1.数组 2.普通对象 // 克隆结果:1.数组 2.普通对象
const result = Array.isArray(value) ? [] : {}; const result = Array.isArray(value) ? [] : {}
// 设置克隆结果的原型链为 value 的原型链(即保持原型一致) // 设置克隆结果的原型链为 value 的原型链(即保持原型一致)
Object.setPrototypeOf(result, Object.getPrototypeOf(value)); Object.setPrototypeOf(result, Object.getPrototypeOf(value))
// 浅层克隆 // 浅层克隆
for (const key in value) { for (const key in value) {
// 排除原型上的属性 // 排除原型上的属性
if (value.hasOwnProperty(key)) { if (value.hasOwnProperty(key)) {
result[key] = deepClone(value[key]); // 针对这个对象的每一个属性值进行克隆,则达到深度克隆效果 result[key] = deepClone(value[key]) // 针对这个对象的每一个属性值进行克隆,则达到深度克隆效果
} }
} }
return result; return result
} }
//精确除法 //精确除法
function accDiv(arg1, arg2) { function accDiv(arg1, arg2) {
var t1 = 0, var t1 = 0,
t2 = 0, t2 = 0,
r1, r1,
r2; r2
try { try {
t1 = arg1.toString().split(".")[1].length; t1 = arg1.toString().split('.')[1].length
} catch (e) {} } catch (e) {}
try { try {
t2 = arg2.toString().split(".")[1].length; t2 = arg2.toString().split('.')[1].length
} catch (e) {} } catch (e) {}
r1 = Number(arg1.toString().replace(".", "")); r1 = Number(arg1.toString().replace('.', ''))
r2 = Number(arg2.toString().replace(".", "")); r2 = Number(arg2.toString().replace('.', ''))
return (r1 / r2) * Math.pow(10, t2 - t1); return (r1 / r2) * Math.pow(10, t2 - t1)
} }
function debounce(fn, timer) { function debounce(fn, timer) {
var t = null; var t = null
return function () { return function () {
if (t) { if (t) {
clearTimeout(t); clearTimeout(t)
} }
if (t == null) { if (t == null) {
fn.apply(this, arguments); fn.apply(this, arguments)
} }
t = setTimeout(() => { t = setTimeout(() => {
t = null; t = null
}, timer); }, timer)
}; }
} }
// var throttle = function (fn, delay) { // var throttle = function (fn, delay) {
// var timer = null; // var timer = null;
...@@ -77,63 +77,62 @@ function debounce(fn, timer) { ...@@ -77,63 +77,62 @@ function debounce(fn, timer) {
// }; // };
// }; // };
var throttle = function (func, limit) { var throttle = function (func, limit) {
let inThrottle; let inThrottle
return function () { return function () {
const context = this; const context = this
const args = arguments; const args = arguments
if (!inThrottle) { if (!inThrottle) {
func.apply(context, args); func.apply(context, args)
inThrottle = true; inThrottle = true
setTimeout(function () { setTimeout(function () {
inThrottle = false; inThrottle = false
}, limit); }, limit)
} }
}; }
}; }
//检查是否有网络 //检查是否有网络
var isNetWork = function () { var isNetWork = function () {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.getNetworkType({ uni.getNetworkType({
complete: function (res) { complete: function (res) {
if (res.networkType == "none") { if (res.networkType == 'none') {
reject('网络异常,请检查网络连接'); reject('网络异常,请检查网络连接')
} else { } else {
resolve('网络正常'); resolve('网络正常')
} }
}, }
}); })
}); })
}; }
var uuid = function (len, radix) { var uuid = function (len, radix) {
var chars = var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
var uuid = [], var uuid = [],
i; i
radix = radix || chars.length; radix = radix || chars.length
if (len) { if (len) {
// Compact form // Compact form
for (i = 0; i < len; i++) uuid[i] = chars[0 | (Math.random() * radix)]; for (i = 0; i < len; i++) uuid[i] = chars[0 | (Math.random() * radix)]
} else { } else {
// rfc4122, version 4 form // rfc4122, version 4 form
var r; var r
// rfc4122 requires these characters // rfc4122 requires these characters
uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-"; uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'
uuid[14] = "4"; uuid[14] = '4'
// Fill in random data. At i==19 set the high bits of clock sequence as // Fill in random data. At i==19 set the high bits of clock sequence as
// per rfc4122, sec. 4.1.5 // per rfc4122, sec. 4.1.5
for (i = 0; i < 36; i++) { for (i = 0; i < 36; i++) {
if (!uuid[i]) { if (!uuid[i]) {
r = 0 | (Math.random() * 16); r = 0 | (Math.random() * 16)
uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r]; uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r]
} }
} }
} }
return uuid.join(""); return uuid.join('')
}; }
/** /**
* 获取文件系统根目录的完整路径 * 获取文件系统根目录的完整路径
...@@ -143,17 +142,36 @@ var uuid = function (len, radix) { ...@@ -143,17 +142,36 @@ var uuid = function (len, radix) {
* @returns {Promise<string>} 一个 Promise,当获取到文件系统根目录的完整路径时兑现,并返回根目录的路径作为字符串 * @returns {Promise<string>} 一个 Promise,当获取到文件系统根目录的完整路径时兑现,并返回根目录的路径作为字符串
*/ */
function getFilePath() { function getFilePath() {
return new Promise((resolve) => { return new Promise(resolve => {
plus.io.requestFileSystem(plus.io.PRIVATE_DOC, function (fs) { plus.io.requestFileSystem(plus.io.PRIVATE_DOC, function (fs) {
resolve(fs.root.fullPath); resolve(fs.root.fullPath)
}); })
}); })
}
/** 比较版本号的大小
**/
function compareVersions(version1, version2) {
const v1 = version1.split('.').map(v => +v) // 转化成数字数组
const v2 = version2.split('.').map(v => +v)
const b1 = v1.every(v => !isNaN(v)) // 判断数组的每一项是否是数字
const b2 = v2.every(v => !isNaN(v)) // 如果不是则返回错误信息
if (!b1 || !b2) return '版本号错误,只能包含数字、.'
const len = Math.max(v1.length, v2.length)
for (let i = 0; i < len; i++) {
const num1 = v1[i] || 0
const num2 = v2[i] || 0
if (num1 > num2) return 1 // 如果版本号1大于版本号2,则输出1
if (num1 < num2) return -1 // 反之则输出 -1
}
// 如果版本号1 等于版本号2,则输出0
return 0
} }
async function getFileSaveFolderOnClient() { async function getFileSaveFolderOnClient() {
const rootPath = await getFilePath(); const rootPath = await getFilePath()
return `file://${rootPath}uniapp_save/`; return `file://${rootPath}uniapp_save/`
} }
export default { export default {
compareVersions,
convertDateTimeFormat, convertDateTimeFormat,
deepClone, deepClone,
accDiv, accDiv,
...@@ -162,5 +180,5 @@ export default { ...@@ -162,5 +180,5 @@ export default {
isNetWork, isNetWork,
uuid, uuid,
getFilePath, getFilePath,
getFileSaveFolderOnClient, getFileSaveFolderOnClient
}; }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!