thirdpayment
elf 11 months ago
parent 6f6dbdc34c
commit 35acd7d85a

@ -10,6 +10,7 @@ use App\Helper\RedisKey;
use App\Helper\StringHelper; use App\Helper\StringHelper;
use App\Model\Account; use App\Model\Account;
use App\Model\BankCard; use App\Model\BankCard;
use App\Model\User;
use Hyperf\HttpServer\Contract\RequestInterface; use Hyperf\HttpServer\Contract\RequestInterface;
use App\Service\PaymentService; use App\Service\PaymentService;
use App\Service\RequestService; use App\Service\RequestService;
@ -137,4 +138,14 @@ class AccountController extends AbstractController
$acsNo = $this->paymentService->transferPay($requestLog->getData(), $requestLog->app, $requestLog->request_token); $acsNo = $this->paymentService->transferPay($requestLog->getData(), $requestLog->app, $requestLog->request_token);
return $this->success(['acsNo' => $acsNo]); return $this->success(['acsNo' => $acsNo]);
} }
public function getUserInfo(RequestInterface $request)
{
$userInfo = $this->checkUser($request);
$account = Account::where('user_id', $userInfo['userId'])->first();
$userId = 'ACT_' . $userInfo['userId'];
$user = User::where('user_id', $userId)->first(['realname_flag', 'bind_card_flag', 'set_pwd_flag', 'mobile', 'real_name', 'certificate_no', 'user_type', 'apply_no', 'is_platform_account']);
$bankCard = BankCard::where('user_id', $userId)->first(['bank_name', 'card_user_name']);
return $this->success(['username' => $account['username'], 'userInfo' => $user, $bankCard => $bankCard]);
}
} }

@ -43,6 +43,7 @@ Router::addGroup('/account',function () {
Router::post('/open-account', [AccountController::class, 'openAccount']); Router::post('/open-account', [AccountController::class, 'openAccount']);
Router::post('/bind-card', [AccountController::class, 'bindCard']); Router::post('/bind-card', [AccountController::class, 'bindCard']);
Router::post('/transfer-pay', [AccountController::class, 'transferPay']); Router::post('/transfer-pay', [AccountController::class, 'transferPay']);
Router::post('/user-info', [AccountController::class, 'getUserInfo']);
}, []); }, []);
Router::addGroup('/notify',function () { Router::addGroup('/notify',function () {

@ -13,13 +13,31 @@
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-descriptions title="用户信息"> <el-descriptions title="用户信息">
<el-descriptions-item label="用户名">kooriookami</el-descriptions-item> <el-descriptions-item label="用户名">{{username}}</el-descriptions-item>
<el-descriptions-item label="手机号">18100000000</el-descriptions-item> <el-descriptions-item label="手机号">{{userInfo.mobile}}</el-descriptions-item>
<el-descriptions-item label="居住地">苏州市</el-descriptions-item> </el-descriptions>
<el-descriptions-item label="备注"> </el-col>
<el-tag size="small">学校</el-tag> </el-row>
</el-descriptions-item> <el-row>
<el-descriptions-item label="联系地址">江苏省苏州市吴中区吴中大道 1188 号</el-descriptions-item> <el-col :span="24">
<el-descriptions title="开户信息">
<el-descriptions-item label="用户名" v-if="userInfo.realname_flag==='Y'">{{userInfo.real_name}}</el-descriptions-item>
<el-descriptions-item label="用户名" v-else>--</el-descriptions-item>
<el-descriptions-item label="身份证号" v-if="userInfo.realname_flag==='Y'">{{userInfo.certificate_no}}</el-descriptions-item>
<el-descriptions-item label="身份证号" v-else>--</el-descriptions-item>
<el-descriptions-item label="支付密码" v-if="userInfo.set_pwd_flag==='Y'">**********</el-descriptions-item>
<el-descriptions-item label="支付密码" v-else>--</el-descriptions-item>
<el-descriptions-item label="手机号">{{userInfo.mobile}}</el-descriptions-item>
</el-descriptions>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-descriptions title="绑卡信息">
<el-descriptions-item label="开户行" v-if="userInfo.bind_card_flag==='Y'">{{bankCard.bank_name}}</el-descriptions-item>
<el-descriptions-item label="开户行" v-else>--</el-descriptions-item>
<el-descriptions-item label="开户姓名" v-if="userInfo.bind_card_flag==='Y'">{{bankCard.card_user_name}}</el-descriptions-item>
<el-descriptions-item label="开户姓名" v-else>--</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-col> </el-col>
</el-row> </el-row>
@ -46,6 +64,21 @@
username: '', username: '',
password: '', password: '',
confirm_password: '' confirm_password: ''
},
username: '',
userInfo: {
realname_flag: '',
bind_card_flag: '',
mobile: '',
real_name: '',
certificate_no: '',
user_type: '',
apply_no: '',
is_platform_account: ''
},
bankCard: {
bank_name: '',
card_user_name: ''
} }
} }
}, },
@ -56,6 +89,24 @@
} }
}, },
methods: { methods: {
getUserInfo() {
axios.post('/account/user-info', {token: window.sessionStorage.getItem('token')})
.then( (response) => {
console.log(response);
let result = response.data
if (result.code != 1000) {
return this.$message.error(response.data.message);
}
this.usernae = result.username;
this.userInfo = result.userInfo;
this.bankCard = result.bankCard;
})
.catch((error) => {
this.$message.error('请求错误');
console.log(error);
});
console.log('submit!');
},
bindCard() { bindCard() {
axios.post('/account/bind-card', this.bindConfirmForm) axios.post('/account/bind-card', this.bindConfirmForm)
.then( (response) => { .then( (response) => {

Loading…
Cancel
Save