| 123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace api\modules\v1\controllers\user;
- use api\controllers\OnAuthController;
- use common\helpers\ApiCode;
- use common\models\common\UserThirdPartyAddress;
- use Yii;
- class ThirdPartyController extends OnAuthController
- {
- public $modelClass = '';
- /**
- * @Description: 存储第三提现地址
- * @Author: qi
- * @DateTime 2022-11-16 15:25:49
- * @return mixed
- */
- public function actionSaveAddress()
- {
- if (\Yii::$app->request->isPost) {
- $params = Yii::$app->request->post();
- $res = Yii::$app->services->validate->validate($params, [
- [['third_party_address'], 'required'],
- ]);
- if ($res === false) return $this->error(Yii::$app->services->validate->getErrorMessage());
- $params['mall_id'] = $this->mall_id;
- $params['user_id'] = $this->user_id;
- $result = UserThirdPartyAddress::setData($params);
- if ($result === false) return $this->error(UserThirdPartyAddress::getStaticError());
- return $this->success('数据保存成功');
- }
- }
- }
|