Commit 66c50589 by cen

fix: 修复详情

1 parent 5a5c90d1
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
userInfo: Object userInfo: Object
}, },
name: '', name: '',
data () { data() {
return { return {
messageData: { messageData: {
classCountList: [], classCountList: [],
...@@ -80,7 +80,7 @@ export default { ...@@ -80,7 +80,7 @@ export default {
} }
}, },
watch: { watch: {
userInfo (n) { userInfo(n) {
console.log('userInfo', n) console.log('userInfo', n)
if (n.shopMerchantId) this.haveCustomerAccess(n) if (n.shopMerchantId) this.haveCustomerAccess(n)
}, },
...@@ -92,10 +92,10 @@ export default { ...@@ -92,10 +92,10 @@ export default {
// } // }
}, },
computed: { computed: {
perRecordNumber () { perRecordNumber() {
return this.$store.state.audio.perRecordNumber return this.$store.state.audio.perRecordNumber
}, },
sceneTypeList () { sceneTypeList() {
const sceneTypeObject = { const sceneTypeObject = {
1: { 1: {
title: '轻改', title: '轻改',
...@@ -131,7 +131,8 @@ export default { ...@@ -131,7 +131,8 @@ export default {
} }
return result return result
}, },
tabs () { // 这个tabs进来的值更新触发顺序是 getStudyCenterPermission的方法变更 => 计算属性的变更 => userInfo的监听变更 => haveCustomerAccess的变更。 计算属性的变更后的更新值是不会重新触发渲染的
tabs() {
const tabs = [ const tabs = [
{ {
label: "首页", label: "首页",
...@@ -164,16 +165,16 @@ export default { ...@@ -164,16 +165,16 @@ export default {
isTrack: true, isTrack: true,
name: 'ActivityCenter', name: 'ActivityCenter',
eventCode: 'app_activeity_center', eventCode: 'app_activeity_center',
hidden: !this.activityTabVisible hidden: false
} }
] ]
let { sceneType } = uni.$storage.get("userInfo") let { sceneType } = uni.$storage.get("userInfo")
if(sceneType == 7) tabs[1].hidden = true if (sceneType == 7) tabs[1].hidden = true
console.log('tabs', tabs) console.log('tabs', tabs)
return tabs return tabs
} }
}, },
created () { created() {
// 监听自定义事件 // 监听自定义事件
uni.$on('pageBack', () => { uni.$on('pageBack', () => {
...@@ -200,7 +201,7 @@ export default { ...@@ -200,7 +201,7 @@ export default {
}, },
inject: ['showPage'], inject: ['showPage'],
methods: { methods: {
getUnreadCount () { getUnreadCount() {
let _this = this let _this = this
uni.$api.commonApi.getUnreadCount({}).then(res => { uni.$api.commonApi.getUnreadCount({}).then(res => {
this.readCount = res.data this.readCount = res.data
...@@ -236,15 +237,15 @@ export default { ...@@ -236,15 +237,15 @@ export default {
// this.leaveTrack() // this.leaveTrack()
// }, 5000) // }, 5000)
// }, // },
clickHome () { clickHome() {
if (this.tabs[this.tabIndex].isTrack) if (this.tabs[this.tabIndex].isTrack)
this.changeIndex(0, this.tabs[0]) this.changeIndex(0, this.tabs[0])
}, },
handleSetting () { handleSetting() {
this.$refs.settingRef.open() this.$refs.settingRef.open()
this.clickHome() this.clickHome()
}, },
findBeiSenSSOToken () { findBeiSenSSOToken() {
return new Promise(resolve => { return new Promise(resolve => {
const url = 'https%3A%2F%2Fcloud.italent.cn%2FPageHome%2FIndex%3Fproduct%3DLearning%26keyName%3DNusion%26pageCode%3DLearningNewHomepage%26appCode%3DLearning%26_qsrcapp%3DLearning%26_qrt%3Dhtml%26quark_s%3D5102bff371c00da5b19968ee53a8c3f1499ecd2447a19f72f3e3ba2390cc9617%23%2FviewDynamic%3Fshadow_context%3D%257BappModel%253A%2522italent%2522%252Cuppid%253A%25221%2522%257D%26quark_s%3D028930f1066f8ef8d28790940d53ae64337f44bde3a44cf89a290e4a3611e3e2' const url = 'https%3A%2F%2Fcloud.italent.cn%2FPageHome%2FIndex%3Fproduct%3DLearning%26keyName%3DNusion%26pageCode%3DLearningNewHomepage%26appCode%3DLearning%26_qsrcapp%3DLearning%26_qrt%3Dhtml%26quark_s%3D5102bff371c00da5b19968ee53a8c3f1499ecd2447a19f72f3e3ba2390cc9617%23%2FviewDynamic%3Fshadow_context%3D%257BappModel%253A%2522italent%2522%252Cuppid%253A%25221%2522%257D%26quark_s%3D028930f1066f8ef8d28790940d53ae64337f44bde3a44cf89a290e4a3611e3e2'
uni.$api.commonApi.findBeiSenSSOToken({}).then(res => { uni.$api.commonApi.findBeiSenSSOToken({}).then(res => {
...@@ -262,7 +263,7 @@ export default { ...@@ -262,7 +263,7 @@ export default {
this.changeIndex(index, this.tabs[index]); this.changeIndex(index, this.tabs[index]);
} }
}, },
async changeIndex (index, item) { async changeIndex(index, item) {
if (item.eventCode) uni.$track.add({ if (item.eventCode) uni.$track.add({
eventCode: item.eventCode eventCode: item.eventCode
}) })
...@@ -298,7 +299,7 @@ export default { ...@@ -298,7 +299,7 @@ export default {
this.findBeiSenSSOToken() this.findBeiSenSSOToken()
} }
}, },
async haveCustomerAccess (val) { async haveCustomerAccess(val) {
const { shopMerchantId, sceneType: scene } = val const { shopMerchantId, sceneType: scene } = val
// const res = await uni.$api.customerApi.haveCustomerAccess({ // const res = await uni.$api.customerApi.haveCustomerAccess({
// merchantId: shopMerchantId // merchantId: shopMerchantId
...@@ -314,17 +315,42 @@ export default { ...@@ -314,17 +315,42 @@ export default {
merchantId: shopMerchantId, merchantId: shopMerchantId,
scene scene
}).then(result => { }).then(result => {
console.log('haveCustomerAccess', result)
// uni.$storage.set('isSaleOpen', result) // uni.$storage.set('isSaleOpen', result)
if (result) { if (result) {
this.hasPerson = true this.hasPerson = true
this.activityTabVisible = scene !== 7 // this.activityTabVisible = scene !== 7
}else { // this.tabs[this.tabs.length-1].hidden = scene !== 7
this.activityTabVisible = false this.$nextTick(() => {
const activityTabIcon = document.querySelector('.sprite-icon.icon-activity')
if (activityTabIcon) {
const activityTab = activityTabIcon.closest('.tab-item')
if (activityTab) {
if (scene === 7) {
activityTab.style.display = 'none'
} else {
activityTab.style.display = 'block'
}
}
}
})
} else {
// this.tabs[this.tabs.length-1].hidden = false
// this.activityTabVisible = false
this.$nextTick(() => {
const activityTabIcon = document.querySelector('.sprite-icon.icon-activity')
if (activityTabIcon) {
const activityTab = activityTabIcon.closest('.tab-item')
if (activityTab) {
activityTab.style.display = 'none'
}
}
})
} }
}) })
}, },
// 获取话术未读列表 // 获取话术未读列表
async getMessage () { async getMessage() {
const { sceneType, uuid } = uni.$storage.get("userInfo") const { sceneType, uuid } = uni.$storage.get("userInfo")
let businessTypeList = [] let businessTypeList = []
if (sceneType == 0) { if (sceneType == 0) {
...@@ -353,7 +379,7 @@ export default { ...@@ -353,7 +379,7 @@ export default {
// this.messageTotal = res // this.messageTotal = res
// }, // },
// 学习中心消息弹窗,优先级高于有修改话术弹窗 // 学习中心消息弹窗,优先级高于有修改话术弹窗
async getMessagePop () { async getMessagePop() {
const res = await uni.$api.commonApi.getMessagePop({}) const res = await uni.$api.commonApi.getMessagePop({})
if (res.ids && res.ids.length > 0) { if (res.ids && res.ids.length > 0) {
if (Array.isArray(res.moduleTypeList) && (res.moduleTypeList.includes(3) || res.moduleTypeList.includes(4)) if (Array.isArray(res.moduleTypeList) && (res.moduleTypeList.includes(3) || res.moduleTypeList.includes(4))
...@@ -377,19 +403,19 @@ export default { ...@@ -377,19 +403,19 @@ export default {
await this.getMessage() await this.getMessage()
} }
}, },
openPop () { openPop() {
// this.messageType = 'system' // this.messageType = 'system'
// this.$refs.kfRef.open() // this.$refs.kfRef.open()
uni.navigateTo({ uni.navigateTo({
url: `/pages/common/messageList` url: `/pages/common/messageList`
}) })
}, },
getMessageInfo () { getMessageInfo() {
// this.getMessage() // this.getMessage()
// this.getMessageCount() // this.getMessageCount()
this.getMessagePop() this.getMessagePop()
}, },
jumpPersonCenter () { jumpPersonCenter() {
if (this.hasPerson) { if (this.hasPerson) {
uni.$track.add({ uni.$track.add({
eventCode: 'app_personal_center' eventCode: 'app_personal_center'
...@@ -398,7 +424,7 @@ export default { ...@@ -398,7 +424,7 @@ export default {
this.$emit('update:tabIndex', 99) this.$emit('update:tabIndex', 99)
} }
}, },
chooseSceneType (index) { chooseSceneType(index) {
let { userInfo, sceneTypeList } = this, let { userInfo, sceneTypeList } = this,
sceneType = sceneTypeList[index].id sceneType = sceneTypeList[index].id
if (sceneType == userInfo.sceneType) return if (sceneType == userInfo.sceneType) return
...@@ -417,14 +443,14 @@ export default { ...@@ -417,14 +443,14 @@ export default {
url url
}) })
}, },
openScenePopup () { openScenePopup() {
this.$refs.sceneTypeRef.open() this.$refs.sceneTypeRef.open()
uni.$track.add({ uni.$track.add({
eventCode: 'app_scene_change' eventCode: 'app_scene_change'
}) })
}, },
// 学习中心权限获取,场景集市权限 // 学习中心权限获取,场景集市权限
getStudyCenterPermission () { getStudyCenterPermission() {
const userInfo = uni.$storage.get('userInfo') const userInfo = uni.$storage.get('userInfo')
if (userInfo.subLoginUser.channelType == 9) { if (userInfo.subLoginUser.channelType == 9) {
this.tabs[2].hidden = true this.tabs[2].hidden = true
...@@ -432,6 +458,7 @@ export default { ...@@ -432,6 +458,7 @@ export default {
return return
} else { } else {
const res = uni.$storage.get('studyCenterPermission') const res = uni.$storage.get('studyCenterPermission')
console.log('getStudyCenterPermission', res)
const { directSaleAuth, hmzxAuth, authorizedBusinessList } = res // 当驻店人员为非直营,且非鸿蒙智行延保业务驻店人员情况下。隐藏左侧【学习中心】图标 const { directSaleAuth, hmzxAuth, authorizedBusinessList } = res // 当驻店人员为非直营,且非鸿蒙智行延保业务驻店人员情况下。隐藏左侧【学习中心】图标
const isYb = authorizedBusinessList && authorizedBusinessList.includes(1) // 1.延保 2.轻改 3.权益 const isYb = authorizedBusinessList && authorizedBusinessList.includes(1) // 1.延保 2.轻改 3.权益
if (directSaleAuth || (hmzxAuth && isYb)) { if (directSaleAuth || (hmzxAuth && isYb)) {
...@@ -440,11 +467,11 @@ export default { ...@@ -440,11 +467,11 @@ export default {
} }
} }
}, },
beforeCreate () { beforeCreate() {
// clearInterval(this.trackInterval) // clearInterval(this.trackInterval)
// this.trackInterval = null // this.trackInterval = null
}, },
beforeDestroy () { beforeDestroy() {
uni.$off('ActivityCenter', this.handleActivityCenter); uni.$off('ActivityCenter', this.handleActivityCenter);
// clearInterval(this.trackInterval) // clearInterval(this.trackInterval)
// this.trackInterval = null // this.trackInterval = null
...@@ -461,6 +488,7 @@ export default { ...@@ -461,6 +488,7 @@ export default {
flex-shrink: 0; flex-shrink: 0;
background-image: url('@/assets/images/home/left-bg.png'); background-image: url('@/assets/images/home/left-bg.png');
background-size: 100% 100%; background-size: 100% 100%;
.left-tabs { .left-tabs {
width: 100%; width: 100%;
height: toRpx(1080); height: toRpx(1080);
...@@ -516,6 +544,7 @@ export default { ...@@ -516,6 +544,7 @@ export default {
align-items: center; align-items: center;
border-radius: 100%; border-radius: 100%;
} }
.tip-box { .tip-box {
position: absolute; position: absolute;
left: toRpx(90); left: toRpx(90);
...@@ -558,9 +587,11 @@ export default { ...@@ -558,9 +587,11 @@ export default {
padding-bottom: toRpx(64); padding-bottom: toRpx(64);
} }
} }
.user-box { .user-box {
padding-top: toRpx(92); padding-top: toRpx(92);
} }
.user-info { .user-info {
width: toRpx(184); width: toRpx(184);
box-sizing: border-box; box-sizing: border-box;
...@@ -587,6 +618,7 @@ export default { ...@@ -587,6 +618,7 @@ export default {
border: toRpx(2) solid #ffffff; border: toRpx(2) solid #ffffff;
box-shadow: 0 toRpx(4) toRpx(8) 0 #0000001a; box-shadow: 0 toRpx(4) toRpx(8) 0 #0000001a;
border-radius: 100%; border-radius: 100%;
&.user-active { &.user-active {
border: toRpx(2) solid rgb(55, 115, 248); border: toRpx(2) solid rgb(55, 115, 248);
} }
...@@ -600,6 +632,7 @@ export default { ...@@ -600,6 +632,7 @@ export default {
color: #292d33; color: #292d33;
margin-top: toRpx(16); margin-top: toRpx(16);
padding: 0 toRpx(12); padding: 0 toRpx(12);
&-text { &-text {
width: toRpx(112); width: toRpx(112);
overflow: hidden; overflow: hidden;
...@@ -626,9 +659,11 @@ export default { ...@@ -626,9 +659,11 @@ export default {
margin: toRpx(48) auto 0; margin: toRpx(48) auto 0;
box-sizing: border-box; box-sizing: border-box;
padding-left: toRpx(60); padding-left: toRpx(60);
.icon-scene-change { .icon-scene-change {
zoom: 2; zoom: 2;
} }
.message-number { .message-number {
position: absolute; position: absolute;
display: flex; display: flex;
......
...@@ -307,7 +307,7 @@ ...@@ -307,7 +307,7 @@
<view v-if="formatValue(item, detailsInfo)" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]"> <view v-if="formatValue(item, detailsInfo)" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]">
<view class="title-label-see mr-16">{{ item.label == '自定义字段名称' ? detailsInfo.carHandoverInfo.otherText || '自定义字段名称' : item.label }}</view> <view class="title-label-see mr-16">{{ item.label == '自定义字段名称' ? detailsInfo.carHandoverInfo.otherText || '自定义字段名称' : item.label }}</view>
<view v-if="item.type == 'image'"> <view v-if="item.type == 'image'">
<template v-if="item.key === 'carHandoverInfo.motorBookUrl'"> <template v-if="item.key === 'carHandoverInfo.motorBookUrl' || item.key === 'carHandoverInfo.motorRegistrationCertificateUrl'">
<image @click.stop="previewMedia(url, 1)" v-for="(url, idx) in splitMediaUrls(formatValue(item, detailsInfo))" :key="idx" :src="url" mode="aspectFill" style="margin-right: 10px"></image> <image @click.stop="previewMedia(url, 1)" v-for="(url, idx) in splitMediaUrls(formatValue(item, detailsInfo))" :key="idx" :src="url" mode="aspectFill" style="margin-right: 10px"></image>
</template> </template>
<template v-else> <template v-else>
...@@ -593,7 +593,7 @@ export default { ...@@ -593,7 +593,7 @@ export default {
], ],
documentationItems: [ documentationItems: [
{ label: '交强险', key: 'carHandoverInfo.trafficInsuranceUrl', type: 'image' }, { label: '交强险', key: 'carHandoverInfo.trafficInsuranceUrl', type: 'image' },
{ label: '机动车行驶证', key: 'carHandoverInfo.motorBookUrl1', type: 'image' }, { label: '机动车行驶证', key: 'carHandoverInfo.motorRegistrationCertificateUrl', type: 'image' },
{ label: '交管12123截图', key: 'carHandoverInfo.trafficScreenshotUrl', type: 'image' }, { label: '交管12123截图', key: 'carHandoverInfo.trafficScreenshotUrl', type: 'image' },
{ label: '机动车登记本', key: 'carHandoverInfo.motorBookUrl', type: 'image' }, { label: '机动车登记本', key: 'carHandoverInfo.motorBookUrl', type: 'image' },
{ label: '购置税证及收据', key: 'carHandoverInfo.purchaseReceiptUrl', type: 'image' }, { label: '购置税证及收据', key: 'carHandoverInfo.purchaseReceiptUrl', type: 'image' },
...@@ -778,7 +778,7 @@ export default { ...@@ -778,7 +778,7 @@ export default {
if (item.map && this[item.map]) { if (item.map && this[item.map]) {
return this[item.map][rawValue] || rawValue return this[item.map][rawValue] || rawValue
} }
console.log('rawValue:', rawValue, item.key, item) console.log('rawValue:', rawValue === 0 ? 0 : item.type === 'image' || item.accept === 'video' ? rawValue : rawValue || '-', item.key, item)
return rawValue === 0 ? 0 : item.type === 'image' || item.accept === 'video' ? rawValue : rawValue || '-' return rawValue === 0 ? 0 : item.type === 'image' || item.accept === 'video' ? rawValue : rawValue || '-'
}, },
getImageBySubtype(subtype) { getImageBySubtype(subtype) {
......
...@@ -141,12 +141,12 @@ export const emissionStandardMap = { ...@@ -141,12 +141,12 @@ export const emissionStandardMap = {
6: '国6' 6: '国6'
} }
export const buyNewCarMap = { export const buyNewCarMap = {
0: '是', 1: '是',
1: '否' 0: '否'
} }
export const hasAccidentMap = { export const hasAccidentMap = {
0: '是', 1: '是',
1: '否' 0: '否'
} }
export const overallRatingMap = { export const overallRatingMap = {
1: '优', 1: '优',
......
...@@ -107,12 +107,12 @@ ...@@ -107,12 +107,12 @@
<template #content> <template #content>
<view class="amount-requested-content"> <view class="amount-requested-content">
<view class="amount-box flex align-center"> <view class="amount-box flex align-center">
<text class="amount-title">{{ payPopupObj.paymentType == 1 && payPopupObj.status != 40 ? '定金' : payPopupObj.paymentType == 1 && payPopupObj.status == 40 ? '尾款' : '全款' }}金额</text> <text class="amount-title">{{ payPopupObj.paymentType == 2 ? '全款' : payPopupObj.paymentType == 1 && payPopupObj.status == 30 ? '定金' : '尾款' }}金额</text>
<text class="amount-value">{{ payPopupObj.paymentType == 1 && payPopupObj.status != 40 ? payPopupObj.depositPrice : payPopupObj.paymentType == 1 && payPopupObj.status == 40 ? payPopupObj.finalPrice : payPopupObj.evalPrice }}元</text> <text class="amount-value">{{ payPopupObj.paymentType == 2 ? payPopupObj.evalPrice : payPopupObj.paymentType == 1 && payPopupObj.status == 30 ? payPopupObj.depositPrice : payPopupObj.finalPrice }}元</text>
</view> </view>
<view class="flex align-center mt-28 mb-16" v-if="payPopupObj.paymentType == 1"> <view class="flex align-center mt-28 mb-16" v-if="payPopupObj.paymentType == 1">
<text class="popup-cell-title light-title">{{ payPopupObj.paymentType == 1 && payPopupObj.status == 40 ? '已支付定金' : '待支付尾款' }}</text> <text class="popup-cell-title light-title">{{ payPopupObj.status == 30 ? '待支付尾款' : '已支付定金' }}</text>
<text class="popup-cell-value light-value">{{ payPopupObj.paymentType == 1 && payPopupObj.status == 40 ? payPopupObj.depositPrice : payPopupObj.finalPrice }}元</text> <text class="popup-cell-value light-value">{{ payPopupObj.status == 30 ? payPopupObj.finalPrice : payPopupObj.depositPrice }}元</text>
</view> </view>
<view class="flex align-center mb-40" :class="payPopupObj.paymentType == 2 ? 'mt-28' : ''"> <view class="flex align-center mb-40" :class="payPopupObj.paymentType == 2 ? 'mt-28' : ''">
<text class="popup-cell-title">评估价</text> <text class="popup-cell-title">评估价</text>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!