Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2b9a89d2
authored
Jun 20, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
ab5a390a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
31 deletions
vue3-lw-pc/src/layout/components/AppMain.vue
vue3-lw-pc/src/utils/jsencrypt.js
vue3-lw-pc/vite.config.js
vue3-lw-pc/src/layout/components/AppMain.vue
View file @
2b9a89d
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
<!--
</el-scrollbar>
-->
<!--
</el-scrollbar>
-->
</
template
>
</
template
>
<
script
>
<
script
>
import
{
registerMicroApps
,
start
}
from
'qiankun'
//
import { registerMicroApps, start } from 'qiankun'
export
default
{
export
default
{
name
:
'AppMain'
,
name
:
'AppMain'
,
data
()
{
data
()
{
...
@@ -50,32 +50,32 @@ export default {
...
@@ -50,32 +50,32 @@ export default {
// },
// },
},
},
mounted
()
{
mounted
()
{
if
(
window
.
lwConfig
.
MICRO_APPS
&&
window
.
lwConfig
.
MICRO_APPS
.
store
)
{
//
if (window.lwConfig.MICRO_APPS && window.lwConfig.MICRO_APPS.store) {
// window.Vue2 = window.Vue
//
// window.Vue2 = window.Vue
// delete window.Vue
//
// delete window.Vue
window
.
lwConfig
.
MICRO_APPS
.
store
.
loader
=
(
loading
)
=>
(
this
.
loading
=
loading
)
//
window.lwConfig.MICRO_APPS.store.loader = (loading) => (this.loading = loading)
registerMicroApps
([
window
.
lwConfig
.
MICRO_APPS
.
store
],
{
//
registerMicroApps([window.lwConfig.MICRO_APPS.store], {
beforeLoad
:
()
=>
(
this
.
isActiveMicroApp
=
true
),
//
beforeLoad: () => (this.isActiveMicroApp = true),
afterUnmount
:
()
=>
(
this
.
isActiveMicroApp
=
false
),
//
afterUnmount: () => (this.isActiveMicroApp = false),
})
//
})
start
({
//
start({
sandbox
:
{
experimentalStyleIsolation
:
true
},
//
sandbox: { experimentalStyleIsolation: true },
})
//
})
// 挂在window供下面微服务使用
//
// 挂在window供下面微服务使用
window
.
lwConfig
.
$store
=
{
//
window.lwConfig.$store = {
dispatch
:
(
_
,
s
)
=>
{
//
dispatch: (_, s) => {
this
.
$store
.
setBusininessDesc
(
s
)
//
this.$store.setBusininessDesc(s)
},
//
},
}
//
}
// 初始化 state
//
// 初始化 state
// const actions = initGlobalState({ token: getToken() })
//
// const actions = initGlobalState({ token: getToken() })
// actions.onGlobalStateChange((state, prev) => {
//
// actions.onGlobalStateChange((state, prev) => {
// // state: 变更后的状态; prev 变更前的状态
//
// // state: 变更后的状态; prev 变更前的状态
// });
//
// });
// actions.setGlobalState(state)
//
// actions.setGlobalState(state)
}
//
}
// if (window.lwConfig.MICRO_APPS) {
// if (window.lwConfig.MICRO_APPS) {
// import('qiankun').then(({ registerMicroApps, start }) => {
// import('qiankun').then(({ registerMicroApps, start }) => {
// registerMicroApps(window.lwConfig.MICRO_APPS)
// registerMicroApps(window.lwConfig.MICRO_APPS)
...
...
vue3-lw-pc/src/utils/jsencrypt.js
View file @
2b9a89d
// RSA加密
// RSA加密
import
JSEncrypt
from
'jsencrypt/bin/jsencrypt.js'
// import JSEncrypt from 'jsencrypt/bin/jsencrypt.js'
import
JSEncrypt
from
'jsencrypt'
// 密钥对生成 http://web.chacuo.net/netrsakeypair
// 密钥对生成 http://web.chacuo.net/netrsakeypair
...
...
vue3-lw-pc/vite.config.js
View file @
2b9a89d
...
@@ -227,11 +227,11 @@ export default defineConfig(async ({ command, mode }) => {
...
@@ -227,11 +227,11 @@ export default defineConfig(async ({ command, mode }) => {
// version: '2.1.0',
// version: '2.1.0',
// path: 'dist/index.iife.min.js',
// path: 'dist/index.iife.min.js',
// },
// },
//
{
{
//
name: 'ali-oss',
name
:
'ali-oss'
,
//
var: 'OSS',
var
:
'OSS'
,
// path: 'http
://gosspublic.alicdn.com/aliyun-oss-sdk-6.17.1.min.js',
path
:
'https
://gosspublic.alicdn.com/aliyun-oss-sdk-6.17.1.min.js'
,
//
},
},
],
],
}),
}),
rollupPluginVisualizer
({
rollupPluginVisualizer
({
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment