ZaiZai 1 year ago
parent
commit
2ac65166b6
2 changed files with 7 additions and 8 deletions
  1. 0 1
      components/hc-update/index.vue
  2. 7 7
      pages/my/config.vue

+ 0 - 1
components/hc-update/index.vue

@@ -42,7 +42,6 @@ onLoad(() => {
     const {appVersion, appWgtVersion} = uni.getSystemInfoSync();
     appInfo.value = {version: appVersion, wgt: appWgtVersion}
 })
-
 </script>
 
 <style scoped lang="scss">

+ 7 - 7
pages/my/config.vue

@@ -10,23 +10,23 @@
             </view>
         </view>
         <view class="cu-list menu sm-border">
-            <view class="cu-item arrow">
+            <view class="cu-item">
                 <view class="content hc-flex">
                     <text class="i-ri-pantone-fill text-purple text-32 mr-1"/>
                     <text class="text-gray-4">当前版本</text>
                 </view>
                 <view class="action text-gray-5">v{{appInfo.version}}</view>
             </view>
-            <view class="cu-item arrow">
+            <view class="cu-item">
                 <view class="content hc-flex">
                     <text class="i-ri-shapes-fill text-pink text-32 mr-1"/>
                     <text class="text-gray-4">热更新版本</text>
                 </view>
-                <view class="action text-gray-5">v{{appInfo.wgt}}</view>
+                <view class="action text-gray-5">{{appInfo.wgt ? `v${appInfo.wgt}` : '-'}}</view>
             </view>
-            <view class="cu-item arrow">
+            <view class="cu-item">
                 <view class="content hc-flex">
-                    <text class="i-ri-rocket-fill text-green text-32 mr-1"/>
+                    <text class="i-ri-rocket-fill text-cyan text-32 mr-1"/>
                     <text class="text-gray-4">检测升级</text>
                 </view>
                 <view class="action">
@@ -50,8 +50,8 @@ const appInfo = ref({version: '-', wgt: '-'});
 
 //渲染完成
 onLoad(() => {
-    //const {appVersion, appWgtVersion} = uni.getSystemInfoSync();
-    //appInfo.value = {version: appVersion ?? '-', wgt: appWgtVersion ?? '-'}
+    const {appVersion, appWgtVersion} = uni.getSystemInfoSync();
+    appInfo.value = {version: appVersion, wgt: appWgtVersion}
 })
 
 const toPageClick = (url) => {