路径转网页

navigateToStore: function(e) {
console.log(e);
if (!app.dataMode.com.goCheckValidate()) {
return
}
var index_banner = e.currentTarget.dataset.index_banner
console.log (index_banner)
if (index_banner == 0) {
wx.navigateTo({
url: '/pages/task_reward/task_reward'
})
} else if (index_banner == 1) {

} else {
wx.navigateTo({
url: '/pages/mgs_newuser/mgs_newuser',
})
}
},
navigateToneirong: function (e) {
console.log(e);
if (!app.dataMode.com.goCheckValidate()) {
return
}
var index_nr = e.currentTarget.dataset.index_nr
console.log(index_nr)
if (index_nr == 0) {
 
} else if (index_nr == 1) {
wx.navigateTo({
url: '/pages/msg_jinji/msg_jinji'
})
} else if (index_nr == 2) {
wx.navigateTo({
url: '/pages/map_copy/map_copy'
})
} else if (index_nr == 3) {
wx.navigateTo({
url: '/pages/mgs_newuser/mgs_newuser',
})
} else if (index_nr == 4) {

} else if (index_nr == 5) {

}else {
wx.navigateTo({
url: '/pages/mgs_newuser/mgs_newuser',
})
}
},
 
 
<swiper autoplay="{{true}}" interval="{{2000}}" duration="{{1000}}" circular='{{true}}'>
<block wx:for="{{imgUrls}}" wx:key="index_banner" wx:for-item="item" wx:for-index="index_banner">
<swiper-item bindtap='navigateToStore' data-index_banner='{{index_banner}}'>
<image src="{{item}}" class="slide-image" mode="aspectFill" />
</swiper-item>
</block>
</swiper>
<!--导航内容-->
<view class='neirong'>
<scroll-view scroll-x="true">
<block wx:for="{{nr}}" wx:key="index_nr" wx:for-item="item" wx:for-index="index_nr">
<view class='nr_a' bindtap='navigateToneirong' data-index_nr='{{index_nr}}'>
<image mode="{{item.mode}}" src="{{item.src}}" mode="aspectFill"></image>
<text>{{item.text}}</text>
</view>
</block>
</scroll-view>
</view>
posted @ 2018-09-15 17:54  小小小小小前端  阅读(177)  评论(0编辑  收藏  举报