Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d68ac1c8
authored
Aug 09, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of 192.168.3.233:h5/account
2 parents
d09f07d2
6ba061ae
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
94 additions
and
48 deletions
css/layui.css
css/main.css
html/components/header.html
html/employee/index.html
html/merchant/edit.html
html/merchant/index.html
js/load.js
js/request.js
css/layui.css
View file @
d68ac1c
...
...
@@ -2,59 +2,80 @@
layui 样式自定义
-------------------------------------*/
.layui-input
:focus
,
.layui-textarea
:focus
{
border-color
:
#1989FA
!important
;
.layui-input
:focus
,
.layui-textarea
:focus
{
border-color
:
#1989FA
!important
;
}
.layui-form-label.required
::before
{
.layui-form-label.required
::before
{
content
:
'*'
;
display
:
inline-block
;
color
:
red
;
margin-right
:
5px
;
}
.layui-btn
{
background-color
:
#1989FA
!important
;
.layui-btn
{
background-color
:
#1989FA
!important
;
}
/* .layui-btn, .add-circle, .btn-no-border{
background-color: #1989FA!important;
height: 16px !important;
width: 16px !important;
border-radius: 50% !important;
} */
.layui-laypage-em
{
background-color
:
#1989FA
!important
;
.layui-laypage-em
{
background-color
:
#1989FA
!important
;
}
.layui-btn-xs
{
color
:
#1989FA
;
.layui-btn-xs
{
color
:
#1989FA
;
font-size
:
14px
;
height
:
14px
;
font-weight
:
400
;
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
;
}
.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
;
color
:
#fff
;
}
.layui-form-checkbox
[
lay-skin
=
primary
]
:hover
i
{
border-color
:
#1989FA
!important
;
.layui-form-checkbox
[
lay-skin
=
primary
]
:hover
i
{
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
;
}
.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-laydate
.layui-laydate-content
.layui-this
{
background-color
:
#1989FA
!important
;
color
:
#fff
!important
;
}
.layui-tab-brief
>
.layui-tab-title
.layui-this
{
color
:
#1989FA
;
}
.layui-tab-brief
>
.layui-tab-more
li
.layui-this
:after
,
.layui-tab-brief
>
.layui-tab-title
.layui-this
:after
{
border-bottom
:
2px
solid
#1989FA
;
}
\ No newline at end of file
css/main.css
View file @
d68ac1c
...
...
@@ -89,8 +89,7 @@ header {
main
{
flex
:
1
;
/* min-height: calc(100% - 60px - 30px); */
min-height
:
calc
(
100%
-
60px
);
min-height
:
calc
(
100%
-
60px
-
30px
);
overflow
:
auto
;
background-color
:
#f8f8f8
;
}
...
...
html/components/header.html
View file @
d68ac1c
...
...
@@ -49,8 +49,6 @@
$
(
'#logout'
).
click
(
function
()
{
var
sessionId
=
layui
.
store
.
get
(
'token'
)
request
({
sessionId
:
sessionId
,
method
:
'org.ore.api.example.logout'
},
function
(
result
)
{
layui
.
store
.
remove
(
'external'
)
layui
.
store
.
remove
(
'token'
)
goLogin
()
})
})
...
...
html/employee/index.html
View file @
d68ac1c
...
...
@@ -98,7 +98,7 @@
{
field
:
'createdAccount'
,
title
:
'创建者'
},
{
field
:
'merchantName'
,
title
:
'商户名(商户号)'
,
width
:
160
},
{
field
:
'createdTime'
,
title
:
'更新时间'
,
width
:
160
},
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
2
40
,
align
:
'center'
,
toolbar
:
'#employeeBar'
}
{
fixed
:
'right'
,
title
:
'操作'
,
width
:
2
76
,
align
:
'center'
,
toolbar
:
'#employeeBar'
}
]
]
})
...
...
html/merchant/edit.html
View file @
d68ac1c
...
...
@@ -1148,13 +1148,23 @@
// 查询商户的菜单权限树
function
findMenuFunTreeByMerId
()
{
// console.log(merchantForm, '查询商户菜单权限树')
var
params
=
{
var
params
=
{}
if
(
parentMerchantId
)
{
params
=
{
method
:
'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId'
,
id
:
merchantId
,
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
)
{
if
(
res
.
code
==
'0'
)
{
// callback(res.data)
...
...
@@ -1185,10 +1195,11 @@
for
(
var
j
=
0
;
j
<
productData
.
products
.
length
;
j
++
)
{
menuData
=
productData
.
products
[
j
]
selectArr
.
push
(
menuData
.
productId
)
var
idList
=
menuData
.
menuIds
.
concat
(
menuData
.
functionIds
)
active
.
treeTabAdd
({
name
:
menuData
.
productName
,
value
:
menuData
.
productId
},
item
.
accounttypeId
,
item
.
products
,
menuData
.
idList
)
},
item
.
accounttypeId
,
item
.
products
,
idList
)
}
// // 产品的回显
console
.
log
(
selectEl
[
item
.
accounttypeId
],
'\\\\\\\\\\\\\\\\\\'
)
...
...
@@ -1237,6 +1248,7 @@
// 获取角色权限数据requestList
function
getAuthList
()
{
requestList
=
[]
for
(
var
key
in
treeData
)
{
var
accountObj
=
treeData
[
key
]
var
productList
=
[]
...
...
@@ -1257,7 +1269,7 @@
// m.parentId
var
findIdx
=
-
1
$
.
each
(
functionIds
,
function
(
idn
,
n
)
{
if
(
n
.
i
d
==
m
.
parentId
)
{
if
(
n
.
mendI
d
==
m
.
parentId
)
{
findIdx
=
idn
}
})
...
...
@@ -1287,14 +1299,20 @@
$
(
'#draft'
).
on
(
'click'
,
function
()
{
getAuthList
()
console
.
log
(
requestList
)
var
params
=
{
merchantId
:
merchantId
,
accountTypes
:
JSON
.
stringify
(
requestList
),
method
:
'cn.com.glsx.merchants.merchant.
sav
ePermissions'
,
status
:
1
method
:
'cn.com.glsx.merchants.merchant.
updat
ePermissions'
,
status
:
merchantForm
.
status
}
request
(
params
,
function
(
res
)
{
console
.
log
(
res
.
data
)
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
icon
:
1
})
}
})
return
false
})
...
...
@@ -1314,15 +1332,15 @@
merchantId
:
merchantId
,
accountTypes
:
JSON
.
stringify
(
requestList
)
}
if
(
merchantForm
.
status
==
1
)
{
params
.
method
=
'cn.com.glsx.merchants.merchant.savePermissions'
params
.
status
=
2
}
else
{
params
.
method
=
'cn.com.glsx.merchants.merchant.updatePermissions'
params
.
status
=
merchantForm
.
status
}
request
(
params
,
function
(
res
)
{
console
.
log
(
res
.
data
)
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
icon
:
1
})
}
})
return
false
})
...
...
html/merchant/index.html
View file @
d68ac1c
...
...
@@ -20,10 +20,14 @@
}
.merchant
.layui-table-cell
{
height
:
auto
;
/*
height: auto;
overflow: visible;
text-overflow: inherit;
white-space
:
normal
;
white-space: normal; */
height
:
auto
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.merchant
#searchForm
.layui-inline
{
...
...
@@ -204,7 +208,7 @@
align
:
'center'
,
title
:
'操作'
,
toolbar
:
'#merchantBtns'
,
width
:
220
width
:
485
// fixed: 'right'
}]
]
...
...
js/load.js
View file @
d68ac1c
...
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-07-15 15:46:53
* @LastEditors: limin
* @LastEditTime: 2021-08-09 1
1:20:5
2
* @LastEditTime: 2021-08-09 1
4:07:1
2
* @FilePath: \account\js\load.js
*/
;(
function
load
()
{
...
...
@@ -20,9 +20,6 @@ function go(module, page, params) {
var
href
=
'/html/'
+
module
+
'/'
+
page
+
'.html'
window
.
location
.
href
=
_p
?
href
+
'?'
+
_p
:
href
}
function
goLogin
()
{
window
.
location
.
href
=
'/login.html'
}
function
loadLayConfig
()
{
layui
.
config
({
...
...
@@ -55,7 +52,7 @@ function append() {
var
header
=
document
.
createElement
(
'header'
)
var
footer
=
document
.
createElement
(
'footer'
)
$
(
header
).
load
(
'/html/components/header.html'
)
//
$(footer).load('/html/components/footer.html')
$
(
footer
).
load
(
'/html/components/footer.html'
)
$
(
'main'
).
before
(
header
).
after
(
footer
)
}
...
...
@@ -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
)
{
// if (!param || layui.$.isEmptyObject(param)) return ''
...
...
js/request.js
View file @
d68ac1c
...
...
@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-07-19 10:15:48
* @LastEditors: limin
* @LastEditTime: 2021-08-09 1
0:52:59
* @LastEditTime: 2021-08-09 1
4:09:12
* @FilePath: \account\js\request.js
*/
layui
.
define
([
'sha1'
,
'md5'
,
'helper'
],
function
(
exports
)
{
...
...
@@ -58,14 +58,12 @@ layui.define(['sha1', 'md5', 'helper'], function (exports) {
config
=
config
||
{}
var
common
=
store
.
getEx
(
'external'
)
var
settings
=
helper
.
clone
(
true
,
defaultSettings
)
if
(
isOtherUrl
)
{
delete
settings
.
beforeSend
}
var
data
=
helper
.
clone
(
true
,
{
timestamp
:
new
Date
().
getTime
()
},
common
.
params
,
params
)
if
(
isOtherUrl
)
{
data
.
app_key
=
data
.
appKey
delete
settings
.
beforeSend
delete
data
.
appKey
}
data
.
sign
=
sign
(
data
,
common
.
secret
,
noSignAttr
,
isOtherUrl
)
...
...
@@ -76,6 +74,9 @@ layui.define(['sha1', 'md5', 'helper'], function (exports) {
success
&&
success
(
result
)
}
else
{
msg
(
result
.
message
)
if
(
result
.
errId
==
'21'
){
//TGT失效
goLogin
&&
goLogin
()
}
}
}
if
(
config
.
async
===
false
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment