Commit 5d9a2a34 authored by lei's avatar lei

add:index.js getuserinfo

parent c5f1e4f1
......@@ -44,7 +44,7 @@
<!-- 第二层:商户图标、名称、等级、场所类型和地址 -->
<div
class="second-layer second-layer-zf"
v-if="userInfo.userType!=='sj'"
v-if="userInfo.userType!=='shop'"
>
<img
class="merchant-icon"
......@@ -66,7 +66,7 @@
<!-- 第二层:商户图标、名称、等级、场所类型和地址 -->
<div
class="second-layer-sj"
v-if="userInfo.userType=='sj'"
v-if="userInfo.userType=='shop'"
>
<div class="header">
<span>商家信息</span>
......
......@@ -170,11 +170,11 @@ window.onload = function () {
setTimeout(() => {
http2.post(
{
serviceId: API_KEY_MAP['noPage']['id'],
interfacePublicKey: API_KEY_MAP['noPage']['publicKey'],
interfacePrivateKey: API_KEY_MAP['noPage']['privateKey'],
serviceId: API_KEY_MAP['no-page']['id'],
interfacePublicKey: API_KEY_MAP['no-page']['publicKey'],
interfacePrivateKey: API_KEY_MAP['no-page']['privateKey'],
reqParams: {
sign: 9,
sign: '9',
pageNum: this.page++, // 每次请求增加下一页
pageSize: this.size,
......@@ -195,69 +195,24 @@ window.onload = function () {
// console.log('接口回调数据', JSON.parse(res))
var result = JSON.parse(res)
this.list.push(...result.content)
this.total = result.totalElements
// this.list.push(...result.content)
// this.total = result.totalElements
if (res.code !== 200 && res.data == null) {
return
}
if (
result.data.roleDeptNameVo.roleName == '超级管理员' ||
result.data.roleDeptNameVo.roleName == '超级管理员'
) {
this.userInfo = {
userType: 'gl', // 登录用户type
userId: '1', // 登录用户id
userName: '张三', // 登录用户name
deptId: '1', // 登录用户部门id
deptName: result.data.roleDeptNameVo.deptName, // 登录用户部门name
role: 'dudao',
roleName: '督导人员',
}
} else if (result.data.roleDeptNameVo.roleName == '行业管理') {
this.userInfo = {
userType: 'gl', // 登录用户type
userId: '1', // 登录用户id
userName: '张三', // 登录用户name
deptId: '1', // 登录用户部门id
deptName: result.data.roleDeptNameVo.deptName, // 登录用户部门name
role: 'dudao',
roleName: '行业检查',
}
} else if (result.data.roleDeptNameVo.roleName == '街道主管') {
this.userInfo = {
userType: 'gl', // 登录用户type
userId: '1', // 登录用户id
userName: '张三', // 登录用户name
deptId: '1', // 登录用户部门id
deptName: result.data.roleDeptNameVo.deptName, // 登录用户部门name
role: 'dudao',
roleName: '行业检查',
}
} else if (result.data.roleDeptNameVo.roleName == '日常管理') {
this.userInfo = {
userType: 'gl', // 登录用户type
userId: '1', // 登录用户id
userName: '张三', // 登录用户name
deptId: '1', // 登录用户部门id
deptName: result.data.roleDeptNameVo.deptName, // 登录用户部门name
role: 'dudao',
roleName: '日常检查',
}
} else if (result.data.roleDeptNameVo.roleName == '商户') {
this.userInfo = {
userType: 'sj', // 登录用户type
userId: '1', // 登录用户id
userName: '张三', // 登录用户name
deptId: '1', // 登录用户部门id
deptName: result.data.roleDeptNameVo.deptName, // 登录用户部门name
businessAddress:
result.data.merchantInfoNumVo.businessAddress, //
smallPlaceTypeName:
result.data.merchantInfoNumVo.smallPlaceTypeName, //
unitName: result.data.merchantInfoNumVo.unitName, //
role: 'dudao',
roleName: '商家',
}
this.userInfo = {
userType: result.data.roleDeptNameVo.userType, // 登录用户type
userId: '1', // 登录用户id
userName: '张三', // 登录用户name
deptId: '1', // 登录用户部门id
deptName: result.data.roleDeptNameVo.deptName, // 登录用户部门name
businessAddress:
result.data.merchantInfoNumVo.businessAddress, //
smallPlaceTypeName:
result.data.merchantInfoNumVo.smallPlaceTypeName, //
unitName: result.data.merchantInfoNumVo.unitName, //
role: 'dudao',
roleName: result.data.roleDeptNameVo.roleName,
}
// 生成最终菜单列表
......
const API_KEY_MAP = {
'login': { // 高区应急管理平台-爱山东用户和原系统用户绑定
id: 'gqyjglptbind',
publicKey: '0450567ffc64139658baa28c5c9bc0415200b476baa3bcc3f9dc9dbbf8dbcff2fb5e93319127685469c84784d235220c0347e695fbf66c5ffede33e645bea8b3f0',
privateKey: '00b92f5f2a7c40cb07d225f2e90df9b8b23569658e4f9e04dd0a4bf4a5b374063b'
},
'page': { // 隐患管理-列表
id: 'gqyjglptsafecheckpage',
publicKey: '045c149a329b0b1ece8e82643044dcf689fd75cc837369cd354b6df96853e483b747e7d4a79c1847bbcb9c6fc57a14358c0def828d31c00f83b7399d6f14e1b152',
privateKey: '00f3449a2e8ccb6724554a6126341b7f7ac4f99e98a313ed59851ed2a30eb69176'
},
'no-page': { // no-page
id: 'gqyjglptsafecheckdetial',
publicKey: '0432cc9a4b25646345f6ce116d566f08404e2fbb1da7e488b5333211ae82ec1c7938c46dcc9013a5e9fbd5235a482384c170f4c501991b1a9460af92dbd1ed1062',
privateKey: '5e46fef0286f55aef6bb13f12373150023a4146edcd170be770b8823b24cb319'
},
login: {
// 高区应急管理平台-爱山东用户和原系统用户绑定
id: 'gqyjglptbind',
publicKey:
'0450567ffc64139658baa28c5c9bc0415200b476baa3bcc3f9dc9dbbf8dbcff2fb5e93319127685469c84784d235220c0347e695fbf66c5ffede33e645bea8b3f0',
privateKey:
'00b92f5f2a7c40cb07d225f2e90df9b8b23569658e4f9e04dd0a4bf4a5b374063b',
},
page: {
// 隐患管理-列表
id: 'gqyjglptsafecheckpage',
publicKey:
'045c149a329b0b1ece8e82643044dcf689fd75cc837369cd354b6df96853e483b747e7d4a79c1847bbcb9c6fc57a14358c0def828d31c00f83b7399d6f14e1b152',
privateKey:
'00f3449a2e8ccb6724554a6126341b7f7ac4f99e98a313ed59851ed2a30eb69176',
},
'no-page': {
// no-page
id: 'gqyjglptsafecheckdetial',
publicKey:
'0432cc9a4b25646345f6ce116d566f08404e2fbb1da7e488b5333211ae82ec1c7938c46dcc9013a5e9fbd5235a482384c170f4c501991b1a9460af92dbd1ed1062',
privateKey:
'5e46fef0286f55aef6bb13f12373150023a4146edcd170be770b8823b24cb319',
},
}
This diff is collapsed.
......@@ -51,7 +51,7 @@ window.addEventListener('load', function () {
if (!res) {
// 中台返回为undefined 重新请求
vant.Toast.clear()
this.page = this.page - 1 // 重新请求后,分页数恢复上一次请求的值
this.page = th e - 1 // 重新请求后,分页数恢复上一次请求的值
setTimeout(() => {
// this.getList()
}, 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment