#
whycq
2023-10-08 75252c6ad38784d0d753344dba37057e852df189
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<template>
    <view class="main">
        <!-- 设置按钮 -->
        <uni-icons type="gear" size="30" color="#b1b3b8" class="setting"></uni-icons>
        <view class="left">
            <!-- logo -->
            <view class="logo-box">
                <image src="../../static/img/logo.png" mode="aspectFit"></image>
            </view>
        </view>
        <view class="right">
            <view class="input-box">
                <My-input class="my-input" titleIcon="person" title="账号" placeholder="请输入账号" inputType="text" optIcon="bottom" />
                <My-input class="my-input" titleIcon="locked" title="密码" placeholder="请输入密码" inputType="password" optIcon="eye" optIconShow/>
                <view class="rember-password">
                    <view class="text">记住密码</view>
                    <switch :checked='remberPassword' color="#FFCC33" style="zoom:.5" @change="remberChange"/>
                </view>
            </view>
            <view class="button">
                登录
            </view>
        </view>
        <!-- 版本号 -->
        <!-- #ifdef APP-PLUS -->
        <view class="version">
            当前版本:{{version}}
        </view>
        <!-- #endif -->
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                version: '',
                remberPassword: true
            }
        },
        mounted() {
            uni.getSystemInfo({
                success(res) {
                    // console.log(res);
                }
            })
            // 手机端版本号
            // #ifdef APP-PLUS
            var that = this
            plus.runtime.getProperty(plus.runtime.appid, function(wgtinfo) {
                that.version = wgtinfo.version
            });
            // #endif
        },
        methods: {
            remberChange() {
                
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .setting {
        position: absolute;
        top: 8px;
        right: 8px;
        border-radius: 10px;
        box-shadow: inset 2px 2px 2px rgba(0,0,0,.3),
                    inset -2px -2px 2px rgba(255,255,255,.7),
                    -2px -2px 2px rgba(0,0,0,.4);
    }
    .main {
        height: 100%;
        width: 100%;
        display: flex;
        background-color: #ECF0F1;
        position: absolute;
    }
    .left {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .logo-box {
        background-color:  #ECF0F1;
        border-radius: 15px;
        box-shadow: inset 8px 8px 8px rgba(0,0,0,.3),
                    inset -8px -8px 8px rgba(255,255,255,.7),
                    -8px -8px 10px rgba(0,0,0,.4);
    }
    image {
        height: 100%;
        width: 100%;
    }
    .right {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
    }
    .input-box {
        width: 100%;
    }
    .my-input {
        width: 80%;
        margin: 16px 10% 16px 10%;
    }
    .rember-password {
        width: 78%;
        margin: 0 11% 0 11%;
        display: flex;
        justify-content: space-between;
        .text {
            font-size: 12px;
            color: #606266;
            line-height: 1;
        }
    }
    .button {
        width: 40%;
        margin: 0 auto;
        height: 50px;
        text-align: center;
        line-height: 50px;
        font-size: 20px;
        background-color:  #409EFF;
        color: #ECF0F1;
        border-radius: 7px;
        box-shadow: inset 4px 4px 4px rgba(0,0,0,.3),
                    inset -4px -4px 4px rgba(255,255,255,.4),
                    -4px -4px 5px rgba(0,0,0,.4);
    }
    @media screen and (orientation: portrait) {
        /* 竖屏 */
        .main {
            flex-direction: column;
        }
        .left {
            height: 40%;
            width: 100%;
        }
        .right {
            height: 40%;
            width: 100%;
        }
        .logo-box {
            height: 60%;
            width: 80%;
        }
    }
    @media screen and (orientation: landscape) {
        /* 横屏 */
        .main {
            display: flex;
        }
        .left {
            height: 100%;
            width: 50%;
        }
        .right {
            height: 100%;
            width: 50%;
        }
        .logo-box {
            height: 60%;
            width: 80%;
        }
    }
    .version {
        position: fixed;
        width: 100%;
        bottom: 0;
        text-align: center;
        font-size: 10px;
        color: #909399;
    }
</style>