|
|
@@ -54,6 +54,7 @@ import Vue from 'vue'
|
|
|
import store from '@/utils/vuexStore'
|
|
|
import network from '@/utils/network'
|
|
|
import tool from '@/utils/tool'
|
|
|
+import userInfo from '@/utils/userInfo'
|
|
|
|
|
|
export default {
|
|
|
name: 'finance_withdraw-add',
|
|
|
@@ -92,13 +93,22 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
handleChange () {
|
|
|
- this.loading = true
|
|
|
- network.getData('user/full-info', {userName: this.form.toUserName}).then(response => {
|
|
|
- this.form.toRealName = response.REAL_NAME
|
|
|
- this.loading = false
|
|
|
- }).catch(response => {
|
|
|
- this.loading = false
|
|
|
- })
|
|
|
+ if (this.form.toUserName.trim() != userInfo.userName()){
|
|
|
+ this.loading = true
|
|
|
+ network.getData('user/full-info', {userName: this.form.toUserName}).then(response => {
|
|
|
+ console.log(userInfo.userName())
|
|
|
+ this.form.toRealName = response.REAL_NAME
|
|
|
+ this.loading = false
|
|
|
+ }).catch(response => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.form.toUserName = ''
|
|
|
+ this.$message({
|
|
|
+ message: 'Not allowed to transfer to yourself',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
chkReal () {
|
|
|
this.realAmount = tool.formatPrice(this.form.amount * (100 - this.fee) * 0.01)
|