Kaynağa Gözat

useGlobalStore

Handy_Cao 1 yıl önce
ebeveyn
işleme
52fc56cb14

+ 2 - 3
src/business/common/index.ts

@@ -1,7 +1,6 @@
 import { timerTask } from '@/utils/timer'
 import { tokenCheck } from '@/services/api/account'
 import eventBus from '@/services/bus'
-import { i18n } from '@/stores'
 
 /**
  * 令牌校验
@@ -11,8 +10,8 @@ export async function checkToken() {
         return await tokenCheck()
     } catch (err) {
         // 临时解决方案,有可能出现网络问题导致超时后账号被登出
-        if (err !== i18n.global.t('common.tips17')) {
-            eventBus.$emit('LogoutNotify', i18n.global.t('common.tips18'))
+        if (err !== '业务超时') {
+            eventBus.$emit('LogoutNotify', '登录失效,请重新登录')
         }
         return Promise.reject(err)
     }

+ 2 - 2
src/packages/mobile/views/pricing/trade/images/Index.vue

@@ -1,13 +1,13 @@
 <template>
     <app-view class="g-detail">
         <div class="g-detail__desc" v-if="pictureurl != ''">
-            <!-- <img :src="getFileUrl(pictureurl)" alt="" /> -->
+            <img :src="getFileUrl(pictureurl)" alt="" />
         </div>
     </app-view>
 </template>
 
 <script lang="ts" setup>
-// import { getFileUrl } from '@/filters';
+import { getFileUrl } from '@/filters';
 
 defineProps({
     pictureurl: {

+ 1 - 4
src/utils/vant/index.ts

@@ -1,7 +1,6 @@
 import { showNotify, NotifyType, showLoadingToast, showToast, showDialog, DialogOptions, ToastType } from 'vant'
 import { timerInterceptor } from '@/utils/timer'
 import plus from '@/utils/h5plus'
-import { i18n } from '@/stores'
 
 /**
  * 消息通知
@@ -61,9 +60,7 @@ export function fullloading(callback: (hideLoading: (msg?: string, type?: ToastT
 export function dialog(options: string | DialogOptions) {
     if (typeof options === 'string') {
         return showDialog({
-            message: options,
-            confirmButtonText: i18n.global.t('operation.confirm'),
-            cancelButtonText: i18n.global.t('operation.cancel')
+            message: options
         })
     }
     return showDialog(options)