2d70f5ed
chenbiao
add gitignore
|
1
|
<template>
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
2
|
<view>
|
e6c7d1db
刘淇
登陆
|
3
|
<view class="login-content" v-if="userIsLogin">
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
4
5
6
7
8
9
10
11
12
|
<view>
<image class="logo" src="/static/logo.png"></image>
<view>
<view class="title">{{appName}}</view>
<view class="title-msg">{{apptitle}}</view>
</view>
</view>
<view class="uni-common-mt paddinglr30">
<view class="uni-form-item uni-column">
|
f7e9351e
chenbiao
add 接口文档更新
|
13
|
<input class="uni-input" type="text" v-model="userCode" placeholder="请输入用户名" />
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
14
15
16
|
</view>
<view class="uni-form-item uni-column">
<input class="uni-input" password type="text" v-model="password" placeholder="请输入密码" />
|
2d70f5ed
chenbiao
add gitignore
|
17
|
</view>
|
2d70f5ed
chenbiao
add gitignore
|
18
|
</view>
|
e133a83d
chenbiao
add 接口文档更新
|
19
|
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
20
21
|
<view class="paddinglr30 uni-common-mt">
<button type="primary" @click="login">登录</button>
|
2d70f5ed
chenbiao
add gitignore
|
22
|
</view>
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
23
24
|
<view class="uni-common-mt login-foot">
点击”登录“,即表示你同意《商户用户协议》
|
e133a83d
chenbiao
add 接口文档更新
|
25
|
</view>
|
2d70f5ed
chenbiao
add gitignore
|
26
|
</view>
|
e6c7d1db
刘淇
登陆
|
27
|
<view class="bg-white" v-else>
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
28
29
30
31
32
|
<view class="index-top">
<view>
<view style="z-index: 2;">
<image src="http://122.152.205.72:88/group1/M00/00/05/CpoxxFw_-5-AFyVyAABLIH8xBTw233.png"
class="face"></image>
|
f7e9351e
chenbiao
add 接口文档更新
|
33
|
<view class="username">{{userName}}</view>
|
2d70f5ed
chenbiao
add gitignore
|
34
|
</view>
|
e133a83d
chenbiao
add 接口文档更新
|
35
|
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
36
37
38
39
40
41
42
|
</view>
<view class="set-wapper">
<image src="../../static/me/settings.png" class="settings" @tap="toSetting"></image>
</view>
</view>
<view class="index-menu">
<view class="uni-padding-wrap uni-common-mt">
|
e133a83d
chenbiao
add 接口文档更新
|
43
|
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
44
45
46
47
48
49
|
<view class="uni-flex uni-row">
<view class="flex-item">
<view class="">
<image src="../../static/me/me-parkrecord.png" class="index-icon"></image>
</view>
<view class="index-title">停车缴费</view>
|
2d70f5ed
chenbiao
add gitignore
|
50
|
</view>
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
51
52
53
54
55
|
<view class="flex-item">
<view class="">
<image src="../../static/me/me-recoder.png" class="index-icon"></image>
</view>
<view class="index-title">停车记录</view>
|
2d70f5ed
chenbiao
add gitignore
|
56
|
</view>
|
93c5ecb3
chenbiao
add 添加filter.js 设...
|
57
|
<view class="flex-item" @click="toPursePage">
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
58
59
60
61
|
<view class="">
<image src="../../static/me/me-balance.png" class="index-icon"></image>
</view>
<view class="index-title">我的钱包</view>
|
2d70f5ed
chenbiao
add gitignore
|
62
|
</view>
|
e133a83d
chenbiao
add 接口文档更新
|
63
|
|
2d70f5ed
chenbiao
add gitignore
|
64
|
</view>
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
65
66
67
68
69
70
|
<view class="uni-flex uni-row">
<view class="flex-item">
<view class="">
<image src="../../static/me/me-coupon.png" class="index-icon"></image>
</view>
<view class="index-title">卡券管理</view>
|
2d70f5ed
chenbiao
add gitignore
|
71
|
</view>
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
72
73
74
75
76
77
78
79
80
81
82
|
<view class="flex-item" @click="toInvoicePage">
<view class="">
<image src="../../static/me/me-fapao.png" class="index-icon"></image>
</view>
<view class="index-title">发票申领</view>
</view>
<view class="flex-item" @click="toRatingPage">
<view class="">
<image src="../../static/me/me-aboutus.png" class="index-icon"></image>
</view>
<view class="index-title">信用等级</view>
|
1b44ac51
chenbiao
add 信用等级 实名认证form表单
|
83
|
</view>
|
1b44ac51
chenbiao
add 信用等级 实名认证form表单
|
84
|
</view>
|
2d70f5ed
chenbiao
add gitignore
|
85
86
|
</view>
</view>
|
e133a83d
chenbiao
add 接口文档更新
|
87
|
|
2d70f5ed
chenbiao
add gitignore
|
88
|
</view>
|
2d70f5ed
chenbiao
add gitignore
|
89
|
</view>
|
e133a83d
chenbiao
add 接口文档更新
|
90
|
|
2d70f5ed
chenbiao
add gitignore
|
91
92
93
|
</template>
<script>
|
2d70f5ed
chenbiao
add gitignore
|
94
95
96
|
export default {
data() {
return {
|
e6c7d1db
刘淇
登陆
|
97
|
userIsLogin: true,
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
98
99
|
appName: '江阴慧停车',
apptitle: '江阴慧停车·智慧便捷',
|
f7e9351e
chenbiao
add 接口文档更新
|
100
|
userCode: '',
|
e133a83d
chenbiao
add 接口文档更新
|
101
|
password: '',
|
9ea66a4e
chenbiao
add 登录 首页 接口联调
|
102
|
userName: '',
|
2d70f5ed
chenbiao
add gitignore
|
103
104
105
|
}
},
onLoad() {
|
9ea66a4e
chenbiao
add 登录 首页 接口联调
|
106
107
108
109
110
111
112
113
114
|
let userToken= uni.getStorageSync("globalUser").token;
if(userToken){
this.userIsLogin = false;
let indexInfo= uni.getStorageSync("indexInfo");
this.userName=indexInfo.userName;
}else{
this.userIsLogin = true;
}
|
2d70f5ed
chenbiao
add gitignore
|
115
116
|
},
methods: {
|
e133a83d
chenbiao
add 接口文档更新
|
117
118
|
login() {
let that = this;
|
dd5ecdbd
chenbiao
add 接口文档更新
|
119
|
let data = {
|
f7e9351e
chenbiao
add 接口文档更新
|
120
|
userCode: that.userCode,
|
dd5ecdbd
chenbiao
add 接口文档更新
|
121
122
|
userPwd: that.password
};
|
f7e9351e
chenbiao
add 接口文档更新
|
123
|
if (that.userCode.trim() === "" || that.password.trim() === "") {
|
e133a83d
chenbiao
add 接口文档更新
|
124
125
126
127
128
129
130
|
uni.showToast({
title: '用户名密码必填',
icon: 'error',
duration: 2000
})
return;
} else {
|
dd5ecdbd
chenbiao
add 接口文档更新
|
131
|
|
e133a83d
chenbiao
add 接口文档更新
|
132
|
that.$myRequest({
|
9ea66a4e
chenbiao
add 登录 首页 接口联调
|
133
|
url: that.$common.userLogin,
|
e133a83d
chenbiao
add 接口文档更新
|
134
|
method: 'POST',
|
dd5ecdbd
chenbiao
add 接口文档更新
|
135
|
data: that.$common.requestSign(data)
|
e133a83d
chenbiao
add 接口文档更新
|
136
|
}).then(res => {
|
9ea66a4e
chenbiao
add 登录 首页 接口联调
|
137
|
console.log(res)
|
f7e9351e
chenbiao
add 接口文档更新
|
138
|
let userInfo = res.data;
|
9ea66a4e
chenbiao
add 登录 首页 接口联调
|
139
140
|
console.log(res.data)
|
dd5ecdbd
chenbiao
add 接口文档更新
|
141
142
|
// 保存用户信息到全局的缓存中
uni.setStorageSync("globalUser", userInfo);
|
9ea66a4e
chenbiao
add 登录 首页 接口联调
|
143
|
|
f7e9351e
chenbiao
add 接口文档更新
|
144
|
// 登陆成功 展示首页
|
e6c7d1db
刘淇
登陆
|
145
|
that.userIsLogin = false;
|
0206229e
刘淇
登陆
|
146
|
|
f7e9351e
chenbiao
add 接口文档更新
|
147
148
|
// 首页信息获取 接口
that.$myRequest({
|
9ea66a4e
chenbiao
add 登录 首页 接口联调
|
149
|
url: that.$common.indexInfo,
|
f7e9351e
chenbiao
add 接口文档更新
|
150
151
152
|
method: 'POST',
data: that.$common.requestSign()
}).then(res => {
|
9ea66a4e
chenbiao
add 登录 首页 接口联调
|
153
|
console.log(res)
|
f7e9351e
chenbiao
add 接口文档更新
|
154
|
var indexInfo = res.data;
|
9ea66a4e
chenbiao
add 登录 首页 接口联调
|
155
156
157
158
159
160
161
162
163
|
// 保存首页用户信息到全局的缓存中
uni.setStorageSync("indexInfo", indexInfo);
that.userName = indexInfo.userName;
|
f7e9351e
chenbiao
add 接口文档更新
|
164
|
})
|
9ea66a4e
chenbiao
add 登录 首页 接口联调
|
165
|
|
e133a83d
chenbiao
add 接口文档更新
|
166
167
168
169
170
|
})
}
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
171
|
},
|
2d70f5ed
chenbiao
add gitignore
|
172
173
174
175
176
|
toSetting() {
uni.navigateTo({
url: '../setting/setting'
});
|
7f3bad7f
chenbiao
add 发票抬头:查看 编辑 新增...
|
177
|
},
|
93c5ecb3
chenbiao
add 添加filter.js 设...
|
178
179
180
181
182
183
|
toPursePage() {
uni.navigateTo({
url: '../moneyRecharge/moneyRecharge'
});
},
|
7f3bad7f
chenbiao
add 发票抬头:查看 编辑 新增...
|
184
185
186
|
toInvoicePage() {
uni.navigateTo({
url: '../invoiceClaim/invoiceClaim'
|
1b44ac51
chenbiao
add 信用等级 实名认证form表单
|
187
|
|
7f3bad7f
chenbiao
add 发票抬头:查看 编辑 新增...
|
188
|
});
|
1b44ac51
chenbiao
add 信用等级 实名认证form表单
|
189
190
191
192
193
194
195
|
},
toRatingPage() {
uni.navigateTo({
url: '../creditRating/creditRating'
});
},
|
93c5ecb3
chenbiao
add 添加filter.js 设...
|
196
|
|
2d70f5ed
chenbiao
add gitignore
|
197
198
199
200
201
|
}
}
</script>
<style lang="scss">
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
202
203
204
205
206
207
|
.page {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
position: relative;
|
e133a83d
chenbiao
add 接口文档更新
|
208
|
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
209
|
}
|
e133a83d
chenbiao
add 接口文档更新
|
210
|
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
211
212
213
214
215
|
.login-content {
background-color: #f6f6f6;
text-align: center;
height: 100vh;
}
|
e133a83d
chenbiao
add 接口文档更新
|
216
|
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
217
218
219
220
221
|
.logo {
height: 200upx;
width: 200upx;
margin-top: 200upx;
}
|
e133a83d
chenbiao
add 接口文档更新
|
222
|
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
223
224
225
226
227
|
.title {
font-size: 32upx;
color: #000;
font-weight: 400;
}
|
e133a83d
chenbiao
add 接口文档更新
|
228
|
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
229
230
231
232
|
.title-msg {
font-size: 26upx;
color: #8d8d8d;
}
|
e133a83d
chenbiao
add 接口文档更新
|
233
234
|
.login-foot {
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
235
|
font-size: 26upx;
|
e133a83d
chenbiao
add 接口文档更新
|
236
|
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
237
|
}
|
e133a83d
chenbiao
add 接口文档更新
|
238
|
|
2f02d40c
chenbiao
add 登录页面数据接口联调
|
239
|
// 首页
|
2d70f5ed
chenbiao
add gitignore
|
240
241
|
.index-top {
height: 200upx;
|
48e03f64
chenbiao
add
|
242
|
background-color: #2d7bf7;
|
2d70f5ed
chenbiao
add gitignore
|
243
244
|
position: relative;
text-align: center;
|
48e03f64
chenbiao
add
|
245
|
z-index: 2;
|
2d70f5ed
chenbiao
add gitignore
|
246
247
248
249
250
251
252
253
254
255
256
|
}
.index-top:after {
width: 140%;
height: 300upx;
position: absolute;
left: -20%;
top: 0;
z-index: -1;
content: '';
border-radius: 0 0 50% 50%;
|
48e03f64
chenbiao
add
|
257
|
background: linear-gradient(#2d7bf7, #2d7bf7);
|
2d70f5ed
chenbiao
add gitignore
|
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
}
.face {
margin-top: 50upx;
width: 100upx;
height: 100upx;
border-radius: 50%;
}
.username {
height: 50upx;
line-height: 50upx;
text-align: center;
color: #fff;
|
48e03f64
chenbiao
add
|
274
|
z-index: 2;
|
2d70f5ed
chenbiao
add gitignore
|
275
276
277
278
279
280
281
|
}
.set-wapper {
height: 40rpx;
position: absolute;
top: 30upx;
right: 50upx;
|
48e03f64
chenbiao
add
|
282
|
z-index: 2;
|
2d70f5ed
chenbiao
add gitignore
|
283
284
285
286
287
288
289
290
291
|
}
.settings {
width: 40upx;
height: 40upx;
}
.index-menu {
width: 100%;
|
48e03f64
chenbiao
add
|
292
|
height: 440upx;
|
2d70f5ed
chenbiao
add gitignore
|
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
|
margin-top: 160upx;
}
.flex-item {
width: 33.3%;
height: 200upx;
text-align: center;
}
.index-icon {
width: 48upx;
height: 48upx;
// border: 50%;
}
.index-title {
height: 80upx;
line-height: 80upx;
// width: 80upx;
}
</style>
|