diff --git a/src/common/utils/maps/payment.ts b/src/common/utils/maps/payment.ts new file mode 100644 index 0000000..ff83145 --- /dev/null +++ b/src/common/utils/maps/payment.ts @@ -0,0 +1,14 @@ +export const paymentMethodOptions = [ + { label: '微信支付', value: 0, type: 'primary' }, + { label: '借呗支付', value: 1, type: 'success' }, + { label: '要呗支付', value: 2, type: 'info' }, + { label: '余额支付', value: 3, type: 'warning' }, +]; + +export const modeToPaymentMethodMap: Record = { + 0: [0], + 1: [0, 1], + 2: [0, 1], + 3: [0], + 4: [2], +}; \ No newline at end of file diff --git a/src/pages/product/ProductList.vue b/src/pages/product/ProductList.vue index 16998e1..baf9339 100644 --- a/src/pages/product/ProductList.vue +++ b/src/pages/product/ProductList.vue @@ -61,6 +61,7 @@ const showAb98BindPopup = ref(false); function handleShopSelect(selectedShopId: number) { shopId.value = selectedShopId; showShopList.value = false; + productStore.setSelectedShop(shopList.value.find(shop => shop.shopId === selectedShopId)!); productStore.getGoods(selectedShopId); cartStore.clearCart(); activeCategory.value = 0; diff --git a/src/pages/product/components/checkout.vue b/src/pages/product/components/checkout.vue index aa9c572..d2c1b0f 100644 --- a/src/pages/product/components/checkout.vue +++ b/src/pages/product/components/checkout.vue @@ -1,25 +1,42 @@