system-phone 3.1.93 → 3.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/LoginApp.vue +8 -4
- package/src/components/ModifyPassWord.vue +279 -220
- package/src/components/PhoneSellInfo.vue +148 -148
- package/src/filiale/gongyi/LoginApp.vue +8 -4
- package/src/filiale/kelamayi/LoginAppV4.vue +9 -4
- package/src/filiale/liaoyuan/LoginApp.vue +8 -4
- package/src/filiale/yuansheng/LoginApp.vue +8 -4
- package/src/filiale/yulinyuchuan/LoginApp.vue +9 -4
- package/src/filiale/yulinyuchuanTY/LoginApp.vue +9 -4
- package/src/plugins/validateStrongPasswordPhone.js +138 -125
package/package.json
CHANGED
|
@@ -106,6 +106,7 @@
|
|
|
106
106
|
import Vue from 'vue'
|
|
107
107
|
import * as Util from '../Util'
|
|
108
108
|
import cryptJS from './EncryptUtil'
|
|
109
|
+
import { validateStrongPasswordPhone } from '../plugins/validateStrongPasswordPhone.js'
|
|
109
110
|
//获取json配置文件
|
|
110
111
|
let asyncReady = async function (self, url) {
|
|
111
112
|
// 获取配置信息
|
|
@@ -481,10 +482,13 @@ export default {
|
|
|
481
482
|
console.log('获取参数结束')
|
|
482
483
|
this.loaderShow = false
|
|
483
484
|
// 弱口令验证
|
|
484
|
-
if (this.weakPassword
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
485
|
+
if (this.weakPassword) {
|
|
486
|
+
const pwdResult = validateStrongPasswordPhone(this.password)
|
|
487
|
+
if (!pwdResult.isValid) {
|
|
488
|
+
await this.$showMessage('登录系统: 此账户的密码过于简单,' + (pwdResult.errors[0] || '请修改密码后重新登陆!!!'), ['confirm'])
|
|
489
|
+
this.modifyPassword = true
|
|
490
|
+
return
|
|
491
|
+
}
|
|
488
492
|
}
|
|
489
493
|
this.$goto('nav-bottom')
|
|
490
494
|
},
|
|
@@ -1,220 +1,279 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!--<div class="app-botton" @click="back()">-->
|
|
3
|
-
<!--<span class="glyphicon glyphicon-menu-left">返回</span>-->
|
|
4
|
-
<!--</div>-->
|
|
5
|
-
<div class="auto">
|
|
6
|
-
<div class="
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
</div>
|
|
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
|
-
that.$
|
|
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
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
border-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
220
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<!--<div class="app-botton" @click="back()">-->
|
|
3
|
+
<!--<span class="glyphicon glyphicon-menu-left">返回</span>-->
|
|
4
|
+
<!--</div>-->
|
|
5
|
+
<div class="auto">
|
|
6
|
+
<div v-if="weakPassword" class="password-alert">
|
|
7
|
+
{{ passwordRuleHint }}
|
|
8
|
+
</div>
|
|
9
|
+
<div class="row app-row">
|
|
10
|
+
<div class="col-xs-4">
|
|
11
|
+
<img src="../assets/姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
12
|
+
<span class="text-left font">账号</span>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="col-xs-8 input-font">
|
|
15
|
+
<input type="text" class="search_input input-font" v-model="model.ename" readonly/>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="row app-row">
|
|
19
|
+
<div class="col-xs-4" style="margin-top: 8px">
|
|
20
|
+
<img src="../assets/原始密码.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
21
|
+
<span class="text-left font">原始密码</span>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="col-xs-8">
|
|
24
|
+
<input type="password" id="oldpassword" class="search_input input-font" v-model="model.oldpassword"
|
|
25
|
+
placeholder="请输入原始密码"/>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="row app-row">
|
|
29
|
+
<div class="col-xs-4" style="margin-top: 8px">
|
|
30
|
+
<img src="../assets/密码.png" style="width: 20px;margin-bottom: 5px">
|
|
31
|
+
<span class="text-left font">新密码</span>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="col-xs-8">
|
|
34
|
+
<input type="password" id="newpassword1" class="search_input input-font" v-model="model.password"
|
|
35
|
+
placeholder="请输入新密码"/>
|
|
36
|
+
<div v-if="weakPassword && passwordStrength.visible" class="password-strength">
|
|
37
|
+
<span class="strength-label">密码强度</span>
|
|
38
|
+
<span class="strength-tag" :class="passwordStrength.type">{{ passwordStrength.label }}</span>
|
|
39
|
+
<span class="strength-desc">{{ passwordStrength.desc }}</span>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div class="row app-row">
|
|
44
|
+
<div class="col-xs-4" style="margin-top: 8px">
|
|
45
|
+
<img src="../assets/密码.png" style="width: 20px;margin-bottom: 5px" alt="">
|
|
46
|
+
<span class="text-left font">确认密码</span>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="col-xs-8">
|
|
49
|
+
<input type="password" id="newpassword2" class="search_input input-font" v-model="model.newpassword"
|
|
50
|
+
placeholder="请重新输入新密码"/>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<div class="row app-row">
|
|
54
|
+
<div class="col-xs-4" style="margin-top: 8px">
|
|
55
|
+
<img src="../assets/选中.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showpass" @click="showoff()">
|
|
56
|
+
<img src="../assets/未选.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="!showpass" @click="showon()">
|
|
57
|
+
<span class="text-left font">显示密码</span>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="row app-row text-center">
|
|
61
|
+
<button type="button" class="btn btn-lg btn-font btn-color" style="width: 45%;" @click="save()">提交</button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
<script>
|
|
66
|
+
import Vue from 'vue'
|
|
67
|
+
|
|
68
|
+
let asyncCheck = async function (self, url) {
|
|
69
|
+
try {
|
|
70
|
+
let that = self
|
|
71
|
+
let user = {
|
|
72
|
+
ename: that.model.ename,
|
|
73
|
+
newpassword: that.model.password,
|
|
74
|
+
affirmpassword: that.model.newpassword,
|
|
75
|
+
password: that.model.oldpassword
|
|
76
|
+
}
|
|
77
|
+
let res = await Vue.resetpost(`${url}/${Vue.isv4 ?'api/af-system':'rs'}/user/modifypwd`, {data: user}, {resolveMsg: null, rejectMsg: null})
|
|
78
|
+
console.log("手机端验证登陆原始密码")
|
|
79
|
+
console.log(res.data)
|
|
80
|
+
if ((JSON.stringify(res.data).startsWith("{") || JSON.stringify(res.data).startsWith("[")) && res.data.code && res.data.msg) {
|
|
81
|
+
if (res.data.code === 200) {
|
|
82
|
+
that.$showMessage('修改密码成功!')
|
|
83
|
+
if (that.sourse == 'login') {
|
|
84
|
+
that.$emit('success', that.model.password)
|
|
85
|
+
return
|
|
86
|
+
}
|
|
87
|
+
that.$back()
|
|
88
|
+
} else {
|
|
89
|
+
that.$showMessage('修改密码失败,请重新输入!' + res.data.msg)
|
|
90
|
+
console.log(res.data)
|
|
91
|
+
return
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
if(res.data){
|
|
95
|
+
that.$showMessage('修改密码成功!')
|
|
96
|
+
if(that.sourse == 'login'){
|
|
97
|
+
that.$emit('success',that.model.password)
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
that.$back()
|
|
101
|
+
}else {
|
|
102
|
+
that.$showMessage('修改密码失败,请重新输入!')
|
|
103
|
+
console.log(res.data)
|
|
104
|
+
return
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
} catch (error) {
|
|
108
|
+
if (error.status == 500) {
|
|
109
|
+
that.$showMessage('网络异常,请检查手机网络!')
|
|
110
|
+
} else {
|
|
111
|
+
throw error
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
import { validateStrongPasswordPhone, getPasswordStrength, PASSWORD_RULE_HINT } from '../plugins/validateStrongPasswordPhone.js'
|
|
116
|
+
export default {
|
|
117
|
+
title: '修改密码',
|
|
118
|
+
data() {
|
|
119
|
+
return {
|
|
120
|
+
model: {
|
|
121
|
+
user: Vue.user.name,
|
|
122
|
+
userid: Vue.user.id,
|
|
123
|
+
ename: Vue.user.ename,
|
|
124
|
+
oldpassword: '',
|
|
125
|
+
password: '',
|
|
126
|
+
newpassword: ''
|
|
127
|
+
},
|
|
128
|
+
showpass: false,
|
|
129
|
+
passwordRuleHint: PASSWORD_RULE_HINT
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
computed: {
|
|
133
|
+
passwordStrength () {
|
|
134
|
+
return getPasswordStrength(this.model.password)
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
props: {
|
|
138
|
+
sourse: '',
|
|
139
|
+
weakPassword: false
|
|
140
|
+
},
|
|
141
|
+
ready() {
|
|
142
|
+
|
|
143
|
+
},
|
|
144
|
+
methods: {
|
|
145
|
+
back() {
|
|
146
|
+
let _this = this
|
|
147
|
+
this.$showMessage('所填写内容将不可恢复!', ['confirm', 'cancel']).then((res) => {
|
|
148
|
+
if (res === 'confirm') {
|
|
149
|
+
_this.$back()
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
},
|
|
153
|
+
// showpass(){
|
|
154
|
+
// console.log('1')
|
|
155
|
+
// document.getElementById("oldpassword").type = "text"
|
|
156
|
+
// },
|
|
157
|
+
showon() {
|
|
158
|
+
this.showpass = true
|
|
159
|
+
document.getElementById("oldpassword").type = "text"
|
|
160
|
+
document.getElementById("newpassword1").type = "text"
|
|
161
|
+
document.getElementById("newpassword2").type = "text"
|
|
162
|
+
},
|
|
163
|
+
showoff() {
|
|
164
|
+
this.showpass = false
|
|
165
|
+
document.getElementById("oldpassword").type = "password"
|
|
166
|
+
document.getElementById("newpassword1").type = "password"
|
|
167
|
+
document.getElementById("newpassword2").type = "password"
|
|
168
|
+
},
|
|
169
|
+
save() {
|
|
170
|
+
// 先对新密码和确认密码是否一致
|
|
171
|
+
if (this.model.password != this.model.newpassword) {
|
|
172
|
+
this.$showMessage('两次输入密码不一致!')
|
|
173
|
+
return
|
|
174
|
+
}
|
|
175
|
+
// 弱口令验证
|
|
176
|
+
if (this.weakPassword) {
|
|
177
|
+
const pwdResult = validateStrongPasswordPhone(this.model.password)
|
|
178
|
+
if (!pwdResult.isValid) {
|
|
179
|
+
this.$showMessage('密码过于简单,' + (pwdResult.errors[0] || '请按照要求修改密码!!!'))
|
|
180
|
+
return
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// 检验原始密码是否符合 并修改密码
|
|
184
|
+
asyncCheck(this, this.$androidUtil.getProxyUrl())
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
</script>
|
|
189
|
+
<style>
|
|
190
|
+
.search_input {
|
|
191
|
+
border: 0;
|
|
192
|
+
outline: none;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.app-row {
|
|
196
|
+
background-color: white;
|
|
197
|
+
padding: 10px 10px 0 10px;
|
|
198
|
+
border-bottom: 1px solid rgba(235, 235, 235, 0.5);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.font {
|
|
202
|
+
font: 15px PingFang-SC-Medium;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.btn-font {
|
|
206
|
+
font: 600 16px PingFang-SC-Bold;
|
|
207
|
+
color: #499EDF;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.btn-color {
|
|
211
|
+
background-color: #FFFFFF;
|
|
212
|
+
border-radius: 10px;
|
|
213
|
+
border: 1px solid #499EDF;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.input-font {
|
|
217
|
+
font: 15px PingFang-SC-Medium;
|
|
218
|
+
color: #333333;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.password-alert {
|
|
222
|
+
margin: 10px 10px 0;
|
|
223
|
+
padding: 10px 12px;
|
|
224
|
+
border-radius: 6px;
|
|
225
|
+
background: #f5f7fa;
|
|
226
|
+
border: 1px solid #e4e7ed;
|
|
227
|
+
color: #606266;
|
|
228
|
+
font-size: 13px;
|
|
229
|
+
line-height: 1.6;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.password-strength {
|
|
233
|
+
margin-top: 8px;
|
|
234
|
+
font-size: 12px;
|
|
235
|
+
line-height: 1.6;
|
|
236
|
+
color: #606266;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.password-strength .strength-label {
|
|
240
|
+
margin-right: 6px;
|
|
241
|
+
color: #909399;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.password-strength .strength-tag {
|
|
245
|
+
display: inline-block;
|
|
246
|
+
margin-right: 8px;
|
|
247
|
+
padding: 1px 8px;
|
|
248
|
+
border-radius: 3px;
|
|
249
|
+
font-size: 12px;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.password-strength .strength-tag.success {
|
|
253
|
+
color: #2e7d32;
|
|
254
|
+
background: #e8f5e9;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.password-strength .strength-tag.error {
|
|
258
|
+
color: #c62828;
|
|
259
|
+
background: #ffebee;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.password-strength .strength-desc {
|
|
263
|
+
color: #606266;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.app-botton {
|
|
267
|
+
position: fixed;
|
|
268
|
+
background: #87b2dd;
|
|
269
|
+
color: #FFF;
|
|
270
|
+
padding: 8px;
|
|
271
|
+
text-align: center;
|
|
272
|
+
font-size: 1.2em;
|
|
273
|
+
z-index: 10;
|
|
274
|
+
opacity: 0.5;
|
|
275
|
+
bottom: 50px;
|
|
276
|
+
margin-top: -10px;
|
|
277
|
+
height: 40px;
|
|
278
|
+
}
|
|
279
|
+
</style>
|