|
@@ -1,68 +1,62 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
- <uni-nav-bar :border="false" statusBar left-icon="left" @clickLeft="utils.navigateBack()"
|
|
|
- @clickRight="tapOpenLog" fixed title="趣豆转账">
|
|
|
- <view style="color: #ef4034;" slot="right">
|
|
|
+ <view class="page">
|
|
|
+ <uni-nav-bar :border="false" statusBar left-icon="left" @clickLeft="pageback" @clickRight="tapOpenLog" fixed
|
|
|
+ title="趣豆转账">
|
|
|
+ <text class="nav-text" slot="right">
|
|
|
转账记录
|
|
|
- </view>
|
|
|
+ </text>
|
|
|
</uni-nav-bar>
|
|
|
- <view style="height: 10px;"></view>
|
|
|
- <view class="topinfo fx-h fx-bc fx-ac">
|
|
|
- <view class="count">{{ user.integral || 0 }}</view>
|
|
|
- <view class="text">当前可用(趣豆)</view>
|
|
|
- </view>
|
|
|
- <view style="height: 10px;"></view>
|
|
|
- <view class="info-line">
|
|
|
- <view class="il-top">
|
|
|
- <text>转账类型</text>
|
|
|
- </view>
|
|
|
- <view class="il-bot fx-r fx-bc fx-ac">
|
|
|
- <uv-radio-group v-model="type">
|
|
|
- <uv-radio activeColor="red" name="id" label="收款ID"></uv-radio>
|
|
|
- <view style="width: 40px;"></view>
|
|
|
- <uv-radio activeColor="red" name="phone" label="收款手机号"></uv-radio>
|
|
|
- </uv-radio-group>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ <view class="page">
|
|
|
|
|
|
- <view class="info-line" v-if="type == 'id'">
|
|
|
- <view class="il-top">
|
|
|
- <text>收款人id</text>
|
|
|
- </view>
|
|
|
- <view class="il-bot">
|
|
|
- <input placeholder="收款人id" @input="tapGetId" type="number" v-model="uid" />
|
|
|
- <view class="name">{{ sendname }}</view>
|
|
|
+ <view class="topinfo">
|
|
|
+ <text class="count">{{ user.integral || 0 }}</text>
|
|
|
+ <text class="text">当前可用(趣豆)</text>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="info-line" v-if="type == 'phone'">
|
|
|
- <view class="il-top">
|
|
|
- <text>手机号码</text>
|
|
|
- </view>
|
|
|
- <view class="il-bot">
|
|
|
- <input placeholder="转账手机号码" @input="tapGetMobile" type="number" v-model="new_mobile" />
|
|
|
- <view class="name">{{ sendname }}</view>
|
|
|
+ <view class="info-line">
|
|
|
+ <view class="il-top">
|
|
|
+ <text>转账类型</text>
|
|
|
+ </view>
|
|
|
+ <view class="il-bot">
|
|
|
+ <uv-radio-group v-model="type">
|
|
|
+ <uv-radio activeColor="red" name="id" label="收款ID"></uv-radio>
|
|
|
+ <uv-radio activeColor="red" name="phone" label="收款手机号"></uv-radio>
|
|
|
+ </uv-radio-group>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="info-line">
|
|
|
- <view class="il-top">
|
|
|
- <text>转账金额</text>
|
|
|
+
|
|
|
+ <view class="info-line" v-if="type == 'id'">
|
|
|
+ <view class="il-top">
|
|
|
+ <text>收款人id</text>
|
|
|
+ </view>
|
|
|
+ <view class="il-bot">
|
|
|
+ <input placeholder="收款人id" @input="tapGetId" type="number" v-model="uid" />
|
|
|
+ <view class="name">{{ sendname }}</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view class="il-code">
|
|
|
- <view class="etb-left">
|
|
|
- <input placeholder="请输入转账金额" placeholder-class="placeholder-class" v-model="num" />
|
|
|
+ <view class="info-line" v-if="type == 'phone'">
|
|
|
+ <view class="il-top">
|
|
|
+ <text>手机号码</text>
|
|
|
+ </view>
|
|
|
+ <view class="il-bot">
|
|
|
+ <input placeholder="转账手机号码" @input="tapGetMobile" type="number" v-model="new_mobile" />
|
|
|
+ <view class="name">{{ sendname }}</view>
|
|
|
</view>
|
|
|
- <!-- <view class="etb-right" @click="num = allMoney()">
|
|
|
- <text>全部</text>
|
|
|
- </view> -->
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="info-line">
|
|
|
- <view class="update-btn" @click="tapSubmit">
|
|
|
- <text>确认转账</text>
|
|
|
+ <view class="info-line">
|
|
|
+ <view class="il-top">
|
|
|
+ <text>转账金额</text>
|
|
|
+ </view>
|
|
|
+ <view class="il-code">
|
|
|
+ <view class="etb-left">
|
|
|
+ <input class="input" placeholder="请输入转账金额" v-model="num" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- <view style="height: 10px;"></view>
|
|
|
+ <button class="base-btn" @tap="tapSubmit">
|
|
|
+ <text class="btn-text">确认转账</text>
|
|
|
+ </button>
|
|
|
</view>
|
|
|
- <PayDialog ref="payDialog" @getPassword="getPassword"></PayDialog>
|
|
|
+ <!-- <PayDialog ref="payDialog" @getPassword="getPassword"></PayDialog> -->
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -71,12 +65,14 @@
|
|
|
mapState,
|
|
|
mapMutations
|
|
|
} from 'vuex';
|
|
|
- import PayDialog from "@/components/ui-pay/payDialog.vue";
|
|
|
+ // import PayDialog from "@/components/ui-pay/payDialog.nvue";
|
|
|
+ import utils from "@/library/utils/Comm.js"
|
|
|
+ import Request from '@/library/Request';
|
|
|
export default {
|
|
|
computed: mapState(['user', 'sysData']),
|
|
|
- components: {
|
|
|
- PayDialog
|
|
|
- },
|
|
|
+ // components: {
|
|
|
+ // PayDialog
|
|
|
+ // },
|
|
|
data() {
|
|
|
return {
|
|
|
num: '',
|
|
@@ -97,15 +93,16 @@
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(['checkUserLogin']),
|
|
|
-
|
|
|
+ pageback() {
|
|
|
+ utils.navigateBack()
|
|
|
+ },
|
|
|
tapGetId: function(ev) {
|
|
|
let id = ev.detail.value;
|
|
|
if (id == "") {
|
|
|
this.sendname = '';
|
|
|
return;
|
|
|
}
|
|
|
- this
|
|
|
- .request
|
|
|
+ Request
|
|
|
.post("userCkUserName", {
|
|
|
uid: id,
|
|
|
type: 2
|
|
@@ -122,12 +119,11 @@
|
|
|
|
|
|
tapGetMobile: function(ev) {
|
|
|
let mobile = ev.detail.value;
|
|
|
- if (!this.utils.isPoneAvailable(mobile)) {
|
|
|
+ if (!utils.isPoneAvailable(mobile)) {
|
|
|
this.sendname = '';
|
|
|
return;
|
|
|
}
|
|
|
- this
|
|
|
- .request
|
|
|
+ Request
|
|
|
.post("userCkUserName", {
|
|
|
mobile: mobile,
|
|
|
type: 2
|
|
@@ -136,7 +132,7 @@
|
|
|
if (res.code == 200) {
|
|
|
this.sendname = res.data.name;
|
|
|
} else {
|
|
|
- //this.utils.Tip(res.msg);
|
|
|
+ //utils.Tip(res.msg);
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -154,7 +150,7 @@
|
|
|
*/
|
|
|
getKc: function() {
|
|
|
if (isNaN(this.num)) return "0.00";
|
|
|
- let val = this.utils.returnFloat(this.num * (this.data.lv / 100));
|
|
|
+ let val = utils.returnFloat(this.num * (this.data.lv / 100));
|
|
|
return val;
|
|
|
},
|
|
|
/**
|
|
@@ -162,7 +158,7 @@
|
|
|
*/
|
|
|
allMoney: function() {
|
|
|
if (this.user.integral <= 0) return 0;
|
|
|
- let val = this.utils.returnFloat(this.user.integral * (this.data.lv / 100));
|
|
|
+ let val = utils.returnFloat(this.user.integral * (this.data.lv / 100));
|
|
|
return this.user.integral - parseFloat(val);
|
|
|
},
|
|
|
|
|
@@ -172,21 +168,21 @@
|
|
|
tapSubmit: function() {
|
|
|
|
|
|
if (this.new_mobile == '' && this.type == 'phone') {
|
|
|
- this.utils.Tip("请输入转账号码");
|
|
|
+ utils.Tip("请输入转账号码");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (this.uid == '' && this.type == 'id') {
|
|
|
- this.utils.Tip("请输入转账id");
|
|
|
+ utils.Tip("请输入转账id");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (this.num <= 0 || this.num == '') {
|
|
|
- this.utils.Tip("请输入正确转账金额!");
|
|
|
+ utils.Tip("请输入正确转账金额!");
|
|
|
return;
|
|
|
}
|
|
|
if (parseFloat(this.num) > this.allMoney()) {
|
|
|
- this.utils.Tip("转账金额超过剩余金额");
|
|
|
+ utils.Tip("转账金额超过剩余金额");
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -195,9 +191,8 @@
|
|
|
|
|
|
getPassword: function(val) {
|
|
|
var password = val.password;
|
|
|
- this.utils.loadIng("提交中..");
|
|
|
- this
|
|
|
- .request
|
|
|
+ utils.loadIng("提交中..");
|
|
|
+ Request
|
|
|
.post("integralGive", {
|
|
|
new_password: password,
|
|
|
new_mobile: this.new_mobile,
|
|
@@ -208,17 +203,17 @@
|
|
|
.then(res => {
|
|
|
uni.hideLoading();
|
|
|
if (res.code == 200) {
|
|
|
- this.utils.Tip(res.msg);
|
|
|
+ utils.Tip(res.msg);
|
|
|
setTimeout(function() {
|
|
|
uni.navigateBack();
|
|
|
}, 1000);
|
|
|
} else {
|
|
|
- this.utils.Tip(res.msg);
|
|
|
+ utils.Tip(res.msg);
|
|
|
this.$refs['payDialog'].cleanNum();
|
|
|
}
|
|
|
}).catch(function() {
|
|
|
uni.hideLoading();
|
|
|
- this.utils.Tip("网络错误,请稍后尝试");
|
|
|
+ utils.Tip("网络错误,请稍后尝试");
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -228,14 +223,15 @@
|
|
|
</script>
|
|
|
|
|
|
|
|
|
-<style>
|
|
|
- page {
|
|
|
+<style lang="scss">
|
|
|
+ .page {
|
|
|
background: #F5F5F5;
|
|
|
+ padding: 30rpx;
|
|
|
}
|
|
|
|
|
|
- #box {
|
|
|
- padding-top: 90px;
|
|
|
- z-index: -1;
|
|
|
+ .nav-text {
|
|
|
+ color: #ef4034;
|
|
|
+ font-size: 14px;
|
|
|
}
|
|
|
|
|
|
.topinfo {
|
|
@@ -243,15 +239,14 @@
|
|
|
padding: 40rpx 0;
|
|
|
|
|
|
.count {
|
|
|
- background-size: 100%;
|
|
|
+ text-align: center;
|
|
|
font-size: 24px;
|
|
|
color: #303133;
|
|
|
font-weight: 700;
|
|
|
- background-repeat: no-repeat;
|
|
|
- background-position: 50%;
|
|
|
}
|
|
|
|
|
|
.text {
|
|
|
+ text-align: center;
|
|
|
color: #909399;
|
|
|
font-size: 18px;
|
|
|
}
|