diff --git a/src/api/wallet/wallet-transaction.ts b/src/api/wallet/wallet-transaction.ts index e4c58d3..479deca 100644 --- a/src/api/wallet/wallet-transaction.ts +++ b/src/api/wallet/wallet-transaction.ts @@ -15,6 +15,14 @@ export function pageTh(query?: any) { }) } +export function thTotal(data?: any) { + return request({ + url: "/wallet/wallet-transaction/th-total", + method: "post", + data: data, + }) +} + export function pageCz(query?: any) { return request({ url: "/wallet/wallet-transaction/page-cz", @@ -27,6 +35,14 @@ export function pageCz(query?: any) { }) } +export function czTotal(data?: any) { + return request({ + url: "/wallet/wallet-transaction/cz-total", + method: "post", + data: data, + }) +} + export function pageJz(query?: any) { return request({ url: "/wallet/wallet-transaction/page-jz", @@ -39,6 +55,14 @@ export function pageJz(query?: any) { }) } +export function jzTotal(data?: any) { + return request({ + url: "/wallet/wallet-transaction/jz-total", + method: "post", + data: data, + }) +} + export function pageXf(query?: any) { return request({ url: "/wallet/wallet-transaction/page-xf", @@ -51,6 +75,14 @@ export function pageXf(query?: any) { }) } +export function xfTotal(data: any) { + return request({ + url: "/wallet/wallet-transaction/xf-total", + method: "post", + data: data, + }) +} + export function pageTk(query?: any) { return request({ url: "/wallet/wallet-transaction/page-tk", @@ -63,6 +95,14 @@ export function pageTk(query?: any) { }) } +export function tkTotal(data: any) { + return request({ + url: "/wallet/wallet-transaction/tk-total", + method: "post", + data: data, + }) +} + export function updateBalance(obj?: Object) { return request({ url: "/wallet/wallet-transaction/update-balance", diff --git a/src/components/DictSelect/index.vue b/src/components/DictSelect/index.vue index 6433532..9711e8a 100644 --- a/src/components/DictSelect/index.vue +++ b/src/components/DictSelect/index.vue @@ -1,6 +1,6 @@ @@ -16,9 +16,11 @@ export type Props = { dictCode: string placeholder?: string hideIds?: string | Array + multiple?: boolean } const props = withDefaults(defineProps(), { placeholder: "请选择", + multiple: false, }) const state = reactive({ diff --git a/src/layout/navBars/breadcrumb/user.vue b/src/layout/navBars/breadcrumb/user.vue index 586c005..d6d672b 100644 --- a/src/layout/navBars/breadcrumb/user.vue +++ b/src/layout/navBars/breadcrumb/user.vue @@ -49,8 +49,8 @@ diff --git a/src/utils/jsonp.ts b/src/utils/jsonp.ts index bcd3676..d1b6420 100644 --- a/src/utils/jsonp.ts +++ b/src/utils/jsonp.ts @@ -7,7 +7,6 @@ interface JsonpOptions { timeout?: number callbackName?: string callbackParam?: string - debug?: boolean } /** @@ -18,17 +17,11 @@ interface JsonpOptions { */ export function jsonp(url: string, options: JsonpOptions = {}): Promise { const { - timeout = 15000, + timeout = 10000, callbackName = `jsonp_callback_${Date.now()}_${Math.random().toString(36).substr(2)}`, callbackParam = "callback", - debug = false } = options - if (debug) { - console.log('[JSONP] 发起请求:', url) - console.log('[JSONP] 回调函数名:', callbackName) - } - return new Promise((resolve, reject) => { // 创建 script 标签 const script = document.createElement("script") @@ -36,11 +29,7 @@ export function jsonp(url: string, options: JsonpOptions = {}): Promise { // 设置超时 const timer = setTimeout(() => { cleanup() - const error = new Error(`JSONP request timeout after ${timeout}ms`) - if (debug) { - console.error('[JSONP] 请求超时:', error) - } - reject(error) + reject(new Error("JSONP request timeout")) }, timeout) // 清理函数 @@ -56,34 +45,22 @@ export function jsonp(url: string, options: JsonpOptions = {}): Promise { // 设置全局回调函数 ;(window as any)[callbackName] = (data: any) => { - if (debug) { - console.log('[JSONP] 收到响应:', data) - } cleanup() resolve(data) } // 处理错误 - script.onerror = (event) => { + script.onerror = () => { cleanup() - const error = new Error("JSONP request failed to load script") - if (debug) { - console.error('[JSONP] 脚本加载失败:', event) - } - reject(error) + reject(new Error("JSONP request failed")) } // 构建请求 URL const separator = url.includes("?") ? "&" : "?" const requestUrl = `${url}${separator}${callbackParam}=${callbackName}` - if (debug) { - console.log('[JSONP] 完整请求URL:', requestUrl) - } - // 发起请求 script.src = requestUrl - script.async = true document.head.appendChild(script) }) } @@ -93,11 +70,9 @@ export function jsonp(url: string, options: JsonpOptions = {}): Promise { */ export class TencentMapAPI { private apiKey: string - private debug: boolean - constructor(apiKey: string, debug: boolean = false) { + constructor(apiKey: string) { this.apiKey = apiKey - this.debug = debug } /** @@ -109,17 +84,8 @@ export class TencentMapAPI { async reverseGeocode(lat: number, lng: number): Promise { const url = `https://apis.map.qq.com/ws/geocoder/v1/?location=${lat},${lng}&key=${this.apiKey}&get_poi=1&output=jsonp` - if (this.debug) { - console.log('[TencentMapAPI] 逆地址解析请求:', { lat, lng }) - } - try { - const data = await jsonp(url, { debug: this.debug }) - - if (this.debug) { - console.log('[TencentMapAPI] 逆地址解析响应:', data) - } - + const data = await jsonp(url) return data } catch (error) { console.error("逆地址解析失败:", error) @@ -138,17 +104,8 @@ export class TencentMapAPI { keyword, )}&page_size=10&page_index=1&key=${this.apiKey}&output=jsonp` - if (this.debug) { - console.log('[TencentMapAPI] 地址搜索请求:', { keyword, boundary }) - } - try { - const data = await jsonp(url, { debug: this.debug }) - - if (this.debug) { - console.log('[TencentMapAPI] 地址搜索响应:', data) - } - + const data = await jsonp(url) return data } catch (error) { console.error("地址搜索失败:", error) diff --git a/src/utils/other.ts b/src/utils/other.ts index 251f19b..3cd5bd5 100644 --- a/src/utils/other.ts +++ b/src/utils/other.ts @@ -278,9 +278,13 @@ export function postDownBlobFile(url: any, data: any, fileName: string) { descs: data?.descs ?? [], }, data, - }).then((response) => { - handleBlobFile(response, fileName) }) + .then((response) => { + handleBlobFile(response, fileName) + }) + .catch((error) => { + useMessage().error(error.msg || "下载失败") + }) } /** diff --git a/src/views/hard/hard-order/index.vue b/src/views/hard/hard-order/index.vue index 930c02f..832bf8d 100644 --- a/src/views/hard/hard-order/index.vue +++ b/src/views/hard/hard-order/index.vue @@ -30,6 +30,10 @@ + + + diff --git a/src/views/mch/mch-pick-up/form.vue b/src/views/mch/mch-pick-up/form.vue index aff47f3..29e133b 100644 --- a/src/views/mch/mch-pick-up/form.vue +++ b/src/views/mch/mch-pick-up/form.vue @@ -32,12 +32,22 @@ - + + + + + + + + @@ -93,6 +103,7 @@ const form = reactive({ latitude: '', longitude: '', detailAddress: '', + sort: 0, businessHoursJson: [] as BusinessHour[], mchIds: [], }); diff --git a/src/views/mch/mch-pick-up/index.vue b/src/views/mch/mch-pick-up/index.vue index 2e2df11..68e032a 100644 --- a/src/views/mch/mch-pick-up/index.vue +++ b/src/views/mch/mch-pick-up/index.vue @@ -9,7 +9,7 @@ - + @@ -65,6 +65,7 @@ + - - - - \ No newline at end of file diff --git a/src/views/wallet/wallet-cz/index.vue b/src/views/wallet/wallet-cz/index.vue index 5ff332a..f01be91 100644 --- a/src/views/wallet/wallet-cz/index.vue +++ b/src/views/wallet/wallet-cz/index.vue @@ -1,16 +1,9 @@