dingdong-master/pages/my/withdraw.vue

103 lines
2.8 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view>
<!-- 顶部操作条 -->
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">提现</block>
</cu-custom>
<view class="margin-lr-sm margin-tb-lg shadow-warp">
<view class="bg-gray flex justify-between align-center text-xl padding" @click="bindAccount">
<view>提现帐号绑定</view>
<view><text class="cuIcon-right"></text></view>
</view>
<view class="bg-white padding solid-bottom">
<view class="text-right text-lg">
<text>可提现金额:</text>
<text class="text-red text-price">{{balance}}</text>
</view>
<view class="text-lg margin-bottom-sm">提现金额</view>
<view class="text-xxl solid-bottom flex justify-start align-baseline">
<text class="margin-right-xs text-bold"></text>
<input type="digit" placeholder="请输入金额" placeholder-style="color:#989898" style="height: 80rpx;">
</view>
</view>
<view class="bg-white padding">
<view class="text-lg margin-bottom-sm">发票凭证电子票</view>
<view class="grid col-3 grid-square flex-sub">
<view class="bg-img" v-for="(item,index) in imgList" :key="index"
@tap="viewImage($event)" :data-url="item">
<image :src="item" mode="aspectFill"></image>
<view class="cu-tag bg-red" @tap.stop="delImg($event)" :data-index="index">
<text class='cuIcon-close'></text>
</view>
</view>
<view class="solids" @tap="chooseImage" v-if="imgList.length < 9">
<text class='cuIcon-cameraadd'></text>
</view>
</view>
</view>
</view>
<!-- 操作按钮 -->
<view class="margin-lr">
<button class="cu-btn lg bg-main-color long-btn shadow-blur" @click="withdraw">提现</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
balance: '0.00',
imgList: []
}
},
methods: {
bindAccount() {
uni.navigateTo({
url: '/pages/my/bank-account-bind'
})
},
chooseImage(e) {
uni.chooseImage({
count: 9, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: (res) => {
if (this.imgList.length != 0) {
this.imgList = this.imgList.concat(res.tempFilePaths)
} else {
this.imgList = res.tempFilePaths
}
}
});
},
viewImage(e) {
uni.previewImage({
urls: this.imgList,
current: e.currentTarget.dataset.url
});
},
delImg(e) {
uni.showModal({
title: '',
content: '确定要删除这张图片吗?',
cancelText: '取消',
confirmText: '确定',
success: res => {
if (res.confirm) {
this.imgList.splice(e.currentTarget.dataset.index, 1)
}
}
})
},
withdraw() {
}
},
}
</script>
<style>
</style>