Commit 01d9e067 by zhaoxiqing

Merge branch 'bpo-web' of http://gitlab.gongsibao.com/jiangyong/zhichan into bpo-web

parents bce8dbf6 0b2ec026
...@@ -10,11 +10,23 @@ var moment = require('moment') ...@@ -10,11 +10,23 @@ var moment = require('moment')
class TestApi { class TestApi {
constructor() { constructor() {
this.utilesignbaoSve = System.getObject("service.utilesignbaoSve"); this.utilesignbaoSve = System.getObject("service.utilesignbaoSve");
this.redisClient = System.getObject("util.redisClient");
this.downcontractClient = System.getObject("util.downcontractClient");
// this.publishClient = System.getObject("util.publishClient");
} }
async personTwo() { async testAddDL(obj) {
let rs = await this.utilesignbaoSve.personTwo({name: "王昆", "idno": "222403198301071778"}, "test"); let contracts = obj.contracts || [];
return rs; for(let p of contracts) {
await this.redisClient.rpushBCD(p);
}
return {msg: "success"}
}
async donloadContract(obj) {
this.downcontractClient.donloadContract();
return {msg: "start success"};
} }
async genPosterQrcodeImg(obj) { async genPosterQrcodeImg(obj) {
......
...@@ -16,6 +16,8 @@ class DKcontractService extends ServiceBase { ...@@ -16,6 +16,8 @@ class DKcontractService extends ServiceBase {
this.userDao = system.getObject("db.userDao"); this.userDao = system.getObject("db.userDao");
this.restClient = system.getObject("util.restClient"); this.restClient = system.getObject("util.restClient");
this.redisClient = system.getObject("util.redisClient");
} }
async getInfo(id) { async getInfo(id) {
...@@ -235,6 +237,8 @@ class DKcontractService extends ServiceBase { ...@@ -235,6 +237,8 @@ class DKcontractService extends ServiceBase {
end_at.setFullYear(end_at.getFullYear() + 1); end_at.setFullYear(end_at.getFullYear() + 1);
contract.end_at = end_at; contract.end_at = end_at;
// 合同下载任务
this.redisClient.rpushBCD({id: contract.id, sve: "dk"});
await contract.save(); await contract.save();
} catch (e) { } catch (e) {
logCtl.error({ logCtl.error({
...@@ -304,6 +308,39 @@ class DKcontractService extends ServiceBase { ...@@ -304,6 +308,39 @@ class DKcontractService extends ServiceBase {
} }
} }
async downloadContract(id) {
try {
let contract = await this.dao.findById(id);
if (!contract || contract.eflowstatus != "2" || contract.fileurl) {
return ;
}
//await this.syncYzSign(2134);
// 请求文件地址
let fileRs = await this.utilesignbaoSve.downloadUserContractFile(contract.eflowid, "econtractSve");
if (fileRs.code == 1 && fileRs.data.selfossUrl) {
contract.fileurl = fileRs.data.selfossUrl;
await contract.save();
this.syncYzSign(contract.id);
} else {
await this.utilesignbaoSve.archiveProcess({flowId: contract.eflowid}, "econtractSve");
let fileRs = await this.utilesignbaoSve.downloadUserContractFile(contract.eflowid, "econtractSve");
if (fileRs.code == 1 && fileRs.data.selfossUrl) {
contract.fileurl = fileRs.data.selfossUrl;
await contract.save();
this.syncYzSign(contract.id);
}
}
} catch (e) {
console.error(e);
return {
code: -200,
message: "error",
data: {}
};
}
}
async getContractUrl(id) { async getContractUrl(id) {
var contract = await this.findById(id); var contract = await this.findById(id);
if (contract.fileurl) { if (contract.fileurl) {
......
...@@ -32,6 +32,8 @@ class EcontractService extends ServiceBase { ...@@ -32,6 +32,8 @@ class EcontractService extends ServiceBase {
this.eSignBaoRedirectBossUrl = settings.apiconfig.eSignBaoRedirectBossUrl(); this.eSignBaoRedirectBossUrl = settings.apiconfig.eSignBaoRedirectBossUrl();
this.redisClient = system.getObject("util.redisClient");
this.ydCompanyIds = [ this.ydCompanyIds = [
10173, 10173,
10174, 10174,
...@@ -271,6 +273,10 @@ class EcontractService extends ServiceBase { ...@@ -271,6 +273,10 @@ class EcontractService extends ServiceBase {
contract.end_at = end_at; contract.end_at = end_at;
contract.save(); contract.save();
// TODO DOWNLOAD OK
this.redisClient.rpushBCD({id: contract.id, sve: "e"});
// }
} }
} catch (error) { } catch (error) {
...@@ -518,13 +524,9 @@ class EcontractService extends ServiceBase { ...@@ -518,13 +524,9 @@ class EcontractService extends ServiceBase {
} }
if (signResult == "2") { if (signResult == "2") {
// TODO WANGKUN 改定时任务获取 // TODO DOWNLOAD OK
// let fileRs = await this.utilesignbaoSve.downloadUserContractFile(contract.eflowid, "econtractSve"); this.redisClient.rpushBCD({id: contract.id, sve: "e"});
// console.log(fileRs, "---------------------------------------------------");
// if(fileRs.code == 1 && fileRs.data.selfossUrl) {
// contract.fileurl = fileRs.data.selfossUrl;
// contract.save();
// }
try { try {
this.updateApply(contract.id); this.updateApply(contract.id);
} catch (error) { } catch (error) {
...@@ -1465,6 +1467,8 @@ class EcontractService extends ServiceBase { ...@@ -1465,6 +1467,8 @@ class EcontractService extends ServiceBase {
await econtract.save(); await econtract.save();
this.syncSign(econtract.id); this.syncSign(econtract.id);
// TODO DOWNLOAD OK
this.redisClient.rpushBCD({id: econtract.id, sve: "e"});
return this.returnjson(0, "success", { return this.returnjson(0, "success", {
contractId: econtract.id contractId: econtract.id
}); });
...@@ -1650,6 +1654,8 @@ class EcontractService extends ServiceBase { ...@@ -1650,6 +1654,8 @@ class EcontractService extends ServiceBase {
econtract.end_at = end_at; econtract.end_at = end_at;
await econtract.save(); await econtract.save();
// TODO DOWNLOAD OK
this.redisClient.rpushBCD({id: econtract.id, sve: "e"});
return this.returnjson(0, "success", { return this.returnjson(0, "success", {
contractId: econtract.id contractId: econtract.id
}); });
...@@ -1822,6 +1828,9 @@ class EcontractService extends ServiceBase { ...@@ -1822,6 +1828,9 @@ class EcontractService extends ServiceBase {
await econtract.save(); await econtract.save();
this.syncSign(econtract.id); this.syncSign(econtract.id);
// TODO DOWNLOAD OK
this.redisClient.rpushBCD({id: econtract.id, sve: "e"});
return this.returnjson(0, "success", { return this.returnjson(0, "success", {
contractId: econtract.id contractId: econtract.id
}); });
...@@ -2027,6 +2036,9 @@ class EcontractService extends ServiceBase { ...@@ -2027,6 +2036,9 @@ class EcontractService extends ServiceBase {
await econtract.save(); await econtract.save();
this.syncSign(econtract.id); this.syncSign(econtract.id);
// TODO DOWNLOAD
this.redisClient.rpushBCD({id: econtract.id, sve: "e"});
return this.returnjson(0, "success", { return this.returnjson(0, "success", {
contractId: econtract.id contractId: econtract.id
}); });
...@@ -2085,6 +2097,39 @@ class EcontractService extends ServiceBase { ...@@ -2085,6 +2097,39 @@ class EcontractService extends ServiceBase {
return system.getErrResult2("接口异常"); return system.getErrResult2("接口异常");
} }
} }
async downloadContract(id) {
try {
let contract = await this.dao.findById(id);
if (!contract || contract.eflowstatus != "2" || contract.fileurl) {
return ;
}
//await this.syncYzSign(2134);
// 请求文件地址
let fileRs = await this.utilesignbaoSve.downloadUserContractFile(contract.eflowid, "econtractSve");
if (fileRs.code == 1 && fileRs.data.selfossUrl) {
contract.fileurl = fileRs.data.selfossUrl;
await contract.save();
this.syncYzSign(contract.id);
} else {
await this.utilesignbaoSve.archiveProcess({flowId: contract.eflowid}, "econtractSve");
let fileRs = await this.utilesignbaoSve.downloadUserContractFile(contract.eflowid, "econtractSve");
if (fileRs.code == 1 && fileRs.data.selfossUrl) {
contract.fileurl = fileRs.data.selfossUrl;
await contract.save();
this.syncYzSign(contract.id);
}
}
} catch (e) {
console.error(e);
return {
code: -200,
message: "error",
data: {}
};
}
}
} }
module.exports = EcontractService; module.exports = EcontractService;
...@@ -31,6 +31,8 @@ class EntcontractService extends ServiceBase { ...@@ -31,6 +31,8 @@ class EntcontractService extends ServiceBase {
this.YZKEY = "4a112ce87c38464d8d454caf23b7b31f"; this.YZKEY = "4a112ce87c38464d8d454caf23b7b31f";
this.YZHDURL = "http://bifrost-youzan-gateway.qa.s.qima-inc.com/api/auth_exempt/youzan.pay.finance.tax.sign.merchant.gsb.notify/1.0.0"; this.YZHDURL = "http://bifrost-youzan-gateway.qa.s.qima-inc.com/api/auth_exempt/youzan.pay.finance.tax.sign.merchant.gsb.notify/1.0.0";
this.redisClient = system.getObject("util.redisClient");
} }
async getAppConfig() { async getAppConfig() {
...@@ -198,6 +200,9 @@ class EntcontractService extends ServiceBase { ...@@ -198,6 +200,9 @@ class EntcontractService extends ServiceBase {
entcontract.end_at = end_at; entcontract.end_at = end_at;
await entcontract.save(); await entcontract.save();
// 合同下载任务
this.redisClient.rpushBCD({id: entcontract.id, sve: "ent"});
// this.syncSign(entcontract.id); // this.syncSign(entcontract.id);
// return await this.createMerchant(params); 暂时先不用了 // return await this.createMerchant(params); 暂时先不用了
// return this.returnjson(0, "success", { // return this.returnjson(0, "success", {
...@@ -697,6 +702,10 @@ class EntcontractService extends ServiceBase { ...@@ -697,6 +702,10 @@ class EntcontractService extends ServiceBase {
params.toAppId = enttemplate.appid; params.toAppId = enttemplate.appid;
params.toMcthid = enttemplate.mcthid; params.toMcthid = enttemplate.mcthid;
params.key = enttemplate.key; params.key = enttemplate.key;
// 合同下载任务
this.redisClient.rpushBCD({id: entcontract.id, sve: "ent"});
return await this.createYzMerchant(params); return await this.createYzMerchant(params);
// return this.returnjson(0, "success", { // return this.returnjson(0, "success", {
// contractId: entcontract.id // contractId: entcontract.id
...@@ -772,6 +781,39 @@ class EntcontractService extends ServiceBase { ...@@ -772,6 +781,39 @@ class EntcontractService extends ServiceBase {
} }
} }
async downloadContract(id) {
try {
let contract = await this.dao.findById(id);
if (!contract || contract.eflowstatus != "2" || contract.fileurl) {
return ;
}
//await this.syncYzSign(2134);
// 请求文件地址
let fileRs = await this.utilesignbaoSve.downloadUserContractFile(contract.eflowid, "econtractSve");
if (fileRs.code == 1 && fileRs.data.selfossUrl) {
contract.fileurl = fileRs.data.selfossUrl;
await contract.save();
this.syncYzSign(contract.id);
} else {
await this.utilesignbaoSve.archiveProcess({flowId: contract.eflowid}, "econtractSve");
let fileRs = await this.utilesignbaoSve.downloadUserContractFile(contract.eflowid, "econtractSve");
if (fileRs.code == 1 && fileRs.data.selfossUrl) {
contract.fileurl = fileRs.data.selfossUrl;
await contract.save();
this.syncYzSign(contract.id);
}
}
} catch (e) {
console.error(e);
return {
code: -200,
message: "error",
data: {}
};
}
}
async syncYzSign(contractId) { async syncYzSign(contractId) {
// 查询合同 // 查询合同
var contract = await this.dao.findById(contractId); var contract = await this.dao.findById(contractId);
......
const system = require("../system");
// const redis = require("redis");
const settings = require("../../config/settings");
// const bluebird = require("bluebird");
// bluebird.promisifyAll(redis);
const redisClient = system.getObject("util.redisClient");
// const logCtl=system.getObject("web.oplogCtl");
class DownContractClient {
constructor() {
this.DOWNLOAD_KEY = "bpo:contract:download";
this.KEY = "DOWN_LOAD_CONTRACT_KEY";
this.sve = {
e: system.getObject("service.econtractSve"),
dk: system.getObject("service.dkcontractSve"),
ent: system.getObject("service.entcontractSve"),
}
}
async donloadContract() {
// 定时器执行服务,这个简单加锁就够用
let v = await redisClient.get(this.KEY);
if (v) {
return;
}
try {
await redisClient.setWithEx(this.KEY, 123, 60);
await this.doDownLoad();
redisClient.delete(this.KEY);
} catch (e) {
console.log(e);
redisClient.delete(this.KEY);
}
}
async doDownLoad() {
let len = await redisClient.llen(this.DOWNLOAD_KEY) || 0;
if (!len) {
redisClient.delete(this.KEY);
return;
}
for (let i = 0; i < len; i++) {
let item = await redisClient.rpop(this.DOWNLOAD_KEY);
console.log(item);
item = JSON.parse(item);
try {
await this.sve[item.sve].downloadContract(item.id);
} catch (e) {
console.log(e);
}
console.log(item);
}
}
}
module.exports = DownContractClient;
const System = require("../system");
const redis = require("redis");
const settings = require("../../config/settings");
const bluebird = require("bluebird");
bluebird.promisifyAll(redis);
// const logCtl=System.getObject("web.oplogCtl");
class PublishClient {
constructor() {
const redisConfig = settings.redis();
this.client = redis.createClient({
host: redisConfig.host,
port: redisConfig.port,
password: redisConfig.password,
db: redisConfig.db,
retry_strategy: function (options) {
// if (options.error && options.error.code === 'ECONNREFUSED') {
// // End reconnecting on a specific error and flush all commands with
// // a individual error
// return new Error('The server refused the connection');
// }
if (options.total_retry_time > 1000 * 60 * 60) {
// End reconnecting after a specific timeout and flush all commands
// with a individual error
return new Error('Retry time exhausted');
}
if (options.attempt > 10) {
// End reconnecting with built in error
return 10000;
}
// reconnect after
return Math.min(options.attempt * 100, 3000);
}
});
this.client.on("error", function (err) {
console.log("Error " + err);
});
}
async publish(channel, msg){
console.log(channel+":"+msg);
return this.client.publishAsync(channel, msg);
}
async rpush(key, val) {
return this.client.rpushAsync(key, val);
}
async lpush(key, val) {
return this.client.lpushAsync(key, val);
}
async rpop(key) {
this.client.rpop(key);
}
async lpop(key) {
this.client.lpop(key);
}
}
module.exports = PublishClient;
...@@ -211,6 +211,15 @@ class RedisClient{ ...@@ -211,6 +211,15 @@ class RedisClient{
async incr(key){ async incr(key){
return this.client.incrAsync(key); return this.client.incrAsync(key);
} }
async blpop(key, d) {
return await this.client.blpopAsync(key, d);
}
async rpushBCD(v) {
this.rpush("bpo:contract:download", JSON.stringify(v));
}
} }
module.exports=RedisClient; module.exports=RedisClient;
// var client=new RedisClient(); // var client=new RedisClient();
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title id="needh5">薪必果管理系统</title> <title id="needh5">薪必果电子签</title>
<link rel="stylesheet" href="/css/ele/chalk.css"> <link rel="stylesheet" href="/css/ele/chalk.css">
<link rel="stylesheet" href="/css/main.css"> <link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/fontawesome/css/font-awesome.min.css"> <link rel="stylesheet" href="/css/fontawesome/css/font-awesome.min.css">
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
} }
#app { #app {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.appBack { .appBack {
background: url('https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_11021553049639917201920104039917bpohhr_login_bg.png'); /*background: url('https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_11021553049639917201920104039917bpohhr_login_bg.png');*/
background-size: 100% 100%; background-size: 100% 100%;
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
/* margin: 0 auto; */ /* margin: 0 auto; */
width: 100%; width: 100%;
height: 100%; height: 100%;
display: none;
} }
.loginBox { .loginBox {
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
bottom: 0; bottom: 0;
right: 0; right: 0;
margin: auto; margin: auto;
display: none;
} }
.identifybox { .identifybox {
...@@ -118,55 +119,14 @@ ...@@ -118,55 +119,14 @@
</style> </style>
</head> </head>
<body style="overflow: hidden; width: 100%; height: 100%;"> <body style="overflow: hidden; width: 100%;
<div id="app"> height: 100%;
<div class="appBack"> ">
<!-- <div :style="appBox"> --> <div id="app">
<div class="appBox"> <div>欢迎使用薪必果电子签</div>
<div class="loginBox"> </div>
<img <script src="/js/vue/jquery.min.js"></script>
src="https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_42731556107828871201924201028871xbg_bg.png" /> <script src="/js/vue/axios.min.js"></script>
<div
style="position:absolute;top: 100px;left: 800px;background-color:white;width: 340px;height: 406px;">
<el-form style="margin:20px 20px;" :model="loginForm" :rules="rules" ref="loginForm"
label="right" class="demo-ruleForm">
<span style="color: #666666; font-size: 16px;width: 214px;">您好,欢迎登录薪必果·合伙人系统</span>
<label class="grayLine"></label>
<el-form-item label="手机号:" prop="userName" class="itemLaber">
<el-input v-model="loginForm.userName" style="width:300px;height:40px;"
placeholder="请输入帐号" @keyup.enter.native="login" ></el-input>
</el-form-item>
<el-form-item label="登录密码:" prop="password" class="itemLaber" style="padding-bottom:15px;">
<el-input type="password" style="width:300px;height:40px;" v-model="loginForm.password"
placeholder="请输入密码" @keyup.enter.native="login" ></el-input>
</el-form-item>
<div v-if="showAggree" style="float:left;">
<el-checkbox style="float:left" v-model="isAggree">我已知悉并同意</el-checkbox>
<a href="https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_zxy_0b1be902e883436491036942391e7e9d.pdf"
style="float:left;text-decoration:none;color:blue;font-size: 13px;
padding-top: 1px;" target="_blank">《薪必果合伙人协议》</a>
</div>
<el-button v-if="!showAggree || (showAggree && isAggree)" @click="login"
style="margin-top:15px;width:300px;height:40px;background-color: #5FD7B8;color: #FFFFFF; font-size: 18px;">登录</el-button>
<el-button v-else @click="login"
style="margin-top:15px;width:300px;height:40px;font-size: 18px;" disabled>登录
</el-button>
</el-form>
</div>
<div class="appBotton">
<span style="color:#CCCCCC;padding: 20px;font-size: 16px;">版权所有©汉唐信通(北京)科技有限公司</span>
</div>
</div>
</div>
</div>
</div>
<script src="/js/vue/jquery.min.js"></script>
<script src="/js/vue/axios.min.js"></script>
<script src="/js/login/loginbpoadmin.js"></script>
</body> </body>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title id="needh5">薪必果企业登录</title> <title id="needh5">薪必果电子签</title>
<link rel="stylesheet" href="/css/ele/chalk.css"> <link rel="stylesheet" href="/css/ele/chalk.css">
<link rel="stylesheet" href="/css/main.css"> <link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/fontawesome/css/font-awesome.min.css"> <link rel="stylesheet" href="/css/fontawesome/css/font-awesome.min.css">
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
} }
#app { #app {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.appBack { .appBack {
background: url('https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_11021553049639917201920104039917bpohhr_login_bg.png'); /*background: url('https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_11021553049639917201920104039917bpohhr_login_bg.png');*/
background-size: 100% 100%; background-size: 100% 100%;
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
/* margin: 0 auto; */ /* margin: 0 auto; */
width: 100%; width: 100%;
height: 100%; height: 100%;
display: none;
} }
.loginBox { .loginBox {
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
bottom: 0; bottom: 0;
right: 0; right: 0;
margin: auto; margin: auto;
display: none;
} }
.identifybox { .identifybox {
...@@ -78,7 +79,7 @@ ...@@ -78,7 +79,7 @@
.itemLaber .el-form-item__label { .itemLaber .el-form-item__label {
color: #666666; color: #666666;
font-size: 14px; font-size: 16px;
font-weight: bold; font-weight: bold;
margin-left: 0px; margin-left: 0px;
} }
...@@ -115,66 +116,17 @@ ...@@ -115,66 +116,17 @@
color: #c0c4cc; color: #c0c4cc;
font-size: 14px; font-size: 14px;
} }
.subbtn {
}
.quickreg {
float: left;
color: #5FD7B8;
text-decoration: none;
font-size: 13px;
}
.forgetpwd {
float: right;
color: #999999;
text-decoration: none;
font-size: 13px;
}
</style> </style>
</head> </head>
<body style="overflow: hidden; width: 100%; height: 100%;"> <body style="overflow: hidden; width: 100%;
<div id="app"> height: 100%;
<div class="appBack"> ">
<!-- <div :style="appBox"> --> <div id="app">
<div class="appBox"> <div>欢迎使用薪必果电子签</div>
<div class="loginBox"> </div>
<img <script src="/js/vue/jquery.min.js"></script>
src="https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_42731556107828871201924201028871xbg_bg.png" /> <script src="/js/vue/axios.min.js"></script>
<div
style="position:absolute;top: 120px;left: 800px;background-color:white;width: 340px;height: 380px;">
<el-form style="margin:20px 20px;" :model="loginForm" :rules="rules" ref="loginForm"
label="right" class="demo-ruleForm">
<span style="color: #666666; font-size: 16px;width: 214px;">您好,欢迎登录薪必果企业后台</span>
<label class="grayLine"></label>
<el-form-item label="手机号:" prop="userName" class="itemLaber">
<el-input v-model="loginForm.userName" style="width:300px;height:40px;"
placeholder="请输入帐号" @keyup.enter.native="login" ></el-input>
</el-form-item>
<el-form-item label="登录密码:" prop="password" class="itemLaber" >
<el-input type="password" style="width:300px;height:40px;" v-model="loginForm.password"
placeholder="请输入密码" @keyup.enter.native="login" ></el-input>
</el-form-item>
<div>
<a @click="toreg" class="quickreg" href="javascript:;">快速注册&gt;</a>
<a @click="toforget" class="forgetpwd" href="javascript:;">忘记密码?</a>
</div>
<el-button @click="login" style="margin-top:20px;width:300px;height:40px;background-color: #5FD7B8;color: #FFFFFF; font-size: 18px; " >登录</el-button>
</el-form>
</div>
<div class="appBotton">
<span style="color:#CCCCCC;padding: 20px;font-size: 16px;">版权所有©汉唐信通(北京)科技有限公司</span>
</div>
</div>
</div>
</div>
</div>
<script src="/js/vue/jquery.min.js"></script>
<script src="/js/vue/axios.min.js"></script>
<script src="/js/login/loginbpoent.js"></script>
</body> </body>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title id="needh5">薪必果合伙人登录</title> <title id="needh5">薪必果电子签</title>
<link rel="stylesheet" href="/css/ele/chalk.css"> <link rel="stylesheet" href="/css/ele/chalk.css">
<link rel="stylesheet" href="/css/main.css"> <link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/fontawesome/css/font-awesome.min.css"> <link rel="stylesheet" href="/css/fontawesome/css/font-awesome.min.css">
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
} }
.appBack { .appBack {
background: url('https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_11021553049639917201920104039917bpohhr_login_bg.png'); /*background: url('https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_11021553049639917201920104039917bpohhr_login_bg.png');*/
background-size: 100% 100%; background-size: 100% 100%;
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -123,52 +123,10 @@ ...@@ -123,52 +123,10 @@
height: 100%; height: 100%;
"> ">
<div id="app"> <div id="app">
<div class="appBack"> <div>欢迎使用薪必果电子签</div>
<!-- <div :style="appBox"> -->
<div class="appBox">
<div class="loginBox">
<img
src="https://gsb-zc.oss-cn-beijing.aliyuncs.com//zc_3744155729816966920198144929669bpohhr_login_box.png" />
<div
style="position:absolute;top: 60px;left: 800px;background-color:white;width: 340px;height: 406px;">
<el-form style="margin:20px 20px;" :model="loginForm" :rules="rules" ref="loginForm"
label="right" class="demo-ruleForm">
<span style="color: #666666; font-size: 16px;width: 214px;">您好,欢迎登录薪必果·合伙人系统</span>
<label class="grayLine"></label>
<el-form-item label="手机号:" prop="userName" class="itemLaber">
<el-input v-model="loginForm.userName" style="width:300px;height:40px;"
placeholder="请输入帐号" @keyup.enter.native="login" ></el-input>
</el-form-item>
<el-form-item label="登录密码:" prop="password" class="itemLaber" style="padding-bottom:15px;">
<el-input type="password" style="width:300px;height:40px;" v-model="loginForm.password"
placeholder="请输入密码" @keyup.enter.native="login" ></el-input>
</el-form-item>
<div v-if="showAggree" style="float:left;">
<el-checkbox style="float:left" v-model="isAggree">我已知悉并同意</el-checkbox>
<a href="https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_zxy_0b1be902e883436491036942391e7e9d.pdf"
style="float:left;text-decoration:none;color:blue;font-size: 13px;
padding-top: 1px;" target="_blank">《薪必果合伙人协议》</a>
</div>
<el-button v-if="!showAggree || (showAggree && isAggree)" @click="login"
style="margin-top:15px;width:300px;height:40px;background-color: #5FD7B8;color: #FFFFFF; font-size: 18px;">登录</el-button>
<el-button v-else @click="login"
style="margin-top:15px;width:300px;height:40px;font-size: 18px;" disabled>登录</el-button>
</el-form>
</div>
<div class="appBotton">
<span style="color:#CCCCCC;padding: 20px;font-size: 16px;">版权所有©汉唐信通(北京)科技有限公司</span>
</div>
</div>
</div>
</div>
</div> </div>
<script src="/js/vue/jquery.min.js"></script> <script src="/js/vue/jquery.min.js"></script>
<script src="/js/vue/axios.min.js"></script> <script src="/js/vue/axios.min.js"></script>
<script src="/js/login/loginbpohhr.js"></script>
</body> </body>
......
...@@ -38,7 +38,7 @@ var app = new Vue({ ...@@ -38,7 +38,7 @@ var app = new Vue({
created: function () { created: function () {
}, },
mounted: function () { mounted: function () {
window.location.href = "https://bpogsb.gongsibao.com/loginbpohhr"; // window.location.href = "https://bpogsb.gongsibao.com/loginbpohhr";
// // window.location.href = "https://bpohhr.gongsibao.com/loginbpoent"; // // window.location.href = "https://bpohhr.gongsibao.com/loginbpoent";
// var harr = window.location.href.split("//"); // var harr = window.location.href.split("//");
// this.domainUrl = harr[0] + "//" + window.location.host; // this.domainUrl = harr[0] + "//" + window.location.host;
...@@ -53,41 +53,41 @@ var app = new Vue({ ...@@ -53,41 +53,41 @@ var app = new Vue({
}, },
btnclick: function (pfm, code) { btnclick: function (pfm, code) {
}, },
login() { // login() {
var self = this; // var self = this;
if(self.showAggree) { // if(self.showAggree) {
self.loginForm.aggree = self.isAggree; // self.loginForm.aggree = self.isAggree;
} // }
this.$refs['loginForm'].validate((valid) => { // this.$refs['loginForm'].validate((valid) => {
console.log(valid); // console.log(valid);
if (valid) { // if (valid) {
//处理登录逻辑 // //处理登录逻辑
self.$root.postReq("/web/userCtl/loginhhr",{u:self.loginForm}).then(function(d){ // self.$root.postReq("/web/userCtl/loginhhr",{u:self.loginForm}).then(function(d){
if(d.status==0) { // if(d.status==0) {
window.location.href = self.domainUrl; // window.location.href = self.domainUrl;
// self.$root.pushx({nane:"/home", notab:true}); // // self.$root.pushx({nane:"/home", notab:true});
} else { // } else {
self.$message.warning(d.msg || "登录失败, 请稍候重试"); // self.$message.warning(d.msg || "登录失败, 请稍候重试");
} // }
}); // });
} else { // } else {
return false; // return false;
} // }
}); // });
}, // },
patnerValid() { // patnerValid() {
var self = this; // var self = this;
//调用接口,根据用户名判断是否协议 // //调用接口,根据用户名判断是否协议
this.$root.postReq("/web/userCtl/patnerValid", { // this.$root.postReq("/web/userCtl/patnerValid", {
userName: self.loginForm.userName // userName: self.loginForm.userName
}).then(rd => { // }).then(rd => {
self.showAggree = false; // self.showAggree = false;
if (rd.status == 0) { // if (rd.status == 0) {
if (rd.data == "1") { // if (rd.data == "1") {
self.showAggree = true; // self.showAggree = true;
} // }
} // }
}); // });
}, // },
}, },
}); });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment