fix(index): 修复首页在已登录状态下,不能点击的问题
This commit is contained in:
7
App.vue
7
App.vue
@@ -99,6 +99,11 @@
|
||||
this.$store.commit('setServicerConfig', uni.getStorageSync('servicerConfig'));
|
||||
}
|
||||
|
||||
// 企业微信配置
|
||||
if (uni.getStorageSync('wxworkConfig')) {
|
||||
this.$store.commit('setWxworkConfig', uni.getStorageSync('wxworkConfig'));
|
||||
}
|
||||
|
||||
// 版权信息
|
||||
if (uni.getStorageSync('copyright')) {
|
||||
this.$store.commit('setCopyright', uni.getStorageSync('copyright'));
|
||||
@@ -296,7 +301,7 @@
|
||||
this.shareConfig();
|
||||
}
|
||||
},
|
||||
// 代表在wacth里声明了firstName这个方法之后立即先去执行handler方法
|
||||
// 代表在watch里声明了firstName这个方法之后立即先去执行handler方法
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,19 +11,37 @@ try {
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
// 本地调试配置, 不同环境的配置
|
||||
const localConfig = {
|
||||
'460': { // 制氧设备平台
|
||||
uniacid: 460,
|
||||
domain: 'https://xcx30.5g-quickapp.com/',
|
||||
},
|
||||
'2285': { // 数码喷墨墨水
|
||||
uniacid: 2285,
|
||||
domain: 'https://xcx.aigc-quickapp.com/',
|
||||
}
|
||||
}
|
||||
|
||||
const {
|
||||
uniacid: defaultUniacid,
|
||||
domain: defaultDomain,
|
||||
} = localConfig['2285'] ?? {}
|
||||
|
||||
|
||||
// 调试版本,配置说明
|
||||
const devCfg = {
|
||||
// 商户ID
|
||||
uniacid: 460, //825
|
||||
uniacid: defaultUniacid, //825
|
||||
|
||||
//api请求地址
|
||||
baseUrl: 'https://xcx30.5g-quickapp.com/',
|
||||
baseUrl: defaultDomain,
|
||||
|
||||
// 图片域名
|
||||
imgDomain: 'https://xcx30.5g-quickapp.com/',
|
||||
imgDomain: defaultDomain,
|
||||
|
||||
// H5端域名
|
||||
h5Domain: 'https://xcx30.5g-quickapp.com/',
|
||||
h5Domain: defaultDomain,
|
||||
|
||||
// // api请求地址
|
||||
// baseUrl: 'https://tsaas.liveplatform.cn/',
|
||||
|
||||
@@ -145,7 +145,16 @@ class EventBus {
|
||||
)
|
||||
|
||||
// 调用 defaultAsyncHandler(仅当允许)
|
||||
await callDefaultAsyncHandler(event, null, domResult)
|
||||
await callDefaultAsyncHandler(event, null, domResult ?? true)
|
||||
|
||||
// 如果不允许继续传播,则直接返回(根据 defaultPrevented 判断结果)
|
||||
if (!allowContinuePropagation) {
|
||||
return !event.defaultPrevented
|
||||
}
|
||||
// 否则继续走普通 EventBus 处理(fallthrough)
|
||||
} else if (this.platform === 'h5') {
|
||||
// 调用 defaultAsyncHandler(仅当允许)
|
||||
await callDefaultAsyncHandler(event, null, true)
|
||||
|
||||
// 如果不允许继续传播,则直接返回(根据 defaultPrevented 判断结果)
|
||||
if (!allowContinuePropagation) {
|
||||
@@ -192,6 +201,10 @@ class EventBus {
|
||||
await callDefaultAsyncHandler(event, handler, awaitedResult)
|
||||
} catch (error) {
|
||||
console.error(`EventBus ${eventName} error:`, error)
|
||||
|
||||
// 发现错误,默认调用 defaultAsyncHandler(仅当允许)
|
||||
await callDefaultAsyncHandler(event, handler, true)
|
||||
|
||||
// 如果全局或该 handler 指定遇错停止传播,则停止
|
||||
if (stopOnError || handler.options?.stopOnError) {
|
||||
break
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
//切换英文标题
|
||||
if(this.lang == 'en-us'){
|
||||
this.categoryTree.map(item => {
|
||||
item.child_list.map(items => {
|
||||
item?.child_list?.map(items => {
|
||||
items.category_name = items.en_category_name;
|
||||
return items;
|
||||
})
|
||||
|
||||
@@ -3,7 +3,7 @@ export default {
|
||||
// 异步触发事件
|
||||
async __$emitEvent(payload = {eventName: '__unnamedEvent', data: {}, promiseCallback: null}) {
|
||||
// console.log('__$emitEvent', payload)
|
||||
await this.$eventBus?.emit(payload.eventName, payload.data, payload.promiseCallback)
|
||||
await this.$eventBus.emit(payload.eventName, payload.data, payload.promiseCallback)
|
||||
},
|
||||
}
|
||||
}
|
||||
3
main.js
3
main.js
@@ -44,6 +44,9 @@ uniStorage();
|
||||
import loadingCover from '@/components/loading-cover/loading-cover.vue';
|
||||
Vue.component('loading-cover', loadingCover);
|
||||
|
||||
import nsMpHtml from '@/components/ns-mp-html/ns-mp-html.vue';
|
||||
Vue.component('ns-mp-html', nsMpHtml);
|
||||
|
||||
import nsEmpty from '@/components/ns-empty/ns-empty.vue';
|
||||
Vue.component('ns-empty', nsEmpty);
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ export default {
|
||||
// 统一处理点击及触摸事件
|
||||
_handleDiyGroupInteractionEvent(payload) {
|
||||
if (this.storeToken) {
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
// 打开登录弹窗
|
||||
|
||||
Reference in New Issue
Block a user