Commit 2128f4f7 by 刘泽奇

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

parents 87aef9ad 674be137
...@@ -175,7 +175,8 @@ class UserCtl extends CtlBase { ...@@ -175,7 +175,8 @@ class UserCtl extends CtlBase {
pobj.u.password = super.encryptPasswd(pobj.u.password); pobj.u.password = super.encryptPasswd(pobj.u.password);
const cid = req.companyid; const cid = req.companyid;
pobj.u.company_id = cid; pobj.u.company_id = cid;
var u = await this.service.register(pobj.u); var company = await this.companyS.findById(cid);
var u = await this.service.register(pobj.u,company.siteTheme);
//req.session.user=u; //req.session.user=u;
return system.getResult2(u); return system.getResult2(u);
} }
......
const pmgnode = require("../subsys/pmg"); const pmgnode = require("../subsys/pmg");
const entcenternode = require("../subsys/entcenter"); const entcenternode = require("../subsys/entcenter");
const policycenter= require("../subsys/policycenter");
const personcenternode = require("../subsys/personcenter"); const personcenternode = require("../subsys/personcenter");
module.exports = { module.exports = {
"appid": "wx76a324c5d201d1a4", "appid": "wx76a324c5d201d1a4",
...@@ -22,6 +23,7 @@ module.exports = { ...@@ -22,6 +23,7 @@ module.exports = {
}, },
pmgnode, pmgnode,
entcenternode, entcenternode,
policycenter,
personcenternode, personcenternode,
{ {
"code": "toolCenter", "code": "toolCenter",
......
module.exports= {
"code": "policycenter",
"isleft": true,
"label": "政策中心",
"icon": "el-icon-menu",
"isSubmenu": true,
"children": [
{
"code": "bizmag", "isGroup": true, "icon": "fa fa-outdent", "label": "政策工具", "children": [
{
"code": "tool1",
"label": "工具1",
"isMenu": true,
"bizCode": "tool1",
"bizConfig": null,
"path": ""
},
{
"code": "tool2",
"label": "工具2",
"isMenu": true,
"bizCode": "tool2",
"bizConfig": null,
"path": ""
},
]
}
//------------------------------------------------企业中心左边菜单配置-------------------------------结束
],
};
\ No newline at end of file
...@@ -95,13 +95,16 @@ class UserService extends ServiceBase { ...@@ -95,13 +95,16 @@ class UserService extends ServiceBase {
return this.dao.getAuths(userid); return this.dao.getAuths(userid);
} }
async register(userinfo) { async register(userinfo,theme) {
var self = this; var self = this;
return this.db.transaction(function (t) { return this.db.transaction(function (t) {
return self.dao.create(userinfo, t).then(async function (user) { return self.dao.create(userinfo, t).then(async function (user) {
//按照code查询出角色,设置默认访客角色 //按照code查询出角色,设置默认访客角色
if(user.company_id!=1){ if(user.company_id!=1){
var role = await self.roleDao.model.findOne({ where: { code: "guest" }, transaction: t }); var role = await self.roleDao.model.findOne({ where: { code: "guest" }, transaction: t });
if(theme && theme=="policy"){
role = await self.roleDao.model.findOne({ where: { code: "policy" }, transaction: t });
}
console.log(role); console.log(role);
await user.setRoles([role], { transaction: t }); await user.setRoles([role], { transaction: t });
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<div id="bychpage" class="login"> <div id="bychpage" class="login" v-if="companyinfo.company.siteTheme == \'policy\'">
<div style="width:100%;margin: 0 auto;"> <div style="width:100%;margin: 0 auto;">
<div style="z-index:1;position:relative;background-color:#31373b"> <div style="z-index:1;position:relative;background-color:#31373b">
<img style="width:100%;height:auto" :src="loginUrl" /> <img style="width:100%;height:auto" :src="loginUrl" />
...@@ -18,26 +18,30 @@ ...@@ -18,26 +18,30 @@
<div v-if="activeIndex==1" class="login-content-inputs"> <div v-if="activeIndex==1" class="login-content-inputs">
<el-form ref="form1" :rules="rules1" :model="form1" label-width="0px" key="1"> <el-form ref="form1" :rules="rules1" :model="form1" label-width="0px" key="1">
<el-form-item prop="username"> <el-form-item prop="username">
<el-input v-model="form2.username" placeholder="请输入企业名称"> <i slot="prefix" class="el-input__icon el-icon-tickets"></i></el-input> <el-input v-model="form2.username" placeholder="请输入企业名称"> <i slot="prefix"
class="el-input__icon el-icon-tickets"></i></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="mobile"> <el-form-item prop="mobile">
<el-input v-model="form1.mobile" placeholder="请输入11位手机号码"><i slot="prefix" class="el-input__icon el-icon-mobile-phone"></i></el-input> <el-input v-model="form1.mobile" placeholder="请输入11位手机号码"><i slot="prefix"
class="el-input__icon el-icon-mobile-phone"></i></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input type="password" v-model="form2.password" placeholder="请输入登录密码"><i slot="prefix" class="el-input__icon el-icon-view"></i></el-input> <el-input type="password" v-model="form2.password" placeholder="请输入登录密码"><i slot="prefix"
class="el-input__icon el-icon-view"></i></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="code"> <el-form-item prop="code">
<el-input style="width:175px;" v-model="form1.code" placeholder="请输入验证码"><i slot="prefix" class="el-input__icon el-icon-edit"></i></el-input> <el-input style="width:175px;" v-model="form1.code" placeholder="请输入验证码"><i slot="prefix"
class="el-input__icon el-icon-edit"></i></el-input>
<el-button id="loginCode" type="primary" plain style="width:135px;background: rgba(18,142,233,1); <el-button id="loginCode" type="primary" plain style="width:135px;background: rgba(18,142,233,1);
color: rgba(255,255,255,1);" color: rgba(255,255,255,1);" @click="obtaincode1">
@click="obtaincode1">
获取验证码</el-button> 获取验证码</el-button>
</el-form-item> </el-form-item>
<div class="zhanghao">已有账号? <div class="zhanghao">已有账号?
<span style="color:#108EE9;cursor:pointer" @click="login">立即登录</span> <span style="color:#108EE9;cursor:pointer" @click="login">立即登录</span>
</div> </div>
<el-form-item style="margin-bottom:8px;"> <el-form-item style="margin-bottom:8px;">
<el-button type="primary" class="login-content-button" @click="checklogin1" style="margin-top: 45px;">注 册</el-button> <el-button type="primary" class="login-content-button" @click="checklogin1" style="margin-top: 45px;">
</el-button>
</el-form-item> </el-form-item>
<div style="font-size: 12px; <div style="font-size: 12px;
color: rgb(130, 130, 130); color: rgb(130, 130, 130);
...@@ -84,8 +88,8 @@ ...@@ -84,8 +88,8 @@
</el-form-item> </el-form-item>
<el-form-item prop="code"> <el-form-item prop="code">
<el-input style="width:120px;" v-model="form3.code" placeholder="请输入验证码"></el-input> <el-input style="width:120px;" v-model="form3.code" placeholder="请输入验证码"></el-input>
<el-button id="resetCode" type="primary" plain style="width:135px;" <el-button id="resetCode" type="primary" plain style="width:135px;" @click="obtaincode2">获取验证码
@click="obtaincode2">获取验证码</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input type="password" v-model="form3.password" placeholder="请设置6-18位密码"></el-input> <el-input type="password" v-model="form3.password" placeholder="请设置6-18位密码"></el-input>
...@@ -114,8 +118,8 @@ ...@@ -114,8 +118,8 @@
</el-form-item> </el-form-item>
<el-form-item prop="code"> <el-form-item prop="code">
<el-input style="width:120px;" v-model="form4.code" placeholder="请输入验证码"></el-input> <el-input style="width:120px;" v-model="form4.code" placeholder="请输入验证码"></el-input>
<el-button id="registerCode" type="primary" plain style="width:135px;" <el-button id="registerCode" type="primary" plain style="width:135px;" @click="obtaincode3">获取验证码
@click="obtaincode3">获取验证码</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item prop="password"> <el-form-item prop="password">
<el-input type="password" v-model="form4.password" placeholder="请设置6-18位密码,区分大小写"></el-input> <el-input type="password" v-model="form4.password" placeholder="请设置6-18位密码,区分大小写"></el-input>
...@@ -135,14 +139,18 @@ ...@@ -135,14 +139,18 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<gsb-pcpage v-else>
<!-- <gsb-pcpage style="text-align:center;margin-top:80px"> <div style="padding-bottom:20px">
<div> <!-- <el-radio-group v-model="actname" @change="rdochange">
<gsb-form style="width:30%;margin: auto;" ref="loginFrm" :metaData="ldms" :refvalidatemethod="validmethod"> <el-radio label="person">个人用户注册</el-radio>
<h2 slot="title" style="margin:0px;padding-top: 20px">欢迎登录{{ this.$root.currentCompany?this.$root.currentCompany.sitename:"知圈圈"}}</h2> <el-radio label="ent">企业用户注册</el-radio>
<el-button slot="buttonarea" style="width:80%" type="primary" @click="sbhandler">登录</el-button> </el-radio-group> -->
<div style="border-bottom:solid 1px #eee;margin-top:20px;margin-bottom:15px"></div>
<gsb-form key="pregisterFrm" style="width:50%;margin: auto;" ref="pregisterFrm" @btnclick="btnclick" :metaData="mds"
:refvalidatemethod="validmethod">
<h2 slot="title">欢迎注册{{ this.$root.currentCompany?this.$root.currentCompany.sitename:"知圈圈"}}</h2>
<el-button slot="buttonarea" type="primary" style="width:60%" @click="sbhandler">提交</el-button>
</gsb-form> </gsb-form>
</div> </div>
</gsb-pcpage> --> </gsb-pcpage>
\ No newline at end of file
\ 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