Commit 18d21840 by 李伟康

refactor(HomeFrame): 重构首页组件并优化数据加载逻辑

- 重构了 LineBar、OutputValue 和 RecordList 组件
- 优化了数据加载和显示逻辑,增加了空数据和加载状态的处理
- 调整了部分样式,提高了用户体验
1 parent 06c0e607
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<page-tabs <page-tabs
:list="tabList" :list="tabList"
@changeTab="changeTab" @changeTab="changeTab"
size="small"
/> />
</view> </view>
<view class="canvas"> <view class="canvas">
...@@ -18,6 +19,16 @@ ...@@ -18,6 +19,16 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import PageTabs from '@/components/PageTabs.vue' import PageTabs from '@/components/PageTabs.vue'
const rateList = {
excellentStoreAvgDealRate: '优秀门店均值',
thisStoreDealRate: '本门店',
personalDealRate: '个人'
},
priceList = {
excellentStoreAvgDeal: '优秀门店均值',
thisStoreKdj: '本门店',
personalKdj: '个人'
}
export default { export default {
components: { components: {
PageTabs PageTabs
...@@ -44,10 +55,10 @@ export default { ...@@ -44,10 +55,10 @@ export default {
data () { data () {
return { return {
tabIndex: 0, tabIndex: 0,
tabList: ['本月成交率', '本月客单价'], tabList: Object.freeze(['本月交付成交率', '本月交付客单价']),
chartData: {}, chartData: {},
//您可以通过修改 config-ucharts.js 文件中下标为 ['bar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。 //您可以通过修改 config-ucharts.js 文件中下标为 ['bar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
opts: { opts: Object.freeze({
fontColor: '#333', fontColor: '#333',
fontSize: 10, fontSize: 10,
color: ["#2C66F7"], color: ["#2C66F7"],
...@@ -76,42 +87,49 @@ export default { ...@@ -76,42 +87,49 @@ export default {
barBorderCircle: true, barBorderCircle: true,
} }
} }
} })
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
getServerData () { getServerData () {
let { dataShow, tabIndex, pageData } = this, let { dataShow, tabIndex, pageData } = this
{
excellentStoreAvgDealRate, let list = [],
thisStoreDealRate, categories = [],
personalDealRate, data = [],
excellentStoreAvgDeal, defaultList = []
thisStoreKdj, if (tabIndex == 0) Object.keys(rateList).map(key => {
personalKdj list.push({
} = pageData, text: rateList[key],
data = tabIndex == 0 ? [ value: pageData[key]
excellentStoreAvgDealRate || 0, })
thisStoreDealRate || 0, })
personalDealRate || 0 else Object.keys(priceList).map(key => {
] : [ list.push({
excellentStoreAvgDeal || 0, text: priceList[key],
thisStoreKdj || 0, value: pageData[key]
personalKdj || 0 })
], })
series = { list.sort((a, b) => b.value - a.value)
list.map(e => {
categories.push(e.text)
data.push(e.value || 0)
defaultList.push(e.value == null)
})
let series = [{
defaultList,
hideData: !dataShow, hideData: !dataShow,
textSize: 14, textSize: 14,
textColor: '#333', textColor: '#333',
data data
} }]
if (tabIndex == 0) series.afterUnit = '%' if (tabIndex == 0) series[0].afterUnit = '%'
else series.beforeUnit = '¥' else series[0].beforeUnit = '¥'
this.chartData = { this.chartData = {
categories: ['优秀门店均值', '本门店', '个人'], categories,
series: [series], series,
} }
}, },
changeTab (index) { changeTab (index) {
......
...@@ -86,13 +86,14 @@ export default { ...@@ -86,13 +86,14 @@ export default {
}, },
methods: { methods: {
getServerData () { getServerData () {
let { dataShow } = this let { dataShow } = this,
this.opts.subtitle.name = `${NP.times(this.pageData.productionContribution || 0, 100)}%` data = this.pageData.productionContribution
this.opts.subtitle.name = data == null ? '--' : `${this.pageData.productionContribution}%`
this.chartData = { this.chartData = {
series: [ series: [
{ {
hideData: !dataShow, hideData: !dataShow,
data: this.pageData.productionContribution || 0 data: NP.divide(data || 0, 100)
} }
] ]
} }
...@@ -101,7 +102,7 @@ export default { ...@@ -101,7 +102,7 @@ export default {
let { dataShow, pageData } = this, let { dataShow, pageData } = this,
num = pageData[key] num = pageData[key]
if (unit && num) num += unit if (unit && num) num += unit
if (!dataShow || !num) num = '--' if (!dataShow || num == null) num = '--'
return num return num
} }
} }
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
{{item.orderFinishFlag? '成交': '战败'}} {{item.orderFinishFlag? '成交': '战败'}}
</view> </view>
</template> </template>
<template v-else> <!-- <template v-else>
<view :class="[ <view :class="[
'status flex', 'status flex',
{'disabled':item.receptionStatus !== 1 && item.receptionStatus !== 0 }, {'disabled':item.receptionStatus !== 1 && item.receptionStatus !== 0 },
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
未知 未知
</template> </template>
</view> </view>
</template> </template> -->
</view> </view>
<view class="name"> <view class="name">
{{ item.customerName ? item.customerName : '未填写姓名' }} {{ item.customerName ? item.customerName : '未填写姓名' }}
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
</view> </view>
</view> </view>
</view> </view>
<template v-if="showPageFlag">
<view class="customer-box box"> <view class="customer-box box">
<customer-flow <customer-flow
:pageData="pageData" :pageData="pageData"
...@@ -39,6 +40,17 @@ ...@@ -39,6 +40,17 @@
:pageData="pageData" :pageData="pageData"
/> />
</view> </view>
</template>
<template v-else>
<view class="loading flex">
<uni-icons
class="icon"
type="refreshempty"
:size="120"
color="#3773f8"
></uni-icons>
</view>
</template>
</view> </view>
<view class="right box-class"> <view class="right box-class">
<type-tab-component <type-tab-component
...@@ -130,27 +142,33 @@ export default { ...@@ -130,27 +142,33 @@ export default {
customerId: '', customerId: '',
pageData: { pageData: {
//门店客流 //门店客流
cumulativeDeliveryCount: 0, //累计交付数 // cumulativeDeliveryCount: 0, //累计交付数
actualContactCount: 0, // 实际触客数 // actualContactCount: 0, // 实际触客数
contactRate: 0, // 触客率(实际触客数 / 累计交付数) // contactRate: 0, // 触客率(实际触客数 / 累计交付数)
// excellentStoreAvgDealRate: 0, // 优秀门店均值成交率
// thisStoreDealRate: 0, // 本门店成交率
// personalDealRate: 0, // 个人成交率
excellentStoreAvgDealRate: 0, // 优秀门店均值成交率 // excellentStoreAvgDeal: 0, // 优秀门店均值客单价
thisStoreDealRate: 0, // 本门店成交率 // thisStoreKdj: 0, // 本门店客单价
personalDealRate: 0, // 个人成交率 // personalKdj: 0, // 个人客单价
excellentStoreAvgDeal: 0, // 优秀门店均值客单价
thisStoreKdj: 0, // 本门店客单价
personalKdj: 0, // 个人客单价
//本月产值 // //本月产值
actualProduction: 0, // 实际完成产值(万元) // actualProduction: 0, // 实际完成产值(万元)
personalProduction: 0, // 个人产值(累计成交金额) // personalProduction: 0, // 个人产值(累计成交金额)
targetProduction: 0, // 目标产值(万元) // targetProduction: 0, // 目标产值(万元)
achievementRatio: 0, // 达成比例 = 实际产值 ÷ 目标产值 // achievementRatio: 0, // 达成比例 = 实际产值 ÷ 目标产值
productionContribution: 0 // 产值贡献 = 个人产值 ÷ 实际完成产值 // productionContribution: 0 // 产值贡献 = 个人产值 ÷ 实际完成产值
} }
} }
}, },
computed: {
showPageFlag () {
return Object.keys(this.pageData).length
}
},
mounted () { mounted () {
this.setTimeProgress() this.setTimeProgress()
this.getMerchantPerformance() this.getMerchantPerformance()
...@@ -279,6 +297,22 @@ export default { ...@@ -279,6 +297,22 @@ export default {
.customer-box { .customer-box {
margin: toRpx(24) toRpx(32) toRpx(20); margin: toRpx(24) toRpx(32) toRpx(20);
} }
.loading {
width: 100%;
height: 100%;
justify-content: center;
.icon{
animation: rotate 1s infinite;
}
@keyframes rotate {
0%{
transform: rotate(0);
}
100%{
transform: rotate(360deg);
}
}
}
} }
.right { .right {
width: toRpx(1354); width: toRpx(1354);
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
}, },
async jump () { async jump () {
let { item, sceneMarketLevelTwoItem } = this, let { item, sceneMarketLevelTwoItem } = this,
params = `id=${item.id}&specialFlag=${sceneMarketLevelTwoItem.specialFlag}` params = `id=${item.id}&specialFlag=${sceneMarketLevelTwoItem.specialFlag}&directoryName=${sceneMarketLevelTwoItem.directoryName}`
// 类型:0-图片;1-视频;2-pdf;3-富文本; 4-Excel; 5-Word // 类型:0-图片;1-视频;2-pdf;3-富文本; 4-Excel; 5-Word
let url = `/pages/common/caseDetail?${params}` let url = `/pages/common/caseDetail?${params}`
uni.$track.add({ eventCode: 'scene_market', businessId: item.id }) uni.$track.add({ eventCode: 'scene_market', businessId: item.id })
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
@click="swiperClick" @click="swiperClick"
:stopAutoPlay="previewOff" :stopAutoPlay="previewOff"
:imgKey="bannerKey" :imgKey="bannerKey"
:loadComplete="loadComplete"
></swiper-component> ></swiper-component>
</view> </view>
</view> </view>
...@@ -56,7 +57,10 @@ ...@@ -56,7 +57,10 @@
<view class="content-right box-class"> <view class="content-right box-class">
<view class="common-title">服务中心</view> <view class="common-title">服务中心</view>
<view class="content-box"> <view class="content-box">
<MessageIndex class="message-box" ref="messageRef" /> <MessageIndex
class="message-box"
ref="messageRef"
/>
</view> </view>
</view> </view>
</view> </view>
...@@ -196,7 +200,8 @@ export default { ...@@ -196,7 +200,8 @@ export default {
type: Array, type: Array,
default: () => [] default: () => []
}, },
bannerKey: String bannerKey: String,
loadComplete: Boolean,
}, },
data () { data () {
return { return {
...@@ -399,7 +404,7 @@ export default { ...@@ -399,7 +404,7 @@ export default {
font-size: toRpx(28); font-size: toRpx(28);
width: toRpx(310); width: toRpx(310);
height: toRpx(90); height: toRpx(90);
line-height: toRpx(64); line-height: toRpx(68);
background-image: url('@/assets/images/home/daliog.png'); background-image: url('@/assets/images/home/daliog.png');
background-size: 100% 100%; background-size: 100% 100%;
z-index: 9; z-index: 9;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<template> <template>
<view <view
v-for="(i, index) in list" v-for="(i, index) in list"
:class="['tab flex', { active: activeIndex == index }]" :class="['tab flex',size, { active: activeIndex == index }]"
:key="index" :key="index"
@click="changeTab(index)" @click="changeTab(index)"
:style="{ :style="{
...@@ -37,6 +37,10 @@ export default { ...@@ -37,6 +37,10 @@ export default {
tabKey: { tabKey: {
type: String, type: String,
default: 'text' default: 'text'
},
size: {
type: String,
default: 'normal'
} }
}, },
name: '', name: '',
...@@ -102,7 +106,7 @@ export default { ...@@ -102,7 +106,7 @@ export default {
height: calc(100% - #{toRpx(8)}); height: calc(100% - #{toRpx(8)});
justify-content: center; justify-content: center;
color: #666666; color: #666666;
font-size: toRpx(28);
z-index: 10; z-index: 10;
position: relative; position: relative;
.dot { .dot {
...@@ -115,8 +119,15 @@ export default { ...@@ -115,8 +119,15 @@ export default {
background: #f24724; background: #f24724;
} }
} }
.normal {
font-size: toRpx(28);
}
.small{
font-size: toRpx(24);
}
.active { .active {
color: #333333; color: #1a1a1a;
font-weight: 500;
} }
.active-btn { .active-btn {
position: absolute; position: absolute;
......
<template> <template>
<view class="swiper-box"> <view class="swiper-box">
<template v-if="loadComplete">
<template v-if="moduleList.length">
<movable-area <movable-area
class="swiper-carousel" class="swiper-carousel"
@touchstart="starts" @touchstart="starts"
...@@ -43,6 +46,23 @@ ...@@ -43,6 +46,23 @@
</div> </div>
</template> </template>
</view> </view>
</template>
<template v-else>
<view class="nothing flex">
该场景尚未配置素材,请联系总部人员
</view>
</template>
</template>
<template v-else>
<view class="loading flex">
<uni-icons
class="icon"
type="refreshempty"
:size="120"
color="#3773f8"
></uni-icons>
</view>
</template>
</view> </view>
</template> </template>
<script> <script>
...@@ -69,7 +89,7 @@ export default { ...@@ -69,7 +89,7 @@ export default {
}, },
interval: { interval: {
type: [Number, String], type: [Number, String],
default: 3000 default: 5e3
}, },
autoplay: { autoplay: {
type: Boolean, type: Boolean,
...@@ -79,6 +99,7 @@ export default { ...@@ -79,6 +99,7 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
loadComplete: Boolean
}, },
watch: { watch: {
moduleList: { moduleList: {
...@@ -254,6 +275,25 @@ export default { ...@@ -254,6 +275,25 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.swiper-box {
height: 100%;
.loading {
width: 100%;
height: 100%;
justify-content: center;
.icon {
animation: rotate 1s infinite;
}
@keyframes rotate {
0% {
transform: rotate(0);
}
100% {
transform: rotate(360deg);
}
}
}
}
.swiper-carousel { .swiper-carousel {
width: 100%; width: 100%;
height: toRpx(440); height: toRpx(440);
...@@ -342,4 +382,11 @@ export default { ...@@ -342,4 +382,11 @@ export default {
background: #fff; background: #fff;
} }
} }
.nothing {
width: 100%;
height: 100%;
justify-content: center;
color: #999;
font-size: toRpx(20);
}
</style> </style>
...@@ -21,8 +21,9 @@ export default { ...@@ -21,8 +21,9 @@ export default {
1: '问界', 1: '问界',
2: '比亚迪', 2: '比亚迪',
3: '其他' 3: '其他'
}[channelType], }[channelType]
title = options.title || '' let title = options.directoryName
if(options.title) title += `-${options.title}`
let { agentUrl, domainName } = data, let { agentUrl, domainName } = data,
url = `${agentUrl}?no_header=1&business_type=${bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${domainName}&presuppositionProblem=${title}` url = `${agentUrl}?no_header=1&business_type=${bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${domainName}&presuppositionProblem=${title}`
if (options.id) url += `&enter_id=${options.id}` if (options.id) url += `&enter_id=${options.id}`
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
:moduleList="moduleList" :moduleList="moduleList"
@swiperClick="toDetail" @swiperClick="toDetail"
bannerKey="bannerImg" bannerKey="bannerImg"
:loadComplete="loadComplete"
> >
<template slot="detail"> <template slot="detail">
<detail <detail
...@@ -99,7 +100,8 @@ export default { ...@@ -99,7 +100,8 @@ export default {
describe: '客户未领取精品券\n首次到店', describe: '客户未领取精品券\n首次到店',
icon: 'icon-customer-2' icon: 'icon-customer-2'
} }
]) ]),
loadComplete:false
} }
}, },
onBackPress (options) { onBackPress (options) {
...@@ -220,6 +222,7 @@ export default { ...@@ -220,6 +222,7 @@ export default {
this.moduleList = moduleList this.moduleList = moduleList
this.toolList = toolList this.toolList = toolList
this.defaultCarId = defaultCarId this.defaultCarId = defaultCarId
this.loadComplete = true
}, },
toDetail (index) { toDetail (index) {
let item = this.moduleList[index] let item = this.moduleList[index]
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<view class="phone">{{desensitizePhoneNumber(pageData.phoneNumber)}}</view> <view class="phone">{{desensitizePhoneNumber(pageData.phoneNumber)}}</view>
</view> </view>
<view class="brand-box flex"> <view class="brand-box flex">
<view class="brand flex">{{pageData.carBrand}}</view>
<view class="brand flex">{{pageData.carModel}}</view> <view class="brand flex">{{pageData.carModel}}</view>
</view> </view>
<view class="tips flex"> <view class="tips flex">
...@@ -155,7 +156,8 @@ export default { ...@@ -155,7 +156,8 @@ export default {
isOperate: true, isOperate: true,
showPlayControl: false, showPlayControl: false,
AIUrl: '', AIUrl: '',
wv: null wv: null,
loading: false
} }
}, },
onLoad () { onLoad () {
...@@ -415,13 +417,17 @@ export default { ...@@ -415,13 +417,17 @@ export default {
}, },
tabClick (item) { tabClick (item) {
if (item.sumScore > item.score && this.wv) { if (item.sumScore > item.score && this.wv) {
uni.showLoading({ if (this.loading) return uni.showToast({
mask: true title: '请勿频繁操作',
icon: 'none',
mask: true,
duration: 500
}) })
this.loading = true
this.wv.evalJS(`sendMessage({type:'reset_chat',payload:{message:'${item.tagGroupName}'}})`) this.wv.evalJS(`sendMessage({type:'reset_chat',payload:{message:'${item.tagGroupName}'}})`)
setTimeout(()=>{ setTimeout(() => {
uni.hideLoading() this.loading = false
},1e3) }, 500)
} }
} }
......
<!--
* @Description:
* @Author: huyue
* @Date: 2024-06-20 11:32:52
* @LastEditors: huyue
* @LastEditTime: 2024-07-08 11:33:21
-->
<template>
<view
:class="['layout',{'byd-layout':isByd}]"
@click.prevent="touch"
>
<wnCanvas
:drawStatus="penSwitch"
:canvasId="`c-${madiaId}`"
custom
@scale="$emit('scale',$event)"
>
<template slot="customContent">
<view class="layout-content">
<view class="title">{{ title }}</view>
<view class="container">
<view class="container-left">
<view
v-for="(item, index) in views"
:key="item.name"
class="item"
@click.stop="showSection(index)"
:class="item.class"
:style="item.style"
>
<view class="image-container">
<image
:src="item.detailUrl"
class="item-image"
/>
<view class="item-text">{{ item.name }}</view>
</view>
<view class="details-container">
<view :class="['details-section', itemClass(index)]">
<view class="section-title">{{ item.name }}</view>
<view class="section-description">{{item.description}}</view>
</view>
</view>
</view>
</view>
<view class="container-right">
<image
src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-15.webp"
mode="widthFix"
class="serice-image"
/>
<view class="ul">
<view class="ul-title">{{isByd?'部分零部件更换成本':'高价值零部件'}}</view>
<view
class="li-item"
v-for="i in ulList"
:key="i.index"
@click="open(i.flagName)"
>
<view class="li-content">
<view class="li-item-content">
<view class="li-number">{{ i.index }}</view>{{ i.name }}
</view>
<view
v-if="i.hasArrow"
class="sprite-icon icon-icon-arrow icon-arrow"
></view>
<!-- <image
v-if="i.hasArrow"
src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/icon-arrow.webp"
mode="scaleToFill"
class="icon-arrow"
/> -->
</view>
<view class="li-value">{{ i.value }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
</wnCanvas>
<partsPop
ref="partsRef"
@close="close"
:screenList="screenList"
></partsPop>
</view>
</template>
<script>
import partsPop from './PartsPop.vue'
export default {
name: "Guarantee",
props: {
views: Array,
penSwitch: Boolean,
title: String,
madiaId: Number,
ulList: Array,
screenList: Array,
isByd: Boolean
},
components: { partsPop },
data () {
return {
showIndex: -1,
};
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
watch: {
watchStatus () {
this.showIndex = -1
this.$refs.partsRef.close()
this.$emit('onProductModel', false)
}
},
methods: {
close () {
this.$emit('onProductModel', false)
},
open (name) {
if (name) this.$refs.partsRef.show(name)
this.$emit('onProductModel', true)
},
showSection (index) {
if (this.showIndex === index) {
// 如果当前点击的项已经是翻转状态,则关闭它
this.showIndex = -1;
} else {
// 否则,打开新点击的项
this.showIndex = index;
}
},
touch () {
this.showIndex = -1;
},
itemClass (index) {
return this.showIndex == index ? 'show' : 'hide'
}
},
};
</script>
<style scoped lang="scss">
.layout {
width: 100%;
height: 100%;
background-image: url('@/assets/images/media/media-bg.webp');
background-size: 100%;
&-content {
margin: $margin;
height: 100%;
position: relative;
}
// padding: 0 calc((100vw - #{$detailVW}) / 2);
// box-sizing: border-box;
.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;
}
.container {
display: flex;
padding: toRpx(248) toRpx(80) 0;
column-gap: toRpx(64);
&-left {
position: relative;
column-gap: toRpx(16);
border-radius: toRpx(24);
.image-container {
font-size: 0;
width: 100%;
height: 100%;
}
&::after {
content: '';
display: block;
clear: both;
}
flex: 1;
.item {
position: relative;
}
.item-image {
width: 100%;
height: 100%;
vertical-align: top;
}
.item-text {
position: absolute;
left: 0;
bottom: 0;
font-size: toRpx(30);
color: #ffffff;
width: 100%;
height: toRpx(122);
padding: toRpx(44) toRpx(22) toRpx(22);
background-image: linear-gradient(180deg, #00000000 0%, #000000 100%);
border-radius: 0 0 toRpx(24) toRpx(24);
line-height: toRpx(66);
}
.details-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
border-radius: toRpx(24);
}
.details-section {
width: 100%;
height: 100%;
color: #ffffff;
padding: toRpx(24);
border-radius: toRpx(24);
background-image: linear-gradient(180deg, #21425cb3 0%, #4a84f9 68%);
display: flex;
flex-direction: column;
justify-content: flex-end;
transform: translateY(100%);
.section-title {
font-size: toRpx(30);
}
.section-description {
font-size: toRpx(24);
margin-top: toRpx(12);
}
}
.show {
animation: show-gradient 0.2s linear forwards;
}
.hide {
animation: hidden-gradient 0.2s linear;
}
}
&-right {
width: toRpx(336);
.serice-image {
width: toRpx(336);
height: toRpx(280);
}
.ul {
width: 100%;
border: toRpx(4) solid #fdfdff;
border-radius: toRpx(24);
margin-top: toRpx(36);
box-sizing: border-box;
&-title {
background-color: #4a84f9;
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border-radius: toRpx(24) toRpx(24) 0 0;
height: toRpx(88);
font-weight: 500;
font-size: toRpx(28);
color: #ffffff;
line-height: toRpx(88);
text-align: center;
}
.li-item {
width: 100%;
height: toRpx(128);
box-sizing: border-box;
display: flex;
justify-content: center;
flex-direction: column;
padding-left: toRpx(40);
// margin-bottom: toRpx(4);
border: toRpx(2) solid #fdfdff;
.li-number {
font-size: toRpx(32);
margin-right: toRpx(12);
font-family: 'number-400';
}
.li-content {
display: flex;
align-items: center;
.li-item-content {
display: flex;
align-items: baseline;
}
.icon-arrow {
margin-left: toRpx(6);
}
}
.li-value {
margin-top: toRpx(8);
font-size: toRpx(22);
color: #1462ff;
}
&:nth-child(odd) {
background-color: #e5edff;
}
&:nth-child(even) {
background-color: rgba(255, 255, 255, 0.35);
}
&:last-child {
border-radius: 0 0 toRpx(24) toRpx(24);
height: toRpx(140);
}
}
}
}
}
}
.m-r-b {
margin-right: toRpx(16);
margin-bottom: toRpx(16);
}
.m-b {
margin-bottom: toRpx(16);
}
.m-r {
margin-right: toRpx(16);
}
// 动画效果
@keyframes show-gradient {
0% {
transform: translateY(100%);
}
100% {
transform: translateY(0);
}
}
@keyframes hidden-gradient {
0% {
transform: translateY(0);
}
100% {
transform: translateY(100%);
}
}
.byd-layout {
.li-item {
padding-left: toRpx(20) !important;
}
.li-item-content {
font-size: toRpx(26) !important;
}
}
</style>
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
// setTimeout(() => { // setTimeout(() => {
// if (newval && this.hasCarBrand && !this.customerInfo.carModel && this.watchChannelType != 2) this.$refs.carBrandListVisible.autoSelect() // if (newval && this.hasCarBrand && !this.customerInfo.carModel && this.isAito) this.$refs.carBrandListVisible.autoSelect()
// }, 1e3) // }, 1e3)
} }
}, },
...@@ -55,9 +55,9 @@ export default { ...@@ -55,9 +55,9 @@ export default {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
watchChannelType () { isAito () {
// 默认1 1问界 2 比亚迪 3 其他 4极狐 // 1问界
return uni.$storage.get('userInfo').channelType return uni.$storage.get('userInfo').channelType == 1
} }
}, },
mounted () { mounted () {
......
...@@ -129,6 +129,11 @@ export default { ...@@ -129,6 +129,11 @@ export default {
if (newval) this.customerInfo = newval if (newval) this.customerInfo = newval
} }
}, },
// show (n) {
// setTimeout(() => {
// if (n && !this.customerInfo.carModel && this.isAito) this.$refs.carBrandListVisible.autoSelect()
// }, 1e3)
// }
}, },
computed: { computed: {
watchCustomerInfo () { watchCustomerInfo () {
...@@ -137,6 +142,10 @@ export default { ...@@ -137,6 +142,10 @@ export default {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
isAito () {
// 1问界
return uni.$storage.get('userInfo').channelType == 1
}
}, },
methods: { methods: {
inputCustomer () { inputCustomer () {
......
...@@ -95,7 +95,6 @@ import CaseCenter from './components/CaseCenter.vue' ...@@ -95,7 +95,6 @@ import CaseCenter from './components/CaseCenter.vue'
import MediaComponent from './components/MediaComponent.vue' import MediaComponent from './components/MediaComponent.vue'
import History from './components/History.vue' import History from './components/History.vue'
import ThreeGuarantees from './components/ThreeGuarantees.vue' import ThreeGuarantees from './components/ThreeGuarantees.vue'
import Guarantee from './components/Guarantee.vue'
import payPop from './components/payPop.vue' import payPop from './components/payPop.vue'
import FinishStep from '@/components/FinishStep.vue' import FinishStep from '@/components/FinishStep.vue'
import { mapMutations } from 'vuex' import { mapMutations } from 'vuex'
...@@ -110,7 +109,6 @@ export default { ...@@ -110,7 +109,6 @@ export default {
payPop, payPop,
CaseCenter, CaseCenter,
FinishStep, FinishStep,
Guarantee,
History, History,
ThreeGuarantees, ThreeGuarantees,
informationEntry, informationEntry,
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
@changeTab="changeTab" @changeTab="changeTab"
:moduleList="moduleList" :moduleList="moduleList"
@swiperClick="toDetail" @swiperClick="toDetail"
:loadComplete="loadComplete"
> >
<template slot="detail"> <template slot="detail">
<detail <detail
...@@ -52,6 +53,7 @@ export default { ...@@ -52,6 +53,7 @@ export default {
recording: false, recording: false,
aitoCarModelIds: [], aitoCarModelIds: [],
mediaId: '', mediaId: '',
loadComplete: false
} }
}, },
computed: { computed: {
...@@ -78,8 +80,13 @@ export default { ...@@ -78,8 +80,13 @@ export default {
// 其他情况允许正常返回 // 其他情况允许正常返回
return false return false
}, },
onLoad () { async onLoad () {
uni.$api.systemApi.getMockData(true) //获取APP配置信息 const mockdata = await uni.$api.systemApi.getMockData(true) //获取APP配置信息
// if(this.channelType == 1 && mockdata.boutiqueDefaultCarBrandId) {
// this.$store.state.user.boutiqueDefaultCarBrandId = mockdata.boutiqueDefaultCarBrandId //默认车辆品牌
// if(mockdata.defaultCarId) this.$store.state.user.defaultCarId = mockdata.defaultCarId //默认车系
// }
this.get_Vehicle_Sales_Data() this.get_Vehicle_Sales_Data()
}, },
onShow () { onShow () {
...@@ -282,10 +289,10 @@ export default { ...@@ -282,10 +289,10 @@ export default {
/**素材内容 */ /**素材内容 */
setViewInfo (data) { setViewInfo (data) {
let { moduleList, toolList, id } = data let { moduleList, toolList, id } = data
// if (this.channelType == 1) this.aitoCarModelIds = aitoCarModelIds || []
this.moduleList = moduleList this.moduleList = moduleList
this.toolList = toolList this.toolList = toolList
this.mediaId = id this.mediaId = id
this.loadComplete = true
this.$store.state.user = { this.$store.state.user = {
...this.$store.state.user, ...this.$store.state.user,
...data ...data
...@@ -295,8 +302,6 @@ export default { ...@@ -295,8 +302,6 @@ export default {
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.module-box {
}
.webview-container { .webview-container {
width: toRpx(100); width: toRpx(100);
height: toRpx(100); height: toRpx(100);
......
...@@ -2396,11 +2396,10 @@ function drawBarPointText (points, series, config, context, opts) { ...@@ -2396,11 +2396,10 @@ function drawBarPointText (points, series, config, context, opts) {
if (typeof data[index] === 'object' && data[index] !== null) { if (typeof data[index] === 'object' && data[index] !== null) {
value = data[index].value; value = data[index].value;
} }
var formatVal = series.formatter ? series.formatter(value, index, series, opts) : value; var formatVal = series.formatter ? series.formatter(value, index, series, opts) : value;
if (series.beforeUnit) formatVal = `${series.beforeUnit}${formatVal}` if (series.beforeUnit) formatVal = `${series.beforeUnit}${formatVal}`
if (series.afterUnit) formatVal = `${formatVal}${series.afterUnit}` if (series.afterUnit) formatVal = `${formatVal}${series.afterUnit}`
if(series.hideData) formatVal = '--' if(series.hideData || series.defaultList[index]) formatVal = '--'
context.setTextAlign('left'); context.setTextAlign('left');
context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3); context.fillText(String(formatVal), item.x + 4 * opts.pix, item.y + fontSize / 2 - 3);
context.closePath(); context.closePath();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!