Commit 8f6588b5 by 李伟康

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

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