theo 3 vuotta sitten
vanhempi
commit
231ce9109d

+ 6 - 6
backendApi/config/menu.php

@@ -424,7 +424,7 @@ return [
         ]
     ],
     'ad'=>[
-        'name'=>'广告管理',
+        'name'=>'Ad Management',
         'class' => '',
         'icon'=>'el-icon-picture-outline',
         'controller'=>'ad',
@@ -432,11 +432,11 @@ return [
         'routePath'=>'ad',
         'show'=>1,
         'child'=>[
-            ['name'=>'广告位', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'location', 'routePath'=>'ad/location', 'show'=>1,],
-            ['name'=>'广告列表', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'list', 'routePath'=>'ad/list', 'show'=>0,],
-            ['name'=>'添加广告', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'add', 'routePath'=>'ad/add', 'show'=>0,],
-            ['name'=>'编辑广告', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'edit', 'routePath'=>'ad/edit', 'show'=>0,],
-            ['name'=>'删除广告', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'ad-delete', 'routePath'=>'ad/ad-delete', 'show'=>0,],
+            ['name'=>'Ad', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'location', 'routePath'=>'ad/location', 'show'=>1,],
+            ['name'=>'Ad list', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'list', 'routePath'=>'ad/list', 'show'=>0,],
+            ['name'=>'Add', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'add', 'routePath'=>'ad/add', 'show'=>0,],
+            ['name'=>'Edit', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'edit', 'routePath'=>'ad/edit', 'show'=>0,],
+            ['name'=>'Delete', 'class'=>'', 'icon'=>'', 'controller'=>'ad', 'action'=>'ad-delete', 'routePath'=>'ad/ad-delete', 'show'=>0,],
         ]
     ],
     'log'=>[

+ 13 - 13
backendApi/modules/v1/models/lists/user/IndexList.php

@@ -211,19 +211,19 @@ class IndexList extends \common\libs\dataList\DataList implements DataListInterf
                     'header' => 'Resettlement area',//安置区域
                     'headerOther' => ['width' => '100'],
                 ],
-                'ID_TYPE' => [
-                    'header' => 'Document type',//证件类型
-                    'value' => function($row) {
-                        return $row['ID_TYPE'] == 0 ? 'Identity No.' : '';//'身份证' : ''
-                    },
-                ],
-                'ID_CARD' => [
-                    'header' => 'Identification Number',//证件号码
-                    'value' => function($row) {
-                        return "\t".$row['ID_CARD'];
-                    },
-                    'headerOther' => ['width' => '180'],
-                ],
+//                'ID_TYPE' => [
+//                    'header' => 'Document type',//证件类型
+//                    'value' => function($row) {
+//                        return $row['ID_TYPE'] == 0 ? 'Identity No.' : '';//'身份证' : ''
+//                    },
+//                ],
+//                'ID_CARD' => [
+//                    'header' => 'Identification Number',//证件号码
+//                    'value' => function($row) {
+//                        return "\t".$row['ID_CARD'];
+//                    },
+//                    'headerOther' => ['width' => '180'],
+//                ],
 //                'SPOUSE_NAME' => [
 //                    'header' => '配偶姓名',
 //                    'headerOther' => ['width' => '100'],

+ 6 - 6
backendEle/src/components/WithdrawTable.vue

@@ -68,14 +68,14 @@
           {{(scope.row.BASE_INFO.STATUS_NAME)}}
         </template>
       </el-table-column>
-      <el-table-column label="身份证号" width="170">
-        <template slot-scope="scope">
-          {{scope.row.BASE_INFO.ID_CARD}}
-        </template>
-      </el-table-column>
+<!--      <el-table-column label="身份证号" width="170">-->
+<!--        <template slot-scope="scope">-->
+<!--          {{scope.row.BASE_INFO.ID_CARD}}-->
+<!--        </template>-->
+<!--      </el-table-column>-->
       <el-table-column label="提现方式">
         <template slot-scope="scope">
-          {{scope.row.IS_AUTO_WITHDRAW==='1'?'自动提现':'手动提现'}}
+          {{scope.row.IS_AUTO_WITHDRAW==='1'?'auto withdrawal':'manual withdrawal'}}
         </template>
       </el-table-column>
       <el-table-column label="提现金额" width="110">

+ 2 - 2
backendEle/src/router/index.js

@@ -1651,10 +1651,10 @@ export const constantRouterMap = [
         component: _import('ad/location'),
         name: 'ad_location',
         meta: {
-          title: '广告位',
+          title: 'Ad',
           breadcrumb: [
             {title: 'Dashboard', path: '/dashboard/index'},
-            {title: '广告管理', path: '/ad/location'},
+            {title: 'Ad management', path: '/ad/location'},
           ],
         },
       },

+ 9 - 9
backendEle/src/views/ad/location.vue

@@ -2,40 +2,40 @@
   <div v-loading="loading">
     <div class="white-box">
       <el-table :data="tableData" stripe style="width: 100%;">
-        <el-table-column label="广告位名称" prop="LOCATION_NAME">
+        <el-table-column label="Ad" prop="LOCATION_NAME"> <!-- 广告位名称 -->
           <template slot-scope="scope">
             <el-tag type="warning" size="small" class="no-border">{{scope.row.LOCATION_NAME}}</el-tag>
           </template>
         </el-table-column>
-        <el-table-column label="描述" prop="REMARK"></el-table-column>
-        <el-table-column label="类型">
+        <el-table-column label="Description" prop="REMARK"></el-table-column> <!-- 描述 -->
+        <el-table-column label="Type"> <!-- 类型 -->
           <template slot-scope="scope">
             <template v-if="scope.row.TYPE === '1'">
-              <el-tag type="success">幻灯</el-tag>
+              <el-tag type="success">幻灯</el-tag> <!-- 幻灯 -->
             </template>
             <template v-else-if="scope.row.TYPE === '2'">
-              <el-tag>图片</el-tag>
+              <el-tag>Image</el-tag> <!-- 图片 -->
             </template>
           </template>
         </el-table-column>
-        <el-table-column label="创建人">
+        <el-table-column label="Creator"> <!-- 创建人 -->
           <template slot-scope="scope">
             {{scope.row.CREATE_ADMIN_NAME}}
           </template>
         </el-table-column>
-        <el-table-column label="创建时间">
+        <el-table-column label="Create time"> <!-- 创建时间 -->
           <template slot-scope="scope">
             {{tool.formatDate(scope.row.CREATED_AT)}}
           </template>
         </el-table-column>
-        <el-table-column fixed="right" label="操作" width="180">
+        <el-table-column fixed="right" label="Action" width="180"> <!-- 操作 -->
           <template slot-scope="scope">
             <el-dropdown size="small" trigger="click" v-if="permission.hasPermission(`ad/list`)">
               <el-button type="primary" size="small" @click.stop="">
                 Operate on this data<i class="el-icon-arrow-down el-icon--right"></i>
               </el-button>
               <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item command="edit" @click.native="handleShow(scope.row)">查看</el-dropdown-item>
+                <el-dropdown-item command="edit" @click.native="handleShow(scope.row)">查看</el-dropdown-item> <!--  -->
               </el-dropdown-menu>
             </el-dropdown>
           </template>

+ 1 - 1
backendEle/src/views/user/reg-info-audit.vue

@@ -50,7 +50,7 @@
         </el-table-column>
         <el-table-column label="提现方式">
           <template slot-scope="scope">
-            {{scope.row.BASE_INFO.IS_AUTO_WITHDRAW?'自动提现':'手动提现'}}
+            {{scope.row.BASE_INFO.IS_AUTO_WITHDRAW?'auto withdrawal':'manual withdrawal'}}
           </template>
         </el-table-column>
         <el-table-column label="手机号码" width="110">

+ 1 - 1
backendEle/src/views/user/reg-info.vue

@@ -44,7 +44,7 @@
         </el-table-column>
         <el-table-column label="提现方式">
           <template slot-scope="scope">
-            {{scope.row.BASE_INFO.IS_AUTO_WITHDRAW?'自动提现':'手动提现'}}
+            {{scope.row.BASE_INFO.IS_AUTO_WITHDRAW?'auto withdrawal':'manual withdrawal'}} <!-- 自动提现 手动提现 -->
           </template>
         </el-table-column>
         <el-table-column label="手机号码" width="110">

+ 1 - 1
common/config/params.php

@@ -57,7 +57,7 @@ return [
         ],
         'transfer_out' => [
             'value' => 'transfer_out',
-            'label' => 'Rransfer out',//转出
+            'label' => 'Transfer out',//转出
         ],
         'transfer_in' => [
             'value' => 'transfer_in',

+ 3 - 3
common/helpers/bonus/BonusSend.php

@@ -314,7 +314,7 @@ class BonusSend extends BaseObject {
                     if ($periodAmount > 0) {
                         Balance::changeUserBonus($data['USER_ID'], 'bonus', $periodAmount, [
                             'CALC_ID' => $data['ID'],
-                            'REMARK' => 'From ' . $periodNum . '期',
+                            'REMARK' => 'From Period ' . $periodNum,
                             'PERIOD_NUM' => $periodNum,
                             'QY' => $data['BONUS_QY'],
                             'FW' => $data['BONUS_FW'],
@@ -359,7 +359,7 @@ class BonusSend extends BaseObject {
                     if ($data['BONUS_TOURISM'] > 0) {
                         Balance::changeUserBonus($data['USER_ID'], 'tourism_points', $data['BONUS_TOURISM'], [
                             'CALC_ID' => $data['ID'],
-                            'REMARK' => 'From ' . $periodNum . '期',
+                            'REMARK' => 'From Period ' . $periodNum,
                             'PERIOD_NUM' => $periodNum,
                             'TOURISM_POINTS' => $data['BONUS_TOURISM'],
                             'DEAL_TYPE_ID' => DealType::TOURISM_SEND,
@@ -371,7 +371,7 @@ class BonusSend extends BaseObject {
                     if ($data['BONUS_GARAGE'] > 0) {
                         Balance::changeUserBonus($data['USER_ID'], 'garage_points', $data['BONUS_GARAGE'], [
                             'CALC_ID' => $data['ID'],
-                            'REMARK' => 'From ' . $periodNum . '期',
+                            'REMARK' => 'From Period ' . $periodNum,
                             'PERIOD_NUM' => $periodNum,
                             'GARAGE_POINTS' => $data['BONUS_GARAGE'],
                             'DEAL_TYPE_ID' => DealType::GARAGE_SEND,

+ 2 - 1
common/models/UserNetwork.php

@@ -265,13 +265,14 @@ class UserNetwork extends \common\components\ActiveRecord
             foreach($allData as $key=>$data){
                 // 获取用户的基本信息
                 $baseInfo = Info::baseInfo($data['USER_ID'], $periodNum);
+
                 $allData[$key] = array_merge($data, [
                     'USER_NAME' => $baseInfo['USER_NAME'],
                     'TOP_NETWORK_DEEP' => $data['TOP_DEEP'],
                     'REAL_NAME' => $baseInfo['REAL_NAME'],
                     'DEC_LV_NAME' => $decLevelConfig[$baseInfo['DEC_LV']]['LEVEL_NAME'],
                     'EMP_LV_NAME' => isset($empLevelConfig[$baseInfo['EMP_LV']])?$empLevelConfig[$baseInfo['EMP_LV']]['LEVEL_NAME']:'',
-                    'STAR_LV_NAME' => $starLevelConfig[$baseInfo['STAR_LV']]['LEVEL_NAME'],
+                    'STAR_LV_NAME' => isset($starLevelConfig[$baseInfo['STAR_LV']])?$starLevelConfig[$baseInfo['STAR_LV']]['LEVEL_NAME']:'',
 //                    'MOBILE' => $baseInfo['MOBILE'],
                     'PERIOD_AT' => $baseInfo['PERIOD_AT'],
                 ]);

+ 1 - 1
common/models/UserRelation.php

@@ -215,7 +215,7 @@ class UserRelation extends \common\components\ActiveRecord
                     'REAL_NAME' => $baseInfo['REAL_NAME'],
                     'DEC_LV_NAME' => $decLevelConfig[$baseInfo['DEC_LV']]['LEVEL_NAME'],
                     'EMP_LV_NAME' => isset($empLevelConfig[$baseInfo['EMP_LV']])?$empLevelConfig[$baseInfo['EMP_LV']]['LEVEL_NAME']:'',
-                    'STAR_LV_NAME' => $starLevelConfig[$baseInfo['STAR_LV']]['LEVEL_NAME'],
+                    'STAR_LV_NAME' => isset($starLevelConfig[$baseInfo['STAR_LV']])?$starLevelConfig[$baseInfo['STAR_LV']]['LEVEL_NAME']:'',
                     'PERIOD_AT' => $baseInfo['PERIOD_AT'],
                 ]);
                 // 获取字节点数量

+ 6 - 6
common/models/Withdraw.php

@@ -66,13 +66,13 @@ class Withdraw extends \common\components\ActiveRecord {
     const STATUS_RETURN = 7;        // 提现退回
 
     const STATUS_NAME = [
-        self::STATUS_APPLIED => '提现待审核',
+        self::STATUS_APPLIED => 'Applied', // 提现待审核
 //        self::STATUS_INVOICED => '提现待审核',
-        self::STATUS_AUDITED => '提现已审核',
-        self::STATUS_WAIT_PAID => '提现待付款',
-        self::STATUS_PAID_FALSE => '付款失败',
-        self::STATUS_REFUSED => '已拒绝',
-        self::STATUS_PAID => '提现已付款',
+        self::STATUS_AUDITED => 'Withdrawal has been reviewed', // 提现已审核
+        self::STATUS_WAIT_PAID => 'Unpaid', // 提现待付款
+        self::STATUS_PAID_FALSE => 'Failed', // 付款失败
+        self::STATUS_REFUSED => 'Refused', // 已拒绝
+        self::STATUS_PAID => 'Withdrawal has been paid', // 提现已付款
         self::STATUS_RETURN => '已退回',
     ];
 

+ 1 - 1
common/models/forms/WithdrawForm.php

@@ -303,7 +303,7 @@ class WithdrawForm extends Model {
             $nowTime = $this->createdAt ? $this->createdAt : Date::nowTime();
             $period = Withdraw::getPeriod($nowTime);
             //扣除会员奖金
-            Balance::changeUserBonus($this->_userId, 'BONUS', -abs($this->applyAmount), ['DEAL_TYPE_ID'=>DealType::WITHDRAW,'REMARK' => $period['nowPeriodNum'].'期'.($this->scenario == 'addByAuto' ? '自动提现' : '手动提现'), 'TIME' => $nowTime]);
+            Balance::changeUserBonus($this->_userId, 'BONUS', -abs($this->applyAmount), ['DEAL_TYPE_ID'=>DealType::WITHDRAW,'REMARK' => 'Period '. $period['nowPeriodNum'].' '.($this->scenario == 'addByAuto' ? 'auto withdrawal' : 'manual withdrawal'), 'TIME' => $nowTime]);
             //增加记录
             $userInfo = Info::baseInfo($this->_userId);
 

+ 1 - 1
frontendApi/modules/v1/controllers/BonusController.php

@@ -682,7 +682,7 @@ class BonusController extends BaseController {
             $formModel = new WithdrawForm();
             $formModel->scenario = 'addByUser';
             if ($formModel->load(\Yii::$app->request->post(), '') && $formModel->add()) {
-                return static::notice('提现申请已提交,请等待审核');
+                return static::notice('Withdrawal application has been submitted, please wait for review.'); // 提现申请已提交,请等待审核
             } else {
                 return static::notice(Form::formatErrorsForApi($formModel->getErrors()), 400);
             }

+ 6 - 1
frontendApi/modules/v1/controllers/FinanceController.php

@@ -470,6 +470,7 @@ class FinanceController extends BaseController {
         if($isCanTransferProp==0){
             $userInfo['TRANSFER_PROP']=100;
         }
+        $minAmount = Cache::getSystemConfig()['manualWithdrawMinAmount']['VALUE'] ?? 0;
         //获取转账的设置
         $transferConfig = Json::decode($sysConfig['allowWallet']['VALUE']);
         $arr = [];
@@ -480,7 +481,11 @@ class FinanceController extends BaseController {
         if(count($arr)==0){
             return static::notice('没有可用的转账类型', 400);
         }
-        return static::notice(['userInfo' => $userInfo, 'transferConfig'=>$arr]);
+        return static::notice([
+            'userInfo' => $userInfo,
+            'transferConfig'=>$arr,
+            'minAmount' => $minAmount,
+        ]);
     }
 
     /**

+ 48 - 48
frontendEle/src/views/finance/transfer-add.vue

@@ -29,7 +29,7 @@
           <!--<el-input v-model="form.toRealName"></el-input>-->
         <!--</el-form-item>-->
         <el-form-item label="Transfer amount" style="margin-bottom: 0;"> <!-- 转账金额 -->
-          <el-input v-model="form.amount" type="number" :max="maxAmount" @change="chkReal"></el-input>
+          <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 -->
         </el-form-item>
         <el-form-item label="手续费" v-show="fee!=='0'"> <!-- 手续费 -->
@@ -77,6 +77,7 @@ export default {
       },
       balance: 0,
       cash: 0,
+      minAmount: 0,
       maxAmount: 0,
       fee: '0',
       realAmount: 0,
@@ -90,15 +91,15 @@ 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
-          })
-      },
+    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)
     },
@@ -114,6 +115,7 @@ export default {
         this.loading = false
         this.userInfo = response.userInfo
         this.transferConfig = response.transferConfig
+        this.minAmount = response.minAmount
         this.handleTypeChange()
         this.getBalance()
       }).catch(() => {
@@ -138,48 +140,46 @@ export default {
       this.transferProp = this.userInfo.TRANSFER_PROP
     },
     onSubmit () {
-        this.submitButtonStat = true
-        let path = 'finance/transfer-add'
+      this.submitButtonStat = true
+      let path = 'finance/transfer-add'
 
-        network.getData('finance/mult-point').then(response => {
-            this.form.transferCode = response.transferCode
+      network.getData('finance/mult-point').then(response => {
+        this.form.transferCode = response.transferCode
 
-            this.$prompt('请输入支付密码', '提示', {
-                confirmButtonText: 'Confirm',
-                cancelButtonText: 'Cancel',
-                inputType: 'password',
-                inputPattern: /\S+/,
-                inputErrorMessage: '请输入支付密码',
-                beforeClose:async (action, instance, done)=>{
-                    if (action === 'confirm') {
-                        instance.confirmButtonLoading = true;
-                        instance.confirmButtonText = '执行中...';
-                        console.log(instance.inputValue);
-                        this.form.payPassword = instance.inputValue;
-                        await network.postData(path, this.form).then(response => {
+        this.$prompt('Please enter your payment password', 'Notice', {
+          confirmButtonText: 'Confirm',
+          cancelButtonText: 'Cancel',
+          inputType: 'password',
+          inputPattern: /\S+/,
+          inputErrorMessage: '请输入支付密码',
+          beforeClose:async (action, instance, done)=>{
+            if (action === 'confirm') {
+              instance.confirmButtonLoading = true;
+              instance.confirmButtonText = '执行中...';
+              console.log(instance.inputValue);
+              this.form.payPassword = instance.inputValue;
+              await network.postData(path, this.form).then(response => {
 
-                            instance.confirmButtonLoading = false;
-                            done();
-                            this.$message({
-                                message: response,
-                                type: 'success'
-                            })
-                            this.submitButtonStat = false
-                            this.$router.go(-1)
-                        }).catch(error=>{
-                            instance.confirmButtonLoading = false;
-                            this.submitButtonStat = false
-                            done();
-                        })
-                    }else {
-                        this.submitButtonStat = false
-                        done();
-                    }
-                }
-            })
+                instance.confirmButtonLoading = false;
+                done();
+                this.$message({
+                  message: response,
+                  type: 'success'
+                })
+                this.submitButtonStat = false
+                this.$router.go(-1)
+              }).catch(error=>{
+                instance.confirmButtonLoading = false;
+                this.submitButtonStat = false
+                done();
+              })
+            }else {
+              this.submitButtonStat = false
+              done();
+            }
+          }
         })
-
-
+      })
     },
   }
 }