vue2-client 1.8.26 → 1.8.28

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.
@@ -57,6 +57,10 @@
57
57
  <a-col :span="3"><span class="title">附件</span></a-col>
58
58
  <a-col :span="21"><file-item :files="details.files" :downloadable="false" @preview="handleFilePreview" /></a-col>
59
59
  </a-row>
60
+ <a-row v-if="details.resultrecord" class="item">
61
+ <a-col :span="3"><span class="title">处理结果</span></a-col>
62
+ <a-col :span="17"><span>{{ details.resultrecord }}</span></a-col>
63
+ </a-row>
60
64
  </div>
61
65
  <a-modal v-model="filePreviewVisible" :footer="null" :dialog-style="{ top: '30px' }" width="80%" :z-index="1001">
62
66
  <file-preview :path="filePath" />
@@ -90,7 +94,7 @@ export default {
90
94
  return {
91
95
  title: '提交成功',
92
96
  description: '您创建的工单已成功提交,请保持电话畅通,我们的工作人员将尽快与您取得联系。', // +
93
- // '如果需要加急,请在倒计时结束后点击加急按钮,加急后我们将优先处理您的工单',
97
+ // '如果需要加急,请在倒计时结束后点击加急按钮,加急后我们将优先处理您的工单',
94
98
  // 工单详情
95
99
  details: {
96
100
  uploader: '',
@@ -101,6 +105,7 @@ export default {
101
105
  confirmTime: '',
102
106
  finishedTime: '',
103
107
  description: '',
108
+ resultrecord: '',
104
109
  files: [],
105
110
  images: []
106
111
  },
@@ -203,6 +208,7 @@ export default {
203
208
  this.details.description = res.description
204
209
  this.details.files = res.files
205
210
  this.details.images = res.images
211
+ this.details.resultrecord = res.resultrecord
206
212
  }, err => {
207
213
  console.log(err)
208
214
  })
@@ -8,6 +8,8 @@ import {
8
8
  checkSingleAuthorization,
9
9
  } from '@vue2-client/utils/login'
10
10
  import AES from '@vue2-client/utils/EncryptUtil'
11
+ import Vue from 'vue'
12
+ import { funcToRouter, loadRoutes } from '@vue2-client/utils/routerUtil'
11
13
 
12
14
  NProgress.configure({ showSpinner: false })
13
15
 
@@ -33,8 +35,11 @@ const progressStart = (to, from, next) => {
33
35
  * @param options
34
36
  */
35
37
  const loginGuard = (to, from, next, options) => {
38
+ console.log('loginGuard', to, from, next, options)
39
+
36
40
  const urlParams = new URLSearchParams(window.location.search)
37
41
  const token = urlParams.get('token')
42
+ const V4_LOGIN_DATA_KEY = localStorage.getItem('v4LoginData')
38
43
  if (token) {
39
44
  const { AESDecrypt } = AES
40
45
  const info = AESDecrypt(token, '3KMKqvgwR8ULbR8Z')
@@ -63,6 +68,29 @@ const loginGuard = (to, from, next, options) => {
63
68
  next()
64
69
  }
65
70
  }
71
+ } else if (V4_LOGIN_DATA_KEY) {
72
+ const v4LoginData = JSON.parse(localStorage.getItem('userInfo'))
73
+ const curUser = {
74
+ name: v4LoginData.name,
75
+ username: v4LoginData.name,
76
+ orgid: v4LoginData.name,
77
+ avatar: '',
78
+ ename: v4LoginData.ename,
79
+ id: v4LoginData.id,
80
+ orgName: v4LoginData.orgs,
81
+ contact: '',
82
+ phone: '',
83
+ orgs: v4LoginData.orgs
84
+ }
85
+ Vue.$store.commit('account/setUser', Object.assign(curUser, v4LoginData))
86
+ const login = {
87
+ f: v4LoginData,
88
+ jwt: v4LoginData.id,
89
+ r: v4LoginData.r
90
+ }
91
+ Vue.$store.commit('account/setLogin', login)
92
+ // loadRoutes(funcToRouter(v4LoginData.functions))
93
+ next()
66
94
  } else {
67
95
  const { store, message } = options
68
96
  if (
@@ -1,24 +1,24 @@
1
- import { METHOD, request } from '@vue2-client/utils/request'
2
-
3
- /**
4
- * GET请求
5
- * @param url 请求地址
6
- * @param parameter 路径参数
7
- * @returns {Promise<AxiosResponse<T>>}
8
- */
9
- function get (url, parameter) {
10
- return request(url, METHOD.GET, parameter)
11
- }
12
-
13
- /**
14
- * POST请求
15
- * @param url 请求地址
16
- * @param parameter 请求参数
17
- * @param config
18
- * @returns {Promise<AxiosResponse<T>>}
19
- */
20
- function post (url, parameter, config = {}) {
21
- return request(url, METHOD.POST, parameter, config)
22
- }
23
-
24
- export { get, post }
1
+ import { METHOD, request } from '@vue2-client/utils/request'
2
+
3
+ /**
4
+ * GET请求
5
+ * @param url 请求地址
6
+ * @param parameter 路径参数
7
+ * @returns {Promise<AxiosResponse<T>>}
8
+ */
9
+ function get (url, parameter) {
10
+ return request(url, METHOD.GET, parameter)
11
+ }
12
+
13
+ /**
14
+ * POST请求
15
+ * @param url 请求地址
16
+ * @param parameter 请求参数
17
+ * @param config
18
+ * @returns {Promise<AxiosResponse<T>>}
19
+ */
20
+ function post (url, parameter, config = {}) {
21
+ return request(url, METHOD.POST, parameter, config)
22
+ }
23
+
24
+ export { get, post }
@@ -12,7 +12,14 @@ let isReloginShow
12
12
 
13
13
  axios.defaults.timeout = 20000
14
14
  axios.defaults.withCredentials = true
15
-
15
+ // 如果是microapp
16
+ if (window.__MICRO_APP_ENVIRONMENT__) {
17
+ const data = window.microApp.getData() // 获取主应用下发的data数据
18
+ // 修改baseurl为主应用地址
19
+ if (data.origin) {
20
+ axios.defaults.baseURL = data.origin
21
+ }
22
+ }
16
23
  // 认证类型
17
24
  const AUTH_TYPE = {
18
25
  BEARER: 'Bearer',