Преглед изворни кода

BA会员首页广告轮播图;用户修改

kevin_zhangl пре 3 година
родитељ
комит
e0bfa4a8db

+ 9 - 9
common/models/forms/BaUserForm.php

@@ -73,7 +73,7 @@ class BaUserForm extends Model
     public function rules()
     {
         return [
-            [['userId', 'userName', 'zcPv', 'zcAmount', 'conUserName', 'recUserName','conUid', 'recUid', 'location','nation','realName', 'mobile','openBank','bankAddress','bankNo', 'email'], 'trim'],
+            [['userId', 'userName', 'zcPv', 'zcAmount', 'conUserName', 'recUserName','conUid', 'recUid', 'location',/* 'nation', */'realName', /* 'mobile','openBank','bankAddress','bankNo', */ 'email'], 'trim'],
             [['userId', 'userName',/* 'zcPv', 'zcAmount',*/ 'conUid', 'recUid', 'location'], 'required', 'on'=>'addWithUid'],
             [['userId', 'userName',/* 'zcPv', 'zcAmount', 'conUserName',*/ 'recUserName',/* 'location'*/], 'required', 'on'=>['addWithUserName', 'addByAdmin']],
             [['idCard', 'allData'], 'required', 'on'=>['addWithUserName']],
@@ -85,7 +85,7 @@ class BaUserForm extends Model
             [['conUid', 'location'], 'required', 'on'=>['validateLocation', 'validateAddWithUid']],
             [['conUserName', 'location'], 'required', 'on'=>['validateLocationConName', 'validateAddWithName']],
 
-            [['nation','realName', 'mobile', /*'idCard',*/ 'openBank', 'bankAddress', 'bankNo'/*, 'email'*/], 'required', 'on'=>'modifyProfile'],
+            [[/* 'nation' ,*/'realName'/*,  'mobile', */ /*'idCard',*/ /* 'openBank', 'bankAddress', 'bankNo' *//*, 'email'*/], 'required', 'on'=>'modifyProfile'],
             [['oldPassword','verifyPassword'], 'required','on' => ['modifyPassword', 'modifyPasswordPay', 'noLoginModifyPassword']],
             [['password'], 'required','on' => ['modifyPassword', 'noLoginModifyPassword']],
             [['payPassword'], 'required','on' => ['modifyPasswordPay']],
@@ -119,9 +119,9 @@ class BaUserForm extends Model
             //'realName' => '真实姓名',
 //            'idCard' => '身份证号',
             //'mobile' => '手机号',
-            'openBank' => '银行名称',
-            'bankAddress' => '开户支行',
-            'bankNo' => '银行账号',
+            // 'openBank' => '银行名称',
+            // 'bankAddress' => '开户支行',
+            // 'bankNo' => '银行账号',
             'verifyPassword' => 'Confirm password',//确认密码
             'oldPassword' => 'Original password',//原密码
             'password' => 'Login password',//登录密码
@@ -552,10 +552,10 @@ class BaUserForm extends Model
 
         $uid = \Yii::$app->user->id;
         $model = BaUser::findOne(['ID'=>$uid]);
-        $model->NATION = $this->nation;
-        $model->OPEN_BANK = $this->openBank;
-        $model->BANK_NO = $this->bankNo;
-        $model->BANK_ADDRESS = $this->bankAddress;
+        // $model->NATION = $this->nation;
+        // $model->OPEN_BANK = $this->openBank;
+        // $model->BANK_NO = $this->bankNo;
+        // $model->BANK_ADDRESS = $this->bankAddress;
         $model->EMAIL = $this->email;
         if(!$model->save()){
             $this->addErrors($model->getErrors());

+ 1 - 2
frontendApi/modules/v1/controllers/SiteController.php

@@ -196,9 +196,8 @@ class SiteController extends BaseController
      */
     private function _whetherBA() {
 
-//        return true;
         // 是否正式会员
-        if (User::find()->where('ID = :USER_ID', [':USER_ID' => \Yii::$app->user->id])->exists()) {
+        if (User::find()->where(['ID' => \Yii::$app->user->id])->exists()) {
             return false;
         }
         // 是否BA会员

+ 2 - 2
frontendApi/modules/v1/controllers/UserController.php

@@ -674,8 +674,8 @@ class UserController extends BaseController {
 
         //所有自选商品
         $isDecReg = Cache::getSystemConfig()['isDecReg']['VALUE'];
-        $isDec = User::getEnCodeInfo(\Yii::$app->user->id)['IS_DEC'];
-        $isStudio = User::getEnCodeInfo(\Yii::$app->user->id)['IS_STUDIO'];
+        $isDec = BaUser::getEnCodeInfo(\Yii::$app->user->id)['IS_DEC'];
+        $isStudio = BaUser::getEnCodeInfo(\Yii::$app->user->id)['IS_STUDIO'];
         $query_condition= " AND (1<>1";
         if(!$isDecReg || ($isDecReg && $isDec==1)){
             $query_condition = " AND (FIND_IN_SET(1,GIFT_TYPE)>0";

+ 13 - 0
frontendEle/src/views/dashboard/ba-index.vue

@@ -65,6 +65,19 @@ export default {
   components: {
     countUp
   },
+  mounted () {
+    network.getData(`dashboard/ba-index`).then(response => {
+      this.slides = response.slides
+      this.news = response.news
+      this.periodNum = response.periodNum
+      this.loading = false
+      this.imgLoad()
+    })
+    this.calcTime()
+    window.addEventListener('resize', () => {
+      this.imgLoad()
+    }, false)
+  },
   data () {
     return {
       loading: false,