diff --git a/src/api/shop/types.ts b/src/api/shop/types.ts index 0b80382..640d1fb 100644 --- a/src/api/shop/types.ts +++ b/src/api/shop/types.ts @@ -78,7 +78,9 @@ export interface SubmitOrderRequestData { cellId: number /** 运行模式(0-支付模式 1-审批模式 2-借还模式 3-会员模式 4-耗材模式) */ mode: number; - }> + }>; + /** 是否微信小程序订单 0否 1是 */ + isWxMp: number; } export type SubmitOrderResponseData = { diff --git a/src/pages.json b/src/pages.json index f9b357a..1c5405c 100644 --- a/src/pages.json +++ b/src/pages.json @@ -71,7 +71,10 @@ }, { "path": "pages/index/checkout", - "type": "page" + "type": "page", + "style": { + "navigationBarTitleText": "结算购物车" + } }, { "path": "pages/login/login", diff --git a/src/pages/index/checkout.vue b/src/pages/index/checkout.vue index 40acdbe..045aeae 100644 --- a/src/pages/index/checkout.vue +++ b/src/pages/index/checkout.vue @@ -10,6 +10,12 @@ import { useRentingCabinetStore } from "@/pinia/stores/rentingCabinet"; // 导入支付方式映射 import { paymentMethodOptions, modeToPaymentMethodMap } from "@/utils/maps/payment"; +definePage({ + style: { + navigationBarTitleText: '结算购物车', + }, +}) + const cartStore = useCartStore(); const { cartItems, totalPrice } = storeToRefs(cartStore); @@ -71,7 +77,7 @@ const paymentValueToType: Record = { async function callUniPay(paymentInfo: any) { return new Promise((resolve, reject) => { // uni-app支付API - /* uni.requestPayment({ + wx.requestPayment({ provider: 'wxpay', timeStamp: paymentInfo.timeStamp, nonceStr: paymentInfo.nonceStr, @@ -86,7 +92,7 @@ async function callUniPay(paymentInfo: any) { fail: (err) => { reject(new Error(err.errMsg || '支付未完成')); } - }); */ + }); }); } @@ -160,7 +166,8 @@ async function handleSubmit() { applyRemark: applyRemark.value, qyUserid: wxStore.userid, mode: productStore.selectedShop?.mode || 0, - isInternal: isInternal + isInternal: isInternal, + isWxMp: 1 }; const { code, data } = await submitOrderApi(requestData);