From ba7ab879f586cf593a6c5b6e323f2ac6cfcbcbe5 Mon Sep 17 00:00:00 2001 From: weiwei Date: Thu, 14 Aug 2025 18:43:27 +0800 Subject: [PATCH 01/19] =?UTF-8?q?fix:=E5=B8=83=E5=B1=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/tabbar/order.vue | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/pages/tabbar/order.vue b/src/pages/tabbar/order.vue index 4566815..3783b45 100644 --- a/src/pages/tabbar/order.vue +++ b/src/pages/tabbar/order.vue @@ -129,25 +129,28 @@ const doRefund = (v: any) => { - - - - - - {{ pV.productName }} + + + + + + + + {{ pV.productName }} + - - + + 共 {{ v.carList.length }} 件 - - - 核销码 - + + + + 核销码 From a8c03e3089d64c122c4d68c0578cfbf7b3d16a66 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 15 Aug 2025 15:53:48 +0800 Subject: [PATCH 02/19] --- src/sheep/utils/request.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sheep/utils/request.ts b/src/sheep/utils/request.ts index d9fcf64..e59c207 100644 --- a/src/sheep/utils/request.ts +++ b/src/sheep/utils/request.ts @@ -27,8 +27,8 @@ const processQueue = (error: any, token: any = null) => { } } -// 创建http请求实例 -const http = new Request({ +// 创建https请求实例 +const https = new Request({ baseURL: import.meta.env.VITE_API_URL, timeout: 15000, method: "GET", @@ -47,7 +47,7 @@ const http = new Request({ }, }) -http.interceptors.request.use(async (config) => { +https.interceptors.request.use(async (config) => { const tokenStorage = uni.getStorageSync(TOKEN_KEY) const config_header: any = config.header || {} @@ -84,7 +84,7 @@ http.interceptors.request.use(async (config) => { }, Promise.reject) // 响应拦截器 -http.interceptors.response.use( +https.interceptors.response.use( async (response) => { // 账号密码登录响应结果特殊处理 if (response.config.url === "/auth/oauth2/token") { @@ -113,7 +113,7 @@ http.interceptors.response.use( const config = error.config const tokenValue = getTokenValue(newTokenStorage) if (tokenValue && config.header) config.header.Authorization = tokenValue - return http.request(config) + return https.request(config) } } catch (err) { return Promise.reject(err) @@ -284,7 +284,7 @@ async function loginBySh(): Promise { // 请求函数 const request = (config: any) => { - return http.middleware(config) + return https.middleware(config) } export default request From a472af76258cb52e245c1fccadb239087be3cb70 Mon Sep 17 00:00:00 2001 From: weiwei Date: Fri, 15 Aug 2025 17:29:48 +0800 Subject: [PATCH 03/19] =?UTF-8?q?feat:=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83?= =?UTF-8?q?https=E5=8D=8F=E8=AE=AE=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sheep/utils/request.ts | 14 ++++++++++++++ vite.config.ts | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/src/sheep/utils/request.ts b/src/sheep/utils/request.ts index e59c207..1b3fba8 100644 --- a/src/sheep/utils/request.ts +++ b/src/sheep/utils/request.ts @@ -47,7 +47,21 @@ const https = new Request({ }, }) +// 生产环境协议安全检查 +const validateProductionSecurity = () => { + if (isDevEnv()) return + + const apiUrl = import.meta.env.VITE_API_URL + if (apiUrl && !apiUrl.startsWith("https://")) { + uni.showToast({ title: "生产环境安全错误: 必须使用 HTTPS 协议", icon: "error" }) + throw new Error("生产环境禁止使用 HTTP 协议") + } +} + https.interceptors.request.use(async (config) => { + // 生产环境协议检查 + validateProductionSecurity() + const tokenStorage = uni.getStorageSync(TOKEN_KEY) const config_header: any = config.header || {} diff --git a/vite.config.ts b/vite.config.ts index 4522f32..4ef4276 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,6 +9,12 @@ import { useRouter } from "./src/sheep" export default defineConfig(({ mode }) => { const { NODE_ENV, VITE_APP_DEV_SERVICE, VITE_APP_PROD_SERVICE, VITE_IMAGE_DEV_PATH } = loadEnv(mode, process.cwd(), "") const baseUrl = NODE_ENV == "development" ? VITE_APP_DEV_SERVICE : VITE_APP_PROD_SERVICE + + // 生产环境强制 HTTPS 检查 + if (NODE_ENV === "production" && baseUrl && !baseUrl.startsWith("https://")) { + throw new Error("生产环境必须使用 HTTPS 协议!请检查 VITE_APP_PROD_SERVICE 配置") + } + return { build: { target: "es6", @@ -40,6 +46,8 @@ export default defineConfig(({ mode }) => { ws: true, changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ""), + // 生产环境强制 HTTPS 验证 + ...(NODE_ENV === "production" && { secure: true }), }, }, }, From 815470aaf08c63db9f6e8c5845a3fe3f8c5d5d6e Mon Sep 17 00:00:00 2001 From: weiwei Date: Mon, 18 Aug 2025 11:00:08 +0800 Subject: [PATCH 04/19] =?UTF-8?q?feat:=E5=96=9C=E5=A5=BD=E5=88=86=E6=9E=90?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/tabbar/canteenAnalyse.vue | 150 +++++++++++++++------------- 1 file changed, 82 insertions(+), 68 deletions(-) diff --git a/src/pages/tabbar/canteenAnalyse.vue b/src/pages/tabbar/canteenAnalyse.vue index 3a7e017..d5e8dee 100644 --- a/src/pages/tabbar/canteenAnalyse.vue +++ b/src/pages/tabbar/canteenAnalyse.vue @@ -1,83 +1,97 @@ diff --git a/src/pages/tabbar/index.vue b/src/pages/tabbar/index.vue index 03b5ea3..9326f03 100644 --- a/src/pages/tabbar/index.vue +++ b/src/pages/tabbar/index.vue @@ -1,4 +1,5 @@ \ No newline at end of file + From 7acbf1e4e2e05b51605a90455278c31cf3b526b7 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 28 Aug 2025 19:31:54 +0800 Subject: [PATCH 11/19] 11 --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index 41df9c2..c9aad0e 100644 --- a/.env +++ b/.env @@ -24,9 +24,9 @@ VITE_APP_DEV_SERVICE = http://192.168.101.185:9999 # 邓-本地 # VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上 # --------------------------- 开发环境 图片访问基础地址 --------------------------- -VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上 +# VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上 #VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上 -# VITE_IMAGE_DEV_PATH = http://192.168.101.174:9999 # 邓-本地 +VITE_IMAGE_DEV_PATH = http://192.168.101.185:9999 # 邓-本地 # VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 # VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上 From 676e6188a3211ad608d61cdac6ba3dd7b6453542 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Tue, 2 Sep 2025 18:36:42 +0800 Subject: [PATCH 12/19] 11 --- .env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env b/.env index c9aad0e..5553335 100644 --- a/.env +++ b/.env @@ -19,14 +19,14 @@ VITE_OAUTH2_APP_CLIENT='mini:mini' # --------------------------- 开发环境 api地址 ---------------------------------- # VITE_APP_DEV_SERVICE = https://stgl.pj.gov.cn/api # 域名线上 #VITE_APP_DEV_SERVICE = http://59.202.170.152:81/api # 信创线上 -VITE_APP_DEV_SERVICE = http://192.168.101.185:9999 # 邓-本地 +VITE_APP_DEV_SERVICE = http://192.168.101.196:9999 # 邓-本地 # VITE_APP_DEV_SERVICE = http://127.0.0.1:9999 # 邓-本地 # VITE_APP_DEV_SERVICE = http://123.157.250.162:8089/api # 测试线上 # --------------------------- 开发环境 图片访问基础地址 --------------------------- # VITE_IMAGE_DEV_PATH = https://stgl.pj.gov.cn/api # 域名线上 #VITE_IMAGE_DEV_PATH = http://59.202.170.152:81/api # 信创线上 -VITE_IMAGE_DEV_PATH = http://192.168.101.185:9999 # 邓-本地 +VITE_IMAGE_DEV_PATH = http://192.168.101.196:9999 # 邓-本地 # VITE_IMAGE_DEV_PATH = http://127.0.0.1:9999 # VITE_IMAGE_DEV_PATH = http://123.157.250.162:8089/api # 测试线上 From 5ad92284cc65f2c32454b5ea348d925675d82b11 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Tue, 2 Sep 2025 18:40:35 +0800 Subject: [PATCH 13/19] 11 --- src/sheep/api/order.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/sheep/api/order.ts b/src/sheep/api/order.ts index 98d1e0f..c210a9f 100644 --- a/src/sheep/api/order.ts +++ b/src/sheep/api/order.ts @@ -33,4 +33,15 @@ export default { url: "/hard/hard-appt/app/list", method: "GET", }), + /** + * 用户确认设备二维码扫一扫订单 + * @param orderId 订单id + * @param walletTypeId 钱包类型ID + */ + doneHardQrCodeScanOrder: (data: any) => + request({ + url: "/hard/hard-api/ad/done-hard-qr-code-order", + method: "POST", + data, + }), } From 15a8c695e0be080b5bbc0b1a39955885811b11cf Mon Sep 17 00:00:00 2001 From: weiwei Date: Tue, 2 Sep 2025 20:05:27 +0800 Subject: [PATCH 14/19] =?UTF-8?q?feat:=E6=89=AB=E6=94=B6=E6=AC=BE=E6=9C=BA?= =?UTF-8?q?=E5=99=A8=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/pay/payComplete.vue | 10 +-- src/pages/pay/scanPay.vue | 156 ++++++++++++++++++++-------------- src/sheep/stores/pay.ts | 21 ++++- 3 files changed, 113 insertions(+), 74 deletions(-) diff --git a/src/pages/pay/payComplete.vue b/src/pages/pay/payComplete.vue index e961b9e..da5b076 100644 --- a/src/pages/pay/payComplete.vue +++ b/src/pages/pay/payComplete.vue @@ -24,13 +24,13 @@ - ¥{{ payData.customPrice }} + ¥{{ scanPayData.payPrice }} 商家 - {{ payData.name }} + {{ scanPayData.mchName }}
@@ -50,11 +50,11 @@ import { ref } from "vue" import { onShow } from "@dcloudio/uni-app" import { usePayStore } from "@/sheep/stores/pay" -const payData = ref<{ id?: string; name?: string; customPrice?: number }>({}) +const scanPayData = ref({}) onShow(() => { - if (!usePayStore().payData.id) return uni.showToast({ title: "支付信息不存在", icon: "none" }) - payData.value = usePayStore().payData + if (!usePayStore().scanPayData.mchId) return uni.showToast({ title: "支付信息不存在", icon: "none" }) + scanPayData.value = usePayStore().scanPayData }) const goBack = () => { diff --git a/src/pages/pay/scanPay.vue b/src/pages/pay/scanPay.vue index 781a58b..58091c0 100644 --- a/src/pages/pay/scanPay.vue +++ b/src/pages/pay/scanPay.vue @@ -1,7 +1,7 @@ @@ -39,79 +39,95 @@ import { ref, computed, reactive } from "vue" import { onLoad, onShow } from "@dcloudio/uni-app" import payApi from "@@/api/pay" -import { merchantApi, walletApi } from "@/sheep/api" +import { merchantApi, orderApi, walletApi } from "@/sheep/api" import { hooks } from "@@/index" import { router } from "@/sheep" import { filePath } from "@/sheep/utils/file" -import { storePrice } from "@/sheep/utils/formatMoney" +import { displayPrice, storePrice } from "@/sheep/utils/formatMoney" import { usePayStore } from "@/sheep/stores/pay" import { isEmpty } from "radash" -import numberKeyboard from "@/sheep/components/numberKeyboard.vue" +import NumberKeyboard from "@/sheep/components/numberKeyboard.vue" -const scanCodeData = reactive({ - id: "", - name: "", +const loading = ref(false) +const scanPayState = reactive({ + mchId: "", // 商户id + mchName: "", // 商户名 + orderId: "", // 订单id + action: "", }) -const walletList = ref([]) -const curWalletId = ref("") -const disabled = ref(false) -const amount = ref("") +const walletList = ref([]) // 钱包列表 +const curWalletId = ref("") // 当前选中的钱包id +const orderInfo = ref({}) // 订单信息 +const amount = ref("") // 键盘输入的金额 -onLoad((options: any) => { - if (!isEmpty(options.id)) { - scanCodeData.id = options.id - } else { - uni.showToast({ title: "参数不存在", icon: "none" }) +onLoad(async (options: any) => { + uni.showLoading({ title: "加载中..." }) + const { mchId, orderId, action } = options + if (action === "harQrCodeScanPay") { + if (!options.mchId || !options.orderId) return uni.showToast({ title: "扫码参数错误", icon: "none" }) + scanPayState.mchId = mchId + scanPayState.orderId = orderId + scanPayState.action = action + await getMchDetail(mchId) + await getOrderInfo() + amount.value = displayPrice(orderInfo.value.totalPrice || 0 + orderInfo.value.extraPrice || 0, "") + return } + + const { id } = options + if (!isEmpty(id)) { + scanPayState.mchId = id + await getMchDetail(id) + return + } + + return uni.showToast({ title: "扫码参数错误", icon: "none" }) }) onShow(async () => { - uni.showLoading({ title: "加载中...", mask: true }) - if (scanCodeData.id) { - const { data } = await merchantApi.detail({ id: scanCodeData.id }) - if (data) { - scanCodeData.name = data.name - disabled.value = false - } else { - disabled.value = true - return uni.showToast({ title: "商户id错误", icon: "none" }) - } - } else { - uni.showToast({ title: "参数不存在", icon: "none" }) - disabled.value = true + try { + await getWalletList() + } finally { + uni.hideLoading() } - - const res = await walletApi.all() - if (res.code == 0) { - walletList.value = res.data.records - if (walletList.value.length > 0) { - curWalletId.value = walletList.value.find((v: any) => v.walletTypeUniqueCode == "1").id - } - } - uni.hideLoading() }) +// 获取商户名 +const getMchDetail = async (mchId: string) => { + if (!mchId) return uni.showToast({ title: "商户id错误", icon: "none" }) + const { data } = await merchantApi.detail({ id: mchId }) + scanPayState.mchName = data.name +} + +// 获取钱包列表 +const getWalletList = async () => { + const { code, data } = await walletApi.all() + if (code !== 0) return uni.showToast({ title: "获取钱包列表失败", icon: "none" }) + walletList.value = data.records + if (walletList.value.length > 0) { + curWalletId.value = walletList.value.find((v: any) => v.walletTypeUniqueCode == "1").id + } +} + +// 获取订单信息 +const getOrderInfo = async () => { + const { code, data }: any = await orderApi.detail({ id: scanPayState.orderId }) + if (code !== 0) return uni.showToast({ title: "获取订单信息失败", icon: "none" }) + orderInfo.value = data +} + +// 格式化金额显示 const displayAmount = computed(() => { if (!amount.value) return "0" - return ( - amount.value - // .toString() - // .toFixed(2) - .replace(/\B(?=(\d{3})+(?!\d))/g, ",") - ) + return amount.value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") }) // 点击支付 const handlePay = () => { - if (!scanCodeData.id || !scanCodeData.name) return uni.showToast({ title: "扫码参数不存在", icon: "none" }) - if (!amount.value) { - uni.showToast({ title: "请输入金额", icon: "none" }) - return - } - if (Number(amount.value) === 0) { - uni.showToast({ title: "金额不能为0", icon: "none" }) - return - } + if (!scanPayState.mchId) return uni.showToast({ title: "扫码参数不存在", icon: "none" }) + if (!amount.value) return uni.showToast({ title: "请输入金额", icon: "none" }) + if (Number(amount.value) === 0) return uni.showToast({ title: "金额不能为0", icon: "none" }) + uni.showModal({ title: "确定支付吗?", success: async (res) => { @@ -126,18 +142,28 @@ const handlePay = () => { const pay = async () => { try { uni.showLoading({ title: "支付中...", mask: true }) - const res = await payApi.createQrCodeOrder({ - merchantId: scanCodeData.id, - customPrice: storePrice(Number(amount.value)), - walletId: curWalletId.value, - }) - if (res.code != 0) { - uni.showToast({ title: res.msg || "支付失败", icon: "error" }) + if (scanPayState.action === "harQrCodeScanPay") { + const { code, msg }: any = await orderApi.doneHardQrCodeScanOrder({ + orderId: scanPayState.orderId, + walletId: curWalletId.value, + }) + if (code != 0) return uni.showToast({ title: msg || "支付失败", icon: "error" }) } else { - uni.hideLoading() - usePayStore().setPayData({ id: scanCodeData.id, name: scanCodeData.name, customPrice: Number(amount.value).toFixed(2) }) - router.jump("/pages/pay/payComplete", {}, 2) + const { code, msg } = await payApi.createQrCodeOrder({ + merchantId: scanPayState.mchId, + customPrice: storePrice(Number(amount.value)), + walletId: curWalletId.value, + }) + if (code != 0) return uni.showToast({ title: msg || "支付失败", icon: "error" }) } + + uni.hideLoading() + usePayStore().setScanPayData({ + mchId: scanPayState.mchId, + mchName: scanPayState.mchName, + payPrice: Number(amount.value).toFixed(2), + }) + router.jump("/pages/pay/payComplete", {}, 2) } catch (error: any) { uni.showToast({ title: "请求错误", icon: "error" }) uni.hideLoading() diff --git a/src/sheep/stores/pay.ts b/src/sheep/stores/pay.ts index e82da98..317fc7d 100644 --- a/src/sheep/stores/pay.ts +++ b/src/sheep/stores/pay.ts @@ -1,16 +1,29 @@ import { defineStore } from "pinia" +type State = { + scanPayData: { + mchId: string + mchName: string + payPrice: number | string + } + sourceWalletData: any +} + export const usePayStore = defineStore("pay", { - state: (): { payData: { id?: string; name?: string; customPrice?: number }; sourceWalletData: any } => { + state: (): State => { return { - payData: {}, + scanPayData: { + mchId: "", + mchName: "", + payPrice: 0, + }, sourceWalletData: {}, } }, actions: { // 支付 - setPayData(data: any) { - this.payData = data + setScanPayData(data: any) { + this.scanPayData = data }, // 转账 setSourceWalletData(data: any) { From fef4fbca2ebad45aaa262e61fef873958f2809da Mon Sep 17 00:00:00 2001 From: weiwei Date: Wed, 3 Sep 2025 10:09:04 +0800 Subject: [PATCH 15/19] =?UTF-8?q?chore:=E6=94=AF=E4=BB=98=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/pay/scanPay.vue | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/pages/pay/scanPay.vue b/src/pages/pay/scanPay.vue index 58091c0..e52ed15 100644 --- a/src/pages/pay/scanPay.vue +++ b/src/pages/pay/scanPay.vue @@ -3,27 +3,27 @@ {{ scanPayState.mchName }} - + ¥ {{ displayAmount }} - - 选择支付钱包: + + 选择支付钱包: - {{ v.walletTypeName }} + {{ v.walletTypeName }} - - 余额:{{ hooks.useMoney(v.balance) }} - 元 + + 余额: + {{ hooks.useMoney(v.balance) }} 元 @@ -56,7 +56,7 @@ const scanPayState = reactive({ action: "", }) const walletList = ref([]) // 钱包列表 -const curWalletId = ref("") // 当前选中的钱包id +const selectWallet = ref({}) // 当前选中的钱包 const orderInfo = ref({}) // 订单信息 const amount = ref("") // 键盘输入的金额 @@ -70,7 +70,8 @@ onLoad(async (options: any) => { scanPayState.action = action await getMchDetail(mchId) await getOrderInfo() - amount.value = displayPrice(orderInfo.value.totalPrice || 0 + orderInfo.value.extraPrice || 0, "") + const order = orderInfo.value + amount.value = displayPrice(order.totalPrice || 0 + order.extraPrice || 0, "") return } @@ -105,7 +106,7 @@ const getWalletList = async () => { if (code !== 0) return uni.showToast({ title: "获取钱包列表失败", icon: "none" }) walletList.value = data.records if (walletList.value.length > 0) { - curWalletId.value = walletList.value.find((v: any) => v.walletTypeUniqueCode == "1").id + selectWallet.value = walletList.value.find((v: any) => v.walletTypeUniqueCode == "1") } } @@ -145,14 +146,14 @@ const pay = async () => { if (scanPayState.action === "harQrCodeScanPay") { const { code, msg }: any = await orderApi.doneHardQrCodeScanOrder({ orderId: scanPayState.orderId, - walletId: curWalletId.value, + walletTypeId: selectWallet.value.walletTypeId, }) if (code != 0) return uni.showToast({ title: msg || "支付失败", icon: "error" }) } else { const { code, msg } = await payApi.createQrCodeOrder({ merchantId: scanPayState.mchId, customPrice: storePrice(Number(amount.value)), - walletId: curWalletId.value, + walletId: selectWallet.value.id, }) if (code != 0) return uni.showToast({ title: msg || "支付失败", icon: "error" }) } From c86d29bd8d4022fb9197d0c2c735db1558c5fb00 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Wed, 3 Sep 2025 16:02:34 +0800 Subject: [PATCH 16/19] =?UTF-8?q?feat:=E8=BD=A6=E8=BE=86=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.json | 19 +++- src/pages/apply/foreign-apply.vue | 39 +++----- src/pages/apply/foreign-list.vue | 26 ++--- src/pages/car/userCar/apply.vue | 101 ++++++++++++++++++++ src/pages/car/userCar/list.vue | 81 ++++++++++++++++ src/pages/human-face/list.vue | 23 ++--- src/pages/integrated/visitor/invitation.vue | 44 ++------- src/pages/tabbar/my.vue | 21 ++-- src/pages/wallet/list.vue | 76 ++++----------- src/sheep/api/index.ts | 4 +- src/sheep/api/userCar.ts | 22 +++++ src/sheep/constant/service-enum.ts | 8 ++ src/static/icon/service_6.png | Bin 0 -> 3830 bytes 13 files changed, 300 insertions(+), 164 deletions(-) create mode 100644 src/pages/car/userCar/apply.vue create mode 100644 src/pages/car/userCar/list.vue create mode 100644 src/sheep/api/userCar.ts create mode 100644 src/static/icon/service_6.png diff --git a/src/pages.json b/src/pages.json index cf79dc5..060e1f6 100644 --- a/src/pages.json +++ b/src/pages.json @@ -512,6 +512,23 @@ } } ] + }, + { + "root": "pages/car", + "pages": [ + { + "path": "userCar/apply", + "style": { + "navigationBarTitleText": "申请车辆" + } + }, + { + "path": "userCar/list", + "style": { + "navigationBarTitleText": "我的车辆" + } + } + ] } ], "globalStyle": { @@ -597,4 +614,4 @@ } ] } -} +} \ No newline at end of file diff --git a/src/pages/apply/foreign-apply.vue b/src/pages/apply/foreign-apply.vue index e2dcc40..dcc7408 100644 --- a/src/pages/apply/foreign-apply.vue +++ b/src/pages/apply/foreign-apply.vue @@ -35,7 +35,7 @@ onLoad((options: any) => { getDetail() } }) -onShow(() => {}) +onShow(() => { }) const getDetail = async () => { if (isEmpty(state.detailId)) return @@ -88,18 +88,14 @@ const doSubmit = async () => { - + @@ -107,31 +103,20 @@ const doSubmit = async () => { - + - + :placeholder="state.detailType == 'view' ? '' : '请输入备注..'"> - + @tap="doSubmit"> 提交 diff --git a/src/pages/apply/foreign-list.vue b/src/pages/apply/foreign-list.vue index 55559f0..15b489e 100644 --- a/src/pages/apply/foreign-list.vue +++ b/src/pages/apply/foreign-list.vue @@ -27,7 +27,7 @@ const query = (page: number, pagesize: number) => { pageHook.startPage(page, pagesize, false, state.pa) } -onLoad(() => {}) +onLoad(() => { }) onShow(() => { if (pageRef.value) { pageRef.value.reload(false) @@ -55,20 +55,9 @@ const doCard = (v: any) => {