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
adecf50f
Commit
adecf50f
authored
Aug 16, 2023
by
何毅恒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同上
parent
ec36f4f8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
13 deletions
+9
-13
src/pages/pc/index.vue
src/pages/pc/index.vue
+3
-8
src/pages/pc/pcArticleDetail.vue
src/pages/pc/pcArticleDetail.vue
+4
-4
src/pages/pc/pcArticleList.vue
src/pages/pc/pcArticleList.vue
+1
-1
src/router/index.ts
src/router/index.ts
+1
-0
No files found.
src/pages/pc/index.vue
View file @
adecf50f
...
...
@@ -85,6 +85,7 @@ import {
onMounted
,
getCurrentInstance
,
ComponentInternalInstance
,
nextTick
,
}
from
"
vue
"
;
import
{
useRouter
}
from
"
vue-router
"
;
import
{
post
}
from
"
@/api/index
"
;
...
...
@@ -99,6 +100,7 @@ onMounted(() => {
getBanner
();
getInformationCategory
();
});
const
router
=
useRouter
();
const
imgUrl
=
globalProperties
.
$img
;
...
...
@@ -118,27 +120,20 @@ const getInformationCategory = async () => {
let
res
=
await
post
(
"
information/getInformationCategory
"
);
if
(
res
.
code
==
0
)
{
categoryList
.
value
=
res
.
data
;
getSecondInformationCategory
(
res
.
data
[
0
].
id
,
0
);
}
};
// 获取二级分类
let
firstJump
=
true
;
const
getSecondInformationCategory
=
async
(
parent_id
,
key
)
=>
{
let
res
=
await
post
(
"
information/getInformationCategory
"
,
{
parent_id
});
if
(
res
.
code
==
0
)
{
categoryList
.
value
[
key
].
secondCategoryList
=
res
.
data
;
if
(
firstJump
)
{
jump
(
parent_id
,
res
.
data
[
0
].
id
,
res
.
data
[
0
].
cat_name
);
firstJump
=
false
;
}
}
};
const
toIndex
=
():
void
=>
{
window
.
location
.
href
=
"
https://gelifood.com/
"
;
window
.
location
.
href
=
"
https://
www.
gelifood.com/
"
;
};
const
jump
=
(
category_id_1
,
category_id_2
,
cat_name
):
void
=>
{
// console.log(111111, category_id_1, category_id_2, cat_name);
router
.
push
(
"
/pc/pcArticleList?category_id_1=
"
+
category_id_1
+
...
...
src/pages/pc/pcArticleDetail.vue
View file @
adecf50f
...
...
@@ -38,10 +38,10 @@ const getInformationDetail = async (id) => {
let
res
=
await
post
(
"
Information/informationDetail
"
,
{
id
});
if
(
res
.
code
==
0
)
{
informationDetail
.
value
=
res
.
data
;
//
informationDetail.value.content = informationDetail.value.content.replace(
//
/\
<
img
/
gi
,
// '
<
img
style
=
"
width:100%
"'
//
);
informationDetail
.
value
.
content
=
informationDetail
.
value
.
content
.
replace
(
/\<img/gi
,
'
<img style="max-
width:100%"
'
);
}
};
</
script
>
...
...
src/pages/pc/pcArticleList.vue
View file @
adecf50f
<
template
>
<div
id=
"pcArticleList"
>
<h6
class=
"rightTitle"
>
{{
cat_name_2
}}
</h6>
<h6
class=
"rightTitle"
>
{{
cat_name_2
||
"
帮助中心
"
}}
</h6>
<ul
class=
"rightList"
>
<li
class=
"rightItem"
...
...
src/router/index.ts
View file @
adecf50f
...
...
@@ -15,6 +15,7 @@ const routes: Array<RouteRecordRaw> = [
component
:
()
=>
import
(
/* webpackChunkName: "pcIndex" */
"
@/pages/pc/index.vue
"
),
meta
:{
keepAlive
:
false
},
redirect
:{
name
:
'
pcArticleList
'
},
children
:[
{
path
:
'
/pc/pcArticleList
'
,
...
...
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