Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
dj-simple
/
dj-admin
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 a99ca89c
authored
Mar 24, 2025
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix 修改权益配置
1 parent
83b7401a
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
166 additions
and
132 deletions
public/menuIcon/salepre.png
src/api/request.js
src/store/modules/d2admin/modules/account.js
src/store/modules/d2admin/modules/user.js
src/views/salepre/ContractManager.vue
src/views/salepre/addCode.vue
src/views/salepre/appointment.vue
src/views/salepre/checkSet.vue
src/views/salepre/claims.vue
src/views/salepre/config.vue
src/views/salepre/equitySummary.vue
src/views/salepre/index.vue
src/views/salepre/serviceConfig.vue
src/views/system/login/index.vue
public/menuIcon/salepre.png
0 → 100644
View file @
a99ca89
898 Bytes
src/api/request.js
View file @
a99ca89
...
...
@@ -31,8 +31,8 @@ const request = (
apiName
=
parts
[
2
]
}
}
console
.
log
(
"params.method"
,
params
.
method
)
console
.
log
(
"apiName"
,
apiName
)
//
console.log("params.method", params.method)
//
console.log("apiName", apiName)
// 为空报错
if
(
!
apiName
)
{
throw
new
Error
(
"apiName is null"
)
...
...
@@ -50,7 +50,7 @@ const request = (
}
const
baseApiName
=
mappingName
[
apiName
]
console
.
log
(
baseApiName
,
baseConfig
,
"baseApiName"
)
//
console.log(baseApiName, baseConfig, "baseApiName")
// params.appKey = baseConfig[baseApiName].appkey
if
(
baseApiName
==
"common"
)
{
params
.
app_key
=
baseConfig
[
baseApiName
].
appkey
...
...
src/store/modules/d2admin/modules/account.js
View file @
a99ca89
...
...
@@ -257,6 +257,9 @@ export default {
// 后台接口 -> store
// await dispatch('d2admin/auth/init', null, { root: true })
// end
dispatch
(
"d2admin/user/getScrmInfoLoad"
,
null
,
{
root
:
true
})
resolve
()
})
}
...
...
src/store/modules/d2admin/modules/user.js
View file @
a99ca89
...
...
@@ -57,13 +57,7 @@ export default {
},
mutations
:
{
setDownloadList
(
state
,
{
list
,
type
})
{
// console.log(list)
// return
// state[type] = state[type].push(list)
state
[
type
]
=
list
// console.log(state[`${type}`])
// console.log(state[type])
},
setUpdateRefesh
(
state
,
data
)
{
state
.
updateRefesh
=
data
...
...
@@ -83,10 +77,6 @@ export default {
actionSetDownloadList
({
commit
,
dispatch
,
state
},
{
list
,
type
})
{
// console.log(list, type)
commit
(
"setDownloadList"
,
{
list
,
type
})
// console.log()
// console.log(dispatch)
// console.log(state[type])
// console.log(`state.${type}`)
// 持久化
dispatch
(
"d2admin/db/set"
,
...
...
@@ -101,6 +91,26 @@ export default {
)
},
/**
* @description 修改下载记录
* @param {Object} state state
*/
actionSetScrmInfo
({
commit
,
dispatch
,
state
},
data
)
{
console
.
log
(
data
,
"actionSetScrmInfo"
)
commit
(
"setScrmInfo"
,
data
)
// 持久化
dispatch
(
"d2admin/db/set"
,
{
dbName
:
"sys"
,
path
:
`user.scrmInfo`
,
value
:
state
.
scrmInfo
,
// state.dowloadList,
user
:
true
},
{
root
:
true
}
)
},
/**
* @description 设置用户数据
* @param {Object} context
* @param {*} info info
...
...
@@ -145,7 +155,22 @@ export default {
},
{
root
:
true
}
)
// console.log(type, state[type])
resolve
()
})
},
getScrmInfoLoad
({
state
,
dispatch
})
{
return
new
Promise
(
async
(
resolve
)
=>
{
// store 赋值
state
.
scrmInfo
=
await
dispatch
(
"d2admin/db/get"
,
{
dbName
:
"sys"
,
path
:
`user.scrmInfo`
,
defaultValue
:
[],
user
:
true
},
{
root
:
true
}
)
resolve
()
})
},
...
...
@@ -165,6 +190,7 @@ export default {
sessionStorage
.
removeItem
(
ACCOUNT_SESSION_NAME
)
dispatch
(
"actionSetDownloadList"
,
{
list
:
[],
type
:
"updateList"
})
dispatch
(
"actionSetDownloadList"
,
{
list
:
[],
type
:
"dowloadList"
})
dispatch
(
"actionSetScrmInfo"
,
{})
resolve
()
})
},
...
...
src/views/salepre/ContractManager.vue
View file @
a99ca89
...
...
@@ -15,9 +15,9 @@ import { mapState } from "vuex"
export
default
{
data
()
{
return
{
// iframeSrc: 'https://oss-account-padtest.glsx.com.cn/customer/account',
iframeSrc
:
baseConfig
.
scrm
,
iframeUrl
:
"/index.html"
// iframeSrc: "http://192.168.1.178:6654",
iframeUrl
:
"/#/ContractManager/index"
}
},
computed
:
{
...
...
@@ -58,19 +58,19 @@ export default {
// }
// },
...
mapState
({
SSO
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
scrm
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
})
},
mounted
()
{
// 监听来自 iframe 的消息
window
.
addEventListener
(
"message"
,
(
event
)
=>
{
console
.
log
(
"收到 iframe 消息:"
,
event
.
data
)
if
(
event
.
data
.
type
===
"location-change"
)
{
console
.
log
(
"Iframe 地址已改变:"
,
event
.
data
.
url
)
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
this
.
handleIframeLocationChange
(
event
.
data
.
url
)
}
})
//
window.addEventListener("message", (event) => {
//
console.log("收到 iframe 消息:", event.data)
//
if (event.data.type === "location-change") {
//
console.log("Iframe 地址已改变:", event.data.url)
//
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
//
this.handleIframeLocationChange(event.data.url)
//
}
//
})
},
methods
:
{
handleIframeLocationChange
(
url
)
{
...
...
src/views/salepre/addCode.vue
View file @
a99ca89
...
...
@@ -17,38 +17,48 @@ export default {
return
{
// iframeSrc: 'https://oss-account-padtest.glsx.com.cn/customer/account',
iframeSrc
:
baseConfig
.
scrm
,
iframeUrl
:
"/
index.html
"
iframeUrl
:
"/
#/addCode/index
"
}
},
computed
:
{
// sessionId, merchantId
iframeUrlWithParams
()
{
// 处理单个参数的函数
const
updateParam
=
(
url
,
paramName
,
paramValue
)
=>
{
const
regex
=
new
RegExp
(
`([?&])
${
paramName
}
=[^&]*`
)
if
(
url
.
includes
(
`
${
paramName
}
=`
))
{
return
url
.
replace
(
regex
,
`$1
${
paramName
}
=
${
paramValue
}
`
)
}
else
{
return
(
url
+
(
url
.
includes
(
"?"
)
?
"&"
:
"?"
+
`
${
paramName
}
=
${
paramValue
}
`
)
)
}
}
// iframeUrlWithParams() {
// // 检查是否已经有 t 参数
// if (this.iframeUrl.includes('?t=')) {
// // 如果已经有 t 参数,替换它
// return this.iframeUrl.replace(/(\?|&)t=[^&]+/, '$1t=' + this.scrmInfo.sessionId);
// } else {
// // 如果没有 t 参数,添加它
// return this.iframeUrl.includes('?')
// ? this.iframeUrl + '&sessionId=' + this.scrmInfo.sessionId
// : this.iframeUrl + '?sessionId=' + this.scrmInfo.sessionId;
// }
// },
let
finalUrl
=
this
.
iframeUrl
// 处理 sessionId
finalUrl
=
updateParam
(
finalUrl
,
"sessionId"
,
this
.
scrmInfo
.
sessionId
)
// 处理 merchantId
finalUrl
=
updateParam
(
finalUrl
,
"merchantId"
,
this
.
scrmInfo
.
merchantId
)
return
finalUrl
},
...
mapState
({
SSO
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
scrm
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
})
},
mounted
()
{
// 监听来自 iframe 的消息
window
.
addEventListener
(
"message"
,
(
event
)
=>
{
console
.
log
(
"收到 iframe 消息:"
,
event
.
data
)
if
(
event
.
data
.
type
===
"location-change"
)
{
console
.
log
(
"Iframe 地址已改变:"
,
event
.
data
.
url
)
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
this
.
handleIframeLocationChange
(
event
.
data
.
url
)
}
})
//
window.addEventListener("message", (event) => {
//
console.log("收到 iframe 消息:", event.data)
//
if (event.data.type === "location-change") {
//
console.log("Iframe 地址已改变:", event.data.url)
//
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
//
this.handleIframeLocationChange(event.data.url)
//
}
//
})
},
methods
:
{
handleIframeLocationChange
(
url
)
{
...
...
src/views/salepre/appointment.vue
View file @
a99ca89
...
...
@@ -17,7 +17,7 @@ export default {
return
{
// iframeSrc: 'https://oss-account-padtest.glsx.com.cn/customer/account',
iframeSrc
:
baseConfig
.
scrm
,
iframeUrl
:
"/
index.html
"
iframeUrl
:
"/
#/appointment/index
"
}
},
computed
:
{
...
...
@@ -58,19 +58,19 @@ export default {
// }
// },
...
mapState
({
SSO
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
scrm
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
})
},
mounted
()
{
// 监听来自 iframe 的消息
window
.
addEventListener
(
"message"
,
(
event
)
=>
{
console
.
log
(
"收到 iframe 消息:"
,
event
.
data
)
if
(
event
.
data
.
type
===
"location-change"
)
{
console
.
log
(
"Iframe 地址已改变:"
,
event
.
data
.
url
)
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
this
.
handleIframeLocationChange
(
event
.
data
.
url
)
}
})
//
window.addEventListener("message", (event) => {
//
console.log("收到 iframe 消息:", event.data)
//
if (event.data.type === "location-change") {
//
console.log("Iframe 地址已改变:", event.data.url)
//
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
//
this.handleIframeLocationChange(event.data.url)
//
}
//
})
},
methods
:
{
handleIframeLocationChange
(
url
)
{
...
...
src/views/salepre/checkSet.vue
View file @
a99ca89
...
...
@@ -17,7 +17,7 @@ export default {
return
{
// iframeSrc: 'https://oss-account-padtest.glsx.com.cn/customer/account',
iframeSrc
:
baseConfig
.
scrm
,
iframeUrl
:
"/
index.html
"
iframeUrl
:
"/
#/beforeSale/checkSet
"
}
},
computed
:
{
...
...
@@ -58,19 +58,19 @@ export default {
// }
// },
...
mapState
({
SSO
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
scrm
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
})
},
mounted
()
{
// 监听来自 iframe 的消息
window
.
addEventListener
(
"message"
,
(
event
)
=>
{
console
.
log
(
"收到 iframe 消息:"
,
event
.
data
)
if
(
event
.
data
.
type
===
"location-change"
)
{
console
.
log
(
"Iframe 地址已改变:"
,
event
.
data
.
url
)
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
this
.
handleIframeLocationChange
(
event
.
data
.
url
)
}
})
//
window.addEventListener("message", (event) => {
//
console.log("收到 iframe 消息:", event.data)
//
if (event.data.type === "location-change") {
//
console.log("Iframe 地址已改变:", event.data.url)
//
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
//
this.handleIframeLocationChange(event.data.url)
//
}
//
})
},
methods
:
{
handleIframeLocationChange
(
url
)
{
...
...
src/views/salepre/claims.vue
View file @
a99ca89
...
...
@@ -15,9 +15,9 @@ import { mapState } from "vuex"
export
default
{
data
()
{
return
{
// iframeSrc: 'https://oss-account-padtest.glsx.com.cn/customer/account',
iframeSrc
:
baseConfig
.
scrm
,
iframeUrl
:
"/index.html"
// iframeSrc: "http://192.168.1.178:6654",
iframeUrl
:
"/#/claims/index"
}
},
computed
:
{
...
...
@@ -45,32 +45,20 @@ export default {
return
finalUrl
},
// iframeUrlWithParams() {
// // 检查是否已经有 t 参数
// if (this.iframeUrl.includes('?t=')) {
// // 如果已经有 t 参数,替换它
// return this.iframeUrl.replace(/(\?|&)t=[^&]+/, '$1t=' + this.scrmInfo.sessionId);
// } else {
// // 如果没有 t 参数,添加它
// return this.iframeUrl.includes('?')
// ? this.iframeUrl + '&sessionId=' + this.scrmInfo.sessionId
// : this.iframeUrl + '?sessionId=' + this.scrmInfo.sessionId;
// }
// },
...
mapState
({
SSO
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
scrm
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
})
},
mounted
()
{
// 监听来自 iframe 的消息
window
.
addEventListener
(
"message"
,
(
event
)
=>
{
console
.
log
(
"收到 iframe 消息:"
,
event
.
data
)
if
(
event
.
data
.
type
===
"location-change"
)
{
console
.
log
(
"Iframe 地址已改变:"
,
event
.
data
.
url
)
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
this
.
handleIframeLocationChange
(
event
.
data
.
url
)
}
})
//
window.addEventListener("message", (event) => {
//
console.log("收到 iframe 消息:", event.data)
//
if (event.data.type === "location-change") {
//
console.log("Iframe 地址已改变:", event.data.url)
//
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
//
this.handleIframeLocationChange(event.data.url)
//
}
//
})
},
methods
:
{
handleIframeLocationChange
(
url
)
{
...
...
src/views/salepre/config.vue
View file @
a99ca89
...
...
@@ -17,7 +17,7 @@ export default {
return
{
// iframeSrc: 'https://oss-account-padtest.glsx.com.cn/customer/account',
iframeSrc
:
baseConfig
.
scrm
,
iframeUrl
:
"/
index.html
"
iframeUrl
:
"/
#/config/index
"
}
},
computed
:
{
...
...
@@ -58,19 +58,19 @@ export default {
// }
// },
...
mapState
({
SSO
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
scrm
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
})
},
mounted
()
{
// 监听来自 iframe 的消息
window
.
addEventListener
(
"message"
,
(
event
)
=>
{
console
.
log
(
"收到 iframe 消息:"
,
event
.
data
)
if
(
event
.
data
.
type
===
"location-change"
)
{
console
.
log
(
"Iframe 地址已改变:"
,
event
.
data
.
url
)
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
this
.
handleIframeLocationChange
(
event
.
data
.
url
)
}
})
//
window.addEventListener("message", (event) => {
//
console.log("收到 iframe 消息:", event.data)
//
if (event.data.type === "location-change") {
//
console.log("Iframe 地址已改变:", event.data.url)
//
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
//
this.handleIframeLocationChange(event.data.url)
//
}
//
})
},
methods
:
{
handleIframeLocationChange
(
url
)
{
...
...
src/views/salepre/equitySummary.vue
View file @
a99ca89
...
...
@@ -17,7 +17,7 @@ export default {
return
{
// iframeSrc: 'https://oss-account-padtest.glsx.com.cn/customer/account',
iframeSrc
:
baseConfig
.
scrm
,
iframeUrl
:
"/
index.html
"
iframeUrl
:
"/
#/beforeSale/equitySummary
"
}
},
computed
:
{
...
...
@@ -58,19 +58,19 @@ export default {
// }
// },
...
mapState
({
SSO
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
scrm
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
})
},
mounted
()
{
// 监听来自 iframe 的消息
window
.
addEventListener
(
"message"
,
(
event
)
=>
{
console
.
log
(
"收到 iframe 消息:"
,
event
.
data
)
if
(
event
.
data
.
type
===
"location-change"
)
{
console
.
log
(
"Iframe 地址已改变:"
,
event
.
data
.
url
)
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
this
.
handleIframeLocationChange
(
event
.
data
.
url
)
}
})
//
window.addEventListener("message", (event) => {
//
console.log("收到 iframe 消息:", event.data)
//
if (event.data.type === "location-change") {
//
console.log("Iframe 地址已改变:", event.data.url)
//
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
//
this.handleIframeLocationChange(event.data.url)
//
}
//
})
},
methods
:
{
handleIframeLocationChange
(
url
)
{
...
...
src/views/salepre/index.vue
View file @
a99ca89
...
...
@@ -85,19 +85,19 @@ export default {
// }
// },
...
mapState
({
SSO
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
scrm
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
})
},
mounted
()
{
// 监听来自 iframe 的消息
window
.
addEventListener
(
"message"
,
(
event
)
=>
{
console
.
log
(
"收到 iframe 消息:"
,
event
.
data
)
if
(
event
.
data
.
type
===
"location-change"
)
{
console
.
log
(
"Iframe 地址已改变:"
,
event
.
data
.
url
)
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
this
.
handleIframeLocationChange
(
event
.
data
.
url
)
}
})
//
window.addEventListener("message", (event) => {
//
console.log("收到 iframe 消息:", event.data)
//
if (event.data.type === "location-change") {
//
console.log("Iframe 地址已改变:", event.data.url)
//
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
//
this.handleIframeLocationChange(event.data.url)
//
}
//
})
},
methods
:
{
handleIframeLocationChange
(
url
)
{
...
...
src/views/salepre/serviceConfig.vue
View file @
a99ca89
...
...
@@ -17,7 +17,7 @@ export default {
return
{
// iframeSrc: 'https://oss-account-padtest.glsx.com.cn/customer/account',
iframeSrc
:
baseConfig
.
scrm
,
iframeUrl
:
"/
index.html
"
iframeUrl
:
"/
#/serviceConfig/index
"
}
},
computed
:
{
...
...
@@ -58,19 +58,19 @@ export default {
// }
// },
...
mapState
({
SSO
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
scrm
Info
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
})
},
mounted
()
{
// 监听来自 iframe 的消息
window
.
addEventListener
(
"message"
,
(
event
)
=>
{
console
.
log
(
"收到 iframe 消息:"
,
event
.
data
)
if
(
event
.
data
.
type
===
"location-change"
)
{
console
.
log
(
"Iframe 地址已改变:"
,
event
.
data
.
url
)
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
this
.
handleIframeLocationChange
(
event
.
data
.
url
)
}
})
//
window.addEventListener("message", (event) => {
//
console.log("收到 iframe 消息:", event.data)
//
if (event.data.type === "location-change") {
//
console.log("Iframe 地址已改变:", event.data.url)
//
// 在这里可以执行其他操作,比如更新 iframe 的 src 属性
//
this.handleIframeLocationChange(event.data.url)
//
}
//
})
},
methods
:
{
handleIframeLocationChange
(
url
)
{
...
...
src/views/system/login/index.vue
View file @
a99ca89
...
...
@@ -217,6 +217,11 @@ export default {
hasReg
:
false
}
},
computed
:
{
...
mapState
({
scrmInfo
:
(
state
)
=>
state
.
d2admin
.
user
.
scrmInfo
})
},
created
()
{
this
.
systemName
=
this
.
baseConfig
.
sysName
||
"系统"
this
.
systemSubName
=
this
.
baseConfig
.
subName
||
"说明"
...
...
@@ -232,13 +237,15 @@ export default {
clearInterval
(
this
.
timeInterval
)
},
methods
:
{
// ...mapActions('d2admin/user', ['load', 'loadAcocunt', 'actionSetDownloadList']),
...
mapActions
({
login
:
"d2admin/account/login"
,
getAuth
:
"d2admin/account/getAuth"
,
current
:
"d2admin/page/currentGet"
,
initBaseData
:
"d2admin/base/init"
initBaseData
:
"d2admin/base/init"
,
actionSetScrmInfo
:
"d2admin/user/actionSetScrmInfo"
}),
...
mapActions
(
"d2admin/user"
,
[
"setScrmInfo"
]),
//
...mapActions("d2admin/user", ["setScrmInfo"]),
scrmLogin
()
{
// scrm 登录
scrmLogin
({
...
...
@@ -252,7 +259,7 @@ export default {
})
.
then
((
res
)
=>
{
const
{
sessionId
,
merchantId
}
=
res
.
loginList
[
0
]
this
.
s
etScrmInfo
({
sessionId
,
merchantId
})
this
.
actionS
etScrmInfo
({
sessionId
,
merchantId
})
console
.
log
(
res
)
})
.
catch
((
err
)
=>
{
...
...
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