Commit d68ac1c8 by 胡悦

Merge branch 'master' of 192.168.3.233:h5/account

2 parents d09f07d2 6ba061ae
...@@ -2,59 +2,80 @@ ...@@ -2,59 +2,80 @@
layui 样式自定义 layui 样式自定义
-------------------------------------*/ -------------------------------------*/
.layui-input:focus, .layui-textarea:focus { .layui-input:focus,
border-color: #1989FA!important; .layui-textarea:focus {
border-color: #1989FA !important;
} }
.layui-form-label.required::before{ .layui-form-label.required::before {
content: '*'; content: '*';
display: inline-block; display: inline-block;
color: red; color: red;
margin-right: 5px; margin-right: 5px;
} }
.layui-btn{ .layui-btn {
background-color: #1989FA!important; background-color: #1989FA !important;
} }
/* .layui-btn, .add-circle, .btn-no-border{ /* .layui-btn, .add-circle, .btn-no-border{
background-color: #1989FA!important; background-color: #1989FA!important;
height: 16px !important; height: 16px !important;
width: 16px !important; width: 16px !important;
border-radius: 50% !important; border-radius: 50% !important;
} */ } */
.layui-laypage-em{ .layui-laypage-em {
background-color: #1989FA!important; background-color: #1989FA !important;
} }
.layui-btn-xs{
color:#1989FA; .layui-btn-xs {
color: #1989FA;
font-size: 14px; font-size: 14px;
height: 14px; height: 14px;
font-weight: 400; font-weight: 400;
line-height: 14px; line-height: 14px;
} }
.layui-btn-xs:hover{
color:#1989FA; .layui-btn-xs:hover {
color: #1989FA;
} }
.layui-form-select dl dd.layui-this{
.layui-form-select dl dd.layui-this {
background-color: #1989FA; background-color: #1989FA;
} }
.layui-form-checked[lay-skin=primary] i{
border-color: #1989FA!important; .layui-form-checked[lay-skin=primary] i {
border-color: #1989FA !important;
background-color: #1989FA; background-color: #1989FA;
color: #fff; color: #fff;
} }
.layui-form-checkbox[lay-skin=primary]:hover i{
border-color: #1989FA!important; .layui-form-checkbox[lay-skin=primary]:hover i {
color: #fff; border-color: #1989FA !important;
color: #fff;
} }
.layui-form-checked span, .layui-form-checked:hover span {
.layui-form-checked span,
.layui-form-checked:hover span {
background-color: #1989FA; background-color: #1989FA;
} }
.layui-form-checked i, .layui-form-checked:hover i {
.layui-form-checked i,
.layui-form-checked:hover i {
color: #1989FA;
}
.layui-laydate .layui-laydate-content .layui-this {
background-color: #1989FA !important;
color: #fff !important;
}
.layui-tab-brief>.layui-tab-title .layui-this {
color: #1989FA; color: #1989FA;
} }
.layui-laydate .layui-laydate-content .layui-this{
background-color: #1989FA!important; .layui-tab-brief>.layui-tab-more li.layui-this:after,
color:#fff!important; .layui-tab-brief>.layui-tab-title .layui-this:after {
border-bottom: 2px solid #1989FA;
} }
\ No newline at end of file \ No newline at end of file
...@@ -89,8 +89,7 @@ header { ...@@ -89,8 +89,7 @@ header {
main { main {
flex: 1; flex: 1;
/* min-height: calc(100% - 60px - 30px); */ min-height: calc(100% - 60px - 30px);
min-height: calc(100% - 60px);
overflow: auto; overflow: auto;
background-color: #f8f8f8; background-color: #f8f8f8;
} }
......
...@@ -49,8 +49,6 @@ ...@@ -49,8 +49,6 @@
$('#logout').click(function () { $('#logout').click(function () {
var sessionId = layui.store.get('token') var sessionId = layui.store.get('token')
request({ sessionId: sessionId, method: 'org.ore.api.example.logout' }, function (result) { request({ sessionId: sessionId, method: 'org.ore.api.example.logout' }, function (result) {
layui.store.remove('external')
layui.store.remove('token')
goLogin() goLogin()
}) })
}) })
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
{ field: 'createdAccount', title: '创建者' }, { field: 'createdAccount', title: '创建者' },
{ field: 'merchantName', title: '商户名(商户号)', width: 160 }, { field: 'merchantName', title: '商户名(商户号)', width: 160 },
{ field: 'createdTime', title: '更新时间', width: 160 }, { field: 'createdTime', title: '更新时间', width: 160 },
{ fixed: 'right', title: '操作', width: 240, align: 'center', toolbar: '#employeeBar' } { fixed: 'right', title: '操作', width: 276, align: 'center', toolbar: '#employeeBar' }
] ]
] ]
}) })
......
...@@ -1148,12 +1148,22 @@ ...@@ -1148,12 +1148,22 @@
// 查询商户的菜单权限树 // 查询商户的菜单权限树
function findMenuFunTreeByMerId() { function findMenuFunTreeByMerId() {
// console.log(merchantForm, '查询商户菜单权限树') // console.log(merchantForm, '查询商户菜单权限树')
var params = { var params = {}
method: 'cn.com.glsx.merchants.merchant.accountTypeSearchRequest', if (parentMerchantId) {
// method: 'org.ore.api.accountType.getProductTreeList', params = {
ids: merchantForm.accountType, method: 'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId',
merchantId: merchantId, id: merchantId,
accountLevel: merchantForm.merchantAccountLevel parentId: parentMerchantId,
accountLevel: merchantForm.merchantAccountLevel
}
} else {
params = {
method: 'cn.com.glsx.merchants.merchant.accountTypeSearchRequest',
// method: 'org.ore.api.accountType.getProductTreeList',
ids: merchantForm.accountType,
merchantId: merchantId,
accountLevel: merchantForm.merchantAccountLevel
}
} }
request(params, function (res) { request(params, function (res) {
if (res.code == '0') { if (res.code == '0') {
...@@ -1180,23 +1190,24 @@ ...@@ -1180,23 +1190,24 @@
} }
console.log(obj) console.log(obj)
active.tabAdd(obj) active.tabAdd(obj)
var selectArr = [] var selectArr = []
var menuData = [] var menuData = []
for (var j = 0; j < productData.products.length; j++) { for (var j = 0; j < productData.products.length; j++) {
menuData = productData.products[j] menuData = productData.products[j]
selectArr.push(menuData.productId) selectArr.push(menuData.productId)
active.treeTabAdd({ var idList = menuData.menuIds.concat(menuData.functionIds)
name: menuData.productName, active.treeTabAdd({
value: menuData.productId name: menuData.productName,
}, item.accounttypeId, item.products, menuData.idList) value: menuData.productId
} }, item.accounttypeId, item.products, idList)
// // 产品的回显 }
console.log(selectEl[item.accounttypeId], '\\\\\\\\\\\\\\\\\\') // // 产品的回显
selectEl[item.accounttypeId].setValue(selectArr) console.log(selectEl[item.accounttypeId], '\\\\\\\\\\\\\\\\\\')
var filterName = 'treeTab' + item.accounttypeId selectEl[item.accounttypeId].setValue(selectArr)
var productId = 'tab_' + item.accounttypeId + '_' + item.products[0].productId var filterName = 'treeTab' + item.accounttypeId
active.tabChange(filterName, productId) var productId = 'tab_' + item.accounttypeId + '_' + item.products[0].productId
// 树的回显 active.tabChange(filterName, productId)
// 树的回显
} }
} }
if (check_arr.length != 0) { if (check_arr.length != 0) {
...@@ -1237,6 +1248,7 @@ ...@@ -1237,6 +1248,7 @@
// 获取角色权限数据requestList // 获取角色权限数据requestList
function getAuthList() { function getAuthList() {
requestList = []
for (var key in treeData) { for (var key in treeData) {
var accountObj = treeData[key] var accountObj = treeData[key]
var productList = [] var productList = []
...@@ -1257,7 +1269,7 @@ ...@@ -1257,7 +1269,7 @@
// m.parentId // m.parentId
var findIdx = -1 var findIdx = -1
$.each(functionIds, function (idn, n) { $.each(functionIds, function (idn, n) {
if (n.id == m.parentId) { if (n.mendId == m.parentId) {
findIdx = idn findIdx = idn
} }
}) })
...@@ -1287,14 +1299,20 @@ ...@@ -1287,14 +1299,20 @@
$('#draft').on('click', function () { $('#draft').on('click', function () {
getAuthList() getAuthList()
console.log(requestList)
var params = { var params = {
merchantId: merchantId, merchantId: merchantId,
accountTypes: JSON.stringify(requestList), accountTypes: JSON.stringify(requestList),
method: 'cn.com.glsx.merchants.merchant.savePermissions', method: 'cn.com.glsx.merchants.merchant.updatePermissions',
status: 1 status: merchantForm.status
} }
request(params, function (res) { request(params, function (res) {
console.log(res.data) console.log(res.data)
if (res.code == '0') {
layer.msg('操作成功', {
icon: 1
})
}
}) })
return false return false
}) })
...@@ -1314,15 +1332,15 @@ ...@@ -1314,15 +1332,15 @@
merchantId: merchantId, merchantId: merchantId,
accountTypes: JSON.stringify(requestList) accountTypes: JSON.stringify(requestList)
} }
if (merchantForm.status == 1) { params.method = 'cn.com.glsx.merchants.merchant.updatePermissions'
params.method = 'cn.com.glsx.merchants.merchant.savePermissions' params.status = merchantForm.status
params.status = 2
} else {
params.method = 'cn.com.glsx.merchants.merchant.updatePermissions'
params.status = merchantForm.status
}
request(params, function (res) { request(params, function (res) {
console.log(res.data) console.log(res.data)
if (res.code == '0') {
layer.msg('操作成功', {
icon: 1
})
}
}) })
return false return false
}) })
......
...@@ -20,10 +20,14 @@ ...@@ -20,10 +20,14 @@
} }
.merchant .layui-table-cell { .merchant .layui-table-cell {
height: auto; /* height: auto;
overflow: visible; overflow: visible;
text-overflow: inherit; text-overflow: inherit;
white-space: normal; white-space: normal; */
height: auto;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.merchant #searchForm .layui-inline { .merchant #searchForm .layui-inline {
...@@ -204,7 +208,7 @@ ...@@ -204,7 +208,7 @@
align: 'center', align: 'center',
title: '操作', title: '操作',
toolbar: '#merchantBtns', toolbar: '#merchantBtns',
width: 220 width: 485
// fixed: 'right' // fixed: 'right'
}] }]
] ]
...@@ -220,7 +224,7 @@ ...@@ -220,7 +224,7 @@
case 'handleDetail': case 'handleDetail':
go('merchant', 'detail', { merchantId: row.id }) go('merchant', 'detail', { merchantId: row.id })
break break
// 修改 // 修改
case 'handleEdit': case 'handleEdit':
// editLevel - 1-创建新商户;2-创建子商户;3-修改 // editLevel - 1-创建新商户;2-创建子商户;3-修改
// step - 1-基本信息;2-权限树 // step - 1-基本信息;2-权限树
...@@ -246,7 +250,7 @@ ...@@ -246,7 +250,7 @@
step: 2 step: 2
}) })
break break
// 创建子商户/门店 // 创建子商户/门店
case 'handleAddMerchant': case 'handleAddMerchant':
// 1-创建新商户;2-创建子商户;3-修改 // 1-创建新商户;2-创建子商户;3-修改
go('merchant', 'edit', { go('merchant', 'edit', {
...@@ -256,13 +260,13 @@ ...@@ -256,13 +260,13 @@
step: 1 step: 1
}) })
break break
// 创建员工 // 创建员工
case 'handleAddStaff': case 'handleAddStaff':
go('employee', 'add', { go('employee', 'add', {
merchantId: row.id merchantId: row.id
}) })
break break
// 修改账户有效期 // 修改账户有效期
case 'handleVaildPeriod': case 'handleVaildPeriod':
// console.log(row) // console.log(row)
layer.open({ layer.open({
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-07-15 15:46:53 * @Date: 2021-07-15 15:46:53
* @LastEditors: limin * @LastEditors: limin
* @LastEditTime: 2021-08-09 11:20:52 * @LastEditTime: 2021-08-09 14:07:12
* @FilePath: \account\js\load.js * @FilePath: \account\js\load.js
*/ */
;(function load() { ;(function load() {
...@@ -20,9 +20,6 @@ function go(module, page, params) { ...@@ -20,9 +20,6 @@ function go(module, page, params) {
var href = '/html/' + module + '/' + page + '.html' var href = '/html/' + module + '/' + page + '.html'
window.location.href = _p ? href + '?' + _p : href window.location.href = _p ? href + '?' + _p : href
} }
function goLogin() {
window.location.href = '/login.html'
}
function loadLayConfig() { function loadLayConfig() {
layui.config({ layui.config({
...@@ -55,7 +52,7 @@ function append() { ...@@ -55,7 +52,7 @@ function append() {
var header = document.createElement('header') var header = document.createElement('header')
var footer = document.createElement('footer') var footer = document.createElement('footer')
$(header).load('/html/components/header.html') $(header).load('/html/components/header.html')
// $(footer).load('/html/components/footer.html') $(footer).load('/html/components/footer.html')
$('main').before(header).after(footer) $('main').before(header).after(footer)
} }
...@@ -85,6 +82,14 @@ function loadConfig() { ...@@ -85,6 +82,14 @@ function loadConfig() {
}) })
}) })
} }
function goLogin() {
layui.use(['store'], function () {
layui.store.remove('external')
layui.store.remove('token')
layui.store.remove('user')
window.location.href = '/login.html'
})
}
function genurl(param, key, encode) { function genurl(param, key, encode) {
// if (!param || layui.$.isEmptyObject(param)) return '' // if (!param || layui.$.isEmptyObject(param)) return ''
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-07-19 10:15:48 * @Date: 2021-07-19 10:15:48
* @LastEditors: limin * @LastEditors: limin
* @LastEditTime: 2021-08-09 10:52:59 * @LastEditTime: 2021-08-09 14:09:12
* @FilePath: \account\js\request.js * @FilePath: \account\js\request.js
*/ */
layui.define(['sha1', 'md5', 'helper'], function (exports) { layui.define(['sha1', 'md5', 'helper'], function (exports) {
...@@ -58,14 +58,12 @@ layui.define(['sha1', 'md5', 'helper'], function (exports) { ...@@ -58,14 +58,12 @@ layui.define(['sha1', 'md5', 'helper'], function (exports) {
config = config || {} config = config || {}
var common = store.getEx('external') var common = store.getEx('external')
var settings = helper.clone(true, defaultSettings) var settings = helper.clone(true, defaultSettings)
if (isOtherUrl) {
delete settings.beforeSend
}
var data = helper.clone(true, { var data = helper.clone(true, {
timestamp: new Date().getTime() timestamp: new Date().getTime()
}, common.params, params) }, common.params, params)
if (isOtherUrl) { if (isOtherUrl) {
data.app_key = data.appKey data.app_key = data.appKey
delete settings.beforeSend
delete data.appKey delete data.appKey
} }
data.sign = sign(data, common.secret, noSignAttr, isOtherUrl) data.sign = sign(data, common.secret, noSignAttr, isOtherUrl)
...@@ -76,6 +74,9 @@ layui.define(['sha1', 'md5', 'helper'], function (exports) { ...@@ -76,6 +74,9 @@ layui.define(['sha1', 'md5', 'helper'], function (exports) {
success && success(result) success && success(result)
} else { } else {
msg(result.message) msg(result.message)
if(result.errId=='21'){ //TGT失效
goLogin && goLogin()
}
} }
} }
if (config.async === false) { if (config.async === false) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!