li.shaoyi 1 년 전
부모
커밋
035b210248

+ 13 - 5
src/packages/mobile/views/news/list/Index.vue

@@ -1,7 +1,7 @@
 <template>
   <app-view class="news-list" flex>
     <template #header>
-      <app-navbar title="市场资讯" />
+      <app-navbar :title="title" />
     </template>
     <Tabs v-model:active="currentColumnId" @change="onClickTab">
       <template v-for="(item, index) in siteColumns" :key="index">
@@ -12,13 +12,14 @@
       v-model:pageIndex="pageIndex" :page-count="pageCount" @refresh="onRefresh">
       <Empty v-if="!dataList.length" />
       <template v-for="(item, index) in dataList" :key="index">
-        <Cell class="article-item" title-class="article-item__title" value-class="article-item__time" :title="item.title"
-          :value="formatDate(item.publishdate, 'MM/DD')" :to="{ name: 'news-detail', query: { id: item.id } }" />
+        <Cell class="article-item" title-class="article-item__title" value-class="article-item__time"
+          :title="item.title" :value="formatDate(item.publishdate, 'MM/DD')"
+          :to="{ name: 'news-detail', query: { id: item.id } }" />
       </template>
     </app-pull-refresh>
   </app-view>
 </template>
-  
+
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { Cell, Tab, Tabs, Empty } from 'vant'
@@ -27,6 +28,13 @@ import { useRequest } from '@/hooks/request'
 import { querySiteColumnDetail, querySiteColumnConfig } from '@/services/api/news'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 
+defineProps({
+  title: {
+    type: String,
+    default: '市场资讯'
+  }
+})
+
 const pullRefreshRef = shallowRef()
 const dataList = shallowRef<Model.SiteColumnDetailRsp[]>([])
 const siteColumns = shallowRef<Model.SiteColumnConfigRsp[]>([])
@@ -69,7 +77,7 @@ const onClickTab = () => {
   pullRefreshRef.value?.refresh()
 }
 </script>
-  
+
 <style lang="less">
 @import './index.less';
 </style>

+ 1 - 1
src/packages/mobile/views/spot/detail/Index.vue

@@ -101,7 +101,7 @@ const buyorsell = shallowRef(BuyOrSell.Buy) // 买卖方向
 const oem = service.getConfig('oem')
 const buyList = shallowRef<Model.OrderQuoteDetailRsp[]>([])
 const sellList = shallowRef<Model.OrderQuoteDetailRsp[]>([])
-const wrfactortypeid = getQueryString('wrfactortypeid')
+const wrfactortypeid = getQueryString('wrfactortypeid') ?? '0'
 
 const { data: quoteItem, run: getOrderQuote } = useRequest(queryOrderQuote, {
     manual: true,

+ 20 - 17
src/packages/thj/router/index.ts

@@ -145,6 +145,9 @@ const routes: Array<RouteRecordRaw> = [
         path: '',
         name: 'news-list',
         component: () => import('@mobile/views/news/list/Index.vue'),
+        props: {
+          title: '市场信息'
+        },
         meta: {
           ignoreAuth: true,
         },
@@ -323,23 +326,23 @@ const routes: Array<RouteRecordRaw> = [
     ]
   },
   {
-      path: '/market',
-      component: Page,
-      children: [
-          {
-              path: 'list',
-              name: 'market-list',
-              component: () => import('../views/market/list/index.vue'),
-              props: {
-                  showBackButton: true
-              }
-          },
-          {
-              path: 'detail',
-              name: 'market-detail',
-              component: () => import('../views/market/detail/index.vue'),
-          }
-      ]
+    path: '/market',
+    component: Page,
+    children: [
+      {
+        path: 'list',
+        name: 'market-list',
+        component: () => import('../views/market/list/index.vue'),
+        props: {
+          showBackButton: true
+        }
+      },
+      {
+        path: 'detail',
+        name: 'market-detail',
+        component: () => import('../views/market/detail/index.vue'),
+      }
+    ]
   }
 ]
 

+ 1 - 1
src/packages/thj/views/home/main/Index.vue

@@ -34,7 +34,7 @@
       </app-block>
       <app-block class="home-main__news">
         <CellGroup class="article">
-          <Cell class="home-main__titlebar" title="市场资讯" value="更多" icon="fire" :to="{ name: 'news-list' }" is-link />
+          <Cell class="home-main__titlebar" title="市场信息" value="更多" icon="fire" :to="{ name: 'news-list' }" is-link />
           <template v-for="(item, index) in newsList" :key="index">
             <Cell class="article-item" :title="item.title" :value="formatDate(item.publishdate, 'MM/DD')"
               :to="{ name: 'news-detail', query: { id: item.id } }" />