浏览代码

避免重复出现我的

xiaohaizhao 1 年之前
父节点
当前提交
f296fbced5
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      pages/index/modules/bottomSuspensionFrame.vue

+ 1 - 2
pages/index/modules/bottomSuspensionFrame.vue

@@ -77,8 +77,7 @@ export default {
             function render() {
                 let sightseer = uni.getStorageSync('userMsg').usertype == 99;
                 this.sightseer = sightseer;
-                console.log('是否游客', sightseer)
-                if (sightseer) this.index = this.index.concat({ name: "我的" })
+                if (sightseer && !this.index.some(v => v.name == '我的')) this.index = this.index.concat({ name: "我的" })
             }
         },
         onClick(current, name, update = false, params = null) {