Просмотр исходного кода

2367,2369转账最小额及账户名称

theo 3 лет назад
Родитель
Сommit
358312c13a

+ 43 - 43
backendEle/src/views/config/transfer.vue

@@ -94,53 +94,53 @@
 </template>
 
 <script>
-  import network from '@/utils/network'
-  export default {
-    name: 'config_transfer',
-    mounted() {
-      this.getData()
-    },
-    data() {
-      return {
-        form: {
-          transferOpen: true,
-          allowWallet: [],
-        },
-        loading: true,
-        submitButtonStat: false,
-        allWallet:{'bonus':'会员账户','cash':'现金钱包'}
-      }
-    },
-    methods: {
-      getWalletName(type){
-        return this.allWallet[type]
-      },
-      onSubmit() {
-        this.submitButtonStat = true
-        network.postData('config/transfer', {
-          transferOpen: this.form.transferOpen,
-          allowWallet: this.form.allowWallet,
-        }).then(response => {
-          this.$message({
-            message: response,
-            type: 'success'
-          })
-          this.submitButtonStat = false
-          this.getData()
-        }).catch(response => {
-          this.submitButtonStat = false
-          this.getData()
-        })
+import network from '@/utils/network'
+export default {
+  name: 'config_transfer',
+  mounted () {
+    this.getData()
+  },
+  data () {
+    return {
+      form: {
+        transferOpen: true,
+        allowWallet: []
       },
-      getData() {
-        network.getData('config/transfer').then(response => {
-          this.form.transferOpen = response.transferOpen.VALUE
-          this.form.allowWallet = response.allowWallet.VALUE
-          this.loading = false
+      loading: true,
+      submitButtonStat: false,
+      allWallet: {'bonus': 'Bonus', 'cash': 'Ecoin'}
+    }
+  },
+  methods: {
+    getWalletName (type) {
+      return this.allWallet[type]
+    },
+    onSubmit () {
+      this.submitButtonStat = true
+      network.postData('config/transfer', {
+        transferOpen: this.form.transferOpen,
+        allowWallet: this.form.allowWallet
+      }).then(response => {
+        this.$message({
+          message: response,
+          type: 'success'
         })
-      }
+        this.submitButtonStat = false
+        this.getData()
+      }).catch(response => {
+        this.submitButtonStat = false
+        this.getData()
+      })
+    },
+    getData () {
+      network.getData('config/transfer').then(response => {
+        this.form.transferOpen = response.transferOpen.VALUE
+        this.form.allowWallet = response.allowWallet.VALUE
+        this.loading = false
+      })
     }
   }
+}
 </script>
 
 <style scoped>

+ 10 - 2
frontendApi/modules/v1/controllers/FinanceController.php

@@ -477,7 +477,15 @@ class FinanceController extends BaseController {
         $arr = [];
         foreach ($transferConfig as $key=>$value){
             if($value['isOpen']==0) continue;
-            $arr[]=['typeId'=>$key+1,'out'=>$value['out'],'in'=>$value['in'],'fee'=>$value['fee'],'outName'=>Transfer::WALLET_NAME[$value['out']],'inName'=>Transfer::WALLET_NAME[$value['in']]];
+            $arr[] = [
+                'typeId' => $key+1,
+                'out' => $value['out'],
+                'in' => $value['in'],
+                'fee' => $value['fee'],
+                'outMin' => $value['outMin'],
+                'outName' => Transfer::WALLET_NAME[$value['out']],
+                'inName' => Transfer::WALLET_NAME[$value['in']]
+            ];
         }
         if(count($arr)==0){
             return static::notice('没有可用的转账类型', 400);
@@ -558,4 +566,4 @@ class FinanceController extends BaseController {
         }
     }
 
-}
+}

+ 4 - 1
frontendEle/src/views/finance/transfer-add.vue

@@ -30,7 +30,7 @@
         <!--</el-form-item>-->
         <el-form-item label="Transfer amount" style="margin-bottom: 0;"> <!-- 转账金额 -->
           <el-input v-model="form.amount" type="number" :min="minAmount" :max="maxAmount" @change="chkReal"></el-input>
-          <span style="font-size: 8pt;color: #909399;">Each transfer shall not be less than 5000 NGN</span> <!-- 每次转账不得少于100 -->
+          <span style="font-size: 8pt;color: #909399;">Each transfer shall not be less than {{ outMin }} NGN</span> <!-- 每次转账不得少于100 -->
         </el-form-item>
         <el-form-item label="Service charge" v-show="fee!=='0'"> <!-- 手续费 -->
           <el-tag type="info">{{fee}}%</el-tag>
@@ -81,6 +81,7 @@ export default {
       minAmount: 0,
       maxAmount: 0,
       fee: '0',
+      outMin: 0,
       realAmount: 0,
       transferProp: 0,
       bonus: 0,
@@ -119,6 +120,7 @@ export default {
     handleTypeChange () {
       // 奖金转现金
       this.fee = this.transferConfig[this.form.type - 1].fee
+      this.outMin = this.transferConfig[this.form.type - 1].outMin
     },
     chkTransferUserinfo () {
       network.getData(`finance/chk-transfer-user`).then(response => {
@@ -126,6 +128,7 @@ export default {
         this.userInfo = response.userInfo
         this.transferConfig = response.transferConfig
         this.minAmount = response.minAmount
+        this.outMin = this.transferConfig[0].outMin
         this.handleTypeChange()
         this.getBalance()
       }).catch(() => {