@smart100/spu-web-plugin 0.0.18 → 0.0.22
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/dist/index.d.ts +1 -0
- package/dist/spu-web-plugin.mjs +51083 -41735
- package/package.json +2 -1
- package/src/axios.ts +14 -1
- package/src/components/expandexp/index.ts +73 -5
- package/src/components/expandexp/template.ts +158 -10
- package/src/components/webMessage/index.ts +143 -0
- package/src/core.js +30 -25
- package/src/index.ts +7 -1
- package/src/install.ts +5 -0
- package/src/types/shims-lib.d.ts +9 -0
package/src/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { v4 as getUuid } from 'uuid'
|
|
|
12
12
|
import { Module } from './core'
|
|
13
13
|
import components from './components'
|
|
14
14
|
import { expandexp } from './components/expandexp'
|
|
15
|
+
import { jssdk } from '@smart100/wxworksuite-plugin'
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
// class SPUWebPlugin {
|
|
@@ -31,6 +32,10 @@ const getTokenExpires = login.getTokenExpires.bind(login)
|
|
|
31
32
|
const getRefreshToken = login.getRefreshToken.bind(login)
|
|
32
33
|
const getUser = login.getUser.bind(login)
|
|
33
34
|
const checkLogin = login.checkLogin.bind(login)
|
|
35
|
+
const wxworkSuite = {
|
|
36
|
+
JSSDK: jssdk,
|
|
37
|
+
isWxworkSuiteTenant: jssdk.checkData
|
|
38
|
+
}
|
|
34
39
|
|
|
35
40
|
export {
|
|
36
41
|
SPUWebPlugin as default,
|
|
@@ -54,5 +59,6 @@ export {
|
|
|
54
59
|
checkLogin,
|
|
55
60
|
Module,
|
|
56
61
|
components,
|
|
57
|
-
expandexp
|
|
62
|
+
expandexp,
|
|
63
|
+
wxworkSuite
|
|
58
64
|
}
|
package/src/install.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { initAxios } from './axios'
|
|
|
4
4
|
import urlquery from './urlquery'
|
|
5
5
|
import { initSpuConfig } from './spuConfig'
|
|
6
6
|
import { initApaasSpuTrack } from './apaasSpuTrack'
|
|
7
|
+
import { WxworksuitePluginInstall } from '@smart100/wxworksuite-plugin'
|
|
7
8
|
import { merge } from 'lodash-es'
|
|
8
9
|
import { initTest } from './test'
|
|
9
10
|
|
|
@@ -42,6 +43,10 @@ const install = (app: any, options: SPUWebPluginOptions) => {
|
|
|
42
43
|
initApaasSpuTrack()
|
|
43
44
|
urlquery.init()
|
|
44
45
|
login.startRefreshtoken()
|
|
46
|
+
// 安装企微第三方应用插件
|
|
47
|
+
WxworksuitePluginInstall({
|
|
48
|
+
getToken: login.getToken.bind(login)
|
|
49
|
+
})
|
|
45
50
|
initTest(globalOptions)
|
|
46
51
|
|
|
47
52
|
if (globalOptions.router) {
|
package/src/types/shims-lib.d.ts
CHANGED
|
@@ -7,6 +7,15 @@ declare module '*.vue' {
|
|
|
7
7
|
declare module 'co'
|
|
8
8
|
declare module 'uuid'
|
|
9
9
|
|
|
10
|
+
|
|
11
|
+
declare module '*.svg'
|
|
12
|
+
declare module '*.png'
|
|
13
|
+
declare module '*.jpg'
|
|
14
|
+
declare module '*.jpeg'
|
|
15
|
+
declare module '*.gif'
|
|
16
|
+
// declare module '*.bmp'
|
|
17
|
+
// declare module '*.tiff'
|
|
18
|
+
|
|
10
19
|
// declare module 'the-answer'
|
|
11
20
|
|
|
12
21
|
interface Window {
|