Commit 465f4b64 by 王勇飞

Merge branch 'center-manage' of gitlab.gongsibao.com:jiangyong/zhichan into center-manage

parents 231cb456 a2b4f19d
......@@ -62,13 +62,14 @@ class CompanyCtl extends CtlBase {
rtnjson = [];
}
if (userData) {
this.service.formatOrgs(rtnjson);
if (userData.isAdmin || userData.isSuper) {
return system.getResult({orgJson: rtnjson});
return system.getResult({ orgJson: rtnjson });
} else {
return system.getResult({orgJson: this.service.buildOrgs(rtnjson, userData.ptags)});
return system.getResult({ orgJson: this.service.buildOrgs(rtnjson, userData.ptags) });
}
} else {
return system.getResult({orgJson: []});
return system.getResult({ orgJson: [] });
}
}
......
......@@ -9,10 +9,10 @@ class Dao {
this.model = db.models[this.modelName];
console.log(this.modelName);
}
preCreate(u) {
preCreate (u) {
return u;
}
async create(u, t) {
async create (u, t) {
var u2 = this.preCreate(u);
if (t) {
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
......@@ -26,10 +26,10 @@ class Dao {
});
}
}
static getModelName(ClassObj) {
static getModelName (ClassObj) {
return ClassObj["name"].substring(0, ClassObj["name"].lastIndexOf("Dao")).toLowerCase()
}
async refQuery(qobj) {
async refQuery (qobj) {
var w = qobj.refwhere ? qobj.refwhere : {};
if (qobj.levelinfo) {
w[qobj.levelinfo.levelfield] = qobj.levelinfo.level;
......@@ -48,7 +48,7 @@ class Dao {
return this.model.findAll({ where: w, attributes: qobj.fields });
}
}
async bulkDelete(ids, t) {
async bulkDelete (ids, t) {
if (t) {
var en = await this.model.destroy({ where: { id: { [this.db.Op.in]: ids } }, transaction: t });
return en;
......@@ -58,7 +58,7 @@ class Dao {
}
}
async bulkDeleteByWhere(whereParam, t) {
async bulkDeleteByWhere (whereParam, t) {
var en = null;
if (t != null && t != 'undefined') {
whereParam.transaction = t;
......@@ -67,7 +67,7 @@ class Dao {
return await this.model.destroy(whereParam);
}
}
async delete(qobj, t) {
async delete (qobj, t) {
var en = null
if (t != null && t != 'undefined') {
en = await this.model.findOne({ where: { id: qobj.id }, transaction: t });
......@@ -83,14 +83,14 @@ class Dao {
}
return null;
}
extraModelFilter(pobj) {
extraModelFilter (pobj) {
//return {"key":"include","value":{model:this.db.models.app}};
return null;
}
extraWhere(obj, where) {
extraWhere (obj, where) {
return where;
}
orderBy(qobj) {
orderBy (qobj) {
//return {"key":"include","value":{model:this.db.models.app}};
if (!qobj.orderInfo || qobj.orderInfo.length == 0) {
return [["created_at", "DESC"]];
......@@ -99,7 +99,7 @@ class Dao {
}
}
buildQuery(qobj) {
buildQuery (qobj) {
var linkAttrs = [];
const pageNo = qobj.pageInfo.pageNo;
const pageSize = qobj.pageInfo.pageSize;
......@@ -159,7 +159,7 @@ class Dao {
console.log(qc);
return qc;
}
buildaggs(qobj) {
buildaggs (qobj) {
var aggsinfos = [];
if (qobj.aggsinfo) {
qobj.aggsinfo.sum.forEach(aggitem => {
......@@ -173,7 +173,7 @@ class Dao {
}
return aggsinfos;
}
async findAggs(qobj, qcwhere) {
async findAggs (qobj, qcwhere) {
var aggArray = this.buildaggs(qobj);
if (aggArray.length != 0) {
qcwhere["attributes"] = {};
......@@ -192,7 +192,7 @@ class Dao {
}
}
async findAndCountAll(qobj, t) {
async findAndCountAll (qobj, t) {
var qc = this.buildQuery(qobj);
let findList = {}
let count = await this.findCount({ where: qc.where })
......@@ -205,18 +205,22 @@ class Dao {
rtn.aggresult = aggresult;
return rtn;
}
preUpdate(obj) {
preUpdate (obj) {
return obj;
}
async update(obj, tm) {
async update (obj, tm) {
var obj2 = this.preUpdate(obj);
if (tm != null && tm != 'undefined') {
return this.model.update(obj2, { where: { id: obj2.id }, transaction: tm });
await this.model.update(obj2, { where: { id: obj2.id }, transaction: tm });
let n = await this.model.findOne({ where: { id: obj2.id }, transaction: tm });
return n
} else {
return this.model.update(obj2, { where: { id: obj2.id } });
await this.model.update(obj2, { where: { id: obj2.id } });
let n = await this.model.findById(obj2.id)
return n
}
}
async bulkCreate(ids, t) {
async bulkCreate (ids, t) {
if (t != null && t != 'undefined') {
return await this.model.bulkCreate(ids, { transaction: t });
} else {
......@@ -224,7 +228,7 @@ class Dao {
}
}
async updateByWhere(setObj, whereObj, t) {
async updateByWhere (setObj, whereObj, t) {
let inWhereObj = {}
if (t && t != 'undefined') {
if (whereObj && whereObj != 'undefined') {
......@@ -238,10 +242,10 @@ class Dao {
}
return this.model.update(setObj, inWhereObj);
}
async customExecAddOrPutSql(sql, paras = null) {
async customExecAddOrPutSql (sql, paras = null) {
return this.db.query(sql, paras);
}
async customQuery(sql, paras, t) {
async customQuery (sql, paras, t) {
var tmpParas = null;//||paras=='undefined'?{type: this.db.QueryTypes.SELECT }:{ replacements: paras, type: this.db.QueryTypes.SELECT };
if (t && t != 'undefined') {
if (paras == null || paras == 'undefined') {
......@@ -256,15 +260,15 @@ class Dao {
}
return this.db.query(sql, tmpParas);
}
async findCount(whereObj = null) {
async findCount (whereObj = null) {
return this.model.count(whereObj, { logging: false }).then(c => {
return c;
});
}
async findSum(fieldName, whereObj = null) {
async findSum (fieldName, whereObj = null) {
return this.model.sum(fieldName, whereObj);
}
async getPageList(pageIndex, pageSize, whereObj = null, orderObj = null, attributesObj = null, includeObj = null) {
async getPageList (pageIndex, pageSize, whereObj = null, orderObj = null, attributesObj = null, includeObj = null) {
var tmpWhere = {};
tmpWhere.limit = pageSize;
tmpWhere.offset = (pageIndex - 1) * pageSize;
......@@ -285,20 +289,20 @@ class Dao {
}
return await this.model.findAndCountAll(tmpWhere);
}
async findOne(obj, attributes = []) {
async findOne (obj, attributes = []) {
if (attributes.length > 0) {
return this.model.findOne({ "where": obj, attributes, row: true });
} else {
return this.model.findOne({ "where": obj, row: true });
}
}
async findOneWithTm(obj, t) {
async findOneWithTm (obj, t) {
return this.model.findOne({ "where": obj, transaction: t });
}
async findById(oid) {
async findById (oid) {
return this.model.findById(oid);
}
async findAll(obj, include = [], other = {}) {
async findAll (obj, include = [], other = {}) {
return this.model.findAll({ "where": obj, include, row: true, ...other });
}
}
......
......@@ -9,11 +9,11 @@ class UserService extends ServiceBase {
this.roleDao = system.getObject("db.auth.roleDao");
this.authS = system.getObject("service.auth.authSve");
}
async pmgetUserByCode(code) {
async pmgetUserByCode (code) {
let ux = await this.cacheManager["CodeCache"].getCache(code);
return ux;
}
async loginApp(appkey, uname) {
async loginApp (appkey, uname) {
let rtn = {}
let app = await this.cacheManager["AppCache"].cache(appkey);
let userLogined = await this.cacheManager["UserCache"].cache(uname);
......@@ -38,7 +38,7 @@ class UserService extends ServiceBase {
//和租户绑定同一家公司
//按照用户名和密码进行注册
//控制器端检查用户名和密码非空
async registerByTantent(p, q) {
async registerByTantent (p, q) {
// 需要默认添加访客角色,为了控制单点从平台登录时看到的菜单和功能
if (p.roles && p.roles.length > 0) {
if (p.roles.indexOf(settings.pmroleid["pr"]) < 0) {
......@@ -51,7 +51,7 @@ class UserService extends ServiceBase {
}
//应用的自由用户注册,无需验证,需要前端头设置公司KEY
async pmregisterByFreeUser(p, q) {
async pmregisterByFreeUser (p, q) {
p.rolecodes = [settings.pmroleid["pr"]];
let rtn = await this.pmregister(p, q)
return rtn;
......@@ -60,7 +60,7 @@ class UserService extends ServiceBase {
//平台租户注册接口方法
//控制器端检查用户名和密码非空
async pmregister(p, q) {
async pmregister (p, q) {
var self = this;
let tmppwd = p.password;
if (!tmppwd) {
......@@ -134,12 +134,12 @@ class UserService extends ServiceBase {
}
});
}
async unlockUser(username) {
async unlockUser (username) {
await this.resetPassword(username, settings.defaultpwd);
return this.dao.updateByWhere({ isEnabled: true }, { userName: username })
}
async logout(pobj) {
async logout (pobj) {
await this.cacheManager["UserCache"].invalidate(pobj.username);
return {}
}
......@@ -147,7 +147,7 @@ class UserService extends ServiceBase {
//登录接口封装kong-url
//登录路由放行
//p里面含有appkey,company_id,userName,password
async pmlogin(p, q, req) {
async pmlogin (p, q, req) {
var self = this;
//先要按照用户名,在统一账户中查找存在性
//如果不存在
......@@ -158,7 +158,9 @@ class UserService extends ServiceBase {
}
var rtn = {}
let u = await this.findOne({ userName: p.userName });
let inpassword = this.getEncryptStr(p.password);
//解密客户端密码
let passwd = system.desEncript(p.password)
let inpassword = this.getEncryptStr(passwd);
if (u.password != inpassword) {
return null;
}
......@@ -198,7 +200,7 @@ class UserService extends ServiceBase {
}
})
}
async getUserInfo(uname) {
async getUserInfo (uname) {
// let userfind = await this.dao.model.findOne({
// where: { userName: uname, app_id: settings.pmappid },
// attributes: ['userName', 'nickName',"headUrl",'isSuper','isAdmin'],
......@@ -219,7 +221,7 @@ class UserService extends ServiceBase {
//自由用户的电话登录和注册
//需要存在公司KEY
async pmloginByVCodeForFreeUser(p, q) {
async pmloginByVCodeForFreeUser (p, q) {
p.rolecodes = [settings.pmroleid["pr"]];
let rtn = await this.pmloginByVCode(p, q, req)
return system.getResult(rtn);
......@@ -228,7 +230,7 @@ class UserService extends ServiceBase {
//平台租户注册与登录
//用户验证码登录
//
async pmloginByVCode(p, q, req) {
async pmloginByVCode (p, q, req) {
var rtn = {}
//检查传递过来的手机验证码是否与缓存的一致
let mobile = p.mobile;
......@@ -273,19 +275,19 @@ class UserService extends ServiceBase {
//不一致那么就
}
//发送手机验证码并缓存
async sendVCode(p, q, req) {
async sendVCode (p, q, req) {
let mobile = p.mobile;
let vcodeobj = await this.cacheManager["VCodeCache"].cache(mobile, null, 60);
return vcodeobj.vcode;
}
async reSendVCode(p, q, req) {
async reSendVCode (p, q, req) {
let mobile = p.mobile;
await this.cacheManager["VCodeCache"].invalidate(mobile);
let vcodeobj = await this.cacheManager["VCodeCache"].cache(mobile, null, 60);
return vcodeobj.vcode;
}
//修改中心密码
async cmodifypwd(uname, newpwd, cmpid) {
async cmodifypwd (uname, newpwd, cmpid) {
try {
let rtn = await system.postJsonTypeReq(UserService.consumerUrl(uname), { tags: ["cmp_" + cmpid, "pass_" + newpwd] }, "PATCH")
console.log(rtn)
......@@ -299,7 +301,7 @@ class UserService extends ServiceBase {
}
}
//创建统一账号及jwt身份
async cregister(uname, cmpid, pass, uid) {
async cregister (uname, cmpid, pass, uid) {
try {
var rtn2 = null;
let rtn = await system.postJsonTypeReq(UserService.newConsumerUrl(), { username: uname, custom_id: uid, tags: ["cmp_" + cmpid, "pass_" + pass] })
......@@ -321,7 +323,7 @@ class UserService extends ServiceBase {
}
//plkey--对应消费者jwt身份的key,插件解码token后,获取iss-key,查询出身份,利用
//身份中的secret验证签名
async jwtsign(plkey, secretstr, opts) {
async jwtsign (plkey, secretstr, opts) {
let promise = new Promise(function (resv, rej) {
jwt.sign({ exp: Math.floor(Date.now() / 1000) + (60 * 60), iss: plkey }, secretstr, opts, function (err, rtn) {
if (err) {
......@@ -334,13 +336,13 @@ class UserService extends ServiceBase {
return promise;
}
//只要登录 生成新的访问jwttoken
async cmakejwt(key, secret, opts) {
async cmakejwt (key, secret, opts) {
var token = await this.jwtsign(key, secret, opts);
return token;
}
//删除统一账号
async cunregister(uname) {
async cunregister (uname) {
try {
let rtn = await system.delReq(UserService.consumerUrl(uname))
if (rtn.statusCode == 204) {
......@@ -354,15 +356,15 @@ class UserService extends ServiceBase {
//登录统一账号
async clogin(uname) {
async clogin (uname) {
//检查是否存在重名
}
//按用户名查询统一用户
async findCUser(uname) {
async findCUser (uname) {
}
async resetPassword(uname, pwd) {
async resetPassword (uname, pwd) {
let inpassword = this.getEncryptStr(pwd, true);
var self = this;
return this.db.transaction(async function (t) {
......@@ -380,7 +382,7 @@ class UserService extends ServiceBase {
});
}
//修改
async update(qobj, tm = null) {
async update (qobj, tm = null) {
var self = this;
return this.db.transaction(async function (t) {
delete qobj['company_id']
......@@ -402,7 +404,7 @@ class UserService extends ServiceBase {
* @param {*} productCatName 产品类型名称
* @param {*} regionName 区域
*/
async getBizUserForBizChance(clientMobile, spName, productCatName, regionName) {
async getBizUserForBizChance (clientMobile, spName, productCatName, regionName) {
var self = this
clientMobile = clientMobile + "_" + spName + "_" + regionName + "_" + productCatName
console.log(`商机 缓存 key ----- ${clientMobile} `);
......@@ -427,7 +429,7 @@ class UserService extends ServiceBase {
let companyFind = await self.companyDao.model.findOne({
where: { name: spName }, include: [
{
model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags', 'isAllArea', 'isSalesman', 'isDelivery','tx_uin'], raw: true
model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags', 'isAllArea', 'isSalesman', 'isDelivery', 'tx_uin'], raw: true
}
], excludes: ['orgJson'], transaction: t
});
......@@ -486,7 +488,7 @@ class UserService extends ServiceBase {
}
})
}
async findCostBySkuCode(skucode) {
async findCostBySkuCode (skucode) {
let productpricetmp = await this.db.models.productprice.findOne({
where: { skucode: skucode, isEnabled: true },
include: [
......@@ -512,7 +514,7 @@ class UserService extends ServiceBase {
* @param {*} skucode 最小销售货品编码,来自渠道上架的码
* @param {*} regionName 区域
*/
async getBizUserForDelivery(xclientMobile, spName, productCatName, skucode, regionName) {
async getBizUserForDelivery (xclientMobile, spName, productCatName, skucode, regionName) {
let clientMobile = 'fordeliver' + xclientMobile + "_" + spName + "_" + regionName + "_" + productCatName
console.log(`交付单缓存 key ----- ${clientMobile} `);
var self = this
......@@ -537,7 +539,7 @@ class UserService extends ServiceBase {
let companyFind = await self.companyDao.model.findOne({
where: { name: spName }, include: [
{
model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags', 'isAllArea', 'isSalesman', 'isDelivery','tx_uin'], raw: true
model: self.db.models.user, as: "us", attributes: ['id', 'userName', 'mobile', 'isAllocated', 'opath', 'skilltags', 'regiontags', 'isAllArea', 'isSalesman', 'isDelivery', 'tx_uin'], raw: true
}
], excludes: ['orgJson'], transaction: t
});
......
......@@ -12,16 +12,16 @@ class CompanyService extends ServiceBase {
if (isSuper) {
appsrtn = this.db.models.app.findAll({
where:
{
id: {[this.db.Op.ne]: settings.pmappid}
}
{
id: { [this.db.Op.ne]: settings.pmappid }
}
})
} else {
appsrtn = this.db.models.app.findAll({
where:
{
id: {[this.db.Op.in]: appids}
}
{
id: { [this.db.Op.in]: appids }
}
})
}
return appsrtn
......@@ -30,7 +30,7 @@ class CompanyService extends ServiceBase {
async bindApps(appids, companyid) {
var self = this
return this.db.transaction(async function (t) {
let u = await self.dao.update({appids: appids, id: companyid}, t)
let u = await self.dao.update({ appids: appids, id: companyid }, t)
return appids
})
}
......@@ -68,14 +68,14 @@ class CompanyService extends ServiceBase {
let oldopath = ''
if (!oldNodeData) {//如果不传老对象,表示当前操作是删除节点操作,检查是否存在用户,如果已经存在
//那么就提示不能删除
let us = await self.db.models.user.findOne({where: {opath: {[self.db.Op.like]: `%${opathstr}%`}}})
let us = await self.db.models.user.findOne({ where: { opath: { [self.db.Op.like]: `%${opathstr}%` } } })
if (us) {
let companytmp = await this.dao.model.findOne({where: {id: p.company_id}});
return {orgJson: JSON.parse(companytmp.orgJson)}
let companytmp = await this.dao.model.findOne({ where: { id: p.company_id } });
return { orgJson: JSON.parse(companytmp.orgJson) }
} else {
let u = await this.dao.update(p)
let companytmp = await this.dao.model.findOne({where: {id: p.company_id}});
return {orgJson: JSON.parse(companytmp.orgJson)}
let companytmp = await this.dao.model.findOne({ where: { id: p.company_id } });
return { orgJson: JSON.parse(companytmp.orgJson) }
}
} else {
oldopath = oldNodeData.orgpath == '' ? '123456' : oldNodeData.orgpath
......@@ -90,7 +90,7 @@ class CompanyService extends ServiceBase {
if (curNodeData) {
if (curNodeData.isPosition) {
let us = await self.db.models.user.findAll({
where: {opath: {[self.db.Op.like]: `%${oldopath}%`}},
where: { opath: { [self.db.Op.like]: `%${oldopath}%` } },
transaction: t
})
//查询出角色
......@@ -104,15 +104,15 @@ class CompanyService extends ServiceBase {
}
}
let rs = await self.db.models.role.findAll({
where: {id: {[self.db.Op.in]: roleids}},
where: { id: { [self.db.Op.in]: roleids } },
transaction: t
})
for (let u of us) {
await u.setRoles(rs, {transaction: t})
await u.setRoles(rs, { transaction: t })
//if (opathstr != oldopath) {
u.opath = opathstr + "/" + u.userName
u.ptags = curNodeData.ptags
u.save({transaction: t})
u.save({ transaction: t })
// }
//令用户缓存失效
await self.cacheManager["UserCache"].invalidate(u.userName)
......@@ -121,14 +121,14 @@ class CompanyService extends ServiceBase {
//把原来的路径替换当前新的code
if (opathstr != oldopath) {
let us2 = await self.db.models.user.findAll({
where: {opath: {[self.db.Op.like]: `%${oldopath}%`}},
where: { opath: { [self.db.Op.like]: `%${oldopath}%` } },
transaction: t
})
for (let u of us2) {
let curpath = u.opath
let newpath = curpath.replace(oldNodeData.code, curNodeData.code)
u.opath = newpath
u.save({transaction: t})
u.save({ transaction: t })
//令用户缓存失效
await self.cacheManager["UserCache"].invalidate(u.userName)
}
......@@ -137,8 +137,8 @@ class CompanyService extends ServiceBase {
}
}
let companytmp = await self.dao.model.findOne({where: {id: p.company_id}, transaction: t});
return {orgJson: JSON.parse(companytmp.orgJson)}
let companytmp = await self.dao.model.findOne({ where: { id: p.company_id }, transaction: t });
return { orgJson: JSON.parse(companytmp.orgJson) }
})
}
......@@ -155,6 +155,17 @@ class CompanyService extends ServiceBase {
return rtnjson
}
}
formatOrgs(rtnjson) {
if (rtnjson.length > 0) {
for (let val of rtnjson) {
if (!val.children) {
val.children = []
}
this.formatOrgs(val.children || [])
}
}
}
}
module.exports = CompanyService;
......@@ -103,7 +103,7 @@ class ProductService extends ServiceBase {
if (productprices.length > 0) {
await self.priceDao.bulkCreate(productprices, t)
}
return {};
return currentProduct;
});
}
}
......
......@@ -328,6 +328,22 @@ class System {
var plaintext = bytes.toString(cryptoJS.enc.Utf8);
return plaintext;
}
/**
* 登录密码解码
* @param {*} desstr
*/
static desEncript(desstr) {
let deskey = '647a68c9-da01-40d3-9763-1ffa0f64cf3f'
var keyHex = cryptoJS.enc.Utf8.parse(deskey);
// direct decrypt ciphertext
var decrypted = cryptoJS.DES.decrypt({
ciphertext: cryptoJS.enc.Base64.parse(desstr)
}, keyHex, {
mode: cryptoJS.mode.ECB,
padding: cryptoJS.pad.Pkcs7
});
return decrypted.toString(cryptoJS.enc.Utf8);
}
static getRysResult(reqId, err = "not err") {
if (err === "not err") {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="/ccc.png">
<title></title>
<link href="/0.js" rel="prefetch"><link href="/1.js" rel="prefetch"><link href="/10.js" rel="prefetch"><link href="/11.js" rel="prefetch"><link href="/12.js" rel="prefetch"><link href="/13.js" rel="prefetch"><link href="/14.js" rel="prefetch"><link href="/15.js" rel="prefetch"><link href="/16.js" rel="prefetch"><link href="/17.js" rel="prefetch"><link href="/18.js" rel="prefetch"><link href="/19.js" rel="prefetch"><link href="/2.js" rel="prefetch"><link href="/20.js" rel="prefetch"><link href="/21.js" rel="prefetch"><link href="/22.js" rel="prefetch"><link href="/23.js" rel="prefetch"><link href="/24.js" rel="prefetch"><link href="/25.js" rel="prefetch"><link href="/26.js" rel="prefetch"><link href="/27.js" rel="prefetch"><link href="/28.js" rel="prefetch"><link href="/29.js" rel="prefetch"><link href="/3.js" rel="prefetch"><link href="/30.js" rel="prefetch"><link href="/31.js" rel="prefetch"><link href="/32.js" rel="prefetch"><link href="/33.js" rel="prefetch"><link href="/34.js" rel="prefetch"><link href="/35.js" rel="prefetch"><link href="/36.js" rel="prefetch"><link href="/37.js" rel="prefetch"><link href="/38.js" rel="prefetch"><link href="/39.js" rel="prefetch"><link href="/4.js" rel="prefetch"><link href="/40.js" rel="prefetch"><link href="/5.js" rel="prefetch"><link href="/6.js" rel="prefetch"><link href="/7.js" rel="prefetch"><link href="/8.js" rel="prefetch"><link href="/9.js" rel="prefetch"><link href="/app.js" rel="preload" as="script"></head>
<link href="/0.js" rel="prefetch"><link href="/1.js" rel="prefetch"><link href="/10.js" rel="prefetch"><link href="/11.js" rel="prefetch"><link href="/12.js" rel="prefetch"><link href="/13.js" rel="prefetch"><link href="/14.js" rel="prefetch"><link href="/15.js" rel="prefetch"><link href="/16.js" rel="prefetch"><link href="/17.js" rel="prefetch"><link href="/18.js" rel="prefetch"><link href="/19.js" rel="prefetch"><link href="/2.js" rel="prefetch"><link href="/20.js" rel="prefetch"><link href="/21.js" rel="prefetch"><link href="/22.js" rel="prefetch"><link href="/23.js" rel="prefetch"><link href="/24.js" rel="prefetch"><link href="/25.js" rel="prefetch"><link href="/26.js" rel="prefetch"><link href="/27.js" rel="prefetch"><link href="/28.js" rel="prefetch"><link href="/29.js" rel="prefetch"><link href="/3.js" rel="prefetch"><link href="/30.js" rel="prefetch"><link href="/31.js" rel="prefetch"><link href="/32.js" rel="prefetch"><link href="/33.js" rel="prefetch"><link href="/34.js" rel="prefetch"><link href="/35.js" rel="prefetch"><link href="/36.js" rel="prefetch"><link href="/37.js" rel="prefetch"><link href="/38.js" rel="prefetch"><link href="/39.js" rel="prefetch"><link href="/4.js" rel="prefetch"><link href="/5.js" rel="prefetch"><link href="/6.js" rel="prefetch"><link href="/7.js" rel="prefetch"><link href="/8.js" rel="prefetch"><link href="/9.js" rel="prefetch"><link href="/app.js" rel="preload" as="script"></head>
<body>
<noscript>
<strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="/ccc.png">
<title></title>
<link href="/0.js" rel="prefetch"><link href="/1.js" rel="prefetch"><link href="/10.js" rel="prefetch"><link href="/11.js" rel="prefetch"><link href="/12.js" rel="prefetch"><link href="/13.js" rel="prefetch"><link href="/14.js" rel="prefetch"><link href="/15.js" rel="prefetch"><link href="/16.js" rel="prefetch"><link href="/17.js" rel="prefetch"><link href="/18.js" rel="prefetch"><link href="/19.js" rel="prefetch"><link href="/2.js" rel="prefetch"><link href="/20.js" rel="prefetch"><link href="/21.js" rel="prefetch"><link href="/22.js" rel="prefetch"><link href="/23.js" rel="prefetch"><link href="/24.js" rel="prefetch"><link href="/25.js" rel="prefetch"><link href="/26.js" rel="prefetch"><link href="/27.js" rel="prefetch"><link href="/28.js" rel="prefetch"><link href="/29.js" rel="prefetch"><link href="/3.js" rel="prefetch"><link href="/30.js" rel="prefetch"><link href="/31.js" rel="prefetch"><link href="/32.js" rel="prefetch"><link href="/33.js" rel="prefetch"><link href="/34.js" rel="prefetch"><link href="/35.js" rel="prefetch"><link href="/36.js" rel="prefetch"><link href="/37.js" rel="prefetch"><link href="/38.js" rel="prefetch"><link href="/39.js" rel="prefetch"><link href="/4.js" rel="prefetch"><link href="/40.js" rel="prefetch"><link href="/5.js" rel="prefetch"><link href="/6.js" rel="prefetch"><link href="/7.js" rel="prefetch"><link href="/8.js" rel="prefetch"><link href="/9.js" rel="prefetch"><link href="/app.js" rel="preload" as="script"></head>
<link href="/0.js" rel="prefetch"><link href="/1.js" rel="prefetch"><link href="/10.js" rel="prefetch"><link href="/11.js" rel="prefetch"><link href="/12.js" rel="prefetch"><link href="/13.js" rel="prefetch"><link href="/14.js" rel="prefetch"><link href="/15.js" rel="prefetch"><link href="/16.js" rel="prefetch"><link href="/17.js" rel="prefetch"><link href="/18.js" rel="prefetch"><link href="/19.js" rel="prefetch"><link href="/2.js" rel="prefetch"><link href="/20.js" rel="prefetch"><link href="/21.js" rel="prefetch"><link href="/22.js" rel="prefetch"><link href="/23.js" rel="prefetch"><link href="/24.js" rel="prefetch"><link href="/25.js" rel="prefetch"><link href="/26.js" rel="prefetch"><link href="/27.js" rel="prefetch"><link href="/28.js" rel="prefetch"><link href="/29.js" rel="prefetch"><link href="/3.js" rel="prefetch"><link href="/30.js" rel="prefetch"><link href="/31.js" rel="prefetch"><link href="/32.js" rel="prefetch"><link href="/33.js" rel="prefetch"><link href="/34.js" rel="prefetch"><link href="/35.js" rel="prefetch"><link href="/36.js" rel="prefetch"><link href="/37.js" rel="prefetch"><link href="/38.js" rel="prefetch"><link href="/39.js" rel="prefetch"><link href="/4.js" rel="prefetch"><link href="/5.js" rel="prefetch"><link href="/6.js" rel="prefetch"><link href="/7.js" rel="prefetch"><link href="/8.js" rel="prefetch"><link href="/9.js" rel="prefetch"><link href="/app.js" rel="preload" as="script"></head>
<body>
<noscript>
<strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><title></title><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-175acaff.d8eef113.css rel=prefetch><link href=/css/chunk-1b756945.9e7173ae.css rel=prefetch><link href=/css/chunk-21b5182a.6e6ae301.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-3f4029e7.84fd9662.css rel=prefetch><link href=/css/chunk-5ccefbbb.9e7173ae.css rel=prefetch><link href=/css/chunk-61b0b1e5.9e7173ae.css rel=prefetch><link href=/css/chunk-738a8724.71e3d438.css rel=prefetch><link href=/css/chunk-8e32057a.e8e9a917.css rel=prefetch><link href=/css/chunk-e7e51fa0.9e7173ae.css rel=prefetch><link href=/css/chunk-ff3eaeb0.9e7173ae.css rel=prefetch><link href=/js/chunk-037694a5.7e50cc17.js rel=prefetch><link href=/js/chunk-0aa2a834.9028f9e8.js rel=prefetch><link href=/js/chunk-137dcf78.d8fcc61f.js rel=prefetch><link href=/js/chunk-14b9857b.35e42781.js rel=prefetch><link href=/js/chunk-15d6294e.911f90c4.js rel=prefetch><link href=/js/chunk-175acaff.ca3f7e65.js rel=prefetch><link href=/js/chunk-1792c498.c1554a3b.js rel=prefetch><link href=/js/chunk-1a0615f2.b051fd28.js rel=prefetch><link href=/js/chunk-1b756945.f2391a13.js rel=prefetch><link href=/js/chunk-21b5182a.32c97099.js rel=prefetch><link href=/js/chunk-22347577.172e21a4.js rel=prefetch><link href=/js/chunk-24a41303.88feac34.js rel=prefetch><link href=/js/chunk-25d9ab36.087a7b9f.js rel=prefetch><link href=/js/chunk-291faf05.c5999b66.js rel=prefetch><link href=/js/chunk-2aeda6fa.2bd11851.js rel=prefetch><link href=/js/chunk-2b3066fa.e9594f63.js rel=prefetch><link href=/js/chunk-2c359864.90a950b1.js rel=prefetch><link href=/js/chunk-2d0d61ef.a431f6b6.js rel=prefetch><link href=/js/chunk-2d0e68e0.1a313c84.js rel=prefetch><link href=/js/chunk-2d0efc5d.662e1339.js rel=prefetch><link href=/js/chunk-3385141a.a6e1a986.js rel=prefetch><link href=/js/chunk-3a0bcea0.192dd1cf.js rel=prefetch><link href=/js/chunk-3f4029e7.53caf62c.js rel=prefetch><link href=/js/chunk-477a8e91.c603527d.js rel=prefetch><link href=/js/chunk-4b58f216.e79a0ff7.js rel=prefetch><link href=/js/chunk-4fbb2454.6d97b621.js rel=prefetch><link href=/js/chunk-5ccefbbb.e0ae48f8.js rel=prefetch><link href=/js/chunk-5e7b929d.f3ce9ea9.js rel=prefetch><link href=/js/chunk-61b0b1e5.e4ead4e0.js rel=prefetch><link href=/js/chunk-65e97401.9a1a9380.js rel=prefetch><link href=/js/chunk-738a8724.0af49f4b.js rel=prefetch><link href=/js/chunk-75b126e3.2bc9add9.js rel=prefetch><link href=/js/chunk-8e32057a.70b8517f.js rel=prefetch><link href=/js/chunk-9947983a.7fd1c1d8.js rel=prefetch><link href=/js/chunk-e7e51fa0.2dc827c3.js rel=prefetch><link href=/js/chunk-ff3eaeb0.73991da8.js rel=prefetch><link href=/css/app.4f840f8a.css rel=preload as=style><link href=/css/chunk-vendors.1d90d08d.css rel=preload as=style><link href=/js/app.7dd5663f.js rel=preload as=script><link href=/js/chunk-vendors.d7971afc.js rel=preload as=script><link href=/css/chunk-vendors.1d90d08d.css rel=stylesheet><link href=/css/app.4f840f8a.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.d7971afc.js></script><script src=/js/app.7dd5663f.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=/ccc.png><title></title><link href=/css/chunk-14b9857b.0dc416de.css rel=prefetch><link href=/css/chunk-175acaff.d8eef113.css rel=prefetch><link href=/css/chunk-1b756945.9e7173ae.css rel=prefetch><link href=/css/chunk-21b5182a.6e6ae301.css rel=prefetch><link href=/css/chunk-2c359864.0dc416de.css rel=prefetch><link href=/css/chunk-3385141a.0dc416de.css rel=prefetch><link href=/css/chunk-5ccefbbb.9e7173ae.css rel=prefetch><link href=/css/chunk-61b0b1e5.9e7173ae.css rel=prefetch><link href=/css/chunk-738a8724.71e3d438.css rel=prefetch><link href=/css/chunk-7b4463da.84fd9662.css rel=prefetch><link href=/css/chunk-8e32057a.e8e9a917.css rel=prefetch><link href=/css/chunk-e7e51fa0.9e7173ae.css rel=prefetch><link href=/css/chunk-ff3eaeb0.9e7173ae.css rel=prefetch><link href=/js/chunk-037694a5.7e50cc17.js rel=prefetch><link href=/js/chunk-0aa2a834.9e04d151.js rel=prefetch><link href=/js/chunk-137dcf78.d8fcc61f.js rel=prefetch><link href=/js/chunk-14b9857b.35e42781.js rel=prefetch><link href=/js/chunk-15d6294e.911f90c4.js rel=prefetch><link href=/js/chunk-175acaff.ca3f7e65.js rel=prefetch><link href=/js/chunk-1792c498.c1554a3b.js rel=prefetch><link href=/js/chunk-1a0615f2.b051fd28.js rel=prefetch><link href=/js/chunk-1b756945.f2391a13.js rel=prefetch><link href=/js/chunk-21b5182a.32c97099.js rel=prefetch><link href=/js/chunk-22347577.172e21a4.js rel=prefetch><link href=/js/chunk-24a41303.88feac34.js rel=prefetch><link href=/js/chunk-25d9ab36.087a7b9f.js rel=prefetch><link href=/js/chunk-291faf05.a64ccf02.js rel=prefetch><link href=/js/chunk-2aeda6fa.2bd11851.js rel=prefetch><link href=/js/chunk-2b3066fa.e9594f63.js rel=prefetch><link href=/js/chunk-2c359864.90a950b1.js rel=prefetch><link href=/js/chunk-2d0d61ef.a431f6b6.js rel=prefetch><link href=/js/chunk-2d0e68e0.1a313c84.js rel=prefetch><link href=/js/chunk-2d0efc5d.662e1339.js rel=prefetch><link href=/js/chunk-3385141a.a6e1a986.js rel=prefetch><link href=/js/chunk-3a0bcea0.192dd1cf.js rel=prefetch><link href=/js/chunk-477a8e91.c603527d.js rel=prefetch><link href=/js/chunk-4b58f216.e79a0ff7.js rel=prefetch><link href=/js/chunk-5ccefbbb.e0ae48f8.js rel=prefetch><link href=/js/chunk-5e7b929d.f3ce9ea9.js rel=prefetch><link href=/js/chunk-61b0b1e5.e4ead4e0.js rel=prefetch><link href=/js/chunk-65e97401.9a1a9380.js rel=prefetch><link href=/js/chunk-738a8724.73425720.js rel=prefetch><link href=/js/chunk-75b126e3.2bc9add9.js rel=prefetch><link href=/js/chunk-7b4463da.facbc44a.js rel=prefetch><link href=/js/chunk-8e32057a.e126188b.js rel=prefetch><link href=/js/chunk-9947983a.7fd1c1d8.js rel=prefetch><link href=/js/chunk-e7e51fa0.2dc827c3.js rel=prefetch><link href=/js/chunk-ff3eaeb0.73991da8.js rel=prefetch><link href=/css/app.4f840f8a.css rel=preload as=style><link href=/css/chunk-vendors.1d90d08d.css rel=preload as=style><link href=/js/app.beead532.js rel=preload as=script><link href=/js/chunk-vendors.95c04c90.js rel=preload as=script><link href=/css/chunk-vendors.1d90d08d.css rel=stylesheet><link href=/css/app.4f840f8a.css rel=stylesheet></head><body><noscript><strong>We're sorry but iview-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script src=/js/chunk-vendors.95c04c90.js></script><script src=/js/app.beead532.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0aa2a834"],{"391e":function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},i=[],a=n("9ee1"),o=a["a"],c=n("9ca4"),u=Object(c["a"])(o,r,i,!1,null,null,null);t["a"]=u.exports},"560c":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var r=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"product_info",modelName:"product",packageName:"product",tblheight:r-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd,noExpandAuth:""},on:{onexec:e.onexec,oninitbtn:e.oninitbtn}})]}}])})},i=[],a=(n("6d57"),n("cc57"),n("163d"),n("06d3")),o=n("391e"),c=(n("60b7"),{name:"appinfo_page",data:function(){return{}},components:{PageSpace:o["a"],BizTable:a["a"]},methods:{oninitbtn:function(e,t){},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t,n){return t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},onexec:function(e,t){},validmethod:function(e,t,n){return n()},formatCol:function(e,t,n){if("isEnabled"==t){var r=e["isEnabled"]?"已上架":"待上架";return e["isEnabled"]?'<span style="color:green">'.concat(r,"</span>"):'<span style="color:orange">'.concat(r,"</span>")}if("deliverfile"==t){var i=e["deliverfile"];return"<img src='".concat(i,"' style='height:40px'>")}if("extrafile"==t){var a=e["extrafile"];return"<img src='".concat(a,"' style='height:40px'>")}if("lowpriceref"==t)return e["lowpriceref"]=Number(e["lowpriceref"]),"".concat(e["lowpriceref"]);if("hignpriceref"==t)return e["hignpriceref"]=Number(e["hignpriceref"]),"".concat(e["hignpriceref"]);if("pname"==t)return e.pname=e.product.name,e.product.name;if("strategyitems"==t)return e.strategyitems=e.pricestrategy.optionunion,e.pricestrategy.optionunion;if("code"==t){var o=[];return e.skus.forEach((function(e){o.push(e.pricestrategy_id)})),e.sts=o,e["code"]}}}}),u=c,s=n("9ca4"),f=Object(s["a"])(u,r,i,!1,null,null,null);t["default"]=f.exports},"9ee1":function(e,t,n){"use strict";(function(e){n("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var n=e("#framediv"),r=n.get()[0],i=window.innerHeight-r.offsetTop-t.advalue;t.frameHeight=i,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,n("a336"))}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0aa2a834"],{"391e":function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{width:"100%"},attrs:{id:"framediv"}},[e._t("default",null,{adjustHeight:e.frameHeight})],2)},a=[],i=n("9ee1"),o=i["a"],c=n("9ca4"),s=Object(c["a"])(o,r,a,!1,null,null,null);t["a"]=s.exports},"560c":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("PageSpace",{scopedSlots:e._u([{key:"default",fn:function(t){var r=t.adjustHeight;return[n("BizTable",{ref:"bt",attrs:{formatCol:e.formatCol,metaName:"product_info",modelName:"product",packageName:"product",tblheight:r-120,isMulti:"",refvalidatemethod:e.validmethod,savebefore:e.beforesave,editbefore:e.beforedit,addbefore:e.beforeadd,noExpandAuth:""},on:{onexec:e.onexec,oninitbtn:e.oninitbtn,postformsave:e.postformsave}})]}}])})},a=[],i=(n("6d57"),n("cc57"),n("163d"),n("06d3")),o=n("391e"),c=(n("60b7"),{name:"appinfo_page",data:function(){return{}},components:{PageSpace:o["a"],BizTable:i["a"]},methods:{oninitbtn:function(e,t){},beforeadd:function(e,t){return t({value:!0,message:null})},beforedit:function(e,t,n){return t({value:!0,message:null})},beforesave:function(e,t,n){return n(t)},onexec:function(e,t){},validmethod:function(e,t,n){return n()},formatCol:function(e,t,n){if("isEnabled"==t){var r=e["isEnabled"]?"已上架":"待上架";return e["isEnabled"]?'<span style="color:green">'.concat(r,"</span>"):'<span style="color:orange">'.concat(r,"</span>")}if("deliverfile"==t){var a=e["deliverfile"];return"<img src='".concat(a,"' style='height:40px'>")}if("extrafile"==t){var i=e["extrafile"];return"<img src='".concat(i,"' style='height:40px'>")}if("lowpriceref"==t)return e["lowpriceref"]=Number(e["lowpriceref"]),"".concat(e["lowpriceref"]);if("hignpriceref"==t)return e["hignpriceref"]=Number(e["hignpriceref"]),"".concat(e["hignpriceref"]);if("pname"==t)return e.pname=e.product.name,e.product.name;if("strategyitems"==t)return e.strategyitems=e.pricestrategy.optionunion,e.pricestrategy.optionunion;if("code"==t){var o=[];return e.skus.forEach((function(e){o.push(e.pricestrategy_id)})),e.sts=o,e["code"]}},postformsave:function(e){var t=[];e.skus.forEach((function(e){t.push(e.pricestrategy_id)})),e.sts=t}}}),s=c,u=n("9ca4"),f=Object(u["a"])(s,r,a,!1,null,null,null);t["default"]=f.exports},"9ee1":function(e,t,n){"use strict";(function(e){n("163d");t["a"]={name:"pagespace_page",prop:{tweak:Number},data:function(){return{frameHeight:0,advalue:this.tweak?this.tweak:0}},components:{},mounted:function(){var t=this;this.setHeight(),e(window).resize((function(){t.setHeight()}))},methods:{setHeight:function(){var t=this;this.$nextTick((function(){var n=e("#framediv"),r=n.get()[0],a=window.innerHeight-r.offsetTop-t.advalue;t.frameHeight=a,t.$emit("sizechange",t.frameHeight)}))}}}}).call(this,n("a336"))}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8e32057a"],{"18d0":function(e,t,o){},"4b4f":function(e,t,o){"use strict";var r=o("18d0"),n=o.n(r);n.a},e49c:function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"login"},[o("div",{staticClass:"login-con"},[o("Card",{staticStyle:{"border-radius":"0px"},attrs:{icon:"log-in",bordered:!1}},[o("p",{attrs:{slot:"title"},on:{click:function(t){t.preventDefault(),e.ispasslogin=!0}},slot:"title"},[o("a",{attrs:{href:"#"}},[e._v("密码登录")])]),o("div",{staticClass:"form-con"},[e.ispasslogin?e._e():o("MobileForm",{on:{"on-success-valid":e.handleSubmit,onsendvcode:e.onsendvcode}}),e.ispasslogin?o("login-form",{on:{"on-success-valid":e.handleSubmit}}):e._e()],1)])],1)])},n=[],s=(o("5ab2"),o("6d57"),o("e10e"),o("13c1")),a=o("c24f"),i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("Form",{ref:"loginForm",attrs:{model:e.form,rules:e.rules},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSubmit(t)}}},[o("FormItem",{attrs:{prop:"userName"}},[o("Input",{attrs:{placeholder:"请输入用户名"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:16,type:"ios-person"}})],1)])],1),o("FormItem",{attrs:{prop:"password"}},[o("Input",{attrs:{type:"password",placeholder:"请输入密码"},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:14,type:"md-lock"}})],1)])],1),o("FormItem",{staticStyle:{width:"100%","margin-bottom":"5%"},attrs:{prop:"vcode"}},[o("Row",[o("Col",{attrs:{span:"14"}},[o("Input",{attrs:{placeholder:"请输入验证码"},model:{value:e.form.code,callback:function(t){e.$set(e.form,"code",t)},expression:"form.code"}})],1),o("Col",{attrs:{span:"10"}},[o("div",{staticStyle:{"margin-left":"10%"},attrs:{id:"imgIdentifyingCode"},on:{click:e.getIdentifyingCode}})])],1)],1),o("FormItem",[o("Button",{attrs:{type:"primary",long:""},on:{click:e.handleSubmit}},[e._v("登录")])],1)],1)},l=[],c={name:"LoginForm",props:{userNameRules:{type:Array,default:function(){return[{required:!0,message:" ",trigger:"blur"}]}},passwordRules:{type:Array,default:function(){return[{required:!0,message:" ",trigger:"blur"}]}}},data:function(){return{form:{userName:"",password:"",key:"",code:""}}},computed:{rules:function(){return{userName:this.userNameRules,password:this.passwordRules}}},mounted:function(){this.getIdentifyingCode()},methods:{handleSubmit:function(){var e=this;this.$refs.loginForm.validate((function(t){t&&e.$emit("on-success-valid",{userName:e.form.userName.trim(),password:e.form.password,key:e.form.key,code:e.form.code})}))},getIdentifyingCode:function(){var e=this,t="";Object(a["j"])().then((function(o){t=o.data.data.captcha,e.form.key=o.data.data.key;var r=document.getElementById("imgIdentifyingCode");r.innerHTML=t}))}}},d=c,u=o("9ca4"),m=Object(u["a"])(d,i,l,!1,null,null,null),p=m.exports,f=p,b=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("Form",{ref:"loginForm",attrs:{model:e.form,rules:e.rules},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSubmit(t)}}},[o("FormItem",{attrs:{prop:"mobile"}},[o("Input",{attrs:{placeholder:"请输入手机号"},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:16,type:"ios-person"}})],1)])],1),o("FormItem",{attrs:{prop:"vcode"}},[o("Input",{attrs:{placeholder:"请输入收到的验证码"},model:{value:e.form.vcode,callback:function(t){e.$set(e.form,"vcode",t)},expression:"form.vcode"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:14,type:"md-lock"}})],1),o("span",{attrs:{slot:"append"},slot:"append"},[e.isshowtime?e._e():o("Button",{attrs:{type:"primary"},on:{click:e.sendVCode}},[e._v("发送验证码")]),e.isshowtime?o("span",[e._v(e._s(e.leftseconds)+"秒")]):e._e()],1)])],1),o("FormItem",[o("Button",{attrs:{type:"primary",long:""},on:{click:e.handleSubmit}},[e._v("登录")])],1)],1)},h=[],v={name:"PhoneForm",props:{mobileRules:{type:Array,default:function(){return[{required:!0,message:"电话号码不能为空",trigger:"blur"}]}},vcodeRules:{type:Array,default:function(){return[{required:!0,message:"验证码不能为空",trigger:"blur"}]}}},data:function(){return{form:{mobile:"",vcode:""},isshowtime:!1,leftseconds:60}},computed:{rules:function(){return{mobile:this.mobileRules,vcode:this.vcodeRules}}},methods:{sendVCode:function(){var e=this;if(""!=this.form.mobile.trim()){var t=60;this.isshowtime=!0;var o=setInterval((function(){e.leftseconds=t--,0==t&&(clearInterval(o),e.isshowtime=!1)}),1e3);this.$emit("onsendvcode",{mobile:this.form.mobile})}},handleSubmit:function(){var e=this;this.$refs.loginForm.validate((function(t){t&&e.$emit("on-success-valid",{mobile:e.form.mobile,vcode:e.form.vcode})}))}}},g=v,y=Object(u["a"])(g,b,h,!1,null,null,null),w=y.exports,k=w,O=o("9f3a");function I(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function j(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?I(Object(o),!0).forEach((function(t){Object(s["a"])(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):I(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var _={data:function(){return{ispasslogin:!0}},components:{LoginForm:f,MobileForm:k},methods:j(j({},Object(O["b"])(["handleLogin","getUserInfo","handleLogOut"])),{},{onsendvcode:function(e){Object(a["r"])(e).then((function(e){e.data;console.log(e.data)}))},handleSubmit:function(e){var t=this;this.handleLogin(e).then((function(e){e.hint&&t.$Notice.warning({title:"系统通知",desc:e.hint}),e.user&&e.user.channel&&e.user.channel.code?Object(a["m"])({fromAppKey:"b3b104eb-864d-42f0-b2d7-b5567bc8e91c"}).then((function(e){var o=e.data;0==o.status&&t.handleLogOut().then((function(){window.open("".concat(o.data.homePage,"?code=").concat(o.data.code),"_self")}))})):t.$router.push({name:t.$config.homeName})})).catch((function(e){var o="账号或密码有误!";e&&e.msg&&(o=e.msg),t.$Notice.error({title:"系统通知",desc:o})}))}})},F=_,$=(o("4b4f"),Object(u["a"])(F,r,n,!1,null,null,null));t["default"]=$.exports}}]);
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8e32057a"],{"18d0":function(e,t,o){},"4b4f":function(e,t,o){"use strict";var r=o("18d0"),n=o.n(r);n.a},e49c:function(e,t,o){"use strict";o.r(t);var r=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"login"},[o("div",{staticClass:"login-con"},[o("Card",{staticStyle:{"border-radius":"0px"},attrs:{icon:"log-in",bordered:!1}},[o("p",{attrs:{slot:"title"},on:{click:function(t){t.preventDefault(),e.ispasslogin=!0}},slot:"title"},[o("a",{attrs:{href:"#"}},[e._v("密码登录")])]),o("div",{staticClass:"form-con"},[e.ispasslogin?e._e():o("MobileForm",{on:{"on-success-valid":e.handleSubmit,onsendvcode:e.onsendvcode}}),e.ispasslogin?o("login-form",{on:{"on-success-valid":e.handleSubmit}}):e._e()],1)])],1)])},n=[],s=(o("5ab2"),o("6d57"),o("e10e"),o("13c1")),a=o("c24f"),i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("Form",{ref:"loginForm",attrs:{model:e.form,rules:e.rules},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSubmit(t)}}},[o("FormItem",{attrs:{prop:"userName"}},[o("Input",{attrs:{placeholder:"请输入用户名"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:16,type:"ios-person"}})],1)])],1),o("FormItem",{attrs:{prop:"password"}},[o("Input",{attrs:{type:"password",placeholder:"请输入密码"},model:{value:e.form.password,callback:function(t){e.$set(e.form,"password",t)},expression:"form.password"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:14,type:"md-lock"}})],1)])],1),o("FormItem",{staticStyle:{width:"100%","margin-bottom":"5%"},attrs:{prop:"vcode"}},[o("Row",[o("Col",{attrs:{span:"14"}},[o("Input",{attrs:{placeholder:"请输入验证码"},model:{value:e.form.code,callback:function(t){e.$set(e.form,"code",t)},expression:"form.code"}})],1),o("Col",{attrs:{span:"10"}},[o("div",{staticStyle:{"margin-left":"10%"},attrs:{id:"imgIdentifyingCode"},on:{click:e.getIdentifyingCode}})])],1)],1),o("FormItem",[o("Button",{attrs:{type:"primary",long:""},on:{click:e.handleSubmit}},[e._v("登录")])],1)],1)},c=[],l=o("c276"),d={name:"LoginForm",props:{userNameRules:{type:Array,default:function(){return[{required:!0,message:" ",trigger:"blur"}]}},passwordRules:{type:Array,default:function(){return[{required:!0,message:" ",trigger:"blur"}]}}},data:function(){return{form:{userName:"",password:"",key:"",code:""}}},computed:{rules:function(){return{userName:this.userNameRules,password:this.passwordRules}}},mounted:function(){this.getIdentifyingCode()},methods:{handleSubmit:function(){var e=this;this.$refs.loginForm.validate((function(t){t&&e.$emit("on-success-valid",{userName:e.form.userName.trim(),password:Object(l["c"])(e.form.password),key:e.form.key,code:e.form.code})}))},getIdentifyingCode:function(){var e=this,t="";Object(a["j"])().then((function(o){t=o.data.data.captcha,e.form.key=o.data.data.key;var r=document.getElementById("imgIdentifyingCode");r.innerHTML=t}))}}},u=d,m=o("9ca4"),p=Object(m["a"])(u,i,c,!1,null,null,null),f=p.exports,b=f,h=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("Form",{ref:"loginForm",attrs:{model:e.form,rules:e.rules},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSubmit(t)}}},[o("FormItem",{attrs:{prop:"mobile"}},[o("Input",{attrs:{placeholder:"请输入手机号"},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:16,type:"ios-person"}})],1)])],1),o("FormItem",{attrs:{prop:"vcode"}},[o("Input",{attrs:{placeholder:"请输入收到的验证码"},model:{value:e.form.vcode,callback:function(t){e.$set(e.form,"vcode",t)},expression:"form.vcode"}},[o("span",{attrs:{slot:"prepend"},slot:"prepend"},[o("Icon",{attrs:{size:14,type:"md-lock"}})],1),o("span",{attrs:{slot:"append"},slot:"append"},[e.isshowtime?e._e():o("Button",{attrs:{type:"primary"},on:{click:e.sendVCode}},[e._v("发送验证码")]),e.isshowtime?o("span",[e._v(e._s(e.leftseconds)+"秒")]):e._e()],1)])],1),o("FormItem",[o("Button",{attrs:{type:"primary",long:""},on:{click:e.handleSubmit}},[e._v("登录")])],1)],1)},v=[],g={name:"PhoneForm",props:{mobileRules:{type:Array,default:function(){return[{required:!0,message:"电话号码不能为空",trigger:"blur"}]}},vcodeRules:{type:Array,default:function(){return[{required:!0,message:"验证码不能为空",trigger:"blur"}]}}},data:function(){return{form:{mobile:"",vcode:""},isshowtime:!1,leftseconds:60}},computed:{rules:function(){return{mobile:this.mobileRules,vcode:this.vcodeRules}}},methods:{sendVCode:function(){var e=this;if(""!=this.form.mobile.trim()){var t=60;this.isshowtime=!0;var o=setInterval((function(){e.leftseconds=t--,0==t&&(clearInterval(o),e.isshowtime=!1)}),1e3);this.$emit("onsendvcode",{mobile:this.form.mobile})}},handleSubmit:function(){var e=this;this.$refs.loginForm.validate((function(t){t&&e.$emit("on-success-valid",{mobile:e.form.mobile,vcode:e.form.vcode})}))}}},y=g,w=Object(m["a"])(y,h,v,!1,null,null,null),O=w.exports,k=O,I=o("9f3a");function j(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,r)}return o}function _(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?j(Object(o),!0).forEach((function(t){Object(s["a"])(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):j(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var F={data:function(){return{ispasslogin:!0}},components:{LoginForm:b,MobileForm:k},methods:_(_({},Object(I["b"])(["handleLogin","getUserInfo","handleLogOut"])),{},{onsendvcode:function(e){Object(a["r"])(e).then((function(e){e.data;console.log(e.data)}))},handleSubmit:function(e){var t=this;this.handleLogin(e).then((function(e){e.hint&&t.$Notice.warning({title:"系统通知",desc:e.hint}),e.user&&e.user.channel&&e.user.channel.code?Object(a["m"])({fromAppKey:"b3b104eb-864d-42f0-b2d7-b5567bc8e91c"}).then((function(e){var o=e.data;0==o.status&&t.handleLogOut().then((function(){window.open("".concat(o.data.homePage,"?code=").concat(o.data.code),"_self")}))})):t.$router.push({name:t.$config.homeName})})).catch((function(e){var o="账号或密码有误!";e&&e.msg&&(o=e.msg),t.$Notice.error({title:"系统通知",desc:o})}))}})},$=F,C=(o("4b4f"),Object(m["a"])($,r,n,!1,null,null,null));t["default"]=C.exports}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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