vue2-client 1.4.24 → 1.4.26
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/CHANGELOG.md +6 -1
- package/package.json +1 -1
- package/src/pages/system/ticket/index.vue +3 -3
- package/src/services/api/cas.js +23 -17
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -155,12 +155,12 @@
|
|
|
155
155
|
<strong v-show="showCustomerNameAlert" style="color: red">公司名称不能为空!</strong>
|
|
156
156
|
</a-form-item>
|
|
157
157
|
<!-- 联系人 -->
|
|
158
|
-
<a-form-item
|
|
158
|
+
<a-form-item label="联系人">
|
|
159
159
|
<a-input v-model="form.contact" placeholder="请输入联系人姓名"></a-input>
|
|
160
160
|
<strong v-show="showContactAlert" style="color: red">请填写联系人!</strong>
|
|
161
161
|
</a-form-item>
|
|
162
162
|
<!-- 联系方式 -->
|
|
163
|
-
<a-form-item
|
|
163
|
+
<a-form-item label="联系方式">
|
|
164
164
|
<a-input v-model="form.phone" placeholder="请输入联系方式"></a-input>
|
|
165
165
|
<strong v-show="showPhoneAlert" style="color: red">请填写联系方式!</strong>
|
|
166
166
|
</a-form-item>
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
:queryParamsName="queryParamsName"
|
|
243
243
|
title="已提交工单"
|
|
244
244
|
@action="toDetail">
|
|
245
|
-
<a-button slot="button" type="primary" @click="infoFormVisible = true">填写联系方式</a-button>
|
|
245
|
+
<a-button slot="button" v-if="!currUser.orgName" type="primary" @click="infoFormVisible = true">填写联系方式</a-button>
|
|
246
246
|
</x-form-table>
|
|
247
247
|
</a-tab-pane>
|
|
248
248
|
</a-tabs>
|
package/src/services/api/cas.js
CHANGED
|
@@ -18,15 +18,28 @@ function setTGTCookie (cookie) {
|
|
|
18
18
|
function removeTGTCookie () {
|
|
19
19
|
return Cookie.remove('TGT-Cookie')
|
|
20
20
|
}
|
|
21
|
-
function getTGTCookie () {
|
|
21
|
+
export function getTGTCookie () {
|
|
22
22
|
return Cookie.get('TGT-Cookie')
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export function
|
|
25
|
+
export function CASLoginByAuth (serviceKey) {
|
|
26
26
|
return new Promise((resolve, reject) => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
post(casApi.createSTByUserInfo, {
|
|
28
|
+
serviceKey: serviceKey
|
|
29
|
+
}).then(res => {
|
|
30
|
+
setTGTCookie(res.tgc)
|
|
31
|
+
resolve(res)
|
|
32
|
+
}).catch(msg => {
|
|
33
|
+
reject(msg)
|
|
34
|
+
})
|
|
35
|
+
})
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function CASLogin (serviceKey, ticket) {
|
|
39
|
+
// 从第三方跳转登录
|
|
40
|
+
const tgc = getTGTCookie()
|
|
41
|
+
if (tgc && !ticket) {
|
|
42
|
+
return new Promise((resolve, reject) => {
|
|
30
43
|
post(casApi.createSTByTGC, {
|
|
31
44
|
serviceKey: serviceKey,
|
|
32
45
|
tgc: tgc
|
|
@@ -41,24 +54,17 @@ export function CASLogin (serviceKey) {
|
|
|
41
54
|
})
|
|
42
55
|
logout().then(() => {
|
|
43
56
|
setTimeout(() => {
|
|
44
|
-
window.location.href = '/login'
|
|
57
|
+
window.location.href = '/login?serviceKey=' + serviceKey
|
|
45
58
|
}, 1500)
|
|
46
59
|
})
|
|
47
60
|
} else {
|
|
48
61
|
reject(msg)
|
|
49
62
|
}
|
|
50
63
|
})
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
setTGTCookie(res.tgc)
|
|
56
|
-
resolve(res)
|
|
57
|
-
}).catch(msg => {
|
|
58
|
-
reject(msg)
|
|
59
|
-
})
|
|
60
|
-
}
|
|
61
|
-
})
|
|
64
|
+
})
|
|
65
|
+
} else {
|
|
66
|
+
return CASLoginByAuth(serviceKey)
|
|
67
|
+
}
|
|
62
68
|
}
|
|
63
69
|
|
|
64
70
|
export default casApi
|