/** * 我的银行 */ public function actionBank() { $model = new BankForm(); $user_id = Yii::$app->user->getId(); $thisBank = Bankcard::find()->where("user_id=" . $user_id)->one(); if (!$thisBank) { $thisBank = new Bankcard(); } if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post())) { Yii::$app->response->format = Response::FORMAT_JSON; return ActiveForm::validate($model); } if ($model->load(Yii::$app->request->post()) && $model->validate()) { $thisBank->setAttributes($model->attributes); $thisBank->setAttribute('province', $_POST['province']); $thisBank->setAttribute('city', $_POST['city']); $bank_name = Linkage::getValueChina("1002", "account_bank"); $thisBank->setAttribute('bank_name', $bank_name); $resultR = $thisBank->save(); $this->refresh(); if ($resultR) { Yii::$app->session->setFlash('success', '更新成功'); $this->redirect('/public/notices.html'); Yii::$app->end(); } } else { $model->setAttributes($thisBank->attributes); return $this->render('bank', ['model' => $model]); } }
</div> </div> </div> <div class="container no-bottom container-b"> <?php echo Html::submitButton('保存', ['class' => 'buttonWrap button button-red contactSubmitButton', 'name' => 'submit-button']); ?> </div> <?php ActiveForm::end(); echo $this->render('bankpayaddressdiv'); ?> <script type="text/javascript"> $(document).ready(function () { <?php $bankCard = Bankcard::find()->where("user_id=" . Yii::$app->user->getId())->one(); if (isset($bankCard->province)) { ?> $(".qys_common_pay_provice").val(<?php echo $bankCard->province; ?> ); <?php } ?> var newprovice = $(".qys_common_pay_provice"); $("#province_div").html(newprovice); <?php if (isset($bankCard->city)) { ?> $(".qys_common_pay_city_<?php
<?php /* @var $this yii\web\View */ $this->title = '提现'; use yii\helpers\Url; use frontend\services\AccountService; use yii\widgets\ActiveForm; use yii\helpers\Html; use common\models\Account; use common\models\Bankcard; $user_id = Yii::$app->user->getId(); $oneuseraccount = Account::find()->where('user_id=:user_id', [':user_id' => $user_id])->one(); $oneBank = Bankcard::find()->where('user_id=:user_id', [':user_id' => $user_id])->one(); ?> <div class="container no-bottom"> <img class="responsive-image" src="/images/misc/help_server.png" alt="img"> </div> <div class="container"> <div class="tabs"> <a href="<?php echo Url::toRoute('/member/account/tixian'); ?> " class="tab-but tab-but-1 tab-active">申请提现</a> <a href="<?php echo Url::toRoute('/member/account/tixianlog'); ?> " class="tab-but tab-but-2">提现记录</a> </div> </div> <div class="container no-bottom"> <a href="#" style="width:100%;padding-left:13px;" class="button-big-icon-colse button-white">所属银行:<span class="float-right"><?php