zhb il y a 3 semaines
Parent
commit
231e27351b
2 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 1 1
      pages/customer/trade-history.vue
  2. 3 3
      pages/customer/trade-position.vue

+ 1 - 1
pages/customer/trade-history.vue

@@ -212,7 +212,7 @@ onLoad(async (e) => {
     // 此时 loginOptions 一定有值了
     nextTick(() => {
         // 优先跳转传参,没有就默认第一个
-        searchParams.value.login = targetLogin ?? loginOptions.value[0]?.value ?? null
+        searchParams.value.login = targetLogin ?? loginOptions?.value?.[0]?.value ?? null
         handleSearch(searchParams.value)
     })
 })

+ 3 - 3
pages/customer/trade-position.vue

@@ -9,10 +9,10 @@
                 <template #symbol="{ row }">
                     <view class="symbol-cell">
                         <view class="pair">{{ getSymbolParts(row.symbol)[0] }}/{{ getSymbolParts(row.symbol)[1]
-                        }}</view>
+                            }}</view>
                         <view class="desc">{{ row.openPrice }}
                             <text :class="getCmdColorClass(row.cmdName)">{{ formatCmdName(row.cmdName) }}{{ row.volume
-                            }}{{ t('Label.Lot') }}</text>
+                                }}{{ t('Label.Lot') }}</text>
                         </view>
                     </view>
                 </template>
@@ -203,7 +203,7 @@ onLoad(async (e) => {
         })
     })
     nextTick(() => {
-        searchParams.value.login = targetLogin ?? loginOptions.value[0]?.value ?? null
+        searchParams.value.login = targetLogin ?? loginOptions?.value?.[0]?.value ?? null
         handleSearch(searchParams.value)
     })
 })