From 6b37a109ee12c3e1ae1d701f125d32df5cc1c113 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Thu, 06 Nov 2025 14:10:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/static/images/tabbar/icon_list.png | 0
src/pages/login/index.vue | 376 ++++++++++++++++++++++++----------------------
src/static/images/tabbar/icon_home1.png | 0
src/static/images/tabbar/icon_order_selected.png | 0
src/static/images/tabbar/icon_me_selected.png | 0
src/static/images/tabbar/icon_order.png | 0
src/pages/user/index.vue | 77 ++++----
src/static/images/app-logo.png | 0
src/static/images/tabbar/icon_me.png | 0
src/manifest.json | 10 +
src/static/images/tabbar/icon_home2.png | 0
src/static/images/tabbar/icon_list_selected.png | 0
src/static/images/tabbar/icon_home_selected.png | 0
13 files changed, 244 insertions(+), 219 deletions(-)
diff --git a/src/manifest.json b/src/manifest.json
index 2aa2971..4788f55 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -58,7 +58,15 @@
"dSYMs" : false
},
/* SDK配置 */
- "sdkConfigs" : {}
+ "sdkConfigs" : {},
+ "icons" : {
+ "android" : {
+ "hdpi" : "src/static/images/app-logo.png",
+ "xhdpi" : "src/static/images/app-logo.png",
+ "xxhdpi" : "src/static/images/app-logo.png",
+ "xxxhdpi" : "src/static/images/app-logo.png"
+ }
+ }
}
},
/* 快应用特有相关 */
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index 929fbde..c434423 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -1,210 +1,226 @@
<!-- 登录页 -->
<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="请输入用户名"
- />
+ <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>
+ <div class="pass-word">
+ <image :src="passwordSvg" />
+ <input v-model="loginForm.password" type="password" placeholder="请输入密码" />
+ </div>
- <button class="login-btn" :style="[inputStyle]" @tap="submit">
- 登录
- </button>
+ <button class="login-btn" :style="[inputStyle]" @tap="submit">
+ 登录
+ </button>
- <image class="lowerRightCorner" :src="droneSvg"/>
- </view>
+ <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 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";
-const userStore = useUserStore();
-const loginForm = ref({
- username: "",
- password: "",
-});
-const inputStyle = computed(() => {
- const style = {};
- if (loginForm.value.username && loginForm.value.password) {
- style.color = "#fff";
- style.backgroundColor = '#1D6FE9';
- }
- return style;
-});
-let redirect = HOME_PATH;
+ const userStore = useUserStore();
+ const loginForm = ref({
+ username: "",
+ password: "",
+ });
+ const inputStyle = computed(() => {
+ const style = {};
+ if (loginForm.value.username && loginForm.value.password) {
+ style.color = "#fff";
+ style.backgroundColor = '#1D6FE9';
+ }
+ return style;
+ });
+ let redirect = HOME_PATH;
-async function submit() {
- let userInfo = {
- tenantId: "000000",
- deptId: "",
- roleId: "",
- username: loginForm.value.username,
- password: loginForm.value.password,
- type: "account",
- code: "",
- key: "",
- };
- loginByUsername(
- userInfo.tenantId,
- userInfo.deptId,
- userInfo.roleId,
- userInfo.username,
- md5(userInfo.password),
- userInfo.type,
- userInfo.key,
- userInfo.code
- ).then((res) => {
- userStore.setUserInfo(res.data);
- uni.reLaunch({
- url: "/pages/user/index",
- });
- });
-}
+ async function submit() {
+ let userInfo = {
+ tenantId: "000000",
+ deptId: "",
+ roleId: "",
+ username: loginForm.value.username,
+ password: loginForm.value.password,
+ type: "account",
+ code: "",
+ key: "",
+ };
+ 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/user/index",
+ });
+ } catch (error) {
+ const errorMsg =error.data?.error_description !=="Bad credentials" ? error.data?.error_description: "登录失败,请重试";
+ uni.showToast({
+ title: errorMsg,
+ icon: "none",
+ duration: 2000
+ });
-onLoad((options) => {
- if (options.redirect && removeQueryString(options.redirect) !== LOGIN_PATH) {
- redirect = decodeURIComponent(options.redirect);
- }
-});
+ }
+ }
+
+ 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;
- }
- .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;
- }
- :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-input) {
- // top: 10px !important;
- //}
- }
- .pass-word {
- }
+ .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;
+ }
- input {
- @apply pb-6rpx mb-10rpx text-left;
- }
+ .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;
- .tips {
- @apply mt-8rpx mb-60rpx;
+ image {
+ width: 40rpx;
+ height: 40rpx;
+ margin-right: 12rpx;
+ }
- color: $u-info;
- }
+ :deep(uni-input) {
+ height: 40rpx;
+ line-height: 40rpx;
+ width: 80%;
+ margin-top: 20rpx;
+ }
- .login-btn {
- z-index: 1;
- @apply flex items-center justify-center py-12rpx px-0 text-30rpx border-none;
- background: #5a93e6;
- color: white;
- width: 590rpx;
- height: 76rpx;
- border-radius: 40rpx 40rpx 40rpx 40rpx;
- margin-top: 100rpx;
+ :deep(.uni-input-placeholder) {
+ font-size: 32rpx;
+ color: #E3E3E3;
+ font-weight: 500;
+ }
- &::after {
- @apply border-none;
- }
- }
+ //:deep(.uni-input-input) {
+ // top: 10px !important;
+ //}
+ }
- .alternative {
- @apply flex justify-between mt-30rpx;
+ .pass-word {}
- color: $u-tips-color;
- }
-}
+ input {
+ @apply pb-6rpx mb-10rpx text-left;
+ }
-.login-type-wrap {
- @apply flex justify-between pt-350rpx px-150rpx pb-150rpx;
+ .tips {
+ @apply mt-8rpx mb-60rpx;
- .item {
- @apply flex items-center flex-col text-28rpx;
+ color: $u-info;
+ }
- color: $u-content-color;
- }
-}
+ .login-btn {
+ z-index: 1;
+ @apply flex items-center justify-center py-12rpx px-0 text-30rpx border-none;
+ background: #5a93e6;
+ color: white;
+ width: 590rpx;
+ height: 76rpx;
+ border-radius: 40rpx 40rpx 40rpx 40rpx;
+ margin-top: 100rpx;
-.hint {
- @apply px-40rpx py-20rpx text-24rpx;
+ &::after {
+ @apply border-none;
+ }
+ }
- color: $u-tips-color;
+ .alternative {
+ @apply flex justify-between mt-30rpx;
- .link {
- color: $u-warning;
- }
-}
-</style>
+ color: $u-tips-color;
+ }
+ }
+
+ .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;
+ }
+ }
+
+ .hint {
+ @apply px-40rpx py-20rpx text-24rpx;
+
+ color: $u-tips-color;
+
+ .link {
+ color: $u-warning;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/src/pages/user/index.vue b/src/pages/user/index.vue
index 4c2eeaf..45a56c0 100644
--- a/src/pages/user/index.vue
+++ b/src/pages/user/index.vue
@@ -1,48 +1,48 @@
<!-- 我的 -->
<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="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="mt-20rpx">
- <div class="goOutStyle" @click="logOut">退出登录</div>
- </view>
- <div class="bottomLogo"><image src="@/static/images/user/logo1.png" alt="" /></div>
+ <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>
</template>
<script setup>
import {
getUserInfo,
- updateInfo,
- updatePassword
+
} from '@/api/user/index.js';
import {
useClipboard
@@ -78,7 +78,7 @@
function getDeviceRegion() {
getDeviceRegionApi().then(res => {
- // console.log(res.data.data, '用户设备')
+
})
}
const handelEdit = (val) => {
@@ -113,9 +113,10 @@
width: 100%;
height: 100%;
- padding-top: 88rpx;
}
-
+.userBox {
+ padding-top: 88rpx;
+}
.userName {
font-weight: 700;
font-size: 36rpx;
diff --git a/src/static/images/app-logo.png b/src/static/images/app-logo.png
new file mode 100644
index 0000000..13aba38
--- /dev/null
+++ b/src/static/images/app-logo.png
Binary files differ
diff --git a/src/static/images/tabbar/icon_home1.png b/src/static/images/tabbar/icon_home1.png
index ba24413..790d1c4 100644
--- a/src/static/images/tabbar/icon_home1.png
+++ b/src/static/images/tabbar/icon_home1.png
Binary files differ
diff --git a/src/static/images/tabbar/icon_home2.png b/src/static/images/tabbar/icon_home2.png
new file mode 100644
index 0000000..ba24413
--- /dev/null
+++ b/src/static/images/tabbar/icon_home2.png
Binary files differ
diff --git a/src/static/images/tabbar/icon_home_selected.png b/src/static/images/tabbar/icon_home_selected.png
index b933660..19ecf37 100644
--- a/src/static/images/tabbar/icon_home_selected.png
+++ b/src/static/images/tabbar/icon_home_selected.png
Binary files differ
diff --git a/src/static/images/tabbar/icon_list.png b/src/static/images/tabbar/icon_list.png
index 60518b0..34c1947 100644
--- a/src/static/images/tabbar/icon_list.png
+++ b/src/static/images/tabbar/icon_list.png
Binary files differ
diff --git a/src/static/images/tabbar/icon_list_selected.png b/src/static/images/tabbar/icon_list_selected.png
index 590933f..b98f189 100644
--- a/src/static/images/tabbar/icon_list_selected.png
+++ b/src/static/images/tabbar/icon_list_selected.png
Binary files differ
diff --git a/src/static/images/tabbar/icon_me.png b/src/static/images/tabbar/icon_me.png
index c0f79a1..1b2ca05 100644
--- a/src/static/images/tabbar/icon_me.png
+++ b/src/static/images/tabbar/icon_me.png
Binary files differ
diff --git a/src/static/images/tabbar/icon_me_selected.png b/src/static/images/tabbar/icon_me_selected.png
index a4aa7cb..6e3ee71 100644
--- a/src/static/images/tabbar/icon_me_selected.png
+++ b/src/static/images/tabbar/icon_me_selected.png
Binary files differ
diff --git a/src/static/images/tabbar/icon_order.png b/src/static/images/tabbar/icon_order.png
index 30b2953..f3cc671 100644
--- a/src/static/images/tabbar/icon_order.png
+++ b/src/static/images/tabbar/icon_order.png
Binary files differ
diff --git a/src/static/images/tabbar/icon_order_selected.png b/src/static/images/tabbar/icon_order_selected.png
index d8ee3fe..10f4d74 100644
--- a/src/static/images/tabbar/icon_order_selected.png
+++ b/src/static/images/tabbar/icon_order_selected.png
Binary files differ
--
Gitblit v1.9.3