| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <template>
- <view class="page">
- <view class="title flex-col">
- <!--#ifdef H5-->
- <view class="flex-row justify-center">
- <text class="title1">收益提现</text>
- </view>
- <!--#endif-->
- <text class="title2" @click="navigateTo('/pages/withdrawalRecord/withdrawalRecord')">提现记录</text>
- </view>
- <view class="flex-col justify-center" :style="{marginTop:'150rpx'}">
- <view class="flex-row justify-center">
- <text class="priceTitle">可提现金额</text>
- </view>
- <view class="flex-row justify-center marginTop">
- <text class="price">{{statistics.myEarning || '0.00'}}</text>
- </view>
- </view>
- <view class="flex-row justify-start ":style="{marginTop:'150rpx'}">
- <checkbox-group @change="checkboxChange">
- <checkbox :checked="checked" color="#000000" :style="{'transform':'scale(0.7)'}"/>
- <text class="read">请阅读并同意</text>
- <text @click.stop="gotoTermOfService(8)" class="read">《娇骄儿拓客活动规则》</text>
- </checkbox-group>
- </view>
- <view class="flex-row justify-center marginTop">
- <view class="withdrawButton" @click="apply">
- <text>立即提现</text>
- </view>
- </view>
- <!--#ifdef H5-->
- <liu-drag-button @clickBtn="back">返回</liu-drag-button>
- <!--#endif-->
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- checked:false,
- statistics:{},
- }
- },
- onShow() {
- this.exStatistics()
- },
- methods: {
- // 查看储值协议
- gotoTermOfService(type){
- uni.navigateTo({
- url: '/pages/agreement/agreement?name='+'娇骄儿拓客活动规则'+'&type=' + 10,
- })
- },
- apply(){
- if (!this.checked){
- uni.showToast({
- icon: 'none',
- duration: 3000,
- title: '请同意《娇骄儿拓客活动规则》'
- });
- return
- }
- this.$api.service.apply({
- amount:null
- }).then(res=>{
- uni.showToast({
- icon: 'success',
- duration: 3000,
- title: '申请成功'
- });
- })
- },
- exStatistics(){
- this.$api.service.exStatistics().then(res=>{
- this.statistics = res.data.data
- })
- },
- navigateTo(url) {
- uni.navigateTo({
- url: url
- })
- },
- back() {
- let pages = getCurrentPages()
- if (pages.length > 1){
- uni.navigateBack({
- delta: 1,
- fail:err=>{
- console.log(err)
- }
- })
- }else {
- uni.switchTab({
- url: '/pages/my/my'
- });
- }
- },
- checkboxChange(){
- this.checked = !this.checked
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- @import './index.rpx.css';
- </style>
|