Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
贷
贷超管理后台
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhanhai
贷超管理后台
Commits
8d7f22e4
Commit
8d7f22e4
authored
Nov 24, 2021
by
caimeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改公告
parent
d085cad4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
173 additions
and
98 deletions
+173
-98
api.js
src/server/api.js
+98
-75
user.js
src/store/modules/user.js
+15
-5
index.vue
src/vab/components/Avatar/index.vue
+3
-3
permissions.js
src/vab/plugins/permissions.js
+1
-1
list.vue
src/views/notice/list.vue
+35
-9
new.vue
src/views/notice/new.vue
+20
-4
list.vue
src/views/prod/list.vue
+1
-1
No files found.
src/server/api.js
View file @
8d7f22e4
import
request
from
'@/utils/request'
import
request
from
"@/utils/request"
;
// 登录
export
default
{
// 登录
login
(
data
)
{
return
request
({
url
:
'/sysUser/login'
,
method
:
'post'
,
data
,
})
url
:
"/sysUser/login"
,
method
:
"post"
,
data
});
},
// 登出
logout
(
data
)
{
return
request
({
url
:
"/sysUser/logout"
,
method
:
"post"
,
data
});
},
// 用户信息
userInfo
(
params
)
{
return
request
({
url
:
"/sysUser/getInfo"
,
method
:
"get"
,
params
});
},
// 发送验证码
send_msg_code
(
data
)
{
return
request
({
url
:
'/sysUser/transmitCode'
,
method
:
'post'
,
data
,
})
url
:
"/sysUser/transmitCode"
,
method
:
"post"
,
data
})
;
},
// 获取菜单列表
menu
(
params
)
{
return
request
({
url
:
'/sysUser/getRouters'
,
method
:
'get'
,
params
,
})
url
:
"/sysUser/getRouters"
,
method
:
"get"
,
params
})
;
},
// 商户列表
merchant_list
(
data
)
{
return
request
({
url
:
'/macy/selectMacyList'
,
method
:
'post'
,
data
,
})
url
:
"/macy/selectMacyList"
,
method
:
"post"
,
data
})
;
},
// 商户新增
merchant_add
(
data
)
{
return
request
({
url
:
'/macy/createdMacy'
,
method
:
'post'
,
data
,
})
url
:
"/macy/createdMacy"
,
method
:
"post"
,
data
})
;
},
// 商户更新
merchant_update
(
data
)
{
return
request
({
url
:
'/macy/editMacy'
,
method
:
'post'
,
data
,
})
url
:
"/macy/editMacy"
,
method
:
"post"
,
data
})
;
},
// 商户详情
merchant_view
(
params
)
{
return
request
({
url
:
'/macy/selectMacyByTenantNo'
,
method
:
'get'
,
params
,
})
url
:
"/macy/selectMacyByTenantNo"
,
method
:
"get"
,
params
})
;
},
// 产品列表
merchant_select
(
params
)
{
return
request
({
url
:
'/macy/selectList'
,
method
:
'get'
,
params
,
})
url
:
"/macy/selectList"
,
method
:
"get"
,
params
})
;
},
// 产品列表
prod_list
(
data
)
{
return
request
({
url
:
'/macy/selectProductPageList'
,
method
:
'post'
,
data
,
})
url
:
"/macy/selectProductPageList"
,
method
:
"post"
,
data
})
;
},
// 产品新增
prod_add
(
data
)
{
return
request
({
url
:
'/macy/createdProductInfo'
,
method
:
'post'
,
data
,
})
url
:
"/macy/createdProductInfo"
,
method
:
"post"
,
data
})
;
},
// 产品编辑
prod_update
(
data
)
{
return
request
({
url
:
'/macy/editProductInfo'
,
method
:
'post'
,
data
,
})
url
:
"/macy/editProductInfo"
,
method
:
"post"
,
data
})
;
},
// 产品查看
prod_view
(
params
)
{
return
request
({
url
:
'/macy/selectProductInfoByappNo'
,
method
:
'get'
,
params
,
})
url
:
"/macy/selectProductInfoByappNo"
,
method
:
"get"
,
params
})
;
},
// 申请列表
apply_list
(
data
)
{
return
request
({
url
:
'/zeus/pageQueryApply'
,
method
:
'post'
,
data
,
})
url
:
"/zeus/pageQueryApply"
,
method
:
"post"
,
data
})
;
},
// 推送
apply_push
(
params
)
{
return
request
({
url
:
'/zeus/applyRetryPush'
,
method
:
'get'
,
params
,
})
url
:
"/zeus/applyRetryPush"
,
method
:
"get"
,
params
})
;
},
// 公告列表
notice_list
(
data
)
{
return
request
({
url
:
'/smgw/getBackPageList'
,
method
:
'post'
,
data
,
})
url
:
"/smgw/getBackPageList"
,
method
:
"post"
,
data
})
;
},
// 公告发送
notice_add
(
data
)
{
return
request
({
url
:
'/smgw/sendZnx'
,
method
:
'post'
,
data
,
})
url
:
"/smgw/sendZnx"
,
method
:
"post"
,
data
});
},
// 公告编辑
notice_edit
(
data
)
{
return
request
({
url
:
"/smgw/updateNotice"
,
method
:
"post"
,
data
});
},
// 回现APP设置
app_setting
(
params
)
{
return
request
({
url
:
'/manage/getList'
,
method
:
'get'
,
params
,
})
url
:
"/manage/getList"
,
method
:
"get"
,
params
})
;
},
// 变更状态
app_setting_update
(
data
)
{
return
request
({
url
:
'/manage/update'
,
method
:
'post'
,
data
,
})
}
,
}
url
:
"/manage/update"
,
method
:
"post"
,
data
})
;
}
}
;
src/store/modules/user.js
View file @
8d7f22e4
...
...
@@ -53,7 +53,9 @@ const actions = {
const
result
=
await
API
.
login
(
userInfo
);
if
(
result
.
success
)
{
const
user
=
result
.
result
;
console
.
log
(
'我知道'
);
commit
(
"setUser"
,
user
);
commit
(
"setUsername"
,
user
.
nickName
);
}
// 设置假的token
...
...
@@ -78,12 +80,20 @@ const actions = {
* @returns
*/
async
getUserInfo
({
commit
,
dispatch
,
state
})
{
let
{
username
,
avatar
,
roles
,
ability
}
=
state
.
user
;
//if (username && avatar) {
commit
(
"setUsername"
,
userName
);
commit
(
"setAvatar"
,
''
);
const
result
=
await
API
.
userInfo
();
if
(
result
.
success
){
const
{
avatar
,
nickName
}
=
result
.
result
;
commit
(
"setUsername"
,
nickName
);
commit
(
"setAvatar"
,
avatar
);
// 当不传递roles或ability时,默认使用管理员权限,可查看所有路由和按钮
dispatch
(
"acl/setFull"
,
true
,
{
root
:
true
});
}
//let { username, avatar, roles, ability } = state.user;
//if (username && avatar) {
// commit("setUsername", userName);
//commit("setAvatar", '');
// 当不传递roles或ability时,默认使用管理员权限,可查看所有路由和按钮
//dispatch("acl/setFull", true, { root: true });
// 当返回数据包含roles(角色)或ability(权限),保存至vuex
// 如不使用roles权限控制,请不要传递roles,可删除以下代码
//if (roles instanceof Array) dispatch("acl/setRole", roles, { root: true });
...
...
@@ -97,7 +107,7 @@ const actions = {
* @param {*} { dispatch }
*/
async
logout
({
dispatch
})
{
await
logout
(
state
.
accessToken
);
await
API
.
logout
(
);
await
dispatch
(
"resetAll"
);
},
/**
...
...
src/vab/components/Avatar/index.vue
View file @
8d7f22e4
<
template
>
<el-dropdown
@
command=
"handleCommand"
>
<span
class=
"avatar-dropdown"
>
<
img
:src=
"avatar"
alt=
""
class=
"user-avatar"
/
>
<
!--
<img
:src=
"avatar"
alt=
""
class=
"user-avatar"
/>
--
>
<div
class=
"user-name"
>
{{
username
}}
<vab-remix-icon
icon-class=
"arrow-down-s-line"
></vab-remix-icon
>
<vab-remix-icon
icon-class=
"arrow-down-s-line"
/
>
</div>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
command=
"logout"
>
<vab-remix-icon
icon-class=
"logout-circle-r-line"
></vab-remix-icon
>
<vab-remix-icon
icon-class=
"logout-circle-r-line"
/
>
{{
translateTitle
(
'退出登录'
)
}}
</el-dropdown-item>
</el-dropdown-menu>
...
...
src/vab/plugins/permissions.js
View file @
8d7f22e4
...
...
@@ -39,7 +39,7 @@ router.beforeEach(async (to, from, next) => {
next
();
}
else
{
try
{
if
(
!
loginInterception
)
await
store
.
dispatch
(
"user/getUserInfo"
);
if
(
loginInterception
)
await
store
.
dispatch
(
"user/getUserInfo"
);
//settings.js loginInterception为false(关闭登录拦截时)时,创建虚拟角色
else
await
store
.
dispatch
(
"user/setVirtualRoles"
);
//根据路由模式添加路由
...
...
src/views/notice/list.vue
View file @
8d7f22e4
...
...
@@ -81,8 +81,14 @@
type=
"text"
@
click=
"handleChangeStatus(row)"
>
<span
v-if=
"row.prop===0"
>
下架
</span>
<span
v-else
>
下架
</span>
<span
v-if=
"row.isDelete===0"
>
下架
</span>
<span
v-else
>
上架
</span>
</el-button>
<el-button
type=
"text"
@
click=
"handleView(row)"
>
<span>
详情
</span>
</el-button>
</
template
>
</el-table-column>
...
...
@@ -109,7 +115,7 @@ export default {
name
:
"Fence"
,
data
()
{
return
{
checkList
:
[
"标题"
,
"标题ICON"
,
"公告内容"
,
"H5链接"
,
"公告状态"
,
"创建时间"
,
],
checkList
:
[
"标题"
,
"标题ICON"
,
"公告内容"
,
"H5链接"
,
"公告状态"
,
"创建时间"
],
columns
:
[
{
order
:
1
,
...
...
@@ -130,7 +136,7 @@ export default {
order
:
4
,
label
:
"H5链接"
,
prop
:
"znxHref"
,
overflow
:
true
overflow
:
true
},
{
order
:
5
,
...
...
@@ -176,8 +182,26 @@ export default {
onSubmit
()
{
this
.
fetchData
();
},
handleChangeStatus
(
row
)
{
//const {appNo} = row;
handleView
(
row
){
const
{
id
}
=
row
;
this
.
$router
.
push
({
path
:
'/notice/new'
,
query
:
{
id
}
})
},
async
handleChangeStatus
(
row
)
{
const
{
id
,
isDelete
}
=
row
;
console
.
log
(
row
,
"是"
);
const
result
=
await
API
.
notice_edit
({
id
,
isDelete
:
!
isDelete
?
1
:
0
});
if
(
result
.
success
)
{
this
.
$baseMessage
(
"修改成功"
,
"success"
);
setTimeout
(()
=>
{
this
.
fetchData
();
},
1500
);
}
},
handleSizeChange
(
val
)
{
...
...
@@ -228,10 +252,12 @@ export default {
align-items
:
center
;
justify-content
:
space-between
;
margin-bottom
:
15px
;
.action-bar-left
,
.action-bar-right
{
flex
:
1
;
.action-bar-left
,
.action-bar-right
{
flex
:
1
;
}
.action-bar-right
{
.action-bar-right
{
text-align
:
right
;
}
}
...
...
src/views/notice/new.vue
View file @
8d7f22e4
...
...
@@ -86,7 +86,8 @@
<
script
>
import
BlockHeader
from
"@/components/blockHeader"
;
import
API
from
"@/server/api"
;
const
$API
=
process
.
env
.
VUE_APP_API_PATH
;
const
$API
=
process
.
env
.
VUE_APP_API_PATH
;
export
default
{
name
:
"MerchantNew"
,
...
...
@@ -95,22 +96,37 @@ export default {
},
data
()
{
return
{
uploadUrl
:
`
${
$API
}
/sysUser/upload`
,
uploadUrl
:
`
${
$API
}
/sysUser/upload`
,
form
:
{
znxTitle
:
"mc公告标题"
,
znxTitleUrl
:
""
,
znxContent
:
"名称公告内容"
,
znxHref
:
"www.baidu.com"
,
znxHref
:
"www.baidu.com"
},
rules
:
{
znxTitle
:
[{
required
:
true
,
message
:
"请输入公告标题"
,
trigger
:
"blur"
}],
znxTitleUrl
:
[{
required
:
false
,
message
:
"请上传公告标题ICON"
,
trigger
:
"change"
}],
znxContent
:
[{
required
:
true
,
message
:
"请输入公告内容"
,
trigger
:
"blur"
}],
znxHref
:
[{
required
:
true
,
message
:
"请输入公告跳转链接"
,
trigger
:
"blur"
}]
,
znxHref
:
[{
required
:
true
,
message
:
"请输入公告跳转链接"
,
trigger
:
"blur"
}]
}
};
},
async
created
()
{
// 再请求表单
const
{
query
}
=
this
.
$route
;
if
(
query
&&
query
.
id
)
{
this
.
id
=
query
.
id
;
await
this
.
init
();
}
},
methods
:
{
async
init
()
{
const
id
=
this
.
id
;
const
{
result
,
success
}
=
await
API
.
notice_edit
({
id
});
if
(
success
)
{
this
.
form
=
result
;
}
},
handleSuccessLogo
(
res
)
{
this
.
form
.
znxTitleUrl
=
res
.
result
;
},
...
...
src/views/prod/list.vue
View file @
8d7f22e4
...
...
@@ -194,7 +194,7 @@ export default {
total
:
0
,
queryForm
:
{
current
:
1
,
size
:
8
,
size
:
10
,
status
:
""
,
tenantName
:
""
,
tenantNo
:
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment