wl-design-mobile 0.8.19 → 0.8.21
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/README.md +6 -6
- package/api/doc.js +25 -25
- package/api/x1.js +56 -56
- package/btn/components/lambo-info-btn.vue +123 -123
- package/btn/components/lambo-primary-btn.vue +117 -117
- package/btn/components/lambo-text-btn.vue +116 -116
- package/btn/lambo-btn-divide.vue +35 -120
- package/btn/lambo-btn-group.vue +46 -46
- package/btn/lambo-btn-split-line.vue +41 -41
- package/btn/lambo-btn.vue +68 -68
- package/btn/lambo-extend-btn.vue +121 -121
- package/btn/lambo-icon-btn.vue +82 -82
- package/card-item/card-row-icon.vue +71 -71
- package/card-item/filtrate-row.vue +73 -73
- package/card-item/lambo-card-footer.vue +40 -40
- package/card-item/lambo-card-head.vue +66 -66
- package/card-item/lambo-card-row.vue +59 -59
- package/collapse/lambo-collapse.vue +93 -93
- package/config/config.js +14 -14
- package/detail/lambo-detail-grid.vue +58 -58
- package/detail/lambo-detail-row.vue +59 -59
- package/doc/file/compoents/lambo-file-list.vue +42 -42
- package/doc/file/compoents/lambo-file-row.vue +77 -77
- package/doc/file/lambo-file-upload-collapse.vue +107 -107
- package/doc/file-type/file-type.js +286 -286
- package/doc/img/comonents/lambo-img-grid.vue +109 -109
- package/doc/img/lambo-img-upload-collapse.vue +107 -107
- package/doc/img/styles/css/index.css +3 -3
- package/edit/list/Lambo-edit-list.vue +87 -87
- package/edit/list/lambo-edit-card-group.vue +100 -100
- package/edit/list/styles/css/index.css +39 -39
- package/edit/select/lambo-edit-date-range.vue +147 -147
- package/edit/select/lambo-edit-date-time.vue +122 -122
- package/edit/select/lambo-edit-date.vue +120 -120
- package/edit/select/lambo-edit-input-textarea.vue +91 -91
- package/edit/select/lambo-edit-input.vue +91 -91
- package/edit/select/lambo-edit-multi-select.vue +168 -168
- package/edit/select/lambo-edit-search-single-select.vue +186 -186
- package/edit/select/lambo-edit-single-select.vue +162 -162
- package/edit/select/styles/css/index.css +133 -133
- package/flow/approval/flow-approval.vue +552 -552
- package/flow/comps/flow-attachment-list.vue +230 -230
- package/flow/comps/flow-attachment-modal.vue +194 -194
- package/flow/comps/flow-copy-users.vue +358 -358
- package/flow/comps/flow-node-card.vue +150 -150
- package/flow/comps/flow-node-header.vue +172 -172
- package/flow/comps/flow-util.js +156 -156
- package/flow/comps/icons/approved.svg +11 -11
- package/flow/comps/icons/canceled.svg +11 -11
- package/flow/comps/icons/rejected.svg +11 -11
- package/flow/comps/icons/underway.svg +11 -11
- package/flow/detail/flow-detail.vue +467 -467
- package/flow/index.js +51 -51
- package/flow/lambo-flow-detail.vue +912 -912
- package/flow/lambo-flow-edit.vue +15 -15
- package/flow/submit/flow-submit.vue +383 -383
- package/icon/lambo-required-red-star.vue +47 -47
- package/icon/lambo-vector-icon.vue +71 -71
- package/list/lambo-list.vue +412 -413
- package/nav/lambo-top-nav.vue +81 -81
- package/order/comps/icons/approved.svg +10 -10
- package/order/comps/icons/underway.svg +10 -10
- package/order/comps/order-attachment-list.vue +228 -228
- package/order/comps/order-attachment-modal.vue +194 -194
- package/order/comps/order-node-card.vue +126 -126
- package/order/comps/order-node-header.vue +133 -133
- package/order/comps/order-util.js +132 -132
- package/order/detail/order-detail.vue +432 -432
- package/order/handle/order-handle.vue +517 -517
- package/order/index.js +33 -33
- package/package.json +38 -37
- package/search/lambo-date-range-page.vue +196 -196
- package/search/lambo-date-range.vue +111 -111
- package/search/lambo-date.vue +105 -105
- package/search/lambo-input.vue +74 -74
- package/search/lambo-multi-select.vue +129 -129
- package/search/lambo-org-select-page.vue +109 -109
- package/search/lambo-search-box.vue +61 -61
- package/search/lambo-search-single-select.vue +152 -152
- package/search/lambo-single-select.vue +123 -123
- package/search/lambo-week-date-select.vue +521 -521
- package/search/styles/css/index.css +138 -138
- package/styles/base.less +77 -77
- package/styles/components/btn.less +7 -7
- package/styles/components/search.less +33 -33
- package/styles/components/tag.less +181 -181
- package/styles/index.less +4 -4
- package/table/lambo-ag-table.vue +227 -227
- package/tag/lambo-tag.vue +23 -23
- package/title/lambo-title1.vue +151 -151
- package/title/lambo-title2.vue +37 -37
- package/title/lambo-title3.vue +77 -77
- package/util/assist.js +43 -43
- package/util/axios/cacheconf.js +19 -19
- package/util/axios/index.js +11 -11
- package/util/axios/interceptors.js +101 -101
- package/util/bus.js +4 -4
- package/util/jssdk-sczy.js +104 -104
- package/util/jssdk.js +608 -565
- package/util/math.js +76 -76
- package/util/token.js +36 -36
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
import cacheRules from "./cacheconf";
|
|
2
|
-
import {getToken, getUrlParams, TOKEN_KEY} from '../token'
|
|
3
|
-
import Bus from '../bus';
|
|
4
|
-
import {Dialog} from 'vant'
|
|
5
|
-
|
|
6
|
-
let timer1, timer2;
|
|
7
|
-
let hasDialog = false;
|
|
8
|
-
|
|
9
|
-
function requestInterceptors(config) {
|
|
10
|
-
const params = getUrlParams();
|
|
11
|
-
|
|
12
|
-
let token = getToken();
|
|
13
|
-
if (token) {
|
|
14
|
-
config.headers.token = token;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
//sso_token认证
|
|
18
|
-
if (Object.prototype.hasOwnProperty.call(params, 'sso_token') || sessionStorage.getItem('sso_token')) {
|
|
19
|
-
config.params = Object.assign({
|
|
20
|
-
sso_token: params.sso_token || sessionStorage.getItem('sso_token'),
|
|
21
|
-
sso_id: params.sso_id
|
|
22
|
-
}, config.params)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
//oauth认证
|
|
26
|
-
if (Object.prototype.hasOwnProperty.call(params, 'token')) {
|
|
27
|
-
if (config.url.indexOf('?') === -1) {
|
|
28
|
-
config.url = config.url + "?token=" + params.token + "&ssoid=" + params.ssoid;
|
|
29
|
-
} else {
|
|
30
|
-
config.url = config.url + "&token=" + params.token + "&ssoid=" + params.ssoid;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (config.method === 'post') {
|
|
35
|
-
// payload为自定义不使用qs.stringify序列化的标记,默认config.payload == undefined;
|
|
36
|
-
// 为true时用于匹配@requestBody定义参数的接口
|
|
37
|
-
// 使用方式:post(config.AAAServerContext + '/AAA/BBB/CCC', { ...paramRequestBody }, { payload: true })
|
|
38
|
-
if (!config.payload) {
|
|
39
|
-
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
|
40
|
-
// config.data = qs.stringify(config.data)
|
|
41
|
-
}
|
|
42
|
-
} else if (config.method === 'get') {
|
|
43
|
-
for (let rule of cacheRules) {
|
|
44
|
-
if (rule.test(config.url)) {
|
|
45
|
-
return config;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
if (config.url.indexOf('?') === -1) {
|
|
49
|
-
config.url = config.url + "?t=" + new Date().getTime();
|
|
50
|
-
} else {
|
|
51
|
-
config.url = config.url + "&t=" + new Date().getTime();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return config;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function requestError(error) {
|
|
58
|
-
console.error("服务器内部异常,请稍候再试", error);
|
|
59
|
-
return Promise.reject(error);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function responseInterceptors(response) {
|
|
63
|
-
let data = response.data;
|
|
64
|
-
|
|
65
|
-
if (data instanceof Object) {
|
|
66
|
-
const code = data["code"];
|
|
67
|
-
if (code === 10106) {
|
|
68
|
-
sessionStorage.removeItem(TOKEN_KEY)
|
|
69
|
-
if (!hasDialog) {
|
|
70
|
-
clearTimeout(timer1);
|
|
71
|
-
timer1 = setTimeout(function () {
|
|
72
|
-
hasDialog = true;
|
|
73
|
-
Dialog.alert({
|
|
74
|
-
message: '会话已失效,请重新登录',
|
|
75
|
-
theme: 'round-button',
|
|
76
|
-
confirmButtonColor: '#0070D2'
|
|
77
|
-
}).then(() => {
|
|
78
|
-
hasDialog = false;
|
|
79
|
-
Bus.$emit("needLogin");
|
|
80
|
-
});
|
|
81
|
-
}, 500)
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return data;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function responseError(error) {
|
|
89
|
-
clearTimeout(timer2);
|
|
90
|
-
timer2 = setTimeout(function () {
|
|
91
|
-
console.error("服务器内部异常,请稍候再试");
|
|
92
|
-
}, 500)
|
|
93
|
-
return Promise.reject(error);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export default {
|
|
97
|
-
requestInterceptors,
|
|
98
|
-
responseInterceptors,
|
|
99
|
-
requestError,
|
|
100
|
-
responseError
|
|
101
|
-
}
|
|
1
|
+
import cacheRules from "./cacheconf";
|
|
2
|
+
import {getToken, getUrlParams, TOKEN_KEY} from '../token'
|
|
3
|
+
import Bus from '../bus';
|
|
4
|
+
import {Dialog} from 'vant'
|
|
5
|
+
|
|
6
|
+
let timer1, timer2;
|
|
7
|
+
let hasDialog = false;
|
|
8
|
+
|
|
9
|
+
function requestInterceptors(config) {
|
|
10
|
+
const params = getUrlParams();
|
|
11
|
+
|
|
12
|
+
let token = getToken();
|
|
13
|
+
if (token) {
|
|
14
|
+
config.headers.token = token;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
//sso_token认证
|
|
18
|
+
if (Object.prototype.hasOwnProperty.call(params, 'sso_token') || sessionStorage.getItem('sso_token')) {
|
|
19
|
+
config.params = Object.assign({
|
|
20
|
+
sso_token: params.sso_token || sessionStorage.getItem('sso_token'),
|
|
21
|
+
sso_id: params.sso_id
|
|
22
|
+
}, config.params)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
//oauth认证
|
|
26
|
+
if (Object.prototype.hasOwnProperty.call(params, 'token')) {
|
|
27
|
+
if (config.url.indexOf('?') === -1) {
|
|
28
|
+
config.url = config.url + "?token=" + params.token + "&ssoid=" + params.ssoid;
|
|
29
|
+
} else {
|
|
30
|
+
config.url = config.url + "&token=" + params.token + "&ssoid=" + params.ssoid;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (config.method === 'post') {
|
|
35
|
+
// payload为自定义不使用qs.stringify序列化的标记,默认config.payload == undefined;
|
|
36
|
+
// 为true时用于匹配@requestBody定义参数的接口
|
|
37
|
+
// 使用方式:post(config.AAAServerContext + '/AAA/BBB/CCC', { ...paramRequestBody }, { payload: true })
|
|
38
|
+
if (!config.payload) {
|
|
39
|
+
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
|
40
|
+
// config.data = qs.stringify(config.data)
|
|
41
|
+
}
|
|
42
|
+
} else if (config.method === 'get') {
|
|
43
|
+
for (let rule of cacheRules) {
|
|
44
|
+
if (rule.test(config.url)) {
|
|
45
|
+
return config;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (config.url.indexOf('?') === -1) {
|
|
49
|
+
config.url = config.url + "?t=" + new Date().getTime();
|
|
50
|
+
} else {
|
|
51
|
+
config.url = config.url + "&t=" + new Date().getTime();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return config;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function requestError(error) {
|
|
58
|
+
console.error("服务器内部异常,请稍候再试", error);
|
|
59
|
+
return Promise.reject(error);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function responseInterceptors(response) {
|
|
63
|
+
let data = response.data;
|
|
64
|
+
|
|
65
|
+
if (data instanceof Object) {
|
|
66
|
+
const code = data["code"];
|
|
67
|
+
if (code === 10106) {
|
|
68
|
+
sessionStorage.removeItem(TOKEN_KEY)
|
|
69
|
+
if (!hasDialog) {
|
|
70
|
+
clearTimeout(timer1);
|
|
71
|
+
timer1 = setTimeout(function () {
|
|
72
|
+
hasDialog = true;
|
|
73
|
+
Dialog.alert({
|
|
74
|
+
message: '会话已失效,请重新登录',
|
|
75
|
+
theme: 'round-button',
|
|
76
|
+
confirmButtonColor: '#0070D2'
|
|
77
|
+
}).then(() => {
|
|
78
|
+
hasDialog = false;
|
|
79
|
+
Bus.$emit("needLogin");
|
|
80
|
+
});
|
|
81
|
+
}, 500)
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return data;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function responseError(error) {
|
|
89
|
+
clearTimeout(timer2);
|
|
90
|
+
timer2 = setTimeout(function () {
|
|
91
|
+
console.error("服务器内部异常,请稍候再试");
|
|
92
|
+
}, 500)
|
|
93
|
+
return Promise.reject(error);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export default {
|
|
97
|
+
requestInterceptors,
|
|
98
|
+
responseInterceptors,
|
|
99
|
+
requestError,
|
|
100
|
+
responseError
|
|
101
|
+
}
|
package/util/bus.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
|
|
3
|
-
const Bus = new Vue();
|
|
4
|
-
export default Bus;
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
|
|
3
|
+
const Bus = new Vue();
|
|
4
|
+
export default Bus;
|
package/util/jssdk-sczy.js
CHANGED
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
import wx from "weixin-js-sdk";
|
|
2
|
-
import config from '../config/config'
|
|
3
|
-
import {axios} from '../util/axios'
|
|
4
|
-
|
|
5
|
-
const isIos14AndMore = () => {
|
|
6
|
-
try {
|
|
7
|
-
const str = navigator.userAgent.toLowerCase()
|
|
8
|
-
const ver = str.match(/cpu iphone os (.*?) like mac os/)
|
|
9
|
-
if (!ver) {
|
|
10
|
-
return false
|
|
11
|
-
}
|
|
12
|
-
return Number(ver[1].split('_')[0]) >= 14
|
|
13
|
-
} catch (e) {
|
|
14
|
-
console.log('isIos14AndMore', e)
|
|
15
|
-
return false
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
async function getSczyJsConfig() {
|
|
20
|
-
let url = window.location.href.split('#')[0].toString()
|
|
21
|
-
if (isIos14AndMore()) {
|
|
22
|
-
console.log('[jssdk-sczy] iOS 14+,使用当前页面 URL 参与签名', url)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const resp = await axios.get(config.platformServerContext + '/api/weixin/js/signature', {
|
|
26
|
-
params: { url }
|
|
27
|
-
})
|
|
28
|
-
|
|
29
|
-
const signatureData = resp.data
|
|
30
|
-
const errcode = resp.errcode
|
|
31
|
-
const errmsg = resp.errmsg || resp.message
|
|
32
|
-
|
|
33
|
-
if (errcode !== 0) {
|
|
34
|
-
throw new Error(errmsg)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return signatureData
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function configWx() {
|
|
41
|
-
return new Promise((resolve, reject) => {
|
|
42
|
-
getSczyJsConfig().then((resp) => {
|
|
43
|
-
wx.config({
|
|
44
|
-
beta: true,
|
|
45
|
-
debug: false,
|
|
46
|
-
appId: resp.appId,
|
|
47
|
-
timestamp: resp.timestamp,
|
|
48
|
-
nonceStr: resp.nonceStr,
|
|
49
|
-
signature: resp.signature,
|
|
50
|
-
jsApiList: ['scanQRCode']
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
wx.ready(() => {
|
|
54
|
-
resolve()
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
wx.error((res) => {
|
|
58
|
-
reject('企业微信初始化js-sdk失败' + (res && res.errMsg ? res.errMsg : ''))
|
|
59
|
-
})
|
|
60
|
-
}).catch((error) => {
|
|
61
|
-
reject('请求服务端jssdk签名失败:'+error)
|
|
62
|
-
})
|
|
63
|
-
})
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function scanQRCode() {
|
|
67
|
-
return new Promise((resolve, reject) => {
|
|
68
|
-
configWx().then(() => {
|
|
69
|
-
if (!wx.scanQRCode) {
|
|
70
|
-
reject('当前客户端不支持扫码能力')
|
|
71
|
-
return
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
wx.scanQRCode({
|
|
75
|
-
desc: 'scanQRCode desc',
|
|
76
|
-
needResult: 1,
|
|
77
|
-
scanType: ['qrCode', 'barCode'],
|
|
78
|
-
success: function (res) {
|
|
79
|
-
resolve(res)
|
|
80
|
-
},
|
|
81
|
-
fail: function (res) {
|
|
82
|
-
if (res && res.errMsg && res.errMsg.indexOf('function_not_exist') > -1) {
|
|
83
|
-
reject('版本过低请升级')
|
|
84
|
-
} else {
|
|
85
|
-
reject('企业微信扫码失败,请联系系统管理员!')
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
error: function (res) {
|
|
89
|
-
if (res && res.errMsg && res.errMsg.indexOf('function_not_exist') > -1) {
|
|
90
|
-
reject('版本过低请升级')
|
|
91
|
-
} else {
|
|
92
|
-
reject('企业微信扫码失败,请联系系统管理员!')
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
})
|
|
96
|
-
}).catch((error) => {
|
|
97
|
-
reject('企业微信扫码失败:' + error)
|
|
98
|
-
})
|
|
99
|
-
})
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export default {
|
|
103
|
-
scanQRCode,
|
|
104
|
-
}
|
|
1
|
+
import wx from "weixin-js-sdk";
|
|
2
|
+
import config from '../config/config'
|
|
3
|
+
import {axios} from '../util/axios'
|
|
4
|
+
|
|
5
|
+
const isIos14AndMore = () => {
|
|
6
|
+
try {
|
|
7
|
+
const str = navigator.userAgent.toLowerCase()
|
|
8
|
+
const ver = str.match(/cpu iphone os (.*?) like mac os/)
|
|
9
|
+
if (!ver) {
|
|
10
|
+
return false
|
|
11
|
+
}
|
|
12
|
+
return Number(ver[1].split('_')[0]) >= 14
|
|
13
|
+
} catch (e) {
|
|
14
|
+
console.log('isIos14AndMore', e)
|
|
15
|
+
return false
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async function getSczyJsConfig() {
|
|
20
|
+
let url = window.location.href.split('#')[0].toString()
|
|
21
|
+
if (isIos14AndMore()) {
|
|
22
|
+
console.log('[jssdk-sczy] iOS 14+,使用当前页面 URL 参与签名', url)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const resp = await axios.get(config.platformServerContext + '/api/weixin/js/signature', {
|
|
26
|
+
params: { url }
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const signatureData = resp.data
|
|
30
|
+
const errcode = resp.errcode
|
|
31
|
+
const errmsg = resp.errmsg || resp.message
|
|
32
|
+
|
|
33
|
+
if (errcode !== 0) {
|
|
34
|
+
throw new Error(errmsg)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return signatureData
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function configWx() {
|
|
41
|
+
return new Promise((resolve, reject) => {
|
|
42
|
+
getSczyJsConfig().then((resp) => {
|
|
43
|
+
wx.config({
|
|
44
|
+
beta: true,
|
|
45
|
+
debug: false,
|
|
46
|
+
appId: resp.appId,
|
|
47
|
+
timestamp: resp.timestamp,
|
|
48
|
+
nonceStr: resp.nonceStr,
|
|
49
|
+
signature: resp.signature,
|
|
50
|
+
jsApiList: ['scanQRCode']
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
wx.ready(() => {
|
|
54
|
+
resolve()
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
wx.error((res) => {
|
|
58
|
+
reject('企业微信初始化js-sdk失败' + (res && res.errMsg ? res.errMsg : ''))
|
|
59
|
+
})
|
|
60
|
+
}).catch((error) => {
|
|
61
|
+
reject('请求服务端jssdk签名失败:'+error)
|
|
62
|
+
})
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function scanQRCode() {
|
|
67
|
+
return new Promise((resolve, reject) => {
|
|
68
|
+
configWx().then(() => {
|
|
69
|
+
if (!wx.scanQRCode) {
|
|
70
|
+
reject('当前客户端不支持扫码能力')
|
|
71
|
+
return
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
wx.scanQRCode({
|
|
75
|
+
desc: 'scanQRCode desc',
|
|
76
|
+
needResult: 1,
|
|
77
|
+
scanType: ['qrCode', 'barCode'],
|
|
78
|
+
success: function (res) {
|
|
79
|
+
resolve(res)
|
|
80
|
+
},
|
|
81
|
+
fail: function (res) {
|
|
82
|
+
if (res && res.errMsg && res.errMsg.indexOf('function_not_exist') > -1) {
|
|
83
|
+
reject('版本过低请升级')
|
|
84
|
+
} else {
|
|
85
|
+
reject('企业微信扫码失败,请联系系统管理员!')
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
error: function (res) {
|
|
89
|
+
if (res && res.errMsg && res.errMsg.indexOf('function_not_exist') > -1) {
|
|
90
|
+
reject('版本过低请升级')
|
|
91
|
+
} else {
|
|
92
|
+
reject('企业微信扫码失败,请联系系统管理员!')
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
})
|
|
96
|
+
}).catch((error) => {
|
|
97
|
+
reject('企业微信扫码失败:' + error)
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export default {
|
|
103
|
+
scanQRCode,
|
|
104
|
+
}
|