system-phone 3.1.59 → 3.1.61
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/assets//345/221/250/346/243/200/346/237/245/347/234/213.png +0 -0
- package/src/assets//351/246/226/346/243/200.png +0 -0
- package/src/filiale/gongyi/LoginApp.vue +706 -706
- package/src/filiale/gongyi/systemphonegrid.js +4 -4
- package/src/filiale/meihekou/LoginAppV4.vue +821 -0
- package/src/filiale/meihekou/systemphonegrid.js +4 -0
|
@@ -0,0 +1,821 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="loginbg" id="outheight">
|
|
3
|
+
<!--输入框-->
|
|
4
|
+
<div class="htmleaf-container">
|
|
5
|
+
<div class="wrapper" :class="{'form-success': login}">
|
|
6
|
+
<div class="container">
|
|
7
|
+
<h3 style="color:white; margin-top: 15px">欢迎使用</h3>
|
|
8
|
+
<p class="form" :style="{'margin-top': margintop + 'px'}">
|
|
9
|
+
<input type="text" v-model="ename" class="usericon"/>
|
|
10
|
+
<input :type="showpass==true?'text':'password'" v-model="password" class="psicon"/>
|
|
11
|
+
<img :src="imageurl"
|
|
12
|
+
style="width: 20px;margin-bottom: 5px;position: absolute;left: 62%;bottom: 43%;"
|
|
13
|
+
alt=""
|
|
14
|
+
@click="changepass()"/>
|
|
15
|
+
<button type="button" id="login-button" @click.prevent="confirm()"><strong>登录</strong></button>
|
|
16
|
+
</p>
|
|
17
|
+
<div class="row">
|
|
18
|
+
<img src="../../assets/选中.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showsave"
|
|
19
|
+
@click="showoff()">
|
|
20
|
+
<img src="../../assets/未选.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="!showsave"
|
|
21
|
+
@click="showon()">
|
|
22
|
+
<span class="text-left font">记住密码</span>
|
|
23
|
+
<img src="../../assets/选中.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showauto == '1'"
|
|
24
|
+
@click="showoff1()">
|
|
25
|
+
<img src="../../assets/未选.png" style="width: 20px;margin-bottom: 5px" alt="" v-if="showauto == '2'"
|
|
26
|
+
@click="showon1()">
|
|
27
|
+
<span class="text-left font">自动登录</span>
|
|
28
|
+
<p></p>
|
|
29
|
+
<span class="versiontext" style="margin-top: 10px" v-if="version">当前版本:{{ version }}</span>
|
|
30
|
+
<span class="devicetext">设备码:{{ deviceIemi }}</span>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<!--<load-appdata @ready="onReady"></load-appdata>-->
|
|
36
|
+
<div style="width: 100%;height: 100%;position: fixed;top: 0px;" v-show="loaderShow">
|
|
37
|
+
<div id="loading" class="loading">登陆中...</div>
|
|
38
|
+
</div>
|
|
39
|
+
<modal :show.sync="modifyPassword" backdrop="false">
|
|
40
|
+
<header slot="modal-header" class="modal-header">
|
|
41
|
+
</header>
|
|
42
|
+
<article slot="modal-body" class="modal-body">
|
|
43
|
+
<modify-pass-word :sourse="login" :weak-password="weakPassword" v-if="modifyPassword"
|
|
44
|
+
v-on:success="success"></modify-pass-word>
|
|
45
|
+
</article>
|
|
46
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
47
|
+
</footer>
|
|
48
|
+
</modal>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script>
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 说明:
|
|
56
|
+
* /rs/vue 请求获取到的配置文件有关配置项目
|
|
57
|
+
* telephone.LoginApp.weakPassword:为true 是判断是否弱密码校验
|
|
58
|
+
*
|
|
59
|
+
* globle 校验参数 Device_IEMI 是否需要校验设备iemi编码
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
import bcrypt from 'bcryptjs';
|
|
63
|
+
import Vue from 'vue'
|
|
64
|
+
import * as Util from '../../Util'
|
|
65
|
+
import JSEncrypt from 'jsencrypt'
|
|
66
|
+
import {HttpResetClass} from 'vue-client'
|
|
67
|
+
import { validateStrongPasswordPhone } from '../../plugins/validateStrongPasswordPhone.js'
|
|
68
|
+
//获取json配置文件
|
|
69
|
+
let asyncReady = async function (self, url) {
|
|
70
|
+
// 获取配置信息
|
|
71
|
+
try {
|
|
72
|
+
console.log('获取营收配置文件和参数【开始】')
|
|
73
|
+
await self.$appdata.load()
|
|
74
|
+
console.log('获取营收配置文件和参数【结束】,开始获取vue配置文件【开始】')
|
|
75
|
+
let that = self
|
|
76
|
+
let vueConfig={}
|
|
77
|
+
let dir_module = []
|
|
78
|
+
const res = await Vue.resetget(`${url}/api/af-safecheck/vue`, {data: {}}, {resolveMsg: null, rejectMsg: null})
|
|
79
|
+
if(res.data.global){
|
|
80
|
+
self.delConfigKey(res.data)
|
|
81
|
+
dir_module = res.data.global.dir_module
|
|
82
|
+
vueConfig.safecheck = res.data
|
|
83
|
+
} else {
|
|
84
|
+
vueConfig = res.data
|
|
85
|
+
}
|
|
86
|
+
for(let mod in dir_module) {
|
|
87
|
+
if (dir_module[mod].name !== 'af-safecheck') {
|
|
88
|
+
let mod_url = `${url}/api/${dir_module[mod].name}/vue`
|
|
89
|
+
if (!dir_module[mod].name.startsWith('af-')) {
|
|
90
|
+
mod_url = `${url}/${dir_module[mod].name}/rs/vue`
|
|
91
|
+
}
|
|
92
|
+
let config = null
|
|
93
|
+
try{
|
|
94
|
+
config = await Vue.resetget(mod_url, {data: {}}, {resolveMsg: null, rejectMsg: null})
|
|
95
|
+
}catch (e) {
|
|
96
|
+
console.log('获取配置报错-先跳过', e)
|
|
97
|
+
}
|
|
98
|
+
// 拿到的配置有问题就跳过
|
|
99
|
+
if(config && config.data instanceof Object){
|
|
100
|
+
self.delConfigKey(config.data)
|
|
101
|
+
vueConfig[dir_module[mod].name] = config.data;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
that.$set('config', vueConfig)
|
|
106
|
+
Vue.config2 = vueConfig
|
|
107
|
+
// 判断是否需要弱密码校验
|
|
108
|
+
if (self.config && self.config.telephone && self.config.telephone.LoginApp && 'undefined' != typeof self.config.telephone.LoginApp.weakPassword) {
|
|
109
|
+
self.weakPassword = self.config.telephone.LoginApp.weakPassword
|
|
110
|
+
Vue.weakPassword = self.config.telephone.LoginApp.weakPassword
|
|
111
|
+
}
|
|
112
|
+
console.log('手机端获取.json文件')
|
|
113
|
+
console.log(JSON.stringify(self.config))
|
|
114
|
+
return true
|
|
115
|
+
} catch (error) {
|
|
116
|
+
console.log(error)
|
|
117
|
+
// 此处业务数据装载异常不做任何处理,理论上不会有任何异常
|
|
118
|
+
self.$showMessage('登录系统: 获取配置文件失败,请检查网络后重新登陆!')
|
|
119
|
+
return false
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
//装载业务数据
|
|
124
|
+
let asyncLoadData = async function (self, url) {
|
|
125
|
+
try {
|
|
126
|
+
// 读取报建本地配置文件
|
|
127
|
+
var result = HostApp.readLocalFile('workflow_apply.json')
|
|
128
|
+
if (result.code == 500) {
|
|
129
|
+
console.log('不存在流程配置文件,即不使用报建app')
|
|
130
|
+
return
|
|
131
|
+
}
|
|
132
|
+
var data = JSON.parse(result.data)
|
|
133
|
+
console.log('读取报建配置文件成功,存入缓存中的data=>' + JSON.stringify(data))
|
|
134
|
+
Vue.workflow_vue = Vue.prototype.$workflow_vue = data
|
|
135
|
+
} catch (error) {
|
|
136
|
+
// 此处业务数据装载异常不做任何处理,理论上不会有任何异常,只有当app版本端版本较低无readlocalfile时会异常
|
|
137
|
+
console.log(error)
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export default {
|
|
142
|
+
title: '登录系统',
|
|
143
|
+
data () {
|
|
144
|
+
return {
|
|
145
|
+
loaderShow: false,
|
|
146
|
+
weakPassword: false,
|
|
147
|
+
modifyPassword: false,
|
|
148
|
+
ename: '',
|
|
149
|
+
login: 'login',
|
|
150
|
+
password: '',
|
|
151
|
+
showsave: true,
|
|
152
|
+
showauto: '2', // 1 自动登陆 2取消自动登陆
|
|
153
|
+
showpass: false,
|
|
154
|
+
imageurl: require('../../assets/miwen.png'),
|
|
155
|
+
deviceIemi: '无法获取该设备码,请联系管理员',
|
|
156
|
+
version: '',
|
|
157
|
+
loginSafe: false,
|
|
158
|
+
margintop: document.documentElement.clientHeight * 0.1,
|
|
159
|
+
config: null
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
|
|
163
|
+
ready () {
|
|
164
|
+
this.version = Vue.app_version || ''
|
|
165
|
+
if (Vue.android) {
|
|
166
|
+
// 获取系统配置文件
|
|
167
|
+
new HttpResetClass().load('post',`${this.$androidUtil.getProxyUrl()}/api/af-system/logic/openapi/getLiuliConfiguration`, {
|
|
168
|
+
configName: 'webConfig'
|
|
169
|
+
}, {resolveMsg: null, rejectMsg: null}).then(res=>{
|
|
170
|
+
this.config = res.data
|
|
171
|
+
})
|
|
172
|
+
const userCache = this.$androidUtil.getPreference('login_user_cache')
|
|
173
|
+
this.showauto = this.$androidUtil.getPreference('auto_login')
|
|
174
|
+
this.showauto = this.showauto ? this.showauto : '2'
|
|
175
|
+
console.log(`自动登陆标识ready:${this.showauto}`)
|
|
176
|
+
if (userCache) {
|
|
177
|
+
const userCacheJSON = JSON.parse(userCache.replace(/\'/g, '\"'))
|
|
178
|
+
this.password = userCacheJSON.password
|
|
179
|
+
this.ename = userCacheJSON.username
|
|
180
|
+
}
|
|
181
|
+
this.deviceIemi = this.$androidUtil.getDeviceIEMI()
|
|
182
|
+
console.log(`手机设备码:${this.deviceIemi}`)
|
|
183
|
+
if (this.showauto == '1' && this.password) {
|
|
184
|
+
this.confirm()
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
methods: {
|
|
189
|
+
success (val) {
|
|
190
|
+
// 修改密码成功
|
|
191
|
+
this.modifyPassword = false
|
|
192
|
+
this.password = val
|
|
193
|
+
},
|
|
194
|
+
// 对资源菜单进行排序
|
|
195
|
+
sortFunctions (val) {
|
|
196
|
+
this.sortArr(val)
|
|
197
|
+
val.forEach((item)=>{
|
|
198
|
+
if(item.children && Array.isArray(item.children)){
|
|
199
|
+
this.sortArr(item.children)
|
|
200
|
+
}
|
|
201
|
+
})
|
|
202
|
+
return val
|
|
203
|
+
},
|
|
204
|
+
sortArr(val){
|
|
205
|
+
val.sort((itemA, itemB)=>{
|
|
206
|
+
if(itemA.position !== itemB.position){
|
|
207
|
+
return itemA.position - itemB.position
|
|
208
|
+
}else{
|
|
209
|
+
return itemA.id - itemB.id
|
|
210
|
+
}
|
|
211
|
+
})
|
|
212
|
+
},
|
|
213
|
+
// 记住密码选中/未选中
|
|
214
|
+
showoff () {
|
|
215
|
+
this.showsave = false
|
|
216
|
+
},
|
|
217
|
+
showon () {
|
|
218
|
+
this.showsave = true
|
|
219
|
+
},
|
|
220
|
+
showoff1 () {
|
|
221
|
+
this.showauto = '2'
|
|
222
|
+
},
|
|
223
|
+
showon1 () {
|
|
224
|
+
this.showauto = '1'
|
|
225
|
+
},
|
|
226
|
+
changepass () {
|
|
227
|
+
this.showpass = this.showpass ? false : true
|
|
228
|
+
if (this.showpass) {
|
|
229
|
+
this.imageurl = require('../../assets/mingwen.png')
|
|
230
|
+
} else {
|
|
231
|
+
this.imageurl = require('../../assets/miwen.png')
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
async confirm () {
|
|
235
|
+
this.loaderShow = true
|
|
236
|
+
console.log('Vue.android:' + Vue.android)
|
|
237
|
+
Vue.dataUrl = this.$androidUtil.getProxyUrl() + '/'
|
|
238
|
+
let loginData = {}
|
|
239
|
+
try {
|
|
240
|
+
let ret = {}
|
|
241
|
+
let loginData = {
|
|
242
|
+
username: this.ename,
|
|
243
|
+
password: this.password,
|
|
244
|
+
resourceName: '手机服务'
|
|
245
|
+
}
|
|
246
|
+
if (Vue.passwordEncryption){
|
|
247
|
+
loginData.password = bcrypt.hashSync(this.password, 10)
|
|
248
|
+
}
|
|
249
|
+
try {
|
|
250
|
+
ret = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-auth/login`, loginData, {
|
|
251
|
+
resolveMsg: null,
|
|
252
|
+
rejectMsg: null,
|
|
253
|
+
headerConfig: {'Content-type': 'application/json'}
|
|
254
|
+
})
|
|
255
|
+
console.log(ret, '==')
|
|
256
|
+
if (ret.data) {
|
|
257
|
+
if (ret.data.resources.data && ret.data.resources.data.id) {
|
|
258
|
+
loginData = ret.data.resources.data
|
|
259
|
+
} else {
|
|
260
|
+
loginData = ret.data.resources
|
|
261
|
+
}
|
|
262
|
+
this.$androidUtil.setPreference('siteId', loginData.f_extend1 || '')
|
|
263
|
+
this.$androidUtil.setPreference('flatId', loginData.f_extend2 || '')
|
|
264
|
+
this.$androidUtil.setPreference('name', loginData.name || '')
|
|
265
|
+
this.$androidUtil.setPreference('ename', loginData.ename || '')
|
|
266
|
+
} else {
|
|
267
|
+
throw {status: ret.data.code, message: ret.data.msg}
|
|
268
|
+
}
|
|
269
|
+
} catch (e) {
|
|
270
|
+
if (Vue.android) {
|
|
271
|
+
this.loaderShow = false
|
|
272
|
+
this.$showMessage(e.message ? e.message : '登录失败!用户名或密码错误!')
|
|
273
|
+
}
|
|
274
|
+
return
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
// 设置登录人
|
|
278
|
+
Vue.user = Util.f = loginData
|
|
279
|
+
|
|
280
|
+
// 对资源菜单进行排序
|
|
281
|
+
try{
|
|
282
|
+
let viewDetails = await Vue.resetpost(`${this.$androidUtil.getProxyUrl()}/rs/search`, {
|
|
283
|
+
source: 'this.getRights().where(row.getType()==$function$ && row.getPath($name$).indexOf($功能权限$) != -1)',
|
|
284
|
+
userid: Vue.user.id
|
|
285
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
286
|
+
const rithtList = viewDetails.data
|
|
287
|
+
Vue.user.r = []
|
|
288
|
+
rithtList.forEach(x => Vue.user.r.push(x.name))
|
|
289
|
+
}catch (e) {
|
|
290
|
+
console.log('资源排序失败!暂时先不影响登录')
|
|
291
|
+
}
|
|
292
|
+
// 功能排序
|
|
293
|
+
Vue.functions = this.sortFunctions(loginData.functions)
|
|
294
|
+
let userStr
|
|
295
|
+
if (Vue.android) {
|
|
296
|
+
console.log(`Device_IEMI:${this.$androidUtil.getPreference('Device_IEMI')}`)
|
|
297
|
+
// 判断是否需要验证 设备码
|
|
298
|
+
if (this.$androidUtil.getPreference('Device_IEMI')) {
|
|
299
|
+
console.log(`手机设备码:${this.deviceIemi}`)
|
|
300
|
+
let result = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/sql/tel_singleTable_OrderBy`, {
|
|
301
|
+
data: {
|
|
302
|
+
items: '*',
|
|
303
|
+
tablename: 't_equipment',
|
|
304
|
+
orderitem: 'id desc',
|
|
305
|
+
condition: `f_terminal_number = '${this.deviceIemi}' and f_state = '正常'`
|
|
306
|
+
}
|
|
307
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
308
|
+
console.log(`检测设备码存在是否:${result.data.length}`)
|
|
309
|
+
if (result.data.length == 0) {
|
|
310
|
+
HostApp.alert('设备码未绑定,请联系管理员!')
|
|
311
|
+
return
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (this.showsave) {
|
|
315
|
+
userStr = `{'username':'${this.ename}','password':'${this.password}'}`
|
|
316
|
+
} else {
|
|
317
|
+
userStr = `{'username':'${this.ename}','password':''}`
|
|
318
|
+
}
|
|
319
|
+
await new HttpResetClass().load('post',`${this.$androidUtil.getProxyUrl()}/api/af-system/logic/openapi/getLiuliConfiguration`, {
|
|
320
|
+
configName: 'webConfig'
|
|
321
|
+
}, {resolveMsg: null, rejectMsg: null}).then(res=>{
|
|
322
|
+
this.config = res.data
|
|
323
|
+
})
|
|
324
|
+
console.log(this.showauto)
|
|
325
|
+
this.$androidUtil.setPreference('login_user_cache', userStr)
|
|
326
|
+
this.$androidUtil.setPreference('f_repairman_id', Util.f.id)
|
|
327
|
+
this.$androidUtil.setPreference('f_repairman_name', Util.f.name)
|
|
328
|
+
this.$androidUtil.setPreference('f_orgid', Util.f.orgid)
|
|
329
|
+
this.$androidUtil.setPreference('f_role_name', Util.f.f_role_name || '')
|
|
330
|
+
this.$androidUtil.setPreference('access_token', ret.data.access_token)
|
|
331
|
+
if(this.config && this.config.setting.requestEncrypt){
|
|
332
|
+
this.$androidUtil.setPreference('v4-session-key', this.RSADecrypt(ret.data.session))
|
|
333
|
+
}else{
|
|
334
|
+
this.$androidUtil.setPreference('v4-session-key', "")
|
|
335
|
+
}
|
|
336
|
+
console.log('自动登陆标识' + Util.f.f_role_name)
|
|
337
|
+
console.log(this.showauto)
|
|
338
|
+
this.$androidUtil.setPreference('auto_login', this.showauto)
|
|
339
|
+
}
|
|
340
|
+
Vue.$login = Vue.prototype.$login = {
|
|
341
|
+
jwt: loginData.id,
|
|
342
|
+
jwtNew: ret.data.access_token,
|
|
343
|
+
"v4-session-key": this.config && this.config.setting.requestEncrypt ? this.RSADecrypt(ret.data.session): null,
|
|
344
|
+
toStandardDateString () {
|
|
345
|
+
let dt = new Date()
|
|
346
|
+
let month = dt.getMonth() + 1
|
|
347
|
+
let date = dt.getDate()
|
|
348
|
+
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
|
349
|
+
}, toStandardTimeString () {
|
|
350
|
+
let dt = new Date()
|
|
351
|
+
let month = dt.getMonth() + 1
|
|
352
|
+
let date = dt.getDate()
|
|
353
|
+
let hour = dt.getHours()
|
|
354
|
+
let min = dt.getMinutes()
|
|
355
|
+
let sec = dt.getSeconds()
|
|
356
|
+
return dt.getFullYear() + '-' + (month < 10 ? '0' + month : month) + '-' + (date < 10 ? '0' + date : date)
|
|
357
|
+
+ ' ' + (hour < 10 ? '0' + hour : hour) + ':' + (min < 10 ? '0' + min : min) + ':' + (sec < 10 ? '0' + sec : sec)
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
// 获取参数
|
|
361
|
+
console.log('获取参数system以及安检参数')
|
|
362
|
+
const flag = await asyncReady(this, this.$androidUtil.getProxyUrl())
|
|
363
|
+
if (!flag) {
|
|
364
|
+
this.loaderShow = false
|
|
365
|
+
console.log('获取参数异常')
|
|
366
|
+
return
|
|
367
|
+
}
|
|
368
|
+
console.log('获取参数结束')
|
|
369
|
+
this.loaderShow = false
|
|
370
|
+
// 弱口令验证
|
|
371
|
+
if (this.weakPassword) {
|
|
372
|
+
const pwdResult = validateStrongPasswordPhone(this.password)
|
|
373
|
+
if (!pwdResult.isValid) {
|
|
374
|
+
await this.$showMessage('登录系统: 此账户的密码过于简单,' + (pwdResult.errors[0] || '请修改密码后重新登陆!!!'), ['confirm'])
|
|
375
|
+
this.modifyPassword = true
|
|
376
|
+
return
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
try {
|
|
381
|
+
let res = await new HttpResetClass().http('POST',`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/getSecurityCheckTypeByType`, {
|
|
382
|
+
f_safecheck_type: '年度普检',
|
|
383
|
+
f_user_type: '民用'
|
|
384
|
+
})
|
|
385
|
+
if (typeof res === 'object') {
|
|
386
|
+
Vue.newConfig = res
|
|
387
|
+
} else {
|
|
388
|
+
Vue.newConfig = JSON.parse(res)
|
|
389
|
+
}
|
|
390
|
+
console.log(Vue.newConfig)
|
|
391
|
+
} catch (e) {
|
|
392
|
+
console.log('登录获取配置失败,不影响登录')
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
this.$goto('nav-bottom')
|
|
396
|
+
} catch (e) {
|
|
397
|
+
if (Vue.android) {
|
|
398
|
+
this.loaderShow = false
|
|
399
|
+
}
|
|
400
|
+
console.error('登录异常,LoginApp的confirm函数错误', e)
|
|
401
|
+
this.$showMessage('登陆失败!,')
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
RSADecrypt(encryptedData) {
|
|
405
|
+
try {
|
|
406
|
+
const pk = this.$androidUtil.getPreference('v4PrivateKey')
|
|
407
|
+
const decryptor = new JSEncrypt();
|
|
408
|
+
decryptor.setPrivateKey(pk);
|
|
409
|
+
const decrypted = decryptor.decrypt(encryptedData);
|
|
410
|
+
|
|
411
|
+
if (!decrypted) {
|
|
412
|
+
throw new Error('解密失败:空结果');
|
|
413
|
+
}
|
|
414
|
+
return decrypted;
|
|
415
|
+
} catch (error) {
|
|
416
|
+
console.error('RSA解密错误:', error);
|
|
417
|
+
throw new Error('RSA解密失败,请检查私钥格式');
|
|
418
|
+
}
|
|
419
|
+
},
|
|
420
|
+
|
|
421
|
+
delConfigKey(obj){
|
|
422
|
+
// 从琉璃中获取的配置中会包含 $开头的一些额外描述新的key。为了兼容v3的代码逻辑在此函数中去掉
|
|
423
|
+
Object.keys(obj).forEach(key =>{
|
|
424
|
+
Object.keys(obj[key]).forEach(col => {
|
|
425
|
+
// 检查键是否以$开头
|
|
426
|
+
if (col.startsWith('$')) {
|
|
427
|
+
// 使用delete操作符删除键
|
|
428
|
+
delete obj[key][col];
|
|
429
|
+
}
|
|
430
|
+
})
|
|
431
|
+
})
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
watch: {
|
|
435
|
+
'config' (val) {
|
|
436
|
+
Vue.config = val
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
</script>
|
|
441
|
+
<style scoped="">
|
|
442
|
+
.versiontext, .devicetext {
|
|
443
|
+
font: 13px PingFang-SC-Medium;
|
|
444
|
+
position: fixed;
|
|
445
|
+
width: 100%;
|
|
446
|
+
left: 50%;
|
|
447
|
+
transform: translateX(-50%);
|
|
448
|
+
text-align: center;
|
|
449
|
+
}
|
|
450
|
+
.versiontext {
|
|
451
|
+
bottom: 33px;
|
|
452
|
+
}
|
|
453
|
+
.devicetext {
|
|
454
|
+
bottom: 13px;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
/*输入框样式*/
|
|
458
|
+
/*@import url(http://fonts.useso.com/css?family=Source+Sans+Pro:200,300);*/
|
|
459
|
+
* {
|
|
460
|
+
box-sizing: border-box;
|
|
461
|
+
margin: 0;
|
|
462
|
+
padding: 0;
|
|
463
|
+
font-weight: 300;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.loginbg {
|
|
467
|
+
font-family: 'Source Sans Pro', sans-serif;
|
|
468
|
+
color: white;
|
|
469
|
+
font-weight: 300;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.loginbg ::-webkit-input-placeholder {
|
|
473
|
+
/* WebKit browsers */
|
|
474
|
+
font-family: 'Source Sans Pro', sans-serif;
|
|
475
|
+
color: white;
|
|
476
|
+
font-weight: 300;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.loginbg :-moz-placeholder {
|
|
480
|
+
/* Mozilla Firefox 4 to 18 */
|
|
481
|
+
font-family: 'Source Sans Pro', sans-serif;
|
|
482
|
+
color: white;
|
|
483
|
+
opacity: 1;
|
|
484
|
+
font-weight: 300;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.loginbg ::-moz-placeholder {
|
|
488
|
+
/* Mozilla Firefox 19+ */
|
|
489
|
+
font-family: 'Source Sans Pro', sans-serif;
|
|
490
|
+
color: white;
|
|
491
|
+
opacity: 1;
|
|
492
|
+
font-weight: 300;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.loginbg :-ms-input-placeholder {
|
|
496
|
+
/* Internet Explorer 10+ */
|
|
497
|
+
font-family: 'Source Sans Pro', sans-serif;
|
|
498
|
+
color: white;
|
|
499
|
+
font-weight: 300;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.wrapper {
|
|
503
|
+
/*background: #2D83BA;
|
|
504
|
+
background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
|
|
505
|
+
background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);
|
|
506
|
+
opacity: 0.8;*/
|
|
507
|
+
/*position: absolute;*/
|
|
508
|
+
/*top: 50%;
|
|
509
|
+
right: 10%;
|
|
510
|
+
width: 40%;
|
|
511
|
+
height: 350px;
|
|
512
|
+
margin-top: -150px;*/
|
|
513
|
+
overflow: hidden;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.wrapper.form-success .container h3 {
|
|
517
|
+
-webkit-transform: translateY(85px);
|
|
518
|
+
-ms-transform: translateY(85px);
|
|
519
|
+
transform: translateY(85px);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.container {
|
|
523
|
+
/*max-width: 350px;*/
|
|
524
|
+
margin: 0 auto;
|
|
525
|
+
/*padding: 30px 100px 50px 100px;
|
|
526
|
+
height: 350px;*/
|
|
527
|
+
text-align: center;
|
|
528
|
+
/*以下增加*/
|
|
529
|
+
/*background: #2D83BA;
|
|
530
|
+
background: -webkit-linear-gradient(top left, #2D83BA 0%, #2D83BA 100%);
|
|
531
|
+
background: linear-gradient(to bottom right, #2D83BA 0%, #2D83BA 100%);*/
|
|
532
|
+
opacity: 0.8;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.container h3 {
|
|
536
|
+
font-size: 40px;
|
|
537
|
+
-webkit-transition-duration: 1s;
|
|
538
|
+
transition-duration: 1s;
|
|
539
|
+
-webkit-transition-timing-function: ease-in-out;
|
|
540
|
+
transition-timing-function: ease-in-out;
|
|
541
|
+
font-weight: 200;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.form {
|
|
545
|
+
padding: 20px 0;
|
|
546
|
+
/*margin-top: 15%;*/
|
|
547
|
+
position: relative;
|
|
548
|
+
z-index: 2;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
.form input {
|
|
552
|
+
-webkit-appearance: none;
|
|
553
|
+
-moz-appearance: none;
|
|
554
|
+
appearance: none;
|
|
555
|
+
outline: 0;
|
|
556
|
+
border: 1px solid #50ABE6;
|
|
557
|
+
background-color: #50ABE6;
|
|
558
|
+
width: 250px;
|
|
559
|
+
border-radius: 3px;
|
|
560
|
+
padding: 10px 15px;
|
|
561
|
+
margin: 0 auto 10px auto;
|
|
562
|
+
display: block;
|
|
563
|
+
text-align: center;
|
|
564
|
+
font-size: 18px;
|
|
565
|
+
color: white;
|
|
566
|
+
-webkit-transition-duration: 0.25s;
|
|
567
|
+
transition-duration: 0.25s;
|
|
568
|
+
font-weight: 300;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.form input:hover {
|
|
572
|
+
background-color: rgba(255, 255, 255, 0.4);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
.form input:focus {
|
|
576
|
+
background-color: white;
|
|
577
|
+
width: 300px;
|
|
578
|
+
color: #53e3a6;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.usericon {
|
|
582
|
+
background-image: url(../../assets/usericon.png);
|
|
583
|
+
background-repeat: no-repeat;
|
|
584
|
+
background-size: 30px;
|
|
585
|
+
background-position-x: 8px;
|
|
586
|
+
background-position-y: 8px;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.psicon {
|
|
590
|
+
background-image: url(../../assets/psicon.png);
|
|
591
|
+
background-repeat: no-repeat;
|
|
592
|
+
background-size: 30px;
|
|
593
|
+
background-position-x: 8px;
|
|
594
|
+
background-position-y: 8px;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
.form button {
|
|
598
|
+
-webkit-appearance: none;
|
|
599
|
+
-moz-appearance: none;
|
|
600
|
+
appearance: none;
|
|
601
|
+
outline: 0;
|
|
602
|
+
background-color: white;
|
|
603
|
+
border: 0;
|
|
604
|
+
padding: 10px 15px;
|
|
605
|
+
color: #253830;
|
|
606
|
+
border-radius: 3px;
|
|
607
|
+
width: 250px;
|
|
608
|
+
cursor: pointer;
|
|
609
|
+
font-size: 18px;
|
|
610
|
+
-webkit-transition-duration: 0.25s;
|
|
611
|
+
transition-duration: 0.25s;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
.form button:hover {
|
|
615
|
+
background-color: #f5f7f9;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/*注册字体样式*/
|
|
619
|
+
.form span {
|
|
620
|
+
color: #fff;
|
|
621
|
+
display: table-footer-group;
|
|
622
|
+
position: absolute;
|
|
623
|
+
right: 10px;
|
|
624
|
+
margin-top: 10px;
|
|
625
|
+
cursor: pointer;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.logotitle {
|
|
629
|
+
color: #fff;
|
|
630
|
+
position: absolute;
|
|
631
|
+
top: 50px;
|
|
632
|
+
left: 50px;
|
|
633
|
+
font-size: 50px;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
/*注册模态框界面样式*/
|
|
637
|
+
.modifystyle {
|
|
638
|
+
background: #FCFEEE;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
.modifystyle div {
|
|
642
|
+
height: auto;
|
|
643
|
+
margin-bottom: 15px;
|
|
644
|
+
/*text-align: center;*/
|
|
645
|
+
/*margin-left: 20%;*/
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
/*bootstrap字体图标要手动调整,所以使用字体图标的span必须紧跟在input后面,负责会错位*/
|
|
649
|
+
.modifystyle div input + span {
|
|
650
|
+
top: 0 !important;
|
|
651
|
+
right: 32%;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.modifystyle span {
|
|
655
|
+
color: red;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/* 通告区内容 */
|
|
659
|
+
.notice-board {
|
|
660
|
+
height: auto;
|
|
661
|
+
position: absolute;
|
|
662
|
+
top: 50%;
|
|
663
|
+
margin-top: -150px;
|
|
664
|
+
margin-left: 100px;
|
|
665
|
+
color: #fff;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/*修改密码底部按钮部分样式*/
|
|
669
|
+
.footerbtn {
|
|
670
|
+
text-align: center;
|
|
671
|
+
padding: 15px;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.footerbtn button {
|
|
675
|
+
width: 100px;
|
|
676
|
+
margin-left: 20px;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.bg-bubbles {
|
|
680
|
+
position: absolute;
|
|
681
|
+
top: 0;
|
|
682
|
+
left: 0;
|
|
683
|
+
width: 100%;
|
|
684
|
+
height: 100%;
|
|
685
|
+
z-index: 1;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.bg-bubbles li {
|
|
689
|
+
position: absolute;
|
|
690
|
+
list-style: none;
|
|
691
|
+
display: block;
|
|
692
|
+
width: 40px;
|
|
693
|
+
height: 40px;
|
|
694
|
+
background-color: rgba(255, 255, 255, 0.15);
|
|
695
|
+
bottom: -160px;
|
|
696
|
+
-webkit-animation: square 25s infinite;
|
|
697
|
+
animation: square 25s infinite;
|
|
698
|
+
-webkit-transition-timing-function: linear;
|
|
699
|
+
transition-timing-function: linear;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.bg-bubbles li:nth-child(1) {
|
|
703
|
+
left: 10%;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.bg-bubbles li:nth-child(2) {
|
|
707
|
+
left: 20%;
|
|
708
|
+
width: 80px;
|
|
709
|
+
height: 80px;
|
|
710
|
+
-webkit-animation-delay: 2s;
|
|
711
|
+
animation-delay: 2s;
|
|
712
|
+
-webkit-animation-duration: 17s;
|
|
713
|
+
animation-duration: 17s;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
.bg-bubbles li:nth-child(3) {
|
|
717
|
+
left: 25%;
|
|
718
|
+
-webkit-animation-delay: 4s;
|
|
719
|
+
animation-delay: 4s;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
.bg-bubbles li:nth-child(4) {
|
|
723
|
+
left: 40%;
|
|
724
|
+
width: 60px;
|
|
725
|
+
height: 60px;
|
|
726
|
+
-webkit-animation-duration: 22s;
|
|
727
|
+
animation-duration: 22s;
|
|
728
|
+
background-color: rgba(255, 255, 255, 0.25);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
.bg-bubbles li:nth-child(5) {
|
|
732
|
+
left: 70%;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
.bg-bubbles li:nth-child(6) {
|
|
736
|
+
left: 80%;
|
|
737
|
+
width: 120px;
|
|
738
|
+
height: 120px;
|
|
739
|
+
-webkit-animation-delay: 3s;
|
|
740
|
+
animation-delay: 3s;
|
|
741
|
+
background-color: rgba(255, 255, 255, 0.2);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
.bg-bubbles li:nth-child(7) {
|
|
745
|
+
left: 32%;
|
|
746
|
+
width: 160px;
|
|
747
|
+
height: 160px;
|
|
748
|
+
-webkit-animation-delay: 7s;
|
|
749
|
+
animation-delay: 7s;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.bg-bubbles li:nth-child(8) {
|
|
753
|
+
left: 55%;
|
|
754
|
+
width: 20px;
|
|
755
|
+
height: 20px;
|
|
756
|
+
-webkit-animation-delay: 15s;
|
|
757
|
+
animation-delay: 15s;
|
|
758
|
+
-webkit-animation-duration: 40s;
|
|
759
|
+
animation-duration: 40s;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
.bg-bubbles li:nth-child(9) {
|
|
763
|
+
left: 25%;
|
|
764
|
+
width: 10px;
|
|
765
|
+
height: 10px;
|
|
766
|
+
-webkit-animation-delay: 2s;
|
|
767
|
+
animation-delay: 2s;
|
|
768
|
+
-webkit-animation-duration: 40s;
|
|
769
|
+
animation-duration: 40s;
|
|
770
|
+
background-color: rgba(255, 255, 255, 0.3);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
.bg-bubbles li:nth-child(10) {
|
|
774
|
+
left: 90%;
|
|
775
|
+
width: 160px;
|
|
776
|
+
height: 160px;
|
|
777
|
+
-webkit-animation-delay: 11s;
|
|
778
|
+
animation-delay: 11s;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
@-webkit-keyframes square {
|
|
782
|
+
0% {
|
|
783
|
+
-webkit-transform: translateY(0);
|
|
784
|
+
transform: translateY(0);
|
|
785
|
+
}
|
|
786
|
+
100% {
|
|
787
|
+
-webkit-transform: translateY(-700px) rotate(600deg);
|
|
788
|
+
transform: translateY(-700px) rotate(600deg);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
@keyframes square {
|
|
793
|
+
0% {
|
|
794
|
+
-webkit-transform: translateY(0);
|
|
795
|
+
transform: translateY(0);
|
|
796
|
+
}
|
|
797
|
+
100% {
|
|
798
|
+
-webkit-transform: translateY(-700px) rotate(600deg);
|
|
799
|
+
transform: translateY(-700px) rotate(600deg);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
.loading {
|
|
804
|
+
width: 36%;
|
|
805
|
+
height: 7%;
|
|
806
|
+
position: absolute;
|
|
807
|
+
top: 30%;
|
|
808
|
+
left: 32%;
|
|
809
|
+
line-height: 56px;
|
|
810
|
+
color: #fff;
|
|
811
|
+
padding-left: 60px;
|
|
812
|
+
font-size: 15px;
|
|
813
|
+
background: #000 url(../../assets/loging.gif) no-repeat 10px 50%;
|
|
814
|
+
opacity: 0.7;
|
|
815
|
+
z-index: 9999;
|
|
816
|
+
-moz-border-radius: 20px;
|
|
817
|
+
-webkit-border-radius: 20px;
|
|
818
|
+
border-radius: 20px;
|
|
819
|
+
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
|
|
820
|
+
}
|
|
821
|
+
</style>
|