diff --git a/MiniProgram/rzyc-weapp-ylt-main/src/pages/select-free-plate/select-free-plate.tsx b/MiniProgram/rzyc-weapp-ylt-main/src/pages/select-free-plate/select-free-plate.tsx index 4d66d26..887240b 100644 --- a/MiniProgram/rzyc-weapp-ylt-main/src/pages/select-free-plate/select-free-plate.tsx +++ b/MiniProgram/rzyc-weapp-ylt-main/src/pages/select-free-plate/select-free-plate.tsx @@ -10,7 +10,7 @@ import { syncChargePilePay, } from '@/services/my-car'; import { RzException } from '@/components/RzException/RzException'; -import { showFailToast, showModalOnlyWithConfirmBtn } from '@/utils/wechat-ui'; +import { showFailToast, showSuccessToast } from '@/utils/wechat-ui'; import { AtButton } from 'taro-ui'; @@ -53,9 +53,13 @@ export const SelectFreePlate: Taro.FC = () => { order_no: router.params.order_no, charge_plate_no: connectorSn }); - Taro.redirectTo({ - url: `/pages/order-detail/order-detail?isFromCharging=${true}&orderNo=${router.params.order_no}`, - }); + showSuccessToast('领取成功!'); + setTimeout(() => { + Taro.redirectTo({ + url: `/pages/order-detail/order-detail?isFromCharging=${true}&orderNo=${router.params.order_no}`, + }); + }, 1500); + } else { showFailToast('车牌号格式不正确!'); setConnectorSn(''); @@ -73,9 +77,12 @@ export const SelectFreePlate: Taro.FC = () => { order_no: router.params.order_no, charge_plate_no: connectorSn }); - Taro.redirectTo({ - url: `/pages/order-detail/order-detail?isFromCharging=${true}&orderNo=${router.params.order_no}`, - }); + showSuccessToast('领取成功!'); + setTimeout(() => { + Taro.redirectTo({ + url: `/pages/order-detail/order-detail?isFromCharging=${true}&orderNo=${router.params.order_no}`, + }); + }, 1500); } }; diff --git a/MiniProgram/rzyc-weapp-ylt-main/src/utils/request-enhance.ts b/MiniProgram/rzyc-weapp-ylt-main/src/utils/request-enhance.ts index 304fdf6..a1fb885 100644 --- a/MiniProgram/rzyc-weapp-ylt-main/src/utils/request-enhance.ts +++ b/MiniProgram/rzyc-weapp-ylt-main/src/utils/request-enhance.ts @@ -5,11 +5,12 @@ import { getGlobalData, setGlobalData } from './global-data'; // export const BASE_URL = 'http://i100c.3322.org:31233'; //原来 -// export const BASE_URL = 'https://ylt.ikbvip.com'; +export const BASE_URL = 'https://ylt.ikbvip.com'; //本地 //export const BASE_URL = 'http://10.10.21.20:7001'; -export const BASE_URL = 'http://10.10.14.77:7001'; +// export const BASE_URL = 'http://10.10.14.77:7001'; +export const BASE_URL_ZQ = 'http://www.wmarkj.com:28888'; // export const BASE_URL = 'https://wechatapps.test-ylt.ikbvip.com/'; diff --git a/MiniProgram/rzyc-weapp-ylt-main/src/utils/request.ts b/MiniProgram/rzyc-weapp-ylt-main/src/utils/request.ts index 7b060eb..3dc071b 100644 --- a/MiniProgram/rzyc-weapp-ylt-main/src/utils/request.ts +++ b/MiniProgram/rzyc-weapp-ylt-main/src/utils/request.ts @@ -1,7 +1,7 @@ import Taro, { clearStorage } from '@tarojs/taro'; import { CommonRes, CommonResNew } from '../services/common'; import { setGlobalData, getGlobalData } from './global-data'; -import { BASE_URL } from './request-enhance'; +import { BASE_URL, BASE_URL_ZQ } from './request-enhance'; import { showModal } from './wechat-ui'; type Method = @@ -165,11 +165,19 @@ export const RzRequest = { }, postNew(url = '/', data = {}, isShowLoading = true) { - return requestNew(BASE_URL + url, data, 'POST', undefined, isShowLoading); + let baseUrl = BASE_URL; + if (url.includes('ZhuQue')) { + baseUrl = BASE_URL_ZQ; + } + return requestNew(baseUrl + url, data, 'POST', undefined, isShowLoading); }, getNew(url = '/', data = {}, isShowLoading = true) { - return requestNew(BASE_URL + url, data, 'GET', undefined, isShowLoading); + let baseUrl = BASE_URL; + if (url.includes('ZhuQue')) { + baseUrl = BASE_URL_ZQ; + } + return requestNew(baseUrl + url, data, 'GET', undefined, isShowLoading); }, put(url = '/', data = {}): Promise {