Browse Source

跳转

master
jiazhipeng 5 months ago
parent
commit
5e9f0051ef
  1. 2
      pages/index/index.vue
  2. 11
      pages/index/tiansheng.vue

2
pages/index/index.vue

@ -7,7 +7,7 @@
<view class="btn-box" v-if="number == 3">
<image src="/static/1/btn1.png" mode="" class="btn1"></image>
<image src="/static/1/btn2.png" mode="" class="btn2" @click="gotoPath('/pages/index/tiansheng')"></image>
<image src="/static/1/btn3.png" mode="" class="btn2" style="left: 449rpx;"></image>
<image src="/static/1/btn3.png" mode="" class="btn2" @click="gotoPath('/pages/index/dongLing')" style="left: 449rpx;"></image>
</view>
</view>
</template>

11
pages/index/tiansheng.vue

@ -1,10 +1,12 @@
<template>
<view class="bg">
<image class="back-icon" style="position: absolute;top: 20rpx;" src="/static/back.png" @click="goBack()"></image>
<image :src="`/static/2/${current + 1}s.png`" class="text-img"></image>
<swiper class="swiper-box" :circular="false" previous-margin="210rpx" next-margin="210rpx" :duration="800"
:current="current" circular="true" @change="swiperChange">
<swiper-item v-for="(item, index) in 3" :key="index" class="flex-center">
<swiper-item v-for="(item, index) in 3" :key="index" class="flex-center"
@click="goShanJuan(item,index)">
<view :class="['swiper-item', {'swiper-items': index != current}]">
<image :src="`/static/2/${item}.png`" mode="aspectFill"></image>
</view>
@ -32,6 +34,13 @@
this.current = current;
}
},
goShanJuan (item, index) {
if (index==0) {
uni.navigateTo({
url:"/pages/index/shanJuan"
})
}
}
}
}
</script>

Loading…
Cancel
Save