Commit a1b94837 by 李伟康

commit 提交

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