Commit 9d96718a by 李伟康

commit 动画

1 parent 438181c6
...@@ -13,14 +13,14 @@ ...@@ -13,14 +13,14 @@
<view :class="['home', { show: !id }]"> <view :class="['home', { show: !id }]">
<view class="bg"> <view class="bg">
<view class="top"> <view class="top">
<view class="top-one"></view> <view class="top-one" :style="randomize"></view>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="bottom-one"></view> <view class="bottom-one" :style="randomize"></view>
<view class="bottom-two"></view> <view class="bottom-two" :style="randomize"></view>
<view <view
class="bottom-three" class="bottom-three"
:style="{transform: 'translate(' + x + 'px, ' + y + 'px)'}" :style="randomize"
></view> ></view>
</view> </view>
</view> </view>
...@@ -218,13 +218,23 @@ export default { ...@@ -218,13 +218,23 @@ export default {
tabIndex: 0, tabIndex: 0,
payInfo: null, payInfo: null,
accountInfo: null, accountInfo: null,
x: 0, dateKey:null
y: 0,
}; };
}, },
mounted () { mounted () {
this.randomize(); setInterval(()=>{
setInterval(this.randomize, 3e3); this.dateKey = Date.now()
},5e3)
},
computed:{
randomize () {
let {dateKey} = this
const maxX = uni.getSystemInfoSync().windowWidth - 300,
maxY = uni.getSystemInfoSync().windowHeight - 100,
x = Math.floor(Math.random() * maxX),
y = Math.floor(Math.random() * maxY)
return `transform:translate(${x}px,${y}px);${dateKey};`
},
}, },
onBackPress (options) { onBackPress (options) {
if (options.from === "backbutton") { if (options.from === "backbutton") {
...@@ -245,12 +255,7 @@ export default { ...@@ -245,12 +255,7 @@ export default {
// else this.$refs.recordRef?.pageonReachBottom() // else this.$refs.recordRef?.pageonReachBottom()
}, },
methods: { methods: {
randomize () {
const maxX = uni.getSystemInfoSync().windowWidth - 300
const maxY = uni.getSystemInfoSync().windowHeight - 100
this.x = Math.floor(Math.random() * maxX);
this.y = Math.floor(Math.random() * maxY);
},
init () { init () {
this.getSoure(); this.getSoure();
this.findPayInfo(); this.findPayInfo();
...@@ -307,7 +312,7 @@ export default { ...@@ -307,7 +312,7 @@ export default {
this.id = this.moduleList[0].id; this.id = this.moduleList[0].id;
this.type = "edit"; this.type = "edit";
}, },
toDetail (item) { toDetail (item) {
this.chooseItem = item; this.chooseItem = item;
this.$refs.previewRef.open(); this.$refs.previewRef.open();
...@@ -350,9 +355,6 @@ export default { ...@@ -350,9 +355,6 @@ export default {
if (this.thumbnailFulfillList.length == this.moduleList.length) if (this.thumbnailFulfillList.length == this.moduleList.length)
this.skeletonStatus = false; this.skeletonStatus = false;
}, },
openKf () {
this.$refs.kfRef.open();
},
nextStep () { nextStep () {
let { id } = this.moduleList[0]; let { id } = this.moduleList[0];
this.type = "preview"; this.type = "preview";
...@@ -420,6 +422,7 @@ export default { ...@@ -420,6 +422,7 @@ export default {
background: #fff; background: #fff;
box-shadow: inset 2rpx 2rpx 0 2rpx #ffffff80; box-shadow: inset 2rpx 2rpx 0 2rpx #ffffff80;
border-radius: 50% / 25%; border-radius: 50% / 25%;
transition: all 2s;
z-index: 2; z-index: 2;
&::before { &::before {
position: absolute; position: absolute;
...@@ -494,6 +497,7 @@ export default { ...@@ -494,6 +497,7 @@ export default {
opacity: 0.4; opacity: 0.4;
background: #ebfffd; background: #ebfffd;
filter: blur(36rpx); filter: blur(36rpx);
transition: all 2s;
} }
&-two { &-two {
position: absolute; position: absolute;
...@@ -506,14 +510,14 @@ export default { ...@@ -506,14 +510,14 @@ export default {
left: -225rpx; left: -225rpx;
bottom: -225rpx; bottom: -225rpx;
border-radius: 100%; border-radius: 100%;
transition: all 2s;
} }
&-three { &-three {
width: 762.7rpx; width: 762.7rpx;
height: 210.92rpx; height: 210.92rpx;
opacity: 0.16; opacity: 0.16;
background: #fff;
box-shadow: inset 2rpx 2rpx 0 2rpx #ffffff80; box-shadow: inset 2rpx 2rpx 0 2rpx #ffffff80;
background-color: #fff; background-color: fff;
position: fixed; position: fixed;
left: 0; left: 0;
top: 0; top: 0;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!