Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks-h5
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
quantum-blocks-h5
Commits
012e6455
Commit
012e6455
authored
Nov 25, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ui): 问题修复
parent
c9a5faae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
app.ts
app/web/framework/app.ts
+12
-10
sa.service.ts
app/web/service/sa.service.ts
+4
-2
No files found.
app/web/framework/app.ts
View file @
012e6455
...
@@ -5,7 +5,8 @@ import { isWechat } from '@/service/utils.service';
...
@@ -5,7 +5,8 @@ import { isWechat } from '@/service/utils.service';
import
initService
from
'
@/service/init.service
'
;
import
initService
from
'
@/service/init.service
'
;
export
default
class
App
{
export
default
class
App
{
config
:
any
;
config
:
any
;
constructor
(
config
)
{
aysnc
;
constructor
(
config
)
{
this
.
config
=
config
;
this
.
config
=
config
;
}
}
...
@@ -16,7 +17,6 @@ export default class App {
...
@@ -16,7 +17,6 @@ export default class App {
}
}
return
this
.
client
();
return
this
.
client
();
}
}
create
(
initState
)
{
create
(
initState
)
{
const
{
entry
,
createStore
,
createRouter
}
=
this
.
config
;
const
{
entry
,
createStore
,
createRouter
}
=
this
.
config
;
// console.log('initState', initState);
// console.log('initState', initState);
...
@@ -38,15 +38,17 @@ export default class App {
...
@@ -38,15 +38,17 @@ export default class App {
};
};
}
}
async
setWxConfig
()
{
setWxConfig
()
{
if
(
!
isWechat
)
{
return
;
}
if
(
!
isWechat
)
{
return
;
}
const
wx
=
require
(
'
weixin-js-sdk
'
);
api
.
getWxConfig
().
then
(
data
=>
{
const
[
res
]
=
await
api
.
getWxConfig
();
const
[
res
]
=
data
;
wx
.
config
({
const
wx
=
require
(
'
weixin-js-sdk
'
);
debug
:
false
,
wx
.
config
({
jsApiList
:
[
'
onMenuShareTimeline
'
,
'
onMenuShareAppMessage
'
],
// 必填,需要使用的JS接口列表
debug
:
true
,
openTagList
:
[
'
wx-open-launch-weapp
'
,
'
wx-open-launch-app
'
],
jsApiList
:
[
'
onMenuShareTimeline
'
,
'
onMenuShareAppMessage
'
],
// 必填,需要使用的JS接口列表
...
res
openTagList
:
[
'
wx-open-launch-weapp
'
,
'
wx-open-launch-app
'
],
...
res
});
});
});
}
}
...
...
app/web/service/sa.service.ts
View file @
012e6455
...
@@ -8,6 +8,7 @@ export function initSa(router) {
...
@@ -8,6 +8,7 @@ export function initSa(router) {
const
activityId
=
window
.
location
.
pathname
.
split
(
'
/
'
)?.[
2
]
||
''
;
const
activityId
=
window
.
location
.
pathname
.
split
(
'
/
'
)?.[
2
]
||
''
;
const
vccChannel
=
getParameterByName
(
'
vccChannel
'
)
||
getParameterByName
(
'
registerFrom
'
);
const
vccChannel
=
getParameterByName
(
'
vccChannel
'
)
||
getParameterByName
(
'
registerFrom
'
);
const
sonVccChannel
=
getParameterByName
(
'
sonVccChannel
'
);
const
sonVccChannel
=
getParameterByName
(
'
sonVccChannel
'
);
const
tenantId
=
getParameterByName
(
'
tenantId
'
)
||
config
.
yxmTenantId
;
sa
.
init
({
sa
.
init
({
server_url
:
config
.
shenceUrl
,
server_url
:
config
.
shenceUrl
,
heatmap
:
{
heatmap
:
{
...
@@ -18,7 +19,7 @@ export function initSa(router) {
...
@@ -18,7 +19,7 @@ export function initSa(router) {
},
},
// 判断外层是否有 App 的 SDK ,如果有的话,会往 App 的 SDK 发数据。如果没有,就正常发送数据。
// 判断外层是否有 App 的 SDK ,如果有的话,会往 App 的 SDK 发数据。如果没有,就正常发送数据。
use_app_track
:
true
,
use_app_track
:
true
,
show_log
:
process
.
env
.
NODE_ENV
!==
'
development
'
&&
config
.
test
,
show_log
:
config
.
test
,
app_js_bridge
:
true
,
app_js_bridge
:
true
,
batch_send
:
true
,
batch_send
:
true
,
});
});
...
@@ -27,7 +28,8 @@ export function initSa(router) {
...
@@ -27,7 +28,8 @@ export function initSa(router) {
platformType
:
isWxMp
?
'
MP
'
:
isApp
?
'
APP
'
:
'
H5
'
,
platformType
:
isWxMp
?
'
MP
'
:
isApp
?
'
APP
'
:
'
H5
'
,
activity_id
:
activityId
,
activity_id
:
activityId
,
parent_channel_id
:
vccChannel
||
''
,
parent_channel_id
:
vccChannel
||
''
,
channel_id
:
sonVccChannel
||
''
channel_id
:
sonVccChannel
||
''
,
tenantId
,
});
});
router
.
afterEach
(()
=>
{
router
.
afterEach
(()
=>
{
Vue
.
nextTick
(()
=>
{
Vue
.
nextTick
(()
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment