| | |
| | | { name: '收入', id: 2 }, |
| | | { name: '支出', id: 3 } |
| | | ], |
| | | capacity:10, |
| | | page:1, |
| | | list:[] |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | </view> |
| | | <view class="info-box-label">账户余额</view> |
| | | <view class="info-box-price"> |
| | | <text>¥{{isLogin?(userInfo.amount || 0) :0.00}}</text> |
| | | <text>¥{{isLogin?((userInfo.amount|| 0)/100).toFixed(2) :0.00}}</text> |
| | | <view class="info-box-price-btn" @click="jump(6)">去提现</view> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="tx-content"> |
| | | <view class="tx-content-title">可提现余额(元)</view> |
| | | <view class="tx-content-price"> |
| | | <text>1000.00</text> |
| | | <text>{{((userInfo.amount|| 0)/100).toFixed(2)}}</text> |
| | | <view class="tx-content-price-btn" @click="jump">余额明细</view> |
| | | </view> |
| | | <view class="content"> |
| | |
| | | <view class="content-input-icon"> |
| | | <image src="/static/icon/ic_money@2x.png" mode="widthFix"></image> |
| | | </view> |
| | | <input type="number" placeholder="请输入提现金额" /> |
| | | <view class="content-input-btn">全部提现</view> |
| | | <input type="number" v-model="amount" @input="changeAmount" placeholder="请输入提现金额" /> |
| | | <view class="content-input-btn" @click="inputAll">全部提现</view> |
| | | </view> |
| | | <view class="content-tips">输入的金额已经超过可提现金额</view> |
| | | <view class="content-tips">{{tips}}</view> |
| | | <view class="content-button" @click="submit">2小时到账,确认提现</view> |
| | | </view> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { mapState } from 'vuex' |
| | | export default { |
| | | computed: { |
| | | ...mapState(['userInfo' ]) |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | tips:'',// |
| | | changing1:false, |
| | | amount: null |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | url: '/pages/balance-details/balance-details' |
| | | }) |
| | | }, |
| | | inputAll(){ |
| | | this.amount = ((this.userInfo.amount|| 0)/100).toFixed(2) |
| | | }, |
| | | changeAmount(){ |
| | | this.tips='' |
| | | }, |
| | | submit() { |
| | | uni.navigateTo({ |
| | | url: '/pages/withdrawal-successful/withdrawal-successful' |
| | | }) |
| | | } |
| | | if(this.changing1){ |
| | | return |
| | | } |
| | | this.changing1 = true |
| | | if(this.amount == null || this.amount<=0){ |
| | | this.tips = '提交金额必须大于0,至少提现0.1元' |
| | | this.changing1 = false |
| | | return |
| | | } |
| | | if(this.amount *100 > this.userInfo.amount){ |
| | | this.tips = '输入的金额已经超过可提现金额' |
| | | this.changing1 = false |
| | | return |
| | | } |
| | | this.changing1 = true |
| | | var that = this |
| | | var param ={amount:this.amount } |
| | | that.$u.api.applyWithdrawal(param) |
| | | .then(res =>{ |
| | | if(res.code ===200){ |
| | | uni.navigateTo({ |
| | | url: '/pages/withdrawal-successful/withdrawal-successful' |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | that.changing1 = false |
| | | that.tips='' |
| | | that.amount =null |
| | | }) |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | let logOff = (params = {}) => vm.$u.http.get('web/account/logOff', { params }); // 退出登录 |
| | | let getPlatformAboutUs = (params = {}) => vm.$u.http.get('web/user/getPlatformAboutUs', { params }); // 获取系统配置 |
| | | let getTotal = (data = {}) => vm.$u.http.post('web/orders/getTotal', data); // 获取预计金额(分) |
| | | let applyWithdrawal = (data = {}) => vm.$u.http.post('web/user/applyWithdrawal', data); // 提现申请 |
| | | let upload = (data = {}) => vm.$u.http.post('web/public/upload', data); // 上传 |
| | | |
| | | vm.$u.api = { |
| | | wxLogin, |
| | | logOff, |
| | | applyWithdrawal, |
| | | getPlatformAboutUs, |
| | | wxAuthPhone, |
| | | applyForIdentity, |