thirdpayment
parent
ff4bac896e
commit
6dcdb45938
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Model;
|
||||
|
||||
class Account extends Model
|
||||
{
|
||||
protected $table = 'accounts';
|
||||
}
|
@ -0,0 +1,119 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||
<title>我的账户</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-descriptions title="用户信息">
|
||||
<el-descriptions-item label="用户名">kooriookami</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号">18100000000</el-descriptions-item>
|
||||
<el-descriptions-item label="居住地">苏州市</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<el-tag size="small">学校</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系地址">江苏省苏州市吴中区吴中大道 1188 号</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</body>
|
||||
<!-- import Vue before Element -->
|
||||
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>
|
||||
<!-- import JavaScript -->
|
||||
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
||||
<script src="https://unpkg.com/axios@1.1.2/dist/axios.min.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
activeName: 'register',
|
||||
loginForm: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
registerForm: {
|
||||
username: '',
|
||||
password: '',
|
||||
confirm_password: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!window.sessionStorage.getItem('token')) {
|
||||
window.location.href = '/login.html'
|
||||
return;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
bindCard() {
|
||||
axios.post('/account/bind-card', this.bindConfirmForm)
|
||||
.then( (response) => {
|
||||
console.log(response);
|
||||
let result = response.data
|
||||
if (result.code != 1000) {
|
||||
return this.$message.error(response.data.message);
|
||||
}
|
||||
this.bindConfirmVisible = false;
|
||||
this.$message.success('支付成功');
|
||||
this.$alert('请记住您的订单号:' + result.data.bizData.outOrderNo , '支付成功', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message.error('请求错误');
|
||||
console.log(error);
|
||||
});
|
||||
console.log('submit!');
|
||||
},
|
||||
transferPay() {
|
||||
axios.post('/account/transfer-pay', this.payConfirmForm)
|
||||
.then( (response) => {
|
||||
console.log(response);
|
||||
let result = response.data
|
||||
if (result.code != 1000) {
|
||||
return this.$message.error(response.data.message);
|
||||
}
|
||||
this.payConfirmVisible = false;
|
||||
this.$message.success('支付成功');
|
||||
this.$alert('请记住您的订单号:' + result.data.bizData.outOrderNo , '支付成功', {
|
||||
confirmButtonText: '确定',
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message.error('请求错误');
|
||||
console.log(error);
|
||||
});
|
||||
console.log('submit!');
|
||||
},
|
||||
getQueryParam(name) {
|
||||
var query = window.location.search.substring(1);
|
||||
console.log(query)
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
console.log(pair[0], name)
|
||||
if(pair[0] == name) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,129 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
||||
<title>支付系统</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="注册" name="register">
|
||||
<el-form ref="registerForm" :model="registerForm" label-width="80px">
|
||||
<el-form-item label="账号">
|
||||
<el-input v-model="registerForm.username"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码">
|
||||
<el-input show-password v-model="registerForm.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码">
|
||||
<el-input show-password v-model="registerForm.confirm_password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="register">注册</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="登录" name="login">
|
||||
<el-form ref="loginForm" :model="loginForm" label-width="80px">
|
||||
<el-form-item label="账号">
|
||||
<el-input v-model="loginForm.username"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码">
|
||||
<el-input show-password v-model="loginForm.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="register">登录</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
</body>
|
||||
<!-- import Vue before Element -->
|
||||
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>
|
||||
<!-- import JavaScript -->
|
||||
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
||||
<script src="https://unpkg.com/axios@1.1.2/dist/axios.min.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
activeName: 'register',
|
||||
loginForm: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
registerForm: {
|
||||
username: '',
|
||||
password: '',
|
||||
confirm_password: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (window.sessionStorage.getItem('token')) {
|
||||
window.location.href = '/account.html'
|
||||
return;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
register() {
|
||||
axios.post('/account/register', this.registerForm)
|
||||
.then( (response) => {
|
||||
console.log(response);
|
||||
let result = response.data
|
||||
if (result.code != 1000) {
|
||||
return this.$message.error(response.data.message);
|
||||
}
|
||||
this.activeName = 'login';
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message.error('请求错误');
|
||||
console.log(error);
|
||||
});
|
||||
console.log('submit!');
|
||||
},
|
||||
login() {
|
||||
axios.post('/account/login', this.loginForm)
|
||||
.then( (response) => {
|
||||
console.log(response);
|
||||
let result = response.data
|
||||
if (result.code != 1000) {
|
||||
return this.$message.error(response.data.message);
|
||||
}
|
||||
window.sessionStorage.setItem('token', result.data.token)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$message.error('请求错误');
|
||||
console.log(error);
|
||||
});
|
||||
console.log('submit!');
|
||||
},
|
||||
getQueryParam(name) {
|
||||
var query = window.location.search.substring(1);
|
||||
console.log(query)
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
console.log(pair[0], name)
|
||||
if(pair[0] == name) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</html>
|
Loading…
Reference in New Issue