Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-lite
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 1794e584
authored
Apr 30, 2026
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
移除部分未使用的代码和注释,优化组件结构
1 parent
506dea30
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
471 additions
and
475 deletions
src/api/merchant.js
src/api/request.js
src/api/resident.js
src/layout/header-aside/components/header-user/index.vue
src/plugin/axios/index_code.js
src/store/modules/d2admin/modules/account.js
src/store/modules/d2admin/modules/page.js
src/views/earlyWarningManager/strategyCentre/storeSignboard/index.vue
src/views/residentManage/components/VoiceDialog.vue
src/views/residentManage/components/newQualityDetail.vue
src/views/residentManage/components/qualityDetail.vue
src/views/residentManage/components/qualityIndex/contant.js
src/views/residentManage/components/qualityIndex/index.vue
src/views/residentManage/components/recepDetail.vue
src/views/residentManage/qualityControlList.vue
src/views/system/login/index.vue
src/api/merchant.js
View file @
1794e58
...
@@ -413,4 +413,4 @@ export function getReconciliationGoodsTypeListApi(data = {}) {
...
@@ -413,4 +413,4 @@ export function getReconciliationGoodsTypeListApi(data = {}) {
}
}
src/api/request.js
View file @
1794e58
...
@@ -13,130 +13,137 @@ import axios from "@/plugin/axios/index_code";
...
@@ -13,130 +13,137 @@ import axios from "@/plugin/axios/index_code";
import
RequestMethods
from
"./request.methods"
;
import
RequestMethods
from
"./request.methods"
;
import
sign
from
"./sign"
;
import
sign
from
"./sign"
;
function
request
(
params
=
{},
method
=
RequestMethods
.
GET
,
noSignAttr
=
[],
options
=
{})
{
function
request
(
// 兼容线上dj和scrm appkey和secret不一样的情况
params
=
{},
let
apiName
=
""
;
method
=
RequestMethods
.
GET
,
if
(
params
.
method
.
includes
(
"dj.api.smartcarlife"
))
{
noSignAttr
=
[],
apiName
=
"dj"
;
options
=
{},
}
else
if
(
params
.
method
.
includes
(
"dj.api.script"
))
{
)
{
apiName
=
"script"
;
// 兼容线上dj和scrm appkey和secret不一样的情况
}
else
if
(
params
.
method
.
includes
(
"dj.staff.api"
))
{
let
apiName
=
""
;
apiName
=
"staff"
;
if
(
params
.
method
.
includes
(
"dj.api.smartcarlife"
))
{
}
else
if
(
params
.
method
.
includes
(
"dj.smartcarlife.stock"
))
{
apiName
=
"dj"
;
apiName
=
"dj.smartcarlife"
;
}
else
if
(
params
.
method
.
includes
(
"dj.api.script"
))
{
}
else
if
(
params
.
method
.
includes
(
"risk.manage.api"
))
{
apiName
=
"script"
;
apiName
=
"riskmanage"
;
}
else
if
(
params
.
method
.
includes
(
"dj.staff.api"
))
{
}
else
if
(
params
.
method
.
includes
(
"dj.api.strategy"
))
{
apiName
=
"staff"
;
apiName
=
"strategy"
;
}
else
if
(
params
.
method
.
includes
(
"dj.smartcarlife.stock"
))
{
}
else
if
(
params
.
method
.
includes
(
"dj.api.supervisor"
))
{
apiName
=
"dj.smartcarlife"
;
apiName
=
"supervisor"
;
}
else
if
(
params
.
method
.
includes
(
"risk.manage.api"
))
{
}
else
if
(
params
.
method
.
includes
(
"dj.pad.api"
))
{
apiName
=
"riskmanage"
;
// rop-dj-pad 等方法名含 dj.pad,split(".api") 会得到 dj.pad 无 mapping;签名与 appKey 沿用 dj
}
else
if
(
params
.
method
.
includes
(
"dj.api.strategy"
))
{
apiName
=
"dj"
;
apiName
=
"strategy"
;
}
else
{
}
else
if
(
params
.
method
.
includes
(
"dj.api.supervisor"
))
{
// console.log(params.method.split(".api"))
apiName
=
"supervisor"
;
apiName
=
params
.
method
.
split
(
".api"
)[
0
];
}
else
if
(
params
.
method
.
includes
(
"dj.pad.api"
))
{
}
// rop-dj-pad 等方法名含 dj.pad,split(".api") 会得到 dj.pad 无 mapping;签名与 appKey 沿用 dj
apiName
=
"dj"
;
}
else
{
// console.log(params.method.split(".api"))
apiName
=
params
.
method
.
split
(
".api"
)[
0
];
}
// console.log("params.method", params.method)
// console.log("params.method", params.method)
// console.log("apiName", apiName)
// console.log("apiName", apiName)
// 为空报错
// 为空报错
if
(
!
apiName
)
{
if
(
!
apiName
)
{
throw
new
Error
(
"apiName is null"
);
throw
new
Error
(
"apiName is null"
);
}
}
const
mappingName
=
{
const
mappingName
=
{
"dj.smartcarlife"
:
"axios"
,
"dj.smartcarlife"
:
"axios"
,
"dj"
:
"axios"
,
dj
:
"axios"
,
"scrm"
:
"axios2"
,
scrm
:
"axios2"
,
"merchants"
:
"axios3"
,
merchants
:
"axios3"
,
"reportExport"
:
"axios4"
,
reportExport
:
"axios4"
,
"glsx.accounts.biz.common.pictureUpload"
:
"common"
,
"glsx.accounts.biz.common.pictureUpload"
:
"common"
,
"clue"
:
"axios5"
,
clue
:
"axios5"
,
"dj.businessSchool"
:
"axios6"
,
"dj.businessSchool"
:
"axios6"
,
"script"
:
"axios7"
,
script
:
"axios7"
,
"staff"
:
"axios9"
,
staff
:
"axios9"
,
"riskmanage"
:
"axios10"
,
riskmanage
:
"axios10"
,
"strategy"
:
"axios_strategy"
,
strategy
:
"axios_strategy"
,
"supervisor"
:
"axios_supervisor"
,
supervisor
:
"axios_supervisor"
,
};
};
const
baseApiName
=
mappingName
[
apiName
];
const
baseApiName
=
mappingName
[
apiName
];
// console.log(baseApiName, "baseApiName")
// console.log(baseApiName, "baseApiName")
// params.appKey = baseConfig[baseApiName].appkey
// params.appKey = baseConfig[baseApiName].appkey
if
(
baseApiName
==
"common"
)
{
if
(
baseApiName
==
"common"
)
{
params
.
app_key
=
baseConfig
[
baseApiName
].
appkey
;
params
.
app_key
=
baseConfig
[
baseApiName
].
appkey
;
}
else
{
}
else
{
params
.
appKey
=
baseConfig
[
baseApiName
].
appkey
;
params
.
appKey
=
baseConfig
[
baseApiName
].
appkey
;
}
}
// console.log("params.appKey", params.appKey)
params
.
timestamp
=
new
Date
().
getTime
();
params
.
v
=
"1.0.0"
;
params
.
format
=
"json"
;
params
.
locale
=
"zh_CN"
;
if
(
params
.
method
!==
"dj.api.user.login"
)
{
params
.
sessionId
=
util
.
cookies
.
get
(
"token"
);
}
/**
* mock - url = params.method
* 调后端接口 - url = ''
*/
const
url
=
baseConfig
[
baseApiName
].
baseURL
;
// const url = "/api"
/**
* 调后端接口,请使用以下代码。
*/
const
signWay
=
{
"dj.smartcarlife"
:
"sha1"
,
"dj"
:
"sha1"
,
"scrm"
:
"sha1"
,
"glsx"
:
"md5"
,
"glsx.accounts.biz.common.pictureUpload"
:
"md5"
,
"clue"
:
"sha1"
,
"script"
:
"sha1"
,
"staff"
:
"sha1"
,
"riskmanage"
:
"sha1"
,
};
// console.log(signWay[apiName], "baseApiName")
const
secret
=
baseConfig
[
baseApiName
].
secret
;
const
CancelToken
=
axiosPackage
.
CancelToken
;
let
reqData
=
method
===
RequestMethods
.
POST
?
{
baseURL
:
"/"
,
data
:
sign
(
params
,
noSignAttr
,
secret
,
signWay
[
apiName
]),
}
:
{
params
:
sign
(
params
,
noSignAttr
,
secret
,
signWay
[
apiName
])
};
reqData
=
Object
.
assign
(
reqData
,
options
,
{});
if
(
util
.
cookies
.
get
(
"uuid"
))
{
// 请求进度
params
.
accountId
=
util
.
cookies
.
get
(
"uuid"
);
if
(
params
?.
onProcess
)
{
}
reqData
.
onUploadProgress
=
params
.
onProcess
;
params
.
timestamp
=
new
Date
().
getTime
();
}
params
.
v
=
"1.0.0"
;
// 取消请求
params
.
format
=
"json"
;
if
(
params
?.
cancelFun
)
{
params
.
locale
=
"zh_CN"
;
reqData
.
cancelToken
=
new
CancelToken
((
c
)
=>
{
if
(
params
.
method
!==
"dj.api.user.login"
)
{
params
.
cancelFun
.
cancel
=
c
;
params
.
sessionId
=
util
.
cookies
.
get
(
"token"
);
});
}
}
/**
// console.log(method === RequestMethods.POST)
* mock - url = params.method
// console.log(url)
* 调后端接口 - url = ''
// console.log(options)
*/
// console.log(reqData)
const
url
=
baseConfig
[
baseApiName
].
baseURL
;
let
axiosParams
=
{
// const url = "/api"
url
,
/**
method
,
* 调后端接口,请使用以下代码。
...
reqData
,
*/
};
const
signWay
=
{
if
(
options
.
returnAll
)
"dj.smartcarlife"
:
"sha1"
,
axiosParams
.
headers
=
{
"return-all"
:
true
};
dj
:
"sha1"
,
return
axios
(
axiosParams
);
scrm
:
"sha1"
,
glsx
:
"md5"
,
"glsx.accounts.biz.common.pictureUpload"
:
"md5"
,
clue
:
"sha1"
,
script
:
"sha1"
,
staff
:
"sha1"
,
riskmanage
:
"sha1"
,
};
// console.log(signWay[apiName], "baseApiName")
const
secret
=
baseConfig
[
baseApiName
].
secret
;
const
CancelToken
=
axiosPackage
.
CancelToken
;
let
reqData
=
method
===
RequestMethods
.
POST
?
{
baseURL
:
"/"
,
data
:
sign
(
params
,
noSignAttr
,
secret
,
signWay
[
apiName
]),
}
:
{
params
:
sign
(
params
,
noSignAttr
,
secret
,
signWay
[
apiName
])
};
/**
reqData
=
Object
.
assign
(
reqData
,
options
,
{});
* mock,请使用以下代码。
// 请求进度
*/
if
(
params
?.
onProcess
)
{
// return axios({
reqData
.
onUploadProgress
=
params
.
onProcess
;
// url,
}
// method,
// 取消请求
// params: sign(params, noSignAttr)
if
(
params
?.
cancelFun
)
{
// })
reqData
.
cancelToken
=
new
CancelToken
((
c
)
=>
{
params
.
cancelFun
.
cancel
=
c
;
});
}
// console.log(method === RequestMethods.POST)
// console.log(url)
// console.log(options)
// console.log(reqData)
let
axiosParams
=
{
url
,
method
,
...
reqData
,
};
if
(
options
.
returnAll
)
axiosParams
.
headers
=
{
"return-all"
:
true
};
return
axios
(
axiosParams
);
/**
* mock,请使用以下代码。
*/
// return axios({
// url,
// method,
// params: sign(params, noSignAttr)
// })
}
}
export
default
request
;
export
default
request
;
src/api/resident.js
View file @
1794e58
...
@@ -553,19 +553,19 @@ export function getStaffAttendanceDetailAPI(data) {
...
@@ -553,19 +553,19 @@ export function getStaffAttendanceDetailAPI(data) {
// 查询录音标签
// 查询录音标签
export
function
getRecordTagList
(
data
)
{
export
function
getRecordTagList
(
data
)
{
data
.
method
=
`
${
path2
}
reception.findRecordingTagByBatchId
`
;
data
.
method
=
`
dj.api.smartcarlife.reception.findRecordingTagByBatchId.out
`
;
return
request
(
data
,
"post"
);
return
request
(
data
,
"post"
);
}
}
// 查询质检列表|侧边栏
// 查询质检列表|侧边栏
export
function
getQualityList
(
data
)
{
export
function
getQualityList
(
data
)
{
data
.
method
=
`
${
path2
}
reception.findCheckResultByBatchId
`
;
data
.
method
=
`
dj.api.smartcarlife.reception.findCheckResultByBatchId.out
`
;
return
request
(
data
,
"post"
);
return
request
(
data
,
"post"
);
}
}
// 查询对话内容
// 查询对话内容
export
function
getConversationDetail
(
data
)
{
export
function
getConversationDetail
(
data
)
{
data
.
method
=
`
${
path2
}
reception.findConversationDetailByBatchIdNew
`
;
data
.
method
=
`
dj.api.smartcarlife.reception.findConversationDetailByBatchIdNew.out
`
;
return
request
(
data
,
"post"
);
return
request
(
data
,
"post"
);
}
}
// dj.api.smartcarlife.performanceSalaryConfig.page 分页查询绩效工资扣减规则
// dj.api.smartcarlife.performanceSalaryConfig.page 分页查询绩效工资扣减规则
...
@@ -643,7 +643,7 @@ export function getPermissionsByPhone(data) {
...
@@ -643,7 +643,7 @@ export function getPermissionsByPhone(data) {
* 质检管理-平铺视图
* 质检管理-平铺视图
*/
*/
export
function
getReclistWithPageV2
(
data
)
{
export
function
getReclistWithPageV2
(
data
)
{
data
.
method
=
"dj.api.mindworkplate.badge.employeeBadgeReclistWithPage
V2
"
;
data
.
method
=
"dj.api.mindworkplate.badge.employeeBadgeReclistWithPage
.out
"
;
return
request
(
data
,
"post"
);
return
request
(
data
,
"post"
);
}
}
...
...
src/layout/header-aside/components/header-user/index.vue
View file @
1794e58
...
@@ -30,8 +30,7 @@
...
@@ -30,8 +30,7 @@
</span>
</span>
</el-popover>
</el-popover>
<span
v-if=
"show"
class=
"btn-text"
>
{{
info
&&
info
.
detail
?
(
info
.
detail
.
userType
==
2
?
`${info.detail.userName
}
`
:
<span
v-if=
"show"
class=
"btn-text"
>
{{
info
&&
info
.
accountId
?
(
info
.
accountId
||
'管理员'
)
:
'未登录'
}}
</span>
'管理员'
)
:
'未登录'
}}
<
/span
>
<span
class=
"btn-text out-txt"
@
click=
"clear"
>
退出
</span>
<span
class=
"btn-text out-txt"
@
click=
"clear"
>
退出
</span>
</div>
</div>
...
@@ -429,9 +428,9 @@ export default {
...
@@ -429,9 +428,9 @@ export default {
window
.
location
.
reload
()
window
.
location
.
reload
()
}
}
// 开始请求退出接口
// 开始请求退出接口
AccountLoginOut
({
}
).
then
(
async
(
res
)
=>
{
//
AccountLoginOut({}).then(async (res) => {
reload
()
reload
()
}
)
//
})
// if (this.$router.currentRoute.name === 'index') {
// if (this.$router.currentRoute.name === 'index') {
// reload()
// reload()
// } else {
// } else {
...
...
src/plugin/axios/index_code.js
View file @
1794e58
...
@@ -108,118 +108,117 @@ service.interceptors.request.use(
...
@@ -108,118 +108,117 @@ service.interceptors.request.use(
);
);
// 响应拦截器
// 响应拦截器
service
.
interceptors
.
response
.
use
(
service
.
interceptors
.
response
.
use
(
(
response
)
=>
{
(
response
)
=>
{
// console.log(response)
// console.log(response)
store
.
commit
(
"d2admin/loading/set"
,
false
);
store
.
commit
(
"d2admin/loading/set"
,
false
);
// dataAxios 是 axios 返回数据中的 data
// dataAxios 是 axios 返回数据中的 data
// const dataAxios = {
// const dataAxios = {
// code: "20",
// code: "20",
// message: "缺少sessionId参数",
// message: "缺少sessionId参数",
// solution: "将添加会话ID请求参数",
// solution: "将添加会话ID请求参数",
// subErrors: null
// subErrors: null
// }
// }
const
dataAxios
=
response
.
data
;
const
dataAxios
=
response
.
data
;
const
ruleResult
=
baseConfig
.
axios
.
result
;
const
ruleResult
=
baseConfig
.
axios
.
result
;
const
errCodeMsg
=
baseConfig
.
errCode
||
{};
const
errCodeMsg
=
baseConfig
.
errCode
||
{};
const
errCodes
=
Object
.
keys
(
errCodeMsg
);
const
errCodes
=
Object
.
keys
(
errCodeMsg
);
const
returnAll
=
response
.
config
.
headers
[
"return-all"
];
const
returnAll
=
response
.
config
.
headers
[
"return-all"
];
// 请求级配置:为 true 时,code 为 -1 直接使用响应的 message,不查 errCode 配置
// 请求级配置:为 true 时,code 为 -1 直接使用响应的 message,不查 errCode 配置
const
useResponseMessage
=
response
.
config
.
useResponseMessage
;
const
useResponseMessage
=
response
.
config
.
useResponseMessage
;
// console.log("baseConfig", baseConfig)
// console.log("baseConfig", baseConfig)
// console.log("response", response)
// console.log("response", response)
// console.log("errCodes", errCodes)
// console.log("errCodes", errCodes)
// 这个状态码是和后端约定的
// 这个状态码是和后端约定的
// 有 code 代表这是一个后端接口 可以进行进一步的判断
// 有 code 代表这是一个后端接口 可以进行进一步的判断
let
goBackArr
=
[
"20"
,
"21"
];
let
goBackArr
=
[
"20"
,
"21"
];
// console.log(dataAxios[ruleResult.code_key])
// console.log(dataAxios[ruleResult.code_key])
if
(
goBackArr
.
includes
(
dataAxios
[
ruleResult
.
code_key
]))
{
if
(
goBackArr
.
includes
(
dataAxios
[
ruleResult
.
code_key
]))
{
// await store.dispatch('d2admin/account/logout')
// await store.dispatch('d2admin/account/logout')
store
.
dispatch
(
"d2admin/user/clear"
);
store
.
dispatch
(
"d2admin/user/clear"
);
util
.
cookies
.
remove
(
"token"
);
util
.
cookies
.
remove
(
"token"
);
router
.
replace
(
"/login"
);
router
.
replace
(
"/login"
);
// return Promise.reject(new Error("登录超时,请重新登录"))
// return Promise.reject(new Error("登录超时,请重新登录"))
return
errorCreate
(
"登录超时,请重新登录"
);
return
errorCreate
(
"登录超时,请重新登录"
);
// return Promise.reject(new Error(response.message || 'Error'))
// return Promise.reject(new Error(response.message || 'Error'))
}
}
if
(
returnAll
)
if
(
returnAll
)
return
dataAxios
;
return
dataAxios
;
const
codeValue
=
dataAxios
[
ruleResult
.
code_key
]
||
dataAxios
.
returnCode
;
const
codeValue
=
dataAxios
[
ruleResult
.
code_key
]
||
dataAxios
.
returnCode
;
switch
(
+
codeValue
)
{
switch
(
+
codeValue
)
{
case
ruleResult
.
code_success_value
:
case
ruleResult
.
code_success_value
:
// [ 示例 ] code === 0 代表没有错误
// [ 示例 ] code === 0 代表没有错误
return
dataAxios
[
ruleResult
.
data_key
];
return
dataAxios
[
ruleResult
.
data_key
];
case
ruleResult
.
code_error_value
:
case
ruleResult
.
code_error_value
:
// [ 示例 ] code === -1 代表需将返回的message弹窗展示
// [ 示例 ] code === -1 代表需将返回的message弹窗展示
return
errorCreate
(
`
${
dataAxios
[
ruleResult
.
message_key
]}
`
);
return
errorCreate
(
`
${
dataAxios
[
ruleResult
.
message_key
]}
`
);
default
:
{
default
:
{
// 不是正确的 code
// 不是正确的 cod
e
// 请求配置 useResponseMessage 时:code 为 -1 直接使用响应的 messag
e
// 请求配置 useResponseMessage 时:code 为 -1 直接使用响应的 message
const
codeStr
=
String
(
dataAxios
[
ruleResult
.
code_key
]
??
""
);
const
codeStr
=
String
(
dataAxios
[
ruleResult
.
code_key
]
??
""
);
const
isCodeMinusOne
=
const
isCodeMinusOne
=
codeStr
===
"-1"
||
+
dataAxios
[
ruleResult
.
code_key
]
===
-
1
;
codeStr
===
"-1"
||
+
dataAxios
[
ruleResult
.
code_key
]
===
-
1
;
if
(
useResponseMessage
&&
isCodeMinusOne
)
{
if
(
useResponseMessage
&&
isCodeMinusOne
)
{
return
errorCreate
(
`
${
dataAxios
[
ruleResult
.
message_key
]}
`
);
return
errorCreate
(
`
${
dataAxios
[
ruleResult
.
message_key
]}
`
);
}
}
if
(
errCodes
.
includes
(
dataAxios
[
ruleResult
.
code_key
]))
{
if
(
errCodes
.
includes
(
dataAxios
[
ruleResult
.
code_key
]))
{
return
errorCreate
(
`
${
errCodeMsg
[
dataAxios
[
ruleResult
.
code_key
]]}
`
);
return
errorCreate
(
`
${
errCodeMsg
[
dataAxios
[
ruleResult
.
code_key
]]}
`
);
}
}
// 返回约定定义之外的错误码直接取message
// 返回约定定义之外的错误码直接取message
return
errorCreate
(
`
${
dataAxios
[
ruleResult
.
message_key
]}
`
);
return
errorCreate
(
`
${
dataAxios
[
ruleResult
.
message_key
]}
`
);
}
}
}
}
},
},
(
error
)
=>
{
(
error
)
=>
{
if
(
error
&&
error
.
response
)
{
if
(
error
&&
error
.
response
)
{
switch
(
error
.
response
.
status
)
{
switch
(
error
.
response
.
status
)
{
case
400
:
case
400
:
error
.
message
=
"请求错误"
;
error
.
message
=
"请求错误"
;
break
;
break
;
case
401
:
case
401
:
error
.
message
=
"未授权,请登录"
;
error
.
message
=
"未授权,请登录"
;
break
;
break
;
case
403
:
case
403
:
error
.
message
=
"拒绝访问"
;
error
.
message
=
"拒绝访问"
;
break
;
break
;
case
404
:
case
404
:
error
.
message
=
`请求地址出错:
${
error
.
response
.
config
.
url
}
`
;
error
.
message
=
`请求地址出错:
${
error
.
response
.
config
.
url
}
`
;
break
;
break
;
case
408
:
case
408
:
error
.
message
=
"请求超时"
;
error
.
message
=
"请求超时"
;
break
;
break
;
case
500
:
case
500
:
error
.
message
=
"服务器内部错误"
;
error
.
message
=
"服务器内部错误"
;
break
;
break
;
case
501
:
case
501
:
error
.
message
=
"服务未实现"
;
error
.
message
=
"服务未实现"
;
break
;
break
;
case
502
:
case
502
:
error
.
message
=
"网关错误"
;
error
.
message
=
"网关错误"
;
break
;
break
;
case
503
:
case
503
:
error
.
message
=
"服务不可用"
;
error
.
message
=
"服务不可用"
;
break
;
break
;
case
504
:
case
504
:
error
.
message
=
"网关超时"
;
error
.
message
=
"网关超时"
;
break
;
break
;
case
505
:
case
505
:
error
.
message
=
"HTTP版本不受支持"
;
error
.
message
=
"HTTP版本不受支持"
;
break
;
break
;
default
:
default
:
break
;
break
;
}
}
}
}
if
(
error
&&
error
?.
stack
?.
indexOf
(
"timeout"
)
>
-
1
)
{
if
(
error
&&
error
?.
stack
?.
indexOf
(
"timeout"
)
>
-
1
)
{
if
(
error
.
stack
.
indexOf
(
"5000ms"
))
{
if
(
error
.
stack
.
indexOf
(
"5000ms"
))
{
error
.
message
=
"查询超时,请刷新页面重试!"
;
error
.
message
=
"查询超时,请刷新页面重试!"
;
}
}
// console.log('超时')
// console.log('超时')
// console.log(error)
// console.log(error)
}
}
store
.
commit
(
"d2admin/loading/set"
,
false
);
store
.
commit
(
"d2admin/loading/set"
,
false
);
if
(
!
error
.
__CANCEL__
)
if
(
!
error
.
__CANCEL__
)
errorLog
(
error
);
// 取消请求 不做错误提示
errorLog
(
error
);
// 取消请求 不做错误提示
return
Promise
.
reject
(
error
);
return
Promise
.
reject
(
error
);
},
},
);
);
export
default
service
;
export
default
service
;
src/store/modules/d2admin/modules/account.js
View file @
1794e58
...
@@ -26,7 +26,6 @@ export default {
...
@@ -26,7 +26,6 @@ export default {
// 开始请求登录接口
// 开始请求登录接口
AccountLogin
(
params
)
AccountLogin
(
params
)
.
then
(
async
(
accountInfo
=
{})
=>
{
.
then
(
async
(
accountInfo
=
{})
=>
{
console
.
log
(
"accountInfo: "
,
accountInfo
);
util
.
cookies
.
set
(
"uuid"
,
accountInfo
.
accountId
);
util
.
cookies
.
set
(
"uuid"
,
accountInfo
.
accountId
);
util
.
cookies
.
set
(
"userInfo"
,
accountInfo
);
util
.
cookies
.
set
(
"userInfo"
,
accountInfo
);
await
dispatch
(
"getAuth"
,
{
await
dispatch
(
"getAuth"
,
{
...
...
src/store/modules/d2admin/modules/page.js
View file @
1794e58
...
@@ -6,16 +6,8 @@ const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_AP
...
@@ -6,16 +6,8 @@ const SESSION_NAME = `${process.env.VUE_APP_STORAGE_PREFIX}-${process.env.VUE_AP
const
userInfo
=
JSON
.
parse
(
unescape
(
sessionStorage
.
getItem
(
SESSION_NAME
)))
||
{
const
userInfo
=
JSON
.
parse
(
unescape
(
sessionStorage
.
getItem
(
SESSION_NAME
)))
||
{
detail
:
{}
detail
:
{}
}
}
const
INDEX_PATH
=
userInfo
const
INDEX_PATH
=
"/index"
;
?
userInfo
.
detail
.
accountType
!==
7
const
defaultPage
=
home
;
?
"/index"
:
"/onlineAccountList"
:
"/index"
const
defaultPage
=
userInfo
?
userInfo
.
detail
.
accountType
!==
7
?
home
:
localRoutes
[
"90503"
]
:
home
defaultPage
.
fullPath
=
INDEX_PATH
defaultPage
.
fullPath
=
INDEX_PATH
// 判定是否需要缓存
// 判定是否需要缓存
const
isKeepAlive
=
(
data
)
=>
_
.
get
(
data
,
"meta.cache"
,
false
)
const
isKeepAlive
=
(
data
)
=>
_
.
get
(
data
,
"meta.cache"
,
false
)
...
...
src/views/earlyWarningManager/strategyCentre/storeSignboard/index.vue
View file @
1794e58
...
@@ -167,7 +167,7 @@ export default {
...
@@ -167,7 +167,7 @@ export default {
if
(
this
.
$refs
.
qualityDetail
)
this
.
$refs
.
qualityDetail
.
onPageHide
()
if
(
this
.
$refs
.
qualityDetail
)
this
.
$refs
.
qualityDetail
.
onPageHide
()
if
(
this
.
$refs
.
newQualityDetail
)
{
if
(
this
.
$refs
.
newQualityDetail
)
{
this
.
$refs
.
newQualityDetail
.
onPause
()
this
.
$refs
.
newQualityDetail
.
onPause
()
this
.
$refs
.
newQualityDetail
.
onPageHide
()
//
this.$refs.newQualityDetail.onPageHide()
}
}
this
.
isQualityVisible
=
false
this
.
isQualityVisible
=
false
this
.
isNewQualityVisible
=
false
this
.
isNewQualityVisible
=
false
...
@@ -261,4 +261,4 @@ export default {
...
@@ -261,4 +261,4 @@ export default {
overflow
:
auto
scroll
;
overflow
:
auto
scroll
;
}
}
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
</
style
>
src/views/residentManage/components/VoiceDialog.vue
View file @
1794e58
...
@@ -125,20 +125,21 @@
...
@@ -125,20 +125,21 @@
</template>
</template>
<
script
type=
'text/ecmascript-6'
>
<
script
type=
'text/ecmascript-6'
>
import
{
listShop4sByRef
}
from
"@api/merchant"
//
import { listShop4sByRef } from "@api/merchant"
import
{
getMerchantEmployeeList
,
updateRecordings
,
getAliOSSToken
}
from
"@api/serviceManage"
import
{
getMerchantEmployeeList
,
updateRecordings
,
getAliOSSToken
}
from
"@api/serviceManage"
import
OSS
from
'ali-oss'
import
OSS
from
'ali-oss'
import
*
as
dayjs
from
'dayjs'
import
*
as
dayjs
from
'dayjs'
import
{
rangePickerOptions
}
from
"@/common/format"
import
{
rangePickerOptions
}
from
"@/common/format"
import
reportTrackFunMixin
from
'@/mixins/reportTrackFunMixin'
//
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export
default
{
export
default
{
mixins
:
[
reportTrackFunMixin
],
//
mixins: [reportTrackFunMixin],
name
:
'VoiceDialog'
,
name
:
'VoiceDialog'
,
props
:
{
props
:
{
visible
:
Boolean
visible
:
Boolean
},
},
data
()
{
data
()
{
return
{
return
{
userInfo
:
this
.
$store
.
state
.
d2admin
.
user
.
info
,
rangePickerOptions
,
rangePickerOptions
,
client
:
null
,
client
:
null
,
loading
:
false
,
loading
:
false
,
...
@@ -280,12 +281,11 @@ export default {
...
@@ -280,12 +281,11 @@ export default {
})
})
},
},
getServiceStore
()
{
getServiceStore
()
{
listShop4sByRef
({
// listShop4sByRef({
yqMerchantId
:
''
// yqMerchantId: ''
}).
then
((
res
)
=>
{
// }).then((res) => {
this
.
merchantList
=
res
||
[]
this
.
merchantList
=
this
.
userInfo
.
merchantList
||
[]
console
.
log
(
res
)
// })
})
},
},
async
getMerchantEmployeeList
(
storeMerchantNo
)
{
async
getMerchantEmployeeList
(
storeMerchantNo
)
{
try
{
try
{
...
@@ -362,4 +362,4 @@ export default {
...
@@ -362,4 +362,4 @@ export default {
cursor
:
pointer
;
cursor
:
pointer
;
}
}
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
</
style
>
src/views/residentManage/components/newQualityDetail.vue
View file @
1794e58
...
@@ -207,9 +207,9 @@ const toMinutesAndSeconds = (seconds) => {
...
@@ -207,9 +207,9 @@ const toMinutesAndSeconds = (seconds) => {
return
formattedTime
return
formattedTime
}
}
}
}
import
reportTrackFunMixin
from
'@/mixins/reportTrackFunMixin'
//
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export
default
{
export
default
{
mixins
:
[
reportTrackFunMixin
],
//
mixins: [reportTrackFunMixin],
name
:
"NewQualityDetail"
,
name
:
"NewQualityDetail"
,
components
:
{
components
:
{
Dialogue
,
Dialogue
,
...
@@ -257,7 +257,7 @@ export default {
...
@@ -257,7 +257,7 @@ export default {
currentNum
:
{
currentNum
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
searchForm
.
batchId
=
this
.
qualityDetailList
[
val
].
id
this
.
searchForm
.
batchId
=
this
.
qualityDetailList
[
val
].
id
this
.
onPageShow
()
//
this.onPageShow()
}
,
}
,
immediate
:
true
immediate
:
true
}
,
}
,
...
@@ -332,7 +332,7 @@ export default {
...
@@ -332,7 +332,7 @@ export default {
max
=
qualityDetailList
.
length
-
1
max
=
qualityDetailList
.
length
-
1
if
((
currentNum
==
0
&&
num
==
-
1
)
||
(
currentNum
==
max
&&
num
==
1
))
if
((
currentNum
==
0
&&
num
==
-
1
)
||
(
currentNum
==
max
&&
num
==
1
))
throw
"无更多接待记录"
throw
"无更多接待记录"
this
.
onPageHide
()
//
this.onPageHide()
this
.
currentNum
+=
num
this
.
currentNum
+=
num
}
catch
(
error
)
{
}
catch
(
error
)
{
if
(
error
)
this
.
$message
.
error
(
error
)
if
(
error
)
this
.
$message
.
error
(
error
)
...
...
src/views/residentManage/components/qualityDetail.vue
View file @
1794e58
...
@@ -101,9 +101,9 @@ const toMinutesAndSeconds = (seconds) => {
...
@@ -101,9 +101,9 @@ const toMinutesAndSeconds = (seconds) => {
return
formattedTime
return
formattedTime
}
}
}
}
import
reportTrackFunMixin
from
'@/mixins/reportTrackFunMixin'
//
import reportTrackFunMixin from '@/mixins/reportTrackFunMixin'
export
default
{
export
default
{
mixins
:
[
reportTrackFunMixin
],
//
mixins: [reportTrackFunMixin],
name
:
"RelatActivityOrderDialog"
,
name
:
"RelatActivityOrderDialog"
,
components
:
{
components
:
{
QualityAnalyse
,
QualityAnalyse
,
...
@@ -210,7 +210,7 @@ export default {
...
@@ -210,7 +210,7 @@ export default {
currentNum
:
{
currentNum
:
{
handler
(
val
)
{
handler
(
val
)
{
this
.
searchForm
.
batchId
=
this
.
qualityDetailList
[
val
].
id
this
.
searchForm
.
batchId
=
this
.
qualityDetailList
[
val
].
id
this
.
onPageShow
()
//
this.onPageShow()
},
},
immediate
:
true
immediate
:
true
}
}
...
@@ -230,7 +230,7 @@ export default {
...
@@ -230,7 +230,7 @@ export default {
max
=
qualityDetailList
.
length
-
1
max
=
qualityDetailList
.
length
-
1
if
((
currentNum
==
0
&&
num
==
-
1
)
||
(
currentNum
==
max
&&
num
==
1
))
if
((
currentNum
==
0
&&
num
==
-
1
)
||
(
currentNum
==
max
&&
num
==
1
))
throw
"无更多接待记录"
throw
"无更多接待记录"
this
.
onPageHide
()
//
this.onPageHide()
this
.
currentNum
+=
num
this
.
currentNum
+=
num
}
catch
(
error
)
{
}
catch
(
error
)
{
if
(
error
)
this
.
$message
.
error
(
error
)
if
(
error
)
this
.
$message
.
error
(
error
)
...
...
src/views/residentManage/components/qualityIndex/contant.js
View file @
1794e58
...
@@ -54,127 +54,127 @@ const VIEW_LIST = [
...
@@ -54,127 +54,127 @@ const VIEW_LIST = [
];
];
const
FORM_DATA
=
[
const
FORM_DATA
=
[
{
{
label
:
"接待日期"
,
label
:
"接待日期"
,
name
:
"searchdate"
,
name
:
"searchdate"
,
type
:
"datePicker"
,
type
:
"datePicker"
,
isClear
:
false
,
isClear
:
false
,
pickerOptions
:
"rangePickerOptions"
,
pickerOptions
:
"rangePickerOptions"
,
},
},
{
//
{
label
:
"质检评分"
,
//
label: "质检评分",
name
:
"qualityTestScore"
,
//
name: "qualityTestScore",
addHtml
:
"score"
,
//
addHtml: "score",
},
//
},
{
//
{
label
:
"归属服务商"
,
//
label: "归属服务商",
name
:
"serviceMerchantNo"
,
//
name: "serviceMerchantNo",
type
:
"select"
,
//
type: "select",
optionList
:
[],
//
optionList: [],
optionId
:
"partnerMerchantId"
,
//
optionId: "partnerMerchantId",
optionLabel
:
"partnerMerchantName"
,
//
optionLabel: "partnerMerchantName",
optionsName
:
"parkServiceList"
,
//
optionsName: "parkServiceList",
},
//
},
{
{
label
:
"归属门店"
,
label
:
"归属门店"
,
name
:
"RecMerchantNo"
,
name
:
"RecMerchantNo"
,
type
:
"select"
,
type
:
"select"
,
optionList
:
[],
optionList
:
[],
optionId
:
"merchantId"
,
optionId
:
"merchantId"
,
optionLabel
:
"merchantName"
,
optionLabel
:
"merchantName"
,
optionsName
:
"storeIdList"
,
optionsName
:
"storeIdList"
,
},
},
{
//
{
label
:
"员工姓名"
,
//
label: "员工姓名",
name
:
"employeeName"
,
//
name: "employeeName",
type
:
"input"
,
//
type: "input",
maxlength
:
"40"
,
//
maxlength: "40",
isClear
:
true
,
//
isClear: true,
},
//
},
{
//
{
label
:
"手机号"
,
//
label: "手机号",
name
:
"phoneNumber"
,
//
name: "phoneNumber",
type
:
"input"
,
//
type: "input",
placeholder
:
"请输入手机号(至少4位)"
,
//
placeholder: "请输入手机号(至少4位)",
maxlength
:
"11"
,
//
maxlength: "11",
isClear
:
true
,
//
isClear: true,
},
//
},
{
//
{
label
:
"业务场景"
,
//
label: "业务场景",
name
:
"BussinessType"
,
//
name: "BussinessType",
type
:
"select"
,
//
type: "select",
optionList
:
[],
//
optionList: [],
optionId
:
"id"
,
//
optionId: "id",
optionLabel
:
"name"
,
//
optionLabel: "name",
optionsName
:
"sceneTypeList"
,
//
optionsName: "sceneTypeList",
},
//
},
{
//
{
label
:
"品牌"
,
//
label: "品牌",
name
:
"carBrandIds"
,
//
name: "carBrandIds",
type
:
"select"
,
//
type: "select",
multiple
:
true
,
//
multiple: true,
isClear
:
true
,
//
isClear: true,
collapseTags
:
true
,
//
collapseTags: true,
optionList
:
[],
//
optionList: [],
optionId
:
"id"
,
//
optionId: "id",
optionLabel
:
"label"
,
//
optionLabel: "label",
optionsName
:
"brandList"
,
//
optionsName: "brandList",
},
//
},
{
//
{
label
:
"是否成交"
,
//
label: "是否成交",
name
:
"orderTransactionFlag"
,
//
name: "orderTransactionFlag",
type
:
"select"
,
//
type: "select",
optionList
:
[],
//
optionList: [],
optionId
:
"id"
,
//
optionId: "id",
optionLabel
:
"name"
,
//
optionLabel: "name",
optionsName
:
"orderTransactionList"
,
//
optionsName: "orderTransactionList",
},
//
},
{
//
{
label
:
"客户类型"
,
//
label: "客户类型",
name
:
"enterpriseCustomerFlag"
,
//
name: "enterpriseCustomerFlag",
type
:
"select"
,
//
type: "select",
optionList
:
[],
//
optionList: [],
optionId
:
"id"
,
//
optionId: "id",
optionLabel
:
"name"
,
//
optionLabel: "name",
optionsName
:
"enterpriseCustomerList"
,
//
optionsName: "enterpriseCustomerList",
},
//
},
{
{
label
:
"客户姓名"
,
label
:
"客户姓名"
,
name
:
"customerName"
,
name
:
"customerName"
,
type
:
"input"
,
type
:
"input"
,
maxlength
:
"20"
,
maxlength
:
"20"
,
isClear
:
true
,
isClear
:
true
,
},
},
{
{
label
:
"客户手机号"
,
label
:
"客户手机号"
,
name
:
"customerPhone"
,
name
:
"customerPhone"
,
addHtml
:
"customerPhone"
,
addHtml
:
"customerPhone"
,
},
},
{
//
{
label
:
"安心包是否成交"
,
//
label: "安心包是否成交",
name
:
"orderAxbTransactionFlag"
,
//
name: "orderAxbTransactionFlag",
type
:
"select"
,
//
type: "select",
optionList
:
[],
//
optionList: [],
optionId
:
"id"
,
//
optionId: "id",
optionLabel
:
"name"
,
//
optionLabel: "name",
optionsName
:
"orderAxTransactionList"
,
//
optionsName: "orderAxTransactionList",
},
//
},
{
//
{
label
:
"成交金额大于"
,
//
label: "成交金额大于",
name
:
"orderTransactionAmount"
,
//
name: "orderTransactionAmount",
addHtml
:
"orderTransactionAmount"
,
//
addHtml: "orderTransactionAmount",
},
//
},
// {
// {
// label: "当日到店量",
// label: "当日到店量",
// name: "toStoreCount",
// name: "toStoreCount",
// addHtml: "toStoreCount"
// addHtml: "toStoreCount"
// },
// },
// {
// {
// label: "异常占比",
// label: "异常占比",
// name: "AbnormalProportion",
// name: "AbnormalProportion",
// addHtml: "AbnormalProportion"
// addHtml: "AbnormalProportion"
// }
// }
];
];
const
TABLE_TYPE_1
=
{
const
TABLE_TYPE_1
=
{
...
...
src/views/residentManage/components/qualityIndex/index.vue
View file @
1794e58
This diff is collapsed.
Click to expand it.
src/views/residentManage/components/recepDetail.vue
View file @
1794e58
...
@@ -194,9 +194,9 @@ import ElInputRange from "../el-input-range"
...
@@ -194,9 +194,9 @@ import ElInputRange from "../el-input-range"
import
QualityDetail
from
"./qualityDetail.vue"
import
QualityDetail
from
"./qualityDetail.vue"
import
NewQualityDetail
from
"./newQualityDetail.vue"
import
NewQualityDetail
from
"./newQualityDetail.vue"
import
{
conversationPage
}
from
"@api/resident"
import
{
conversationPage
}
from
"@api/resident"
import
reportTrackFunMixin
from
"@/mixins/reportTrackFunMixin"
//
import reportTrackFunMixin from "@/mixins/reportTrackFunMixin"
export
default
{
export
default
{
mixins
:
[
reportTrackFunMixin
],
//
mixins: [reportTrackFunMixin],
props
:
{
props
:
{
queryData
:
Object
,
queryData
:
Object
,
show
:
Boolean
show
:
Boolean
...
@@ -356,8 +356,8 @@ export default {
...
@@ -356,8 +356,8 @@ export default {
watch
:
{
watch
:
{
show
:
{
show
:
{
handler
(
val
)
{
handler
(
val
)
{
if
(
val
)
this
.
onPageShow
()
//
if (val) this.onPageShow()
else
this
.
onPageHide
()
//
else this.onPageHide()
},
},
immediate
:
true
immediate
:
true
}
}
...
@@ -407,14 +407,14 @@ export default {
...
@@ -407,14 +407,14 @@ export default {
this
.
$refs
.
recepDetail
.
refreshTable
()
this
.
$refs
.
recepDetail
.
refreshTable
()
},
},
closeDialog
()
{
closeDialog
()
{
if
(
this
.
$refs
.
qualityDetail
)
this
.
$refs
.
qualityDetail
.
onPageHide
()
//
if (this.$refs.qualityDetail) this.$refs.qualityDetail.onPageHide()
if
(
this
.
$refs
.
newQualityDetail
)
{
if
(
this
.
$refs
.
newQualityDetail
)
{
this
.
$refs
.
newQualityDetail
.
onPause
()
this
.
$refs
.
newQualityDetail
.
onPause
()
this
.
$refs
.
newQualityDetail
.
onPageHide
()
//
this.$refs.newQualityDetail.onPageHide()
}
}
this
.
isQualityVisible
=
false
this
.
isQualityVisible
=
false
this
.
isNewQualityVisible
=
false
this
.
isNewQualityVisible
=
false
this
.
onPageShow
()
//
this.onPageShow()
},
},
qualitDetail
(
row
)
{
qualitDetail
(
row
)
{
const
list
=
this
.
$refs
.
recepDetail
.
data
,
const
list
=
this
.
$refs
.
recepDetail
.
data
,
...
@@ -426,7 +426,7 @@ export default {
...
@@ -426,7 +426,7 @@ export default {
}
else
{
}
else
{
this
.
isQualityVisible
=
true
this
.
isQualityVisible
=
true
}
}
this
.
onPageHide
()
//
this.onPageHide()
},
},
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
...
...
src/views/residentManage/qualityControlList.vue
View file @
1794e58
...
@@ -83,9 +83,9 @@
...
@@ -83,9 +83,9 @@
<
script
type=
'text/ecmascript-6'
>
<
script
type=
'text/ecmascript-6'
>
import
qualityIndex
from
"./components/qualityIndex/index"
import
qualityIndex
from
"./components/qualityIndex/index"
import
recepDetail
from
"./components/recepDetail.vue"
import
recepDetail
from
"./components/recepDetail.vue"
import
reportTrackPageMixin
from
"@/mixins/reportTrackPageMixin"
//
import reportTrackPageMixin from "@/mixins/reportTrackPageMixin"
export
default
{
export
default
{
mixins
:
[
reportTrackPageMixin
],
//
mixins: [reportTrackPageMixin],
name
:
""
,
name
:
""
,
components
:
{
components
:
{
qualityIndex
,
qualityIndex
,
...
...
src/views/system/login/index.vue
View file @
1794e58
...
@@ -192,77 +192,77 @@ export default {
...
@@ -192,77 +192,77 @@ export default {
handleReturnLogin
()
{
handleReturnLogin
()
{
this
.
isMutiAccount
&&
(
this
.
isMutiAccount
=
false
)
this
.
isMutiAccount
&&
(
this
.
isMutiAccount
=
false
)
},
},
handleSelectAccount
(
idx
)
{
//
handleSelectAccount(idx) {
if
(
this
.
logining
)
return
false
//
if (this.logining) return false
this
.
logining
=
true
//
this.logining = true
var
currentItem
=
this
.
accountInfo
.
accountList
[
idx
]
//
var currentItem = this.accountInfo.accountList[idx]
var
params
=
{
//
var params = {
loginAccount
:
currentItem
.
loginAccout
,
//
loginAccount: currentItem.loginAccout,
merchantId
:
+
currentItem
.
merchantNo
,
//
merchantId: +currentItem.merchantNo,
loginToken
:
this
.
loginToken
//
loginToken: this.loginToken
}
//
}
selectAccount
(
params
).
then
((
res
)
=>
{
//
selectAccount(params).then((res) => {
util
.
cookies
.
set
(
"token"
,
res
.
sessionId
)
//
util.cookies.set("token", res.sessionId)
// console.log(currentItem)
//
// console.log(currentItem)
getUserInfo
({})
//
getUserInfo({})
.
then
((
userInfo
)
=>
{
//
.then((userInfo) => {
userInfo
.
beSuper
=
userInfo
.
loginAccount
.
isAdmin
==
1
//
userInfo.beSuper = userInfo.loginAccount.isAdmin == 1
if
(
userInfo
.
beSuper
)
{
//
if (userInfo.beSuper) {
// 是否园区店
//
// 是否园区店
userInfo
.
beYQMerchant
=
true
//
userInfo.beYQMerchant = true
// 是否服务商
//
// 是否服务商
userInfo
.
beServerMerchant
=
true
//
userInfo.beServerMerchant = true
}
else
{
//
} else {
// 是否园区店
//
// 是否园区店
userInfo
.
beYQMerchant
=
//
userInfo.beYQMerchant =
userInfo
.
loginAccount
.
merchantAccountList
.
includes
(
"6"
)
||
//
userInfo.loginAccount.merchantAccountList.includes("6") ||
userInfo
.
loginAccount
.
merchantAccountList
.
includes
(
"8"
)
//
userInfo.loginAccount.merchantAccountList.includes("8")
// 是否服务商
//
// 是否服务商
userInfo
.
beServerMerchant
=
//
userInfo.beServerMerchant =
userInfo
.
loginAccount
.
merchantAccountList
.
includes
(
"7"
)
//
userInfo.loginAccount.merchantAccountList.includes("7")
}
//
}
userInfo
.
detail
=
userInfo
.
merchant
//
userInfo.detail = userInfo.merchant
Object
.
keys
(
userInfo
.
loginAccount
).
forEach
((
item
)
=>
{
//
Object.keys(userInfo.loginAccount).forEach((item) => {
if
(
userInfo
.
loginAccount
[
item
]
&&
!
userInfo
.
detail
[
item
])
{
//
if (userInfo.loginAccount[item] && !userInfo.detail[item]) {
userInfo
.
detail
[
item
]
=
userInfo
.
loginAccount
[
item
]
//
userInfo.detail[item] = userInfo.loginAccount[item]
}
//
}
})
//
})
userInfo
.
merchantAccountLevel
=
userInfo
.
detail
.
merchantAccountLevel
//
userInfo.merchantAccountLevel = userInfo.detail.merchantAccountLevel
this
.
getAuth
({
//
this.getAuth({
userInfo
:
userInfo
,
//
userInfo: userInfo,
accountInfo
:
this
.
accountInfo
//
accountInfo: this.accountInfo
})
//
})
.
then
(
async
(
res
)
=>
{
//
.then(async (res) => {
console
.
log
(
res
,
"merchantAccountLevel"
)
//
console.log(res, "merchantAccountLevel")
const
_current
=
//
const _current =
userInfo
.
detail
.
accountType
!==
7
//
userInfo.detail.accountType !== 7
?
await
this
.
current
()
//
? await this.current()
:
"/onlineAccountList"
//
: "/onlineAccountList"
await
this
.
initBaseData
()
//
await this.initBaseData()
// console.log(this.$route.query.redirect)
//
// console.log(this.$route.query.redirect)
// console.log(_current)
//
// console.log(_current)
// return
//
// return
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
_current
)
//
this.$router.replace(this.$route.query.redirect || _current)
})
//
})
.
catch
((
err
)
=>
{
//
.catch((err) => {
// 接收 getAuth 的 reject 并做对应处理
//
// 接收 getAuth 的 reject 并做对应处理
console
.
error
(
"getAuth failed:"
,
err
)
//
console.error("getAuth failed:", err)
const
msg
=
//
const msg =
typeof
err
===
"string"
//
typeof err === "string"
?
err
//
? err
:
(
err
&&
err
.
message
)
||
"获取权限失败,请联系管理员"
//
: (err && err.message) || "获取权限失败,请联系管理员"
this
.
$message
&&
this
.
$message
.
error
(
msg
)
//
this.$message && this.$message.error(msg)
this
.
isMutiAccount
=
false
//
this.isMutiAccount = false
// 可选:重置登录按钮 loading / 回到登录页 / 清理态
//
// 可选:重置登录按钮 loading / 回到登录页 / 清理态
// if (this.loading) this.loading = false
//
// if (this.loading) this.loading = false
// this.$router.replace('/login')
//
// this.$router.replace('/login')
})
//
})
})
//
})
.
finally
(()
=>
{
//
.finally(() => {
this
.
logining
=
false
//
this.logining = false
})
//
})
})
//
})
},
//
},
// 提交登录信息
// 提交登录信息
submit
()
{
submit
()
{
this
.
$refs
.
loginForm
.
validate
((
valid
)
=>
{
this
.
$refs
.
loginForm
.
validate
((
valid
)
=>
{
...
...
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