|
@@ -0,0 +1,402 @@
|
|
|
+<template>
|
|
|
+ <view class="content">
|
|
|
+ <!-- <uni-notice-bar single="true" text="实际到账98%"></uni-notice-bar> -->
|
|
|
+ <view class="content-money">
|
|
|
+ <view class="flex " style="width: 750rpx;justify-content: space-around;margin-left: 0;">
|
|
|
+ <view class="buttom">
|
|
|
+ <view class="icon">{{ userInfo.golden_bean | getMoneyStyle }}</view>
|
|
|
+ <text class="text">可转金豆</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="">
|
|
|
+ <!-- <checkbox-group name="">
|
|
|
+ <label>
|
|
|
+ <text>广告值1</text><checkbox value="" />
|
|
|
+ </label>
|
|
|
+ <label>
|
|
|
+ <text>趣豆</text><checkbox value="" />
|
|
|
+ </label>
|
|
|
+ </checkbox-group> -->
|
|
|
+ <view class="">
|
|
|
+ <radio-group name="" class="radio-box">
|
|
|
+ <label @click="chooseLa(1)">
|
|
|
+ <text style="margin-right: 15rpx;">广告值</text>
|
|
|
+ <radio :checked="id==1" color="red" checked="true" style="transform: scale(0.8);" />
|
|
|
+ </label>
|
|
|
+ <label @click="chooseLa(2)">
|
|
|
+ <text style="margin-right: 15rpx;">趣豆</text>
|
|
|
+ <radio color="red" :checked="id==2" style="transform: scale(0.8);" />
|
|
|
+ </label>
|
|
|
+ </radio-group>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="row-box">
|
|
|
+ <view class="title">转换为<span>{{id==1?'广告值':'趣豆'}}</span></view>
|
|
|
+ <view class="row">
|
|
|
+ <text class="tit">¥</text>
|
|
|
+ <input class="input" type="number" v-model="withdrawal" placeholder="请输入佣金数量"
|
|
|
+ placeholder-class="placeholder" />
|
|
|
+ <view class="buttom" @click="id ==1? withdrawal = userInfo.golden_bean:withdrawal = (userInfo.golden_bean*0.1).toFixed(2)">全部转换</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- <view class="tip" v-if="withdrawal != 0">
|
|
|
+ 实际到账 {{ id==2?getGg:getQd || "0"}} {{ id==2?'趣豆':'广告值' }}
|
|
|
+ </view> -->
|
|
|
+ <!-- #ifndef MP-WEIXIN -->
|
|
|
+ <view class="list">
|
|
|
+ <radio-group @change="tabRadio">
|
|
|
+
|
|
|
+
|
|
|
+ </radio-group>
|
|
|
+ </view>
|
|
|
+ <!-- #endif -->
|
|
|
+ <!-- <view class="row b-b" v-if="type == 'alipay'">
|
|
|
+ <text class="tit">支付宝账号</text>
|
|
|
+ <input class="input" type="text" v-model="alipay_code" placeholder="请输入支付宝账号" placeholder-class="placeholder" />
|
|
|
+ </view>
|
|
|
+ <view class="row b-b" v-if="type == 'alipay'">
|
|
|
+ <text class="tit">支付宝姓名</text>
|
|
|
+ <input class="input" type="text" v-model="alipay_name" placeholder="请输入支付宝姓名" placeholder-class="placeholder" />
|
|
|
+ </view> -->
|
|
|
+ <!-- <view class="row b-b" v-if="type == 'bank'">
|
|
|
+ <text class="tit">银行卡号</text>
|
|
|
+ <input class="input" type="text" v-model="bank_code" placeholder="请输入银行卡号" placeholder-class="placeholder" />
|
|
|
+ </view>
|
|
|
+ <view class="row b-b" v-if="type == 'bank'">
|
|
|
+ <text class="tit">姓名</text>
|
|
|
+ <input class="input" type="text" v-model="bank_people" placeholder="请输入银行卡姓名" placeholder-class="placeholder" />
|
|
|
+ </view>
|
|
|
+ <view class="row b-b" v-if="type == 'bank'">
|
|
|
+ <text class="tit">所属银行</text>
|
|
|
+ <input class="input" type="text" v-model="bank_name" placeholder="请输入所属银行" placeholder-class="placeholder" />
|
|
|
+ </view> -->
|
|
|
+ <button class="add-btn up" @click="confirm()">提交申请</button>
|
|
|
+ <!-- <button class="add-btn modified" v-if="!weichatBsrowser" @click="navTo('/pages/money/account')">账号管理</button> -->
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ // import { rechargeWechat, rechargeIndex } from '@/api/wallet.js';
|
|
|
+ import {
|
|
|
+ getMoneyStyle
|
|
|
+ } from '@/utils/rocessor.js';
|
|
|
+ import {
|
|
|
+ extractCash,
|
|
|
+ extractBank,
|
|
|
+ aliInfo,
|
|
|
+ rechargeWechat,
|
|
|
+ bankInfo,
|
|
|
+ exchange
|
|
|
+ } from '@/api/wallet.js';
|
|
|
+ import {
|
|
|
+ orderData,
|
|
|
+ getUserInfo
|
|
|
+ } from '@/api/user.js';
|
|
|
+ import {
|
|
|
+ mapState,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex';
|
|
|
+ import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
|
|
|
+ export default {
|
|
|
+ filters: {
|
|
|
+ getMoneyStyle
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ uniNoticeBar
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
|
|
|
+ real() {
|
|
|
+ return (this.withdrawal - (this.withdrawal * this.sxf)).toFixed(2) * 1;
|
|
|
+ },
|
|
|
+ getQd() {
|
|
|
+ return this.withdrawal
|
|
|
+ },
|
|
|
+ getGg() {
|
|
|
+ return (this.withdrawal * 0.1).toFixed(2)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ id: 1,
|
|
|
+ type: 'alipay', //提现方式
|
|
|
+ money: '0.00', //可提现金额
|
|
|
+ freeze: '0.0', //冻结金额
|
|
|
+ withdrawal: '', //提现金额
|
|
|
+ minPrice: '', //最少提现金额
|
|
|
+ aliData: {},
|
|
|
+ sxf: 0,
|
|
|
+ bankData: {},
|
|
|
+ alipay_code: '',
|
|
|
+ alipay_name: '',
|
|
|
+ bank_code: '',
|
|
|
+ bank_people: '',
|
|
|
+ bank_name: '',
|
|
|
+ // #ifdef H5
|
|
|
+ weichatBsrowser: false
|
|
|
+ // #endif
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onLoad(options) {
|
|
|
+ // #ifdef H5
|
|
|
+ this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
|
|
|
+ // #endif
|
|
|
+ //加载提现信息
|
|
|
+ this.loadData();
|
|
|
+ // // 加载提款账号信息
|
|
|
+ // this.loadAli();
|
|
|
+ // this.loadBank();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
|
|
|
+ // 加载余额信息
|
|
|
+ async loadData() {
|
|
|
+ extractBank({}).then(({
|
|
|
+ data
|
|
|
+ }) => {
|
|
|
+ console.log(data, 'data')
|
|
|
+ this.sxf = data.sxf;
|
|
|
+ this.money = data.brokerage_price
|
|
|
+ this.minPrice = data.minPrice;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 跳转
|
|
|
+ navTo(url) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: url
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 切换选中对象
|
|
|
+ tabRadio(e) {
|
|
|
+ this.type = e.detail.value;
|
|
|
+ console.log(this.type);
|
|
|
+ },
|
|
|
+ chooseLa(type) {
|
|
|
+ this.id = type
|
|
|
+ console.log(this.id);
|
|
|
+ },
|
|
|
+ // 提交
|
|
|
+ confirm(){
|
|
|
+ exchange({
|
|
|
+ price: this.withdrawal,
|
|
|
+ type: this.id,
|
|
|
+ }).then(e => {
|
|
|
+ console.log(e, 'eeee');
|
|
|
+ uni.showToast({
|
|
|
+ title: '转换成功',
|
|
|
+ duration: 2000,
|
|
|
+ position: 'top',
|
|
|
+ // success: function(e) {
|
|
|
+ // uni.navigateBack()
|
|
|
+ // }
|
|
|
+ });
|
|
|
+ this.loadData()
|
|
|
+ this.userInfo.golden_bean
|
|
|
+
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+ page {
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .content-money {
|
|
|
+ padding: 30rpx 0;
|
|
|
+ background: #ffffff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .flex {
|
|
|
+ background-color: #ffffff;
|
|
|
+ text-align: center;
|
|
|
+ margin: 0 30rpx;
|
|
|
+ border-radius: $border-radius-sm;
|
|
|
+
|
|
|
+ .buttom {
|
|
|
+ font-size: $font-lg;
|
|
|
+ width: 50%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .interval {
|
|
|
+ width: 2px;
|
|
|
+ height: 60rpx;
|
|
|
+ background-color: #eeeeee;
|
|
|
+ }
|
|
|
+
|
|
|
+ .icon {
|
|
|
+ background-size: 100%;
|
|
|
+ font-size: 42rpx;
|
|
|
+ color: $font-color-dark;
|
|
|
+ font-weight: bold;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text {
|
|
|
+ color: $font-color-light;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .radio-box {
|
|
|
+ margin-top: 30rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ }
|
|
|
+
|
|
|
+ .row-box {
|
|
|
+ margin-top: 30rpx;
|
|
|
+ padding: 20rpx 30rpx;
|
|
|
+ background: #fff;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-size: $font-base + 2rpx;
|
|
|
+ color: $font-color-dark;
|
|
|
+ }
|
|
|
+
|
|
|
+ .row {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+ height: 80rpx;
|
|
|
+
|
|
|
+ .tit {
|
|
|
+ flex-shrink: 0;
|
|
|
+ width: 40rpx;
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: $font-color-dark;
|
|
|
+ }
|
|
|
+
|
|
|
+ .input {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 30rpx;
|
|
|
+ color: $font-color-dark;
|
|
|
+ }
|
|
|
+
|
|
|
+ .iconlocation {
|
|
|
+ font-size: 36rpx;
|
|
|
+ color: $font-color-light;
|
|
|
+ }
|
|
|
+
|
|
|
+ .buttom {
|
|
|
+ color: red;
|
|
|
+ font-size: $font-base;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .add-btn {
|
|
|
+ &.modified {
|
|
|
+ color: $base-color;
|
|
|
+ }
|
|
|
+
|
|
|
+ &.up {
|
|
|
+ background-color: red;
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 690rpx;
|
|
|
+ height: 80rpx;
|
|
|
+ margin: 0 auto;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ font-size: $font-lg;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ // box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
|
|
|
+ }
|
|
|
+
|
|
|
+ .list {
|
|
|
+ padding-left: 30rpx;
|
|
|
+ margin-top: 30rpx;
|
|
|
+ background-color: #ffffff;
|
|
|
+
|
|
|
+ .box {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ width: 100%;
|
|
|
+ height: 120rpx;
|
|
|
+ border-bottom: 1px solid $border-color-light;
|
|
|
+
|
|
|
+ .icon {
|
|
|
+ font-size: 48rpx;
|
|
|
+ padding-right: 20rpx;
|
|
|
+
|
|
|
+ .icon-img {
|
|
|
+ height: 50rpx;
|
|
|
+ width: 50rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .iconweixin1 {
|
|
|
+ color: #18bf16;
|
|
|
+ }
|
|
|
+
|
|
|
+ .iconzhifubao {
|
|
|
+ color: #08aaec;
|
|
|
+ }
|
|
|
+
|
|
|
+ .title-box {
|
|
|
+ flex-grow: 1;
|
|
|
+ text-align: left;
|
|
|
+
|
|
|
+ .title {
|
|
|
+ font-size: $font-base + 2rpx;
|
|
|
+ color: $font-color-base;
|
|
|
+ }
|
|
|
+
|
|
|
+ .node {
|
|
|
+ font-size: $font-sm;
|
|
|
+ color: $font-color-light;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .uni-radio-input {
|
|
|
+ width: 45rpx;
|
|
|
+ height: 45rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .row {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+ padding: 0 30upx;
|
|
|
+ height: 110upx;
|
|
|
+ background: #fff;
|
|
|
+
|
|
|
+ .tit {
|
|
|
+ flex-shrink: 0;
|
|
|
+ width: 250upx;
|
|
|
+ font-size: 30upx;
|
|
|
+ color: $font-color-dark;
|
|
|
+ }
|
|
|
+
|
|
|
+ .input {
|
|
|
+ flex: 1;
|
|
|
+ font-size: 30upx;
|
|
|
+ color: $font-color-dark;
|
|
|
+ }
|
|
|
+
|
|
|
+ .iconlocation {
|
|
|
+ font-size: 36upx;
|
|
|
+ color: $font-color-light;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .tip {
|
|
|
+ padding: 20rpx;
|
|
|
+ color: #FD3B39;
|
|
|
+ }
|
|
|
+</style>
|