ZaiZai 1 tahun lalu
induk
melakukan
f4d4bcc400

+ 1 - 1
colorui/main.css

@@ -1120,7 +1120,7 @@ button.cuIcon.lg {
 }
 
 .cu-list.menu>.cu-item.arrow {
-	padding-right: 90rpx
+	padding-right: 70rpx
 }
 
 .cu-list.menu>.cu-item.arrow:before {

+ 1 - 2
components/hc-sys/index.vue

@@ -5,7 +5,6 @@
         </hc-nav-bar>
         <slot></slot>
         <hc-tabbar v-if="tabbar"/>
-
         <!--检测升级-->
         <hc-update/>
     </view>
@@ -25,13 +24,13 @@ const props = defineProps({
 });
 
 const isNavBars = ref(props.isNavBar)
+
 //监听
 watch(() => [
     props.isNavBar,
 ], ([val]) => {
     isNavBars.value = val
 })
-
 </script>
 
 <style scoped lang="scss">

+ 8 - 2
components/hc-update/index.vue

@@ -31,11 +31,17 @@
 
 <script setup>
 import {ref} from "vue";
+import {onLoad} from '@dcloudio/uni-app'
 
+//初始变量
 const isShow = ref(false)
+const appInfo = ref({version: '', wgt: ''})
 
-const {appVersion, appWgtVersion} = uni.getSystemInfoSync();
-//console.log(appVersion, appWgtVersion)
+//渲染完成
+onLoad(() => {
+    const {appVersion, appWgtVersion} = uni.getSystemInfoSync();
+    appInfo.value = {version: appVersion, wgt: appWgtVersion}
+})
 
 </script>
 

+ 7 - 0
pages.json

@@ -144,6 +144,13 @@
                 "navigationBarTitleText": "客服消息",
                 "navigationStyle": "default"
             }
+        },
+        {
+            "path": "pages/my/config",
+            "style": {
+                "navigationBarTitleText": "应用设置",
+                "navigationStyle": "default"
+            }
         }
     ],
     "globalStyle": {

+ 64 - 0
pages/my/config.vue

@@ -0,0 +1,64 @@
+<template>
+    <hc-sys class="hc-config-page" :isNavBar="false">
+        <view class="cu-list menu sm-border mt-1">
+            <view class="cu-item arrow" @click="toPageClick('/pages/my/info')">
+                <view class="content hc-flex">
+                    <text class="i-ri-user-3-fill text-blue text-32 mr-1"/>
+                    <text class="text-gray-4">个人资料</text>
+                </view>
+                <view class="action">{{userInfo.real_name}}</view>
+            </view>
+        </view>
+        <view class="cu-list menu sm-border">
+            <view class="cu-item arrow">
+                <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="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>
+            <view class="cu-item arrow">
+                <view class="content hc-flex">
+                    <text class="i-ri-rocket-fill text-green text-32 mr-1"/>
+                    <text class="text-gray-4">检测升级</text>
+                </view>
+                <view class="action">
+                    <!--view class="cu-tag round bg-blue light">有新版本</view-->
+                    <text class="text-26 text-gray-5">暂无新版本</text>
+                </view>
+            </view>
+        </view>
+    </hc-sys>
+</template>
+
+<script setup>
+import {ref} from "vue";
+import {onLoad} from '@dcloudio/uni-app'
+import {useAppStore} from "@/store";
+
+//初始变量
+const store = useAppStore()
+const userInfo = ref(store.userInfo);
+const appInfo = ref({version: '-', wgt: '-'});
+
+//渲染完成
+onLoad(() => {
+    //const {appVersion, appWgtVersion} = uni.getSystemInfoSync();
+    //appInfo.value = {version: appVersion ?? '-', wgt: appWgtVersion ?? '-'}
+})
+
+const toPageClick = (url) => {
+    uni.navigateTo({url: url});
+}
+</script>
+
+<style lang="scss">
+
+</style>

+ 2 - 2
pages/my/index.vue

@@ -1,7 +1,7 @@
 <template>
     <hc-sys class="hc-user-page" :tabbar="false" :isNavBar="false">
         <hc-nav-bar class="user-nav-bar" :style="`background: rgba(85, 77, 132, ${opacitys})`">
-            <text class="i-ri-settings-4-fill" @click="toSkipClick('/pages/my/info')"/>
+            <text class="i-ri-settings-4-fill" @click="toSkipClick('/pages/my/config')"/>
         </hc-nav-bar>
         <view class="user-nav-bg"/>
         <!--内容区域-->
@@ -11,7 +11,7 @@
             <!--个人信息卡片-->
             <view class="user-info-card animation-mode" :class="isAnimation?'is-animation':''">
                 <view class="name-avatar-bar">
-                    <view class="name">{{userInfo.realName}}</view>
+                    <view class="name" @click="toSkipClick('/pages/my/info')">{{userInfo.realName}}</view>
                     <view class="avatar" @click="selectImageTap">
                         <HcImg class="avatar-img" :src="userInfo.avatar" width="72" height="72"/>
                     </view>