Commit c229837b by cwq0219

Merge branch 'master' of http://192.168.3.233:8090/h5/account

2 parents d7eb4234 d68ac1c8
...@@ -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;
} }
...@@ -118,4 +117,7 @@ footer { ...@@ -118,4 +117,7 @@ footer {
.op1 { .op1 {
opacity: 1; opacity: 1;
}
.footer-close {
text-align: center;
} }
\ No newline at end of file \ No newline at end of file
...@@ -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()
}) })
}) })
......
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
<h3 class="content-title">可见下级商户</h3> <h3 class="content-title">可见下级商户</h3>
<ul id="tree" class="ztree wrapper-tree"></ul> <ul id="tree" class="ztree wrapper-tree"></ul>
</div> </div>
<div class="footer-close">
<button type="button" class="layui-btn layui-btn-normal" id="return">关闭</button>
</div>
</main> </main>
</div> </div>
<script src="https://www.layuicdn.com/layui/layui.js"></script> <script src="https://www.layuicdn.com/layui/layui.js"></script>
...@@ -59,6 +62,11 @@ ...@@ -59,6 +62,11 @@
var basicArr = ['staffName', 'staffPhone', 'roleName', 'roleIds'] var basicArr = ['staffName', 'staffPhone', 'roleName', 'roleIds']
var employeeData = {} var employeeData = {}
getById() getById()
$('#return').on('click', function() {
window.history.back()
})
// 查询员工详情 // 查询员工详情
function getById() { function getById() {
var params = { id: id, method: 'cn.com.glsx.merchants.staff.staffSearchRequest' } var params = { id: id, method: 'cn.com.glsx.merchants.staff.staffSearchRequest' }
...@@ -78,17 +86,12 @@ ...@@ -78,17 +86,12 @@
var treeParams = { id: merchantId, method: 'cn.com.glsx.merchants.merchant.findMerchantTree' } var treeParams = { id: merchantId, method: 'cn.com.glsx.merchants.merchant.findMerchantTree' }
var merchants = {} var merchants = {}
request(treeParams, function(res) { request(treeParams, function(res) {
console.log(res)
if (res.code == '0') { if (res.code == '0') {
var arr = employeeData.visibleInferiorMer.split(',') var arr = employeeData.visibleInferiorMer.split(',')
$.each(arr, function (index, item) { $.each(arr, function (index, item) {
arr[index] = +item arr[index] = +item
}) })
console.log(arr)
merchants = tree.create('tree', res.data, {checkedList: arr, chkDisabled: true}) merchants = tree.create('tree', res.data, {checkedList: arr, chkDisabled: true})
// var id = 32
// var node = merchants.getNodeByParam("id",id)
// merchants.checkNode(node, true, true)
} }
}) })
} }
......
...@@ -318,7 +318,7 @@ ...@@ -318,7 +318,7 @@
var merchants = {} var merchants = {}
request(treeParams, function (res) { request(treeParams, function (res) {
if (res.code == '0') { if (res.code == '0') {
merchants = tree.create('merchantTree', res.data) merchants = tree.create('merchantTree', res.data, null, false)
merchants.expandAll(true) merchants.expandAll(true)
} }
}) })
......
...@@ -9,6 +9,15 @@ ...@@ -9,6 +9,15 @@
<meta name="keywords" itemprop="keywords" content="广联,帐户管理,员工管理" /> <meta name="keywords" itemprop="keywords" content="广联,帐户管理,员工管理" />
<link rel="stylesheet" type="text/css" href="/css/main.css" /> <link rel="stylesheet" type="text/css" href="/css/main.css" />
<title>角色管理</title> <title>角色管理</title>
<style>
.show {
display: inline-block;
}
.hide {
display: none;
}
</style>
</head> </head>
<body> <body>
......
...@@ -41,6 +41,9 @@ ...@@ -41,6 +41,9 @@
<ul class="layui-tab-title"></ul> <ul class="layui-tab-title"></ul>
<div class="layui-tab-content"></div> <div class="layui-tab-content"></div>
</div> </div>
<div class="footer-close">
<button type="button" class="layui-btn layui-btn-normal" id="return">关闭</button>
</div>
</div> </div>
</main> </main>
</div> </div>
...@@ -66,6 +69,10 @@ ...@@ -66,6 +69,10 @@
// 查询角色详情 // 查询角色详情
// getById() // getById()
findMenuFunTreeByMerId() findMenuFunTreeByMerId()
$('#return').on('click', function() {
window.history.back()
})
// form.on('select(accountSelect)', function(data){ // form.on('select(accountSelect)', function(data){
// console.log(data.elem); //得到select原始DOM对象 // console.log(data.elem); //得到select原始DOM对象
// console.log(data.value); //得到被选中的值 // console.log(data.value); //得到被选中的值
......
...@@ -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) {
...@@ -74,6 +74,9 @@ layui.define(['sha1', 'md5', 'helper'], function (exports) { ...@@ -74,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!