Commit 5d70dfb5 by 李伟康

commit 修改

1 parent dc407240
No preview for this file type
No preview for this file type
......@@ -17,7 +17,7 @@
</view>
{{ i.label }}
<view class="dot" v-if="i.icon == 'record' && perRecordNumber"></view>
<view class="tip-box" v-if="i.icon == 'study' && readCount" @click="readCount = 0">待办事项:{{ readCount }}</view>
<view class="tip-box" v-if="i.icon == 'study' && readCount" @click.stop="readCount = 0">待办事项:{{ readCount }}</view>
</view>
</template>
</view>
......
......@@ -8,17 +8,39 @@
-->
<template>
<view class="layout">
<wnCanvas :drawStatus="penSwitch" :canvasId="`c-${madiaId}`" custom @scale="$emit('scale', $event)" ref="canvasRef">
<wnCanvas
:drawStatus="penSwitch"
:canvasId="`c-${madiaId}`"
custom
@scale="$emit('scale', $event)"
ref="canvasRef"
>
<template slot="customContent">
<view class="layout-content">
<page-title :title="title" :hasCarBrand="hasCarBrand" :show="show" />
<page-title
:title="title"
:hasCarBrand="hasCarBrand"
:show="show"
/>
<template v-if="hasCarBrand">
<image :key="viewKey" class="content" :src="views[customerInfo.carModelId] || require('@/assets/images/media/nothing.webp')" />
<image
:key="viewKey"
class="content"
:src="views[customerInfo.carModelId] || require('@/assets/images/media/nothing.webp')"
/>
</template>
<template v-else>
<template v-if="views">
<image v-if="views.detailUrl" class="content" :src="views.detailUrl" />
<image v-if="views.bgUrl" class="bg" :src="views.bgUrl" />
<image
v-if="views.detailUrl"
class="content"
:src="views.detailUrl"
/>
<!-- <image
v-if="views.bgUrl"
class="bg"
:src="views.bgUrl"
/> -->
</template>
</template>
</view>
......
<template>
<view :class="['layout',`${isByd?'byd-layout':''}`]">
<view :class="['layout']">
<wnCanvas
saveImageType="3"
canvasId="c-1"
......@@ -64,10 +64,10 @@
class="content-image"
:src="contentUrl()"
/>
<image
<!-- <image
class="content-bg"
:src="receptionBg(customerInfo.carModelId)"
/>
:src="receptionBg()"
/> -->
</view>
</view>
</template>
......@@ -90,7 +90,6 @@ export default {
show: Boolean,
title: String,
views: [Array, Object],
isByd: Boolean,
aitoCarModelIds: Array
},
name: 'Reception',
......@@ -129,11 +128,6 @@ export default {
if (newval) this.customerInfo = newval
}
},
show (n) {
// setTimeout(()=>{
// if (n && !this.customerInfo.carModel && !this.isByd) this.$refs.carBrandListVisible.autoSelect()
// },1e3)
}
},
computed: {
watchCustomerInfo () {
......@@ -180,12 +174,8 @@ export default {
}
this.inputCustomer()
},
receptionBg (carModelId) {
let { views } = this
const isAito = this.aitoCarModelIds.findIndex(e => e == carModelId)
let bgUrl = require('@/assets/images/common/aito-bg.webp')
if (isAito == -1) bgUrl = require('@/assets/images/common/zj-xj-bg.webp')
if (Array.isArray(views)) { bgUrl = views[0]?.bgUrl || '' }
receptionBg () {
let bgUrl = require('@/assets/images/common/home-bg.webp')
return bgUrl
},
contentUrl () {
......@@ -304,7 +294,4 @@ export default {
}
}
}
.byd-layout {
background-image: url('@/assets/images/media/byd-reception-bg.webp') !important;
}
</style>
......@@ -143,15 +143,17 @@ export default {
uni.$api.commonApi.getMerchantCarBrandList([shopMerchantId]).then(({ data }) => {
let list = data[0].carBrandList,
carBrandList = [],
brandIdList = []
brandIdList = [],
subBrandIdList = []
list?.map(e => {
e.childs.map(i => {
i.brandId = e.id
carBrandList.push(i)
subBrandIdList.push(i.id)
})
brandIdList.push(e.id)
})
this.getSoure(brandIdList)
this.getSoure(brandIdList , subBrandIdList)
this.$store.dispatch('setCarBrandsList', carBrandList)
uni.$storage.set('carBrandList', carBrandList)
if (carBrandList.length) {
......@@ -169,12 +171,13 @@ export default {
})
},
// 查询素材
async getSoure (brandIdList) {
async getSoure (brandIdList, subBrandIdList) {
const { shopMerchantId, sceneType } = this
let data = uni.getStorageSync(`source_${sceneType}_${shopMerchantId}`)
if (data) this.setViewInfo(data)
let requestData = await uni.$api.systemApi.getSoureData(shopMerchantId, sceneType, {
brandIdList
brandIdList,
subBrandIdList
})
if (requestData) this.setViewInfo(requestData)
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!