Commit 68ecd8f6 authored by 郭志伟's avatar 郭志伟

fix(editor): 问题修复

parent b5bb4f67
...@@ -6,7 +6,7 @@ const hostMap = { ...@@ -6,7 +6,7 @@ const hostMap = {
kdspHost: `${protocol}//talos-test1.liangkebang.net`, kdspHost: `${protocol}//talos-test1.liangkebang.net`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`, shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
mallHost: `${protocol}://mall-test1.liangkebang.net`, mallHost: `${protocol}://mall-test1.liangkebang.net`,
test: true test: false
}; };
if (EASY_ENV_IS_BROWSER) { if (EASY_ENV_IS_BROWSER) {
......
...@@ -25,6 +25,7 @@ import cfg from '@/config/index'; ...@@ -25,6 +25,7 @@ import cfg from '@/config/index';
import localStorage from '@/service/localStorage.service'; import localStorage from '@/service/localStorage.service';
import DisableTouchMixin from '../../../mixins/disableTouch.mixin'; import DisableTouchMixin from '../../../mixins/disableTouch.mixin';
import { navToDlApp } from '@qg/citrus-ui/src/helper/service/utils'; import { navToDlApp } from '@qg/citrus-ui/src/helper/service/utils';
import { EventBus } from '@qg/citrus-ui/src/helper/service/eventBus';
const SHARE_CONFIG = { const SHARE_CONFIG = {
name: 'share', name: 'share',
...@@ -62,7 +63,7 @@ export default { ...@@ -62,7 +63,7 @@ export default {
...mapGetters(['pageData', 'pageInfo']), ...mapGetters(['pageData', 'pageInfo']),
backTopList() { backTopList() {
const btAttachVal = this.pageData.props?.btAttachVal || []; const btAttachVal = this.pageData.props?.btAttachVal || [];
if (isDef(this.cartIndex) && btAttachVal.length) { if (isDef(this.cartIndex) && this.cartIndex !== -1 && btAttachVal.length) {
btAttachVal[this.cartIndex].info = this.cartCount; btAttachVal[this.cartIndex].info = this.cartCount;
} }
return isApp ? btAttachVal : isWxMp ? btAttachVal.filter(item => item.persets !== '购物车') : []; return isApp ? btAttachVal : isWxMp ? btAttachVal.filter(item => item.persets !== '购物车') : [];
...@@ -101,6 +102,14 @@ export default { ...@@ -101,6 +102,14 @@ export default {
this.getMpSchema(); this.getMpSchema();
} }
}, },
mounted() {
EventBus.$on("PAGE_VISIBILITY_STATE", state => {
if (!state) {
this.getCartCountDebounce();
}
});
},
methods: { methods: {
async getMpSchema() { async getMpSchema() {
if (isH5Normal && EASY_ENV_IS_BROWSER) { if (isH5Normal && EASY_ENV_IS_BROWSER) {
......
...@@ -181,6 +181,7 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab ...@@ -181,6 +181,7 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
} }
window.addEventListener(visibilityChange, () => { window.addEventListener(visibilityChange, () => {
this.handleChange(document[hidden]); this.handleChange(document[hidden]);
EventBus.$emit('PAGE_VISIBILITY_STATE', document[hidden]);
}, false); }, false);
} }
handleChange(state) { handleChange(state) {
......
...@@ -1658,9 +1658,9 @@ ...@@ -1658,9 +1658,9 @@
} }
}, },
"@qg/citrus-ui": { "@qg/citrus-ui": {
"version": "0.3.5", "version": "0.3.5-bata1",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.3.5.tgz", "resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.3.5-bata1.tgz",
"integrity": "sha512-gdJ0T3TGeUQU50oyb76J47/xIqJzbBZWSe7KNIo4aMZHKTzAqJhEfNfoberT8oJcVXnfAtcHJazfgi9uENUKHw==", "integrity": "sha512-4l8sFBS9UIcEc4WMOJGyH88dxrO3pVJyvcyk8OLjsfdcEM915rmNeXC//wZL7ZGcJyT0MI13A217EEwpiMCFjg==",
"requires": { "requires": {
"@better-scroll/core": "^2.1.1", "@better-scroll/core": "^2.1.1",
"@qg/cherry-ui": "^2.23.8", "@qg/cherry-ui": "^2.23.8",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment