|
@@ -1,25 +1,20 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
-
|
|
|
- <uni-nav-bar :border="false" statusBar left-icon="left" @clickLeft="utils.navigateBack()" @clickRight="tapOpenLog" fixed title="趣豆转账">
|
|
|
+ <uni-nav-bar :border="false" statusBar left-icon="left" @clickLeft="utils.navigateBack()"
|
|
|
+ @clickRight="tapOpenLog" fixed title="趣豆转账">
|
|
|
<view style="color: #ef4034;" slot="right">
|
|
|
转账记录
|
|
|
</view>
|
|
|
</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>
|
|
|
+ <text>转账类型</text>
|
|
|
</view>
|
|
|
<view class="il-bot fx-r fx-bc fx-ac">
|
|
|
<uv-radio-group v-model="type">
|
|
@@ -29,57 +24,45 @@
|
|
|
</uv-radio-group>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
+
|
|
|
<view class="info-line" v-if="type == 'id'">
|
|
|
<view class="il-top">
|
|
|
- <text>收款人id</text>
|
|
|
+ <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="info-line" v-if="type == 'phone'">
|
|
|
<view class="il-top">
|
|
|
- <text>手机号码</text>
|
|
|
+ <text>手机号码</text>
|
|
|
</view>
|
|
|
<view class="il-bot">
|
|
|
<input placeholder="转账手机号码" @input="tapGetMobile" type="number" v-model="new_mobile" />
|
|
|
<view class="name">{{ sendname }}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
<view class="info-line">
|
|
|
<view class="il-top">
|
|
|
<text>转账金额</text>
|
|
|
</view>
|
|
|
<view class="il-code">
|
|
|
<view class="etb-left">
|
|
|
- <input placeholder="请输入转账金额" placeholder-class="placeholder-class" v-model="num" />
|
|
|
+ <input placeholder="请输入转账金额" placeholder-class="placeholder-class" v-model="num" />
|
|
|
</view>
|
|
|
<!-- <view class="etb-right" @click="num = allMoney()">
|
|
|
<text>全部</text>
|
|
|
</view> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
<view class="info-line">
|
|
|
-
|
|
|
-
|
|
|
- <view class="update-btn" @click="tapSubmit">
|
|
|
+ <view class="update-btn" @click="tapSubmit">
|
|
|
<text>确认转账</text>
|
|
|
</view>
|
|
|
-
|
|
|
<view style="height: 10px;"></view>
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- <PayDialog ref="payDialog" @getPassword="getPassword"></PayDialog>
|
|
|
-
|
|
|
+ <PayDialog ref="payDialog" @getPassword="getPassword"></PayDialog>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -90,143 +73,155 @@
|
|
|
} from 'vuex';
|
|
|
import PayDialog from "@/components/ui-pay/payDialog.vue";
|
|
|
export default {
|
|
|
- computed: mapState(['user','sysData']),
|
|
|
- components:{
|
|
|
+ computed: mapState(['user', 'sysData']),
|
|
|
+ components: {
|
|
|
PayDialog
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- num:'',
|
|
|
- type : "id",
|
|
|
- new_mobile : "",
|
|
|
- uid : "",
|
|
|
- sendname : "",
|
|
|
- data : {
|
|
|
- lv : 0
|
|
|
+ num: '',
|
|
|
+ type: "id",
|
|
|
+ new_mobile: "",
|
|
|
+ uid: "",
|
|
|
+ sendname: "",
|
|
|
+ data: {
|
|
|
+ lv: 0
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- this.checkUserLogin({page:this,isLogion:false});
|
|
|
+ this.checkUserLogin({
|
|
|
+ page: this,
|
|
|
+ isLogion: false
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations(['checkUserLogin']),
|
|
|
-
|
|
|
- tapGetId:function(ev){
|
|
|
+
|
|
|
+ tapGetId: function(ev) {
|
|
|
let id = ev.detail.value;
|
|
|
- if(id == "") {
|
|
|
+ if (id == "") {
|
|
|
this.sendname = '';
|
|
|
return;
|
|
|
}
|
|
|
this
|
|
|
.request
|
|
|
- .post("userCkUserName",{uid : id,type : 2})
|
|
|
+ .post("userCkUserName", {
|
|
|
+ uid: id,
|
|
|
+ type: 2
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
- if(res.code == 200) {
|
|
|
+ if (res.code == 200) {
|
|
|
this.sendname = res.data.name;
|
|
|
} else {
|
|
|
this.sendname = "";
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
- tapGetMobile:function(ev){
|
|
|
+
|
|
|
+
|
|
|
+ tapGetMobile: function(ev) {
|
|
|
let mobile = ev.detail.value;
|
|
|
- if(!this.utils.isPoneAvailable(mobile)) {
|
|
|
+ if (!this.utils.isPoneAvailable(mobile)) {
|
|
|
this.sendname = '';
|
|
|
return;
|
|
|
}
|
|
|
this
|
|
|
.request
|
|
|
- .post("userCkUserName",{mobile : mobile,type : 2})
|
|
|
+ .post("userCkUserName", {
|
|
|
+ mobile: mobile,
|
|
|
+ type: 2
|
|
|
+ })
|
|
|
.then(res => {
|
|
|
- if(res.code == 200) {
|
|
|
+ if (res.code == 200) {
|
|
|
this.sendname = res.data.name;
|
|
|
} else {
|
|
|
//this.utils.Tip(res.msg);
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
-
|
|
|
- tapOpenLog:function(){
|
|
|
- uni.navigateTo({ url:"integral_gift_log"});
|
|
|
+
|
|
|
+ tapOpenLog: function() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "integral_gift_log"
|
|
|
+ });
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 预计扣除
|
|
|
*/
|
|
|
- getKc:function(){
|
|
|
- if(isNaN(this.num)) return "0.00";
|
|
|
+ getKc: function() {
|
|
|
+ if (isNaN(this.num)) return "0.00";
|
|
|
let val = this.utils.returnFloat(this.num * (this.data.lv / 100));
|
|
|
return val;
|
|
|
},
|
|
|
/**
|
|
|
* 全部
|
|
|
*/
|
|
|
- allMoney:function(){
|
|
|
- if(this.user.integral <= 0) return 0;
|
|
|
+ allMoney: function() {
|
|
|
+ if (this.user.integral <= 0) return 0;
|
|
|
let val = this.utils.returnFloat(this.user.integral * (this.data.lv / 100));
|
|
|
return this.user.integral - parseFloat(val);
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 提交数据
|
|
|
*/
|
|
|
- tapSubmit:function(){
|
|
|
-
|
|
|
- if(this.new_mobile == '' && this.type == 'phone'){
|
|
|
+ tapSubmit: function() {
|
|
|
+
|
|
|
+ if (this.new_mobile == '' && this.type == 'phone') {
|
|
|
this.utils.Tip("请输入转账号码");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- if(this.uid == '' && this.type == 'id'){
|
|
|
+
|
|
|
+ if (this.uid == '' && this.type == 'id') {
|
|
|
this.utils.Tip("请输入转账id");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- if(this.num <= 0 || this.num == ''){
|
|
|
+
|
|
|
+ if (this.num <= 0 || this.num == '') {
|
|
|
this.utils.Tip("请输入正确转账金额!");
|
|
|
return;
|
|
|
}
|
|
|
- if(parseFloat(this.num) > this.allMoney()){
|
|
|
+ if (parseFloat(this.num) > this.allMoney()) {
|
|
|
this.utils.Tip("转账金额超过剩余金额");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.$refs['payDialog'].show();
|
|
|
},
|
|
|
-
|
|
|
- getPassword : function(val){
|
|
|
+
|
|
|
+ getPassword: function(val) {
|
|
|
var password = val.password;
|
|
|
this.utils.loadIng("提交中..");
|
|
|
this
|
|
|
.request
|
|
|
- .post("integralGive",
|
|
|
- {
|
|
|
- new_password : password,
|
|
|
- new_mobile : this.new_mobile,
|
|
|
- num : this.num,
|
|
|
- uid : this.uid,
|
|
|
- type : this.type
|
|
|
- })
|
|
|
- .then(res=>{
|
|
|
+ .post("integralGive", {
|
|
|
+ new_password: password,
|
|
|
+ new_mobile: this.new_mobile,
|
|
|
+ num: this.num,
|
|
|
+ uid: this.uid,
|
|
|
+ type: this.type
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
uni.hideLoading();
|
|
|
- if(res.code == 200) {
|
|
|
+ if (res.code == 200) {
|
|
|
this.utils.Tip(res.msg);
|
|
|
- setTimeout(function(){ uni.navigateBack();},1000);
|
|
|
- }else{
|
|
|
+ setTimeout(function() {
|
|
|
+ uni.navigateBack();
|
|
|
+ }, 1000);
|
|
|
+ } else {
|
|
|
this.utils.Tip(res.msg);
|
|
|
this.$refs['payDialog'].cleanNum();
|
|
|
}
|
|
|
- }).catch(function(){
|
|
|
+ }).catch(function() {
|
|
|
uni.hideLoading();
|
|
|
this.utils.Tip("网络错误,请稍后尝试");
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
|
|
|
}
|
|
@@ -242,23 +237,25 @@
|
|
|
padding-top: 90px;
|
|
|
z-index: -1;
|
|
|
}
|
|
|
-
|
|
|
- .topinfo{
|
|
|
- background: #fff;
|
|
|
- padding: 40rpx 0;
|
|
|
- .count{
|
|
|
- background-size: 100%;
|
|
|
- font-size: 24px;
|
|
|
- color: #303133;
|
|
|
- font-weight: 700;
|
|
|
- background-repeat: no-repeat;
|
|
|
- background-position: 50%;
|
|
|
- }
|
|
|
- .text{
|
|
|
- color: #909399;
|
|
|
- font-size: 18px;
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ .topinfo {
|
|
|
+ background: #fff;
|
|
|
+ padding: 40rpx 0;
|
|
|
+
|
|
|
+ .count {
|
|
|
+ background-size: 100%;
|
|
|
+ font-size: 24px;
|
|
|
+ color: #303133;
|
|
|
+ font-weight: 700;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-position: 50%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text {
|
|
|
+ color: #909399;
|
|
|
+ font-size: 18px;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.info-line {
|
|
@@ -283,7 +280,12 @@
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
- .il-bot .name{position: absolute;right: 10px;top: 0px;}
|
|
|
+
|
|
|
+ .il-bot .name {
|
|
|
+ position: absolute;
|
|
|
+ right: 10px;
|
|
|
+ top: 0px;
|
|
|
+ }
|
|
|
|
|
|
.update-btn {
|
|
|
width: 90%;
|
|
@@ -332,14 +334,48 @@
|
|
|
color: #999;
|
|
|
border-radius: 100px;
|
|
|
}
|
|
|
-
|
|
|
- .etb-left{width:80%;height:100%}
|
|
|
- .placeholder-class{color:#7e7e7e;font-size:13px;font-weight:400}
|
|
|
- .etb-left input{width:100%;height:100%;color:#484747;font-size:22px;font-weight:600}
|
|
|
- .etb-right{margin-left:auto;color:#2d2438;font-size:13px}
|
|
|
-
|
|
|
- .tip{font-size: 14px;padding: 10px 0;color: #ef4034;}
|
|
|
- .tip-info{padding: 5px 0;}
|
|
|
- .tip-info .label{color: #000;font-weight: bold;}
|
|
|
- .tip-info .money{color: orangered;}
|
|
|
-</style>
|
|
|
+
|
|
|
+ .etb-left {
|
|
|
+ width: 80%;
|
|
|
+ height: 100%
|
|
|
+ }
|
|
|
+
|
|
|
+ .placeholder-class {
|
|
|
+ color: #7e7e7e;
|
|
|
+ font-size: 13px;
|
|
|
+ font-weight: 400
|
|
|
+ }
|
|
|
+
|
|
|
+ .etb-left input {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ color: #484747;
|
|
|
+ font-size: 22px;
|
|
|
+ font-weight: 600
|
|
|
+ }
|
|
|
+
|
|
|
+ .etb-right {
|
|
|
+ margin-left: auto;
|
|
|
+ color: #2d2438;
|
|
|
+ font-size: 13px
|
|
|
+ }
|
|
|
+
|
|
|
+ .tip {
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 10px 0;
|
|
|
+ color: #ef4034;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tip-info {
|
|
|
+ padding: 5px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tip-info .label {
|
|
|
+ color: #000;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tip-info .money {
|
|
|
+ color: orangered;
|
|
|
+ }
|
|
|
+</style>
|