Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 7720e48d
authored
Sep 12, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
平板配置接口
1 parent
ae12efc0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
172 additions
and
130 deletions
public/menuIcon/packageConfig.png
src/api/contentManager.js
src/api/request.js
src/views/contentManager/packageConfig/components/addDialog.vue
src/views/contentManager/packageConfig/edit.vue
src/views/contentManager/packageConfig/index.vue
public/menuIcon/packageConfig.png
0 → 100644
View file @
7720e48
356 Bytes
src/api/contentManager.js
View file @
7720e48
...
@@ -101,3 +101,20 @@ export function contentManagerTaskById(data) {
...
@@ -101,3 +101,20 @@ export function contentManagerTaskById(data) {
data
.
method
=
`dj.api.smartcarlife.contentManagerTask.getById`
data
.
method
=
`dj.api.smartcarlife.contentManagerTask.getById`
return
request
(
data
,
"POST"
)
return
request
(
data
,
"POST"
)
}
}
// 查询接待素材商户配置
export
function
materialPage
(
data
)
{
data
.
method
=
`dj.api.smartcarlife.recepiton.material.page`
return
request
(
data
,
"POST"
,
[],
""
,
"/rop-dj-car-boutique/router"
)
}
// 查询门店接待素材详情
export
function
materialDetail
(
data
)
{
data
.
method
=
`dj.api.smartcarlife.recepiton.material.merchant.detail`
return
request
(
data
,
"POST"
,
[],
""
,
"/rop-dj-car-boutique/router"
)
}
// 保存更新门店接待素材
export
function
recepitonUpdate
(
data
)
{
data
.
method
=
`dj.api.smartcarlife.recepiton.material.merchant.saveOrUpdate`
return
request
(
data
,
"POST"
,
[],
""
,
"/rop-dj-car-boutique/router"
)
}
src/api/request.js
View file @
7720e48
/*
/*
* @Author: limin
* @Author: limin
* @Date: 2019-08-26 18:02:41
* @Date: 2019-08-26 18:02:41
* @Last Modified by: chenwq
* @Last Modified by: chenwq
* @Last Modified time: 2021-06-30 14:30:41
* @Last Modified time: 2021-06-30 14:30:41
*/
*/
// import axios from "@/plugin/axios"
// import axios from "@/plugin/axios"
import
axios
from
"@/plugin/axios/index_code"
import
axios
from
"@/plugin/axios/index_code"
import
sign
from
"./sign"
import
sign
from
"./sign"
import
RequestMethods
from
"./request.methods"
import
RequestMethods
from
"./request.methods"
import
util
from
"@/libs/util.js"
import
util
from
"@/libs/util.js"
import
{
baseConfig
}
from
"@/main"
import
{
baseConfig
}
from
"@/main"
import
axiosPackage
from
"axios"
import
axiosPackage
from
"axios"
const
request
=
(
const
request
=
(
params
=
{},
params
=
{},
method
=
RequestMethods
.
GET
,
method
=
RequestMethods
.
GET
,
noSignAttr
=
[],
noSignAttr
=
[],
options
options
,
)
=>
{
rop
// 兼容线上dj和scrm appkey和secret不一样的情况
)
=>
{
let
apiName
=
""
// 兼容线上dj和scrm appkey和secret不一样的情况
if
(
params
.
method
.
includes
(
"dj"
))
{
let
apiName
=
""
apiName
=
"dj"
if
(
params
.
method
.
includes
(
"dj"
))
{
}
else
{
apiName
=
"dj"
apiName
=
params
.
method
.
split
(
".api"
)[
0
]
}
else
{
}
apiName
=
params
.
method
.
split
(
".api"
)[
0
]
}
// 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"
)
if
(
!
apiName
)
{
}
throw
new
Error
(
"apiName is null"
)
const
mappingName
=
{
}
"dj.smartcarlife"
:
"axios"
,
const
mappingName
=
{
dj
:
"axios"
,
"dj.smartcarlife"
:
"axios"
,
scrm
:
"axios2"
,
dj
:
"axios"
,
merchants
:
"axios3"
,
scrm
:
"axios2"
,
reportExport
:
"axios4"
,
merchants
:
"axios3"
,
"glsx.accounts.biz.common.pictureUpload"
:
"common"
reportExport
:
"axios4"
,
}
"glsx.accounts.biz.common.pictureUpload"
:
"common"
const
baseApiName
=
mappingName
[
apiName
]
}
// console.log(baseApiName, "baseApiName")
const
baseApiName
=
mappingName
[
apiName
]
// params.appKey = baseConfig[baseApiName].appkey
// console.log(baseApiName, "baseApiName")
if
(
baseApiName
==
"common"
)
{
// params.appKey = baseConfig[baseApiName].appkey
params
.
app_key
=
baseConfig
[
baseApiName
].
appkey
if
(
baseApiName
==
"common"
)
{
}
else
{
params
.
app_key
=
baseConfig
[
baseApiName
].
appkey
params
.
appKey
=
baseConfig
[
baseApiName
].
appkey
}
else
{
}
params
.
appKey
=
baseConfig
[
baseApiName
].
appkey
// console.log("params.appKey", params.appKey)
}
params
.
timestamp
=
new
Date
().
getTime
()
// console.log("params.appKey", params.appKey)
params
.
v
=
"1.0.0"
params
.
timestamp
=
new
Date
().
getTime
()
params
.
format
=
"json"
params
.
v
=
"1.0.0"
params
.
locale
=
"zh_CN"
params
.
format
=
"json"
if
(
params
.
method
!==
"dj.api.user.login"
)
{
params
.
locale
=
"zh_CN"
params
.
sessionId
=
util
.
cookies
.
get
(
"token"
)
if
(
params
.
method
!==
"dj.api.user.login"
)
{
}
params
.
sessionId
=
util
.
cookies
.
get
(
"token"
)
/**
}
* mock - url = params.method
/**
* 调后端接口 - url = ''
* mock - url = params.method
*/
* 调后端接口 - url = ''
const
url
=
baseConfig
[
baseApiName
].
baseURL
*/
// const url = "/api"
let
url
=
baseConfig
[
baseApiName
].
baseURL
/**
console
.
log
(
url
,
"url"
,
rop
)
* 调后端接口,请使用以下代码。
if
(
rop
)
{
*/
url
=
url
.
replace
(
/
\/[^\/]
+
\/[^\/]
+$/
,
rop
)
const
signWay
=
{
}
"dj.smartcarlife"
:
"sha1"
,
// const url = "/api"
dj
:
"sha1"
,
/**
scrm
:
"sha1"
,
* 调后端接口,请使用以下代码。
glsx
:
"md5"
,
*/
"glsx.accounts.biz.common.pictureUpload"
:
"md5"
const
signWay
=
{
}
"dj.smartcarlife"
:
"sha1"
,
// console.log(signWay[apiName], "baseApiName")
dj
:
"sha1"
,
const
secret
=
baseConfig
[
baseApiName
].
secret
scrm
:
"sha1"
,
const
CancelToken
=
axiosPackage
.
CancelToken
glsx
:
"md5"
,
var
reqData
=
"glsx.accounts.biz.common.pictureUpload"
:
"md5"
method
===
RequestMethods
.
POST
}
?
{
// console.log(signWay[apiName], "baseApiName")
baseURL
:
"/"
,
const
secret
=
baseConfig
[
baseApiName
].
secret
data
:
sign
(
params
,
noSignAttr
,
secret
,
signWay
[
apiName
])
const
CancelToken
=
axiosPackage
.
CancelToken
}
var
reqData
=
:
{
params
:
sign
(
params
,
noSignAttr
,
secret
,
signWay
[
apiName
])
}
method
===
RequestMethods
.
POST
reqData
=
reqData
=
Object
.
assign
(
reqData
,
options
,
{})
?
{
// 请求进度
baseURL
:
"/"
,
if
(
params
?.
onProcess
)
{
data
:
sign
(
params
,
noSignAttr
,
secret
,
signWay
[
apiName
])
reqData
.
onUploadProgress
=
params
.
onProcess
}
}
:
{
params
:
sign
(
params
,
noSignAttr
,
secret
,
signWay
[
apiName
])
}
// 取消请求
reqData
=
reqData
=
Object
.
assign
(
reqData
,
options
,
{})
if
(
params
?.
cancelFun
)
{
// 请求进度
reqData
.
cancelToken
=
new
CancelToken
(
function
excutor
(
c
)
{
if
(
params
?.
onProcess
)
{
params
.
cancelFun
.
cancel
=
c
reqData
.
onUploadProgress
=
params
.
onProcess
})
}
}
// 取消请求
// console.log(method === RequestMethods.POST)
if
(
params
?.
cancelFun
)
{
// console.log(url)
reqData
.
cancelToken
=
new
CancelToken
(
function
excutor
(
c
)
{
// console.log(options)
params
.
cancelFun
.
cancel
=
c
// console.log(reqData)
})
return
axios
({
}
url
,
// console.log(method === RequestMethods.POST)
method
,
// console.log(url)
...
reqData
// console.log(options)
})
// console.log(reqData)
return
axios
({
/**
url
,
* mock,请使用以下代码。
method
,
*/
...
reqData
// return axios({
})
// url,
// method,
/**
// params: sign(params, noSignAttr)
* mock,请使用以下代码。
// })
*/
}
// return axios({
export
default
request
// url,
// method,
// params: sign(params, noSignAttr)
// })
}
export
default
request
src/views/contentManager/packageConfig/components/addDialog.vue
View file @
7720e48
<!--
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-09-06 09:49:46
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2024-09-12 13:51:32
* @FilePath: \dj-car-life-system\src\views\contentManager\packageConfig\components\addDialog.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 月度库存结算单弹窗 -->
<!-- 月度库存结算单弹窗 -->
<
template
>
<
template
>
<d2-dialog
<d2-dialog
...
@@ -13,38 +21,41 @@
...
@@ -13,38 +21,41 @@
</div>
</div>
<el-select
<el-select
class=
"form-select"
class=
"form-select"
v-model=
"formData.
scene
"
v-model=
"formData.
merchantId
"
placeholder=
"请选择"
placeholder=
"请选择"
>
>
<el-option
<el-option
v-for=
"(i, indx) in
scene
List"
v-for=
"(i, indx) in
merchant
List"
:key=
"i
ndx
"
:key=
"i
.merchantId
"
:label=
"i.
label
"
:label=
"i.
merchantName
"
:value=
"i.
i
d"
:value=
"i.
merchantI
d"
></el-option>
></el-option>
</el-select>
</el-select>
</d2-dialog>
</d2-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
recepitonUpdate
}
from
"@api/contentManager"
export
default
{
export
default
{
name
:
"addDialog"
,
name
:
"addDialog"
,
data
()
{
data
()
{
return
{
return
{
sceneList
:
[
{
label
:
"1"
,
id
:
"1"
}
],
formData
:
{}
formData
:
{}
}
}
},
},
props
:
{
props
:
{
dialogVisible
:
Boolean
dialogVisible
:
Boolean
,
merchantList
:
{
type
:
Object
,
default
:
()
=>
[]
}
},
},
methods
:
{
methods
:
{
handleConfirm
()
{
handleConfirm
()
{
const
{
merchantId
}
=
this
.
formData
recepitonUpdate
({
merchantId
}).
then
((
res
)
=>
{
console
.
log
(
res
)
})
this
.
handleClose
()
this
.
handleClose
()
},
},
handleClose
()
{
handleClose
()
{
...
...
src/views/contentManager/packageConfig/edit.vue
View file @
7720e48
This diff is collapsed.
Click to expand it.
src/views/contentManager/packageConfig/index.vue
View file @
7720e48
...
@@ -43,6 +43,7 @@
...
@@ -43,6 +43,7 @@
<add-dialog
<add-dialog
:dialogVisible=
"dialogVisible"
:dialogVisible=
"dialogVisible"
v-if=
"dialogVisible"
v-if=
"dialogVisible"
:merchantList=
"merchantList"
@
dialogClose=
"addDialogClose"
@
dialogClose=
"addDialogClose"
/>
/>
</div>
</div>
...
@@ -50,7 +51,7 @@
...
@@ -50,7 +51,7 @@
<
script
>
<
script
>
import
{
deepClone
}
from
"@/common/util"
import
{
deepClone
}
from
"@/common/util"
import
{
contentManagerTaskPage
}
from
"@api/contentManager"
import
{
materialPage
,
getMerchantList
}
from
"@api/contentManager"
import
addDialog
from
"./components/addDialog"
import
addDialog
from
"./components/addDialog"
export
default
{
export
default
{
name
:
"StaffMassSendingIndex"
,
name
:
"StaffMassSendingIndex"
,
...
@@ -83,7 +84,7 @@ export default {
...
@@ -83,7 +84,7 @@ export default {
isClear
:
true
isClear
:
true
}
}
],
],
getListApi
:
contentManagerTask
Page
,
getListApi
:
material
Page
,
tableParams
:
{
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
"list"
,
listName
:
"list"
,
...
@@ -116,8 +117,16 @@ export default {
...
@@ -116,8 +117,16 @@ export default {
}
}
}
}
},
},
mounted
()
{
this
.
getMerchantList
()
},
methods
:
{
methods
:
{
getMerchantList
()
{
var
params
=
{
currentPage
:
1
,
pageSize
:
2000
}
getMerchantList
(
params
).
then
((
res
)
=>
{
this
.
merchantList
=
res
||
[]
})
},
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
this
.
searchFormSearch
=
deepClone
(
this
.
searchForm
)
this
.
searchFormSearch
=
deepClone
(
this
.
searchForm
)
...
...
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