whj преди 4 дни
родител
ревизия
8b2e908c16
променени са 2 файла, в които са добавени 4 реда и са изтрити 3 реда
  1. 1 1
      .cool/router/index.ts
  2. 3 2
      pages/catalog/index.uvue

+ 1 - 1
.cool/router/index.ts

@@ -317,7 +317,7 @@ export class Router {
 		if (!this.isLoginPage(this.path())) {
 			this.push({
 				path: "/pages/user/login",
-				mode: "reLaunch"
+				mode: "redirectTo"
 			});
 		}
 	}, 300);

+ 3 - 2
pages/catalog/index.uvue

@@ -47,7 +47,8 @@ function handleDetail(item: SubjectCatalogResult) {
     </view>
     <!-- 顶部右侧光标签 -->
     <view class="light-tag" @tap="visible = true">
-      <image class="light-icon" :src="config.baseUrl + catalog?.fileList?.[0]?.url"></image>
+      <image class="light-icon" v-if="catalog?.fileList?.[0]?.url" :src="config.baseUrl + catalog?.fileList?.[0]?.url">
+      </image>
       <text class="light-text">{{ catalog?.name }}</text>
       <cl-icon name="arrow-left-right-line" color="primary"></cl-icon>
     </view>
@@ -87,7 +88,7 @@ function handleDetail(item: SubjectCatalogResult) {
     <cl-popup v-model="visible" :show-header="false" direction="center" :size="500">
       <view class="p-4">
         <cl-row :gutter="0">
-          <cl-col :span="6" v-for="item in dataList" :key="item.id" :pt="{
+          <cl-col :span="6" v-for="item in dataList || []" :key="item.id" :pt="{
             className: '!p-2'
           }" @tap="handleSelect(item)">
             <view class="select-item" :class="{ selected: item.id === catalog?.id }">