init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
133
Install/Home/View/Index/home.html
可执行文件
133
Install/Home/View/Index/home.html
可执行文件
@@ -0,0 +1,133 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>数据库信息配置</title>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vue/element-ui.2.8.2.css"/>
|
||||
<script type="text/javascript" src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/vue/element-ui.2.8.2.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/js/common.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.logo-box {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 84px;
|
||||
margin: 25px auto 0;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.el-input {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.bottom-button {
|
||||
margin-top: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="logo-box">
|
||||
<img src="__PUBLIC__/Install/images/logo.png" alt="" class="logo"/>
|
||||
</div>
|
||||
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-card shadow="always" style="width: 650px;margin: 0 auto">
|
||||
<h4>请在下方填写您的数据库连接信息,如果您不确定,请联系您的服务提供商。</h4>
|
||||
|
||||
<el-form size="small" label-width="130px" :model="ruleForm" :rules="rules" ref="ruleForm">
|
||||
<el-form-item label="数据库名" prop="sql_name">
|
||||
<el-input placeholder="请输入数据库名" v-model="ruleForm.sql_name"></el-input>
|
||||
<span class="tips">若数据库不存在则会创建数据库</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名" prop="sql_user_name">
|
||||
<el-input placeholder="请输入用户名" v-model="ruleForm.sql_user_name"></el-input>
|
||||
<span class="tips">您的数据库用户名</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码" prop="sql_password">
|
||||
<el-input placeholder="请输入密码" show-password v-model="ruleForm.sql_password"></el-input>
|
||||
<span class="tips">您的数据库密码</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据库主机地址" prop="sql_path">
|
||||
<el-input placeholder="请输入数据库主机地址" v-model="ruleForm.sql_path"></el-input>
|
||||
<span class="tips">可以从网站服务提供商处得到正确的信息</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="bottom-button">
|
||||
<el-button type="primary" size="medium" @click="nextOperate">继续</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
ruleForm: {
|
||||
sql_name: '',
|
||||
sql_user_name: '',
|
||||
sql_password: '',
|
||||
sql_path: '',
|
||||
},
|
||||
rules: {
|
||||
sql_name: [{message: '请输入数据库名', required: true, trigger: 'blur'}],
|
||||
sql_user_name: [{message: '请输入用户名', required: true, trigger: 'blur'}],
|
||||
sql_password: [{message: '请输入密码', required: true, trigger: 'blur'}],
|
||||
sql_path: [{message: '请输入数据库主机地址', required: true, trigger: 'blur'}],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
nextOperate() {
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if (valid) {
|
||||
let formData = new FormData();
|
||||
for (let i in this.ruleForm) {
|
||||
formData.append(i, this.ruleForm[i]);
|
||||
}
|
||||
fetch("{:U('Home/Index/home')}", {
|
||||
method: 'POST',
|
||||
headers: {},
|
||||
body: formData
|
||||
}).then((response) => response.json()).then((jsonData) => {
|
||||
if (typeof jsonData != "object") {
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
} else {
|
||||
if (jsonData.status == 1) {
|
||||
window.location.href = "{:U('Home/index/push')}";
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
});
|
||||
} else {
|
||||
this.$message.error('请检查必填项');
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
76
Install/Home/View/Index/index.html
可执行文件
76
Install/Home/View/Index/index.html
可执行文件
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>码上有酒安装首页</title>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vue/element-ui.2.8.2.css"/>
|
||||
<script type="text/javascript" src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/vue/element-ui.2.8.2.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.logo-box {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 84px;
|
||||
margin: 25px auto 0;
|
||||
}
|
||||
.bottom-button {
|
||||
margin-top: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="logo-box">
|
||||
<img src="__PUBLIC__/Install/images/logo.png" alt="" class="logo"/>
|
||||
</div>
|
||||
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-card shadow="always" style="width: 650px;margin: 0 auto">
|
||||
<h4>欢迎使用码上有酒。在开始前,我们需要您数据库的一些信息。请准备好如下信息</h4>
|
||||
|
||||
<el-table :data="dataList" size="small" :show-header="false">
|
||||
<el-table-column type="index" width="40px"></el-table-column>
|
||||
<el-table-column prop="name"></el-table-column>
|
||||
</el-table>
|
||||
<div class="bottom-button">
|
||||
<el-button type="primary" size="medium" @click="nextOperate">继续</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
dataList: [
|
||||
{name:'数据库名'},
|
||||
{name:'数据库用户名',},
|
||||
{name:'数据库密码',},
|
||||
{name:'数据库主机连接地址',},
|
||||
{name:'合伙人公司名称',},
|
||||
{name:'合伙人手机号',},
|
||||
{name:'合伙人登录密码',},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
nextOperate() {
|
||||
window.location.href = "{:U('Home/Index/pull')}";
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
242
Install/Home/View/Index/install.html
可执行文件
242
Install/Home/View/Index/install.html
可执行文件
@@ -0,0 +1,242 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>在线安装码上有酒</title>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vue/element-ui.2.8.2.css"/>
|
||||
<script type="text/javascript" src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/vue/element-ui.2.8.2.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.logo-box {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 84px;
|
||||
margin: 25px auto 0;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
color: #909399;
|
||||
}
|
||||
|
||||
.big-title {
|
||||
font-size: 16px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.bottom-button {
|
||||
margin-top: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.success {
|
||||
color: rgb(103, 194, 58);
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #f56c6c;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="logo-box">
|
||||
<img src="__PUBLIC__/Install/images/logo.png" alt="" class="logo"/>
|
||||
</div>
|
||||
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-card shadow="always" style="width: 650px;margin: 0 auto">
|
||||
<h3>码上有酒版本正在安装到您的服务器中,请稍等.....</h3>
|
||||
<h4>如果安装失败,请检查数据库是否开启,或者是其他参数设置有误.....</h4>
|
||||
<el-scrollbar ref="myScrollbar" style="width: 650px; height: calc(100vh - 330px)">
|
||||
<div v-for="(item,index) in dataList">
|
||||
<p :class="item.class">{{item.name}}</p>
|
||||
</div>
|
||||
<div v-if="installState==1">
|
||||
<p><span class="success">{{count}}</span> 秒后返回主页</p>
|
||||
</div>
|
||||
<div v-if="installState==2">
|
||||
<p class="error">安装失败</p>
|
||||
<el-button type="danger" @click="refresh">刷新重试</el-button>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
installState: 0,
|
||||
count: 5,
|
||||
dataList: [
|
||||
{name: '开始一本正经的安装零售数据库数据...', class: 'tips big-title'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//初始化数据表
|
||||
unitSQL() {
|
||||
fetch("{:U('Home/index/unitSQL')}", {
|
||||
method: 'POST',
|
||||
headers: {},
|
||||
}).then((response) => response.json()).then((jsonData) => {
|
||||
if (typeof jsonData != "object") {
|
||||
this.installState = 2;
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
} else {
|
||||
this.dataList.push.apply(this.dataList, jsonData.data);
|
||||
if (jsonData.status == 1) {
|
||||
this.$nextTick(()=>{
|
||||
this.unitTable();
|
||||
})
|
||||
} else {
|
||||
this.installState = 2;
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
this.installState = 2;
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
unitTable() {
|
||||
this.dataList.push({
|
||||
name: '数据表数据安装完成,开始初始化用户数据...',
|
||||
class: 'tips big-title'
|
||||
});
|
||||
this.dataList.push({
|
||||
name: '开始注册创始人帐号...',
|
||||
class: 'tips success'
|
||||
})
|
||||
fetch("{:U('Home/index/unitTable')}", {
|
||||
method: 'POST',
|
||||
headers: {},
|
||||
}).then((response) => response.json()).then((jsonData) => {
|
||||
if (typeof jsonData != "object") {
|
||||
this.installState = 2;
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
} else {
|
||||
this.dataList.push.apply(this.dataList, jsonData.data);
|
||||
if (jsonData.status == 1) {
|
||||
this.$nextTick(()=>{
|
||||
this.setVersion();
|
||||
})
|
||||
} else {
|
||||
this.installState = 2;
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
this.installState = 2;
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
setVersion() {
|
||||
this.dataList.push({
|
||||
name: '设置当前的版本信息...',
|
||||
class: 'tips big-title'
|
||||
});
|
||||
fetch("{:U('Home/index/setVersion')}", {
|
||||
method: 'POST',
|
||||
headers: {},
|
||||
}).then((response) => response.json()).then((jsonData) => {
|
||||
if (typeof jsonData != "object") {
|
||||
this.installState = 2;
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
} else {
|
||||
this.dataList.push.apply(this.dataList, jsonData.data);
|
||||
if (jsonData.status == 1) {
|
||||
this.$nextTick(()=>{
|
||||
this.setConfig();
|
||||
})
|
||||
} else {
|
||||
this.installState = 2;
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
this.installState = 2;
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
setConfig() {
|
||||
this.dataList.push({
|
||||
name: '开始生成配置文件...',
|
||||
class: 'tips big-title'
|
||||
});
|
||||
fetch("{:U('Home/index/setConfig')}", {
|
||||
method: 'POST',
|
||||
headers: {},
|
||||
}).then((response) => response.json()).then((jsonData) => {
|
||||
if (typeof jsonData != "object") {
|
||||
this.installState = 2;
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
} else {
|
||||
this.dataList.push.apply(this.dataList, jsonData.data);
|
||||
if (jsonData.status == 1) {
|
||||
this.$nextTick(()=>{
|
||||
this.installSuccess();
|
||||
})
|
||||
} else {
|
||||
this.installState = 2;
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
this.installState = 2;
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
installSuccess() {
|
||||
this.installState = 1;
|
||||
this.dataList.push({
|
||||
name: '恭喜,成功安装,如有问题,请及时使用工单联系我们...',
|
||||
class: 'tips big-title success'
|
||||
});
|
||||
this.count = 5;
|
||||
let Timer = setInterval(() => {
|
||||
this.count--;
|
||||
if (this.count == 0) {
|
||||
clearInterval(Timer);
|
||||
window.location.href = "/index.php";
|
||||
}
|
||||
}, 1000)
|
||||
},
|
||||
refresh() {
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.unitSQL();
|
||||
},
|
||||
watch:{
|
||||
dataList:{
|
||||
deep: true,
|
||||
handler(){
|
||||
this.$nextTick(() => {
|
||||
this.$refs['myScrollbar'].wrap.scrollTop = this.$refs['myScrollbar'].wrap.scrollHeight
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
115
Install/Home/View/Index/pull.html
可执行文件
115
Install/Home/View/Index/pull.html
可执行文件
@@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>环境检测</title>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vue/element-ui.2.8.2.css"/>
|
||||
<script type="text/javascript" src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/vue/element-ui.2.8.2.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.logo-box {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 84px;
|
||||
margin: 25px auto 0;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.success {
|
||||
color: #62b900;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #f56c6c;
|
||||
}
|
||||
|
||||
.bottom-button {
|
||||
margin-top: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="logo-box">
|
||||
<img src="__PUBLIC__/Install/images/logo.png" alt="" class="logo"/>
|
||||
</div>
|
||||
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-card shadow="always" style="width: 650px;margin: 0 auto">
|
||||
<h3>环境检测</h3>
|
||||
<h4>运行环境</h4>
|
||||
<el-table :data="sceneConf" size="small">
|
||||
<el-table-column align="center" label="项目" prop="name"></el-table-column>
|
||||
<el-table-column align="center" label="所需配置" prop="need"></el-table-column>
|
||||
<el-table-column align="center" label="当前配置" prop="value"></el-table-column>
|
||||
<el-table-column align="center" label="状态" prop="state" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<i v-if="scope.row.state" class="el-icon-success icon success"></i>
|
||||
<i v-else class="el-icon-error icon error"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<h4>目录/文件权限</h4>
|
||||
<el-table :data="fileAuth" size="small">
|
||||
<el-table-column align="center" label="目录/文件" prop="name"></el-table-column>
|
||||
<el-table-column align="center" label="所需状态" prop="need"></el-table-column>
|
||||
<el-table-column align="center" label="当前状态" prop="value"></el-table-column>
|
||||
<el-table-column align="center" label="状态" prop="state" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<i v-if="scope.row.state" class="el-icon-success icon success"></i>
|
||||
<i v-else class="el-icon-error icon error"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="bottom-button">
|
||||
<el-button size="medium" @click="refresh">刷新</el-button>
|
||||
<el-button type="primary" size="medium" @click="nextOperate">继续</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
sceneConf: {$sceneConf},
|
||||
fileAuth: {$fileAuth},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refresh() {
|
||||
window.location.reload();
|
||||
},
|
||||
nextOperate() {
|
||||
for (let i in this.sceneConf) {
|
||||
if (!this.sceneConf[i].state) {
|
||||
return this.$message.error('运行环境' + this.sceneConf[i].name + '的参数不符合配置,请检查');
|
||||
}
|
||||
}
|
||||
for (let i in this.fileAuth) {
|
||||
if (!this.fileAuth[i].state) {
|
||||
return this.$message.error('目录或文件' + this.fileAuth[i].name + '的权限不够,请检查');
|
||||
}
|
||||
}
|
||||
window.location.href = "{:U('Home/Index/home')}";
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
136
Install/Home/View/Index/push.html
可执行文件
136
Install/Home/View/Index/push.html
可执行文件
@@ -0,0 +1,136 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>合伙人信息验证</title>
|
||||
<link rel="stylesheet" type="text/css" href="__PUBLIC__/vue/element-ui.2.8.2.css"/>
|
||||
<script type="text/javascript" src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
|
||||
<script type="text/javascript" src="__PUBLIC__/vue/element-ui.2.8.2.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.logo-box {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 84px;
|
||||
margin: 25px auto 0;
|
||||
}
|
||||
|
||||
.tips {
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
color: #1f2f3d;
|
||||
}
|
||||
|
||||
.el-input {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.bottom-button {
|
||||
margin-top: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="logo-box">
|
||||
<img src="__PUBLIC__/Install/images/logo.png" alt="" class="logo"/>
|
||||
</div>
|
||||
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-card shadow="always" style="width: 650px;margin: 0 auto">
|
||||
|
||||
<el-divider content-position="left">欢迎</el-divider>
|
||||
<p class="tips">欢迎使用千呼新零售五分钟安装程序!请简单地填写下面的信息,将进入这个世界上最具扩展性、最具特色性的商家服务应用平台。</p>
|
||||
|
||||
<el-divider content-position="left">需要信息</el-divider>
|
||||
<p class="tips">您需要填写一些基本信息。无需担心填错,这些信息以后可以再次修改。</p>
|
||||
|
||||
<el-form size="small" label-width="130px" :model="ruleForm" :rules="rules" ref="ruleForm">
|
||||
<el-form-item label="系统名称" prop="name">
|
||||
<el-input placeholder="请输入系统名称" v-model="ruleForm.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input placeholder="请输入手机号" v-model="ruleForm.phone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="密码" prop="password">
|
||||
<el-input placeholder="请输入密码" show-password v-model="ruleForm.password"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="bottom-button">
|
||||
<el-button type="primary" size="medium" @click="nextOperate">继续</el-button>
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</div>
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
ruleForm: {
|
||||
name: '',
|
||||
phone: '',
|
||||
password: '',
|
||||
},
|
||||
rules: {
|
||||
name: [{message: '请输入系统名称', required: true, trigger: 'blur'}],
|
||||
phone: [{message: '请输入手机号', required: true, trigger: 'blur'}, {
|
||||
validator: function (rule, value, callback) {
|
||||
if (value && !/^[1]{1}[356789]{1}\d{9}$/.test(value)) {
|
||||
callback(new Error("请输入正确的手机号"));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, trigger: 'blur'
|
||||
}],
|
||||
password: [{message: '请输入密码', required: true, trigger: 'blur'}],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
nextOperate() {
|
||||
this.$refs.ruleForm.validate((valid) => {
|
||||
if (valid) {
|
||||
let formData = new FormData();
|
||||
for (let i in this.ruleForm) {
|
||||
formData.append(i, this.ruleForm[i]);
|
||||
}
|
||||
fetch("{:U('Home/Index/push')}", {
|
||||
method: 'POST',
|
||||
headers: {},
|
||||
body: formData
|
||||
}).then((response) => response.json()).then((jsonData) => {
|
||||
if (typeof jsonData != "object") {
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
} else {
|
||||
if (jsonData.status == 1) {
|
||||
window.location.href = "{:U('Home/Index/install')}";
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.log(error);
|
||||
this.$message.error('请求发生错误,请稍后重试');
|
||||
});
|
||||
} else {
|
||||
this.$message.error('请检查必填项');
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
在新工单中引用
屏蔽一个用户