|
@@ -1,5 +1,5 @@
|
1
|
1
|
<template>
|
2
|
|
- <div class="fle bgColor" v-if="!isSSo && false">
|
|
2
|
+ <div class="fle bgColor" v-if="!isSSo">
|
3
|
3
|
<load-ing v-show="requesterLgoinType == 'wechat'"></load-ing>
|
4
|
4
|
<h2
|
5
|
5
|
v-if="requesterLgoinType == 'web'"
|
|
@@ -216,10 +216,20 @@ export default {
|
216
|
216
|
zlogin() {
|
217
|
217
|
console.log(this);
|
218
|
218
|
var that = this;
|
|
219
|
+ var ssoStr = "";
|
|
220
|
+ var ssoJson;
|
|
221
|
+ if (this.isSSo) {
|
|
222
|
+ ssoStr = location.search
|
|
223
|
+ .replace("?", "")
|
|
224
|
+ .split("&")[0]
|
|
225
|
+ .split("=")[1];
|
|
226
|
+ ssoStr = decode(decodeURIComponent(ssoStr));
|
|
227
|
+ ssoJson = JSON.parse(ssoStr);
|
|
228
|
+ }
|
219
|
229
|
var postData = this.isSSo
|
220
|
|
- ? { type: 'req' }
|
|
230
|
+ ? { password: ssoJson.r, t: false }
|
221
|
231
|
: { username: this.zhanghao, password: this.mima };
|
222
|
|
- this.$http.post("service/auth/sslLogin", postData).then(res => {
|
|
232
|
+ this.$http.post("service/auth/reqlogin", postData).then(res => {
|
223
|
233
|
that.loading = false;
|
224
|
234
|
if (res.data && res.data.state == 200) {
|
225
|
235
|
localStorage.clear();
|
|
@@ -238,14 +248,6 @@ export default {
|
238
|
248
|
} else {
|
239
|
249
|
this.loginNext(res.data.data.requester);
|
240
|
250
|
}
|
241
|
|
- }else if (res.data && res.data.state == 501) {
|
242
|
|
- // 判断是否有区域地点或联系电话或校区,没有则需要补充
|
243
|
|
- var requester = JSON.parse(localStorage.getItem('loginUser')) || {};
|
244
|
|
- if (!requester.place || !requester.mphone || !requester.branch) {
|
245
|
|
- this.$router.push({ path: "/supplementary" });
|
246
|
|
- } else {
|
247
|
|
- this.loginNext(requester);
|
248
|
|
- }
|
249
|
251
|
} else {
|
250
|
252
|
localStorage.clear();
|
251
|
253
|
that
|
|
@@ -271,7 +273,12 @@ export default {
|
271
|
273
|
}
|
272
|
274
|
},
|
273
|
275
|
created() {
|
274
|
|
- this.isSSo = true;
|
|
276
|
+ localStorage.clear();
|
|
277
|
+ if (location.search.length > 0) {
|
|
278
|
+ this.isSSo = Boolean(this.getQueryString("t"));
|
|
279
|
+ } else {
|
|
280
|
+ this.isSSo = false;
|
|
281
|
+ }
|
275
|
282
|
if (this.isSSo) {
|
276
|
283
|
this.zlogin();
|
277
|
284
|
}
|