shuishen
2025-12-16 0b3c4a0ffa0ff53e892e5fdacc7c4ac196393a70
feat:部署微信小程序测试
10 files modified
1 files added
1022 ■■■■ changed files
src/App.vue 12 ●●●● patch | view | raw | blame | history
src/config/env.js 31 ●●●● patch | view | raw | blame | history
src/manifest.json 2 ●●● patch | view | raw | blame | history
src/pages.json 8 ●●●●● patch | view | raw | blame | history
src/pages/login/index.vue 497 ●●●● patch | view | raw | blame | history
src/pages/map/index copy.vue 10 ●●●● patch | view | raw | blame | history
src/pages/placeholder/placeholder.vue 11 ●●●●● patch | view | raw | blame | history
src/pages/user/index.vue 405 ●●●● patch | view | raw | blame | history
src/static/fonts/font.css 13 ●●●●● patch | view | raw | blame | history
src/subPackages/404/index.vue 9 ●●●●● patch | view | raw | blame | history
src/utils/common/index.js 24 ●●●●● patch | view | raw | blame | history
src/App.vue
@@ -1,12 +1,12 @@
<script setup>
import {onHide, onLaunch, onShow} from "@dcloudio/uni-app";
import {useAppStore, useUserStore} from "@/store";
import {useGlobalWS} from "@/hooks/useGlobalWS.js";
import { onHide, onLaunch, onShow } from "@dcloudio/uni-app";
import { useAppStore, useUserStore } from "@/store";
import { useGlobalWS } from "@/hooks/useGlobalWS.js";
const appStore = useAppStore();
const userStore = useUserStore();
useGlobalWS()
useGlobalWS();
onShow(() => {
  console.log("App Show");
@@ -23,7 +23,7 @@
    //不存在则跳转至登录页
    uni.reLaunch({
      url: "/pages/login/index",
    })
    });
  }
});
</script>
@@ -41,7 +41,7 @@
}
page {
  background-image: url('~@/static/images/user/bg.png');
  background-image: url("https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_app_assets/images/user/bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
src/config/env.js
@@ -1,26 +1,43 @@
/*
 * @Author       : yuan
 * @Date         : 2025-12-15 17:51:08
 * @LastEditors  : yuan
 * @LastEditTime : 2025-12-16 15:01:04
 * @FilePath     : \src\config\env.js
 * @Description  :
 * Copyright 2025 OBKoro1, All Rights Reserved.
 * 2025-12-15 17:51:08
 */
// 如果是打包app,需要改这里,h5不需要改这里
const development = {
  VITE_APP_ENV:'development',
  // 开发环境这里改为自己的
  // VITE_APP_WEBVIEW_URL: 'https://wrj.shuixiongit.com/drone-app-web-view/#/webViewWrapper',
  VITE_APP_WEBVIEW_URL: 'http://localhost:5173/drone-app-web-view/#/webViewWrapper',
  VITE_APP_WEBVIEW_URL: 'https://wrj.shuixiongit.com/drone-app-web-view/#/webViewWrapper',
  // VITE_APP_WEBVIEW_URL: 'http://localhost:5173/drone-app-web-view/#/webViewWrapper',
  VITE_API_BASE_URL: 'https://wrj.shuixiongit.com/api',
  // VITE_API_BASE_URL: 'https://aisky.org.cn/api',
  VITE_APP_WS_API_URL:'wss://wrj.shuixiongit.com/drone-wss/api/v1/ws'
  VITE_APP_WS_API_URL:'wss://wrj.shuixiongit.com/drone-wss/api/v1/ws',
  // 静态资源存放地址'
  VITE_APP_ASSETS_URL: 'https://wrj.shuixiongit.com/drone-app/assets/static'
}
const test = {
  VITE_APP_ENV:'test',
  VITE_APP_ENV: 'test',
  VITE_APP_WEBVIEW_URL: 'https://wrj.shuixiongit.com/drone-app-web-view/#/webViewWrapper',
  VITE_API_BASE_URL: 'https://wrj.shuixiongit.com/api',
  VITE_APP_WS_API_URL:'wss://wrj.shuixiongit.com/drone-wss/api/v1/ws'
  VITE_APP_WS_API_URL: 'wss://wrj.shuixiongit.com/drone-wss/api/v1/ws',
  // 静态资源存放地址'
  VITE_APP_ASSETS_URL: 'https://wrj.shuixiongit.com/drone-app/assets/static'
}
const production = {
  VITE_APP_ENV:'production',
  VITE_APP_ENV: 'production',
  VITE_APP_WEBVIEW_URL: 'https://aisky.org.cn/drone-app-web-view/#/webViewWrapper',
  VITE_API_BASE_URL: 'https://aisky.org.cn/api',
  VITE_APP_WS_API_URL:'wss://aisky.org.cn/drone-wss/api/v1/ws'
  VITE_APP_WS_API_URL: 'wss://aisky.org.cn/drone-wss/api/v1/ws',
  // 静态资源存放地址'
  VITE_APP_ASSETS_URL: 'https://wrj.shuixiongit.com/drone-app/assets/static'
}
export default {
src/manifest.json
@@ -89,7 +89,7 @@
    "quickapp" : {},
    /* 小程序特有相关 */
    "mp-weixin" : {
        "appid" : "wx1ff4bbc24b343ef1",
        "appid" : "wx7ad823321a1e4fdd",
        "setting" : {
            "urlCheck" : false
        },
src/pages.json
@@ -42,7 +42,14 @@
        "navigationBarTitleText": "登录页",
        "navigationStyle": "custom"
      }
    },
    {
      "path": "pages/placeholder/placeholder",
      "style": {
        "navigationBarTitleText": "占位页面"
      }
    }
  ],
  "subPackages": [
    {
@@ -174,6 +181,7 @@
        "pagePath": "subPackages/taskDetail/addTask/index"
      },
      {
        "pagePath": "pages/placeholder/placeholder",
        "iconPath": "static/images/tabbar/drone.png",
        "visible": "true"
      },
src/pages/login/index.vue
@@ -1,281 +1,284 @@
<!-- 登录页 -->
<template>
    <view class="login-form-wrap">
        <image class="logo" :src="logoSvg" />
        <div class="title">掌控智飞</div>
        <div class="user-name">
            <image :src="usernameSvg" />
            <input v-model="loginForm.username" placeholder="请输入用户名" />
        </div>
        <div class="pass-word">
            <image :src="passwordSvg" />
            <input v-model="loginForm.password" type="password" placeholder="请输入密码" />
        </div>
        <div class="remember-password">
            <label>
                <checkbox-group @change="toggleRemember">
                    <checkbox :checked="rememberPassword" color="#1D6FE9" style="transform:scale(0.7)" />
                </checkbox-group>
                记住密码
            </label>
        </div>
  <view class="login-form-wrap">
    <image class="logo" :src="logoSvg" />
    <div class="title">掌控智飞</div>
    <div class="user-name">
      <image :src="usernameSvg" />
      <input v-model="loginForm.username" placeholder="请输入用户名" />
    </div>
    <div class="pass-word">
      <image :src="passwordSvg" />
      <input
        v-model="loginForm.password"
        type="password"
        placeholder="请输入密码"
      />
    </div>
    <div class="remember-password">
      <label>
        <checkbox-group @change="toggleRemember">
          <checkbox
            :checked="rememberPassword"
            color="#1D6FE9"
            style="transform: scale(0.7)"
          />
        </checkbox-group>
        记住密码
      </label>
    </div>
        <button class="login-btn"  :style="[inputStyle]" @tap="submit">
            登录
        </button>
        <image class="lowerRightCorner" :src="droneSvg" />
    </view>
    <button class="login-btn" :style="[inputStyle]" @tap="submit">登录</button>
    <image class="lowerRightCorner" :src="droneSvg" />
  </view>
</template>
<script setup>
    import md5 from "js-md5";
    import {
        loginByUsername
    } from "@/api/user/index.js";
    import {
        useUserStore
    } from "@/store/index.js";
    import droneSvg from '@/static/images/login/droneSvg.svg'
    import usernameSvg from '@/static/images/login/username.svg'
    import passwordSvg from '@/static/images/login/password.svg'
    import logoSvg from '@/static/images/login/logo.svg'
    import {
        HOME_PATH,
        LOGIN_PATH,
        removeQueryString
    } from "@/router";
    import { onMounted } from 'vue';
import { getAssetsImage } from "@/utils/index.js";
import md5 from "js-md5";
import { loginByUsername } from "@/api/user/index.js";
import { useUserStore } from "@/store/index.js";
    const userStore = useUserStore();
    const loginForm = ref({
        username: "",
        password: "",
    });
    const rememberPassword = ref(false);
    const inputStyle = computed(() => {
        const style = {};
        if (loginForm.value.username && loginForm.value.password) {
            style.color = "#fff";
            style.backgroundColor = '#1D6FE9';
        }
        return style;
    });
    let redirect = HOME_PATH;
    function toggleRemember(e) {
        rememberPassword.value = e.detail.value.length > 0;
    }
import { HOME_PATH, LOGIN_PATH, removeQueryString } from "@/router";
import { onMounted } from "vue";
    async function submit() {
         if (!loginForm.value.username.trim()) {
            uni.showToast({
              title: "请输入用户名",
              icon: "none",
              duration: 2000
            });
            return;
          }
          if (!loginForm.value.password.trim()) {
            uni.showToast({
              title: "请输入密码",
              icon: "none",
              duration: 2000
            });
            return;
          }
        let userInfo = {
            tenantId: "000000",
            deptId: "",
            roleId: "",
            username: loginForm.value.username,
            password: loginForm.value.password,
            type: "account",
            code: "",
            key: "",
        };
const droneSvg = getAssetsImage("/images/login/droneSvg.svg");
        if (rememberPassword.value) {
            uni.setStorageSync('rememberedUser', {
                username: loginForm.value.username,
                password: loginForm.value.password
            });
        } else {
            uni.removeStorageSync('rememberedUser');
        }
const usernameSvg = getAssetsImage("/images/login/username.svg");
const passwordSvg = getAssetsImage("/images/login/password.svg");
const logoSvg = getAssetsImage("/images/login/logo.svg");
        try {
            const res = await loginByUsername(
                userInfo.tenantId,
                userInfo.deptId,
                userInfo.roleId,
                userInfo.username,
                md5(userInfo.password),
                userInfo.type,
                userInfo.key,
                userInfo.code
            );
            userStore.setUserInfo(res.data);
            uni.reLaunch({
                url: "/pages/map/index",
            });
        } catch (error) {
            const errorMsg =error.data?.error_description !=="Bad credentials" ? error.data?.error_description:  "登录失败,请重试";
            uni.showToast({
                title: errorMsg,
                icon: "none",
                duration: 2000
            });
        }
    }
    // 从本地存储加载记住的密码
    onMounted(() => {
        const savedUserInfo = uni.getStorageSync('rememberedUser');
        console.log('记住密码',savedUserInfo)
        if (savedUserInfo) {
            loginForm.value.username = savedUserInfo.username;
            loginForm.value.password = savedUserInfo.password;
            rememberPassword.value = true;
        }
    });
    onLoad((options) => {
        if (options.redirect && removeQueryString(options.redirect) !== LOGIN_PATH) {
            redirect = decodeURIComponent(options.redirect);
        }
    });
const userStore = useUserStore();
const loginForm = ref({
  username: "",
  password: "",
});
const rememberPassword = ref(false);
const inputStyle = computed(() => {
  const style = {};
  if (loginForm.value.username && loginForm.value.password) {
    style.color = "#fff";
    style.backgroundColor = "#1D6FE9";
  }
  return style;
});
let redirect = HOME_PATH;
function toggleRemember(e) {
  rememberPassword.value = e.detail.value.length > 0;
}
async function submit() {
  if (!loginForm.value.username.trim()) {
    uni.showToast({
      title: "请输入用户名",
      icon: "none",
      duration: 2000,
    });
    return;
  }
  if (!loginForm.value.password.trim()) {
    uni.showToast({
      title: "请输入密码",
      icon: "none",
      duration: 2000,
    });
    return;
  }
  let userInfo = {
    tenantId: "000000",
    deptId: "",
    roleId: "",
    username: loginForm.value.username,
    password: loginForm.value.password,
    type: "account",
    code: "",
    key: "",
  };
  if (rememberPassword.value) {
    uni.setStorageSync("rememberedUser", {
      username: loginForm.value.username,
      password: loginForm.value.password,
    });
  } else {
    uni.removeStorageSync("rememberedUser");
  }
  try {
    const res = await loginByUsername(
      userInfo.tenantId,
      userInfo.deptId,
      userInfo.roleId,
      userInfo.username,
      md5(userInfo.password),
      userInfo.type,
      userInfo.key,
      userInfo.code
    );
    userStore.setUserInfo(res.data);
    uni.reLaunch({
      url: "/pages/map/index",
    });
  } catch (error) {
    const errorMsg =
      error.data?.error_description !== "Bad credentials"
        ? error.data?.error_description
        : "登录失败,请重试";
    uni.showToast({
      title: errorMsg,
      icon: "none",
      duration: 2000,
    });
  }
}
// 从本地存储加载记住的密码
onMounted(() => {
  const savedUserInfo = uni.getStorageSync("rememberedUser");
  console.log("记住密码", savedUserInfo);
  if (savedUserInfo) {
    loginForm.value.username = savedUserInfo.username;
    loginForm.value.password = savedUserInfo.password;
    rememberPassword.value = true;
  }
});
onLoad((options) => {
  if (options.redirect && removeQueryString(options.redirect) !== LOGIN_PATH) {
    redirect = decodeURIComponent(options.redirect);
  }
});
</script>
<style lang="scss" scoped>
    .login-form-wrap {
        position: relative;
        text-align: center;
        height: 100%;
        width: 100%;
.login-form-wrap {
  position: relative;
  text-align: center;
  height: 100%;
  width: 100%;
        .logo {
            width: 127px;
            height: 51px;
            margin: 0 auto;
            margin-top: 104px;
            margin-bottom: 16px;
        }
  .logo {
    width: 127px;
    height: 51px;
    margin: 0 auto;
    margin-top: 104px;
    margin-bottom: 16px;
  }
        .lowerRightCorner {
            position: absolute;
            right: 0;
            bottom: 0;
            width: 425.61rpx;
            height: 316.46rpx;
        }
  .lowerRightCorner {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 425.61rpx;
    height: 316.46rpx;
  }
        .title {
            font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
            font-weight: 400;
            font-size: 84rpx;
            line-height: 82rpx;
            letter-spacing: 1px;
            text-shadow: 0px 8px 8px rgba(0, 0, 0, 0.18);
            text-align: center;
            font-style: normal;
            text-transform: none;
            color: #1452D3;
            text-align: center;
            margin-bottom: 168rpx;
        }
  .title {
    font-family: YouSheBiaoTiHei, YouSheBiaoTiHei;
    font-weight: 400;
    font-size: 84rpx;
    line-height: 82rpx;
    letter-spacing: 1px;
    text-shadow: 0px 8px 8px rgba(0, 0, 0, 0.18);
    text-align: center;
    font-style: normal;
    text-transform: none;
    color: #1452d3;
    text-align: center;
    margin-bottom: 168rpx;
  }
        .user-name,
        .pass-word {
            display: flex;
            //justify-content: center;
            align-items: center;
            margin-left: 62rpx;
            margin-right: 58rpx;
            height: 118rpx;
            border-bottom: 2rpx solid #E3E3E3;
  .user-name,
  .pass-word {
    display: flex;
    //justify-content: center;
    align-items: center;
    margin-left: 62rpx;
    margin-right: 58rpx;
    height: 118rpx;
    border-bottom: 2rpx solid #e3e3e3;
            image {
                width: 40rpx;
                height: 40rpx;
                margin-right: 12rpx;
            }
    image {
      width: 40rpx;
      height: 40rpx;
      margin-right: 12rpx;
    }
            :deep(uni-input) {
                height: 40rpx;
                line-height: 40rpx;
                width: 80%;
                margin-top: 20rpx;
            }
    :deep(uni-input) {
      height: 40rpx;
      line-height: 40rpx;
      width: 80%;
      margin-top: 20rpx;
    }
            :deep(.uni-input-placeholder) {
                font-size: 32rpx;
                color: #E3E3E3;
                font-weight: 500;
            }
        }
    :deep(.uni-input-placeholder) {
      font-size: 32rpx;
      color: #e3e3e3;
      font-weight: 500;
    }
  }
        .remember-password {
            display: flex;
            justify-content: flex-end;
            align-items: center;
            margin-left: 62rpx;
            margin-right: 58rpx;
            margin-top: 20rpx;
  .remember-password {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-left: 62rpx;
    margin-right: 58rpx;
    margin-top: 20rpx;
            color: #666;
            font-size: 28rpx;
    color: #666;
    font-size: 28rpx;
            label {
                display: flex;
                align-items: center;
            }
        }
    label {
      display: flex;
      align-items: center;
    }
  }
        input {
            @apply pb-6rpx mb-10rpx text-left;
        }
  input {
    @apply pb-6rpx mb-10rpx text-left;
  }
        .tips {
            @apply mt-8rpx mb-60rpx;
            color: $u-info;
        }
  .tips {
    @apply mt-8rpx mb-60rpx;
    color: $u-info;
  }
        .login-btn {
            z-index: 1;
            @apply flex items-center justify-center py-12rpx px-0 text-30rpx border-none;
            background: #1D6FE9;
            color: white;
            width: 590rpx;
            height: 76rpx;
            border-radius: 40rpx 40rpx 40rpx 40rpx;
            margin-top: 100rpx;
  .login-btn {
    z-index: 1;
    @apply flex items-center justify-center py-12rpx px-0 text-30rpx border-none;
    background: #1d6fe9;
    color: white;
    width: 590rpx;
    height: 76rpx;
    border-radius: 40rpx 40rpx 40rpx 40rpx;
    margin-top: 100rpx;
            &::after {
                @apply border-none;
            }
        }
    &::after {
      @apply border-none;
    }
  }
        .alternative {
            @apply flex justify-between mt-30rpx;
            color: $u-tips-color;
        }
    }
  .alternative {
    @apply flex justify-between mt-30rpx;
    color: $u-tips-color;
  }
}
    .login-type-wrap {
        @apply flex justify-between pt-350rpx px-150rpx pb-150rpx;
.login-type-wrap {
  @apply flex justify-between pt-350rpx px-150rpx pb-150rpx;
        .item {
            @apply flex items-center flex-col text-28rpx;
            color: $u-content-color;
        }
    }
  .item {
    @apply flex items-center flex-col text-28rpx;
    color: $u-content-color;
  }
}
    .hint {
        @apply px-40rpx py-20rpx text-24rpx;
        color: $u-tips-color;
.hint {
  @apply px-40rpx py-20rpx text-24rpx;
  color: $u-tips-color;
        .link {
            color: $u-warning;
        }
    }
  .link {
    color: $u-warning;
  }
}
</style>
src/pages/map/index copy.vue
@@ -89,12 +89,12 @@
  const mapStore = useMapStore()
  const layers = [{
      src: "/static/images/sl.png",
      src: "https://wrj.shuixiongit.com/drone-app/assets/static/images/sl.png",
      name: '标准地图',
      key: 1,
    },
    {
      src: "/static/images/yx.png",
      src: "https://wrj.shuixiongit.com/drone-app/assets/static/images/yx.png",
      name: '卫星地图',
      key: 2,
    }
@@ -218,13 +218,13 @@
  let map = null
  const layers = [{
      src: "/static/images/sl.png",
      src: "https://wrj.shuixiongit.com/drone-app/assets/static/images/sl.png",
      name: '标准地图',
      key: 1,
      map: basemap0
    },
    {
      src: "/static/images/yx.png",
      src: "https://wrj.shuixiongit.com/drone-app/assets/static/images/yx.png",
      name: '卫星地图',
      key: 2,
      map: basemap1
@@ -308,7 +308,7 @@
        // 创建一个自定义的图片图标
        const customIcon = L.icon({
          iconUrl: './static/images/logo.png', // 替换为你的图片路径
          iconUrl: 'https://wrj.shuixiongit.com/drone-app/assets/static/images/logo.png', // 替换为你的图片路径
          iconSize: [32, 32], // 图标大小
          iconAnchor: [16, 16], // 图标的锚点(设置图片的底部中心)
        });
src/pages/placeholder/placeholder.vue
New file
@@ -0,0 +1,11 @@
<!-- 登录页 -->
<template>
  <view>占位页</view>
</template>
<script setup>
</script>
<style lang="scss" scoped>
</style>
src/pages/user/index.vue
@@ -1,231 +1,236 @@
<!-- 我的 -->
<template>
  <view class="page-wrap">
  <view class="userBox">
      <view class="flex items-center pb-30rpx pl-30rpx pr-20rpx">
        <view class="mr-20rpx">
          <u-avatar :src="user.avatar" size="70" />
        </view>
        <view class="flex-1">
          <view class="userName">{{ userStore?.userInfo?.nick_name }}</view>
          <view class="departs">
            <image src="@/static/images/user/mobile.svg" alt="" />
            <span>{{user.deptName}}</span>
          </view>
        </view>
        <view class="rightLogo">
          <image src="@/static/images/user/logo2.png" alt="" />
        </view>
      </view>
      <view class="personalInformation">
        <div class="message">
          <div class="messagebox">个人信息</div>
          <div class="editInfo" @click="handelEdit(1)">点击编辑
            <image src="@/static/images/user/rightBtn.svg" alt="" />
          </div>
        </div>
        <div class="passwordBox">
          <div class="messagebox">修改密码</div>
          <div class="editInfo" @click="handelEdit(2)">点击编辑 <image src="@/static/images/user/rightBtn.svg" alt="" />
          </div>
        </div>
      </view>
    <view class="userBox">
      <view class="flex items-center pb-30rpx pl-30rpx pr-20rpx">
        <view class="mr-20rpx">
          <u-avatar :src="user.avatar" size="70" />
        </view>
        <view class="flex-1">
          <view class="userName">{{ userStore?.userInfo?.nick_name }}</view>
          <view class="departs">
            <image
              src="https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_app_assets/images/user/mobile.svg"
              alt=""
            />
            <span>{{ user.deptName }}</span>
          </view>
        </view>
        <view class="rightLogo">
          <image
            src="https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_app_assets/images/user/logo2.png"
            alt=""
          />
        </view>
      </view>
      <view class="personalInformation">
        <div class="message">
          <div class="messagebox">个人信息</div>
          <div class="editInfo" @click="handelEdit(1)">
            点击编辑
            <image
              :src="rightImage"
              alt=""
            />
          </div>
        </div>
        <div class="passwordBox">
          <div class="messagebox">修改密码</div>
          <div class="editInfo" @click="handelEdit(2)">
            点击编辑
            <image
              :src="rightImage"
              alt=""
            />
          </div>
        </div>
      </view>
      <view class="mt-20rpx">
        <div class="goOutStyle" @click="logOut">退出登录</div>
      </view>
      <div class="bottomLogo"><image src="@/static/images/user/logo1.png" alt="" /></div>
  </view>
      <view class="mt-20rpx">
        <div class="goOutStyle" @click="logOut">退出登录</div>
      </view>
      <div class="bottomLogo">
        <image
          :src="logoImage"
          alt=""
        />
      </div>
    </view>
  </view>
</template>
<script setup>
  import {
    getUserInfo,
import { getAssetsImage } from "@/utils/index.js";
import { getUserInfo } from "@/api/user/index.js";
import { useClipboard } from "@/hooks";
import { useUserStore } from "@/store/index.js";
import { onShow } from "@dcloudio/uni-app";
import { getDeviceRegionApi } from "@/api/map.js";
  } from '@/api/user/index.js';
  import {
    useClipboard
  } from "@/hooks";
  import {
    useUserStore
  } from "@/store/index.js";
  import {
    onShow
  } from "@dcloudio/uni-app";
  import {
    getDeviceRegionApi
  } from "@/api/map.js";
const { setClipboardData, getClipboardData } = useClipboard();
  const {
    setClipboardData,
    getClipboardData
  } = useClipboard();
  const userStore = useUserStore();
  const user = ref('')
  const getUserInfoData = () => {
    getUserInfo().then(res => {
      user.value = res.data.data;
    });
  };
const rightImage = getAssetsImage("/images/user/rightBtn.svg");
const logoImage = getAssetsImage("/images/user/logo1.png");
  function logOut() {
    userStore.setUserInfo(null)
    uni.reLaunch({
      url: '/pages/login/index'
    })
  }
  function getDeviceRegion() {
    getDeviceRegionApi().then(res => {
    })
  }
  const handelEdit = (val) => {
    if (val === 1) {
      uni.navigateTo({
        url: `/subPackages/userDetail/infos/index`
      });
    } else {
      uni.navigateTo({
        url: `/subPackages/userDetail/password/index`
      });
    }
  }
  // 登录鉴权,微信小程序端点击tabbar的底层逻辑不触发uni.switchTab,需要在页面onShow生命周期中校验权限
  onShow(async () => {
    getDeviceRegion()
    getUserInfoData()
    uni.setTabBarItem({
      index: 2, // Tab 的索引(从0开始)
      visible: false,
    })
    uni.setTabBarItem({
      index: 3, // Tab
      visible: true,
    });
const userStore = useUserStore();
const user = ref("");
const getUserInfoData = () => {
  getUserInfo().then((res) => {
    user.value = res.data.data;
  });
};
function logOut() {
  userStore.setUserInfo(null);
  uni.reLaunch({
    url: "/pages/login/index",
  });
}
function getDeviceRegion() {
  getDeviceRegionApi().then((res) => {});
}
const handelEdit = (val) => {
  if (val === 1) {
    uni.navigateTo({
      url: `/subPackages/userDetail/infos/index`,
    });
  } else {
    uni.navigateTo({
      url: `/subPackages/userDetail/password/index`,
    });
  }
};
// 登录鉴权,微信小程序端点击tabbar的底层逻辑不触发uni.switchTab,需要在页面onShow生命周期中校验权限
onShow(async () => {
  getDeviceRegion();
  getUserInfoData();
  uni.setTabBarItem({
    index: 2, // Tab 的索引(从0开始)
    visible: false,
  });
  uni.setTabBarItem({
    index: 3, // Tab
    visible: true,
  });
});
</script>
<style scoped lang="scss">
  .page-wrap {
    width: 100%;
    height: 100%;
  }
.userBox {
     padding-top: 88rpx;
.page-wrap {
  width: 100%;
  height: 100%;
}
  .userName {
    font-weight: 700;
    font-size: 36rpx;
    color: #000000;
.userBox {
  padding-top: 88rpx;
}
.userName {
  font-weight: 700;
  font-size: 36rpx;
  color: #000000;
}
.departs {
  display: flex;
  align-items: center;
  margin-top: 22rpx;
  image {
    width: 28rpx;
    height: 28rpx;
  }
  .departs {
    display: flex;
    align-items: center;
    margin-top: 22rpx;
    image {
      width: 28rpx;
      height: 28rpx;
    }
    span {
      font-family: "Source Han Sans CN";
      font-weight: 400;
      font-size: 28rpx;
      color: rgba(0, 0, 0, 0.6);
      margin-left: 6rpx;
    }
  }
  .rightLogo {
    width: 200rpx;
    height: 80rpx;
    image {
      width: 100%;
      height: 100%;
    }
  }
  .bottomLogo {
    position: absolute;
    bottom: 50rpx;
    left: 0;
    right: 0;
    margin: 0 auto;
    text-align: center;
    image {
      width: 128rpx;
      height: 52rpx;
    }
  }
  .goOutStyle {
    width: 590rpx;
    height: 76rpx;
    background: #1D6FE9;
    border-radius: 40rpx;
  span {
    font-family: "Source Han Sans CN";
    font-weight: 400;
    font-size: 28rpx;
    color: #FFFFFF;
    text-align: center;
    line-height: 76rpx;
    margin: auto;
    margin-top: 114rpx;
    color: rgba(0, 0, 0, 0.6);
    margin-left: 6rpx;
  }
}
  .personalInformation {
    display: flex;
    justify-content: space-between;
    padding: 0 24rpx;
.rightLogo {
  width: 200rpx;
  height: 80rpx;
    .message,
    .passwordBox {
      width: 340rpx;
      height: 160rpx;
  image {
    width: 100%;
    height: 100%;
  }
}
      .messagebox {
        padding: 20rpx 24rpx;
        font-family: "Source Han Sans CN";
        font-weight: 500;
        font-size: 28rpx;
        color: #000000;
      }
.bottomLogo {
  position: absolute;
  bottom: 50rpx;
  left: 0;
  right: 0;
  margin: 0 auto;
  text-align: center;
      .editInfo {
        padding: 20rpx 24rpx;
        color: rgba(0, 0, 0, 0.5);
        font-family: "Source Han Sans CN";
        font-weight: 400;
        font-size: 24rpx;
        display: flex;
        align-items: center;
  image {
    width: 128rpx;
    height: 52rpx;
  }
}
        image {
          width: 28rpx;
          height: 28rpx;
        }
.goOutStyle {
  width: 590rpx;
  height: 76rpx;
  background: #1d6fe9;
  border-radius: 40rpx;
  font-family: "Source Han Sans CN";
  font-weight: 400;
  font-size: 28rpx;
  color: #ffffff;
  text-align: center;
  line-height: 76rpx;
  margin: auto;
  margin-top: 114rpx;
}
.personalInformation {
  display: flex;
  justify-content: space-between;
  padding: 0 24rpx;
  .message,
  .passwordBox {
    width: 340rpx;
    height: 160rpx;
    .messagebox {
      padding: 20rpx 24rpx;
      font-family: "Source Han Sans CN";
      font-weight: 500;
      font-size: 28rpx;
      color: #000000;
    }
    .editInfo {
      padding: 20rpx 24rpx;
      color: rgba(0, 0, 0, 0.5);
      font-family: "Source Han Sans CN";
      font-weight: 400;
      font-size: 24rpx;
      display: flex;
      align-items: center;
      image {
        width: 28rpx;
        height: 28rpx;
      }
    }
    .message {
      background: url(@/static/images/user/info.png) no-repeat center;
      background-size: 100% 100%;
    }
    .passwordBox {
      background: url(@/static/images/user/password.png) no-repeat center;
      background-size: 100% 100%;
    }
  }
  .message {
    background: url(https://wrj.shuixiongit.com/drone-app/assets/static/images/user/info.png)
      no-repeat center;
    background-size: 100% 100%;
  }
  .passwordBox {
    background: url(https://wrj.shuixiongit.com/drone-app/assets/static/images/user/password.png)
      no-repeat center;
    background-size: 100% 100%;
  }
}
</style>
src/static/fonts/font.css
@@ -1,6 +1,6 @@
@font-face {
  font-family: "Source Han Sans CN";
  src: url("SourceHanSansCN-Regular.woff2") format("opentype");
  src: url("./SourceHanSansCN-Regular.woff2") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
@@ -8,35 +8,32 @@
@font-face {
  font-family: "Source Han Sans CN";
  src: url("SourceHanSansCN-Bold.woff2") format("opentype") ;
  src: url("./SourceHanSansCN-Bold.woff2") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Segoe UI";
  src: url("SourceHanSansCN-Regular.woff2") format("opentype");
  src: url("./SourceHanSansCN-Regular.woff2") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Segoe UI";
  src: url("SourceHanSansCN-Bold.woff2") format("opentype") ;
  src: url("./SourceHanSansCN-Bold.woff2") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* 额外的标题字体 */
@font-face {
  font-family: "YouSheBiaoTiHei";
  src: url("YouSheBiaoTiHei.TTF") format("truetype");
  src: url("./YouSheBiaoTiHei.TTF") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
src/subPackages/404/index.vue
@@ -2,8 +2,8 @@
 * @Author       : yuan
 * @Date         : 2025-09-28 09:31:16
 * @LastEditors  : yuan
 * @LastEditTime : 2025-09-28 09:50:32
 * @FilePath     : \src\pages\common\404\index.vue
 * @LastEditTime : 2025-12-16 11:02:27
 * @FilePath     : \src\subPackages\404\index.vue
 * @Description  : 
 * Copyright 2025 OBKoro1, All Rights Reserved. 
 * 2025-09-28 09:31:16
@@ -15,7 +15,7 @@
      mode="page"
      text-size="20"
      text="页面不存在"
      icon="/static/images/404.png"
      :icon="errorImage"
      width="380"
      height="380"
    />
@@ -23,8 +23,11 @@
</template>
<script setup>
import { getAssetsImage } from "@/utils/index.js";
import { HOME_PATH } from "@/router";
const errorImage = getAssetsImage("/404.png");
function handleBack() {
  uni.$u.route({
    type: "switchTab",
src/utils/common/index.js
@@ -10,8 +10,8 @@
 */
// 小程序更新检测
import { useUserStore } from "@/store/index.js"
import configEnv from "@/config/env.js";
import process from "node:process";
import configEnv from "@/config/env.js"
import process from "node:process"
export function mpUpdate () {
  const updateManager = uni.getUpdateManager()
@@ -40,26 +40,27 @@
    })
  })
}
export function getStatusBarHeight() {
export function getStatusBarHeight () {
  try {
    const systemInfo = uni.getSystemInfoSync();
    return systemInfo.statusBarHeight || 0;
    const systemInfo = uni.getSystemInfoSync()
    return systemInfo.statusBarHeight || 0
  } catch (error) {
    return 0;
    return 0
  }
}
export function getEnvObj() {
export function getEnvObj () {
  return configEnv[__APP_ENV__?.ENV_NAME] || {}
}
export function getWebViewUrl (targetUrl, otherParams) {
  const userStore = useUserStore()
  const url = getEnvObj().VITE_APP_WEBVIEW_URL
  const uniPlatform = __APP_ENV__.UNI_PLATFORM
  const statusBarHeight = getStatusBarHeight();
  const statusBarHeight = getStatusBarHeight()
  // 1. 处理用户参数
  const userParams = userStore?.userInfo ? JSON.stringify(userStore.userInfo) : '{}'
  // 2. 构建查询参数字符串
let queryString = `params=${encodeURIComponent(userParams)}&topMargin=${statusBarHeight}&uniPlatform=${uniPlatform}`
  let queryString = `params=${encodeURIComponent(userParams)}&topMargin=${statusBarHeight}&uniPlatform=${uniPlatform}`
  // 3. 处理 otherParams 对象
  if (otherParams && typeof otherParams === 'object') {
@@ -73,3 +74,8 @@
  // 4. 拼接完整 URL
  return `${url}${targetUrl}?${queryString}`
}
export function getAssetsImage (targetUrl) {
  const url = getEnvObj().VITE_APP_ASSETS_URL
  return `${url}${targetUrl}`
}