mirror of
https://gitee.com/TSpecific/tuniao-ui.git
synced 2026-06-08 12:33:17 +08:00
更新众多VIP页面模板
This commit is contained in:
@@ -0,0 +1,175 @@
|
||||
<template>
|
||||
<view class="template-swiper">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed alpha customBack>
|
||||
<view slot="back" class='tn-custom-nav-bar__back'
|
||||
@click="goBack">
|
||||
<text class='icon tn-icon-left'></text>
|
||||
<text class='icon tn-icon-home-capsule-fill'></text>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
|
||||
<swiper class="card-swiper time" :current="cardCur" :circular="true" :vertical="false" :autoplay="false" duration="500" interval="5000" @change="cardSwiper" :style="{height: currentImageHeight + 'rpx'}">
|
||||
<swiper-item v-for="(item,index) in swiperList" :key="index">
|
||||
<image :src="item.url" @load="onImageLoad(index, $event)" mode="widthFix"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<!-- 为了做内容过渡动画,图鸟加了骚操作在这里 -->
|
||||
<view class="time" style="position: absolute;top:0;width: 100%;" :style="{marginTop: currentImageHeight + 20 + 'rpx'}">
|
||||
<view class="indication">
|
||||
<block v-for="(item,index) in swiperList" :key="index">
|
||||
<view class="spot" :class="cardCur==index?'active':''"></view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="tn-padding tn-margin-top">
|
||||
图鸟swiper自适应高度+完美终稿 </br>
|
||||
高÷宽x750=换算后的高度(即宽限制为750,高为): </br>
|
||||
{{ currentImageHeight }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
|
||||
export default {
|
||||
name: 'banner',
|
||||
mixins: [template_page_mixin],
|
||||
data() {
|
||||
return {
|
||||
swiperList: [
|
||||
{ url: 'https://resource.tuniaokj.com/images/avatar/xiong/x1.jpg' },
|
||||
{ url: 'https://resource.tuniaokj.com/images/avatar/xiong/x2.jpg' },
|
||||
{ url: 'https://resource.tuniaokj.com/images/avatar/xiong/x3.jpg' },
|
||||
{ url: 'https://resource.tuniaokj.com/images/avatar/xiong/x7.jpg' },
|
||||
{ url: 'https://resource.tuniaokj.com/images/avatar/xiong/x13.jpg' },
|
||||
],
|
||||
imageHeights: [], // 存储每张图片的高度
|
||||
imageWidths: [], // 存储每张图片的宽度
|
||||
cardCur: 0, // 当前显示的图片索引
|
||||
currentImageHeight: 750 ,// 当前显示的图片高度
|
||||
currentImageWidth: 0 // 当前显示的图片宽度
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onImageLoad(index, e) {
|
||||
// 获取图片的实际高度并存储
|
||||
const imageHeight = e.detail.height;
|
||||
const imageWidth = e.detail.width;
|
||||
this.$set(this.imageHeights, index, imageHeight);
|
||||
this.$set(this.imageWidths, index, imageWidth);
|
||||
|
||||
// 如果当前加载的图片是当前显示的图片,则更新 currentImageHeight
|
||||
if (index === this.cardCur) {
|
||||
this.currentImageHeight = imageHeight * 750 / imageWidth;
|
||||
}
|
||||
},
|
||||
cardSwiper(e) {
|
||||
// 获取当前显示的图片索引
|
||||
const newIndex = e.detail.current;
|
||||
this.cardCur = newIndex;
|
||||
|
||||
// 更新当前显示的图片高度
|
||||
this.currentImageHeight = this.imageHeights[newIndex] * 750 / this.imageWidths[newIndex] || 0;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 初始化 imageHeights/imageWidths 数组
|
||||
this.swiperList.forEach((_, index) => {
|
||||
this.$set(this.imageHeights, index, 0);
|
||||
this.$set(this.imageWidths, index, 0);
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.template-swiper{
|
||||
}
|
||||
/* 胶囊*/
|
||||
.tn-custom-nav-bar__back {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
border-radius: 1000rpx;
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.5);
|
||||
color: #FFFFFF;
|
||||
font-size: 18px;
|
||||
|
||||
.icon {
|
||||
display: block;
|
||||
flex: 1;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: " ";
|
||||
width: 1rpx;
|
||||
height: 110%;
|
||||
position: absolute;
|
||||
top: 22.5%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
transform: scale(0.5);
|
||||
transform-origin: 0 0;
|
||||
pointer-events: none;
|
||||
box-sizing: border-box;
|
||||
opacity: 0.7;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.card-swiper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
image {
|
||||
display: block;
|
||||
width: 100vw;
|
||||
heigh: 750rpx;
|
||||
}
|
||||
|
||||
/* 轮播指示点 start*/
|
||||
.indication{
|
||||
z-index: 9999;
|
||||
width: 100%;
|
||||
height: 36rpx;
|
||||
position: absolute;
|
||||
display:flex;
|
||||
flex-direction:row;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
}
|
||||
|
||||
.spot{
|
||||
background-color: #000000;
|
||||
opacity: 0.3;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 0 8rpx !important;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.spot.active{
|
||||
opacity: 0.8;
|
||||
width: 20rpx;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.time{
|
||||
transition: all 0.6s ease-in-out;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,664 @@
|
||||
<template>
|
||||
<view class="template-bless tn-safe-area-inset-bottom">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed alpha customBack>
|
||||
<view slot="back" class='tn-custom-nav-bar__back'
|
||||
@click="goBack">
|
||||
<text class='icon tn-icon-left'></text>
|
||||
<text class='icon tn-icon-home-capsule-fill'></text>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
|
||||
<!-- 顶部背景图片-->
|
||||
<view class="login__bg login__bg--top">
|
||||
<image class="bg" src="https://resource.tuniaokj.com/images/bless/bless-top.jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="login__bg login__bg--top">
|
||||
<image class="rocket rocket-sussuspension" src="https://resource.tuniaokj.com/images/bless/bless-fish.png" mode="widthFix"></image>
|
||||
</view>
|
||||
|
||||
|
||||
<swiper class="card-swiper" :circular="true"
|
||||
:autoplay="true" duration="500" interval="18000" previous-margin="185rpx" next-margin="185rpx" @change="cardSwiper" style="padding-top: 15vh;">
|
||||
<swiper-item v-for="(item,index) in swiperList" :key="index" :class="cardCur==index?'cur':''">
|
||||
<!-- <view class="swiper-item image-banner">
|
||||
<image :src="item.url" mode="widthFix" v-if="item.type=='image'"></image>
|
||||
</view> -->
|
||||
<!-- <view class="swiper-item image-banner" :style="'background-image:url('+ item.url + ');width: 230rpx;height: 100%;background-size:100% 100%;'">
|
||||
</view> -->
|
||||
|
||||
<view class="tnphone-black-min swiper-item wow fadeInLeft2">
|
||||
<view class="skin wow fadeInRight2">
|
||||
<view class="screen wow fadeInUp2">
|
||||
<!-- <view class="head">
|
||||
<text>{{item.name}}</text>
|
||||
</view> -->
|
||||
<view class="peak wow">
|
||||
<view class="sound"></view>
|
||||
<view class="lens"></view>
|
||||
</view>
|
||||
<!-- <view class="area-l">
|
||||
<view class="">
|
||||
<text class="tn-icon-all"></text>
|
||||
<text class="tn-icon-wifi tn-padding-left-xs"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="area-r">
|
||||
<view class="">
|
||||
<text class="tn-icon-light"></text>
|
||||
<text class="tn-icon-time tn-padding-left-xs"></text>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <div class="talk"></div> -->
|
||||
|
||||
<view class="image-banner">
|
||||
<image :src="item.url" mode="aspectFill" v-if="item.type=='image'"></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="swiper-item-text tn-text-center">
|
||||
<view class="tn-text-xl tn-text-bold tn-padding-top-xs">{{item.name}}</view>
|
||||
</view>
|
||||
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="tn-text-center year-text">
|
||||
<view class="tn-text-xxl tn-text-bold">
|
||||
<text class="">虎年好,</text>
|
||||
图鸟小伙伴
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 底部背景图片-->
|
||||
<view class="login__bg login__bg--bottom">
|
||||
<image src="https://resource.tuniaokj.com/images/bless/bless-bottom.jpg" mode="widthFix"></image>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 底部tabbar start-->
|
||||
<view class="tabbar footerfixed">
|
||||
|
||||
|
||||
<view class="action" @click="navTuniaoUI">
|
||||
<view class="bar-icon">
|
||||
<!-- <view class="tn-icon-home-smile tn-color-gray--dark">
|
||||
</view> -->
|
||||
<image class="" src='https://resource.tuniaokj.com/images/bless/bless-home.png'></image>
|
||||
</view>
|
||||
<view class="tn-color-gray">首页</view>
|
||||
</view>
|
||||
<view class="action" @click="navTuniaoUI">
|
||||
<view class="bar-icon">
|
||||
<!-- <view class="tn-icon-discover tn-color-gray--dark">
|
||||
</view> -->
|
||||
<image class="" src='https://resource.tuniaokj.com/images/bless/bless-flower.png'></image>
|
||||
</view>
|
||||
<view class="tn-color-gray">发现</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="action bar-center">
|
||||
<view class="bar-circle tn-shadow-blur">
|
||||
<view class="tn-icon-camera-fill tn-color-white">
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-color-gray">发布</view>
|
||||
</view> -->
|
||||
|
||||
<view class="action bar-center" @click="navTuniaoHome">
|
||||
<view class="nav-index-button">
|
||||
<view class="nav-index-button__content">
|
||||
<view class="nav-index-button__content--icon tn-flex tn-flex-row-center tn-flex-col-center">
|
||||
<!-- <view class="tn-icon-logo-tuniao"></view> -->
|
||||
<view class="bar-circle">
|
||||
<image class="" src='https://resource.tuniaokj.com/images/bless/bless-tiger.png'></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="nav-index-button__meteor">
|
||||
<view class="nav-index-button__meteor__wrapper">
|
||||
<view v-for="(item,index) in 6" :key="index" class="nav-index-button__meteor__item" :style="{transform: `rotateX(${-60 + (30 * index)}deg) rotateZ(${-60 + (30 * index)}deg)`}">
|
||||
<view class="nav-index-button__meteor__item--pic"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="tn-color-gray">发布</view> -->
|
||||
</view>
|
||||
|
||||
<view class="action" @click="navTuniaoUI">
|
||||
<view class="bar-icon">
|
||||
<!-- <view class="tn-icon-image-text tn-color-gray--dark">
|
||||
</view> -->
|
||||
<image class="" src='https://resource.tuniaokj.com/images/bless/bless-china.png'></image>
|
||||
</view>
|
||||
<view class="tn-color-gray">祝福</view>
|
||||
</view>
|
||||
<view class="action" @click="navTuniaoUI">
|
||||
<view class="bar-icon">
|
||||
<!-- <view class="tn-icon-my tn-color-gray--dark">
|
||||
</view> -->
|
||||
<image class="" src='https://resource.tuniaokj.com/images/bless/bless-money.png'></image>
|
||||
</view>
|
||||
<view class="tn-color-gray">我的</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
|
||||
export default {
|
||||
name: 'TemplateBless',
|
||||
mixins: [template_page_mixin],
|
||||
data(){
|
||||
return {
|
||||
cardCur: 0,
|
||||
swiperList: [{
|
||||
id: 0,
|
||||
type: 'image',
|
||||
name: '新年快乐,恭喜发财',
|
||||
url: 'https://resource.tuniaokj.com/images/bless/bless-1.jpg',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d1.png'
|
||||
}, {
|
||||
id: 1,
|
||||
type: 'image',
|
||||
name: '年年有福,开门大红',
|
||||
url: 'https://resource.tuniaokj.com/images/bless/bless-2.jpg',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d2.png'
|
||||
}, {
|
||||
id: 2,
|
||||
type: 'image',
|
||||
name: '眼疾手快,票子多多',
|
||||
url: 'https://resource.tuniaokj.com/images/bless/bless-3.jpg',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d3.png'
|
||||
}, {
|
||||
id: 3,
|
||||
type: 'image',
|
||||
name: '如虎添亿,其乐融融',
|
||||
url: 'https://resource.tuniaokj.com/images/bless/bless-4.jpg',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d4.png'
|
||||
}],
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.$tn.mpShare.title = '????????您有一条新年祝福待签收'
|
||||
},
|
||||
methods: {
|
||||
// cardSwiper
|
||||
cardSwiper(e) {
|
||||
this.cardCur = e.detail.current
|
||||
},
|
||||
// 跳转到
|
||||
navTuniaoUI(e) {
|
||||
wx.vibrateShort();
|
||||
},
|
||||
// 跳转到
|
||||
navTuniaoHome(e) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/static/css/templatePage/custom_nav_bar.scss';
|
||||
.template-browser{
|
||||
margin-bottom: calc(110rpx + env(safe-area-inset-bottom) / 2);;
|
||||
}
|
||||
|
||||
/* 祝福 start*/
|
||||
.year-text{
|
||||
position: fixed;
|
||||
bottom: 15vh;
|
||||
margin: 0 auto;
|
||||
right:0rpx;
|
||||
left:0rpx;
|
||||
}
|
||||
|
||||
/* .tnphone-black-min 细边框*/
|
||||
.tnphone-black-min {width: 380rpx; height: 760rpx; border-radius: 40rpx; background: #C6D1D8; padding: 7rpx; display: table; color: #333;
|
||||
box-sizing: border-box; box-shadow: 0rpx 0rpx 0rpx 5rpx rgba(80,80,80,.8) inset; margin: 70rpx auto; cursor: default; position: relative}
|
||||
.tnphone-black-min .skin {width: 100%; height: 100%; border-radius: 40rpx; background: #222; padding: 10rpx; box-shadow: 0rpx 0rpx 0rpx 7rpx rgba(68,68,68,.3)}
|
||||
.tnphone-black-min .screen {width: 100%; height: 100%; border-radius: 30rpx; background: #fff; position: relative; overflow: hidden}
|
||||
.tnphone-black-min .head {width: 100%; height: 90rpx; text-align: center; position: absolute; padding: 45rpx 15rpx 10rpx 15rpx;}
|
||||
.tnphone-black-min .peak {left: 22%;width: 56%; height: 27rpx; margin: -2rpx auto 0rpx; border-radius: 0 0 20rpx 20rpx; background: #222; position: absolute}
|
||||
.tnphone-black-min .sound {width: 48rpx; height: 6rpx; border-radius: 15rpx; background: #555; position: absolute; left: 50%; top: 50%; margin-left: -24rpx; margin-top: -10rpx;
|
||||
box-shadow: 0rpx 4rpx 4rpx 0rpx #444 inset}
|
||||
.tnphone-black-min .lens {width: 6rpx; height: 6rpx; border-radius: 50%; background: #2c5487; position: absolute; left: 50%; top: 50%; margin-left: 34rpx; margin-top: -10rpx}
|
||||
.tnphone-black-min .talk {width: 50%; height: 6rpx; border-radius: 15rpx; background: rgba(0,0,0,.3); position: absolute; bottom: 8rpx; left: 50%; margin-left: -25%}
|
||||
.tnphone-black-min .area-l,.tnphone-black-min .area-r {width: 70rpx; height: 16rpx; position: absolute; top: 6rpx}
|
||||
.tnphone-black-min .area-l {left: 0; text-align: center; font-size: 12rpx; line-height: 22rpx; text-indent: 10rpx; font-weight: 600; padding-left: 20rpx;}
|
||||
.tnphone-black-min .area-r {right: 0; text-align: center; font-size: 12rpx; line-height: 22rpx; text-indent: 10rpx; font-weight: 600; padding-right: 20rpx;}
|
||||
.tnphone-black-min .fa-feed {float: left; font-size: 12rpx!important; transform:rotate(-45deg); margin-top: 4rpx; margin-right: 8rpx}
|
||||
.tnphone-black-min .fa-battery-full {float: left; font-size: 12rpx!important; margin-top: 6rpx}
|
||||
.tnphone-black-min .fa-chevron-left {float: left; margin-top: 4rpx}
|
||||
.tnphone-black-min .fa-cog {float: right; margin-top: 4rpx}
|
||||
.tnphone-black-min .btn01 {width: 3rpx; height: 28rpx; border-radius: 3rpx 0 0 3rpx; background: #222; position: absolute; top: 105rpx; left: -3rpx}
|
||||
.tnphone-black-min .btn02 {width: 3rpx; height: 54rpx; border-radius: 3rpx 0 0 3rpx; background: #222; position: absolute; top: 160rpx; left: -3rpx}
|
||||
.tnphone-black-min .btn03 {width: 3rpx; height: 54rpx; border-radius: 3rpx 0 0 3rpx; background: #222; position: absolute; top: 230rpx; left: -3rpx}
|
||||
.tnphone-black-min .btn04 {width: 3rpx; height: 86rpx; border-radius: 0 3rpx 3rpx 0; background: #222; position: absolute; top: 180rpx; right: -3rpx}
|
||||
|
||||
/* 轮播样机样式 start*/
|
||||
.card-swiper {
|
||||
height: 90vh !important;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item {
|
||||
width: 380rpx !important;
|
||||
// left: 185rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 0rpx 0rpx 90rpx 0rpx;
|
||||
overflow: initial;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item {
|
||||
display: block;
|
||||
transform: scale(0.7);
|
||||
transition: all 0.2s ease-in 0s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item {
|
||||
transform: none;
|
||||
transition: all 0.2s ease-in 0s;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item-text {
|
||||
margin-top: 8vh;
|
||||
width: 100%;
|
||||
display: block;
|
||||
transform: scale(0.7, 0.7);
|
||||
transition: all 0.4s ease 0s;
|
||||
overflow: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item-text {
|
||||
transform: scale(1);
|
||||
transition: all 0.4s ease 0s;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.image-banner{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.image-banner image{
|
||||
width: 100%;
|
||||
height: 730rpx;
|
||||
// border: 1rpx solid red;
|
||||
}
|
||||
|
||||
/* 轮播指示点 start*/
|
||||
.indication{
|
||||
z-index: 9999;
|
||||
width: 100%;
|
||||
height: 36rpx;
|
||||
position: absolute;
|
||||
display:flex;
|
||||
flex-direction:row;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
}
|
||||
|
||||
.spot{
|
||||
background-color: #000;
|
||||
opacity: 0;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 0 8rpx !important;
|
||||
top: -80rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.spot.active{
|
||||
opacity: 0;
|
||||
width: 30rpx;
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
/* 轮播堆叠差 start */
|
||||
// .card-swiper {
|
||||
// height: 500rpx !important;
|
||||
// }
|
||||
|
||||
// .card-swiper swiper-item {
|
||||
// width: 250rpx !important;
|
||||
// left: 250rpx;
|
||||
// box-sizing: border-box;
|
||||
// padding: 100rpx 0rpx 100rpx 0rpx;
|
||||
// overflow: initial;
|
||||
// }
|
||||
|
||||
// .card-swiper swiper-item .swiper-item {
|
||||
// width: 100%;
|
||||
// display: block;
|
||||
// height: 200rpx;
|
||||
// border-radius: 0rpx;
|
||||
// transform: translate(0rpx, 0rpx) scale(1.5);
|
||||
// transition: all 0.2s ease-in 0s;
|
||||
// overflow: hidden;
|
||||
// border: 5rpx solid red;
|
||||
// }
|
||||
|
||||
// .card-swiper swiper-item.cur .swiper-item {
|
||||
// transform: translate(0rpx, 0rpx) scale(2);
|
||||
// transition: all 0.2s ease-in 0s;
|
||||
// border: 5rpx solid pink;
|
||||
// }
|
||||
|
||||
// .image-banner{
|
||||
// display: flex;
|
||||
// align-items: center;
|
||||
// justify-content: center;
|
||||
// }
|
||||
// .image-banner image{
|
||||
// width: 100%;
|
||||
// }
|
||||
|
||||
|
||||
/* 轮播指示点 start*/
|
||||
// .indication{
|
||||
// z-index: 9999;
|
||||
// width: 100%;
|
||||
// height: 36rpx;
|
||||
// position: absolute;
|
||||
// display:flex;
|
||||
// flex-direction:row;
|
||||
// align-items:center;
|
||||
// justify-content:center;
|
||||
// }
|
||||
|
||||
// .spot{
|
||||
// background-color: #FFF;
|
||||
// opacity: 0.4;
|
||||
// width: 10rpx;
|
||||
// height: 10rpx;
|
||||
// border-radius: 20rpx;
|
||||
// margin: 0 8rpx !important;
|
||||
// left: -270rpx;
|
||||
// top: -180rpx;
|
||||
// position: relative;
|
||||
// }
|
||||
|
||||
// .spot.active{
|
||||
// opacity: 1;
|
||||
// width: 30rpx;
|
||||
// background-color: #FFF;
|
||||
// }
|
||||
|
||||
// .swiper-item1 {
|
||||
// z-index: -1;
|
||||
|
||||
// &--active {
|
||||
// z-index: 10;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
/* 悬浮 */
|
||||
.rocket-sussuspension{
|
||||
animation: tiger 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes tiger {
|
||||
0%, 100% {
|
||||
transform: translate(0 , 0);
|
||||
}
|
||||
50% {
|
||||
transform: translate(-0.8rem , 1rem);
|
||||
}
|
||||
}
|
||||
|
||||
.login {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
z-index: 1;
|
||||
|
||||
/* 背景图片 start */
|
||||
&__bg {
|
||||
z-index: -1;
|
||||
position: fixed;
|
||||
|
||||
&--top {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
|
||||
.bg {
|
||||
width: 750rpx;
|
||||
will-change: transform;
|
||||
}
|
||||
.rocket {
|
||||
margin: 50rpx 30%;
|
||||
width: 300rpx;
|
||||
will-change: transform;
|
||||
}
|
||||
}
|
||||
|
||||
&--bottom {
|
||||
bottom: -10rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
// height: 144px;
|
||||
// margin-bottom: env(safe-area-inset-bottom);
|
||||
|
||||
image {
|
||||
width: 750rpx;
|
||||
will-change: transform;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* 背景图片 end */
|
||||
|
||||
|
||||
|
||||
|
||||
/* 底部tabbar start*/
|
||||
.footerfixed{
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
z-index: 999;
|
||||
// background-color: #FFFFFF;
|
||||
// box-shadow: 0rpx 0rpx 30rpx 0rpx rgba(0, 0, 0, 0.07);
|
||||
}
|
||||
|
||||
.tabbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 110rpx;
|
||||
justify-content: space-between;
|
||||
padding: 0;
|
||||
height: calc(110rpx + env(safe-area-inset-bottom) / 2);
|
||||
padding-bottom: calc(env(safe-area-inset-bottom) / 2);
|
||||
}
|
||||
|
||||
.tabbar .action {
|
||||
font-size: 22rpx;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
display: block;
|
||||
height: auto;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
overflow: initial;
|
||||
}
|
||||
|
||||
.bar-center{
|
||||
animation: suspension 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes suspension {
|
||||
0%, 100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-0.8rem);
|
||||
}
|
||||
}
|
||||
|
||||
.tabbar .action .bar-icon {
|
||||
width: 100rpx;
|
||||
position: relative;
|
||||
display: block;
|
||||
height: auto;
|
||||
margin: 0 auto 10rpx;
|
||||
text-align: center;
|
||||
font-size: 42rpx;
|
||||
// line-height: 50rpx;
|
||||
}
|
||||
|
||||
.tabbar .action .bar-icon image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tabbar .action .bar-circle {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: 0rpx auto 0rpx;
|
||||
text-align: center;
|
||||
font-size: 52rpx;
|
||||
line-height: 90rpx;
|
||||
// background-color: #01BEFF;
|
||||
width: 100rpx !important;
|
||||
height: 100rpx !important;
|
||||
overflow: hidden;
|
||||
// border-radius: 50%;
|
||||
// box-shadow: 0px 10px 30px rgba(70,23,129, 0.12),
|
||||
// 0px -8px 40px rgba(255, 255, 255, 1),
|
||||
// inset 0px -10px 10px rgba(70,23,129, 0.05),
|
||||
// inset 0px 10px 20px rgba(255, 255, 255, 1);
|
||||
// box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(1, 190, 255, 0.5);
|
||||
}
|
||||
|
||||
.tabbar .action .bar-circle image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
display: inline-block;
|
||||
margin: 0rpx auto 0rpx;
|
||||
}
|
||||
|
||||
/* 流星+悬浮 */
|
||||
.nav-index-button {
|
||||
animation: suspension 3s ease-in-out infinite;
|
||||
z-index: 999999;
|
||||
|
||||
|
||||
&__content {
|
||||
position: absolute;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
&--icon {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
font-size: 60rpx;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 18rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
transform: scale(0.85);
|
||||
|
||||
&::after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-radius: inherit;
|
||||
opacity: 1;
|
||||
transform: scale(1, 1);
|
||||
background-size: 100% 100%;
|
||||
// background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg6.png);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__meteor {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
transform-style: preserve-3d;
|
||||
transform: translate(-50%, -50%) rotateY(75deg) rotateZ(10deg);
|
||||
|
||||
&__wrapper {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
transform-style: preserve-3d;
|
||||
animation: spin 20s linear infinite;
|
||||
}
|
||||
|
||||
&__item {
|
||||
position: absolute;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
border-radius: 1000rpx;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
||||
&--pic {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: url(https://resource.tuniaokj.com/images/cool_bg_image/arc2.png) no-repeat center center;
|
||||
background-size: 100% 100%;
|
||||
animation: arc 4s linear infinite;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@keyframes suspension {
|
||||
0%, 100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-0.6rem);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotateX(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotateX(-360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes arc {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<view class="template-color tn-safe-area-inset-bottom">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed alpha customBack>
|
||||
<view slot="back" class='tn-custom-nav-bar__back'
|
||||
@click="goBack">
|
||||
<text class='icon tn-icon-left'></text>
|
||||
<text class='icon tn-icon-home-capsule-fill'></text>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<!-- 图鸟_LEE,原创,勿喷,上线于2022年3月,开源于2023年9月,晚了1.5年才开源而已,此最新版本优化了界面 -->
|
||||
<view class="content" :style="{paddingTop: vuex_custom_bar_height + 30 + 'px'}">
|
||||
<view class="dialog">
|
||||
<view id="colorBg" class="colorBg" @touchstart="startTouch" @touchmove="moveIng"
|
||||
@touchend="endTouch">
|
||||
<view class="roundBuff" :catchtouchmove="true" @c.stop="()=>{}" :style="{transform: `rotate(${degrees}deg)`}"></view>
|
||||
<view class="colorPan">HSL:{{degrees.toFixed(0)}}</view>
|
||||
</view>
|
||||
<!-- 按钮 -->
|
||||
<view class="tn-flex tn-padding-top-xl">
|
||||
<view class="tn-flex-1 justify-content-item tn-margin-left tn-margin-right-xs tn-text-center tn-bg-white" style="border-radius: 100rpx;">
|
||||
<tn-button backgroundColor="#4B98FE " padding="39rpx 0" width="100%" :fontSize="28" :plain="true" fontColor="#4B98FE" shape="round">
|
||||
<text class="">取 消</text>
|
||||
</tn-button>
|
||||
</view>
|
||||
<view class="tn-flex-1 justify-content-item tn-margin-right tn-margin-left-xs tn-text-center">
|
||||
<tn-button backgroundColor="#4B98FE " padding="40rpx 0" width="100%" :fontSize="28" fontColor="#FFFFFF" shape="round">
|
||||
<text class="">确 认</text>
|
||||
</tn-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
|
||||
export default {
|
||||
name: 'TemplateColor',
|
||||
mixins: [template_page_mixin],
|
||||
data(){
|
||||
return {
|
||||
pointerShow: true,
|
||||
colorPanWidth: 20,
|
||||
colorPanRadius: 0,
|
||||
pointerBox: {},
|
||||
degrees: 0
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
uni.createSelectorQuery().select('#colorBg').boundingClientRect((rect) => {
|
||||
this.pointerBox = rect
|
||||
}).exec()
|
||||
this.colorPanRadius = res.screenWidth * 0.4
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
startTouch(e) {
|
||||
const {
|
||||
pageX,
|
||||
pageY
|
||||
} = e.touches[0]
|
||||
this.rotatePointer(pageX, pageY)
|
||||
},
|
||||
endTouch(e) {
|
||||
const {
|
||||
pageX,
|
||||
pageY
|
||||
} = e.changedTouches[0]
|
||||
this.rotatePointer(pageX, pageY)
|
||||
},
|
||||
moveIng(e) {
|
||||
const {
|
||||
pageX,
|
||||
pageY
|
||||
} = e.touches[0]
|
||||
this.rotatePointer(pageX, pageY)
|
||||
},
|
||||
rotatePointer(pageX = 0, pageY = 0) {
|
||||
const {
|
||||
pointerBox,
|
||||
colorPanWidth
|
||||
} = this
|
||||
const mouseX = pageX - colorPanWidth
|
||||
const mouseY = pageY - colorPanWidth
|
||||
var centerY = pointerBox.top + (pointerBox.height / 2) - 0,
|
||||
centerX = pointerBox.left + (pointerBox.height / 2) - 0,
|
||||
radians = Math.atan2(mouseX - centerX, mouseY - centerY)
|
||||
this.degrees = (radians * (180 / Math.PI) * -1) + 180;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/static/css/templatePage/custom_nav_bar.scss';
|
||||
.dialog {
|
||||
display: block;
|
||||
border-radius: 30rpx;
|
||||
// background-color: #303030;
|
||||
margin: 20rpx;
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.colorBg {
|
||||
width: 80vw;
|
||||
height: 80vw;
|
||||
margin: 5vw;
|
||||
background: conic-gradient(red,
|
||||
yellow,
|
||||
lime,
|
||||
aqua,
|
||||
blue,
|
||||
fuchsia,
|
||||
red);
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.roundBuff {
|
||||
width: 55vw;
|
||||
height: 55vw;
|
||||
-webkit-transform-origin: center 50%;
|
||||
transform-origin: center 50%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.roundBuff::before {
|
||||
content: "";
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
background: #FFFFFF;
|
||||
border: solid #FFFFFF;
|
||||
border-width: 10px 10px 0 0;
|
||||
transform: translate(-50%, -50%) rotate(-45deg);
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 2%;
|
||||
}
|
||||
|
||||
.colorPan {
|
||||
position: absolute;
|
||||
color: #080808;
|
||||
font-size: 42rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,180 @@
|
||||
<template>
|
||||
<view class="template-guide">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed alpha customBack>
|
||||
<view slot="back" class='tn-custom-nav-bar__back'
|
||||
@click="goBack">
|
||||
<text class='icon tn-icon-left'></text>
|
||||
<text class='icon tn-icon-home-capsule-fill'></text>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
<view class="top-backgroup">
|
||||
<image src='https://resource.tuniaokj.com/images/swiper/fullbg3.jpg' mode='heightFix' class='backgroud-image'></image>
|
||||
</view>
|
||||
<swiper class="card-swiper" :circular="true"
|
||||
:autoplay="true" duration="500" interval="5000" @change="cardSwiper">
|
||||
<swiper-item v-for="(item,index) in swiperList" :key="index" :class="cardCur==index?'cur':''">
|
||||
<view class="swiper-item image-banner">
|
||||
<image :src="item.url" mode="heightFix" v-if="item.type=='image'" ></image>
|
||||
</view>
|
||||
<view class="swiper-item-text tn-text-center">
|
||||
<view class="tn-text-xxl tn-text-bold">{{item.text}}</view>
|
||||
<view class="tn-text-xl tn-text-bold tn-padding-top-xs">{{item.name}}</view>
|
||||
</view>
|
||||
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="indication">
|
||||
<block v-for="(item,index) in swiperList" :key="index">
|
||||
<view class="spot" :class="cardCur==index?'active':''"></view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
|
||||
export default {
|
||||
name: 'TemplateGuide',
|
||||
mixins: [template_page_mixin],
|
||||
data(){
|
||||
return {
|
||||
cardCur: 0,
|
||||
swiperList: [{
|
||||
id: 0,
|
||||
type: 'image',
|
||||
name: '总有你想不到的创意',
|
||||
text: '海量分享',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/c4d1.png',
|
||||
}, {
|
||||
id: 1,
|
||||
type: 'image',
|
||||
name: '寻找一起成长的小伙伴',
|
||||
text: '愉快玩耍',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/c4d2.png',
|
||||
}, {
|
||||
id: 2,
|
||||
type: 'image',
|
||||
name: '更多彩蛋等你探索',
|
||||
text: '酷炫多彩',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/c4d3.png',
|
||||
}, {
|
||||
id: 3,
|
||||
type: 'image',
|
||||
name: '商业合作请联系作者',
|
||||
text: '免费开源',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/c4d4.png',
|
||||
}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// cardSwiper
|
||||
cardSwiper(e) {
|
||||
this.cardCur = e.detail.current
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/static/css/templatePage/custom_nav_bar.scss';
|
||||
/* 顶部背景图 start */
|
||||
.top-backgroup {
|
||||
position: fixed;
|
||||
height: 100vh;
|
||||
z-index: -1;
|
||||
|
||||
.backgroud-image {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
// z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
.card-swiper {
|
||||
height: 100vh !important;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item {
|
||||
width: 750rpx !important;
|
||||
left: 0rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: initial;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item {
|
||||
margin-top: 20vh;
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 100vh;
|
||||
border-radius: 0rpx;
|
||||
transform: translate(180rpx, 0rpx) scale(0.8);
|
||||
transition: all 0.2s ease-in 0s;
|
||||
overflow: hidden;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item {
|
||||
transform: translate(180rpx, 0rpx) scale(1, 1);
|
||||
transition: all 0.2s ease-in 0s;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item-text {
|
||||
margin-top: -50vh;
|
||||
width: 100%;
|
||||
// height: 100%;
|
||||
display: block;
|
||||
border-radius: 10rpx;
|
||||
transform: scale(0.7, 0.7);
|
||||
transition: all 0.4s ease 0s;
|
||||
overflow: hidden;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item-text {
|
||||
padding-left: 30rpx;
|
||||
transform: scale(1);
|
||||
transition: all 0.4s ease 0s;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.image-banner{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.image-banner image{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 轮播指示点 start*/
|
||||
.indication{
|
||||
z-index: 9999;
|
||||
width: 100%;
|
||||
height: 36rpx;
|
||||
position: fixed;
|
||||
display:flex;
|
||||
flex-direction:row;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
}
|
||||
|
||||
.spot{
|
||||
background-color: #E6E6E6;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 0 8rpx !important;
|
||||
left: 0rpx;
|
||||
top: -180rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.spot.active{
|
||||
width: 40rpx;
|
||||
background-color: #FFA726;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,878 @@
|
||||
<template>
|
||||
<view class="template-home">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed alpha customBack>
|
||||
<view slot="back" class='tn-custom-nav-bar__back'
|
||||
@click="goBack">
|
||||
<text class='icon tn-icon-left'></text>
|
||||
<text class='icon tn-icon-home-capsule-fill'></text>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
|
||||
<view class="tn-flex tn-flex-row-center dd-camera" @click="open">
|
||||
<camera device-position="front" flash="off" @error="error" style="width: 330rpx; height: 440rpx;border-radius: 1000px;overflow: hidden;background-color: #FFFFFF00;border: 20rpx solid #FFFFFF1A;">
|
||||
</camera>
|
||||
</view>
|
||||
|
||||
<!-- 套娃式轮播 -->
|
||||
<swiper class="card-swiper" :current="cardCur" :circular="false" :vertical="true" :autoplay="false" duration="500" interval="5000"
|
||||
@change="cardSwiper">
|
||||
|
||||
<!-- 纵向滚动的轮播-单色补光灯 -->
|
||||
<swiper-item>
|
||||
<view class="" style="height: 100vh;width: 100vw;">
|
||||
<!-- 横向滚动的轮播-套娃 -->
|
||||
<swiper class="img-swiper" :current="imgCur" :circular="true" :autoplay="false" duration="500" interval="12000" @change="imgSwiper">
|
||||
<swiper-item v-for="(item,index) in swiperList2" :key="index" :class="imgCur==index?'cur':''">
|
||||
<view class="swiper-item" :style="'background-color: '+ item.color +''">
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="" style="position: absolute;top: 380rpx;width:100vw;z-index: 9999 !important;opacity: 0.3;">
|
||||
<view class="tn-flex tn-flex-row-between tn-color-white tn-text-xl">
|
||||
<view class="tn-icon-left-double" @click="prevSlide" style="width: 120rpx;height: 60rpx;line-height: 60rpx;"></view>
|
||||
<view class="tn-icon-right-double" @click="nextSlide" style="width: 120rpx;height: 60rpx;line-height: 60rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
<!-- 纵向滚动的轮播-渐变补光灯 -->
|
||||
<swiper-item>
|
||||
<view class="" style="height: 100vh;width: 100vw;">
|
||||
<!-- 横向滚动的轮播-套娃 -->
|
||||
<swiper class="img-swiper" :current="linearCur" :circular="true" :autoplay="false" duration="500" interval="12000" @change="linearSwiper">
|
||||
<swiper-item v-for="(item,index) in swiperList3" :key="index" :class="linearCur==index?'cur':''">
|
||||
<view class="swiper-item" :style="'background:linear-gradient( 0deg,' + item.color + ',' + item.color2 + ')'">
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<view class="" style="position: absolute;top: 380rpx;width:100vw;z-index: 9999 !important;opacity: 0.3;">
|
||||
<view class="tn-flex tn-flex-row-between tn-color-white tn-text-xl">
|
||||
<view class="tn-icon-left-double" @click="prevSlideLinear" style="width: 120rpx;height: 60rpx;line-height: 60rpx;"></view>
|
||||
<view class="tn-icon-right-double" @click="nextSlideLinear" style="width: 120rpx;height: 60rpx;line-height: 60rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
<!-- 纵向滚动的轮播-随机单色补光灯 -->
|
||||
<swiper-item>
|
||||
<view class="swiper-item random-color">
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
<!-- 纵向滚动的轮播-渐变补光灯 -->
|
||||
<swiper-item>
|
||||
<view class="swiper-item gradient-color">
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
<!-- 纵向滚动的轮播-循环输出 -->
|
||||
<!-- <swiper-item v-for="(item,index) in swiperList" :key="index" :class="cardCur==index?'cur':''">
|
||||
<view class="swiper-item gradient-color">
|
||||
</view>
|
||||
|
||||
<view class="swiper-item-text">
|
||||
<view class="tn-color-white tn-text-xxl tn-text-bold tn-text-center">
|
||||
<text class="tn-padding-right-xs" :class="['tn-icon-' + item.icon]"></text>
|
||||
<text class="">{{item.user}}</text>
|
||||
</view>
|
||||
<view class="tn-color-white tn-padding-top-xs tn-text-df clamp-text-2 tn-text-center tn-margin-top-sm"
|
||||
style="opacity: 0.8;">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item> -->
|
||||
|
||||
|
||||
|
||||
</swiper>
|
||||
|
||||
<!-- 功能按钮 -->
|
||||
<view class="" style="position: fixed;bottom: 0;z-index: 999 !important;width: 100vw;">
|
||||
<view class="tn-flex tn-flex-row-around tn-flex-col-center">
|
||||
|
||||
<!-- 权限-->
|
||||
<!-- <view class="tn-flex-1 tn-padding-sm tn-margin-xs tn-radius" @click="">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center">
|
||||
<view class="tn-icon-camera-fill">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 最新图片,这里可以加一个预览最新图片-->
|
||||
<view class="tn-flex-1 tn-padding-sm tn-margin-xs tn-radius" @click="previewNewImage">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="light-pic" :style="'background-image:url(' + src + ')'">
|
||||
<view class="light-image">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="" v-if="showContentTips===true" style="border-radius: 1000rpx;padding: 6rpx;border: 6rpx solid #FFFFFF00;" @click="tn('/minePages/help')">
|
||||
<view class="" style="width: 120rpx;height: 120rpx;border-radius: 1000rpx;">
|
||||
<view class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center" style="margin: 10rpx">
|
||||
<view class="tn-icon-help-fill">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" v-else style="border-radius: 1000rpx;padding: 6rpx;border: 6rpx solid #FFFFFF40;" @click="takePhoto">
|
||||
<view class="tn-bg-white" style="width: 120rpx;height: 120rpx;border-radius: 1000rpx;">
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="" style="border-radius: 1000rpx;padding: 6rpx;border: 6rpx solid #FFFFFF40;" @click="takePhoto">
|
||||
<view class="tn-bg-white" style="width: 120rpx;height: 120rpx;border-radius: 1000rpx;">
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tn-flex-1 tn-padding-sm tn-margin-xs tn-radius" @click="tipsClick">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="icon1__item--icon tn-flex tn-flex-row-center tn-flex-col-center">
|
||||
<view class="tn-icon-menu-circle-fill time" :class="[showContentTips ? 'dd-rotate' : '']">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="tn-tabbar-height"></view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 弹窗内容 -->
|
||||
<view class="dd-glass" style="position: absolute;bottom: 0;border-radius: 40rpx 40rpx 0 0;">
|
||||
<!-- :style="{'height': showContentTips ? `calc( 0 - 116px - ${vuex_custom_bar_height}px)`: `calc( 100vh - 340px - ${vuex_custom_bar_height}px)`}" -->
|
||||
<view class="time" :class="[showContentTips ? 'box-cur' : 'box']">
|
||||
<view class="" style="position: absolute;top: -40rpx;width: 100vw;">
|
||||
<view class="tn-flex tn-flex-row-center" @click="tipsClick" style="background-color: #FF565600;">
|
||||
<view class="tn-icon-down tn-color-white" style="padding-top: 60rpx;">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tn-flex" style="padding-top: 40rpx;">
|
||||
<block v-for="(item,index) in swiperList" :key="index">
|
||||
<view class="tn-text-center tn-margin tn-padding-sm"
|
||||
:class="cardCur==index?'active-bg':''" @tap.stop="handleSwiperClick(index)">
|
||||
<view class="tn-text-xxl tn-color-white" :class="'tn-icon-'+ item.icon + ';' "></view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 套娃式轮播-菜单 -->
|
||||
<swiper class="" :current="cardCur" :circular="false" :vertical="false" :autoplay="false" duration="500" interval="5000"
|
||||
@change="cardSwiper" style="height: 320rpx;width: 750rpx;">
|
||||
|
||||
<swiper-item>
|
||||
<view class="tn-flex tn-flex-wrap">
|
||||
<block v-for="(item,index) in swiperList2" :key="index">
|
||||
<view class="tn-text-center tn-padding" @tap.stop="handleSwiperClick2(index)">
|
||||
<view :class="imgCur==index?'active':''" :style="'background-color: '+ item.color +''" style="width: 90rpx;height: 56rpx;border-radius: 10rpx;"></view>
|
||||
<view class="tn-text-center tn-text-sm tn-padding-top-xs tn-color-white">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
<swiper-item>
|
||||
<view class="tn-flex tn-flex-wrap">
|
||||
<block v-for="(item,index) in swiperList3" :key="index">
|
||||
<view class="tn-text-center tn-padding" @tap.stop="handleSwiperClick3(index)">
|
||||
<view :class="linearCur==index?'active':''" :style="'background:linear-gradient( 0deg,' + item.color + ',' + item.color2 + ')'" style="width: 90rpx;height: 56rpx;border-radius: 10rpx;"></view>
|
||||
<view class="tn-text-center tn-text-sm tn-padding-top-xs tn-color-white">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</block>
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
<swiper-item>
|
||||
<view class="tn-color-white tn-padding tn-text-center tn-margin-top">
|
||||
随机单色补光灯
|
||||
</view>
|
||||
<view class="tn-color-white tn-text-center">
|
||||
正在随机变化
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<view class="tn-color-white tn-padding tn-text-center tn-margin-top">
|
||||
随机渐变补光灯
|
||||
</view>
|
||||
<view class="tn-color-white tn-text-center">
|
||||
正在随机变化
|
||||
</view>
|
||||
</swiper-item>
|
||||
|
||||
</swiper>
|
||||
|
||||
<!-- 安全 -->
|
||||
<view class="tn-tabbar-bottom"></view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 温馨提醒,这个需要放最外层,也就是放这里-->
|
||||
<tn-toast ref="toast"></tn-toast>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
|
||||
export default {
|
||||
name: 'Light',
|
||||
mixins: [template_page_mixin],
|
||||
data() {
|
||||
return {
|
||||
src:"https://resource.tuniaokj.com/images/flower/guye1.jpg",
|
||||
|
||||
// 显示组件相关提示信息
|
||||
showContentTips: false,
|
||||
|
||||
cardCur: 0,
|
||||
swiperList: [{
|
||||
id: 0,
|
||||
type: 'image',
|
||||
icon: 'con-pisces',
|
||||
}, {
|
||||
id: 1,
|
||||
type: 'image',
|
||||
icon: 'con-cancer',
|
||||
}, {
|
||||
id: 2,
|
||||
type: 'image',
|
||||
icon: 'con-leo',
|
||||
}, {
|
||||
id: 3,
|
||||
type: 'image',
|
||||
icon: 'con-gemini',
|
||||
}],
|
||||
|
||||
|
||||
imgCur: 0,
|
||||
swiperList2: [{
|
||||
id: 0,
|
||||
type: 'image',
|
||||
name: "罗兰紫",
|
||||
color: '#9736ff',
|
||||
}, {
|
||||
id: 1,
|
||||
type: 'image',
|
||||
name: "高冷蓝",
|
||||
color: '#b3f0f9',
|
||||
}, {
|
||||
id: 2,
|
||||
type: 'image',
|
||||
name: "可爱粉",
|
||||
color: '#fdb4bf',
|
||||
}, {
|
||||
id: 3,
|
||||
type: 'image',
|
||||
name: "茉莉黄",
|
||||
color: '#fff364',
|
||||
}, {
|
||||
id: 4,
|
||||
type: 'image',
|
||||
name: "清新蓝",
|
||||
color: '#598eff',
|
||||
}, {
|
||||
id: 5,
|
||||
type: 'image',
|
||||
name: "氛围紫",
|
||||
color: '#701bf9',
|
||||
}, {
|
||||
id: 6,
|
||||
type: 'image',
|
||||
name: "热情红",
|
||||
color: '#ff6e3a',
|
||||
}, {
|
||||
id: 7,
|
||||
type: 'image',
|
||||
name: "庄严蓝",
|
||||
color: '#785aff',
|
||||
}, {
|
||||
id: 8,
|
||||
type: 'image',
|
||||
name: "日照黄",
|
||||
color: '#FFAC00',
|
||||
}, {
|
||||
id: 9,
|
||||
type: 'image',
|
||||
name: "月影白",
|
||||
color: '#ecf0ef',
|
||||
}],
|
||||
|
||||
linearCur: 0,
|
||||
swiperList3: [{
|
||||
id: 0,
|
||||
type: 'image',
|
||||
name: "渐变1",
|
||||
color: '#7300ff',
|
||||
color2: '#ff00fb',
|
||||
}, {
|
||||
id: 1,
|
||||
type: 'image',
|
||||
name: "渐变2",
|
||||
color: '#0037ff',
|
||||
color2: '#fe00a5',
|
||||
}, {
|
||||
id: 2,
|
||||
type: 'image',
|
||||
name: "渐变3",
|
||||
color: '#ff0004',
|
||||
color2: '#9500ff',
|
||||
}, {
|
||||
id: 3,
|
||||
type: 'image',
|
||||
name: "渐变4",
|
||||
color: '#00fef6',
|
||||
color2: '#ff0073',
|
||||
}, {
|
||||
id: 4,
|
||||
type: 'image',
|
||||
name: "渐变5",
|
||||
color: '#1500ff',
|
||||
color2: '#ff6a00',
|
||||
}, {
|
||||
id: 5,
|
||||
type: 'image',
|
||||
name: "渐变6",
|
||||
color: '#fe00dc',
|
||||
color2: '#00fbff',
|
||||
}, {
|
||||
id: 6,
|
||||
type: 'image',
|
||||
name: "渐变7",
|
||||
color: '#fb9b00',
|
||||
color2: '#ff0004',
|
||||
}, {
|
||||
id: 7,
|
||||
type: 'image',
|
||||
name: "渐变8",
|
||||
color: '#007bff',
|
||||
color2: '#00e5fe',
|
||||
}, {
|
||||
id: 8,
|
||||
type: 'image',
|
||||
name: "渐变9",
|
||||
color: '#00b3ff',
|
||||
color2: '#ff00c4',
|
||||
}, {
|
||||
id: 9,
|
||||
type: 'image',
|
||||
name: "渐变10",
|
||||
color: '#f00000',
|
||||
color2: '#ffcc00',
|
||||
}],
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 内页用法,亮度最大
|
||||
onLoad() {
|
||||
uni.setScreenBrightness({
|
||||
value: 1,
|
||||
success: function () {
|
||||
console.log('success');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 短震动跳转
|
||||
tn(e) {
|
||||
wx.vibrateShort();
|
||||
uni.navigateTo({
|
||||
url: e,
|
||||
});
|
||||
},
|
||||
|
||||
// 拍摄并预览最新图片
|
||||
takePhoto() {
|
||||
wx.vibrateShort();
|
||||
const ctx = uni.createCameraContext();
|
||||
ctx.takePhoto({
|
||||
quality: 'high',
|
||||
success: (res) => {
|
||||
|
||||
this.src = res.tempImagePath
|
||||
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempImagePath,
|
||||
success() {
|
||||
uni.showToast({
|
||||
position: "center",
|
||||
icon: "none",
|
||||
title: "图片保存成功吖。不会泄露你的任何隐私嗷嗷"
|
||||
})
|
||||
},
|
||||
fail(e) {
|
||||
uni.showModal({
|
||||
content: "嘤嘤嘤,保存相册失败。不会泄露你的任何隐私",
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// 拍摄并预览最新图片
|
||||
previewNewImage() {
|
||||
wx.vibrateShort();
|
||||
const ctx = uni.createCameraContext();
|
||||
ctx.takePhoto({
|
||||
quality: 'high',
|
||||
success: (res) => {
|
||||
|
||||
this.src = res.tempImagePath
|
||||
|
||||
uni.previewImage({
|
||||
urls: [res.tempImagePath]
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
error(e) {
|
||||
console.log(e.detail);
|
||||
},
|
||||
|
||||
|
||||
// cardSwiper
|
||||
cardSwiper(e) {
|
||||
this.cardCur = e.detail.current
|
||||
},
|
||||
// cardSwiper点击事件
|
||||
handleSwiperClick(index) {
|
||||
this.cardCur = index
|
||||
},
|
||||
|
||||
|
||||
// imgSwiper
|
||||
imgSwiper(e) {
|
||||
this.imgCur = e.detail.current
|
||||
},
|
||||
// imgSwiper点击事件
|
||||
handleSwiperClick2(index) {
|
||||
this.imgCur = index
|
||||
},
|
||||
|
||||
// linearSwiper
|
||||
linearSwiper(e) {
|
||||
this.linearCur = e.detail.current
|
||||
},
|
||||
// linearSwiper点击事件
|
||||
handleSwiperClick3(index) {
|
||||
this.linearCur = index
|
||||
},
|
||||
|
||||
prevSlide() {
|
||||
// 点击按钮切换到上一个
|
||||
this.imgCur = (this.imgCur - 1 + 10) % 10; // 有10个
|
||||
},
|
||||
nextSlide() {
|
||||
// 点击按钮切换到下一个
|
||||
this.imgCur = (this.imgCur + 1) % 10; // 有10个
|
||||
},
|
||||
|
||||
prevSlideLinear() {
|
||||
// 点击按钮切换到上一个
|
||||
this.linearCur = (this.linearCur - 1 + 10) % 10; // 有10个
|
||||
},
|
||||
nextSlideLinear() {
|
||||
// 点击按钮切换到下一个
|
||||
this.linearCur = (this.linearCur + 1) % 10; // 有10个
|
||||
},
|
||||
|
||||
|
||||
// 提示
|
||||
open() {
|
||||
wx.vibrateShort();
|
||||
this.$refs.toast.show({
|
||||
title: '',
|
||||
content: '图鸟补光灯为纯前端模板,没有后台功能,不会泄露你的任何隐私',
|
||||
icon: '',
|
||||
image: '',
|
||||
duration: 1200
|
||||
})
|
||||
},
|
||||
|
||||
// 点击内容提示信息
|
||||
tipsClick() {
|
||||
wx.vibrateShort();
|
||||
this.showContentTips = !this.showContentTips
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.template-home {
|
||||
max-height: 100vh;
|
||||
}
|
||||
|
||||
/* 胶囊*/
|
||||
.tn-custom-nav-bar__back {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
border-radius: 1000rpx;
|
||||
border: 1rpx solid rgba(255, 255, 255, 0.5);
|
||||
color: #FFFFFF;
|
||||
font-size: 18px;
|
||||
|
||||
.icon {
|
||||
display: block;
|
||||
flex: 1;
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&:before {
|
||||
content: " ";
|
||||
width: 1rpx;
|
||||
height: 110%;
|
||||
position: absolute;
|
||||
top: 22.5%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
transform: scale(0.5);
|
||||
transform-origin: 0 0;
|
||||
pointer-events: none;
|
||||
box-sizing: border-box;
|
||||
opacity: 0.7;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
// css不写多一些,页面的玩法就很难炫起来,所以别吐槽css多了,下方分类的很清晰了的,且尽量不用那种看不懂的scss写法了的
|
||||
|
||||
.dd-camera{
|
||||
position: fixed;
|
||||
top: 160rpx;
|
||||
left: calc(50vw - 175rpx);
|
||||
z-index: 99999 !important;
|
||||
}
|
||||
|
||||
.dd-rotate{
|
||||
-webkit-transform: rotate(135deg);
|
||||
-ms-transform: rotate(135deg);
|
||||
transform: rotate(135deg);
|
||||
}
|
||||
|
||||
.time{
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
/* 全屏轮播 start*/
|
||||
.card-swiper {
|
||||
height: 100vh !important;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item {
|
||||
width: 750rpx !important;
|
||||
left: 0rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: initial;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item {
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 100vh;
|
||||
border-radius: 0rpx;
|
||||
transform: scale(1);
|
||||
transition: all 0.2s ease-in 0s;
|
||||
will-change: transform;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item {
|
||||
transform: none;
|
||||
transition: all 0.2s ease-in 0s;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item-text {
|
||||
margin-top: -68vh;
|
||||
// margin-top: calc(-380rpx + env(safe-area-inset-bottom) / 2);
|
||||
// margin-top: calc(-380rpx + constant(safe-area-inset-bottom));
|
||||
background: none;
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 80vh;
|
||||
// border-radius: 10rpx;
|
||||
transform: translate(0rpx, 0rpx) scale(1);
|
||||
transition: all 0.6s ease 0s;
|
||||
will-change: transform;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item-text {
|
||||
background: linear-gradient(0deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0));
|
||||
margin-top: -68vh;
|
||||
// margin-top: calc(-380rpx - env(safe-area-inset-bottom) / 2);
|
||||
// margin-top: calc(-380rpx - constant(safe-area-inset-bottom));
|
||||
width: 100%;
|
||||
height: 80vh;
|
||||
padding: 30rpx 10rpx 180rpx 30rpx;
|
||||
transform: translate(0rpx, 0rpx) scale(1);
|
||||
transition: all 0.6s ease 0s;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.active {
|
||||
border: 2rpx solid #FFFFFF;
|
||||
}
|
||||
|
||||
.active-bg {
|
||||
background-color: #FFFFFF33;
|
||||
border-radius: 100rpx;
|
||||
}
|
||||
|
||||
/* 轮播图片入口 start*/
|
||||
.img-swiper {
|
||||
height: 100vh !important;
|
||||
}
|
||||
|
||||
.img-swiper swiper-item {
|
||||
width: 750rpx !important;
|
||||
left: 0rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: initial;
|
||||
}
|
||||
|
||||
.img-swiper swiper-item .swiper-item {
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 100vh;
|
||||
border-radius: 0rpx;
|
||||
transform: scale(0.9);
|
||||
transition: all 0.2s ease-in 0s;
|
||||
will-change: transform;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.img-swiper swiper-item.cur .swiper-item {
|
||||
transform: scale(1);
|
||||
transition: all 0.2s ease-in 0s;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.random-color {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
color: #fff;
|
||||
overflow: hidden;
|
||||
animation: color-loop 18s infinite;
|
||||
}
|
||||
|
||||
@keyframes color-loop {
|
||||
0% {
|
||||
background: #ff00a6;
|
||||
}
|
||||
|
||||
20% {
|
||||
background: #aa00ff;
|
||||
}
|
||||
|
||||
40% {
|
||||
background: #0099ff;
|
||||
}
|
||||
|
||||
60% {
|
||||
background: #00ffe2;
|
||||
}
|
||||
|
||||
80% {
|
||||
background: #f1b500;
|
||||
}
|
||||
|
||||
100% {
|
||||
background: #f10000;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.gradient-color {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
// background: linear-gradient(-120deg, #F15BB5, #9A5CE5, #01BEFF, #00F5D4);
|
||||
// background: linear-gradient(-120deg, #9A5CE5, #01BEFF, #00F5D4, #43e97b);
|
||||
// background: linear-gradient(-120deg,#c471f5, #ec008c, #ff4e50,#f9d423);
|
||||
background: linear-gradient(-120deg, #0976ea, #c471f5, #f956b6, #ea7e0a, #c471f5, #ec008c, #ff4e50);
|
||||
background-size: 500% 500%;
|
||||
animation: gradientBG 15s ease infinite;
|
||||
}
|
||||
|
||||
@keyframes gradientBG {
|
||||
0% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
|
||||
50% {
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 0% 50%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 图标容器1 start */
|
||||
.icon1 {
|
||||
&__item {
|
||||
width: 30%;
|
||||
border-radius: 10rpx;
|
||||
padding: 30rpx;
|
||||
margin: 20rpx 10rpx;
|
||||
transform: scale(1);
|
||||
transition: transform 0.3s linear;
|
||||
transform-origin: center center;
|
||||
|
||||
&--icon {
|
||||
background-color: #FFFFFF33;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
font-size: 50rpx;
|
||||
color: #FFFFFF;
|
||||
border-radius: 1000rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
&::after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-radius: inherit;
|
||||
opacity: 1;
|
||||
transform: scale(1, 1);
|
||||
background-size: 100% 100%;
|
||||
// background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg5.png);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 补光照片 start */
|
||||
.light-image {
|
||||
border-radius: 1000rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.light-pic {
|
||||
background-color: #FFFFFF33;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
// background-attachment:fixed;
|
||||
background-position: center;
|
||||
// border: 1rpx solid rgba(255,255,255,0.05);
|
||||
// box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.15);
|
||||
border-radius: 1000rpx;
|
||||
overflow: hidden;
|
||||
// background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.time{
|
||||
transition: all 0.3s ease-in-out;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.box-cur {
|
||||
height: 50vh;
|
||||
}
|
||||
|
||||
.box {
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* 毛玻璃*/
|
||||
.dd-glass {
|
||||
width: 100%;
|
||||
backdrop-filter: blur(8rpx);
|
||||
-webkit-backdrop-filter: blur(8rpx);
|
||||
background-color: #000000CC;
|
||||
// background: linear-gradient(0deg, #000000CC, #0000005C);
|
||||
}
|
||||
|
||||
|
||||
/* 文字截取*/
|
||||
.clamp-text-1 {
|
||||
-webkit-line-clamp: 1;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.clamp-text-2 {
|
||||
-webkit-line-clamp: 2;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 底部悬浮按钮 start*/
|
||||
.tn-tabbar-height {
|
||||
min-height: 60rpx;
|
||||
height: calc(80rpx + env(safe-area-inset-bottom) / 2);
|
||||
height: calc(80rpx + constant(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
/* 安全 start*/
|
||||
.tn-tabbar-bottom {
|
||||
min-height: 100rpx;
|
||||
height: calc(120rpx + env(safe-area-inset-bottom));
|
||||
height: calc(120rpx + constant(safe-area-inset-bottom) * 2);
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,424 @@
|
||||
<template>
|
||||
<view class="template-power tn-safe-area-inset-bottom">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed alpha customBack>
|
||||
<view slot="back" class='tn-custom-nav-bar__back'
|
||||
@click="goBack">
|
||||
<text class='icon tn-icon-left'></text>
|
||||
<text class='icon tn-icon-home-capsule-fill'></text>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
|
||||
<swiper class="card-swiper" :circular="true"
|
||||
:autoplay="true" duration="500" interval="18000" @change="cardSwiper">
|
||||
<swiper-item v-for="(item,index) in swiperList" :key="index" :class="cardCur==index?'cur':''">
|
||||
<view class="swiper-item image-banner">
|
||||
<image :src="item.url" mode="aspectFill" v-if="item.type=='image'"></image>
|
||||
</view>
|
||||
<view class="swiper-item2 image-banner">
|
||||
<image class="png-sussuspension" :src="item.pngurl" mode="heightFix" v-if="item.type=='image'"></image>
|
||||
</view>
|
||||
<view class="swiper-item-text">
|
||||
<view class="text-sussuspension">
|
||||
<view class="tn-text-xxl tn-text-bold tn-color-white">{{item.title}}</view>
|
||||
<view class="tn-text-bold tn-color-white tn-padding-top-xs" style="font-size: 60rpx;">{{item.name}}</view>
|
||||
<view class="tn-text-sm tn-text-bold tn-color-white tn-padding-top-sm tn-padding-bottom-sm">{{item.text}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="indication">
|
||||
<block v-for="(item,index) in swiperList" :key="index">
|
||||
<view class="spot" :class="cardCur==index?'active':''"></view>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
<view class="power-round tn-bg-white">
|
||||
</view>
|
||||
|
||||
|
||||
<view class="power-radius" >
|
||||
|
||||
<!-- 方式17 start-->
|
||||
<view class="tn-flex tn-margin" style="padding: 15rpx 0 170rpx 0;">
|
||||
<view class="tn-flex-1 power-shadow power-radius tn-bg-white" style="margin-right: 15rpx;padding: 40rpx 0;">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="icon17__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-cyan tn-color-white tn-shadow-blur">
|
||||
<!-- <view class="tn-icon-shop"></view> -->
|
||||
<view class="tn-text-bold">
|
||||
借
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-text-center">
|
||||
<view class="tn-text-ellipsis tn-text-xl tn-text-bold tn-padding-top-sm tn-color-cyan">免押金借</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-flex-1 power-shadow power-radius tn-bg-white" style="margin-left: 15rpx;padding: 40rpx 0;">
|
||||
<view class="tn-flex tn-flex-direction-column tn-flex-row-center tn-flex-col-center">
|
||||
<view class="icon17__item--icon tn-flex tn-flex-row-center tn-flex-col-center tn-bg-orangeyellow tn-color-white tn-shadow-blur">
|
||||
<!-- <view class="tn-icon-electromobile"></view> -->
|
||||
<view class="tn-text-bold">
|
||||
还
|
||||
</view>
|
||||
</view>
|
||||
<view class="tn-text-center">
|
||||
<view class="tn-text-ellipsis tn-text-xl tn-text-bold tn-padding-top-sm tn-color-orangeyellow">快速归还</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 底部tabbar start-->
|
||||
<view class="tabbar footerfixed">
|
||||
<view class="action">
|
||||
<view class="bar-icon">
|
||||
<view class="tn-icon-company">
|
||||
</view>
|
||||
<!-- <image class="" src='https://resource.tuniaokj.com/images/tabbar/home_tnnew.png'></image> -->
|
||||
</view>
|
||||
<view class="tn-color-black">附近门店</view>
|
||||
</view>
|
||||
<view class="action">
|
||||
<view class="bar-circle tn-shadow-blur">
|
||||
<view class="tn-icon-scan tn-color-white">
|
||||
</view>
|
||||
<!-- <image class="" src='https://resource.tuniaokj.com/images/tabbar/information_tn.png'></image> -->
|
||||
</view>
|
||||
<view class="tn-color-gray">扫码租借</view>
|
||||
</view>
|
||||
<view class="action">
|
||||
<view class="bar-icon">
|
||||
<view class="tn-icon-my tn-color-gray--dark">
|
||||
</view>
|
||||
<!-- <image class="" src='https://resource.tuniaokj.com/images/tabbar/my_tn.png'></image> -->
|
||||
</view>
|
||||
<view class="tn-color-gray">个人中心</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
|
||||
export default {
|
||||
name: 'TemplatePower',
|
||||
mixins: [template_page_mixin],
|
||||
data(){
|
||||
return {
|
||||
cardCur: 0,
|
||||
swiperList: [{
|
||||
id: 0,
|
||||
type: 'image',
|
||||
title: '一飞充天',
|
||||
name: '图鸟充电电',
|
||||
text: '充电就是快',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/banner-animate3.png',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/login/1/login_top3.png'
|
||||
}, {
|
||||
id: 1,
|
||||
type: 'image',
|
||||
title: '图鸟南南',
|
||||
name: '欢迎加入东东们',
|
||||
text: '如果你也有不错的作品',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/banner-animate2.png',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d1.png'
|
||||
}, {
|
||||
id: 2,
|
||||
type: 'image',
|
||||
title: '图鸟西西',
|
||||
name: '一起玩转scss',
|
||||
text: '用最少的代码做最骚的效果',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/deer.jpg',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d1.png'
|
||||
}, {
|
||||
id: 3,
|
||||
type: 'image',
|
||||
title: '图鸟北北',
|
||||
name: '微信号 tnkewo',
|
||||
text: '商业合作请联系作者',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/banner-animate.png',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d1.png'
|
||||
}, {
|
||||
id: 4,
|
||||
type: 'image',
|
||||
title: '图鸟猪猪',
|
||||
name: '努力成为大佬',
|
||||
text: '一起加油吖',
|
||||
url: 'https://resource.tuniaokj.com/images/shop/banner2.jpg',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d1.png'
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// cardSwiper
|
||||
cardSwiper(e) {
|
||||
this.cardCur = e.detail.current
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/static/css/templatePage/custom_nav_bar.scss';
|
||||
/* 内容布局 start*/
|
||||
.power-shadow{
|
||||
box-shadow: 0rpx 0rpx 80rpx 0rpx rgba(0, 0, 0, 0.07);
|
||||
}
|
||||
.power-radius{
|
||||
border-radius: 15%;
|
||||
}
|
||||
|
||||
/* 圆角 start*/
|
||||
.power-round {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
margin-top: -40rpx;
|
||||
height: 42rpx;
|
||||
border-radius: 80rpx 80rpx 0 0;
|
||||
}
|
||||
|
||||
/* 悬浮 */
|
||||
.png-sussuspension{
|
||||
animation: suspension 3s ease-in-out infinite;
|
||||
}
|
||||
@keyframes suspension {
|
||||
0%, 100% {
|
||||
transform: translate(0 , 0);
|
||||
}
|
||||
50% {
|
||||
transform: translate(-0.8rem , 1rem);
|
||||
}
|
||||
}
|
||||
.text-sussuspension{
|
||||
animation: suspension2 4s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes suspension2 {
|
||||
0%, 100% {
|
||||
transform: translate(0 , 0);
|
||||
}
|
||||
50% {
|
||||
transform: translate(0rem , 1rem);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* 轮播视觉差 start */
|
||||
.card-swiper {
|
||||
height: 800rpx !important;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item {
|
||||
width: 750rpx !important;
|
||||
left: 0rpx;
|
||||
box-sizing: border-box;
|
||||
// padding: 0rpx 30rpx 90rpx 30rpx;
|
||||
overflow: initial;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item {
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 100%;
|
||||
transform: scale(1);
|
||||
transition: all 0.2s ease-in 0s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item {
|
||||
transform: none;
|
||||
transition: all 0.2s ease-in 0s;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item2 {
|
||||
margin-top: -540rpx;
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 100%;
|
||||
border-radius: 0rpx;
|
||||
transform: translate(140rpx, 20rpx) scale(0.3, 0.3);
|
||||
transition: all 0.6s ease 0s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item2 {
|
||||
margin-top: -620rpx;
|
||||
width: 100%;
|
||||
transform: translate(180rpx, 0rpx) scale(0.5, 0.5);
|
||||
transition: all 0.6s ease 0s;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item-text {
|
||||
margin-top: -520rpx;
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 50%;
|
||||
border-radius: 10rpx;
|
||||
transform: translate(100rpx, -60rpx) scale(0.9, 0.9);
|
||||
transition: all 0.6s ease 0s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item-text {
|
||||
margin-top: -580rpx;
|
||||
width: 100%;
|
||||
transform: translate(0rpx, 60rpx) scale(0.9, 0.9);
|
||||
transition: all 0.6s ease 0s;
|
||||
}
|
||||
|
||||
.image-banner{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.image-banner image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 轮播指示点 start*/
|
||||
.indication{
|
||||
z-index: 9999;
|
||||
width: 100%;
|
||||
height: 36rpx;
|
||||
position: absolute;
|
||||
display:flex;
|
||||
flex-direction:row;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
}
|
||||
|
||||
.spot{
|
||||
background-color: #FFFFFF;
|
||||
opacity: 0.6;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 20rpx;
|
||||
top: -130rpx;
|
||||
margin: 0 8rpx !important;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.spot.active{
|
||||
opacity: 1;
|
||||
width: 30rpx;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
/* 图标容器17 start */
|
||||
.icon17 {
|
||||
&__item {
|
||||
width: 30%;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 10rpx;
|
||||
padding: 30rpx;
|
||||
margin: 20rpx 10rpx;
|
||||
transform: scale(1);
|
||||
transition: transform 0.3s linear;
|
||||
transform-origin: center center;
|
||||
|
||||
&--icon {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
font-size: 60rpx;
|
||||
border-radius: 30%;
|
||||
margin-bottom: 18rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
&::after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
border-radius: inherit;
|
||||
opacity: 1;
|
||||
transform: scale(1, 1);
|
||||
background-size: 100% 100%;
|
||||
background-image: url(https://resource.tuniaokj.com/images/cool_bg_image/icon_bg5.png);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 底部tabbar start*/
|
||||
.footerfixed{
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
z-index: 999;
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0rpx 0rpx 30rpx 0rpx rgba(0, 0, 0, 0.07);
|
||||
}
|
||||
|
||||
.tabbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-height: 110rpx;
|
||||
justify-content: space-between;
|
||||
padding: 0;
|
||||
height: calc(110rpx + env(safe-area-inset-bottom) / 2);
|
||||
padding-bottom: calc(env(safe-area-inset-bottom) / 2);
|
||||
}
|
||||
|
||||
.tabbar .action {
|
||||
font-size: 22rpx;
|
||||
position: relative;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
display: block;
|
||||
height: auto;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
overflow: initial;
|
||||
}
|
||||
|
||||
.tabbar .action .bar-icon {
|
||||
width: 100rpx;
|
||||
position: relative;
|
||||
display: block;
|
||||
height: auto;
|
||||
margin: 0 auto 10rpx;
|
||||
text-align: center;
|
||||
font-size: 42rpx;
|
||||
// line-height: 50rpx;
|
||||
}
|
||||
|
||||
.tabbar .action .bar-icon image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tabbar .action .bar-circle {
|
||||
position: relative;
|
||||
display: block;
|
||||
margin: -60rpx auto 20rpx;
|
||||
text-align: center;
|
||||
font-size: 52rpx;
|
||||
line-height: 90rpx;
|
||||
background-color: #01BEFF;
|
||||
width: 90rpx !important;
|
||||
height: 90rpx !important;
|
||||
overflow: hidden;
|
||||
border-radius: 50%;
|
||||
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(1, 190, 255, 0.5);
|
||||
}
|
||||
|
||||
.tabbar .action .bar-circle image {
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
display: inline-block;
|
||||
margin: 15rpx auto 15rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,208 @@
|
||||
<template>
|
||||
<view class="template-start">
|
||||
<!-- 顶部自定义导航 -->
|
||||
<tn-nav-bar fixed alpha customBack>
|
||||
<view slot="back" class='tn-custom-nav-bar__back'
|
||||
@click="goBack">
|
||||
<text class='icon tn-icon-left'></text>
|
||||
<text class='icon tn-icon-home-capsule-fill'></text>
|
||||
</view>
|
||||
</tn-nav-bar>
|
||||
|
||||
|
||||
|
||||
|
||||
<swiper class="card-swiper" :circular="true"
|
||||
:autoplay="false" duration="500" interval="5000" @change="cardSwiper">
|
||||
<swiper-item v-for="(item,index) in swiperList" :key="index" :class="cardCur==index?'cur':''">
|
||||
<view class="swiper-item image-banner" :style="'background-color: '+ item.color +''">
|
||||
<image :src="item.url" mode="aspectFill" v-if="item.type=='image'" style="height: 100vh;width: 100vw;"></image>
|
||||
</view>
|
||||
<view class="swiper-item-png image-banner">
|
||||
<image :src="item.pngurl" mode="widthFix" v-if="item.type=='image'"></image>
|
||||
</view>
|
||||
<view class="swiper-item-text">
|
||||
<view class="tn-text-xxl tn-text-bold tn-color-white">{{item.name}}</view>
|
||||
<view class="tn-text-xl tn-text-bold tn-color-white tn-padding-top-xs">{{item.text}}</view>
|
||||
</view>
|
||||
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="indication">
|
||||
<block v-for="(item,index) in swiperList" :key="index">
|
||||
<view class="spot" :class="cardCur==index?'active':''"></view>
|
||||
</block>
|
||||
</view>
|
||||
<view class="go">
|
||||
<tn-button :plain="true" shape="round" backgroundColor="#FFFFFF" fontColor="#FFFFFF" width="40vw" height="70rpx">立即体验</tn-button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import template_page_mixin from '@/libs/mixin/template_page_mixin.js'
|
||||
export default {
|
||||
name: 'TemplateStart',
|
||||
mixins: [template_page_mixin],
|
||||
data(){
|
||||
return {
|
||||
cardCur: 0,
|
||||
swiperList: [{
|
||||
id: 0,
|
||||
type: 'image',
|
||||
name: '总有你想不到的创意',
|
||||
text: '海量分享',
|
||||
color: '#00C3E3',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/guide-bg1.jpg',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d7.png'
|
||||
}, {
|
||||
id: 1,
|
||||
type: 'image',
|
||||
name: '寻找一起成长的小伙伴',
|
||||
text: '愉快玩耍',
|
||||
color: '#FE5141',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/guide-bg2.jpg',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d8.png'
|
||||
}, {
|
||||
id: 2,
|
||||
type: 'image',
|
||||
name: '更多彩蛋等你探索',
|
||||
text: '酷炫多彩',
|
||||
color: '#EF9A01',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/guide-bg3.jpg',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d9.png'
|
||||
}, {
|
||||
id: 3,
|
||||
type: 'image',
|
||||
name: '商业合作请联系作者',
|
||||
text: '免费开源',
|
||||
color: '#D960C7',
|
||||
url: 'https://resource.tuniaokj.com/images/swiper/guide-bg4.jpg',
|
||||
pngurl: 'https://resource.tuniaokj.com/images/swiper/c4d10.png'
|
||||
}],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// cardSwiper
|
||||
cardSwiper(e) {
|
||||
this.cardCur = e.detail.current
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/static/css/templatePage/custom_nav_bar.scss';
|
||||
/* 轮播视觉差 start */
|
||||
.card-swiper {
|
||||
height: 100vh !important;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item {
|
||||
width: 750rpx !important;
|
||||
left: 0rpx;
|
||||
box-sizing: border-box;
|
||||
overflow: initial;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item {
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 100%;
|
||||
border-radius: 0rpx;
|
||||
transform: scale(1);
|
||||
transition: all 0.2s ease-in 0s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item {
|
||||
transform: none;
|
||||
transition: all 0.2s ease-in 0s;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item-png {
|
||||
margin-top: -85vh;
|
||||
display: block;
|
||||
border-radius: 0rpx;
|
||||
transform: translate(40rpx, 20rpx) scale(0.8, 0.8);
|
||||
transition: all 0.6s ease 0s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item-png {
|
||||
margin-top: -85vh;
|
||||
transform: translate(0rpx, 0rpx) scale(1, 1);
|
||||
transition: all 0.6s ease 0s;
|
||||
|
||||
}
|
||||
|
||||
.card-swiper swiper-item .swiper-item-text {
|
||||
margin-top: 0rpx;
|
||||
width: 100%;
|
||||
display: block;
|
||||
height: 50%;
|
||||
border-radius: 10rpx;
|
||||
transform: translate(30rpx, -40rpx) scale(0.7, 0.7);
|
||||
transition: all 0.6s ease 0s;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card-swiper swiper-item.cur .swiper-item-text {
|
||||
margin-top: -60rpx;
|
||||
width: 100%;
|
||||
transform: translate(30rpx, 0rpx) scale(0.9, 0.9);
|
||||
transition: all 0.6s ease 0s;
|
||||
}
|
||||
|
||||
.image-banner{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.image-banner image{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 轮播指示点 start*/
|
||||
.indication{
|
||||
z-index: 9999;
|
||||
width: 100%;
|
||||
height: 36rpx;
|
||||
position: fixed;
|
||||
display:flex;
|
||||
flex-direction:row;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
}
|
||||
|
||||
.spot{
|
||||
background-color: #FFF;
|
||||
opacity: 0.4;
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 0 8rpx !important;
|
||||
right: -270rpx;
|
||||
top: -180rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.spot.active{
|
||||
opacity: 1;
|
||||
width: 30rpx;
|
||||
background-color: #FFF;
|
||||
}
|
||||
|
||||
/* 立即体验 start*/
|
||||
.go{
|
||||
z-index: 9999;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
display:flex;
|
||||
flex-direction:row;
|
||||
align-items:center;
|
||||
justify-content:center;
|
||||
bottom: 10vh;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user