Jelajahi Sumber

fix(index.vue): 修改toast提示方法,统一使用toast.show

feige996 11 bulan lalu
induk
melakukan
4e7dd994b4
1 mengubah file dengan 6 tambahan dan 6 penghapusan
  1. 6 6
      src/pages/mine/index.vue

+ 6 - 6
src/pages/mine/index.vue

@@ -162,7 +162,7 @@ const handlePassword = () => {
 // 消息通知
 const handleInform = () => {
   // uni.navigateTo({ url: `/pages/mine/inform/index` })
-  toast.success('功能开发中')
+  toast.show('功能开发中')
 }
 // 应用更新
 const handleAppUpdate = () => {
@@ -173,9 +173,9 @@ const handleAppUpdate = () => {
     // 请求完新版本信息的回调
     // console.log(res.hasUpdate)
     if (res.hasUpdate) {
-      toast.success('检测到新版本,正在下载中...')
+      toast.show('检测到新版本,正在下载中...')
     } else {
-      toast.success('已是最新版本')
+      toast.show('已是最新版本')
     }
   })
   updateManager.onUpdateReady(function (res) {
@@ -198,7 +198,7 @@ const handleAppUpdate = () => {
   // #endif
 
   // #ifndef MP
-  toast.success('功能开发中')
+  toast.show('功能开发中')
   // #endif
 }
 // 关于我们
@@ -217,7 +217,7 @@ const handleClearCache = () => {
           uni.clearStorageSync()
           // 清除用户信息并跳转到登录页
           useUserStore().logout()
-          toast.success('清除缓存成功')
+          toast.show('清除缓存成功')
         } catch (err) {
           console.error('清除缓存失败:', err)
           toast.error('清除缓存失败')
@@ -237,7 +237,7 @@ const handleLogout = () => {
         useUserStore().logout()
         hasLogin.value = false
         // 执行退出登录逻辑
-        toast.success('退出登录成功')
+        toast.show('退出登录成功')
         // #ifdef MP-WEIXIN
         // 微信小程序,去首页
         // uni.reLaunch({ url: '/pages/index/index' })