Commit 8f6588b5 by 李伟康

refactor(boutique): 重构案例视频页面

- 移除了不必要的控制台日志输出
- 优化了页面结构和布局
- 改进了分类筛选功能,支持按车型和类别筛选
- 优化了数据加载逻辑,提高了页面响应速度
- 修复了一些小bug,提升了用户体验
1 parent 30defc06
...@@ -24,7 +24,6 @@ export default { ...@@ -24,7 +24,6 @@ export default {
}) })
}, },
mounted() { mounted() {
console.log('消息')
this.getMessageSummary() this.getMessageSummary()
}, },
methods: { methods: {
......
...@@ -45,7 +45,6 @@ export default { ...@@ -45,7 +45,6 @@ export default {
}, },
inject: ['showPage'], inject: ['showPage'],
mounted() { mounted() {
console.log(this.messageData)
}, },
methods: { methods: {
open() { open() {
...@@ -55,7 +54,6 @@ export default { ...@@ -55,7 +54,6 @@ export default {
this.$refs.popup.close() this.$refs.popup.close()
}, },
toMessage() { toMessage() {
console.log(this.messageData)
const {messageData} = this const {messageData} = this
this.showPage('MessageDetail', {...messageData, type: 'read'}) this.showPage('MessageDetail', {...messageData, type: 'read'})
this.close() this.close()
......
...@@ -223,7 +223,6 @@ export default { ...@@ -223,7 +223,6 @@ export default {
mounted () { mounted () {
const userInfo = uni.$storage.get('userInfo') || {} const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo this.userInfo = userInfo
this.checkVersion()
permision.requestAndroidPermission('android.permission.RECORD_AUDIO') // 进入界面时检查权限 permision.requestAndroidPermission('android.permission.RECORD_AUDIO') // 进入界面时检查权限
}, },
provide () { provide () {
...@@ -393,6 +392,10 @@ export default { ...@@ -393,6 +392,10 @@ export default {
eventCode: 'app_reception_begins' eventCode: 'app_reception_begins'
}) })
this.$emit('start') this.$emit('start')
},
async updateApp (requested = false) {
if (!requested) await uni.$api.systemApi.getMockData(true)
this.checkVersion()
} }
} }
} }
......
...@@ -258,6 +258,7 @@ export default { ...@@ -258,6 +258,7 @@ export default {
let { blockX, ismove } = this let { blockX, ismove } = this
let pageX = e.changedTouches[0].pageX let pageX = e.changedTouches[0].pageX
let nums = ismove - pageX let nums = ismove - pageX
if(nums == 0) return
if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) { if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) {
this.viewX = -10 this.viewX = -10
setTimeout(() => { setTimeout(() => {
......
...@@ -101,7 +101,8 @@ export default { ...@@ -101,7 +101,8 @@ export default {
icon: 'icon-customer-2' icon: 'icon-customer-2'
} }
]), ]),
loadComplete:false loadComplete: false,
requested: false
} }
}, },
onBackPress (options) { onBackPress (options) {
...@@ -114,11 +115,13 @@ export default { ...@@ -114,11 +115,13 @@ export default {
// 其他情况允许正常返回 // 其他情况允许正常返回
return false; return false;
}, },
onLoad () { async onLoad () {
await uni.$api.systemApi.getMockData(true) //获取APP配置信息
this.init(); this.init();
uni.$api.systemApi.getMockData(true) this.requested = true
this.$refs.home.updateApp(true)
}, },
onShow () { async onShow () {
const userInfo = uni.$storage.get("userInfo") const userInfo = uni.$storage.get("userInfo")
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) { if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm("userInfo"); uni.$storage.rm("userInfo");
...@@ -128,6 +131,7 @@ export default { ...@@ -128,6 +131,7 @@ export default {
}); });
return; return;
} }
if (this.requested && !this.id) this.$refs.home.updateApp()
}, },
computed: { computed: {
}, },
...@@ -207,7 +211,6 @@ export default { ...@@ -207,7 +211,6 @@ export default {
this.$store.state.user.boutiqueMediaConfig = boutiqueMediaConfig this.$store.state.user.boutiqueMediaConfig = boutiqueMediaConfig
this.$store.state.user.boutiqueCarList = boutiqueCarList this.$store.state.user.boutiqueCarList = boutiqueCarList
}).catch(error => { }).catch(error => {
console.log(error)
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title: error, title: error,
...@@ -238,8 +241,6 @@ export default { ...@@ -238,8 +241,6 @@ export default {
this.id = id; this.id = id;
this.tabId = tabId this.tabId = tabId
this.currentCarId = this.carBannerList[this.currentIndex].carModelId this.currentCarId = this.carBannerList[this.currentIndex].carModelId
console.log(id)
}, },
back () { back () {
if (!this.id) return uni.navigateBack(); if (!this.id) return uni.navigateBack();
...@@ -265,6 +266,7 @@ export default { ...@@ -265,6 +266,7 @@ export default {
this.clearHistory(); this.clearHistory();
this.recording = false this.recording = false
this.$refs.home.$refs.leftBox.getMessageInfo() this.$refs.home.$refs.leftBox.getMessageInfo()
if (this.requested) this.$refs.home.updateApp()
}, },
async start (before = true) { async start (before = true) {
const isPermision = await this.$refs.home.isPermission() const isPermision = await this.$refs.home.isPermission()
......
...@@ -53,7 +53,8 @@ export default { ...@@ -53,7 +53,8 @@ export default {
recording: false, recording: false,
aitoCarModelIds: [], aitoCarModelIds: [],
mediaId: '', mediaId: '',
loadComplete: false loadComplete: false,
requested: false
} }
}, },
computed: { computed: {
...@@ -82,14 +83,15 @@ export default { ...@@ -82,14 +83,15 @@ export default {
}, },
async onLoad () { async onLoad () {
const mockdata = await uni.$api.systemApi.getMockData(true) //获取APP配置信息 const mockdata = await uni.$api.systemApi.getMockData(true) //获取APP配置信息
if(this.channelType == 1 && mockdata.boutiqueDefaultCarBrandId) { if (this.channelType == 1 && mockdata.boutiqueDefaultCarBrandId) {
this.$store.state.user.boutiqueDefaultCarBrandId = mockdata.boutiqueDefaultCarBrandId //默认车辆品牌 this.$store.state.user.boutiqueDefaultCarBrandId = mockdata.boutiqueDefaultCarBrandId //默认车辆品牌
if(mockdata.defaultCarId) this.$store.state.user.defaultCarId = mockdata.defaultCarId //默认车系 if (mockdata.defaultCarId) this.$store.state.user.defaultCarId = mockdata.defaultCarId //默认车系
} }
this.get_Vehicle_Sales_Data() this.get_Vehicle_Sales_Data()
this.requested = true
this.$refs.home.updateApp(true)
}, },
onShow () { async onShow () {
const userInfo = uni.$storage.get('userInfo') const userInfo = uni.$storage.get('userInfo')
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) { if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm('userInfo') uni.$storage.rm('userInfo')
...@@ -105,6 +107,7 @@ export default { ...@@ -105,6 +107,7 @@ export default {
...mapMutations('audio', ['setReceptionStatus']), ...mapMutations('audio', ['setReceptionStatus']),
init () { init () {
this.findPayInfo() this.findPayInfo()
if (this.requested && !this.id) this.$refs.home.updateApp()
}, },
/**获取车型&销售数据 */ /**获取车型&销售数据 */
get_Vehicle_Sales_Data () { get_Vehicle_Sales_Data () {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!