123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <template>
- <view class="content">
- <swiper class="swiper"
- :autoplay="autoplay"
- :duration="duration"
- @change="swiperChange">
- <swiper-item>
- <view class="swiper-item">
- <view class="swiper-item-img"><image src="/static/img/splash1.png" mode="aspectFit"></image></view>
- </view>
- <view class="jump-over" @tap="launchFlag()">{{jumpover}}</view>
- </swiper-item>
- <swiper-item>
- <view class="swiper-item">
- <view class="swiper-item-img"><image src="/static/img/splash2.png" mode="aspectFit"></image></view>
- </view>
- <view class="jump-over" @tap="launchFlag()">{{jumpover}}</view>
- </swiper-item>
- <swiper-item>
- <view class="swiper-item">
- <view class="swiper-item-img"><image src="/static/img/splash3.png" mode="aspectFit"></image></view>
- </view>
- <view class="jump-over" @tap="launchFlag()">{{jumpover}}</view>
- </swiper-item>
- </swiper>
- <view class="dots">
- <view class='dot' :class="currentSwiper == '0' ? ' active' : ''"></view>
- <view class='dot' :class="currentSwiper== '1'? ' active' : ''"></view>
- <view class='dot' :class="currentSwiper=='2' ? ' active' : ''"></view>
- </view>
- <button @click='launchFlag' v-if='show' class='experience'>立即体验</button>
- <!-- <view class="uniapp-img"><image src="../../static/guide/uniapp4@2x.png" mode="aspectFit"></image></view> -->
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- background: ['color1', 'color2', 'color3'],
- autoplay: false,
- duration: 500,
- jumpover: '跳过',
- experience: '立即体验',
- show:false,
- indicatorColor:'#F2F2F2',
- currentSwiper:0,
- indicatorActivecolor:'#22C572'
- }
- },
- methods: {
- launchFlag(){
- /**
- * 向本地存储中设置launchFlag的值,即启动标识;
- */
- uni.setStorage({
- key: 'launchFlag',
- data: true,
- });
- uni.switchTab({
- url: '/pages/sale/information'
- });
-
- },
- swiperChange(e){
- this.currentSwiper=e.detail.current
- if(e.detail.current==2){
- this.show=true
- }else{
- this.show=false
- }
- }
- }
- }
- </script>
- <style>
- page,
- .content{
- width: 100%;
- height: 100%;
- background-size: 100% auto ;
- padding: 0;
- }
- .swiper{
- width: 100%;
- height: 100%;
- background: #FFFFFF;
- }
- .swiper-item {
- width: 100%;
- height: 100%;
- text-align: center;
- position: relative;
- display: flex;
- /* justify-content: center; */
- align-items:flex-end;
- flex-direction:column-reverse
- }
- .swiper-item-img{
- width: 100%;
- height: 100%;
- margin: 0 auto;
- }
- .swiper-item-img image{
- width: 75%;
- margin:0 auto;
- }
- .uniapp-img{
- height: 20%;
- background: #FFFFFF;
- display: flex;
- justify-content: center;
- align-items:center;
- overflow: hidden;
- }
- .uniapp-img image{
- width: 40%;
- }
-
- .jump-over,.experience{
- position: absolute;
- height: 60upx;
- line-height: 60upx;
- padding: 0 40upx;
- /* border-radius: 30upx; */
- font-size: 30upx;
- color: #AFB3BF;
- background:#F3F3F3;
- z-index: 999;
- }
- .jump-over{
- right: 45upx;
- padding: 0 28upx;
- top: 125upx;
- border-radius:4px;
- }
- .experience{
- right: 50%;
- margin-right: -105upx;
- bottom: 30px;
- color: #fff;
- height: 80upx;
- line-height: 80upx;
- border-radius:30px;
- background:linear-gradient(#3BD072,#1BC771);
- box-shadow: 2px 2px 6px #C5EFDA;
- }
- .dots {
- width: 170rpx;
- height: 20rpx;
- display: flex;
- flex-direction: row;
- position: absolute;
- left: 50%;
- transform: translateX(-49%);
- bottom: 80rpx;
- }
-
- /*未选中时的小圆点样式 */
-
- .dot {
- width: 15rpx;
- height: 15rpx;
- border-radius: 14rpx;
- margin: 0 10px;
- background-color: #F2F2F2;
- }
-
- /*选中以后的小圆点样式 */
-
- .active {
- width: 40rpx;
- height: 15rpx;
- background-color: #29CA78;
- }
- </style>
|