From 7e92ffb424c20b0726e7bec2b6ce06780e9127dd Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期五, 13 六月 2025 17:04:51 +0800
Subject: [PATCH] #
---
package-lock.json | 19 ++
locale/zh-Hans.json | 5
static/family/HarmonyOS_Sans_SC_Black.ttf | 0
locale/en.json | 9
static/family/HarmonyOS_Sans_SC_Light.ttf | 0
static/img/login_top.png | 0
App.vue | 19 ++
common/request.js | 4
static/img/login_eye.png | 0
pages/login/index.vue | 356 ++++++++++++++++++++++++++++++++++++++++++++
static/img/login_text.png | 0
manifest.json | 6
static/img/login_noteye.png | 0
package.json | 5
static/family/HarmonyOS_Sans_SC_Bold.ttf | 0
static/img/login_backg.png | 0
16 files changed, 413 insertions(+), 10 deletions(-)
diff --git a/App.vue b/App.vue
index 7ce7d3c..cf72960 100644
--- a/App.vue
+++ b/App.vue
@@ -115,6 +115,9 @@
@import "colorui/icon.css";
@import "static/css/wms.css/wms.css";
@import "static/css/common.scss";
+ @import "static/family/HarmonyOS_Sans_SC_Bold.ttf"
+
+
/*姣忎釜椤甸潰鍏叡css */
body {
@@ -122,7 +125,21 @@
color: #606266;
font-family: Helvetica Neue, Helvetica, sans-serif;
}
-
+ @font-face {
+ font-family: a1;
+ src: url('static/family/HarmonyOS_Sans_SC_Bold.ttf') format('truetype');
+
+ }
+ @font-face {
+ font-family: a2;
+ src: url('static/family/HarmonyOS_Sans_SC_Black.ttf') format('truetype');
+
+ }
+ @font-face {
+ font-family: a3;
+ src: url('static/family/HarmonyOS_Sans_SC_Light.ttf') format('truetype');
+
+ }
.nav-list {
display: flex;
flex-wrap: wrap;
diff --git a/common/request.js b/common/request.js
index 08c572f..53b11d5 100644
--- a/common/request.js
+++ b/common/request.js
@@ -15,8 +15,8 @@
return new Promise((resolve, reject) => {
const token = uni.getStorageSync('token');
// const URL = 'http://47.76.147.249:8080/rsf-server/pda' + url;
- const URL = 'http://test.zoneyung.net:8080/rsf-server/pda' + url;
- // const URL = 'http://127.0.0.1:8080/rsf-server/pda' + url;
+ // const URL = 'http://test.zoneyung.net:8080/rsf-server/pda' + url;
+ const URL = 'http://127.0.0.1:8080/rsf-server/pda' + url;
uni.request({
url: URL,
data: postData,
diff --git a/locale/en.json b/locale/en.json
index c9c2500..4f42730 100644
--- a/locale/en.json
+++ b/locale/en.json
@@ -11,8 +11,8 @@
"login":{
"login": "login",
"loging": "loging",
- "user": "user",
- "pwd": "pwd",
+ "user": "username",
+ "pwd": "password",
"inputUser": "Please enter your account",
"inputPwd":"Please enter your password",
"remPwd":"remember password"
@@ -30,7 +30,10 @@
"stationUnbinding":"Station Unbinding",
"bindAndInbound":"Binding And Inbound",
"quickPicking":"Quick Picking",
- "outLogin":"Login Out"
+ "outLogin":"Login Out",
+ "language-change-confirm":"chenge",
+ "hello":"Hello, welcome to log in to the WMS system!",
+ "intro":"Make manufacturing and logistics more efficient"
},
diff --git a/locale/zh-Hans.json b/locale/zh-Hans.json
index a4a0b7c..51e1137 100644
--- a/locale/zh-Hans.json
+++ b/locale/zh-Hans.json
@@ -31,7 +31,10 @@
"stationUnbinding":"绔欑偣瑙g粦",
"bindAndInbound":"缁戝畾&鍏ュ簱",
"quickPicking":"蹇�熸嫞璐�",
- "outLogin":"閫�鍑虹櫥褰�"
+ "outLogin":"閫�鍑虹櫥褰�",
+ "language-change-confirm":"纭畾鍒囨崲?",
+ "hello":"鎮ㄥソ锛屾杩庣櫥褰昗MS绯荤粺锛�",
+ "intro":"璁╁埗閫犱笌鐗╂祦鏇撮珮鏁�"
},
diff --git a/manifest.json b/manifest.json
index 93aef42..2c9bc8b 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,9 +1,9 @@
{
- "name" : "%app.name%",
+ "name" : "涓壃wms",
"appid" : "__UNI__DA5854D",
"description" : "",
- "versionName" : "20250225A",
- "versionCode" : 146,
+ "versionName" : "20250613",
+ "versionCode" : 100,
"transformPx" : false,
/* 5+App鐗规湁鐩稿叧 */
"app-plus" : {
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..36e6485
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,19 @@
+{
+ "name": "pda-master",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "dependencies": {
+ "vue-i18n": "^8.2.1"
+ }
+ },
+ "node_modules/vue-i18n": {
+ "version": "8.28.2",
+ "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.28.2.tgz",
+ "integrity": "sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA==",
+ "deprecated": "Vue I18n v8.x has reached EOL and is no longer actively maintained. About maintenance status, see https://vue-i18n.intlify.dev/guide/maintenance.html",
+ "license": "MIT"
+ }
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..3cac16e
--- /dev/null
+++ b/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "vue-i18n": "^8.2.1"
+ }
+}
diff --git a/pages/login/index.vue b/pages/login/index.vue
new file mode 100644
index 0000000..ea0b748
--- /dev/null
+++ b/pages/login/index.vue
@@ -0,0 +1,356 @@
+<template>
+ <view class="bodyView">
+ <view class="topView">
+ <cover-image src="/static/img/login_top.png">
+ </cover-image>
+ </view>
+ <view class="logoView">
+ <cover-image src="/static/img/newLogo.png">
+ </cover-image>
+ </view>
+ <view class="bottomView">
+ <view class="itemView" style="margin-bottom: 40px;">
+ <view class="helloText">{{$t('index.hello')}}</view>
+ <view class="introText">{{$t('index.intro')}}</view>
+ </view>
+ <view class="itemView">
+ <view class="textType3">{{$t('login.user')}}:</view>
+ <view class="input-wrapper">
+ <input class="uni-input" v-model="user.userName" focus :placeholder="$t('login.inputUser')" />
+ </view>
+ </view>
+ <view class="itemView">
+ <view class="textType3">{{$t('login.pwd')}}:</view>
+ <view class="input-wrapper">
+ <input class="uni-input" v-model="user.password" :placeholder="$t('login.inputPwd')" :password="!showPassword" />
+ <image src="/static/img/login_noteye.png" class="eye-icon" v-if="showPassword"
+ @click="changePassword"></image>
+ <image src="/static/img/login_eye.png" class="eye-icon" v-if="!showPassword"
+ @click="changePassword"></image>
+ </view>
+ </view>
+ <view class="langAndRemView">
+ <view class="check">
+ <view >
+ <view>{{$t('login.remPwd')}}</view>
+ </view>
+ <view>
+ <switch :checked='remberPassword' color="#FFCC33" style="transform:scale(0.7)" @change="remberChange" />
+ </view>
+ </view>
+ <view class="langView">
+ <!-- 璇█閫夋嫨涓嬫媺鑿滃崟 -->
+ <view class="language-dropdown">
+ <view class="selected-language" @click="toggleLanguageDropdown">
+ <text>{{getCurrentLanguageText()}}</text>
+ <uni-icons type="bottom" size="14" color="#707070"></uni-icons>
+ </view>
+ <view class="language-options" v-if="showLanguageDropdown">
+ <view class="language-option" v-for="(item, index) in locales" :key="index" @click="onLocaleChange(item)">
+ <text>{{item.text}}</text>
+ <uni-icons type="checkmarkempty" size="14" color="#007AFF" v-if="item.code == applicationLocale"></uni-icons>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="itemView">
+ <button class="loadingButton" :loading="loading">{{btnText}}</button>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ import md5 from '../../static/js/md5.js'
+ import {
+ request
+ } from '../../common/request.js'
+export default{
+ data(){
+ return{
+ showPassword: false,
+ loading: false,
+ showLanguageDropdown: false,
+ loginButton: 'login.login',
+ systemLocale: '',
+ applicationLocale: '',
+ remberPassword: true,
+ user: {
+ userName: '',
+ password: '',
+ },
+ }
+ },
+ computed:{
+ locales() {
+ return [{
+ text: this.$t('locale.auto'),
+ code: 'auto'
+ }, {
+ text: this.$t('locale.en'),
+ code: 'en'
+ },
+ {
+ text: this.$t('locale.zh-hans'),
+ code: 'zh-Hans'
+ },
+ {
+ text: this.$t('locale.zh-hant'),
+ code: 'zh-Hant'
+ },
+ {
+ text: this.$t('locale.ja'),
+ code: 'ja'
+ }
+ ]
+ },
+ btnText() {
+ return this.$t(this.loginButton);
+ }
+ },
+ onLoad(){
+ let systemInfo = uni.getSystemInfoSync();
+ this.systemLocale = systemInfo.language;
+ this.applicationLocale = uni.getLocale();
+ this.isAndroid = systemInfo.platform.toLowerCase() === 'android';
+ uni.onLocaleChange((e) => {
+ this.applicationLocale = e.locale;
+ })
+ },
+ methods:{
+ remberChange(e) {
+ this.remberPassword = !this.remberPassword
+ },
+ // 鏄剧ず/闅愯棌瀵嗙爜
+ changePassword() {
+ this.showPassword = !this.showPassword;
+ },
+ localChange() {
+ console.log(this.local)
+ if (this.isAndroid) {
+ uni.showModal({
+ content: this.$t('index.language-change-confirm'),
+ success: (res) => {
+ if (res.confirm) {
+ uni.setLocale(this.local.value);
+ }
+ }
+ })
+ } else {
+ uni.setLocale(this.local.value);
+ this.$i18n.locale = this.local.value;
+ }
+ },
+ // 鍒囨崲璇█涓嬫媺鑿滃崟鏄剧ず鐘舵��
+ toggleLanguageDropdown() {
+ this.showLanguageDropdown = !this.showLanguageDropdown;
+ },
+
+ // 鑾峰彇褰撳墠閫夋嫨鐨勮瑷�鏂囨湰
+ getCurrentLanguageText() {
+ const currentLocale = this.locales.find(item => item.code === this.applicationLocale);
+ return currentLocale ? currentLocale.text : this.$t('locale.auto');
+ },
+
+ // 璇█閫夋嫨鏀瑰彉
+ onLocaleChange(e) {
+ if (this.isAndroid) {
+ uni.showModal({
+ content: this.$t('index.language-change-confirm'),
+ success: (res) => {
+ if (res.confirm) {
+ uni.setLocale(e.code);
+ this.showLanguageDropdown = false;
+ }
+ }
+ })
+ } else {
+ uni.setLocale(e.code);
+ this.$i18n.locale = e.code;
+ this.showLanguageDropdown = false;
+ }
+ },
+ }
+}
+</script>
+
+<style>
+ .helloText{
+ font-family: a2;
+ font-size: 20px;
+ margin-top: 10px;
+ margin-bottom: 5px;
+ }
+ .introText{
+ font-family: a3;
+ font-size: 15px;
+ color: #ababab;
+ }
+ .textType3{
+ font-family: a3;
+ }
+ .bodyView{
+ display: flex;
+ flex-direction: column;
+ background-image: url("/static/img/login_backg.png");
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-position: center;
+ height: 100vh;
+ width: 100%;
+ }
+ .topView{
+ flex: 7;
+ }
+ .topView cover-image{
+ width: 100%;
+ height: 100%;
+
+ object-fit: cover;
+ }
+ .logoView{
+ flex: 1;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+
+ }
+ .logoView cover-image{
+ width: 33%;
+ height: 35px;
+ object-fit: cover;
+ margin-right: 20px;
+ }
+ .bottomView{
+ flex: 15;
+ display: flex;
+ flex-direction: column;
+ justify-content: flex-start;
+ align-items: center;
+ }
+ .itemView{
+ width: 90%;
+ height: 50px;
+ margin-bottom: 30px;
+ }
+ .langAndRemView{
+ width: 90%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
+ .langView{
+ width: 30%;
+ }
+ .textImage{
+ width: 60%;
+ height: 42px;
+ object-fit: cover;
+ margin-top: 20px;
+ margin-bottom: 30px;
+ }
+
+ .input-wrapper {
+ /* #ifndef APP-NVUE */
+ display: flex;
+ /* #endif */
+ padding: 8px 13px;
+ flex-direction: row;
+ flex-wrap: nowrap;
+ background-color: #FFFFFF;
+ border-radius: 10px;
+ height: 45px;
+ align-items: center;
+ margin-top: 5px;
+ }
+
+ .uni-input {
+ height: 28px;
+ line-height: 28px;
+ font-size: 15px;
+ padding: 0px;
+ flex: 1;
+ background-color: #FFFFFF;
+
+ }
+
+ .uni-icon {
+ font-family: uniicons;
+ font-size: 24px;
+ font-weight: normal;
+ font-style: normal;
+ width: 24px;
+ height: 24px;
+ line-height: 24px;
+ color: #999999;
+ }
+
+ .uni-eye-active {
+ color: #007AFF;
+ }
+
+ .eye-icon {
+ width: 20px;
+ height: 13px;
+ margin-left: 5px;
+ }
+ .loadingButton{
+ background-color: #ffda1e;
+
+ }
+ .check {
+
+ height: 100%;
+ display: flex;
+ font-size: 18px;
+ color: #606266;
+ justify-content: flex-start;
+ align-items: center;
+
+ }
+ /* 璇█閫夋嫨涓嬫媺鑿滃崟 */
+ .language-dropdown {
+ position: relative;
+ margin-bottom: 20rpx;
+ z-index: 10;
+ }
+
+ .selected-language {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 15rpx 20rpx;
+ background-color: #f8f8f8;
+ border-radius: 8rpx;
+ border: 1px solid #e0e0e0;
+ }
+
+ .language-options {
+ position: absolute;
+ bottom: 100%;
+ left: 0;
+ right: 0;
+ background-color: #ffffff;
+ border-radius: 8rpx;
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+ border: 1px solid #e0e0e0;
+ margin-bottom: 5rpx;
+ }
+
+ .language-option {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 15rpx 20rpx;
+ border-bottom: 1px solid #f0f0f0;
+ }
+
+ .language-option:last-child {
+ border-bottom: none;
+ }
+
+ .language-option:active {
+ background-color: #f5f5f5;
+ }
+</style>
\ No newline at end of file
diff --git a/static/family/HarmonyOS_Sans_SC_Black.ttf b/static/family/HarmonyOS_Sans_SC_Black.ttf
new file mode 100644
index 0000000..824b3d4
--- /dev/null
+++ b/static/family/HarmonyOS_Sans_SC_Black.ttf
Binary files differ
diff --git a/static/family/HarmonyOS_Sans_SC_Bold.ttf b/static/family/HarmonyOS_Sans_SC_Bold.ttf
new file mode 100644
index 0000000..5c925d1
--- /dev/null
+++ b/static/family/HarmonyOS_Sans_SC_Bold.ttf
Binary files differ
diff --git a/static/family/HarmonyOS_Sans_SC_Light.ttf b/static/family/HarmonyOS_Sans_SC_Light.ttf
new file mode 100644
index 0000000..8cfbc9d
--- /dev/null
+++ b/static/family/HarmonyOS_Sans_SC_Light.ttf
Binary files differ
diff --git a/static/img/login_backg.png b/static/img/login_backg.png
new file mode 100644
index 0000000..9390205
--- /dev/null
+++ b/static/img/login_backg.png
Binary files differ
diff --git a/static/img/login_eye.png b/static/img/login_eye.png
new file mode 100644
index 0000000..00f9cb5
--- /dev/null
+++ b/static/img/login_eye.png
Binary files differ
diff --git a/static/img/login_noteye.png b/static/img/login_noteye.png
new file mode 100644
index 0000000..bf4111f
--- /dev/null
+++ b/static/img/login_noteye.png
Binary files differ
diff --git a/static/img/login_text.png b/static/img/login_text.png
new file mode 100644
index 0000000..0d42775
--- /dev/null
+++ b/static/img/login_text.png
Binary files differ
diff --git a/static/img/login_top.png b/static/img/login_top.png
new file mode 100644
index 0000000..d13eafa
--- /dev/null
+++ b/static/img/login_top.png
Binary files differ
--
Gitblit v1.9.1