Commit 75ea20e7 by Lin

feat: 接待中心及表单

1 parent b44c1ba7
...@@ -26,3 +26,82 @@ export async function searchRecordingEndTime(params: UTSJSONObject): Promise<str ...@@ -26,3 +26,82 @@ export async function searchRecordingEndTime(params: UTSJSONObject): Promise<str
// console.log("🚀 ~ getToken ~ d:", d) // console.log("🚀 ~ getToken ~ d:", d)
return d as Promise<string>; return d as Promise<string>;
} }
export async function getMerchantPerformance(params: UTSJSONObject): Promise<any> {
const data: UTSJSONObject = {
projectName: 'boutique',
...params
}
return await http.fetch("dj.api.car.boutique.inspection.findMerchantPerformance", data, true, "dj")
}
/** 查询当前门店客户档案列表(预录列表) */
export async function getCustomerFileList(params: UTSJSONObject): Promise<any> {
const data: UTSJSONObject = {
projectName: 'boutique',
...params
}
return await http.fetch("dj.api.smartcarlife.customervisits.customerInfoPage", data, true, "dj")
}
/**ҵ������ */
// getMerchantPerformance(data){
// return http.post({
// method: 'dj.api.car.boutique.inspection.findMerchantPerformance',
// projectName: 'boutique',
// ...data
// })
// },
// 传参
// {
// "merchantIdList": 44218339,
// "sceneType": 1,
// "startDate": "2026-03-01",
// "endDate": "2026-03-31",
// "hmzxFlag": 3
// }
// /** 查询接待记录列表 */
// getReceptionList(data) {
// return http.post({
// method: 'dj.api.smartcarlife.reception.customer.page',
// projectName: 'boutique',
// ...data
// })
// {
// "merchantId": 44218339,
// "pageNum": 1,
// "pageSize": 10,
// "reviewFlag": 0,
// "orderFinishFlag": 0,
// "bussinessType": 2
// }
/**查询当前门店客户档案列表 */
// getCustomerFileList (data) {
// return http.post({
// method: 'dj.api.smartcarlife.customervisits.customerInfoPage',
// projectName: 'boutique',
// ...data
// })
// },
// 预录列表传参
// {
// "pageNum": 1,
// "pageSize": 10,
// "receptionStatus": 1,
// "merchantId": 44218339,
// "bussinessScene": 2,
// "startTime": "2026-03-18 00:00:00",
// "endTime": "2026-03-18 23:59:59"
// }
// },
// /** 接待统计 */
// getReceptionStatistics(data) {
// return http.post({
// method: 'dj.api.smartcarlife.reception.customer.statistics',
// projectName: 'boutique',
// ...data
// })
// },
\ No newline at end of file \ No newline at end of file
...@@ -97,7 +97,8 @@ class Request { ...@@ -97,7 +97,8 @@ class Request {
secret = djKey.secret as string; secret = djKey.secret as string;
} }
const sessionId = storage.get("sessionId") as null | string; const rawSessionId = storage.get("sessionId");
const sessionId = (rawSessionId != null && rawSessionId != "") ? `${rawSessionId}` : null;
let noSignAttr: string[] = []; let noSignAttr: string[] = [];
if (params.sessionId == null && sessionId != null && sessionId != "") { if (params.sessionId == null && sessionId != null && sessionId != "") {
...@@ -171,19 +172,29 @@ class Request { ...@@ -171,19 +172,29 @@ class Request {
const path = pathEnum[projectName] ?? ""; const path = pathEnum[projectName] ?? "";
const requestData = this.getData(params, finalHostType); const requestData = this.getData(params, finalHostType);
// 手动序列化成 application/x-www-form-urlencoded 格式,避免 Android 原生层类型转换问题 // Android 原生层对 data 类型敏感:传 string 可能触发 ClassCastException
const formPairs: string[] = []; // 改为传 UTSJSONObject(全 string 值),由框架序列化为 form-urlencoded
const formDataObj: UTSJSONObject = {};
for (const key in requestData) { for (const key in requestData) {
const val = requestData[key]; const val = requestData[key];
if (val != null) { if (val != null) {
formPairs.push(`${key}=${encodeURIComponent(`${val}`)}`); let valStr: string;
if (typeof val === "string") {
valStr = val;
} else if (typeof val === "number" || typeof val === "boolean") {
valStr = `${val}`;
} else {
valStr = JSON.stringify(val);
}
formDataObj[key] = valStr;
} }
} }
const formData = formPairs.join("&");
const hostUrl = HOST[finalHostType] as string; const hostUrl = HOST[finalHostType] as string;
const pathStr = (path != null && path != "") ? `${path}` : "";
const methodStr = (requestData.method != null && requestData.method != "") ? `${requestData.method}` : "";
uni.request({ uni.request({
url: `${hostUrl}${path}router?method=${requestData.method}`, url: `${hostUrl}${pathStr}router?method=${methodStr}`,
data: formData, data: formDataObj,
method: requestMethod, method: requestMethod,
header, header,
dataType: "json", dataType: "json",
......
...@@ -52,11 +52,13 @@ export async function apiSelectAccountLogin(params: UTSJSONObject): Promise<UTSJ ...@@ -52,11 +52,13 @@ export async function apiSelectAccountLogin(params: UTSJSONObject): Promise<UTSJ
// 获取园区店下的4S店:dj.api.scenemerchantref.query4SRefByYqShopByLogin // 获取园区店下的4S店:dj.api.scenemerchantref.query4SRefByYqShopByLogin
export async function apiGetSceneMerchantRefStoreList(params: UTSJSONObject): Promise<any> { export async function apiGetSceneMerchantRefStoreList(params: UTSJSONObject): Promise<any> {
console.log("🚀 ~ 取园区店下的4S店 ~ params:", params)
const data: UTSJSONObject = { const data: UTSJSONObject = {
projectName: 'boutique', projectName: 'boutique',
method: 'dj.api.scenemerchantref.query4SRefByYqShopByLogin', method: 'dj.api.scenemerchantref.query4SRefByYqShopByLogin',
...params ...params
} }
console.log("🚀 ~ 取园区店下的4S店 ~ params:", data)
return await http.post(data, true, 'dj', null) return await http.post(data, true, 'dj', null)
} }
......
...@@ -66,7 +66,8 @@ ...@@ -66,7 +66,8 @@
"^no-data$": "@/pages/common/components/NoData.uvue", "^no-data$": "@/pages/common/components/NoData.uvue",
"^home-frame$": "@/components/HomeFrame/index.uvue", "^home-frame$": "@/components/HomeFrame/index.uvue",
"^layout-root$": "@/components/LayoutRoot/index.uvue", "^layout-root$": "@/components/LayoutRoot/index.uvue",
"^Layout$": "@/components/Layout/index.uvue" "^Layout$": "@/components/Layout/index.uvue",
"^segment-tab$": "@/components/HomeFrame/ReceptionCenter/SegmentTab.uvue"
} }
}, },
"globalStyle": { "globalStyle": {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!