Commit 526dcf0f by 李伟康

commit 提交

1 parent 198fed9f
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<view class="select-title">{{ i.labelName }}</view> <view class="select-title">{{ i.labelName }}</view>
<view class="select-box"> <view class="select-box">
<view <view
class="select-item" class="select-item flex"
:class="{ checked: checkedItem(item) }" :class="{ checked: checkedItem(item) }"
@click="handleSelect(item)" @click="handleSelect(item)"
v-for="(item, ind) in i.nextList" v-for="(item, ind) in i.nextList"
...@@ -133,14 +133,16 @@ export default { ...@@ -133,14 +133,16 @@ export default {
gap: 20rpx; gap: 20rpx;
.select-item { .select-item {
text-align: center; text-align: center;
height: 68rpx; justify-content: center;
line-height: 68rpx;
opacity: 1; opacity: 1;
border: 2rpx solid #dce0e6; border: 2rpx solid #dce0e6;
color: #292d33; color: #292d33;
font-size: 28rpx; font-size: 28rpx;
border-radius: 8rpx; border-radius: 8rpx;
position: relative; position: relative;
box-sizing: border-box;
padding:13rpx 40rpx;
word-break: break-all;
.sprite-icon { .sprite-icon {
display: none; display: none;
position: absolute; position: absolute;
......
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
handler (newval) { handler (newval) {
this.$refs.popupRef?.close() this.$refs.popupRef?.close()
this.flag = false this.flag = false
this.scrollTop = 1000 this.scrollTop = -1
setTimeout(() => { setTimeout(() => {
this.scrollTop = 0 this.scrollTop = 0
}, 100); }, 100);
......
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
right: 40rpx; right: 40rpx;
top: calc(5% + 140rpx); top: calc(5% + 140rpx);
z-index: 998; z-index: 998;
width: 128rpx; width: 120rpx;
.btn { .btn {
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
......
...@@ -66,20 +66,6 @@ ...@@ -66,20 +66,6 @@
} }
}, },
{ {
"path": "pages/boutique/membranes",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/boutique/productDetail",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/boutique/history", "path": "pages/boutique/history",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
......
<template>
<view class="views-box">
<view class="views-title-box flex">
<template v-for="(i,index) in viewsTitle">
<view
:class="['title-item flex row',`row-${index + 1}`]"
:key="index"
>
<template v-if="!i">
<view
:class="['check-box flex',{'checked':allChecked}]"
@click="chooseAll"
>
<uni-icons
type="checkmarkempty"
:size="10"
:color="`${allChecked?'#fff':'transparent'}`"
></uni-icons>
</view>
</template>
<template v-else>
{{i}}
</template>
</view>
</template>
</view>
<view class="views-content">
<scroll-view
class="table"
scroll-y
:scroll-top="scrollTop"
>
<!-- <template v-if="optionals[this.currentCar].length"> -->
<template v-for="(i,index) in optionalsList">
<view
class="optional-item"
:key="index"
>
<view
class="row-1 flex"
@click="choose(i,index)"
>
<view :class="['check-box flex',{'checked':i.checked}]">
<uni-icons
type="checkmarkempty"
:size="10"
:color="`${i.checked?'#fff':'transparent'}`"
></uni-icons>
</view>
</view>
<view class="row row-2">
{{i.name}}
</view>
<view class="row row-3">
<rich-text :nodes="i.warranty"></rich-text>
</view>
<view class="row row-4">
{{i.price}}
</view>
</view>
</template>
<!-- </template>
<template v-else>
<view class="nothing flex">
<view class="sprite-icon icon-no-insurance-data"></view>
暂无数据
</view>
</template> -->
</scroll-view>
</view>
<view class="views-footer">
<view class="price flex">
总价:¥
<view class="total">{{total}}</view>
</view>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
import NP from 'number-precision'
export default {
props: {
currentCar: String,
show: Boolean
},
data () {
return {
viewsTitle: ['', '产品名称', '质保', '售价'],
scrollTop: 0,
optionalsList: []
}
},
watch: {
watchStatus: {
immediate: true,
handler (newval) {
this.optionalsList = []
this.scrollTop = -1
setTimeout(() => {
this.scrollTop = 0
}, 100);
}
},
currentCar: {
immediate: true,
handler (newval) {
console.log(newval)
this.optionalsList = []
this.init()
}
},
show: {
immediate: true,
handler (newval) {
if (newval) {
if (this.optionalsList.length) return
this.init()
} else this.optionalsList = []
}
},
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
allChecked () {
let flag = false
if (this.show) flag = this.optionalsList.filter(item => item.checked).length == this.optionalsList.length
return flag
},
total () {
let total = 0
if (this.show) total = Number(this.optionalsList.reduce((pre, cur) => {
return NP.plus(pre, NP.times(cur.price, cur.checked ? 1 : 0))
}, 0))
return total ? total.toFixed(2) : '0.00'
},
boutiqueMediaConfig () {
return this.$store.state.user.boutiqueMediaConfig
},
},
mounted () {
},
methods: {
init () {
if(!this.show) return
let { optionals } = this.boutiqueMediaConfig[this.currentCar]
optionals.map(e => e.checked = false)
this.optionalsList = optionals
console.log(this.optionalsList)
this.$forceUpdate()
},
chooseAll () {
let { allChecked } = this
this.optionalsList.map(e => {
e.checked = allChecked ? false : true
})
},
choose (item, index) {
this.optionalsList[index].checked = !item.checked
},
}
}
</script>
<style scoped lang='scss'>
.views-box {
width: 2186rpx;
height: calc(100vh - 236rpx);
box-sizing: border-box;
margin: 236rpx auto 0;
.views-title-box {
height: 96rpx;
background: #edf2ff;
border-radius: 16rpx;
margin-bottom: 16rpx;
.title-item {
height: 96rpx;
box-sizing: border-box;
flex-shrink: 0;
font-size: 26rpx;
color: #666666;
}
}
.check-box {
width: 32rpx;
height: 32rpx;
background: transparent;
border: 2rpx solid #999;
border-radius: 6rpx;
box-sizing: border-box;
justify-content: center;
overflow: hidden;
transition: all 0.25s;
flex-shrink: 0;
}
.checked {
background: #2c66f7;
border-color: #2c66f7;
}
.row {
padding: 26rpx 32rpx;
display: flex;
align-items: center;
}
.row-1 {
width: 96rpx;
justify-content: center;
padding: 26rpx 0;
}
.row-2 {
width: 1380rpx;
border-right: 2rpx solid #fff;
border-left: 2rpx solid #fff;
}
.row-3 {
width: 400rpx;
}
.row-4 {
border-left: 2rpx solid #fff;
width: 304rpx;
}
.views-content {
height: calc(100% - 292rpx);
display: flex;
box-sizing: border-box;
position: relative;
background: #f7f7f7;
border-radius: 16rpx;
.table {
height: 100%;
.optional-item {
border-bottom: 2rpx solid #ffffff;
position: relative;
display: flex;
font-size: 28rpx;
color: #333333;
// &:last-child {
// border: none;
// }
}
.disabled {
.name,
.range {
color: #999999;
}
.cost {
&-input {
border-color: #d8dce6;
.input,
.unit {
color: #cccccc;
}
}
}
}
.disabled-input {
.cost {
&-input {
border-color: #d8dce6;
.input,
.unit {
color: #cccccc;
}
}
}
}
}
.nothing {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
justify-content: center;
flex-direction: column;
font-size: 26rpx;
color: #808291;
.sprite-icon {
margin-bottom: 24rpx;
}
}
}
.views-footer {
height: 180rpx;
background: #ffffff;
box-sizing: border-box;
font-weight: 500;
font-size: 32rpx;
color: #333333;
line-height: 44rpx;
display: flex;
align-items: flex-start;
.price {
margin-top: 44rpx;
}
.total {
font-weight: 700;
font-size: 48rpx;
line-height: 64rpx;
margin-left: 8rpx;
}
.total-btn {
margin: 16rpx 0 0 auto;
width: 480rpx;
height: 96rpx;
background-image: linear-gradient(180deg, #61c0ff 0%, #2c66f7 100%);
box-shadow: inset 0 0 32rpx 0 #ffffff;
border-radius: 16rpx;
font-weight: 500;
font-size: 36rpx;
color: #ffffff;
line-height: 44rpx;
justify-content: center;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view class="layout"> <view class="layout">
<wnCanvas
:canvasId="`c-${madiaId}`"
:drawStatus="penSwitch"
custom
@scale="$emit('scale',$event)"
:scaleSwitch="false"
ref="receptionCanvas"
>
<template slot="customContent">
<view class="tab-box flex"> <view class="tab-box flex">
<template v-for="(item, index) in carList"> <template v-for="(item, index) in carList">
<view <view
...@@ -18,7 +27,10 @@ ...@@ -18,7 +27,10 @@
风险告知 风险告知
<view class="sprite-icon icon-info_shield"></view> <view class="sprite-icon icon-info_shield"></view>
</view> </view>
<view class="content-box flex"> <view
class="content-box flex"
v-show="tabIndex == 0"
>
<template v-if="currentItem && currentItem.modelDisplayPicurl"> <template v-if="currentItem && currentItem.modelDisplayPicurl">
<view <view
class="left-content" class="left-content"
...@@ -48,7 +60,7 @@ ...@@ -48,7 +60,7 @@
<sku-box <sku-box
:currentCar="currentCarString" :currentCar="currentCarString"
:defaultTabId="tabId" :defaultTabId="tabId"
:show="show" :show="show && tabIndex == 0"
@changePreView="changePreView" @changePreView="changePreView"
ref="sku" ref="sku"
/> />
...@@ -60,6 +72,25 @@ ...@@ -60,6 +72,25 @@
>{{couponText}}</view> >{{couponText}}</view>
</view> </view>
</view> </view>
<optional-table
v-show="tabIndex == 1"
:currentCar="currentCarString"
:show="show && tabIndex == 1"
></optional-table>
<template v-if="hasOptionals">
<view class="tabs-box flex">
<template v-for="(i,index) in tabs">
<view
:class="['tab flex',{active:index==tabIndex}]"
:key="index"
@click="changeTab(index)"
>{{i}}</view>
</template>
<view :class="['block',{'block-right':tabIndex == 1}]"></view>
</view>
</template>
</template>
</wnCanvas>
<car-brands <car-brands
ref="carBrandRef" ref="carBrandRef"
@select="handleSelect" @select="handleSelect"
...@@ -83,12 +114,13 @@ import SkuBox from './SkuBox.vue' ...@@ -83,12 +114,13 @@ import SkuBox from './SkuBox.vue'
import CarBrands from '@/components/CarBrands.vue' import CarBrands from '@/components/CarBrands.vue'
import CouponPop from './CouponPop.vue' import CouponPop from './CouponPop.vue'
import RiskInformedBox from './RiskInformedBox.vue' import RiskInformedBox from './RiskInformedBox.vue'
import OptionalTable from './OptionalTable.vue'
const m5 = require("@/assets/images/boutique/index/m5.png") const m5 = require("@/assets/images/boutique/index/m5.png")
const m7 = require("@/assets/images/boutique/index/m7.png") const m7 = require("@/assets/images/boutique/index/m7.png")
const m9 = require("@/assets/images/boutique/index/m9.png") const m9 = require("@/assets/images/boutique/index/m9.png")
export default { export default {
name: 'Reception', name: 'Reception',
components: { SkuBox, CarBrands, CouponPop, RiskInformedBox }, components: { SkuBox, CarBrands, CouponPop, RiskInformedBox, OptionalTable },
props: { props: {
customerType: Number, customerType: Number,
show: Boolean, show: Boolean,
...@@ -96,6 +128,8 @@ export default { ...@@ -96,6 +128,8 @@ export default {
currentCar: String, currentCar: String,
type: String, type: String,
popupImg: String, popupImg: String,
madiaId: Number,
penSwitch: Boolean,
}, },
data () { data () {
return { return {
...@@ -105,7 +139,9 @@ export default { ...@@ -105,7 +139,9 @@ export default {
updateViewKey: Date.now(), updateViewKey: Date.now(),
carInfo: {}, carInfo: {},
currentImgUrl: '', currentImgUrl: '',
currentItem: null currentItem: null,
tabs: ['加装', '选装'],
tabIndex: 0
} }
}, },
watch: { watch: {
...@@ -124,6 +160,7 @@ export default { ...@@ -124,6 +160,7 @@ export default {
currentCarString: { currentCarString: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
if (!this.hasOptionals && this.tabIndex == 1) this.tabIndex = 0
this.defaultImg = { this.defaultImg = {
'M5': m5, 'M5': m5,
'M7': m7, 'M7': m7,
...@@ -140,6 +177,7 @@ export default { ...@@ -140,6 +177,7 @@ export default {
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
this.tabIndex = 0
this.currentItem = null this.currentItem = null
this.closeAllPopup() this.closeAllPopup()
} }
...@@ -148,7 +186,7 @@ export default { ...@@ -148,7 +186,7 @@ export default {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
if (newval) { if (newval) {
if (newval && this.currentItem) this.changePreView(this.currentItem, false) if (newval && this.currentItem && this.tabIndex == 0) this.changePreView(this.currentItem, false)
} }
} }
} }
...@@ -178,6 +216,14 @@ export default { ...@@ -178,6 +216,14 @@ export default {
}, },
receptionTrack () { receptionTrack () {
return this.$store.state.user.receptionTrack return this.$store.state.user.receptionTrack
},
boutiqueMediaConfig () {
return this.$store.state.user.boutiqueMediaConfig
},
hasOptionals () {
let flag = false
if(this.show) flag = this.boutiqueMediaConfig[this.currentCarString].optionals && this.boutiqueMediaConfig[this.currentCarString].optionals.length
return flag
} }
}, },
...@@ -187,7 +233,7 @@ export default { ...@@ -187,7 +233,7 @@ export default {
if (this.change_disabled || this.currentCarString == item) return uni.hideLoading() if (this.change_disabled || this.currentCarString == item) return uni.hideLoading()
this.currentCarString = item this.currentCarString = item
this.updateViewKey = Date.now() this.updateViewKey = Date.now()
this.clearCanvas()
}, },
changePreView (e, leave = true) { changePreView (e, leave = true) {
let { currentItem } = this, let { currentItem } = this,
...@@ -198,6 +244,7 @@ export default { ...@@ -198,6 +244,7 @@ export default {
this.currentItem = e this.currentItem = e
this.updateViewKey = Date.now() this.updateViewKey = Date.now()
if (this.isPreview) return if (this.isPreview) return
this.clearCanvas()
if (value) { if (value) {
value.openCount += 1 value.openCount += 1
value.entryTime = Date.now() value.entryTime = Date.now()
...@@ -246,6 +293,16 @@ export default { ...@@ -246,6 +293,16 @@ export default {
}, },
clearSkuState () { clearSkuState () {
this.$refs.sku.requested = false this.$refs.sku.requested = false
},
clearCanvas () {
this.$refs.receptionCanvas.clearBoard()
},
changeTab (index) {
if (this.tabIndex == index) return
this.tabIndex = index
if (index == 1) this.previewLeave(this.currentItem)
else this.$refs.sku.changeCar(this.currentCarString)
this.clearCanvas()
} }
} }
} }
...@@ -377,5 +434,45 @@ export default { ...@@ -377,5 +434,45 @@ export default {
} }
} }
} }
.tabs-box {
position: fixed;
top: 156rpx;
left: 80rpx;
width: 212rpx;
height: 64rpx;
background: #f2f2f2;
border-radius: 40rpx;
box-sizing: border-box;
border: 2rpx solid #f2f2f2;
.tab {
width: 50%;
height: 100%;
justify-content: center;
font-size: 28rpx;
color: #666666;
line-height: 44rpx;
position: relative;
z-index: 2;
transition: all 0.15s;
}
.active {
font-weight: 500;
color: #ffffff;
}
.block {
position: absolute;
top: 50%;
left: 0;
transform: translateY(-50%);
width: 50%;
height: 100%;
background: #333333;
border-radius: 40rpx;
transition: all 0.15s;
}
.block-right {
left: 50%;
}
}
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view class="sku-content"> <view class="sku-content">
<view :class="['first-type-box flex',firstClass(boutiqueMediaConfig[currentCar])]"> <view :class="['first-type-box flex',firstClass(list)]">
<view :class="['block',blockClass]"></view> <view :class="['block',blockClass]"></view>
<template v-for="(i,index) in boutiqueMediaConfig[currentCar]"> <template v-for="(i,index) in list">
<view <view
:class="['first-type-item flex',{active:i.tabId == tabId}]" :class="['first-type-item flex',{active:i.tabId == tabId}]"
:key="index" :key="index"
...@@ -121,10 +121,7 @@ export default { ...@@ -121,10 +121,7 @@ export default {
currentCar: { currentCar: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
if (this.show && this.requested) { if (this.show && this.requested) this.changeCar(newval)
let [item] = this.boutiqueMediaConfig[newval]
this.changeTabId(item.tabId, 0, false)
}
} }
}, },
show: { show: {
...@@ -152,13 +149,21 @@ export default { ...@@ -152,13 +149,21 @@ export default {
}, },
boutiqueMediaConfig () { boutiqueMediaConfig () {
return this.$store.state.user.boutiqueMediaConfig return this.$store.state.user.boutiqueMediaConfig
},
list(){
let item = this.boutiqueMediaConfig[this.currentCar]
return item?.retrofitting || []
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
changeCar (newval) {
let [item] = this.boutiqueMediaConfig[newval].retrofitting
this.changeTabId(item.tabId, 0, false)
},
init (tabId) { init (tabId) {
let index = this.boutiqueMediaConfig[this.currentCar].findIndex(e => e.tabId == tabId) let index = this.boutiqueMediaConfig[this.currentCar].retrofitting.findIndex(e => e.tabId == tabId)
this.changeTabId(tabId, index, false) this.changeTabId(tabId, index, false)
}, },
changeTabId (tabId, index, filter = true) { changeTabId (tabId, index, filter = true) {
...@@ -168,7 +173,7 @@ export default { ...@@ -168,7 +173,7 @@ export default {
this.setSecondList() this.setSecondList()
}, },
async setSecondList () { async setSecondList () {
let secondList = this.boutiqueMediaConfig[this.currentCar], let secondList = this.boutiqueMediaConfig[this.currentCar].retrofitting,
index = secondList.findIndex(e => e.tabId == this.tabId) index = secondList.findIndex(e => e.tabId == this.tabId)
if (index == -1) index = 0 if (index == -1) index = 0
let { list } = secondList[index] let { list } = secondList[index]
......
...@@ -6,7 +6,10 @@ ...@@ -6,7 +6,10 @@
* @LastEditTime: 2024-05-31 16:07:23 * @LastEditTime: 2024-05-31 16:07:23
--> -->
<template> <template>
<view class="detail-box"> <view
class="detail-box"
@dblclick="dbClick"
>
<view class="nav-bar"> <view class="nav-bar">
<view <view
class="back" class="back"
...@@ -43,6 +46,7 @@ ...@@ -43,6 +46,7 @@
:type="type" :type="type"
:popupImg="item.popupImg" :popupImg="item.popupImg"
@preview="onPreview" @preview="onPreview"
:penSwitch="penSwitch"
/> />
</view> </view>
</template> </template>
...@@ -54,9 +58,17 @@ ...@@ -54,9 +58,17 @@
@choose="choose" @choose="choose"
@finish="open" @finish="open"
:id="id" :id="id"
toolStyle="top:calc(50% - 160rpx);" toolStyle="top:calc(50% - 24rpx);"
/> />
</template> </template>
<template v-if="!isPreview">
<view
class="pen-box"
@click="drawStatus = !drawStatus"
>
<view :class="['sprite-icon', `${!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]"> </view>
</view>
</template>
<finish-step <finish-step
ref="stepRef" ref="stepRef"
@submit="done" @submit="done"
...@@ -77,7 +89,6 @@ ...@@ -77,7 +89,6 @@
<script> <script>
import ToolBox from "@/components/ToolBox.vue"; import ToolBox from "@/components/ToolBox.vue";
import FinishStep from "@/components/FinishStep.vue"; import FinishStep from "@/components/FinishStep.vue";
import Membranes from "./membranes.vue";
import Reception from "./components/Reception.vue"; import Reception from "./components/Reception.vue";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import invitation from "./invitation.vue"; import invitation from "./invitation.vue";
...@@ -90,7 +101,6 @@ export default { ...@@ -90,7 +101,6 @@ export default {
components: { components: {
ToolBox, ToolBox,
FinishStep, FinishStep,
Membranes,
Reception, Reception,
invitation, invitation,
Case, Case,
...@@ -114,10 +124,17 @@ export default { ...@@ -114,10 +124,17 @@ export default {
data () { data () {
return { return {
showPreview: false, showPreview: false,
mediaObject: null mediaObject: null,
drawStatus: false,
}; };
}, },
watch: { watch: {
watchStatus: {
immediate: true,
handler (newval) {
if (newval) this.drawStatus = false
}
},
}, },
computed: { computed: {
title () { title () {
...@@ -134,6 +151,12 @@ export default { ...@@ -134,6 +151,12 @@ export default {
watchCustomerInfo () { watchCustomerInfo () {
return this.$store.state.user.customerInfo return this.$store.state.user.customerInfo
}, },
penSwitch () {
return !this.isPreview && this.drawStatus
},
isPreview () {
return this.type == 'preview'
}
}, },
mounted () { mounted () {
}, },
...@@ -219,7 +242,7 @@ export default { ...@@ -219,7 +242,7 @@ export default {
detailUrl: materialUrl detailUrl: materialUrl
} }
this.showPreview = true this.showPreview = true
if (this.type == 'preview') return if (this.isPreview) return
let key = `case-${materialFormat}-${id}`, let key = `case-${materialFormat}-${id}`,
value = this.receptionTrack[key] value = this.receptionTrack[key]
if (value) { if (value) {
...@@ -239,7 +262,7 @@ export default { ...@@ -239,7 +262,7 @@ export default {
}, },
onPreviewBack () { onPreviewBack () {
this.showPreview = false this.showPreview = false
if (this.type == 'preview') return this.mediaObject = null if (this.isPreview) return this.mediaObject = null
const { materialFormat, id } = this.mediaObject, const { materialFormat, id } = this.mediaObject,
key = `case-${materialFormat}-${id}`, key = `case-${materialFormat}-${id}`,
value = this.receptionTrack[key] value = this.receptionTrack[key]
...@@ -268,7 +291,10 @@ export default { ...@@ -268,7 +291,10 @@ export default {
if (customerType == 0 && !watchCustomerInfo.phoneNumber) flag = false if (customerType == 0 && !watchCustomerInfo.phoneNumber) flag = false
} }
return flag return flag
} },
dbClick () {
if (!this.isPreview) this.drawStatus = !this.drawStatus
},
}, },
}; };
</script> </script>
...@@ -327,7 +353,19 @@ export default { ...@@ -327,7 +353,19 @@ export default {
left: 0; left: 0;
} }
} }
.tool-box { .pen-box {
top: 284rpx; position: fixed;
right: 40rpx;
top: calc(50% - 160rpx);
width: 120rpx;
height: 120rpx;
z-index: 10;
box-shadow: 0 4px 12px 0 #00000033;
border-radius: 16rpx;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
} }
</style> </style>
...@@ -243,9 +243,15 @@ export default { ...@@ -243,9 +243,15 @@ export default {
}).then(({ materials, hidePackage }) => { }).then(({ materials, hidePackage }) => {
uni.hideLoading() uni.hideLoading()
let boutiqueMediaConfig = { let boutiqueMediaConfig = {
M5: [], M5: {
M7: [], retrofitting: []
M9: [], },
M7: {
retrofitting: []
},
M9: {
retrofitting: []
}
} }
materials.map(e => { materials.map(e => {
const configItems = [ const configItems = [
...@@ -254,15 +260,21 @@ export default { ...@@ -254,15 +260,21 @@ export default {
] ]
if (!hidePackage) configItems.unshift({ key: 'packages', configIndex: 0 }) if (!hidePackage) configItems.unshift({ key: 'packages', configIndex: 0 })
configItems.map(item => { configItems.map(item => {
boutiqueMediaConfig[e.carModelName].push({ boutiqueMediaConfig[e.carModelName].retrofitting.push({
...defaultConfig[item.configIndex], ...defaultConfig[item.configIndex],
list: e[item.key] list: e[item.key],
}) })
}) })
e.optionals?.map(item => {
item.checked = false
})
boutiqueMediaConfig[e.carModelName].optionals = e.optionals
}) })
this.carBannerList.map(e => { this.carBannerList.map(e => {
e.configList = boutiqueMediaConfig[e.title] e.configList = boutiqueMediaConfig[e.title].retrofitting
}) })
console.log(boutiqueMediaConfig)
this.$store.state.user.boutiqueMediaConfig = boutiqueMediaConfig this.$store.state.user.boutiqueMediaConfig = boutiqueMediaConfig
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
......
<template>
<view style="font-size: 0;">
<!-- :src="require('@/assets/images/boutique/detail.webp')" -->
<image
class="detail-img"
:src="detailUrl"
mode="widthFix"
/>
<view class="nav-bar">
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="32"
></uni-icons>
</view>
</view>
</view>
</template>
<script type="text/ecmascript-6">
export default {
name: '',
data () {
return {
detailUrl: ''
}
},
onLoad (options) {
console.log(options, ' =')
this.detailUrl = options.detailUrl
},
methods: {
back () {
uni.navigateBack({
delta: 1
})
}
},
}
</script>
<style scoped lang="scss">
.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;
font-weight: 700;
}
}
.detail-img {
width: 100%;
height: auto;
object-fit: cover;
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -338,7 +338,7 @@ export default { ...@@ -338,7 +338,7 @@ export default {
background-image: url('@/assets/images/common/page-bg.webp'); background-image: url('@/assets/images/common/page-bg.webp');
background-size: 100%; background-size: 100%;
box-sizing: border-box; box-sizing: border-box;
padding-top: 176rpx; padding-top: 160rpx;
.nav-bar { .nav-bar {
position: fixed; position: fixed;
width: 100%; width: 100%;
...@@ -442,12 +442,15 @@ export default { ...@@ -442,12 +442,15 @@ export default {
font-size: 28rpx; font-size: 28rpx;
color: #292d33; color: #292d33;
line-height: 44rpx; line-height: 44rpx;
max-height: 50vh;
overflow-y: scroll;
word-break: break-all;
} }
} }
} }
} }
.case-box { .case-box {
height: 1004rpx; height: 1020rpx;
padding: 0 !important; padding: 0 !important;
.case-scroll-box { .case-scroll-box {
height: calc(100% - 104rpx); height: calc(100% - 104rpx);
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
:ulList="item.ulList" :ulList="item.ulList"
:screenList="item.screenList" :screenList="item.screenList"
@onProductModel="productModelStatus = $event" @onProductModel="productModelStatus = $event"
:isPreview="type == 'preview'" :isPreview="isPreview"
:isByd="isByd" :isByd="isByd"
/> />
</view> </view>
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
penSwitch () { penSwitch () {
return this.type != 'preview' && this.drawStatus return !this.isPreview && this.drawStatus
}, },
watchPayInfo () { watchPayInfo () {
return this.$store.state.user.paymentType.length ? true : false return this.$store.state.user.paymentType.length ? true : false
...@@ -152,6 +152,9 @@ export default { ...@@ -152,6 +152,9 @@ export default {
const { channelType } = uni.$storage.get("userInfo") const { channelType } = uni.$storage.get("userInfo")
return channelType == 2 return channelType == 2
}, },
isPreview(){
return this.type == 'preview'
}
}, },
watch: { watch: {
...@@ -198,7 +201,7 @@ export default { ...@@ -198,7 +201,7 @@ export default {
this.$refs.pay.show() this.$refs.pay.show()
}, },
dbClick () { dbClick () {
if (this.type != 'preview') this.drawStatus = !this.drawStatus if (!this.isPreview) this.drawStatus = !this.drawStatus
}, },
touchStart (e) { touchStart (e) {
if (!this.drawStatus && e.changedTouches?.length) { if (!this.drawStatus && e.changedTouches?.length) {
......
...@@ -229,7 +229,13 @@ export default { ...@@ -229,7 +229,13 @@ export default {
errorImg (index) { errorImg (index) {
this.moduleList[index].showAlt = true; this.moduleList[index].showAlt = true;
}, },
async start () { async start () {
if (this.recording) return
uni.showLoading({
mask: true
})
const result = await this.$permision.requestAndroidPermission( const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO" "android.permission.RECORD_AUDIO"
); );
...@@ -246,8 +252,10 @@ export default { ...@@ -246,8 +252,10 @@ export default {
this.id = this.moduleList[0].id; this.id = this.moduleList[0].id;
this.type = "edit"; this.type = "edit";
this.recording = true; this.recording = true;
setTimeout(() => {
uni.hideLoading();
}, 1e3)
}, },
toDetail (item) { toDetail (item) {
this.chooseItem = item; this.chooseItem = item;
this.$refs.home.previewRef.open(); this.$refs.home.previewRef.open();
......
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
}, },
setReceptionTrack ({ state }, { key, value }) { setReceptionTrack ({ state }, { key, value }) {
state.receptionTrack[key] = value state.receptionTrack[key] = value
// console.log(JSON.parse(JSON.stringify(state.receptionTrack))) console.log(JSON.parse(JSON.stringify(state.receptionTrack)))
}, },
clearReceptionTrack ({ state }) { clearReceptionTrack ({ state }) {
state.receptionTrack = {} state.receptionTrack = {}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!