Commit 9bdd3e5d by 前端

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

2 parents 631ae8d8 7ea36e1a
......@@ -2,10 +2,10 @@ import http from '../request/http'
import { env } from '../../env'
const serverConfig = {
mockRequestCount: null,
mockTimer: {},
mockCache: null
},
mockRequestCount: null,
mockTimer: {},
mockCache: null
},
bydServerConfig = {
mockRequestCount: null,
mockTimer: {},
......@@ -60,29 +60,49 @@ const getMockData = async (immediate = false) => {
return Promise.reject(error)
}
}
const imgToBase64 = (list, urlKey) => {
const imgToBase64 = (list, urlKey, isArray = true) => {
return new Promise((resolve, reject) => {
let arr = [],
newList = JSON.parse(JSON.stringify(list))
list.map((e, index) => {
if (!e[urlKey]) return resolve(list)
if (!e[urlKey].startsWith('https')) return resolve(list)
uni.request({
url: urlKey ? e[urlKey] : e,
method: 'GET',
responseType: 'arraybuffer',
success: res => {
const base64 = `data:image/png;base64,${uni.arrayBufferToBase64(res.data)}`
newList[index][urlKey] = base64
newList[index][`original_${urlKey}`] = e[urlKey]
arr.push(e)
if (arr.length === list.length) resolve(newList)
},
fail: err => {
reject(err)
}
if (isArray) {
list.map((e, index) => {
if (!e[urlKey]) return resolve(list)
if (!e[urlKey].startsWith('https')) return resolve(list)
uni.request({
url: urlKey ? e[urlKey] : e,
method: 'GET',
responseType: 'arraybuffer',
success: res => {
const base64 = `data:image/png;base64,${uni.arrayBufferToBase64(res.data)}`
newList[index][urlKey] = base64
newList[index][`original_${urlKey}`] = e[urlKey]
arr.push(e)
if (arr.length === list.length) resolve(newList)
},
fail: err => {
reject(err)
}
})
})
})
} else {
Object.keys(list).map(key => {
if (!list[key].startsWith('https')) return resolve(list)
uni.request({
url: list[key],
method: 'GET',
responseType: 'arraybuffer',
success: res => {
const base64 = `data:image/png;base64,${uni.arrayBufferToBase64(res.data)}`
newList[key] = base64
arr.push(key)
if (arr.length === Object.keys(list).length) resolve(newList)
},
fail: err => {
reject(err)
}
})
})
}
})
}
const updateMockData = (dataList, keyList, storageName = 'mock_data') => {
......
No preview for this file type

7.66 MB | W: | H:

7.85 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<view class="layout">
<template v-if="views.length>1">
<view class="tabs-box">
<tabs
:list="views"
@tabclick="changeTab"
></tabs>
</view>
</template>
<wnCanvas
:drawStatus="penSwitch"
:canvasId="`c-${madiaId}`"
......@@ -17,15 +9,28 @@
>
<template slot="customContent">
<view class="layout-content">
<view class="title">{{title}}</view>
<image
:class="['content',modeName]"
:src="views[viewIndex].detailUrl"
/>
<image
:class="['bg',modeName]"
:src="views[viewIndex].bgUrl"
<page-title
:title="title"
:hasCarBrand="hasCarBrand"
:show="show"
/>
<template v-if="hasCarBrand">
<image
class="content"
:src="views[customerInfo.carModelId] || require('@/assets/images/media/nothing.webp')"
/>
</template>
<template v-else>
<image
class="content"
:src="views[0].detailUrl"
/>
<image
class="bg"
:src="views[0].bgUrl"
/>
</template>
</view>
</template>
</wnCanvas>
......@@ -33,42 +38,35 @@
</template>
<script type='text/ecmascript-6'>
import Tabs from './Tabs.vue'
import PageTitle from './PageTitle.vue'
export default {
props: {
views: Array,
views: [Array, Object],
penSwitch: Boolean,
title: String,
madiaId: Number,
isByd: Boolean
isByd: Boolean,
show: Boolean,
hasCarBrand: Boolean
},
components: {
Tabs
PageTitle
},
name: 'MediaComponent',
data () {
return {
viewIndex: 0,
modeName: ''
}
},
watch: {
},
computed: {
customerInfo () {
return this.$store.state.user.customerInfo
},
},
mounted () {
},
methods: {
changeTab (index) {
if (this.viewIndex == index) return
let { viewIndex } = this
this.modeName = viewIndex > index ? 'to-left' : 'to-right'
this.viewIndex = index
this.$refs.canvasRef.clearBoard()
setTimeout(() => {
this.modeName = ''
}, 300)
}
}
}
</script>
......@@ -82,19 +80,6 @@ export default {
position: relative;
margin: $margin;
}
.title {
position: absolute;
left: 0;
top: toRpx(112);
font-weight: 700;
font-size: toRpx(48);
color: #1a1a1a;
letter-spacing: toRpx(4);
line-height: toRpx(64);
text-align: center;
width: 100%;
z-index: 2;
}
.content {
position: absolute;
width: 100%;
......@@ -108,35 +93,5 @@ export default {
left: 0;
top: 0;
}
.tabs-box {
width: toRpx(1112);
position: absolute;
top: toRpx(228);
left: 50%;
transform: translateX(-50%);
z-index: 100;
}
}
.to-left {
animation: to-left 0.25s forwards;
}
.to-right {
animation: to-right 0.25s forwards;
}
@keyframes to-left {
0% {
left: -100%;
}
100% {
left: 0;
}
}
@keyframes to-right {
0% {
left: 100%;
}
100% {
left: 0;
}
}
</style>
\ No newline at end of file
<template>
<view class="page-title-box flex">
{{title}}
<view
class="car-options flex"
v-if="hasCarBrand"
@click="$refs.carBrandListVisible.open()"
>
{{customerInfo.carModel}}
<view class="sprite-icon icon-arrow-bottom"></view>
</view>
<car-brands
ref="carBrandListVisible"
@select="handleSelect($event,'carBrandListVisible')"
/>
</view>
</template>
<script type='text/ecmascript-6'>
import CarBrands from '@/components/CarBrands.vue'
export default {
components: { CarBrands },
name: 'PageTitle',
props: {
title: String,
hasCarBrand: Boolean,
show: Boolean
},
data () {
return {
customerInfo: {}
}
},
watch: {
show: {
immediate: true,
handler (newval) {
if (newval && this.hasCarBrand && !this.customerInfo.carModel && this.watchChannelType == 1) this.$refs.carBrandListVisible.autoSelect()
}
},
watchCustomerInfo: {
immediate: true,
handler (newval) {
if (newval) this.customerInfo = newval
}
},
},
computed: {
watchCustomerInfo () {
return this.$store.state.user.customerInfo
},
watchStatus () {
return this.$store.state.user.historyStatus
},
watchChannelType () {
// 默认1 1问界 2 比亚迪 3 其他
return uni.$storage.get('userInfo').channelType
}
},
mounted () {
},
methods: {
handleSelect (item, popkey) {
this.$refs[popkey].close()
this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name
this.customerInfo.carModelId = item.id
this.$store.dispatch('setCustomerInfo', this.customerInfo)
},
}
}
</script>
<style scoped lang='scss'>
.page-title-box {
justify-content: center;
position: absolute;
height: toRpx(96);
left: 0;
top: toRpx(48);
font-weight: 500;
font-size: toRpx(36);
color: #333;
text-align: center;
width: 100%;
z-index: 2;
.car-options {
&::before {
content: '';
width: 2rpx;
height: 36rpx;
opacity: 1;
background: #333333;
margin: 0 24rpx;
}
}
}
</style>
\ No newline at end of file
<template>
<view :class="['layout',`${isByd?'byd-layout':'aito-layout'}`]">
<view :class="['layout',`${isByd?'byd-layout':''}`]">
<wnCanvas
saveImageType="3"
canvasId="c-1"
......@@ -60,10 +60,18 @@
</template>
</view>
</view>
<image
:class="['content-image']"
:src="views[viewIndex].detailUrl"
/>
<template v-if="isByd">
<image
class="content-image"
:src="views[0].detailUrl"
/>
</template>
<template v-else>
<image
class="content-image"
:src="views[customerInfo.carModelId] || require('@/assets/images/media/nothing.webp')"
/>
</template>
</view>
</view>
</template>
......@@ -85,7 +93,7 @@ export default {
penSwitch: Boolean,
show: Boolean,
title: String,
views: Array,
views: [Array, Object],
isByd: Boolean,
},
name: 'Reception',
......@@ -115,7 +123,6 @@ export default {
],
customerInfo: {},
focusIndex: -1,
viewIndex: 0,
}
},
watch: {
......@@ -149,6 +156,7 @@ export default {
} else {
this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name
this.customerInfo.carModelId = item.id
}
this.resetFocusIndex()
this.$store.dispatch('setCustomerInfo', this.customerInfo)
......
......@@ -21,7 +21,7 @@
<template slot="customContent">
<view class="layout-content">
<view class="title">{{title}}</view>
<view class="title flex">{{title}}</view>
<view class="container">
<view class="left-tab">
<view
......@@ -155,14 +155,14 @@ export default {
position: relative;
}
.title {
justify-content: center;
position: absolute;
height: toRpx(96);
left: 0;
top: toRpx(112);
font-weight: 700;
font-size: toRpx(48);
color: #1a1a1a;
letter-spacing: toRpx(4);
line-height: toRpx(64);
top: toRpx(48);
font-weight: 500;
font-size: toRpx(36);
color: #333;
text-align: center;
width: 100%;
z-index: 2;
......
......@@ -6,28 +6,85 @@
* @LastEditTime: 2024-12-25 18:52:46
-->
<template>
<view class="detail-box" @dblclick="dbClick">
<view class="nav-bar" :style="{ 'z-index': backZindex }">
<view class="back" @click="back">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
<view
class="detail-box"
@dblclick="dbClick"
>
<view
class="nav-bar"
:style="{ 'z-index': backZindex }"
>
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view>
</view>
<template v-for="(item, index) in media">
<view :class="['view', { showView: id == item.id }, modeName]" :key="index" @touchstart.stop="touchStart" @touchend.stop="touchEnd">
<component @full="handleFull" :detail="item" :is="item.componentName" :views="item.receptionSourceDetailList || []" :penSwitch="penSwitch" :show="id == item.id" :ref="'media' + item.id" :title="item.detailTitle || ''" :madiaId="item.id" @scale="scale" :ulList="item.ulList" :screenList="item.screenList" @onProductModel="productModelStatus = $event" :isPreview="isPreview" :isByd="isByd" />
<view
:class="['view', { showView: id == item.id }, modeName]"
:key="index"
@touchstart.stop="touchStart"
@touchend.stop="touchEnd"
>
<component
@full="handleFull"
:detail="item"
:is="item.componentName"
:views="item.receptionSourceDetailList || []"
:penSwitch="penSwitch"
:show="id == item.id"
:ref="'media' + item.id"
:title="item.detailTitle || ''"
:madiaId="item.id"
@scale="scale"
:ulList="item.ulList"
:screenList="item.screenList"
@onProductModel="productModelStatus = $event"
:isPreview="isPreview"
:isByd="isByd"
:hasCarBrand="item.hasCarBrand"
/>
</view>
</template>
<template v-if="type != 'preview'">
<template v-if="backZindex">
<tool-box ref="toolRef" :data="toolList" :type="type" @choose="choose" @finish="open" :id="id" @toPay="toPay" :showPayBtn="watchPayInfo" />
<view class="pen-box" @click="drawStatus = !drawStatus">
<tool-box
ref="toolRef"
:data="pageToolList"
:type="type"
@choose="choose"
@finish="open"
:id="id"
@toPay="toPay"
:showPayBtn="watchPayInfo"
/>
<view
class="pen-box"
@click="drawStatus = !drawStatus"
>
<view :class="['sprite-icon', `${!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]"></view>
</view>
</template>
</template>
<pay-pop ref="pay" @jumpPay="showPayPage = true"></pay-pop>
<finish-step ref="stepRef" @submit="done" :titleTips="finishTips" />
<informationEntry :showPayPage.sync="showPayPage" @finish="open" />
<pay-pop
ref="pay"
@jumpPay="showPayPage = true"
></pay-pop>
<finish-step
ref="stepRef"
@submit="done"
:titleTips="finishTips"
/>
<informationEntry
:showPayPage.sync="showPayPage"
@finish="open"
/>
</view>
</template>
<script>
......@@ -65,10 +122,11 @@ export default {
type: String,
default: 'preview'
},
toolList: Array
toolList: Array,
aitoCarModelIds: Array
},
mixins: [receptionTrackMixin],
data() {
data () {
return {
backZindex: 9,
drawStatus: false,
......@@ -78,60 +136,83 @@ export default {
scaleValueObject: {},
showPayPage: false,
productModelStatus: false,
modeName: ''
modeName: '',
pageToolList: []
}
},
computed: {
watchStatus() {
channelType () {
const { channelType } = uni.$storage.get('userInfo')
return channelType
},
watchStatus () {
return this.$store.state.user.historyStatus
},
penSwitch() {
penSwitch () {
return !this.isPreview && this.drawStatus
},
watchPayInfo() {
watchPayInfo () {
return this.$store.state.user.paymentType.length ? true : false
},
title() {
title () {
let { id } = this,
name = this.media.find(e => e.id == id)?.detailTitle || ''
return name
},
finishTips() {
const { channelType } = uni.$storage.get('userInfo')
finishTips () {
let text = ''
if (channelType == 3) text = '检测到“汽车保险告知书”中未填写客户档案,请填写后再完成接待。'
if (this.channelType == 3) text = '检测到“汽车保险告知书”中未填写客户档案,请填写后再完成接待。'
return text
},
isByd() {
const { channelType } = uni.$storage.get('userInfo')
return channelType == 2
isByd () {
return this.channelType == 2
},
isPreview() {
isPreview () {
return this.type == 'preview'
}
},
CarModelId () {
return this.$store.state.user.customerInfo.carModelId
},
},
watch: {
watchStatus: {
immediate: true,
handler(newval) {
handler (newval) {
if (newval) this.drawStatus = false
}
}
},
CarModelId: {
immediate: true,
handler (newval) {
if (this.channelType == 1) {
const isAito = this.aitoCarModelIds.findIndex(e => e == newval)
if (isAito == -1) {
this.pageToolList = this.toolList.filter(e => !e.isAito)
} else this.pageToolList = this.toolList
}
}
},
toolList: {
immediate: true,
handler (newval) {
this.pageToolList = newval
}
},
},
mounted() {
mounted () {
const systemInfo = uni.getSystemInfoSync()
this.screenWidth = systemInfo.screenWidth
},
methods: {
...mapMutations('audio', ['setReceptionStatus']),
open() {
open () {
this.$refs.stepRef.open()
},
handleFull(val) {
handleFull (val) {
this.backZindex = val ? 0 : 9
},
/**切换素材 */
choose(e) {
choose (e) {
Object.keys(this.$refs).map(refKey => {
let ref = this.$refs[refKey]
if (ref) {
......@@ -143,42 +224,42 @@ export default {
this.$emit('update:id', e.id)
uni.$logger.local.info(`预览${e.title}`)
},
back() {
back () {
this.$refs?.toolRef?.hide()
this.$emit('back')
},
done(e) {
done (e) {
this.showPayPage = false
this.$refs.toolRef.hide()
this.$refs.stepRef.close()
this.receptionTrackLeave()
this.$emit('done', e)
},
toPay() {
toPay () {
this.$refs.pay.show()
},
dbClick() {
dbClick () {
if (!this.isPreview) this.drawStatus = !this.drawStatus
},
touchStart(e) {
touchStart (e) {
if (!this.drawStatus && e.changedTouches?.length) {
this.startX = e.changedTouches[0].pageX
this.startY = e.changedTouches[0].pageY
}
},
touchEnd(e) {
touchEnd (e) {
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
let { pageToolList, drawStatus, startX, screenWidth, id, scaleValueObject, productModelStatus } = this
if (!e || !e.changedTouches || drawStatus || pageToolList.length == 0 || e.changedTouches.length === 0) return
let halfScreenWidth = screenWidth / 2,
touch = e.changedTouches[0],
isDistanceSignificant = Math.abs(touch.pageX - startX) > screenWidth / 6,
index = toolList.findIndex(item => item.id == id)
index = pageToolList.findIndex(item => item.id == id)
if (Math.abs(this.startY - touch.pageY) > 150) return
if (!scaleValueObject[id]) scaleValueObject[id] = 1
if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1 && !productModelStatus) {
const { nextId, modeName, title } = this.getNextId(index, toolList, startX, halfScreenWidth)
const { nextId, modeName, title } = this.getNextId(index, pageToolList, startX, halfScreenWidth)
this.modeName = modeName
this.receptionTrackLeave()
this.$emit('update:id', nextId)
......@@ -191,14 +272,14 @@ export default {
console.log(error)
}
},
getNextId(index, toolList, startX, halfScreenWidth) {
getNextId (index, pageToolList, startX, halfScreenWidth) {
let nextItem = {},
modeName = ''
if (startX > halfScreenWidth) {
nextItem = index === toolList.length - 1 ? toolList[0] : toolList[index + 1]
nextItem = index === pageToolList.length - 1 ? pageToolList[0] : pageToolList[index + 1]
modeName = 'to-right'
} else {
nextItem = index === 0 ? toolList[toolList.length - 1] : toolList[index - 1]
nextItem = index === 0 ? pageToolList[pageToolList.length - 1] : pageToolList[index - 1]
modeName = 'to-left'
}
return {
......@@ -207,7 +288,7 @@ export default {
title: nextItem.title
}
},
scale(e) {
scale (e) {
let { id } = this
this.scaleValueObject[id] = e
}
......@@ -228,12 +309,14 @@ export default {
left: 0;
top: toRpx(48);
z-index: 9;
pointer-events: none;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
}
.pen-box {
......
<template>
<view>
<home-frame @preview="preview" @start="start" ref="home" :id="id" @openStep="openStep" @backHome="backHome" @changeTab="changeTab">
<view class="module-box" slot="module">
<home-frame
@preview="preview"
@start="start"
ref="home"
:id="id"
@openStep="openStep"
@backHome="backHome"
@changeTab="changeTab"
>
<view
class="module-box"
slot="module"
>
<template v-for="(i, index) in moduleList">
<view :key="index" :class="['item', i.class]" :style="i.style" @click="toDetail(i)" v-if="!i.hide">
<view
:key="index"
:class="['item', i.class]"
:style="i.style"
@click="toDetail(i)"
v-if="!i.hide"
>
<template v-if="i.showAlt">
<view class="item-text flex">{{ i.title }}</view>
</template>
<template v-else>
<image class="item-img" :src="i.thumbnail" mode="scaleToFill" @error="errorImg(index)" />
<image
class="item-img"
:src="i.thumbnail"
mode="scaleToFill"
@error="errorImg(index)"
/>
</template>
</view>
</template>
</view>
<template slot="detail">
<detail :id.sync="id" :media="moduleList" :type.sync="type" :toolList="toolList" @back="back" @done="done" ref="detail" />
<detail
:id.sync="id"
:media="moduleList"
:type.sync="type"
:toolList="toolList"
:aitoCarModelIds="aitoCarModelIds"
@back="back"
@done="done"
ref="detail"
/>
</template>
<template slot="content">
<!-- <novice-guide
......@@ -42,7 +73,7 @@ import HomeFrame from '@/components/HomeFrame/index.vue'
export default {
// mixins: [storge],
components: { HomeFrame, detail, NoviceGuide },
data() {
data () {
return {
moduleList: [],
toolList: [],
......@@ -50,16 +81,17 @@ export default {
type: '',
chooseItem: {},
tabIndex: 0,
recording: false
recording: false,
aitoCarModelIds:[]
}
},
computed: {
channelType() {
channelType () {
const { channelType } = uni.$storage.get('userInfo')
return channelType || 1 //默认问界
}
},
onBackPress(options) {
onBackPress (options) {
if (options.from === 'backbutton') {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
......@@ -69,12 +101,12 @@ export default {
// 其他情况允许正常返回
return false
},
onLoad() {
onLoad () {
this.setViewInfo()
this.getSoure()
this.get_Vehicle_Sales_Data()
},
onShow() {
onShow () {
const userInfo = uni.$storage.get('userInfo')
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm('userInfo')
......@@ -88,11 +120,11 @@ export default {
},
methods: {
...mapMutations('audio', ['setReceptionStatus']),
init() {
init () {
this.findPayInfo()
},
/**获取车型&销售数据 */
get_Vehicle_Sales_Data() {
get_Vehicle_Sales_Data () {
const userInfo = uni.$storage.get('userInfo'),
storageCarBrandList = uni.$storage.get('carBrandList'),
storageEmployeeList = uni.$storage.get('employeeList'),
......@@ -128,7 +160,7 @@ export default {
},
// 查询素材
// 查询素材
async getSoure() {
async getSoure () {
/**比亚迪 */
if (this.channelType == 2) {
let { moduleList, toolList } = await uni.$api.systemApi.getBydMockData(true)
......@@ -177,7 +209,7 @@ export default {
)
this.setViewInfo(moduleList, toolList)
} else {
let { moduleList, toolList, default_moduleList, default_toolList, boutiqueDefaultCarBrandId } = await uni.$api.systemApi.getMockData(true)
let { moduleList, toolList, default_moduleList, default_toolList, boutiqueDefaultCarBrandId,aitoCarModelIds } = await uni.$api.systemApi.getMockData(true)
if (this.channelType == 3) {
let configList
try {
......@@ -217,14 +249,19 @@ export default {
)
this.setViewInfo(default_moduleList, default_toolList)
} else {
this.aitoCarModelIds = aitoCarModelIds
/**默认问界 */
moduleList = await Promise.all(
moduleList.map(async e => ({
...e,
receptionSourceDetailList: e.receptionSourceDetailList ? await uni.$api.systemApi.imgToBase64(e.receptionSourceDetailList, 'detailUrl') : undefined,
carTypeList: e.carTypeList ? await uni.$api.systemApi.imgToBase64(e.carTypeList, 'url') : undefined,
screenList: e.screenList ? await uni.$api.systemApi.imgToBase64(e.screenList, 'url') : undefined
}))
moduleList.map(async e => {
const receptionSourceDetailListType = Array.isArray(e.receptionSourceDetailList)
return {
...e,
receptionSourceDetailList: e.receptionSourceDetailList ? await uni.$api.systemApi.imgToBase64(e.receptionSourceDetailList,
receptionSourceDetailListType ? 'detailUrl' : '', receptionSourceDetailListType) : undefined,
carTypeList: e.carTypeList ? await uni.$api.systemApi.imgToBase64(e.carTypeList, 'url') : undefined,
screenList: e.screenList ? await uni.$api.systemApi.imgToBase64(e.screenList, 'url') : undefined
}
})
)
toolList = await uni.$api.systemApi.imgToBase64(toolList, 'shortTitleUrl')
uni.$api.systemApi.updateMockData(
......@@ -240,11 +277,11 @@ export default {
}
}
},
errorImg(index) {
errorImg (index) {
this.moduleList[index].showAlt = true
},
async start() {
async start () {
if (this.recording) return
uni.showLoading({
mask: true
......@@ -267,14 +304,14 @@ export default {
uni.hideLoading()
}, 1e3)
},
toDetail(item) {
toDetail (item) {
this.chooseItem = item
this.$refs.home.previewRef.open()
},
cancel() {
cancel () {
this.$refs.home.previewRef.close()
},
preview() {
preview () {
let { id, title } = this.chooseItem
this.type = 'preview'
this.id = id
......@@ -282,7 +319,7 @@ export default {
this.cancel()
},
// 完成接待
done(e) {
done (e) {
this.$refs.home.finishRef.close()
if (this.recording) this.$refs.home.stopAudio()
this.recording = false
......@@ -294,14 +331,14 @@ export default {
this.$store.dispatch('clearReceptionTrack')
}, 1500)
},
back() {
back () {
const detailRef = this.$refs.detail
if (detailRef.showPayPage) return (detailRef.showPayPage = false)
if (!this.id) return uni.navigateBack()
if (this.type != 'preview') return this.$refs.home.finishRef.open()
this.backHome()
},
backHome() {
backHome () {
if (this.recording) this.$refs.home.stopAudio(true)
this.$refs.home.finishRef.close()
this.id = ''
......@@ -310,23 +347,23 @@ export default {
this.init()
this.recording = false
},
nextStep() {
nextStep () {
let { id } = this.moduleList[0]
this.type = 'preview'
this.id = id
},
clearHistory() {
clearHistory () {
this.$store.dispatch('clearCustomerInfo')
this.$store.dispatch('clearHistory')
this.$refs.home.setBooks([])
this.$store.dispatch('clearReceptionTrack')
},
openStep() {
openStep () {
this.$refs.home.finishRef.close()
this.$refs.detail.open()
},
// 查询门店支付配置
async findPayInfo() {
async findPayInfo () {
const { shopMerchantId } = uni.$storage.get('userInfo')
const data = await uni.$api.commonApi.findPayInfo({
merchantId: shopMerchantId
......@@ -350,13 +387,13 @@ export default {
})
this.$store.dispatch('setPaymentType', paymentType)
},
changeTab(index) {
changeTab (index) {
this.tabIndex = index
if (index == 0) this.init()
},
/**按序加载车型 */
async getCarBrandsList(carBrandList, index) {
async getCarBrandsList (carBrandList, index) {
const item = carBrandList[index]
if (!item) return
const carList = uni.getStorageSync(`${item.id}_${item.brandId}_carlist`)
......@@ -373,7 +410,7 @@ export default {
}
},
/**素材内容 */
setViewInfo(_moduleList, _toolList) {
setViewInfo (_moduleList, _toolList) {
if (_moduleList && _toolList) {
this.moduleList = _moduleList
this.toolList = _toolList
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!