li.shaoyi il y a 2 ans
Parent
commit
d438d1231c

+ 3 - 0
src/packages/mobile/router/index.ts

@@ -493,6 +493,9 @@ const routes: Array<RouteRecordRaw> = [
         path: "news",
         name: "ShareNews",
         component: () => import("../views/share/news/index.vue"),
+        meta: {
+          ignoreAuth: true,
+        },
       },
     ],
   },

+ 14 - 12
src/packages/mobile/views/home/components/main/index.vue

@@ -161,6 +161,20 @@ const onSpotChange = (index: number) => {
 
 // 下拉刷新
 const onRefresh = () => {
+  if (!topBanners.value.length) {
+    queryImageConfigs({
+      imageType: 1,
+    }).then((res) => {
+      topBanners.value = res.data
+    })
+  }
+  // if (!bodyBanners.value.length) {
+  //   queryImageConfigs({
+  //     imageType: 10,
+  //   }).then((res) => {
+  //     bodyBanners.value = res.data
+  //   })
+  // }
   // 现货行情
   queryThjSpotQuoteConfig().then((res) => {
     spotQuoteList.value = res.data
@@ -181,18 +195,6 @@ queryMarketRun().then((res) => {
   marketRun.value = res.data[0]
 })
 
-queryImageConfigs({
-  imageType: 1,
-}).then((res) => {
-  topBanners.value = res.data
-})
-
-queryImageConfigs({
-  imageType: 10,
-}).then((res) => {
-  bodyBanners.value = res.data
-})
-
 onRefresh()
 </script>
 

+ 4 - 0
src/packages/mobile/views/news/details/index.less

@@ -3,6 +3,10 @@
 .news-details {
     background-color: #fff;
 
+    .app-view__body {
+        padding-bottom: 1.2rem;
+    }
+
     &__share {
         display: flex;
         align-items: center;