7e92ffb424c20b0726e7bec2b6ce06780e9127dd..9aa2bae5d4e8cd8533c4ef0db0834d9c3670c810
2025-06-16 zjj
#
9aa2ba 对比 | 目录
2025-06-16 zjj
#
4c9525 对比 | 目录
2025-06-16 zjj
#
befe56 对比 | 目录
5个文件已修改
1个文件已添加
100 ■■■■ 已修改文件
App.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/request.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/home/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/login/index.vue 89 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/family/HarmonyOS_Sans_SC_Regular.ttf 补丁 | 查看 | 原始文档 | blame | 历史
App.vue
@@ -140,6 +140,11 @@
        src: url('static/family/HarmonyOS_Sans_SC_Light.ttf') format('truetype');
        
    }
    @font-face {
        font-family: a4;
        src: url('static/family/HarmonyOS_Sans_SC_Regular.ttf') format('truetype');
    }
    .nav-list {
        display: flex;
        flex-wrap: wrap;
common/request.js
@@ -16,7 +16,7 @@
        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://192.168.4.50:8080/rsf-server/pda' + url;
        uni.request({
            url: URL,
            data: postData,
pages.json
@@ -1,7 +1,7 @@
{
    "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
        {
            "path": "pages/login/login",
            "path": "pages/login/index",
            "style": {
                "navigationBarTitleText": "%page.login%"
            }
pages/home/index.vue
@@ -179,7 +179,7 @@
                setTimeout(() => {
                    uni.removeStorageSync('token');
                    uni.reLaunch({
                        url: "/pages/login/login"
                        url: "/pages/login/index"
                    });
                }, 1000);
            }
pages/login/index.vue
@@ -1,12 +1,12 @@
<template>
    <view class="bodyView">
        <view class="topView">
            <cover-image src="/static/img/login_top.png">
            </cover-image>
            <image src="/static/img/login_top.png" mode="aspectFill">
            </image>
        </view>
        <view class="logoView">
            <cover-image src="/static/img/newLogo.png">
            </cover-image>
            <image src="/static/img/newLogo.png" mode="aspectFit">
            </image>
        </view>
        <view class="bottomView">
            <view class="itemView" style="margin-bottom: 40px;">
@@ -55,7 +55,7 @@
                </view>
            </view>
            <view class="itemView">
                <button class="loadingButton"  :loading="loading">{{btnText}}</button>
                <button class="loadingButton" @click="onLogin()"  :loading="loading">{{btnText}}</button>
            </view>
        </view>
    </view>
@@ -117,8 +117,71 @@
        uni.onLocaleChange((e) => {
          this.applicationLocale = e.locale;
        })
        this.user = uni.getStorageSync('user')
        if (!this.user) {
            this.user = {
                userName: '',
                password: ''
            }
        }
    },
    methods:{
        async onLogin() {
            const {
                code,
                data,
                msg
            } = await request('/login', {
                username: this.user.userName,
                password: this.user.password,
            })
            if (code === 200) {
                this.loading = true;
                this.loginButton = 'login.loging';
                uni.setStorageSync('token', data.accessToken);
                uni.setStorageSync('userData', data.user);
                if (this.remberPassword) {
                    uni.setStorageSync('user', this.user);
                } else {
                    uni.removeStorageSync('user');
                }
                this.goHome()
            } else {
                uni.showToast({
                    title: msg
                })
            }
        },
        goHome() {
            setTimeout(() => {
                // this.getAuth2()
                this.getFields()
                uni.showToast({
                    title: '登录成功'
                })
                setTimeout(() => {
                    uni.reLaunch({
                        url: '../home/index'
                    });
                }, 300)
            }, 700)
        },
        async getFields() {
            const {
                code,
                data,
                msg
            } = await request('/dynamic/fields', {}, 'get')
            if (code === 200) {
                this.$store.commit('user/setFields', data)
            } else {
                uni.showToast({
                    title: msg
                })
            }
        },
        remberChange(e) {
            this.remberPassword = !this.remberPassword
        },
@@ -188,7 +251,7 @@
        color: #ababab;        
    }
    .textType3{
        font-family: a3;
        font-family: a4;
    }
    .bodyView{
        display: flex;
@@ -203,11 +266,8 @@
    .topView{
        flex: 7;
    }
    .topView cover-image{
    .topView image{
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .logoView{
        flex: 1;
@@ -216,10 +276,9 @@
        align-items: center;
        
    }
    .logoView cover-image{
        width: 33%;
        height: 35px;
        object-fit: cover;
    .logoView image{
        width: 33%;
        height: 50px;
        margin-right: 20px;
    }
    .bottomView{
@@ -297,7 +356,7 @@
    }
    .loadingButton{
        background-color: #ffda1e;
        font-family: a1;
    }
    .check {
        
static/family/HarmonyOS_Sans_SC_Regular.ttf
Binary files differ