Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gl_help
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Max
gl_help
Commits
e0f10f60
Commit
e0f10f60
authored
Aug 15, 2023
by
何毅恒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后退不刷新优化
parent
7ebcda48
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
9 deletions
+31
-9
src/App.vue
src/App.vue
+14
-1
src/pages/mobile/index.vue
src/pages/mobile/index.vue
+9
-8
src/router/index.ts
src/router/index.ts
+7
-0
src/utils/jweixin.js
src/utils/jweixin.js
+1
-0
No files found.
src/App.vue
View file @
e0f10f60
...
...
@@ -21,7 +21,20 @@
</
script
>
<
template
>
<router-view></router-view>
<router-view
v-slot=
"
{ Component }">
<keep-alive>
<component
:is=
"Component"
:key=
"$route.name"
v-if=
"$route.meta.keepAlive"
/>
</keep-alive>
<component
:is=
"Component"
:key=
"$route.name"
v-if=
"!$route.meta.keepAlive"
/>
</router-view>
</
template
>
<
style
scoped
lang=
"scss"
></
style
>
src/pages/mobile/index.vue
View file @
e0f10f60
...
...
@@ -64,7 +64,7 @@ import {
}
from
"
vue
"
;
import
{
post
}
from
"
@/api/index
"
;
import
{
useRouter
}
from
"
vue-router
"
;
// import { wx } from "weixin-js-sdk";
onMounted
(()
=>
{
getInformationCategory
();
...
...
@@ -72,13 +72,14 @@ onMounted(() => {
script
.
type
=
"
text/javascript
"
;
script
.
src
=
"
https://res.wx.qq.com/open/js/jweixin-1.3.2.js
"
;
document
.
body
.
appendChild
(
script
);
wx
.
miniProgram
.
postMessage
({
data
:
{
url
:
"
https://testhelp.gelifood.com/index.html
"
,
title
:
"
自定义帮助中心首页
"
,
},
});
if
(
globalProperties
.
$wx
.
isWeixin
())
{
wx
.
miniProgram
.
postMessage
({
data
:
{
url
:
"
https://testhelp.gelifood.com/index.html
"
,
title
:
"
格利帮助中心
"
,
},
});
}
});
const
ArticleItem
=
defineAsyncComponent
(
()
=>
import
(
"
@/components/ArticleItem.vue
"
)
...
...
src/router/index.ts
View file @
e0f10f60
...
...
@@ -7,22 +7,26 @@ const routes: Array<RouteRecordRaw> = [
name
:
"
index
"
,
component
:
()
=>
import
(
/* webpackChunkName: "/" */
"
@/pages/index.vue
"
),
meta
:{
keepAlive
:
false
},
},
{
path
:
"
/pc
"
,
name
:
"
pc
"
,
component
:
()
=>
import
(
/* webpackChunkName: "pcIndex" */
"
@/pages/pc/index.vue
"
),
meta
:{
keepAlive
:
false
},
children
:[
{
path
:
'
/pc/pcArticleList
'
,
name
:
'
pcArticleList
'
,
component
:
()
=>
import
(
/* webpackChunkName: "pcArticleList" */
'
@/pages/pc/pcArticleList.vue
'
),
meta
:{
keepAlive
:
false
},
},
{
path
:
'
/pc/pcArticleDetail
'
,
name
:
'
pcArticleDetail
'
,
component
:
()
=>
import
(
/* webpackChunkName: "pcArticleList" */
'
@/pages/pc/pcArticleDetail.vue
'
),
meta
:{
keepAlive
:
false
},
},
]
},
...
...
@@ -31,18 +35,21 @@ const routes: Array<RouteRecordRaw> = [
name
:
"
mobile
"
,
component
:
()
=>
import
(
/* webpackChunkName: "About" */
"
@/pages/mobile/index.vue
"
),
meta
:{
keepAlive
:
true
},
},
{
path
:
"
/articleDetails
"
,
name
:
"
articleDetails
"
,
component
:
()
=>
import
(
/* webpackChunkName: "About" */
"
@/pages/mobile/articleDetails/index.vue
"
),
meta
:{
keepAlive
:
false
},
},
{
path
:
"
/search
"
,
name
:
"
search
"
,
component
:
()
=>
import
(
/* webpackChunkName: "About" */
"
@/pages/mobile/search/index.vue
"
),
meta
:{
keepAlive
:
false
},
},
];
const
router
=
createRouter
({
...
...
src/utils/jweixin.js
0 → 100644
View file @
e0f10f60
This diff is collapsed.
Click to expand it.
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