Browse Source

调整我的页面整体样式/修复BUG

fanghuisheng 1 year ago
parent
commit
48b7a27546

+ 21 - 10
src/pages.json

@@ -52,7 +52,24 @@
     {
       "path": "pages/mine/index",
       "style": {
-        "navigationBarTitleText": "我的"
+        "navigationBarTitleText": "我的",
+        "app-plus": {
+          "bounce": "none",
+          "titleNView": {
+            "type": "transparent",
+            "buttons": [
+              {
+                "fontSrc": "/static/iconfont/uciconfont/iconfont.ttf",
+                "text": "\ue70f",
+                "fontSize": "28",
+                "color": "#303133",
+                "width": "42px",
+                "background": "rgba(0,0,0,0)",
+                "float": "right"
+              }
+            ]
+          }
+        }
       }
     },
     {
@@ -64,13 +81,7 @@
     {
       "path": "pages/mine/info/index",
       "style": {
-        "navigationBarTitleText": "个人信息"
-      }
-    },
-    {
-      "path": "pages/mine/info/edit",
-      "style": {
-        "navigationBarTitleText": "编辑资料"
+        "navigationBarTitleText": "个人资料"
       }
     },
     {
@@ -82,7 +93,7 @@
     {
       "path": "pages/mine/setting/index",
       "style": {
-        "navigationBarTitleText": "应用设置"
+        "navigationBarTitleText": "设置"
       }
     },
     {
@@ -441,7 +452,7 @@
     "list": [
       {
         "name": "", //模式名称
-        "path": "pages/index", //启动页面,必选
+        "path": "pages/login", //启动页面,必选
         "query": "" //启动参数,在页面的onLoad函数里面得到
       }
     ]

+ 3 - 3
src/pages/index.vue

@@ -289,8 +289,8 @@ onLoad((option) => {
     });
   }
 
-  if (uni.getStorageSync(useStore.$state.name)) {
-    arrayList.recentlyUsed = uni.getStorageSync(useStore.$state.name);
+  if (uni.getStorageSync(useStore.$state.name + useStore.$state.tenantId)) {
+    arrayList.recentlyUsed = uni.getStorageSync(useStore.$state.name + useStore.$state.tenantId);
   }
 
   // var res = uni.getStorageSync("selectedCode");
@@ -404,7 +404,7 @@ function navItemClick(item) {
 
     arrayList.recentlyUsed = publicStores.sortEvent(arrayList.recentlyUsed, 1);
 
-    uni.setStorageSync(useStore.$state.name, arrayList.recentlyUsed);
+    uni.setStorageSync(useStore.$state.name + useStore.$state.tenantId, arrayList.recentlyUsed);
 
     uni.navigateTo({
       url: item.path,

+ 2 - 2
src/pages/login.vue

@@ -137,7 +137,7 @@ function getVerifyCode() {
   }
 
   //#ifdef APP-PLUS
-  if (userChecked.value[0]) {
+  if (!userChecked.value[0]) {
     proxy.$modal.msg("请在阅读并同意 用户协议和隐私协议后登录");
     return;
   }
@@ -220,7 +220,7 @@ function submitRes() {
   //#endif
 
   //#ifdef APP-PLUS
-  if (userChecked.value[0]) {
+  if (!userChecked.value[0]) {
     proxy.$modal.msg("请在阅读并同意 用户协议和隐私协议后登录");
     return;
   }

+ 202 - 36
src/pages/mine/index.vue

@@ -9,18 +9,31 @@
           </view>
           <image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix"> </image>
           <view v-if="!data.name" @click="handleToLogin" class="login-tip"> 点击登录 </view>
-          <view v-if="data.name" @click="handleToInfo" class="user-info">
-            <view class="u_title"> 用户名:{{ data.name }} </view>
+          <view v-if="data.name" class="user-info">
+            <view class="u_title"> {{ data.name }} </view>
+            <view class="u_title"> {{ data.phone }} </view>
           </view>
         </view>
-        <view @click="handleToInfo" class="flex align-center">
-          <text style="white-space: nowrap">个人信息</text>
-          <view class="iconfont icon-right"></view>
-        </view>
+        <view class="flex align-center"> </view>
       </view>
+
+      <view class="vip-card-box"> </view>
     </view>
 
-    <view class="content-section">
+    <view
+      class="content-section"
+      :style="[
+        {
+          transform: coverTransform,
+          transition: coverTransition,
+        },
+      ]"
+      @touchstart="coverTouchstart"
+      @touchmove="coverTouchmove"
+      @touchend="coverTouchend"
+    >
+      <image class="mine-image" src="@/static/images/mine/arc.png"></image>
+
       <!-- <view class="mine-actions grid col-4 text-center">
         <view class="action-item" @click="handleJiaoLiuQun">
           <view class="iconfont icon-friendfill text-pink icon"></view>
@@ -44,25 +57,49 @@
         <view class="list-cell list-cell-arrow" @click="handleToEditInfo">
           <view class="menu-item-box">
             <view class="iconfont icon-user menu-icon"></view>
-            <view>编辑资料</view>
+            <view>个人资料</view>
           </view>
         </view>
-        <view class="list-cell list-cell-arrow" @click="handleHelp">
+        <view class="list-cell list-cell-arrow" @click="handleToPwd">
           <view class="menu-item-box">
-            <view class="iconfont icon-help menu-icon"></view>
-            <view>常见问题</view>
+            <view class="iconfont icon-password menu-icon"></view>
+            <view>修改密码</view>
           </view>
         </view>
+      </view>
+
+      <view class="menu-list">
         <view class="list-cell list-cell-arrow" @click="handleAbout">
           <view class="menu-item-box">
             <view class="iconfont icon-aixin menu-icon"></view>
             <view>关于我们</view>
           </view>
         </view>
-        <view class="list-cell list-cell-arrow" @click="handleToSetting">
+        <view class="list-cell list-cell-arrow" @click="handleHelp">
+          <view class="menu-item-box">
+            <view class="iconfont icon-help menu-icon"></view>
+            <view>常见问题</view>
+          </view>
+        </view>
+        <view class="list-cell list-cell-arrow" @click="handleCleanTmp">
           <view class="menu-item-box">
-            <view class="iconfont icon-setting menu-icon"></view>
-            <view>应用设置</view>
+            <view class="iconfont icon-clean menu-icon"></view>
+            <view>清理缓存</view>
+            <view style="margin: 0 15px 0 auto; font-size: 14px; color: #909399">{{ settingStores.$state.currentSize }}</view>
+          </view>
+        </view>
+        <view class="list-cell list-cell-arrow" @click="handleToUpgrade">
+          <view class="menu-item-box">
+            <view class="iconfont icon-refresh menu-icon"></view>
+            <view>检查更新</view>
+          </view>
+        </view>
+      </view>
+
+      <view class="cu-list menu">
+        <view class="cu-item item-box">
+          <view class="content text-center" @click="handleLogout">
+            <text class="text-black">退出登录</text>
           </view>
         </view>
       </view>
@@ -73,41 +110,53 @@
 <script setup>
 import config from "@/config";
 import storage from "@/utils/storage";
-import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
+import { onLoad, onShow, onHide, onLaunch, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
 
 import useStores from "@/store/modules/user.js";
+import settingStore from "@/store/modules/setting.js";
 const useStore = useStores();
+const settingStores = settingStore();
 
 const { proxy } = getCurrentInstance();
 
-const data = reactive({
-  name: useStore.$state.name,
-  version: getApp().globalData.config.appInfo.version,
-});
-
 const avatar = computed(() => {
   return useStore.$state.avatar;
 });
+
 const windowHeight = computed(() => {
   return uni.getSystemInfoSync().windowHeight - 50;
 });
 
-function handleToInfo() {
-  proxy.$tab.navigateTo("/pages/mine/info/index");
-}
-function handleToEditInfo() {
-  proxy.$tab.navigateTo("/pages/mine/info/edit");
-}
-function handleToSetting() {
-  proxy.$tab.navigateTo("/pages/mine/setting/index");
-}
+const data = reactive({
+  name: useStore.$state.name,
+  phone: useStore.$state.phonenumber,
+  version: getApp().globalData.config.appInfo.version,
+
+  coverTransform: "translateY(0px)",
+  coverTransition: "0s",
+  moving: false,
+});
+
+const { coverTransform, coverTransition, moving } = toRefs(data);
+
+/**
+ * @点击登录
+ */
 function handleToLogin() {
   proxy.$tab.reLaunch("/pages/login");
 }
+
+/**
+ * @点击头像
+ */
 function handleToAvatar() {
   proxy.$tab.navigateTo("/pages/mine/avatar/index");
 }
+
+/**
+ * @退出登录
+ */
 function handleLogout() {
   proxy.$modal.confirm("确定注销并退出系统吗?").then(() => {
     useStore.LogOut().then(() => {
@@ -115,19 +164,99 @@ function handleLogout() {
     });
   });
 }
+
+/**
+ * @常见问题
+ */
 function handleHelp() {
   proxy.$tab.navigateTo("/pages/mine/help/index");
 }
+
+/**
+ * @个人资料
+ */
+function handleToEditInfo() {
+  proxy.$tab.navigateTo("/pages/mine/info/index");
+}
+
+/**
+ * @修改密码
+ */
+function handleToPwd() {
+  proxy.$tab.navigateTo("/pages/mine/pwd/index");
+}
+
+/**
+ * @检查更新
+ */
+function handleToUpgrade() {
+  proxy.$modal.showToast("模块建设中~");
+}
+
+/**
+ * @关于我们
+ */
 function handleAbout() {
   proxy.$tab.navigateTo("/pages/mine/about/index");
 }
-function handleJiaoLiuQun() {
-  // proxy.$modal.showToast("QQ:1813914505");
-  proxy.$modal.showToast("模块建设中~");
+
+/**
+ * @清理缓存
+ */
+function handleCleanTmp() {
+  // #ifdef H5
+  proxy.$modal.showToast("H5暂不支持此功能");
+  // #endif
+
+  // #ifdef APP-PLUS
+  proxy.$setting.clearCache();
+  // #endif
 }
-function handleBuilding() {
-  proxy.$modal.showToast("模块建设中~");
+
+let startY = 0,
+  moveY = 0,
+  pageAtTop = true;
+
+function coverTouchstart(e) {
+  if (pageAtTop === false) {
+    return;
+  }
+  coverTransition.value = "transform .1s linear";
+  startY = e.touches[0].clientY;
+}
+function coverTouchmove(e) {
+  moveY = e.touches[0].clientY;
+  let moveDistance = moveY - startY;
+  if (moveDistance < 0) {
+    moving.value = false;
+    return;
+  }
+  moving.value = true;
+  if (moveDistance >= 80 && moveDistance < 100) {
+    moveDistance = 80;
+  }
+  if (moveDistance > 0 && moveDistance <= 80) {
+    coverTransform.value = `translateY(${moveDistance}px)`;
+  }
+}
+function coverTouchend() {
+  if (moving.value === false) {
+    return;
+  }
+  moving.value = false;
+  coverTransition.value = "transform 0.3s cubic-bezier(.21,1.93,.53,.64)";
+  coverTransform.value = "translateY(0px)";
 }
+
+onLoad((options) => {});
+
+// 自定义导航事件
+onNavigationBarButtonTap((e) => {
+  console.log(e);
+  if (e.float == "right") {
+    proxy.$tab.navigateTo("/pages/mine/setting/index");
+  }
+});
 </script>
 
 <style lang="scss">
@@ -136,7 +265,7 @@ function handleBuilding() {
   height: 100%;
 
   .header-section {
-    padding: 15px 15px 45px 15px;
+    padding: 55px 15px 0 15px;
     background-color: #149eff;
     color: white;
 
@@ -161,11 +290,33 @@ function handleBuilding() {
         line-height: 30px;
       }
     }
+
+    .vip-card-box {
+      display: flex;
+      flex-direction: column;
+      color: #f7d680;
+      height: 132px;
+      background: url("@/static/images/mine/vip-card.png");
+      background-size: 100% 100%;
+      border-radius: 8px 8px 0 0;
+      overflow: hidden;
+      position: relative;
+      padding: 11px 13px;
+    }
   }
 
   .content-section {
     position: relative;
-    top: -50px;
+    margin-top: -85px;
+    background-color: #f8f8f8;
+
+    .mine-image {
+      position: absolute;
+      left: 0;
+      top: -16px;
+      width: 100%;
+      height: 36upx;
+    }
 
     .mine-actions {
       margin: 0.625rem 0.625rem;
@@ -188,3 +339,18 @@ function handleBuilding() {
   }
 }
 </style>
+
+<style lang="scss" scoped>
+.item-box {
+  background-color: #ffffff;
+  margin: 30rpx;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+  padding: 10rpx;
+  border-radius: 8rpx;
+  color: #303133;
+  font-size: 32rpx;
+}
+</style>

+ 0 - 148
src/pages/mine/info/edit.vue

@@ -1,148 +0,0 @@
-<template>
-  <view class="container">
-    <view class="example">
-      <uni-forms ref="form" :model="user" labelWidth="80px">
-        <uni-forms-item label="用户昵称" name="nickName">
-          <uni-easyinput v-model="user.nickName" placeholder="请输入昵称" />
-        </uni-forms-item>
-        <uni-forms-item label="手机号码" name="phonenumber">
-          <uni-easyinput v-model="user.phonenumber" placeholder="请输入手机号码" />
-        </uni-forms-item>
-        <uni-forms-item label="邮箱" name="email">
-          <uni-easyinput v-model="user.email" placeholder="请输入邮箱" />
-        </uni-forms-item>
-        <uni-forms-item label="性别" name="sex" required>
-          <uni-data-checkbox v-model="user.sex" :localdata="sexs" />
-        </uni-forms-item>
-      </uni-forms>
-      <button type="primary" @click="submit">提交</button>
-    </view>
-  </view>
-</template>
-
-<script setup>
-import { getUserProfile } from "@/api/system/user";
-import { updateUserProfile } from "@/api/system/user";
-
-import { onReady, onLoad, onShow, onNavigationBarButtonTap } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, getCurrentInstance, toRefs } from "vue";
-
-const data = reactive({
-  user: {
-    nickName: "",
-    phonenumber: "",
-    email: "",
-    sex: "",
-  },
-  sexs: [
-    {
-      text: "男",
-      value: "0",
-    },
-    {
-      text: "女",
-      value: "1",
-    },
-  ],
-  rules: {
-    nickName: {
-      rules: [
-        {
-          required: true,
-          errorMessage: "用户昵称不能为空",
-        },
-      ],
-    },
-    phonenumber: {
-      rules: [
-        {
-          required: true,
-          errorMessage: "手机号码不能为空",
-        },
-        {
-          pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-          errorMessage: "请输入正确的手机号码",
-        },
-      ],
-    },
-    email: {
-      rules: [
-        {
-          required: true,
-          errorMessage: "邮箱地址不能为空",
-        },
-        {
-          format: "email",
-          errorMessage: "请输入正确的邮箱地址",
-        },
-      ],
-    },
-  },
-});
-
-const { user, sexs, rules } = toRefs(data);
-
-const { proxy } = getCurrentInstance();
-
-const form = ref(null);
-
-function getUser() {
-  getUserProfile().then((response) => {
-    console.log(response);
-    user.value = response.data.user;
-  });
-}
-function submit(ref) {
-  form.value.validate().then((res) => {
-    updateUserProfile(user.value).then((response) => {
-      proxy.$modal.msgSuccess("修改成功,重新登录后生效!");
-      proxy.$tab.reLaunch("pages/mine/index");
-    });
-  });
-}
-
-onLoad((options) => {
-  getUser();
-});
-
-onReady(() => {
-  form.value.setRules(rules.value);
-});
-</script>
-
-<style>
-page {
-  background-color: #ffffff;
-}
-</style>
-
-<style lang="scss">
-.example {
-  padding: 15px;
-  background-color: #fff;
-}
-
-.segmented-control {
-  margin-bottom: 15px;
-}
-
-.button-group {
-  margin-top: 15px;
-  display: flex;
-  justify-content: space-around;
-}
-
-.form-item {
-  display: flex;
-  align-items: center;
-  flex: 1;
-}
-
-.button {
-  display: flex;
-  align-items: center;
-  height: 35px;
-  line-height: 35px;
-  margin-left: 10px;
-}
-</style>

+ 127 - 7
src/pages/mine/info/index.vue

@@ -1,20 +1,38 @@
 <template>
   <view class="container">
-    <uni-list>
+    <!-- <uni-list>
       <uni-list-item showExtraIcon="true" :extraIcon="{ type: 'person-filled' }" title="昵称" :rightText="user.nickName" />
       <uni-list-item showExtraIcon="true" :extraIcon="{ type: 'phone-filled' }" title="手机号码" :rightText="user.phonenumber" />
       <uni-list-item showExtraIcon="true" :extraIcon="{ type: 'email-filled' }" title="邮箱" :rightText="user.email" />
       <uni-list-item showExtraIcon="true" :extraIcon="{ type: 'auth-filled' }" title="岗位" :rightText="postGroup" />
       <uni-list-item showExtraIcon="true" :extraIcon="{ type: 'staff-filled' }" title="角色" :rightText="roleGroup" />
       <uni-list-item showExtraIcon="true" :extraIcon="{ type: 'calendar-filled' }" title="创建日期" :rightText="user.createTime" />
-    </uni-list>
+    </uni-list> -->
+
+    <view class="example">
+      <uni-forms ref="form" :model="user" labelWidth="80px">
+        <uni-forms-item label="用户昵称" name="nickName">
+          <uni-easyinput v-model="user.nickName" placeholder="请输入昵称" />
+        </uni-forms-item>
+        <uni-forms-item label="手机号码" name="phonenumber">
+          <uni-easyinput v-model="user.phonenumber" placeholder="请输入手机号码" />
+        </uni-forms-item>
+        <uni-forms-item label="邮箱" name="email">
+          <uni-easyinput v-model="user.email" placeholder="请输入邮箱" />
+        </uni-forms-item>
+        <uni-forms-item label="性别" name="sex" required>
+          <uni-data-checkbox v-model="user.sex" :localdata="sexs" />
+        </uni-forms-item>
+      </uni-forms>
+      <button type="primary" class="edtiButtom" @click="submit">修改资料</button>
+    </view>
   </view>
 </template>
 
 <script setup>
-import { getUserProfile } from "@/api/system/user";
-import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
-import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
+import { getUserProfile, updateUserProfile } from "@/api/system/user";
+import { onLoad, onShow, onHide, onReady, onLaunch, onNavigationBarButtonTap } from "@dcloudio/uni-app";
+import { ref, shallowRef, reactive, computed, getCurrentInstance, toRefs, onMounted, inject } from "vue";
 
 import useStores from "@/store/modules/user.js";
 const useStore = useStores();
@@ -24,11 +42,64 @@ const { proxy } = getCurrentInstance();
 const data = reactive({
   name: useStore.$state.name,
   version: getApp().globalData.config.appInfo.version,
+
+  user: {
+    nickName: "",
+    phonenumber: "",
+    email: "",
+    sex: "",
+  },
+  sexs: [
+    {
+      text: "男",
+      value: "0",
+    },
+    {
+      text: "女",
+      value: "1",
+    },
+  ],
+  rules: {
+    nickName: {
+      rules: [
+        {
+          required: true,
+          errorMessage: "用户昵称不能为空",
+        },
+      ],
+    },
+    phonenumber: {
+      rules: [
+        {
+          required: true,
+          errorMessage: "手机号码不能为空",
+        },
+        {
+          pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+          errorMessage: "请输入正确的手机号码",
+        },
+      ],
+    },
+    email: {
+      rules: [
+        {
+          required: true,
+          errorMessage: "邮箱地址不能为空",
+        },
+        {
+          format: "email",
+          errorMessage: "请输入正确的邮箱地址",
+        },
+      ],
+    },
+  },
 });
 
-const user = ref({});
+const { user, sexs, rules } = toRefs(data);
+
 const roleGroup = ref("");
 const postGroup = ref("");
+const form = ref(null);
 
 function getUser() {
   getUserProfile().then((response) => {
@@ -38,9 +109,22 @@ function getUser() {
   });
 }
 
-onLoad(() => {
+function submit(ref) {
+  form.value.validate().then((res) => {
+    updateUserProfile(user.value).then((response) => {
+      proxy.$modal.msgSuccess("修改成功,重新登录后生效!");
+      proxy.$tab.reLaunch("pages/mine/index");
+    });
+  });
+}
+
+onLoad((options) => {
   getUser();
 });
+
+onReady(() => {
+  form.value.setRules(rules.value);
+});
 </script>
 
 <style lang="scss">
@@ -48,3 +132,39 @@ page {
   background-color: #ffffff;
 }
 </style>
+
+<style lang="scss">
+.example {
+  padding: 15px;
+  background-color: #fff;
+
+  .edtiButtom {
+    font-size: 15px;
+    border-radius: 100px;
+  }
+}
+
+.segmented-control {
+  margin-bottom: 15px;
+}
+
+.button-group {
+  margin-top: 15px;
+  display: flex;
+  justify-content: space-around;
+}
+
+.form-item {
+  display: flex;
+  align-items: center;
+  flex: 1;
+}
+
+.button {
+  display: flex;
+  align-items: center;
+  height: 35px;
+  line-height: 35px;
+  margin-left: 10px;
+}
+</style>

+ 66 - 23
src/pages/mine/setting/index.vue

@@ -1,29 +1,44 @@
 <template>
   <view class="setting-container" :style="{ height: `${windowHeight}px` }">
     <view class="menu-list">
+      <view class="list-cell list-cell-arrow" @click="handleToEditInfo">
+        <view class="menu-item-box">
+          <view class="iconfont icon-user menu-icon"></view>
+          <view>个人资料</view>
+        </view>
+      </view>
       <view class="list-cell list-cell-arrow" @click="handleToPwd">
         <view class="menu-item-box">
           <view class="iconfont icon-password menu-icon"></view>
           <view>修改密码</view>
         </view>
       </view>
-      <view class="list-cell list-cell-arrow" @click="handleToUpgrade">
+    </view>
+
+    <view class="menu-list">
+      <view class="list-cell list-cell-arrow" @click="handleAbout">
         <view class="menu-item-box">
-          <view class="iconfont icon-refresh menu-icon"></view>
-          <view>检查更新</view>
+          <view class="iconfont icon-aixin menu-icon"></view>
+          <view>关于我们</view>
+        </view>
+      </view>
+      <view class="list-cell list-cell-arrow" @click="handleHelp">
+        <view class="menu-item-box">
+          <view class="iconfont icon-help menu-icon"></view>
+          <view>常见问题</view>
         </view>
       </view>
       <view class="list-cell list-cell-arrow" @click="handleCleanTmp">
         <view class="menu-item-box">
           <view class="iconfont icon-clean menu-icon"></view>
           <view>清理缓存</view>
+          <view style="margin: 0 15px 0 auto; font-size: 14px; color: #909399">{{ settingStores.$state.currentSize }}</view>
         </view>
       </view>
-    </view>
-    <view class="cu-list menu">
-      <view class="cu-item item-box">
-        <view class="content text-center" @click="handleLogout">
-          <text class="text-black">退出登录</text>
+      <view class="list-cell list-cell-arrow" @click="handleToUpgrade">
+        <view class="menu-item-box">
+          <view class="iconfont icon-refresh menu-icon"></view>
+          <view>检查更新</view>
         </view>
       </view>
     </view>
@@ -31,25 +46,62 @@
 </template>
 
 <script setup>
+import { onLoad, onShow, onHide, onLaunch, onNavigationBarButtonTap } from "@dcloudio/uni-app";
 import { ref, reactive, computed, getCurrentInstance, toRefs, inject } from "vue";
 
 import useStores from "@/store/modules/user.js";
+import settingStore from "@/store/modules/setting.js";
 const useStore = useStores();
+const settingStores = settingStore();
 
 const { proxy } = getCurrentInstance();
 
 const data = reactive({});
 
+const {} = toRefs(data);
+
 const windowHeight = computed(() => {
   return uni.getSystemInfoSync().windowHeight - 50;
 });
 
+/**
+ * @个人资料
+ */
+function handleToEditInfo() {
+  proxy.$tab.navigateTo("/pages/mine/info/index");
+}
+
+/**
+ * @修改密码
+ */
 function handleToPwd() {
   proxy.$tab.navigateTo("/pages/mine/pwd/index");
 }
+
+/**
+ * @常见问题
+ */
+function handleHelp() {
+  proxy.$tab.navigateTo("/pages/mine/help/index");
+}
+
+/**
+ * @检查更新
+ */
 function handleToUpgrade() {
   proxy.$modal.showToast("模块建设中~");
 }
+
+/**
+ * @关于我们
+ */
+function handleAbout() {
+  proxy.$tab.navigateTo("/pages/mine/about/index");
+}
+
+/**
+ * @清理缓存
+ */
 function handleCleanTmp() {
   // #ifdef H5
   proxy.$modal.showToast("H5暂不支持此功能");
@@ -59,6 +111,10 @@ function handleCleanTmp() {
   proxy.$setting.clearCache();
   // #endif
 }
+
+/**
+ * @退出登录
+ */
 function handleLogout() {
   proxy.$modal.confirm("确定注销并退出系统吗?").then(() => {
     useStore.LogOut().then(() => {
@@ -66,19 +122,6 @@ function handleLogout() {
     });
   });
 }
-</script>
 
-<style lang="scss" scoped>
-.item-box {
-  background-color: #ffffff;
-  margin: 30rpx;
-  display: flex;
-  flex-direction: row;
-  justify-content: center;
-  align-items: center;
-  padding: 10rpx;
-  border-radius: 8rpx;
-  color: #303133;
-  font-size: 32rpx;
-}
-</style>
+onLoad((options) => {});
+</script>

+ 10 - 14
src/pages/serveConfigSelect.vue

@@ -31,22 +31,12 @@
       <u-button v-if="radiolist.length > 0" type="primary" style="width: 100%; height: 45px; font-size: 17px; margin-top: 20px" @click="handleSubmit()" shape="circle"> 保 存</u-button>
     </view>
   </view>
-
-  <!--
-    .u-radio__icon-wrap{
-      background-color: transparent;
-    }
-    .u-icon{width: 8px;
-    height: 8px;
-    background-color: rgb(41, 121, 255);
-    border-radius: 100%;}
-    .u-icon__icon{display:none}  -->
 </template>
 
 <script setup>
 import config from "@/config";
 import { onLoad, onShow, onHide, onLaunch } from "@dcloudio/uni-app";
-import { ref, onMounted, inject, shallowRef, reactive, toRefs, getCurrentInstance } from "vue";
+import { ref, onMounted, inject, shallowRef, reactive, toRefs, getCurrentInstance, watchEffect } from "vue";
 import { getToken, setToken, removeToken } from "@/utils/auth";
 import publicStore from "@/store/modules/public.js";
 const publicStores = publicStore();
@@ -61,6 +51,11 @@ const dataList = reactive({
 const uForm = ref(null);
 const { radiolist, radiovalue } = toRefs(dataList);
 
+/**
+ * @获取serveList
+ */
+
+
 /**
  * @切换单选
  * @按钮点击事件
@@ -80,7 +75,8 @@ function deleteRadio(index) {
   let serveList = uni.getStorageSync("serveList");
   serveList[0].radiolist.splice(index, 1);
   uni.setStorageSync("serveList", serveList);
-  proxy.$tab.redirectTo("/pages/serveConfigSelect"); //重载当前页
+
+  init();
 }
 
 /**
@@ -141,7 +137,7 @@ function handleSubmit() {
  * @跳转登录
  */
 function navigateTo() {
-  proxy.$tab.redirectTo("/pages/login");
+  proxy.$tab.reLaunch("/pages/login");
 }
 
 /**
@@ -154,7 +150,7 @@ function init() {
     radiolist.value = serveList[0].radiolist;
   }
 
-  // uni.setStorageSync("serveList", []);
+  proxy.$tab.redirectTo("/pages/serveConfigSelect"); //重载当前页
 }
 
 onLoad((options) => {

+ 5 - 0
src/permission.js

@@ -1,4 +1,5 @@
 import { getToken } from "@/utils/auth";
+import setting from "@/plugins/setting";
 
 // 登录页面
 const loginPage = "/pages/login";
@@ -17,6 +18,10 @@ let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
 list.forEach((item) => {
   uni.addInterceptor(item, {
     invoke(to) {
+      // #ifdef APP-PLUS
+      setting.formatSize(); //获取缓存大小
+      // #endif
+
       if (getToken()) {
         if (to.url === loginPage) {
           uni.reLaunch({ url: "/" });

+ 4 - 0
src/plugins/setting.js

@@ -1,3 +1,5 @@
+import settingStore from "@/store/modules/setting.js";
+
 /**
  * @获取缓存
  */
@@ -16,6 +18,8 @@ const formatSize = () => {
     } else {
       v = (sizeCache / 1073741824).toFixed(2) + "GB";
     }
+
+    settingStore().$state.currentSize = currentSize
   });
   return currentSize;
 };

+ 7 - 3
src/static/iconfont/uciconfont/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 3620854 */
-  src: url('iconfont.woff2?t=1662690989920') format('woff2'),
-       url('iconfont.woff?t=1662690989920') format('woff'),
-       url('iconfont.ttf?t=1662690989920') format('truetype');
+  src: url('iconfont.woff2?t=1681973516727') format('woff2'),
+       url('iconfont.woff?t=1681973516727') format('woff'),
+       url('iconfont.ttf?t=1681973516727') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.ucicon-shezhi:before {
+  content: "\e70f";
+}
+
 .ucicon-filter:before {
   content: "\e7c7";
 }

BIN
src/static/iconfont/uciconfont/iconfont.ttf


BIN
src/static/iconfont/uciconfont/iconfont.woff


BIN
src/static/iconfont/uciconfont/iconfont.woff2


BIN
src/static/images/mine/arc.png


BIN
src/static/images/mine/vip-card.png


+ 22 - 0
src/store/modules/setting.js

@@ -0,0 +1,22 @@
+import { defineStore } from "pinia";
+
+const settingStore = defineStore("setting", {
+    state: () => ({
+        currentSize: "",//APP缓存
+    }),
+    persist: {
+        // 自定义数据持久化方式
+        // key: 'store-key', 指定key进行存储,此时非key的值不会持久化,刷新就会丢失
+        storage: window ? window.localStorage : uni.setStorageSync(), // 指定换成地址
+        // paths: ['nested.data'],// 指定需要持久化的state的路径名称
+        beforeRestore: (context) => {
+            console.log("Before" + context);
+        },
+        afterRestore: (context) => {
+            console.log("After" + context);
+        },
+    },
+    actions: {},
+});
+
+export default settingStore;

+ 8 - 0
src/store/modules/user.js

@@ -9,6 +9,7 @@ const useStores = defineStore("useStores", {
   state: () => ({
     token: getToken(),
     name: storage.get(constant.name),//用户名称
+    phonenumber: storage.get(constant.phonenumber),//用户手机号
     avatar: storage.get(constant.avatar),
     roles: storage.get(constant.roles),
     permissions: storage.get(constant.permissions),
@@ -81,7 +82,10 @@ const useStores = defineStore("useStores", {
             }
 
             this.SET_NAME(data.user.userName);
+            this.SET_PHONE(data.user.phonenumber);
             this.SET_AVATAR(data.user.avatar);
+
+
             resolve(res);
           })
           .catch((error) => {
@@ -124,6 +128,10 @@ const useStores = defineStore("useStores", {
       this.name = name;
       storage.set(constant.name, name);
     },
+    SET_PHONE(phonenumber) {
+      this.phonenumber = phonenumber;
+      storage.set(constant.phonenumber, phonenumber);
+    },
     SET_AVATAR(avatar) {
       this.avatar = avatar;
       storage.set(constant.avatar, avatar);

+ 0 - 2
src/uni_modules/uni-easyinput/components/uni-easyinput/common.js

@@ -6,9 +6,7 @@
  */
 export const debounce = function(func, wait = 1000, immediate = true) {
 	let timer;
-	console.log(1);
 	return function() {
-		console.log(123);
 		let context = this,
 			args = arguments;
 		if (timer) clearTimeout(timer);

+ 1 - 1
src/utils/storage.js

@@ -4,7 +4,7 @@ import constant from './constant'
 let storageKey = 'storage_data'
 
 // 存储节点变量名
-let storageNodeKeys = [constant.avatar, constant.name, constant.roles, constant.permissions, constant.loginTitle, constant.loginBottomTitle, constant.loginBg, constant.loginLogo, constant.tenantId]
+let storageNodeKeys = [constant.avatar, constant.name, constant.phonenumber, constant.roles, constant.permissions, constant.loginTitle, constant.loginBottomTitle, constant.loginBg, constant.loginLogo, constant.tenantId]
 
 // 存储的数据
 let storageData = uni.getStorageSync(storageKey) || {}