Commit a1b94837 by 李伟康

commit 提交

1 parent e55b423c
...@@ -28,6 +28,7 @@ export default { ...@@ -28,6 +28,7 @@ export default {
uni.hideLoading() uni.hideLoading()
this.flag = true; this.flag = true;
this.isEnd = true this.isEnd = true
throw error;
} }
}, },
}, },
......
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
font-weight: 500; font-weight: 700;
font-size: 32rpx; font-size: 32rpx;
color: #ffffff; color: #ffffff;
} }
......
...@@ -497,7 +497,7 @@ export default { ...@@ -497,7 +497,7 @@ export default {
} }
.text { .text {
line-height: 112rpx; line-height: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 80rpx; font-size: 80rpx;
color: #333333; color: #333333;
} }
......
...@@ -204,7 +204,7 @@ export default { ...@@ -204,7 +204,7 @@ export default {
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
font-weight: 500; font-weight: 700;
font-size: 32rpx; font-size: 32rpx;
color: #1a1a1a; color: #1a1a1a;
} }
......
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
position: absolute; position: absolute;
left: 0; left: 0;
top: 112rpx; top: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 48rpx; font-size: 48rpx;
color: #1a1a1a; color: #1a1a1a;
letter-spacing: 4rpx; letter-spacing: 4rpx;
......
<template> <template>
<view :class="['layout',{ 'byd-layout':isByd } ]"> <view :class="['layout',{ 'byd-layout':isByd } ]">
<view class="title">{{ title }}</view> <view class="title">{{ title }}</view>
<template v-if="views&&views.length > 1">
<view class="tabs-box">
<tabs
:list="views"
@tabclick="changeTab"
></tabs>
</view>
</template>
<template v-if="list.length > 0"> <template v-if="list.length > 0">
<scroll-view <scroll-view
class="record-box" :class="['record-box',{'has-tabs':views && views.length > 1}]"
scroll-y scroll-y
:scroll-top="scrollTop" :scroll-top="scrollTop"
@scrolltolower="pageonReachBottom" @scrolltolower="pageonReachBottom"
...@@ -75,18 +83,22 @@ ...@@ -75,18 +83,22 @@
<script> <script>
import utils from '@/utils/utils'; import utils from '@/utils/utils';
import Record from "@/mixin/record"; import Record from "@/mixin/record";
import Tabs from './Tabs.vue'
export default { export default {
components: {
Tabs
},
name: 'History', name: 'History',
mixins: [Record], mixins: [Record],
props: { props: {
title: String, title: String,
madiaId: Number, madiaId: Number,
show: Boolean, show: Boolean,
isByd: Boolean isByd: Boolean,
views: Array,
}, },
data () { data () {
return { return {
isEnd: false,
shopMerchantId: '', shopMerchantId: '',
goodsName: null, goodsName: null,
scrollTop: 0 scrollTop: 0
...@@ -108,30 +120,11 @@ export default { ...@@ -108,30 +120,11 @@ export default {
}, 100); }, 100);
} }
}, },
watchCarModel: {
immediate: true,
handler (newval) {
if (this.madiaId == 4) {
// this.list = uni.$storage.get("historyList")
let index = {
'问界M5': 'M5',
'问界M7': 'M7',
'问界M9': 'M9'
}[newval]
this.list = []
this.pageNum = 1
return this.goodsName = index || null
}
}
}
}, },
computed: { computed: {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
watchCarModel () {
return this.$store.state.user.customerInfo.carModel
}
}, },
mounted () { mounted () {
if (this.show) this.init() if (this.show) this.init()
...@@ -140,14 +133,15 @@ export default { ...@@ -140,14 +133,15 @@ export default {
init () { init () {
const { shopMerchantId } = uni.$storage.get("userInfo"); const { shopMerchantId } = uni.$storage.get("userInfo");
this.shopMerchantId = shopMerchantId this.shopMerchantId = shopMerchantId
if (this.pageNum == 1) this.getQuotationList();
if (this.list.length == 0) { if (this.list.length == 0) {
this.list = uni.getStorageSync(`${this.shopMerchantId}-historyList`) this.list = uni.getStorageSync(`${this.shopMerchantId}-historyList`)
this.isEnd = true this.isEnd = true
} }
if (this.pageNum == 1) this.getQuotationList();
}, },
async getQuotationList () { async getQuotationList () {
const { goodsName, shopMerchantId, pageNum, pageSize } = this const { goodsName, shopMerchantId, pageNum, pageSize } = this
try {
await this.getList('getQuotationList', { await this.getList('getQuotationList', {
merchantId: shopMerchantId, merchantId: shopMerchantId,
pageNum, pageNum,
...@@ -155,19 +149,10 @@ export default { ...@@ -155,19 +149,10 @@ export default {
goodsName, goodsName,
orderStatus: 3, orderStatus: 3,
}) })
if (pageNum == 1) { if (!goodsName && this.pageNum == 1 && this.list.length) uni.setStorageSync(`${shopMerchantId}-historyList`, this.list)
uni.setStorageSync(`${shopMerchantId}-historyList`, this.list) } catch (error) {
if (goodsName && this.list.length == 0) { if (!goodsName && this.pageNum == 1) this.list = uni.getStorageSync(`${this.shopMerchantId}-historyList`)
await this.getList('getQuotationList', {
merchantId: shopMerchantId,
pageNum,
pageSize,
goodsName: null,
orderStatus: 3,
})
}
} }
// if (pageNum == 1) uni.setStorageSync(`${shopMerchantId}-historyList`, this.list)
}, },
pageonReachBottom () { pageonReachBottom () {
this.isEnd = false this.isEnd = false
...@@ -185,6 +170,15 @@ export default { ...@@ -185,6 +170,15 @@ export default {
accDiv (val) { accDiv (val) {
return utils.accDiv(val || 0, 100) return utils.accDiv(val || 0, 100)
}, },
changeTab (index) {
let { views } = this,
goodsName = index == 0 ? null : views[index].tabName
if (this.goodsName == goodsName) return
this.list = []
this.pageNum = 1
this.goodsName = goodsName
this.getQuotationList()
}
} }
} }
</script> </script>
...@@ -196,12 +190,20 @@ export default { ...@@ -196,12 +190,20 @@ export default {
position: relative; position: relative;
background-image: url('@/assets/images/media/media-bg.webp'); background-image: url('@/assets/images/media/media-bg.webp');
background-size: 100%; background-size: 100%;
position: relative;
.tabs-box {
width: 1160rpx;
position: absolute;
top: 228rpx;
left: 50%;
transform: translateX(-50%);
z-index: 100;
}
.title { .title {
position: absolute; position: absolute;
left: 0; left: 0;
top: 112rpx; top: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 48rpx; font-size: 48rpx;
color: #1a1a1a; color: #1a1a1a;
letter-spacing: 4rpx; letter-spacing: 4rpx;
...@@ -215,7 +217,9 @@ export default { ...@@ -215,7 +217,9 @@ export default {
height: 100%; height: 100%;
padding-top: 244rpx; padding-top: 244rpx;
} }
.has-tabs {
padding-top: 360rpx;
}
.card-list { .card-list {
display: grid; display: grid;
grid-template-columns: repeat(3, 1fr); grid-template-columns: repeat(3, 1fr);
...@@ -267,8 +271,10 @@ export default { ...@@ -267,8 +271,10 @@ export default {
.value { .value {
font-size: 24rpx; font-size: 24rpx;
color: #666666; color: #666666;
margin-left: auto;
} }
.price { .price {
margin-left: auto;
display: flex; display: flex;
align-items: baseline; align-items: baseline;
font-weight: 500; font-weight: 500;
...@@ -280,13 +286,7 @@ export default { ...@@ -280,13 +286,7 @@ export default {
} }
} }
.image-box { .image-box {
position: absolute; display: none;
right: 0rpx;
top: 0rpx;
width: 252rpx;
height: 364rpx;
border-radius: 0 32rpx 32rpx 0;
z-index: -1;
} }
.gradient-overlay { .gradient-overlay {
z-index: -1; z-index: -1;
...@@ -324,4 +324,25 @@ export default { ...@@ -324,4 +324,25 @@ export default {
margin-top: 24rpx; margin-top: 24rpx;
} }
} }
.byd-layout {
.card-list {
.card-item {
.image-box {
display: block;
position: absolute;
right: 0rpx;
top: 0rpx;
width: 252rpx;
height: 364rpx;
border-radius: 0 32rpx 32rpx 0;
z-index: -1;
}
.card-info {
.value,.price {
margin-left: 0;
}
}
}
}
}
</style> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view class="layout"> <view class="layout">
<template v-if="views.length>1">
<view class="tabs-box">
<tabs
:list="views"
@tabclick="changeTab"
></tabs>
</view>
</template>
<wnCanvas <wnCanvas
:drawStatus="penSwitch" :drawStatus="penSwitch"
:canvasId="`c-${madiaId}`" :canvasId="`c-${madiaId}`"
custom custom
@scale="$emit('scale',$event)" @scale="$emit('scale',$event)"
ref="canvasRef"
> >
<template slot="customContent"> <template slot="customContent">
<view class="title">{{title}}</view> <view class="title">{{title}}</view>
<image <image
class="content" :class="['content',modeName]"
:src="views[viewIndex].detailUrl" :src="views[viewIndex].detailUrl"
/> />
</template> </template>
...@@ -18,42 +27,42 @@ ...@@ -18,42 +27,42 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import Tabs from './Tabs.vue'
export default { export default {
props: { props: {
views: Array, views: Array,
penSwitch: Boolean, penSwitch: Boolean,
title: String, title: String,
madiaId: Number, madiaId: Number,
isByd: Boolean
},
components: {
Tabs
}, },
name: 'MediaComponent', name: 'MediaComponent',
data () { data () {
return { return {
viewIndex: 0 viewIndex: 0,
modeName: ''
} }
}, },
watch: { watch: {
watchCarModel: {
immediate: true,
handler (newval) {
if (this.madiaId == 3) {
let index = {
'问界M5': 0,
'问界M7': 1,
'问界M9': 2
}[newval]
return this.viewIndex = index || 0
}
}
}
}, },
computed: { computed: {
watchCarModel () {
return this.$store.state.user.customerInfo.carModel
}
}, },
mounted () { mounted () {
}, },
methods: { 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> </script>
...@@ -67,7 +76,7 @@ export default { ...@@ -67,7 +76,7 @@ export default {
position: absolute; position: absolute;
left: 0; left: 0;
top: 112rpx; top: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 48rpx; font-size: 48rpx;
color: #1a1a1a; color: #1a1a1a;
letter-spacing: 4rpx; letter-spacing: 4rpx;
...@@ -81,5 +90,35 @@ export default { ...@@ -81,5 +90,35 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.tabs-box {
width: 1112rpx;
position: absolute;
top: 228rpx;
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> </style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<view :class="['layout',{'byd-layout':isByd}]"> <view :class="['layout',`${isByd?'byd-layout':'aito-layout'}`]">
<wnCanvas <wnCanvas
saveImageType="3" saveImageType="3"
canvasId="c-1" canvasId="c-1"
...@@ -8,13 +8,6 @@ ...@@ -8,13 +8,6 @@
@scale="$emit('scale',$event)" @scale="$emit('scale',$event)"
> >
<template slot="customContent"> <template slot="customContent">
<view class="carType">
<image
:src="carImg"
class="img slide-bl"
:key="imgKey"
/>
</view>
<view class="title"> <view class="title">
<view :class="['sprite-icon',`${isByd?'icon-byd':'icon-aito'}`]"></view> <view :class="['sprite-icon',`${isByd?'icon-byd':'icon-aito'}`]"></view>
<view class="text">{{title}}</view> <view class="text">{{title}}</view>
...@@ -97,7 +90,6 @@ export default { ...@@ -97,7 +90,6 @@ export default {
show: Boolean, show: Boolean,
title: String, title: String,
views: Array, views: Array,
carTypeList: Array,
isByd: Boolean isByd: Boolean
}, },
name: 'Reception', name: 'Reception',
...@@ -127,7 +119,6 @@ export default { ...@@ -127,7 +119,6 @@ export default {
], ],
customerInfo: {}, customerInfo: {},
focusIndex: -1, focusIndex: -1,
imgKey: Date.now(),
} }
}, },
watch: { watch: {
...@@ -148,14 +139,6 @@ export default { ...@@ -148,14 +139,6 @@ export default {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
carImg () {
let name = {
'问界M5': 0,
'问界M7': 1,
'问界M9': 2
}[this.customerInfo.carModel]
return this.carTypeList[name || 0]?.url || ''
}
}, },
methods: { methods: {
inputCustomer () { inputCustomer () {
...@@ -170,7 +153,6 @@ export default { ...@@ -170,7 +153,6 @@ export default {
this.$refs.carBrandListVisible.close() this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name this.customerInfo.carModel = item.name
} }
this.imgKey = Date.now()
this.resetFocusIndex() this.resetFocusIndex()
this.$store.dispatch('setCustomerInfo', this.customerInfo) this.$store.dispatch('setCustomerInfo', this.customerInfo)
}, },
...@@ -196,19 +178,6 @@ export default { ...@@ -196,19 +178,6 @@ export default {
height: 100vh; height: 100vh;
background-image: url('@/assets/images/media/reception-bg.webp'); background-image: url('@/assets/images/media/reception-bg.webp');
background-size: 100%; background-size: 100%;
.carType {
width: 864rpx;
height: 707rpx;
position: absolute;
right: 0;
top: 0;
z-index: 2;
.img {
width: 100%;
height: 100%;
vertical-align: top;
}
}
.title { .title {
padding: 160rpx 0 32rpx 110rpx; padding: 160rpx 0 32rpx 110rpx;
.sprite-icon { .sprite-icon {
...@@ -216,7 +185,7 @@ export default { ...@@ -216,7 +185,7 @@ export default {
} }
.text { .text {
line-height: 112rpx; line-height: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 80rpx; font-size: 80rpx;
color: #333333; color: #333333;
} }
...@@ -306,52 +275,6 @@ export default { ...@@ -306,52 +275,6 @@ export default {
} }
} }
} }
// 车动画
/* ----------------------------------------------
* Generated by Animista on 2024-6-26 14:45:52
* Licensed under FreeBSD License.
* See http://animista.net/license for more info.
* w: http://animista.net, t: @cssanimista
* ---------------------------------------------- */
/**
* ----------------------------------------
* animation slide-bl
* ----------------------------------------
*/
@-webkit-keyframes slide-bl {
0% {
-webkit-transform: translateY(-100%) translateX(-100%);
transform: translateY(-100%) translateX(-100%);
opacity: 0.2;
filter: blur(0.5px);
}
100% {
-webkit-transform: translateY(0) translateX(0);
transform: translateY(0) translateX(0);
opacity: 1;
filter: blur(0);
}
}
@keyframes slide-bl {
0% {
-webkit-transform: translateY(-100%) translateX(100%) scale(0.5);
transform: translateY(-100%) translateX(100%) scale(0.5);
opacity: 0.2;
filter: blur(0.5px);
}
100% {
-webkit-transform: translateY(0) translateX(0);
transform: translateY(0) translateX(0);
opacity: 1;
filter: blur(0);
}
}
.slide-bl {
-webkit-animation: slide-bl 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
animation: slide-bl 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.byd-layout { .byd-layout {
background-image: url('@/assets/images/media/byd-reception-bg.webp') !important; background-image: url('@/assets/images/media/byd-reception-bg.webp') !important;
...@@ -364,4 +287,32 @@ export default { ...@@ -364,4 +287,32 @@ export default {
} }
} }
} }
.aito-layout {
.title {
padding: 112rpx 0 40rpx 112rpx;
}
.content {
.form-box {
position: fixed;
right: 72rpx;
top: 188rpx;
padding: 0;
}
.views-box{
margin-top: 0;
display: flex;
flex-wrap: wrap;
padding: 0 38rpx;
gap: 0;
justify-content: flex-start;
.item{
width: 1132rpx;
.img{
width: 100%;
height: 100%;
}
}
}
}
}
</style> </style>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</template> </template>
<view <view
class="border" class="border"
:style="borderLeft" :style="`${borderStyle}width:calc(${100 / list.length}% - 4rpx)`"
></view> ></view>
</view> </view>
</template> </template>
...@@ -30,9 +30,22 @@ export default { ...@@ -30,9 +30,22 @@ export default {
data () { data () {
return { return {
tabIndex: 0, tabIndex: 0,
borderLeft: 'display:none;', borderStyle: '',
} }
}, },
watch: {
watchStatus: {
immediate: true,
handler (newval) {
this.tabClick(0)
}
},
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
mounted () { mounted () {
this.init() this.init()
}, },
...@@ -48,17 +61,9 @@ export default { ...@@ -48,17 +61,9 @@ export default {
this.setBorderLeft() this.setBorderLeft()
}, },
setBorderLeft () { setBorderLeft () {
let { tabIndex } = this let { tabIndex, list } = this,
const query = uni.createSelectorQuery().in(this) blockWidth = 100 / list.length
query this.borderStyle = `left:${blockWidth * tabIndex}%;`
.select(`#tab-${tabIndex}`)
.boundingClientRect((data) => {
this.borderLeft = `left:${data.left}px;`
setTimeout(() => {
this.borderLeft += `display:block;`
}, 100)
}).exec()
} }
} }
} }
...@@ -66,49 +71,45 @@ export default { ...@@ -66,49 +71,45 @@ export default {
<style scoped lang='scss'> <style scoped lang='scss'>
.tabs { .tabs {
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 100%; height: 76rpx;
gap: 0 32rpx; background: #ffffff59;
margin-bottom: 32rpx; box-shadow: inset 0 0 16rpx 0 #ffffff;
border-radius: 16rpx;
backdrop-filter: blur(8rpx);
position: relative; position: relative;
padding: 4rpx;
.tab { .tab {
width: 384rpx; flex: 1;
height: 80rpx; height: 100%;
background: #ffffff; background: transparent;
border: 2rpx solid #fff; font-size: 28rpx;
font-size: 32rpx; color: #1f2133;
color: #292d33;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
transition: all 0.15s; transition: all 0.15s;
border-radius: 16rpx;
} }
.active { .active {
// border: 4rpx solid #292d33;
font-weight: 500; font-weight: 500;
color: #292d33; color: #ffffff;
} }
.border { .border {
width: 384rpx;
height: 80rpx;
border: 4rpx solid #292d33;
box-sizing: border-box;
position: absolute; position: absolute;
height: calc(100% - 8rpx);
background-image: linear-gradient(180deg, #6795ff 0%, #4a84f9 100%);
box-shadow: 0 8rpx 24rpx 0 #849dc240;
left: 0; left: 0;
top: 0; top: 50%;
transform: translate(4rpx, -50%);
border-radius: 16rpx;
z-index: -1;
transition: all 0.15s; transition: all 0.15s;
z-index: 3;
} }
} }
.skeleton-box{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: #000;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
position: absolute; position: absolute;
left: 0; left: 0;
top: 112rpx; top: 112rpx;
font-weight: 500; font-weight: 700;
font-size: 48rpx; font-size: 48rpx;
color: #1a1a1a; color: #1a1a1a;
letter-spacing: 4rpx; letter-spacing: 4rpx;
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
:ref="'media' + item.id" :ref="'media' + item.id"
:title="item.detailTitle || ''" :title="item.detailTitle || ''"
:madiaId="item.id" :madiaId="item.id"
:carTypeList="item.carTypeList || []"
@scale="scale" @scale="scale"
:ulList="item.ulList" :ulList="item.ulList"
:screenList="item.screenList" :screenList="item.screenList"
......
...@@ -205,10 +205,6 @@ export default { ...@@ -205,10 +205,6 @@ export default {
e.receptionSourceDetailList, e.receptionSourceDetailList,
"detailUrl" "detailUrl"
) : undefined, ) : undefined,
carTypeList: e.carTypeList ? await uni.$api.systemApi.imgToBase64(
e.carTypeList,
"url"
) : undefined,
screenList: e.screenList ? await uni.$api.systemApi.imgToBase64( screenList: e.screenList ? await uni.$api.systemApi.imgToBase64(
e.screenList, e.screenList,
"url" "url"
...@@ -228,16 +224,16 @@ export default { ...@@ -228,16 +224,16 @@ export default {
this.moduleList[index].showAlt = true; this.moduleList[index].showAlt = true;
}, },
async start () { async start () {
const result = await this.$permision.requestAndroidPermission( // const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO" // "android.permission.RECORD_AUDIO"
); // );
if (result !== 1) { // if (result !== 1) {
uni.showToast({ // uni.showToast({
title: "为了记录语音通话,请打开录音权限", // title: "为了记录语音通话,请打开录音权限",
icon: "none", // icon: "none",
}); // });
return; // return;
} // }
this.getSoure(); this.getSoure();
this.clearHistory(); this.clearHistory();
this.$refs.home.startAudio(); this.$refs.home.startAudio();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!