Sfoglia il codice sorgente

不能给自己转账,恢复原来

theojeng 3 anni fa
parent
commit
0f13189868

+ 0 - 3
common/models/forms/TransferForm.php

@@ -301,9 +301,6 @@ class TransferForm extends Model {
         if (!$this->validate()) {
             return null;
         }
-        if ($this->_fromUserInfo['ID']==$this->_toUserInfo['ID']){
-            throw new \Exception('不能给自己转账');
-        }
         $fromData = Balance::getLogData($this->_fromUserInfo['ID']);
         $toData = Balance::getLogData($this->_toUserInfo['ID']);
         $this->userOperateLogger->saveBeforeContent=array_merge($fromData,$toData);

+ 9 - 18
frontendEle/src/views/finance/transfer-add.vue

@@ -58,7 +58,6 @@ 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',
@@ -96,23 +95,15 @@ export default {
     }
   },
   methods: {
-      handleChange() {
-          if (this.form.toUserName.trim() != userInfo.userName()){
-              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
-              })
-          } else {
-            this.form.toUserName = ''
-            this.$message({
-              message: '不能给自己转账',
-              type: 'error'
-            })
-          }
-      },
+    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
+      })
+    },
     chkReal(){
       this.realAmount = tool.formatPrice(this.form.amount * (100-this.fee) * 0.01)
     },