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 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-04-07 17:09:53
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-08-30 17:28:05
* @LastEditTime: 2024-09-24 11:01:24
* @FilePath: \gl_tape\App.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<script>
const PATH = ['/pages/common/caseDetail']
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js'
import { mapState } from 'vuex'
import utils from '@/utils/utils'
export default {
computed: {
...mapState('audio', ['isEnd', 'isStart'])
......@@ -26,6 +27,26 @@ export default {
})
},
methods: {
async handleCheck() {
const { textList, tempFileURL, version } = uni.$storage.get('mock_data')
const res = utils.compareVersions(plus?.runtime?.version, version)
if (res > -1) {
return
}
const e = {
result: {
is_silently: false,
is_mandatory: true,
name: '',
title: '',
contents: textList.join('\n'),
version: version,
url: tempFileURL,
stable_publish: true
}
}
checkUpdate(e)
},
init() {
uni.addInterceptor('navigateTo', {
//监听跳转
......@@ -79,6 +100,7 @@ export default {
},
onShow: async function () {
this.handleCheck()
// const systemInfo = await uni.$api.systemApi.getMockData();
// if (systemInfo.isCheckedUpdate) {
// 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";
module.exports = {
......@@ -55,4 +62,31 @@ module.exports = {
...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 = {
mockTimer: {},
mockCache: null,
},
boutiqueServerConfig = {
mockRequestCount: null,
mockTimer: {},
mockCache: null,
},
configModule = 'app-tape',
bydConfigModule = 'byd-pad-config',
boutiqueConfigModule = 'boutique-pad-config',
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数据 */
const getMockData = async (immediate = false) => {
......@@ -124,7 +131,44 @@ const getBydMockData = async (immediate = false) => {
bydServerConfig.mockRequestCount = null;
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 accountInfo = await getMockData()
......@@ -136,5 +180,6 @@ module.exports = {
getMockData,
imgToBase64,
updateMockData,
getBydMockData
getBydMockData,
getBoutiqueMockData
}
\ No newline at end of file
......@@ -14,13 +14,13 @@ const HOST = {
ip: "http://192.168.1.169:8292",
};
class Request {
get(params, returnAll = false, hostType) {
get (params, returnAll = false, 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);
}
fetch(method, data, returnAll = true, hostType) {
fetch (method, data, returnAll = true, hostType) {
return this.post(
{
method,
......@@ -30,11 +30,11 @@ class Request {
hostType
);
}
request(RequestMethods, params, returnAll, hostType = "dj") {
request (RequestMethods, params, returnAll, hostType = "dj") {
return new Promise((resolve, reject) => {
let _this = this;
uni.getNetworkType({
success(res) {
success (res) {
if (res.networkType == "none") {
uni.hideLoading();
// uni.showToast({
......@@ -47,11 +47,11 @@ class Request {
let header =
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;
if (!projectName) projectName = _this.getRopProject(params.method);
const path = pathEnum[projectName];
......@@ -63,10 +63,16 @@ class Request {
header,
dataType: "json",
responseType: "text",
success(response) {
success (response) {
/**业务代码 */
let { data } = response;
if (!data) return reject();
let { data, statusCode } = response;
if (!data || statusCode != 200) {
uni.hideLoading()
let errMsg = ''
if (!data) errMsg = '获取数据失败,请重试。'
else errMsg = '服务器暂时不可用,请稍后再次尝试。'
return reject(errMsg);
}
let { code, message } = data;
if (returnAll) {
resolve(data);
......@@ -89,7 +95,7 @@ class Request {
}
}
},
fail(error) {
fail (error) {
uni.hideLoading();
console.error(`${params.method}接口异常:`, error);
uni.showToast({
......@@ -97,13 +103,13 @@ class Request {
typeof error == "string"
? error
: error.errMsg
? error.errMsg
: JSON.stringify(error) || "系统异常",
? error.errMsg
: JSON.stringify(error) || "系统异常",
icon: "error",
});
reject(error);
},
complete() {
complete () {
uni.stopPullDownRefresh();
},
});
......@@ -111,7 +117,7 @@ class Request {
});
});
}
getData(params, hostType = "scrm") {
getData (params, hostType = "scrm") {
let projectName = params.projectName;
if (!projectName) projectName = this.getRopProject(params.method);
else delete params.projectName;
......@@ -143,11 +149,11 @@ class Request {
params.appKey = appKey;
return sign(params, secret, noSignAttr);
}
getRopProject(method) {
getRopProject (method) {
const projectName = method.split(".")[2];
return projectName;
}
uni_request({
uni_request ({
url,
method = "GET",
data = {},
......@@ -163,7 +169,7 @@ class Request {
header,
dataType,
responseType,
success(response) {
success (response) {
resolve(response.data);
},
});
......
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1310rpx 1044rpx;}
.icon-addr { width: 32rpx; height: 32rpx; background-position: -1165rpx -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-avatar { width: 96rpx; height: 96rpx; background-position: -635rpx -726rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -333rpx -853rpx;}
.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-change-account { width: 32rpx; height: 32rpx; background-position: -1259rpx -617rpx;}
.icon-clone { width: 24rpx; height: 24rpx; background-position: -781rpx -509rpx;}
......@@ -23,34 +27,35 @@
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: -830rpx -191rpx;}
.icon-home-active { width: 112rpx; height: 112rpx; background-position: -127rpx -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-female { width: 32rpx; height: 32rpx; background-position: -1207rpx -668rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -1254rpx -668rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -781rpx -415rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1262rpx -668rpx;}
.icon-icon-male { 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-weixin { width: 32rpx; height: 32rpx; background-position: -781rpx -462rpx;}
.icon-invisible { width: 40rpx; height: 40rpx; background-position: -885rpx -668rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -765rpx -621rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -476rpx -853rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -523rpx -853rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -570rpx -853rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -653rpx -853rpx;}
.icon-info_shield { width: 40rpx; height: 40rpx; background-position: -885rpx -668rpx;}
.icon-invisible { width: 40rpx; height: 40rpx; background-position: -940rpx -668rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -700rpx -853rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -747rpx -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-mask-del { width: 80rpx; height: 80rpx; background-position: -95rpx -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-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 { 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-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 { 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-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-setting { width: 64rpx; height: 64rpx; background-position: -372rpx -964rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -222rpx -853rpx;}
......@@ -58,5 +63,5 @@
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -451rpx -964rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -526rpx -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
.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 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 {
},
carBrand () {
return this.$store.state.user.customerInfo.carBrand
},
boutiqueDefaultCarBrandId () {
return this.$store.state.user.boutiqueDefaultCarBrandId
}
},
mounted () {
},
methods: {
autoSelect () {
const { carBrandList } = this
if (carBrandList.length) this.selectCar(carBrandList[0], true)
autoSelect (index = 0, autoHideLoading = true) {
const { carBrandList, boutiqueDefaultCarBrandId } = this
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 () {
const userInfo = uni.$storage.get("userInfo"),
......@@ -116,9 +125,9 @@ export default {
this.$refs.carBrandListVisible.open()
this.carBrandListOff = true
},
selectCar (e, auto = false) {
selectCar (e, auto = false, index, autoHideLoading = true) {
let { clickFlga } = this
if (clickFlga) return
if (clickFlga) return
this.clickFlga = true
this.selectItem = {
carBrand: e.brandName,
......@@ -128,8 +137,9 @@ export default {
}
const carList = uni.getStorageSync(`${e.id}_${e.brandId}_carlist`)
if (carList) {
this.clickFlga = false
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 {
if (!auto) uni.showLoading({
......@@ -140,11 +150,11 @@ export default {
brandId: e.brandId,
childBrandId: e.id
}).then(res => {
uni.hideLoading()
if (autoHideLoading) uni.hideLoading()
this.carlist = res
if (res) uni.setStorageSync(`${e.id}_${e.brandId}_carlist`, res)
if (!carList) {
if (auto && res.length) this.handleSelect(res[0])
if (auto && res.length) this.handleSelect(res[index])
else this.$refs.carBoxVisible.open()
}
this.clickFlga = false
......
......@@ -36,7 +36,7 @@
@click="close"
>取消</view>
<view
class="btn"
:class="['btn',{disabled:component_chooseList.length == 0}]"
@click="choose"
>确定</view>
</view>
......@@ -105,6 +105,7 @@ export default {
return component_chooseList.findIndex(e => e.labelId == item.labelId) != -1
},
choose () {
if (this.component_chooseList.length == 0) return
this.$emit('select', this.component_chooseList)
this.close();
}
......@@ -186,5 +187,8 @@ export default {
background: #dae9ff;
color: #2c66f7;
}
.disabled {
background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%);
}
}
</style>
\ No newline at end of file
......@@ -30,7 +30,7 @@
:key="index"
>
<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'">
<input
:type="i.inputType"
......@@ -46,7 +46,7 @@
<template v-else>
<view
:class="['select', `${formData[i.key]? '' : 'placeholder'}`]"
@click="showPopup(i.popKey)"
@click="showPopup(i)"
>
{{ formData[i.key] || i.placeholder }}
<uni-icons
......@@ -109,8 +109,8 @@ const formObject_boutique = [{
key: "customerName",
type: "input",
inputType: "text",
maxlength: 50,
placeholder: '请输入姓名',
maxlength: 20,
placeholder: '请输入车主姓名',
required: true
},
{
......@@ -118,7 +118,8 @@ const formObject_boutique = [{
key: "carModel",
type: "select",
popKey: "carBrandListVisible",
placeholder: '请选择品牌车型'
placeholder: '请选择品牌车型',
disabled: true
},
{
label: "车主电话",
......@@ -126,7 +127,7 @@ const formObject_boutique = [{
type: "input",
inputType: "tel",
maxlength: 11,
placeholder: '请输入电话',
placeholder: '请输入车主电话',
required: true
},
{
......@@ -161,7 +162,7 @@ export default {
type: "input",
inputType: "text",
maxlength: 50,
placeholder: '请输入姓名',
placeholder: '请输入车主姓名',
required: true
},
{
......@@ -170,7 +171,7 @@ export default {
type: "input",
inputType: "tel",
maxlength: 11,
placeholder: '请输入电话',
placeholder: '请输入车主电话',
required: true
},
{
......@@ -221,7 +222,7 @@ export default {
tips () {
let { sceneType, titleTips } = this,
text = titleTips || '检测到“交车告知书”中未填写客户档案,请填写后再完成接待。'
if (sceneType == 1) text = '请确认“精品加装服务说明页”中的客户信息,并点击完成接待结束客户接待。'
if (sceneType == 1) text = '请确认“车型加装选购页”中的客户信息,并点击「完成接待」结束客户接待。'
return text
}
},
......@@ -245,10 +246,10 @@ export default {
if (key == 'phoneNumber' && this.formData[key]) flag = !phoneRex.test(this.formData[key])
return this.errorTip && flag
},
showPopup (e) {
showPopup ({ popKey, disabled }) {
let { customerType } = this
if (customerType == 0) return
this.$refs[e].open();
if (customerType == 0 || disabled) return
this.$refs[popKey].open();
},
// 取消
cancel () {
......@@ -266,7 +267,13 @@ export default {
this.formObject.map(e => {
if (e.required) {
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) {
......
......@@ -465,7 +465,7 @@ export default {
}
}
.record-list {
height: calc(100% - 248rpx);
height: calc(100% - 242rpx);
position: relative;
z-index: 4;
}
......@@ -633,7 +633,7 @@ export default {
display: flex;
justify-content: space-between;
width: fit-content;
height: 76rpx;
height: 68rpx;
background-color: #f2f2f2;
border-radius: 16rpx;
margin-left: 64rpx;
......@@ -652,7 +652,7 @@ export default {
}
.tab {
width: 184rpx;
height: 76rpx;
height: 68rpx;
justify-content: center;
font-size: 28rpx;
color: #1f2133;
......@@ -661,11 +661,12 @@ export default {
}
.active {
opacity: 1;
font-weight: 500;
}
.active-btn {
position: absolute;
width: 184rpx;
height: 76rpx;
height: 68rpx;
background: #ffffff;
top: 50%;
transform: translateY(-50%);
......
......@@ -182,6 +182,8 @@ export default {
immediate: true,
handler (newval) {
if (!newval) return
const { sceneType } = uni.$storage.get("userInfo");
default_customerForm[0].maxlength = sceneType == 1 ? 20 : 50
this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory")
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
......@@ -424,7 +424,7 @@ export default {
}
}
.record-content {
padding: 96rpx 0;
padding: 96rpx 0 80rpx;
.data-container {
background: #ffffff;
border-radius: 48rpx;
......@@ -479,12 +479,12 @@ export default {
}
}
.record-list {
height: calc(100% - 248rpx);
height: calc(100% - 242rpx);
position: relative;
z-index: 4;
}
.type-1 {
height: calc(100% - 128rpx);
height: calc(100% - 126rpx);
margin-top: -48rpx;
.list {
padding-top: 48rpx;
......@@ -679,12 +679,13 @@ export default {
width: 184rpx;
height: 76rpx;
justify-content: center;
font-weight: 500;
font-size: 32rpx;
color: #1f2133;
font-size: 28rpx;
color: #1f2133b3;
z-index: 10;
}
.active {
color: #1f2133;
font-weight: 500;
}
.active-btn {
position: absolute;
......
......@@ -29,6 +29,7 @@
<script type="text/ecmascript-6">
import checkUpdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update-nvue.js";
import utils from '@/utils/utils'
export default {
name: 'SettingBox',
data() {
......@@ -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() {
const {
......@@ -81,7 +64,7 @@ export default {
tempFileURL,
version
} = uni.$storage.get('mock_data')
const res = this.compareVersions(this.version,version)
const res = utils.compareVersions(this.version,version)
if(res > -1) {
uni.showToast({
title: '目前已是最新版本',
......
......@@ -4,7 +4,6 @@
@click="handleTouchStart"
>
<view :class="['home', { show: !id }]">
<home-animation></home-animation>
<left-side
:userInfo="userInfo"
:tabIndex.sync="tabIndex"
......@@ -55,6 +54,9 @@
:popupW="704"
content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」"
confirmBtnText="预览素材"
@cancel="$emit('previewCancel')"
@close="$emit('previewClose')"
></MessageBox>
<!-- 停留弹框 -->
<MessageBox
......@@ -105,18 +107,17 @@
import RecordList from "./components/RecordList.vue";
import myClick from "@/mixin/click";
import uploader from "@/mixin/uploader.js";
import HomeAnimation from './components/HomeAnimation.vue';
import CustomerFile from './components/CustomerFile.vue';
import LeftSide from './components/LeftSide.vue';
export default {
mixins: [myClick, uploader],
components: { RecordList, HomeAnimation, CustomerFile, LeftSide },
components: { RecordList, CustomerFile, LeftSide },
props: {
id: [String, Number],
finishDoneText: String,
finishContene: {
type: String,
default: "当前操作视为强制退出接待,若需正常流程完成接待请点击“完成接待”",
default: "当前操作视为强制退出接待,若需正常流程完成接待请点击「完成接待」",
},
},
data () {
......@@ -149,6 +150,16 @@ export default {
<style scoped lang="scss">
.container {
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,
.detail {
position: fixed;
......
<template>
<view class="tool-box">
<view class="tool-box" :style="toolStyle">
<view
:class="['btn', {hideIcon:!show}]"
@click="show = false"
......@@ -64,13 +64,27 @@ export default {
idKey: {
type: String,
default: 'id'
}
},
toolStyle:String
},
data () {
return {
show: true
}
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
watch: {
watchStatus: {
immediate: true,
handler (newval) {
this.show = true
}
},
},
methods: {
hide () {
this.show = true
......
......@@ -2,7 +2,7 @@
"name" : "展业助手",
"appid" : "__UNI__D3BD3DF",
"description" : "",
"versionName" : "1.6.0",
"versionName" : "1.9.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App特有相关 */
......
......@@ -16,7 +16,7 @@ const UPLOAD_STATUS = {
import { mapMutations, mapState } from 'vuex'
import utils from '@/utils/utils.js'
export default {
data() {
data () {
return {
voicePath: '',
timer: null,
......@@ -25,7 +25,7 @@ export default {
reaction: 1
}
},
mounted() {
mounted () {
// 获取当前页面栈数组
const pages = getCurrentPages()
const currentPage = pages[pages.length - 1]
......@@ -38,23 +38,23 @@ export default {
...mapState('audio', ['receptionStatus', 'booksList', 'audioInfo']),
...mapState(['user.customerInfo'])
},
created() {
created () {
console.log('created')
},
onHide() {
onHide () {
console.log('隐藏')
// recorderManager.stop();
// recorderManager.start({
// duration: 10000,
// });
},
onShow() {
onShow () {
// console.log(utils.requestAndroidPermission());
},
methods: {
...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setAudioInfo']),
// //关闭提示
tipCancel() {
tipCancel () {
this.stopAudio()
this.setReceptionStatus(0)
this.setAudioInfo({ endReasonType: 1 })
......@@ -67,11 +67,11 @@ export default {
}
},
//结束提示
tipConfirm() {
tipConfirm () {
this.times = 0
this.$refs.tipBox?.close()
},
closeAudio() {
closeAudio () {
this.times = 0
clearInterval(this.timer)
this.timer = null
......@@ -79,7 +79,7 @@ export default {
this.setReceptionStatus(0)
this.setAudioInfo({ endReasonType: 1 })
},
getParams() {
getParams () {
const { shopMerchantId, phone, sceneType, uuid, name, merchantId, channelType, merchantName } = uni.$storage.get('userInfo'),
{ customerName, phoneNumber, salesUuid, carModel, staffName } = this.$store.state.user.customerInfo,
receptionCustomerPaySourceList = this.booksList.map(item => {
......@@ -91,27 +91,39 @@ export default {
}),
{ receptionStartTime, receptionEndTime, endReasonType } = this.audioInfo,
{ 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,
staffName: name,
serviceMerchantId: merchantId,
carModel,
endReasonType, //原因 1.异常 0.正常
customerName,
phoneNumber,
appCode,
loginPhone: phone,
salesName: staffName,
salesUuid,
receptionStatus: this.receptionStatus, //接待结果 1.成交 0.战败
receptionStartTime,
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 其他
}
})
})
let params = {
staffUuid: uuid,
staffName: name,
serviceMerchantId: merchantId,
carModel,
endReasonType, //原因 1.异常 0.正常
customerName,
phoneNumber,
appCode,
loginPhone: phone,
salesName: staffName,
salesUuid,
receptionStatus: this.receptionStatus, //接待结果 1.成交 0.战败
receptionStartTime,
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
},
/**
......@@ -119,7 +131,7 @@ export default {
* @param {旧的文件路径} oldFilePath
* @param {新的文件名} newFileName
*/
RenameFile(oldFilePath, newFileName) {
RenameFile (oldFilePath, newFileName) {
plus.io.resolveLocalFileSystemURL(oldFilePath, entry => {
entry.getParent(_oldFile => {
entry.moveTo(_oldFile, '/' + newFileName, newFilePath => {
......@@ -178,7 +190,7 @@ export default {
this.handleSave(newFilePath)
})
}, 300),
handleSave(file) {
handleSave (file) {
const audioList = [...this.audioInfo.audioList, file]
if (file) {
this.setAudioInfo({ audioList })
......@@ -190,7 +202,7 @@ export default {
this.setAudioInfo({ endReasonType: 0, audioStatus: 'finish' })
},
/**保存记录*/
async saveRecord() {
async saveRecord () {
const params = this.getParams()
const unlock = await uni.$recordManager.lock()
const path = await utils.getFileSaveFolderOnClient()
......@@ -256,7 +268,7 @@ export default {
recorderManager.stop()
}, 1500),
//监听点击事件
initTime() {
initTime () {
if (this.audioInfo.audioStatus != 'start') return
this.timer = setInterval(() => {
// console.log(this.times);
......@@ -268,11 +280,11 @@ export default {
}
}, 1000 * 10)
},
handleTouchStart() {
handleTouchStart () {
this.times = 0
}
},
beforeCreate() {
beforeCreate () {
clearInterval(this.timer)
this.timer = null
}
......
import loginMixin from './loginMixin'
import receptionTrackMixin from './receptionTrackMixin'
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
<template>
<view class="container">
<view class="container" @click="hideSelect">
<view class="bg"></view>
<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">
<input
type="text"
......@@ -11,14 +24,15 @@
@blur="input($event)"
@focus="focus"
/>
<view class="input-tips" v-if="!isSearch"
>搜索图片/视频名称<uni-icons
<view
class="input-tips"
v-if="!isSearch"
>搜索图片/视频名称<uni-icons
type="search"
class="icon"
color="#999"
size="20"
></uni-icons
></view>
></uni-icons></view>
<uni-icons
v-if="isSearch"
type="closeempty"
......@@ -29,63 +43,105 @@
></uni-icons>
</view>
<scroll-view class="record-box" scroll-y>
<scroll-view
class="record-box"
scroll-y
:scroll-top="scrollTop"
>
<view class="list">
<template v-if="list.length">
<template v-for="item in list">
<view class="item" :key="item.id">
<view class="item-autio" @click="playVideo(item)">
<image :src="item.coverUrl" class="cover-box"></image>
<view
class="item"
:key="item.id"
>
<view
class="item-autio"
@click="playVideo(item)"
>
<image
:src="item.thumbnailUrl"
class="cover-box"
></image>
<image
v-if="item.sourceType == 2"
v-if="item.materialFormat == 1"
src="../../assets/images/boutique/play.png"
class="play-box"
></image>
</view>
<view class="item-desc">{{ item.tabName }}</view>
<view class="item-desc">{{ item.name }}</view>
</view>
</template>
</template>
<template v-else>
<view class="nothing flex">
<image class="icon" src="../../assets/images/home/nothing.webp" />
<image
class="icon"
src="../../assets/images/home/nothing.webp"
/>
暂无数据
</view>
</template>
</view>
</scroll-view>
</view>
<view class="popup-box" v-if="popupShow">
<view
class="popup-box"
v-if="popupShow"
>
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="24" color="#fff"></uni-icons>
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="24"
color="#fff"
></uni-icons>
</view>
<view class="title">{{ title }}</view>
</view>
<view class="popup-body">
<video ref="videoPlayer" :src="videoSrc" controls></video>
<video
ref="videoPlayer"
:src="videoSrc"
controls
></video>
</view>
</view>
</view>
</template>
<script type="text/ecmascript-6">
import utils from "@/utils/utils";
export default {
name: '',
name: 'case',
data () {
return {
name:'',
name: '',
list: [],
popupShow:false,
isSearch:false,
videoSrc: 'https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/2minute-demo.mp4',
searchList: [],
popupShow: false,
isSearch: false,
videoSrc: '',
isSelect: false,
selectIndex: '全部',
selectList: [
{
label: '全部',
value: '全部'
},
],
scrollTop: 0
}
},
props: {
views: {
type: Array,
default: () => []
}
},
show: Boolean
},
computed: {
watchStatus () {
......@@ -93,42 +149,96 @@ export default {
},
},
watch: {
watchStatus:{
handler() {
this.name = '';
this.isSearch = false
this.list = this.views
watchStatus: {
handler(val) {
this.selectIndex = '全部'
// console.log(val)
// this.name = '';
// this.isSearch = false
// this.list = this.views
// this.init()
},
immediate: true
},
show: {
handler(newValue) {
if(newValue) this.init()
},
immediate:true
}
},
mounted() {
this.init()
this.getCategory()
},
methods: {
playVideo(item) {
const {tabName,sourceType,detailUrl} = item
uni.navigateTo({
url: `/pages/boutique/preview?tabName=${tabName}&sourceType=${sourceType}&detailUrl=${detailUrl}`
})
playVideo (item) {
this.$emit('preview',item)
},
focus() {
focus () {
this.isSearch = true
},
init() {
init () {
this.name = '';
this.isSelect = false
setTimeout(() => {
this.isSearch = false
this.list = this.views
// this.list = this.views
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex)
}, 300);
},
handleClear() {
this.init()
handleClear () {
this.name = ''
this.isSearch = false
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex)
},
input(e) {
this.name = e.detail.value
if(this.name == '')
this.name = e.detail.value
if (this.name == '')
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>
......@@ -146,13 +256,49 @@ export default {
height: 800rpx;
position: absolute;
left: 0;
background-image: url("../../assets/images/boutique/record-bg.png");
background-image: url('../../assets/images/boutique/record-bg.png');
background-size: 100% 100%;
top: 0;
}
.box {
padding: 64rpx;
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 {
position: relative;
.input {
......@@ -224,11 +370,19 @@ export default {
}
}
.item-desc {
height: 140rpx;
// height: 140rpx;
padding: 24rpx 28rpx;
font-size: 32rpx;
color: #333333;
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
<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
<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
......@@ -18,27 +18,35 @@
color="#000"
></uni-icons>
</view>
<view class="title">{{ title }}</view>
<view
class="title"
v-if="id != 1"
>{{ title }}</view>
</view>
<template v-for="(item, index) in media">
<view
:class="['view', { showView: id == item.sort }]"
:class="['view', { showView: id == item.id }]"
:key="index"
>
<component
:is="componentName(item.sort)"
:is="item.componentName"
:views="item.receptionSourceDetailList || []"
:ref="'media' + item.sort"
:ref="'media' + item.id"
:title="item.detailTitle || ''"
:madiaId="item.sort"
:madiaId="item.id"
:customerType="customerType"
@jumpPage="jumpPage"
:show="id == item.sort"
:show="id == item.id"
@reception="reception"
:tabId="tabId"
:currentCar="currentCar"
:type="type"
:popupImg="item.popupImg"
@preview="onPreview"
/>
</view>
</template>
<template v-if="type != 'preview'">
<template v-if="showTool()">
<tool-box
ref="toolRef"
:data="toolList"
......@@ -46,7 +54,7 @@
@choose="choose"
@finish="open"
:id="id"
idKey="sort"
toolStyle="top:calc(50% - 160rpx);"
/>
</template>
<finish-step
......@@ -56,6 +64,14 @@
:customerType="customerType"
@back="backInvitation"
/>
<picture-box :imgUrl="currentImgUrl($refs.media1)" />
<preview
ref="preview"
isComponents
:show.sync="showPreview"
:mediaObject="mediaObject"
@previewBack="onPreviewBack"
/>
</view>
</template>
<script>
......@@ -67,6 +83,9 @@ import { mapMutations } from "vuex";
import invitation from "./invitation.vue";
import Case from "./case.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 {
components: {
ToolBox,
......@@ -75,7 +94,9 @@ export default {
Reception,
invitation,
Case,
history
history,
PictureBox,
preview
},
props: {
id: [String, Number],
......@@ -85,66 +106,66 @@ export default {
default: "preview",
},
customerType: Number,
historyId: [Number, String]
toolList: Array,
tabId: Number,
currentCar: String
},
mixins: [receptionTrackMixin],
data () {
return {
showPreview: false,
mediaObject: null
};
},
watch: {
},
computed: {
title () {
let { id } = this,
name = this.media.find((e) => e.sort == id)?.detailTitle || "";
name = this.media.find((e) => e.id == id)?.detailTitle || "";
return name;
},
watchStatus () {
return this.$store.state.user.historyStatus;
},
toolList () {
return JSON.parse(JSON.stringify(this.media)).sort(function (a, b) {
return a.shortSort - b.shortSort
})
}
receptionTrack () {
return this.$store.state.user.receptionTrack
},
watchCustomerInfo () {
return this.$store.state.user.customerInfo
},
},
mounted () {
},
mounted () { },
methods: {
...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 () {
this.$refs.stepRef.open();
},
/**切换素材 */
choose (e) {
if (this.id == 1) this.$refs.media1[0].closeAllPopup();
this.jumpPage({ id: e.sort })
Object.keys(this.$refs).map(refKey => {
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 () {
if (this.historyId) {
this.jumpPage({ id: this.historyId })
this.$emit('update:historyId', '')
return
}
this.$refs?.toolRef?.hide();
this.$emit("back");
},
done (e) {
this.$refs.toolRef.hide();
this.$refs.stepRef.close();
this.receptionTrackLeave()
this.$emit("done", e);
this.clearCustomerReceivedTimer()
},
jumpPage ({ id, historyId }) {
this.$emit('update:historyId', historyId || '')
jumpPage ({ id }) {
this.$emit("update:id", Number(id));
},
/**回店客户 */
......@@ -159,24 +180,94 @@ export default {
});
return
}
this.$store.dispatch('setCustomerInfo', {
let customer = {
customerName: item.customerName,
carModel: item.carSeriesName,
phoneNumber: item.customerPhone,
salesUuid: item.userId,
staffName: item.employeeName,
receiveCouponDate: item.receiveCouponDate
})
this.$emit('reception')
receiveCouponDate: item.receiveCouponDate,
customerCouponId: item.customerCouponId
}
let [reception] = this.$refs.media1
reception?.clearCustomerReceivedTimer()
this.$emit('reception', customer)
},
backInvitation () {
this.jumpPage({ id: 7 })
this.jumpPage({ id: 3 })
setTimeout(() => {
uni.showToast({
title: '请选择回店客户',
icon: 'none'
})
}, 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 {
height: 96rpx;
left: 0;
top: 48rpx;
z-index: 9;
z-index: 999;
pointer-events: none;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.title {
position: absolute;
......
......@@ -9,8 +9,7 @@
:class="['tab flex', { active: groupIndex == item.id }]"
:key="index"
@click="changeIndex(item.id)"
>{{ item.text }}</view
>
>{{ item.text }}</view>
</template>
<view :class="['active-btn', `active-btn-${groupIndex - 1}`]"></view>
</view>
......@@ -57,7 +56,10 @@
/>
</view>
<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="{ value: true, bold: k.isBold }">{{
k.format
......@@ -79,9 +81,7 @@
</view>
<view class="info flex">
<view class="label">实收金额</view>
<view class="value bold"
>¥ <text>{{ item.totalPrice.toFixed(2) }}</text></view
>
<view class="value bold">¥ <text>{{ item.totalPrice.toFixed(2) }}</text></view>
</view>
</view>
</view>
......@@ -118,8 +118,16 @@
</view>
</view>
<view class="tabel-container">
<table class="tabel-box" cellspacing="0" border="0" cellpadding="0">
<tr v-for="i in goodsList" :key="i.id">
<table
class="tabel-box"
cellspacing="0"
border="0"
cellpadding="0"
>
<tr
v-for="i in goodsList"
:key="i.id"
>
<td>{{ i.goodsName }}</td>
<td>{{ i.goodsPositionName || "-" }}</td>
<td>{{ i.number }}</td>
......@@ -134,80 +142,93 @@
import dayjs from 'dayjs'
import Record from "@/mixin/record";
export default {
name: '',
mixins:[Record],
props: {
name: '',
mixins: [Record],
props: {
show: Boolean
},
data() {
return {
imageUrl: require('@/assets/images/noviceGuide/step1-1.webp'),
groupIndex:1,
goodsList:[],
name: '',
dateList: [
{ text: '车窗膜',id:1 },
{ text: '其他精品',id:2 }
],
itemObject: [
{ label: '车架号', key: 'standNo' },
{ label: '工单号', key: 'orderCode' },
{ label: '交易流水号', key: 'outTradeNo' },
{ label: '订单时间', key: 'orderTime',format:true },
{ label: '销售顾问', key: 'employeeName' }
],
}
data () {
return {
groupIndex: 1,
goodsList: [],
name: '',
dateList: [
{ text: '车窗膜', id: 1 },
{ text: '其他精品', id: 2 }
],
itemObject: [
{ label: '车架号', key: 'standNo' },
{ label: '工单号', key: 'orderCode' },
{ label: '交易流水号', key: 'outTradeNo' },
{ label: '订单时间', key: 'orderTime', format: true },
{ label: '销售顾问', key: 'employeeName' }
],
}
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
watch:{
show: {
handler() {
this.changeIndex(1,true)
},
immediate:true
}
},
watch: {
show: {
handler (newValue) {
if (newValue) this.changeIndex(1, true)
},
immediate: true
},
methods: {
formatTime(val,key) {
return dayjs(val).format("YYYY-MM-DD HH:mm:ss")
watchStatus: {
immediate: true,
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>
<style scoped lang="scss">
......@@ -225,7 +246,7 @@ export default {
height: 800rpx;
position: absolute;
left: 0;
background-image: url("../../assets/images/boutique/record-bg.png");
background-image: url('../../assets/images/boutique/record-bg.png');
background-size: 100% 100%;
top: 0;
}
......@@ -284,7 +305,7 @@ export default {
border-radius: 370rpx;
left: 0;
top: 0;
content: "";
content: '';
}
.tab {
......@@ -420,11 +441,7 @@ export default {
right: 0;
width: 350rpx;
height: 100%;
background: linear-gradient(
to left,
rgba(255, 255, 255, 0) 0%,
rgba(255, 255, 255, 1) 100%
);
background: linear-gradient(to left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%);
}
.info {
margin-top: 16rpx;
......
......@@ -76,7 +76,7 @@
</view>
<MessageBox
ref="receptionTips"
content="是否接待当前客户,确定接待直接进入\n「精品加装服务说明」"
content="是否接待当前客户,确定接待直接进入\n「车型加装选购页」"
cancelBtnText="取消"
confirmBtnText="确定接待"
@confirm="jumpPage"
......@@ -109,8 +109,8 @@ export default {
},
watch:{
show:{
handler() {
this.init()
handler(val) {
if(val) this.init()
this.$refs.receptionTips?.close()
},
immediate:true
......
<template>
<view class="popup-box">
<view
class="popup-box"
v-if="popupShow"
>
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#fff"></uni-icons>
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#fff"
></uni-icons>
</view>
<view class="title">{{ title }}</view>
</view>
<view class="popup-body">
<video 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>
<video
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>
</template>
<script type="text/ecmascript-6">
import report from "@/mixin/report.js";
export default {
props: {
isComponents: Boolean,
show: Boolean,
mediaObject: Object
},
data () {
return {
width:0,
title: '11',
width: 0,
title: '',
sourceType: '',
detailUrl: ''
}
},
mixins:[report],
onLoad (options) {
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);
watch:{
show:{
immediate: true,
handler (n) {
if (n) {
console.log(this.mediaObject)
this.init(this.mediaObject)
}
}
});
}
},
computed: {
popupShow () {
let status = true
if (this.isComponents) status = this.show
return status
},
},
mixins: [report],
onLoad (options) {
this.init(options)
},
methods: {
back() {
uni.navigateBack()
}
init (options) {
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>
......@@ -59,7 +110,7 @@ export default {
height: 100vh;
background: #000;
padding: 60rpx 0rpx;
z-index: 100;
z-index: 999;
.nav-bar {
width: 100%;
height: 96rpx;
......
<template>
<view class="detail-box">
<view
class="detail-box"
@click="closeToolTip"
>
<view class="nav-bar">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view>
车主详情
</view>
......@@ -10,27 +20,60 @@
<view class="title">车主信息</view>
<view class="customer-info">
<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="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>
</template>
</view>
</view>
<view class="case-box box">
<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">
<template v-if="flag">
<template v-if="list.length && list[0] && list[0].length">
<template v-for="i in list">
<template v-for="item in i">
<view class="case-item" :key="item.id" @click="jumpDetail(item)">
<image class="img" :src="item.cover"></image>
<view
class="case-item"
:key="item.id"
@click="jumpDetail(item)"
>
<image
class="img"
:src="item.cover"
></image>
<view class="case-info">
<view class="case-name text-hide">{{ item.title }}</view>
<template v-for="(j, ind) in caseInfo">
<view class="case-text flex" :key="ind">
<view
class="case-text flex"
:key="ind"
>
<view class="case-label">{{ j.label }}:</view>
<view :class="['case-value', j.class]">
<template v-if="j.format">
......@@ -49,7 +92,7 @@
</template>
<template v-else>
<view class="nothing flex">
<image class="icon" src="@/assets/images/home/nothing.webp" />
<view class="icon"></view>
暂无推荐套餐
</view>
</template>
......@@ -101,6 +144,7 @@ export default {
{
label: '客户标签',
key: 'customerTagName',
hasTooltip: true
}],
caseInfo: [
{
......@@ -136,7 +180,7 @@ export default {
total: 0,
flag: false,
nothing: false,
pageSize: 8,
pageSize: 8
}
},
onLoad (options) {
......@@ -164,11 +208,15 @@ export default {
async findVisitsInfo (id) {
const customerInfo = await uni.$api.customerApi.findVisitsInfo({
id
})
}),
{ customerForm } = this
customerInfo.customerTagName = customerInfo.customerTagName.replace(/,/g, '|')
customerInfo.arrivalDate = dayjs(customerInfo.arrivalDate).format("YYYY.MM.DD")
this.customerInfo = customerInfo
this.getMaterialResponsePage()
this.$nextTick(() => {
this.checkTextWidth(customerForm.find(e => e.hasTooltip))
})
},
showPopup () {
this.arrowPopup = true
......@@ -198,7 +246,6 @@ export default {
showChannel: 2,
scene: sceneType
}
console.log(params)
const { list, total } = await uni.$api.customerApi.getMaterialResponsePage(params)
uni.hideLoading()
list.map(e => {
......@@ -220,7 +267,6 @@ export default {
this.$forceUpdate()
} catch (error) {
uni.hideLoading()
console.log(error)
this.flag = true
}
},
......@@ -261,6 +307,25 @@ export default {
this.getMaterialResponsePage()
} 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>
......@@ -338,17 +403,19 @@ export default {
.customer-box {
height: 292rpx;
margin-bottom: 32rpx;
position: relative;
z-index: 2;
.customer-info {
display: flex;
flex-wrap: wrap;
padding: 0 48rpx;
gap: 12rpx 38rpx;
.item {
width: 50%;
width: 1042rpx;
flex-shrink: 0;
font-size: 28rpx;
margin-bottom: 12rpx;
line-height: 44rpx;
position: relative;
.label {
color: #292d3399;
width: 160rpx;
......@@ -357,6 +424,25 @@ export default {
.value {
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 {
width: 676rpx;
height: 284rpx;
margin-bottom: 24rpx;
background-image: url('@/assets/images/home/nothing.webp');
background-size: 100% 100%;
}
}
.end-text {
......
......@@ -91,7 +91,7 @@ import FinishStep from '@/components/FinishStep.vue';
import { mapMutations } from "vuex";
import informationEntry from './components/informationEntry.vue'
import insurance from '@/components/Insurance/Insurance.vue'
import {receptionTrackMixin} from '@/mixin/index.js'
export default {
components: {
ToolBox,
......@@ -114,6 +114,7 @@ export default {
},
toolList: Array
},
mixins: [receptionTrackMixin],
data () {
return {
drawStatus: false,
......@@ -150,7 +151,8 @@ export default {
isByd () {
const { channelType } = uni.$storage.get("userInfo")
return channelType == 2
}
},
},
watch: {
watchStatus: {
......@@ -178,6 +180,7 @@ export default {
ref.closeAllPopup && ref.closeAllPopup()
}
})
this.receptionTrackLeave()
this.$emit('update:id', e.id)
},
back () {
......@@ -188,6 +191,7 @@ export default {
this.showPayPage = false
this.$refs.toolRef.hide()
this.$refs.stepRef.close()
this.receptionTrackLeave()
this.$emit('done', e)
},
toPay () {
......@@ -203,7 +207,7 @@ export default {
}
},
touchEnd (e) {
if(this.modeName) return
if (this.modeName) return
try {
let { toolList, drawStatus, startX, screenWidth, id, scaleValueObject, productModelStatus } = this
if (!e || !e.changedTouches || drawStatus || toolList.length == 0 || e.changedTouches.length === 0) return
......@@ -216,6 +220,7 @@ export default {
if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1 && !productModelStatus) {
const { nextId, modeName } = this.getNextId(index, toolList, startX, halfScreenWidth)
this.modeName = modeName
this.receptionTrackLeave()
this.$emit('update:id', nextId)
setTimeout(() => {
this.modeName = ''
......@@ -243,7 +248,8 @@ export default {
scale (e) {
let { id } = this
this.scaleValueObject[id] = e
}
},
},
};
......
......@@ -182,11 +182,12 @@ export default {
uni.$api.systemApi.updateMockData({
moduleList,
toolList,
}, ['moduleList', 'toolList'],'byd_mock_data')
}, ['moduleList', 'toolList'], 'byd_mock_data')
this.setViewInfo(moduleList, toolList)
} else {
let { moduleList, toolList,
default_moduleList, default_toolList,
boutiqueDefaultCarBrandId
} = await uni.$api.systemApi.getMockData(true)
if (this.channelType == 3) {
/**其他品牌 */
......@@ -220,6 +221,7 @@ export default {
moduleList,
toolList
}, ["moduleList", 'toolList'])
this.$store.state.user.boutiqueDefaultCarBrandId = boutiqueDefaultCarBrandId
this.setViewInfo(moduleList, toolList)
}
}
......@@ -269,6 +271,7 @@ export default {
this.type = "";
this.setReceptionStatus(e);
this.$store.dispatch("clearHistory")
this.$store.dispatch('clearReceptionTrack')
}, 1500);
},
back () {
......@@ -296,6 +299,7 @@ export default {
this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory");
this.$refs.home.setBooks([]);
this.$store.dispatch('clearReceptionTrack')
},
openStep () {
this.$refs.home.finishRef.close();
......
......@@ -24,6 +24,13 @@ export default {
employeeList: [],
paymentType: [],
haveCustomerAccess: false,
boutiqueMediaConfig: {
M5: [],
M7: [],
M9: []
},
receptionTrack: {}, //接待记录埋点
boutiqueDefaultCarBrandId: ''
};
},
mutations: {
......@@ -72,5 +79,12 @@ export default {
setEmployeeList ({ state }, 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 @@
.byd-layout {
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
......@@ -21,5 +21,6 @@ export const STORAGE_OBJECTkEY = {
recordSuccessList: "recordSuccessList",
historyList: "historyList",
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
* @Date: 2024-04-08 17:16:46
* @LastEditors: limin
* @LastEditTime: 2024-07-02 09:32:33
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-09-23 17:40:40
* @FilePath: \gl_tape\utils\utils.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
function convertDateTimeFormat(dateTimeStr, separator = "-") {
const date = new Date(dateTimeStr);
const year = date.getFullYear();
const month = ("0" + (date.getMonth() + 1)).slice(-2); // 月份是从0开始的
const day = ("0" + date.getDate()).slice(-2);
const hours = ("0" + date.getHours()).slice(-2);
const minutes = ("0" + date.getMinutes()).slice(-2);
const seconds = ("0" + date.getSeconds()).slice(-2);
function convertDateTimeFormat(dateTimeStr, separator = '-') {
const date = new Date(dateTimeStr)
const year = date.getFullYear()
const month = ('0' + (date.getMonth() + 1)).slice(-2) // 月份是从0开始的
const day = ('0' + date.getDate()).slice(-2)
const hours = ('0' + date.getHours()).slice(-2)
const minutes = ('0' + date.getMinutes()).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) {
// 排除原始类型的情况,函数时也满足此条件
if (typeof value !== "object" || value === null) {
return value;
if (typeof value !== 'object' || value === null) {
return value
}
// 克隆结果:1.数组 2.普通对象
const result = Array.isArray(value) ? [] : {};
const result = Array.isArray(value) ? [] : {}
// 设置克隆结果的原型链为 value 的原型链(即保持原型一致)
Object.setPrototypeOf(result, Object.getPrototypeOf(value));
Object.setPrototypeOf(result, Object.getPrototypeOf(value))
// 浅层克隆
for (const key in value) {
// 排除原型上的属性
if (value.hasOwnProperty(key)) {
result[key] = deepClone(value[key]); // 针对这个对象的每一个属性值进行克隆,则达到深度克隆效果
result[key] = deepClone(value[key]) // 针对这个对象的每一个属性值进行克隆,则达到深度克隆效果
}
}
return result;
return result
}
//精确除法
function accDiv(arg1, arg2) {
var t1 = 0,
t2 = 0,
r1,
r2;
r2
try {
t1 = arg1.toString().split(".")[1].length;
t1 = arg1.toString().split('.')[1].length
} catch (e) {}
try {
t2 = arg2.toString().split(".")[1].length;
t2 = arg2.toString().split('.')[1].length
} catch (e) {}
r1 = Number(arg1.toString().replace(".", ""));
r2 = Number(arg2.toString().replace(".", ""));
return (r1 / r2) * Math.pow(10, t2 - t1);
r1 = Number(arg1.toString().replace('.', ''))
r2 = Number(arg2.toString().replace('.', ''))
return (r1 / r2) * Math.pow(10, t2 - t1)
}
function debounce(fn, timer) {
var t = null;
var t = null
return function () {
if (t) {
clearTimeout(t);
clearTimeout(t)
}
if (t == null) {
fn.apply(this, arguments);
fn.apply(this, arguments)
}
t = setTimeout(() => {
t = null;
}, timer);
};
t = null
}, timer)
}
}
// var throttle = function (fn, delay) {
// var timer = null;
......@@ -77,63 +77,62 @@ function debounce(fn, timer) {
// };
// };
var throttle = function (func, limit) {
let inThrottle;
let inThrottle
return function () {
const context = this;
const args = arguments;
const context = this
const args = arguments
if (!inThrottle) {
func.apply(context, args);
inThrottle = true;
func.apply(context, args)
inThrottle = true
setTimeout(function () {
inThrottle = false;
}, limit);
inThrottle = false
}, limit)
}
};
};
}
}
//检查是否有网络
var isNetWork = function () {
return new Promise((resolve, reject) => {
uni.getNetworkType({
complete: function (res) {
if (res.networkType == "none") {
reject('网络异常,请检查网络连接');
if (res.networkType == 'none') {
reject('网络异常,请检查网络连接')
} else {
resolve('网络正常');
resolve('网络正常')
}
},
});
});
};
}
})
})
}
var uuid = function (len, radix) {
var chars =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");
var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')
var uuid = [],
i;
radix = radix || chars.length;
i
radix = radix || chars.length
if (len) {
// 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 {
// rfc4122, version 4 form
var r;
var r
// rfc4122 requires these characters
uuid[8] = uuid[13] = uuid[18] = uuid[23] = "-";
uuid[14] = "4";
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'
uuid[14] = '4'
// Fill in random data. At i==19 set the high bits of clock sequence as
// per rfc4122, sec. 4.1.5
for (i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | (Math.random() * 16);
uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r];
r = 0 | (Math.random() * 16)
uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r]
}
}
}
return uuid.join("");
};
return uuid.join('')
}
/**
* 获取文件系统根目录的完整路径
......@@ -143,17 +142,36 @@ var uuid = function (len, radix) {
* @returns {Promise<string>} 一个 Promise,当获取到文件系统根目录的完整路径时兑现,并返回根目录的路径作为字符串
*/
function getFilePath() {
return new Promise((resolve) => {
return new Promise(resolve => {
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() {
const rootPath = await getFilePath();
return `file://${rootPath}uniapp_save/`;
const rootPath = await getFilePath()
return `file://${rootPath}uniapp_save/`
}
export default {
compareVersions,
convertDateTimeFormat,
deepClone,
accDiv,
......@@ -162,5 +180,5 @@ export default {
isNetWork,
uuid,
getFilePath,
getFileSaveFolderOnClient,
};
getFileSaveFolderOnClient
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!