Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intel_promotion_uniapp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
刘怀志
intel_promotion_uniapp
Commits
b0939304
Commit
b0939304
authored
Jul 16, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
点击首页banner跳转链接
parent
d98137e4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
9 deletions
+45
-9
pages.json
pages.json
+9
-0
index.vue
pages/shop/index.vue
+12
-9
webview.vue
pages/webview/webview.vue
+24
-0
No files found.
pages.json
View file @
b0939304
...
...
@@ -35,6 +35,15 @@
"path"
:
"pages/topic/detail"
,
"style"
:
{}
},
{
"path"
:
"pages/webview/webview"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/myArticle/index"
,
"style"
:
{
...
...
pages/shop/index.vue
View file @
b0939304
...
...
@@ -9,14 +9,13 @@
<!--
</view>
-->
<!--
</u-col>
-->
<u-col>
<view
bindtap=
"navigateToPage"
>
<u-swiper
:list=
"topicList"
indicator
indicatorMode=
"line"
circular
@
click=
"navigateToPage"
></u-swiper>
</view>
</u-col>
</u-row>
<view
style=
"padding-bottom: 30rpx;"
>
...
...
@@ -99,6 +98,7 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue";
components
:
{
USwiper
,
UCol
},
data
()
{
return
{
linkUrl
:
''
,
unitId
:
''
,
pic1
,
pic2
,
...
...
@@ -106,6 +106,7 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue";
activeNav
:
0
,
newList
:
[],
hotList
:
[],
topicItemList
:
[],
topicList
:
[
// 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
// 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
...
...
@@ -144,13 +145,13 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue";
this
.
queryTopic
();
},
navigateToPage
(
e
)
{
// 获取点击的u-swiper组件的索引
const
index
=
e
.
currentTarget
.
dataset
.
index
;
// 根据索引或其他逻辑确定跳转的页面
const
link
=
this
.
topicList
[
index
].
url
;
// 执行页面跳转
wx
.
navigateTo
({
url
:
link
,
console
.
log
(
'1111'
,
e
)
this
.
linkUrl
=
this
.
topicItemList
[
e
].
linkUrl
this
.
$u
.
route
({
url
:
'/pages/webview/webview'
,
params
:
{
linkUrl
:
this
.
linkUrl
}
});
},
sectionChange
(
index
)
{
...
...
@@ -223,9 +224,11 @@ import USwiper from "../../uview-ui/components/u-swiper/u-swiper.vue";
// item.img = baseApi + '/file/getImgStream?idFile=' + item.article.img;
// }
if
(
list
.
records
&&
list
.
records
.
length
>
0
)
{
this
.
topicItemList
=
list
.
records
this
.
topicList
=
list
.
records
.
map
(
item
=>
item
.
url
)
}
else
{
this
.
topicList
=
[]
this
.
topicItemList
=
[]
}
})
},
...
...
pages/webview/webview.vue
0 → 100644
View file @
b0939304
<
template
>
<web-view
:src=
"webUrl"
></web-view>
</
template
>
<
script
>
export
default
{
name
:
"webview"
,
data
()
{
return
{
webUrl
:
''
};
},
onLoad
(
option
)
{
console
.
log
(
'11111'
,
option
)
this
.
webUrl
=
option
.
linkUrl
},
methods
:
{
}
}
</
script
>
<
style
scoped
>
</
style
>
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