mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-06 17:36:45 +08:00
轮播图跳转
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
<view class="index-banner">
|
<view class="index-banner">
|
||||||
<u-swiper
|
<u-swiper
|
||||||
:list="resonimg"
|
:list="resonimg"
|
||||||
|
keyName="image"
|
||||||
@change="change"
|
@change="change"
|
||||||
@click="click"
|
@click="click"
|
||||||
></u-swiper>
|
></u-swiper>
|
||||||
@@ -16,7 +17,7 @@
|
|||||||
<course-list :items="courseDataList"></course-list>
|
<course-list :items="courseDataList"></course-list>
|
||||||
</view>
|
</view>
|
||||||
<view style="margin:30upx 0 60upx 0">
|
<view style="margin:30upx 0 60upx 0">
|
||||||
<image style="width: 100%;height:220upx" :src="fileUrl+placeholderImg.image" mode=""></image>
|
<image @click="imgJup()" style="width: 100%;height:220upx" :src="fileUrl+placeholderImg.image" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="ranking-list">
|
<view class="ranking-list">
|
||||||
<view class="recommend-index-title">
|
<view class="recommend-index-title">
|
||||||
@@ -144,11 +145,18 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
imgJup() {
|
||||||
|
if(this.placeholderImg.JumpUrl){
|
||||||
|
window.open(this.placeholderImg.JumpUrl);
|
||||||
|
}
|
||||||
|
},
|
||||||
click(e) {
|
click(e) {
|
||||||
// console.log(e,'444')
|
let JumpUrl = this.resonimg[e].JumpUrl;
|
||||||
|
if(JumpUrl){
|
||||||
|
window.open(JumpUrl);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
change(e) {
|
change(e) {
|
||||||
// console.log(e,'333')
|
|
||||||
},
|
},
|
||||||
couresreso() {
|
couresreso() {
|
||||||
let key = 'mobileIndex1';
|
let key = 'mobileIndex1';
|
||||||
@@ -157,7 +165,12 @@
|
|||||||
if(res.result.content && res.result.content.length>10){
|
if(res.result.content && res.result.content.length>10){
|
||||||
let lmj = JSON.parse(res.result.content)
|
let lmj = JSON.parse(res.result.content)
|
||||||
lmj.forEach(item=>{
|
lmj.forEach(item=>{
|
||||||
this.resonimg.push(this.fileUrl+item.image);
|
this.resonimg.push(
|
||||||
|
{
|
||||||
|
image: this.fileUrl+item.image,
|
||||||
|
JumpUrl: item.JumpUrl,
|
||||||
|
}
|
||||||
|
);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user