doway-coms 1.4.56 → 1.4.57

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doway-coms",
3
- "version": "1.4.56",
3
+ "version": "1.4.57",
4
4
  "description": "doway组件库",
5
5
  "author": "dowaysoft",
6
6
  "main": "packages/index.js",
@@ -12,24 +12,35 @@ export function loadViewInfo(moduleCode) {
12
12
 
13
13
  export function saveUserModuleDataFieldApi(data) {
14
14
  return request({
15
- url: store.getters.umsUrl + '/v1/user/saveUserModuleDataField',
15
+ url: store.getters.umsUrl + '/v1/user/saveUserModuleDataField',
16
16
  method: 'post',
17
17
  data: data
18
18
  })
19
19
  }
20
20
 
21
21
  export function attachGetAttachUrlApi() {
22
- return store.getters.msgUrl + '/v1/Attach'
23
- }
24
-
25
- /**
26
- * 获取cust信息列表
27
- * @param postData 提交的数据,分页信息
28
- */
29
- export function attachSearchApi(postData) {
30
- return request({
31
- url: store.getters.msgUrl + '/v1/Attach/Search',
32
- method: 'post',
33
- data: postData
34
- })
35
- }
22
+ return store.getters.msgUrl + '/v1/Attach'
23
+ }
24
+
25
+ /**
26
+ * 获取cust信息列表
27
+ * @param postData 提交的数据,分页信息
28
+ */
29
+ export function attachSearchApi(postData) {
30
+ return request({
31
+ url: store.getters.msgUrl + '/v1/Attach/Search',
32
+ method: 'post',
33
+ data: postData
34
+ })
35
+ }
36
+
37
+ /**
38
+ * 验证
39
+ */
40
+ export function licenseAuthorizeApi(data) {
41
+ return request({
42
+ url: store.getters.identityUrl + '/oauth/licenseAuthorize',
43
+ method: 'post',
44
+ data: data
45
+ })
46
+ }
@@ -1,5 +1,6 @@
1
1
  import axios from 'axios'
2
- import { notification } from 'ant-design-vue'
2
+ import { licenseAuthorizeApi } from './api'
3
+ import { notification, message, Modal, Input } from 'ant-design-vue'
3
4
  import Vue from 'vue'
4
5
  import store from './store'
5
6
  import moment from 'moment'
@@ -55,6 +56,69 @@ service.interceptors.response.use(
55
56
  if (res.status === 200 || res.code === 200) {
56
57
  return response.data
57
58
  }
59
+ if (res.code == 60001) {
60
+ return new Promise((resolve, reject) => {
61
+ let inputVal = '';
62
+ Modal.info({
63
+ zIndex: 3100,
64
+ title: '授权',
65
+ okText: '授权',
66
+ destroyOnClose: true,
67
+ keyboard: true,
68
+ content: h => {
69
+ return h('div', null, [
70
+ h(Input, {
71
+ attrs: {
72
+ type: 'text',
73
+ placeholder: "请输入许可",
74
+ },
75
+ on: {
76
+ input: event => {
77
+ inputVal = event.target.value;
78
+ },
79
+ },
80
+ }),
81
+ ]);
82
+ },
83
+ async onOk() {
84
+ try {
85
+ let data = {
86
+ system: store.state.webAppCode,
87
+ license: inputVal
88
+ }
89
+ let info = await licenseAuthorizeApi(data)
90
+ Modal.info({
91
+ zIndex: 4000,
92
+ title: '成功信息',
93
+ content: h => {
94
+ return h('div', null, [
95
+ h('div', null, `验证成功,许可有效期至:${info.content},请重新登录`),
96
+ ]);
97
+ },
98
+ onOk() {
99
+ // 返回登录页
100
+ store.dispatch('logOut')
101
+ }
102
+ });
103
+ }
104
+ catch (error) {
105
+ Modal.error({
106
+ zIndex: 4000,
107
+ title: '错误信息',
108
+ destroyOnClose: true,
109
+ keyboard: true,
110
+ content: h => {
111
+ return h('div', null, [
112
+ h('div', null, error),
113
+ ]);
114
+ },
115
+ })
116
+ return Promise.reject(error)
117
+ }
118
+ },
119
+ });
120
+ })
121
+ }
58
122
  if (res.status === undefined && res.code === undefined) {
59
123
  return response.data
60
124
  }
@@ -11,6 +11,7 @@ export default new Vuex.Store({
11
11
  state: {
12
12
  umsUrl:'',
13
13
  msgUrl:'',
14
+ identityUrl:'',
14
15
  token: '',
15
16
  industryVersion:'',//行业版本
16
17
  custPriceNotTaxPrecision:0,
@@ -92,7 +93,7 @@ export default new Vuex.Store({
92
93
  state.newId = id
93
94
  },
94
95
  SET_UMS_URL:(state,url) => {
95
- state.umsUrl = url
96
+ state.umsUrl = url
96
97
  },
97
98
  SET_CUST_PRICE_NOT_TAX_PRECISION:(state,custPriceNotTaxPrecision)=>{
98
99
  state.custPriceNotTaxPrecision = custPriceNotTaxPrecision
@@ -107,8 +108,11 @@ export default new Vuex.Store({
107
108
  state.supplyPricePrecision = supplyPricePrecision
108
109
  },
109
110
  SET_MSG_URL:(state,url) => {
110
- state.msgUrl = url
111
- }
111
+ state.msgUrl = url
112
+ },
113
+ SET_IDENTITY_URL:(state,url) => {
114
+ state.identityUrl = url
115
+ },
112
116
  },
113
117
  actions: {
114
118
  /**
@@ -177,6 +181,7 @@ export default new Vuex.Store({
177
181
  isGenerateMatCode:state=>state.isGenerateMatCode,
178
182
  umsUrl:state=>state.umsUrl,
179
183
  msgUrl:state=>state.msgUrl,
184
+ identityUrl:state=>state.identityUrl,
180
185
  token: state => state.token,
181
186
  webAppCode: state => state.webAppCode,
182
187
  moduleViewInfo: state => state.moduleViewInfo,