Răsfoiți Sursa

1. 新增小程序审核模式

liuyiwuqing 1 an în urmă
părinte
comite
da60eb2daf

+ 8 - 1
pages/tabbar/category/category.vue

@@ -62,7 +62,11 @@
 				loadMoreText: '加载中...'
 			};
 		},
-
+    computed: {
+      haloConfigs() {
+        return this.$tm.vx.getters().getConfigs;
+      },
+    },
 		onLoad() {
 			this.fnGetData();
 		},
@@ -86,6 +90,9 @@
 		},
 		methods: {
 			fnGetData() {
+        if (this.haloConfigs.basicConfig.auditModeEnabled) {
+          return;
+        }
 				uni.showLoading({
 					mask: true,
 					title: '加载中...'

+ 9 - 0
pages/tabbar/home/home.vue

@@ -167,6 +167,9 @@ export default {
         },
 
         fnGetCategoryList() {
+            if (this.haloConfigs.basicConfig.auditModeEnabled) {
+              return;
+            }
             this.$httpApi.v2
                 .getCategoryList({})
                 .then(res => {
@@ -191,6 +194,9 @@ export default {
         },
         // 获取轮播图
         fnGetBanner() {
+            if (this.haloConfigs.basicConfig.auditModeEnabled) {
+              return;
+            }
             const _this = this;
             const _format = function (list) {
                 return list.map((item, index) => {
@@ -239,6 +245,9 @@ export default {
         },
         // 文章列表
         fnGetArticleList() {
+            if (this.haloConfigs.basicConfig.auditModeEnabled) {
+                return;
+            }
             // 设置状态为加载中
             if (!this.isLoadMore) {
                 this.loading = 'loading';

+ 9 - 1
pagesA/articles/articles.vue

@@ -84,6 +84,11 @@ export default {
             dataList: []
         };
     },
+    computed: {
+      haloConfigs() {
+        return this.$tm.vx.getters().getConfigs;
+      },
+    },
     onLoad() {
         this.fnSetPageTitle('内容搜索');
     },
@@ -125,8 +130,11 @@ export default {
             }
         },
         fnGetData() {
+            if (this.haloConfigs.basicConfig.auditModeEnabled) {
+              return;
+            }
             // 设置状态为加载中
-			this.loading = 'loading';
+			      this.loading = 'loading';
             this.$httpApi.v2
                 .getPostListByKeyword(this.queryParams)
                 .then(res => {

+ 6 - 0
pagesA/friend-links/friend-links.vue

@@ -152,6 +152,9 @@ export default {
         };
     },
     computed: {
+        haloConfigs() {
+            return this.$tm.vx.getters().getConfigs;
+        },
         haloPluginConfigs() {
             return this.$tm.vx.getters().getConfigs.pluginConfig;
         },
@@ -207,6 +210,9 @@ export default {
             return this.linkGroupList.find(item => item.metadata.name === groupName)?.spec?.displayName || groupName || "未分组"
         },
         fnGetData() {
+            if (this.haloConfigs.basicConfig.auditModeEnabled) {
+              return;
+            }
             if (!this.isLoadMore) {
                 this.loading = 'loading';
             }