Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8efffc8c
authored
Jan 21, 2026
by
Jaxon
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev/service-center' into 'SAAS+V5.6.0'
上线合并 See merge request
!475
2 parents
204d6b8a
d98e3f9a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
192 additions
and
176 deletions
api/serviceCenter/index.js
config.js
packageEquity/pages/index/index.js
tabWorkOrder/pages/serviceCenter/pages/serviceNoticeList/serviceNoticeList.js
utils/request/request.js
api/serviceCenter/index.js
View file @
8efffc8
...
...
@@ -62,7 +62,7 @@ import api from "~/utils/request/request.js";
* @returns {Promise<{code: string, errId: string, message?: string, data?: RpcPagination}>} 返回公司公告分页数据
*/
export
function
getCompanyNoticeList
(
data
=
{
pageNum
:
1
,
pageSize
:
10
})
{
return
api
.
post
(
"dj.pad.api.new.pad.message.box.page"
,
data
);
return
api
.
getApiFoxMock
(
"dj.pad.api.new.pad.message.box.page"
,
data
);
}
/**
...
...
config.js
View file @
8efffc8
...
...
@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 5cdptest
*/
let
index
=
2
;
let
index
=
1
;
const
accountInfo
=
wx
.
getAccountInfoSync
();
const
systemInfo
=
wx
.
getSystemInfoSync
();
const
envName
=
accountInfo
.
miniProgram
.
envVersion
;
...
...
packageEquity/pages/index/index.js
View file @
8efffc8
...
...
@@ -7,7 +7,16 @@ import { getWaitAuditCountAPI, waitstaffstateAPI, getStaffTemplate } from "~/api
import
dayjs
from
"dayjs"
;
import
{
getCompanyNoticeList
}
from
"~/api/serviceCenter/index.js"
;
import
{
dialogOptions
,
noticeSort
}
from
"./constant.js"
;
import
Dialog
from
"@vant/weapp/dialog/dialog"
;
// import api from '~/packageCrowdFunding/api'
import
NP
from
"number-precision"
;
import
{
getBusinessSchoolScene
}
from
"~/store/index"
;
import
{
getQuotationStatistics
,
outputValueStatistics
,
quotationPage
,
updateOrderStatus
,
merchantMode
,
orderStaffValid
}
from
"../../api"
;
import
commonApi
from
"~/api/api"
;
import
carLifeApi
from
"../../carEquityApi"
;
import
reportPageTrackMixin
from
"~/mixins/reportPageTrackMixin"
;
const
app
=
getApp
();
let
lastPath
=
null
;
// 用于存储上一次的路径
function
throttle
(
func
,
delay
)
{
let
timeoutId
;
...
...
@@ -39,14 +48,7 @@ function throttle(func, delay) {
}
const
IMG_URL
=
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/"
;
// import api from '~/packageCrowdFunding/api'
import
NP
from
"number-precision"
;
import
{
getBusinessSchoolScene
}
from
"~/store/index"
;
import
{
getQuotationStatistics
,
outputValueStatistics
,
quotationPage
,
updateOrderStatus
,
merchantMode
,
orderStaffValid
}
from
"../../api"
;
import
commonApi
from
"~/api/api"
;
const
app
=
getApp
();
import
carLifeApi
from
"../../carEquityApi"
;
import
reportPageTrackMixin
from
"~/mixins/reportPageTrackMixin"
;
Component
({
behaviors
:
[
reportPageTrackMixin
],
/**
...
...
@@ -262,6 +264,9 @@ Component({
* 组件的方法列表
*/
methods
:
{
handleNavigateServiceCenter
(
e
)
{
wx
.
$router
.
go
(
"tabWorkOrder.serviceNoticeList"
);
},
onReportPopupCancel
()
{
this
.
setData
({
showReportPopup
:
false
,
...
...
tabWorkOrder/pages/serviceCenter/pages/serviceNoticeList/serviceNoticeList.js
View file @
8efffc8
...
...
@@ -14,14 +14,17 @@ Page({
tabPath
:
{
[
ServerCenterEnum
.
companyNotice
]:
{
path
:
"tabWorkOrder.companyNoticeDetail"
,
// api参数
params
:
{},
},
[
ServerCenterEnum
.
longCourse
]:
{
path
:
"tabWorkOrder.longCourseNoticeDetail"
,
// api参数
params
:
{},
},
[
ServerCenterEnum
.
case
]:
{
path
:
"tabWorkOrder.caseDetail"
,
// api参数
params
:
{},
},
},
...
...
@@ -44,7 +47,7 @@ Page({
});
},
handleTapItem
(
e
)
{
wx
.
$router
.
go
(
this
.
data
.
tabPath
[
e
?.
detail
?.
type
||
0
],
{
wx
.
$router
.
go
(
this
.
data
.
tabPath
[
e
?.
detail
?.
type
||
0
]
.
path
,
{
id
:
e
?.
detail
?.
item
,
});
},
...
...
@@ -53,7 +56,7 @@ Page({
},
async
onLoad
(
options
)
{
await
getCompanyNoticeList
({
pageNum
:
1
,
pageSize
:
15
});
await
getCompanyNoticeList
({
pageNum
:
1
,
pageSize
:
15
,
moduleType
:
8
});
},
onRoute
(
options
)
{},
...
...
utils/request/request.js
View file @
8efffc8
import
{
secretKey
,
domain
,
path
,
sign
}
from
'./http.js'
// console.log(secretKey, 'secretKey')
import
util
from
'~/utils/util.js'
import
{
envIndex
}
from
'~/config'
import
qs
from
'~/utils/lib/qs'
/**接口 */
class
Request
{
get
(
method
,
data
,
noSignAttr
,
requestPath
,
domainName
,
failTips
)
{
return
this
.
request
(
'GET'
,
method
,
data
,
noSignAttr
,
requestPath
,
domainName
,
failTips
)
}
post
(
method
,
data
,
noSignAttr
,
requestPath
,
domainName
,
failTips
)
{
return
this
.
request
(
'POST'
,
method
,
data
,
noSignAttr
,
requestPath
,
domainName
,
failTips
)
}
request
(
RequestMethods
,
method
,
data
,
noSignAttr
=
[],
requestPath
,
domainName
=
'dj'
,
failTips
=
true
)
{
let
_this
=
this
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
showNavigationBarLoading
()
wx
.
getNetworkType
({
success
(
res
)
{
if
(
res
.
networkType
==
"none"
)
{
wx
.
hideLoading
();
wx
.
showToast
({
title
:
'网络异常'
,
icon
:
"none"
,
})
return
;
}
if
(
!
data
)
data
=
{}
let
header
=
RequestMethods
===
'POST'
?
{
'content-type'
:
'application/x-www-form-urlencoded'
}
:
{};
let
url
=
`
${
domain
[
domainName
]}${
requestPath
||
path
}
`
;
// console.log(requestPath)
if
(
method
)
{
data
=
_this
.
getData
(
data
,
method
,
noSignAttr
,
domainName
==
'merchants'
)
url
=
`
${
domain
[
domainName
]}${
requestPath
||
path
}
?method=
${
method
}
`
;
}
else
{
header
=
{
'content-type'
:
'application/json'
}
}
// console.log('reqData',data?.sessionId);
// delete
// if (data?.sessionId) {
// delete data?.sessionId
// }
wx
.
request
({
url
,
data
,
method
:
RequestMethods
,
header
,
dataType
:
'json'
,
responseType
:
'text'
,
timeout
:
noSignAttr
?.
includes
(
'file'
)
?
120
*
1000
:
60
*
1000
,
success
(
response
)
{
/**业务代码 */
let
{
data
:
{
code
,
message
,
subErrors
},
data
}
=
response
if
(
code
==
20
||
code
==
21
)
{
let
thisPage
=
wx
.
$router
.
getPageInstance
()
// console.log(thisPage);
wx
.
hideLoading
()
if
(
thisPage
.
route
!=
'pages/wxLogin/wxLogin'
)
{
getApp
().
login
(
true
,
''
,
url
)
}
}
else
if
(
code
==
-
1
)
{
wx
.
showToast
({
title
:
message
||
'网络请求失败'
,
icon
:
'none'
})
resolve
(
data
)
}
else
{
// util.debounce( getApp().test(true),500)
// getApp().test()
// console.log(data,'data');
resolve
(
data
)
}
},
fail
(
error
)
{
wx
.
hideLoading
()
console
.
error
(
`接口异常:
${
domain
[
domainName
]}${
requestPath
||
path
}
?method=
${
method
}
`
,
error
)
if
(
failTips
)
{
wx
.
showToast
({
title
:
'系统异常'
,
icon
:
'error'
})
}
reject
(
error
)
},
complete
()
{
wx
.
stopPullDownRefresh
()
wx
.
hideNavigationBarLoading
()
}
})
}
})
})
}
getData
(
data
,
method
,
noSignAttr
,
merchant
)
{
let
sessionId
=
util
.
getSessionId
()
if
(
sessionId
)
data
[
'sessionId'
]
=
sessionId
// console.log(data,'request');
data
[
'v'
]
=
'1.0.0'
data
[
'method'
]
=
method
data
[
'format'
]
=
'json'
data
[
'locale'
]
=
'zh_CN'
data
[
'source'
]
=
'dj-wechat'
// 兼容线上dj和scrm appkey和secret不一样的情况
let
apiName
=
data
.
method
.
split
(
'.api'
)[
0
]
// 为空报错
if
(
!
apiName
)
{
throw
new
Error
(
'apiName is null'
)
}
if
(
apiName
.
split
(
'.'
).
length
>
1
)
apiName
=
apiName
.
split
(
'.'
)[
0
]
if
(
merchant
)
apiName
=
'merchants'
const
appKey
=
secretKey
[
apiName
].
appKey
const
secret
=
secretKey
[
apiName
].
secret
data
[
'appKey'
]
=
appKey
let
obj
=
sign
(
data
,
secret
,
noSignAttr
)
//data['sign'] = obj.sign;
return
obj
}
getMock
(
configModule
=
'dj-car-boutique-work-wechat-miniapp'
)
{
const
env
=
{
'1'
:
'develop'
,
'2'
:
'test'
,
'3'
:
'production'
,
'4'
:
'beta'
}
[
envIndex
],
configUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
configModule
}
&env=
${
env
}
`
return
new
Promise
(
resolve
=>
{
wx
.
request
({
url
:
configUrl
,
data
:
{},
method
:
'GET'
,
header
:
{},
dataType
:
'json'
,
responseType
:
'text'
,
success
(
response
)
{
resolve
(
response
.
data
)
}
})
})
}
}
export
default
new
Request
()
\ No newline at end of file
import
{
secretKey
,
domain
,
path
,
sign
}
from
"./http.js"
;
// console.log(secretKey, 'secretKey')
import
util
from
"~/utils/util.js"
;
import
{
envIndex
}
from
"~/config"
;
import
qs
from
"~/utils/lib/qs"
;
/**接口 */
class
Request
{
get
(
method
,
data
,
noSignAttr
,
requestPath
,
domainName
,
failTips
)
{
return
this
.
request
(
"GET"
,
method
,
data
,
noSignAttr
,
requestPath
,
domainName
,
failTips
);
}
post
(
method
,
data
,
noSignAttr
,
requestPath
,
domainName
,
failTips
)
{
return
this
.
request
(
"POST"
,
method
,
data
,
noSignAttr
,
requestPath
,
domainName
,
failTips
);
}
request
(
RequestMethods
,
method
,
data
,
noSignAttr
=
[],
requestPath
,
domainName
=
"dj"
,
failTips
=
true
)
{
let
_this
=
this
;
return
new
Promise
((
resolve
,
reject
)
=>
{
wx
.
showNavigationBarLoading
();
wx
.
getNetworkType
({
success
(
res
)
{
if
(
res
.
networkType
==
"none"
)
{
wx
.
hideLoading
();
wx
.
showToast
({
title
:
"网络异常"
,
icon
:
"none"
,
});
return
;
}
if
(
!
data
)
data
=
{};
let
header
=
RequestMethods
===
"POST"
?
{
"content-type"
:
"application/x-www-form-urlencoded"
,
}
:
{};
let
url
=
`
${
domain
[
domainName
]}${
requestPath
||
path
}
`
;
// console.log(requestPath)
if
(
method
)
{
data
=
_this
.
getData
(
data
,
method
,
noSignAttr
,
domainName
==
"merchants"
);
url
=
`
${
domain
[
domainName
]}${
requestPath
||
path
}
?method=
${
method
}
`
;
}
else
{
header
=
{
"content-type"
:
"application/json"
,
};
}
// console.log('reqData',data?.sessionId);
// delete
// if (data?.sessionId) {
// delete data?.sessionId
// }
wx
.
request
({
url
,
data
,
method
:
RequestMethods
,
header
,
dataType
:
"json"
,
responseType
:
"text"
,
timeout
:
noSignAttr
?.
includes
(
"file"
)
?
120
*
1000
:
60
*
1000
,
success
(
response
)
{
/**业务代码 */
let
{
data
:
{
code
,
message
,
subErrors
},
data
,
}
=
response
;
if
(
code
==
20
||
code
==
21
)
{
let
thisPage
=
wx
.
$router
.
getPageInstance
();
// console.log(thisPage);
wx
.
hideLoading
();
if
(
thisPage
.
route
!=
"pages/wxLogin/wxLogin"
)
{
getApp
().
login
(
true
,
""
,
url
);
}
}
else
if
(
code
==
-
1
)
{
wx
.
showToast
({
title
:
message
||
"网络请求失败"
,
icon
:
"none"
,
});
resolve
(
data
);
}
else
{
// util.debounce( getApp().test(true),500)
// getApp().test()
// console.log(data,'data');
resolve
(
data
);
}
},
fail
(
error
)
{
wx
.
hideLoading
();
console
.
error
(
`接口异常:
${
domain
[
domainName
]}${
requestPath
||
path
}
?method=
${
method
}
`
,
error
);
if
(
failTips
)
{
wx
.
showToast
({
title
:
"系统异常"
,
icon
:
"error"
,
});
}
reject
(
error
);
},
complete
()
{
wx
.
stopPullDownRefresh
();
wx
.
hideNavigationBarLoading
();
},
});
},
});
});
}
getData
(
data
,
method
,
noSignAttr
,
merchant
)
{
let
sessionId
=
util
.
getSessionId
();
if
(
sessionId
)
data
[
"sessionId"
]
=
sessionId
;
// console.log(data,'request');
data
[
"v"
]
=
"1.0.0"
;
data
[
"method"
]
=
method
;
data
[
"format"
]
=
"json"
;
data
[
"locale"
]
=
"zh_CN"
;
data
[
"source"
]
=
"dj-wechat"
;
// 兼容线上dj和scrm appkey和secret不一样的情况
let
apiName
=
data
.
method
.
split
(
".api"
)[
0
];
// 为空报错
if
(
!
apiName
)
{
throw
new
Error
(
"apiName is null"
);
}
if
(
apiName
.
split
(
"."
).
length
>
1
)
apiName
=
apiName
.
split
(
"."
)[
0
];
if
(
merchant
)
apiName
=
"merchants"
;
const
appKey
=
secretKey
[
apiName
].
appKey
;
const
secret
=
secretKey
[
apiName
].
secret
;
data
[
"appKey"
]
=
appKey
;
let
obj
=
sign
(
data
,
secret
,
noSignAttr
);
//data['sign'] = obj.sign;
return
obj
;
}
getMock
(
configModule
=
"dj-car-boutique-work-wechat-miniapp"
)
{
const
env
=
{
1
:
"develop"
,
2
:
"test"
,
3
:
"production"
,
4
:
"beta"
,
}[
envIndex
],
configUrl
=
`https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=
${
configModule
}
&env=
${
env
}
`
;
return
new
Promise
((
resolve
)
=>
{
wx
.
request
({
url
:
configUrl
,
data
:
{},
method
:
"GET"
,
header
:
{},
dataType
:
"json"
,
responseType
:
"text"
,
success
(
response
)
{
resolve
(
response
.
data
);
},
});
});
}
getApiFoxMock
(
method
,
params
)
{
return
new
Promise
((
resolve
)
=>
{
wx
.
request
({
url
:
`http://127.0.0.1:4523/m1/7739320-7483460-default/rop-scrm-clue/router?method=
${
method
}
`
,
data
:
params
,
method
:
"post"
,
header
:
{
"content-type"
:
"application/x-www-form-urlencoded"
,
},
dataType
:
"json"
,
responseType
:
"text"
,
success
(
response
)
{
resolve
(
response
.
data
);
},
});
});
}
}
export
default
new
Request
();
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