新增积分转余额
This commit is contained in:
parent
7ad64cea7c
commit
83332b2d4e
@ -2,7 +2,6 @@ import { createApp, h, render } from "vue";
|
|||||||
import App from "./App.vue";
|
import App from "./App.vue";
|
||||||
import { createRouter, createWebHashHistory } from "vue-router";
|
import { createRouter, createWebHashHistory } from "vue-router";
|
||||||
import { routes } from "./router";
|
import { routes } from "./router";
|
||||||
import less from "less";
|
|
||||||
import "./styles/ch.less";
|
import "./styles/ch.less";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|||||||
@ -1486,8 +1486,6 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
width: 21.467vw;
|
width: 21.467vw;
|
||||||
height: 15.867vw;
|
height: 15.867vw;
|
||||||
background: url(/img/GroupShopDetail-bg-1.png) no-repeat;
|
|
||||||
background-size: 100% 100%;
|
|
||||||
border-radius: .667vw;
|
border-radius: .667vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2160,8 +2158,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.v2 {
|
.v2 {
|
||||||
background: url(/img/fruit_bg.png) no-repeat;
|
|
||||||
|
|
||||||
.onsale_box {
|
.onsale_box {
|
||||||
img {
|
img {
|
||||||
width: auto;
|
width: auto;
|
||||||
@ -3653,7 +3649,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.van-action-bar) {
|
.van-action-bar {
|
||||||
padding: 2vw 4vw;
|
padding: 2vw 4vw;
|
||||||
padding-bottom: calc(2vw + env(safe-area-inset-bottom));
|
padding-bottom: calc(2vw + env(safe-area-inset-bottom));
|
||||||
|
|
||||||
@ -4324,7 +4320,6 @@
|
|||||||
padding: 6.667vw 3.333vw 0;
|
padding: 6.667vw 3.333vw 0;
|
||||||
|
|
||||||
.t {
|
.t {
|
||||||
background: url(/img/asset-t1.png);
|
|
||||||
height: 52vw;
|
height: 52vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4383,6 +4378,7 @@
|
|||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
border-radius: 4vw;
|
border-radius: 4vw;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pn {
|
.pn {
|
||||||
@ -4801,7 +4797,8 @@
|
|||||||
|
|
||||||
.point {
|
.point {
|
||||||
.top {
|
.top {
|
||||||
background: url(/img/point_bg.jpg) no-repeat;
|
// background: url(/img/point_bg.jpg) no-repeat;
|
||||||
|
background: #a73436;
|
||||||
background-size: 100% auto;
|
background-size: 100% auto;
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
|
|||||||
@ -625,10 +625,12 @@ img {
|
|||||||
.top {
|
.top {
|
||||||
.box;
|
.box;
|
||||||
.box-tb;
|
.box-tb;
|
||||||
|
overflow: hidden;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 2vw;
|
border-radius: 2vw;
|
||||||
padding: 3.33vw;
|
padding: 3.33vw;
|
||||||
border-bottom: 2vw solid #f5f5f5;
|
margin-bottom: 4vw;
|
||||||
|
// border-bottom: 2vw solid #f5f5f5;
|
||||||
|
|
||||||
.tit {
|
.tit {
|
||||||
font-size: 3.73vw;
|
font-size: 3.73vw;
|
||||||
@ -754,6 +756,34 @@ img {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.trans_point__detail {
|
||||||
|
.box;
|
||||||
|
.box-tb;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 2vw;
|
||||||
|
margin-top: 4vw;
|
||||||
|
padding: 3.6vw 3.47vw;
|
||||||
|
|
||||||
|
.trans_point__detail_box {
|
||||||
|
.box;
|
||||||
|
width: 100%;
|
||||||
|
line-height: 6vw;
|
||||||
|
|
||||||
|
span {
|
||||||
|
b {
|
||||||
|
color: #ea3e23;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
border: none;
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.com_btn {
|
.com_btn {
|
||||||
padding: 0 7.33vw;
|
padding: 0 7.33vw;
|
||||||
margin-top: 11.6vw;
|
margin-top: 11.6vw;
|
||||||
|
|||||||
@ -49,9 +49,9 @@
|
|||||||
<span>会员卡余额抵扣:</span>
|
<span>会员卡余额抵扣:</span>
|
||||||
<p>-¥{{ data.payquan?.toFixed(2) }}</p>
|
<p>-¥{{ data.payquan?.toFixed(2) }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail">
|
<div class="detail" v-if="data.realmoney > 0">
|
||||||
<span>用户实付金额:</span>
|
<span>用户实付金额:</span>
|
||||||
<p>¥{{ data.paymoney?.toFixed(2) }}</p>
|
<p>¥{{ data.realmoney?.toFixed(2) }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|||||||
@ -14,6 +14,10 @@
|
|||||||
<b class="num">
|
<b class="num">
|
||||||
{{ data.total.totalsum?.toFixed(2) }}
|
{{ data.total.totalsum?.toFixed(2) }}
|
||||||
</b>
|
</b>
|
||||||
|
|
||||||
|
<button class="r" style="color: #a73436;" @click="$navigate('/Transfer?type=point')">
|
||||||
|
转出
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="line">
|
<div class="line">
|
||||||
@ -151,6 +155,7 @@ export default {
|
|||||||
init() {
|
init() {
|
||||||
this.$get('/v1/client/DUserxiaofeijifensClient/statistics', this.searchParams).then(data => {
|
this.$get('/v1/client/DUserxiaofeijifensClient/statistics', this.searchParams).then(data => {
|
||||||
this.data.total = data.data;
|
this.data.total = data.data;
|
||||||
|
this.$ls.set('member_point', data.data.totalsum)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$showFailToast(err.message || '加载失败');
|
this.$showFailToast(err.message || '加载失败');
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<BasePage>
|
<BasePage :title="type === 'point' ? '积分转余额' : '赠卡'">
|
||||||
<div class="transfer">
|
<div class="transfer">
|
||||||
<div class="top">
|
<div class="top" v-if="type !== 'point'">
|
||||||
<div class="tit">
|
<div class="tit">
|
||||||
被赠送人账号
|
被赠送人账号
|
||||||
</div>
|
</div>
|
||||||
@ -10,45 +10,70 @@
|
|||||||
<span class="errorinfo">{{ errorInfo }}</span>
|
<span class="errorinfo">{{ errorInfo }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="type_box">
|
|
||||||
<div class="title">
|
|
||||||
<b>互转类型</b>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<van-radio-group v-model="checked" icon-size="3.47vw" checked-color="#22a56e">
|
|
||||||
<van-radio name="balance" label-position="left">
|
|
||||||
<img src="/img/balance-i1.png" alt="">
|
|
||||||
<p>
|
|
||||||
转余额
|
|
||||||
<span>(剩余:265444.00)</span>
|
|
||||||
</p>
|
|
||||||
</van-radio>
|
|
||||||
<van-radio name="2" label-position="left">
|
|
||||||
<img src="/img/balance-i1.png" alt="">
|
|
||||||
<p>
|
|
||||||
转余额
|
|
||||||
<span>(剩余:265444.00)</span>
|
|
||||||
</p>
|
|
||||||
</van-radio>
|
|
||||||
</van-radio-group>
|
|
||||||
|
|
||||||
</div> -->
|
|
||||||
|
|
||||||
<div class="quota_box">
|
<div class="quota_box">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<b>赠送金额</b>
|
<b v-if="type === 'point'">转出积分数量</b>
|
||||||
<span class="r" @click="showTerm = true">
|
<b v-else>赠送金额</b>
|
||||||
|
<span v-if="type === 'point'" class="r" @click="showPointTerm = true">
|
||||||
|
<van-icon name="info-o" />
|
||||||
|
转出说明
|
||||||
|
</span>
|
||||||
|
<span v-else class="r" @click="showTerm = true">
|
||||||
<van-icon name="info-o" />
|
<van-icon name="info-o" />
|
||||||
赠送说明
|
赠送说明
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <input v-model="amount" type="number" placeholder="请输入转账数额"> -->
|
<input class="b" v-if="type === 'point'" v-model="amount" type="number" placeholder="请输入转出数额">
|
||||||
<b class="nums">500.00</b>
|
<b v-else class="nums">500.00</b>
|
||||||
<hr>
|
<hr>
|
||||||
|
<span v-if="type === 'point'" style="margin-bottom: 2.4vw;display: block;">可用积分:<b style="color: #ea3e23;">{{
|
||||||
|
Number(pointnum ||
|
||||||
|
0).toFixed(2)
|
||||||
|
}}</b></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="trans_point__detail" v-if="type === 'point'">
|
||||||
|
<div class=" trans_point__detail_box">
|
||||||
|
<span>
|
||||||
|
可用余额:
|
||||||
|
<b>{{ Number(balancenum)?.toFixed(2) }}</b>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span class="r">
|
||||||
|
手续费:
|
||||||
|
<b>{{ Number(ratio)?.toFixed(2) }}%</b>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="trans_point__detail_box">
|
||||||
|
<span>
|
||||||
|
转出积分数量
|
||||||
|
</span>
|
||||||
|
<b class="r">
|
||||||
|
{{ tamount?.toFixed(2) || "0.00" }}
|
||||||
|
</b>
|
||||||
|
</div>
|
||||||
|
<div class="trans_point__detail_box">
|
||||||
|
<span>
|
||||||
|
扣除手续费数量
|
||||||
|
</span>
|
||||||
|
<b class="r">
|
||||||
|
{{ fees?.toFixed(2) || "0.00" }}
|
||||||
|
</b>
|
||||||
|
</div>
|
||||||
|
<div class="trans_point__detail_box">
|
||||||
|
<span>
|
||||||
|
实际到账余额
|
||||||
|
</span>
|
||||||
|
<b class="r">
|
||||||
|
{{ (tamount - fees)?.toFixed(2) || "0.00" }}
|
||||||
|
</b>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="com_btn">
|
<div class="com_btn">
|
||||||
<van-button type="primary" color="#ea3e23" round @click="toTransfer">确认赠送</van-button>
|
<van-button v-if="type === 'point'" type="primary" color="#ea3e23" round @click="toBalance">确认转出</van-button>
|
||||||
|
<van-button v-else type="primary" color="#ea3e23" round @click="toTransfer">确认赠送</van-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</BasePage>
|
</BasePage>
|
||||||
@ -57,58 +82,29 @@
|
|||||||
style="min-height: 50%; padding: 0px 10px 10px 10px">
|
style="min-height: 50%; padding: 0px 10px 10px 10px">
|
||||||
<div class="w100 html" v-html="$datadic.getContent('code_hykzssm')" />
|
<div class="w100 html" v-html="$datadic.getContent('code_hykzssm')" />
|
||||||
</van-action-sheet>
|
</van-action-sheet>
|
||||||
|
|
||||||
|
<van-action-sheet v-model:show="showPointTerm" safe-area-inset-bottom :title="`转出说明`" closeable
|
||||||
|
style="min-height: 50%; padding: 0px 10px 10px 10px">
|
||||||
|
<div class="w100 html" v-html="$datadic.getContent('code_jfzcsm')" />
|
||||||
|
</van-action-sheet>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'WalletTransfer',
|
name: 'WalletTransfer',
|
||||||
|
emits: ['updateShare'],
|
||||||
mounted() {
|
mounted() {
|
||||||
this.me = this.$ls.get('cellphone');
|
this.me = this.$ls.get('cellphone');
|
||||||
// $(".van-stepper__input").val("");
|
this.init()
|
||||||
// this.me = window.localStorage.getItem("member_username");
|
|
||||||
// Promise.all([this.$MemberAPI.Post('GetWallet')])
|
|
||||||
// .then(data => {
|
|
||||||
// this.wallet = data[0];
|
|
||||||
|
|
||||||
// }).catch(err => {
|
|
||||||
// this.$showFailToast("获取钱包信息失败:" + err.message);
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
// watch: {
|
|
||||||
// password(val, old) {
|
|
||||||
// if (val.length === 6) {
|
|
||||||
// this.showKeyboard = false;
|
|
||||||
// this.data.PayPassword = val;
|
|
||||||
// this.$MemberAPI.Post('WalletTransfer', {
|
|
||||||
// TransferType: 'Balance',
|
|
||||||
// Member: this.data.id,
|
|
||||||
// Amount: this.data.Amount,
|
|
||||||
// }).then((data) => {
|
|
||||||
// this.$showToast({ type: "success", message: "兑换积分转出成功" });
|
|
||||||
// setTimeout(() => {
|
|
||||||
// window.location.reload();
|
|
||||||
// }, 500);
|
|
||||||
// })
|
|
||||||
// .catch((error) => {
|
|
||||||
// this.$showToast({
|
|
||||||
// type: "fail",
|
|
||||||
// message: "兑换积分转出失败:" + error,
|
|
||||||
// });
|
|
||||||
// this.errorInfo = "密码错误";
|
|
||||||
// this.showKeyboard = true;
|
|
||||||
// setTimeout(() => {
|
|
||||||
// this.password = "";
|
|
||||||
// }, 500);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
amount: 500.00,
|
amount: 500.00,
|
||||||
checked: 'balance',
|
checked: 'balance',
|
||||||
checkedCH: "余额",
|
checkedCH: "余额",
|
||||||
showTerm: false,
|
showTerm: false,
|
||||||
|
showPointTerm: false,
|
||||||
|
type: this.$route.query.type,
|
||||||
left: 0,
|
left: 0,
|
||||||
loading: false,
|
loading: false,
|
||||||
toUser: { NickName: null },
|
toUser: { NickName: null },
|
||||||
@ -123,9 +119,37 @@ export default {
|
|||||||
cellphone: "",
|
cellphone: "",
|
||||||
showmeerror: false,
|
showmeerror: false,
|
||||||
amount: null,
|
amount: null,
|
||||||
|
pointnum: '',
|
||||||
|
balancenum: '',
|
||||||
|
ratio: 0
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
fees() {
|
||||||
|
return this.amount * (this.ratio / 100) || 0
|
||||||
|
},
|
||||||
|
tamount() {
|
||||||
|
return this.amount || 0
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
init() {
|
||||||
|
Promise.all(
|
||||||
|
[
|
||||||
|
this.$get('/v1/client/CDatadicsClient/code_jfzyesxf').then(res => {
|
||||||
|
this.ratio = res.data.contents
|
||||||
|
}),
|
||||||
|
this.$get('/v1/client/DUserxiaofeijifensClient/statistics').then(data => {
|
||||||
|
this.pointnum = data.data.totalsum
|
||||||
|
}).catch(err => {
|
||||||
|
this.$showFailToast(err.message || '加载失败');
|
||||||
|
}),
|
||||||
|
this.$get('/v1/client/DUsermoneysClient/statistics').then(data => {
|
||||||
|
this.balancenum = data.data.totalsum;
|
||||||
|
})
|
||||||
|
]
|
||||||
|
)
|
||||||
|
},
|
||||||
checkExists() {
|
checkExists() {
|
||||||
// if (!this.userName) {
|
// if (!this.userName) {
|
||||||
// this.error = false;
|
// this.error = false;
|
||||||
@ -189,9 +213,24 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
toBalance() {
|
||||||
|
this.$showConfirmDialog({
|
||||||
|
title: '确认转出?',
|
||||||
|
}).then(() => {
|
||||||
|
this.$request('/v1/client/DUserxiaofeijifensClient/tranmoney', this.amount).then(res => {
|
||||||
|
if (res.status === 200) {
|
||||||
|
this.$showSuccessToast('转出成功!')
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$navigate('Balance')
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
this.$showFailToast(err.message);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user