Commit 363bb646 authored by 李俊赕's avatar 李俊赕
parents 072a9fee 93c30daf
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
<image :src="url" style="width: 100%;" mode="widthFix"></image> <image :src="url" style="width: 100%;" mode="widthFix"></image>
<view class="introduction"> <view class="introduction">
<slot></slot> <slot></slot>
<view class="settle-bottom">
<slot name="bottom"></slot>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -42,4 +46,9 @@ ...@@ -42,4 +46,9 @@
overflow: auto; overflow: auto;
height: calc(100vh - 368rpx); height: calc(100vh - 368rpx);
} }
.settle-bottom {
position: fixed;
width: calc(100vw - 60rpx);
bottom: 44rpx;
}
</style> </style>
...@@ -50,10 +50,13 @@ ...@@ -50,10 +50,13 @@
</text> </text>
</view> </view>
</view> </view>
<button class="bottom_btn apply_color" style="margin-bottom: 88rpx;" @click="handleClick">
<text class="bottom_title">申请入驻</text>
</button>
</view> </view>
<template v-slot:bottom>
<button :class="['bottom_btn', {'active': isStop}]" @click="$u.debounce(applyClick, 500)">
<text class="bottom_title" v-if="!isStop">浏览 {{count}} 秒后可申请入驻</text>
<text class="bottom_title" v-if="isStop">申请入驻</text>
</button>
</template>
</Settle> </Settle>
</view> </view>
</template> </template>
...@@ -65,16 +68,24 @@ ...@@ -65,16 +68,24 @@
Settle Settle
}, },
data() { data() {
return { return {
clicked: false, theme_url: 'https://qn-static.banshouhui.com/settle_theme.png?v=' + new Date().getTime(),
count: 9,
isStop: false,
settledInfo: null, settledInfo: null,
status: '' status: '',
saving: true
} }
}, },
onLoad(e) { onLoad(e) {
this.clicked = false
this.initpageData(e) this.initpageData(e)
this.startCounting()
},
onShow() {
// if(!this.settledInfo){
// this.getBaseInfo()
// }
uni.hideLoading()
}, },
methods: { methods: {
initpageData(option) { initpageData(option) {
...@@ -118,21 +129,39 @@ ...@@ -118,21 +129,39 @@
this.settledInfo = settledInfo this.settledInfo = settledInfo
this.status = settledInfo.record.status this.status = settledInfo.record.status
}, },
handleClick() { startCounting: function() {
if (this.clicked) return
this.clicked = true if (this.isStop) {
this.applyClick() return
}
this.count = this.count - 1
if (this.count > 0) {
setTimeout(this.startCounting, 1000);
} else {
this.isStop = true
}
}, },
applyClick: async function() { applyClick: async function() {
if (!this.isStop) {
return
}
this.saving = true
if (!this.settledInfo) { if (!this.settledInfo) {
await this.getBaseInfo() await this.getBaseInfo()
this.jumpJudge() this.jumpJudge()
this.saving = false
return return
} }
this.jumpJudge() this.jumpJudge()
}, },
jumpJudge() { jumpJudge() {
this.clicked = false
if (this.status > 0) { if (this.status > 0) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/settle/prompt' url: '/pages/settle/prompt'
...@@ -140,9 +169,7 @@ ...@@ -140,9 +169,7 @@
return return
} }
uni.navigateTo({ uni.navigateTo({
url: '/pages/settle/base', url: '/pages/settle/base'
"animationType": "fade-in",
"animationDuration": 300
}) })
} }
...@@ -160,27 +187,28 @@ ...@@ -160,27 +187,28 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.content {
.content-view {
background-color: #FFFFFF; background-color: #FFFFFF;
margin: 30rpx 0 30rpx 30rpx;
} }
.item-label {
.item-label {
color: #333333; color: #333333;
font-weight: bold; font-weight: bold;
font-size: 32rpx; font-size: 32rpx;
margin-top: 36rpx; padding-top: 36rpx;
margin-left: 30rpx; margin-left: 30rpx;
} }
.item-content { .item-content {
color: #333333; color: #333333;
font-size: 26rpx; font-size: 26rpx;
margin-top: 30rpx; margin-top: 30rpx;
margin-left: 30rpx; margin-left: 30rpx;
line-height: 50rpx; line-height: 50rpx;
} }
.bottom_btn { .bottom_btn {
margin-top: 30rpx;
width: 600rpx; width: 600rpx;
height: 104rpx; height: 104rpx;
line-height: 96rpx; line-height: 96rpx;
...@@ -189,27 +217,35 @@ ...@@ -189,27 +217,35 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #D1D4D4;
&.active {
background-color: #2272FF;
&.apply_color { }
// border: 4rpx solid #2272FF;
.bottom_title { .bottom_title {
color: #fff; color: #fff;
} }
} }
}
.bottom_title { .bottom_title {
font-weight: bold; font-weight: bold;
font-size: 32rpx; font-size: 32rpx;
color: #2272FF; color: #FFFFFF;
} }
.default_color { .default_color {
background-color: #fff; background-color: #D1D4D4;
} }
.apply_color { .apply_color {
background-color: #2272FF; background-color: #2272FF;
} }
.bottom_view {
position: fixed;
bottom: 0;
height: 192rpx;
display: flex;
align-items: center;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment