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 6ba061ae
authored
Aug 09, 2021
by
limin
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of
http://192.168.3.233:8090/h5/account
into master
2 parents
66c86b14
cb1435eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
36 deletions
html/merchant/edit.html
js/request.js
html/merchant/edit.html
View file @
6ba061a
...
...
@@ -1148,12 +1148,22 @@
// 查询商户的菜单权限树
function
findMenuFunTreeByMerId
()
{
// console.log(merchantForm, '查询商户菜单权限树')
var
params
=
{
method
:
'cn.com.glsx.merchants.merchant.accountTypeSearchRequest'
,
// method: 'org.ore.api.accountType.getProductTreeList',
ids
:
merchantForm
.
accountType
,
merchantId
:
merchantId
,
accountLevel
:
merchantForm
.
merchantAccountLevel
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'
)
{
...
...
@@ -1180,23 +1190,24 @@
}
console
.
log
(
obj
)
active
.
tabAdd
(
obj
)
var
selectArr
=
[]
var
menuData
=
[]
for
(
var
j
=
0
;
j
<
productData
.
products
.
length
;
j
++
)
{
menuData
=
productData
.
products
[
j
]
selectArr
.
push
(
menuData
.
productId
)
active
.
treeTabAdd
({
name
:
menuData
.
productName
,
value
:
menuData
.
productId
},
item
.
accounttypeId
,
item
.
products
,
menuData
.
idList
)
}
// // 产品的回显
console
.
log
(
selectEl
[
item
.
accounttypeId
],
'\\\\\\\\\\\\\\\\\\'
)
selectEl
[
item
.
accounttypeId
].
setValue
(
selectArr
)
var
filterName
=
'treeTab'
+
item
.
accounttypeId
var
productId
=
'tab_'
+
item
.
accounttypeId
+
'_'
+
item
.
products
[
0
].
productId
active
.
tabChange
(
filterName
,
productId
)
// 树的回显
var
selectArr
=
[]
var
menuData
=
[]
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
,
idList
)
}
// // 产品的回显
console
.
log
(
selectEl
[
item
.
accounttypeId
],
'\\\\\\\\\\\\\\\\\\'
)
selectEl
[
item
.
accounttypeId
].
setValue
(
selectArr
)
var
filterName
=
'treeTab'
+
item
.
accounttypeId
var
productId
=
'tab_'
+
item
.
accounttypeId
+
'_'
+
item
.
products
[
0
].
productId
active
.
tabChange
(
filterName
,
productId
)
// 树的回显
}
}
if
(
check_arr
.
length
!=
0
)
{
...
...
@@ -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
}
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
})
...
...
js/request.js
View file @
6ba061a
...
...
@@ -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
)
...
...
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