Browse Source

购物车新增:adminUrl字段

master^2
科技小王子 6 months ago
parent
commit
4d45f5fbc3
  1. 1
      api/shop/shopCart/model/index.ts
  2. 1
      composables/configState.ts
  3. 2
      pages/product/create/index.vue

1
api/shop/shopCart/model/index.ts

@ -59,6 +59,7 @@ export interface ShopCartParam extends PageParam {
export interface MyCart {
appName?: string,
domain?: string,
adminUrl?: string;
num?: number,
type?: number;
payType?: number,

1
composables/configState.ts

@ -77,6 +77,7 @@ export const useCart = () => useState<MyCart>('cart', () => {
return {
appName: '',
domain: '',
adminUrl: '',
num: 1,
type: 1,
payType: 102,

2
pages/product/create/index.vue

@ -302,7 +302,6 @@ const onPay = () => {
body: cart.value
}).then(async res => {
if (res.code == 0) {
console.log(res.data)
try {
// URL
wxPayQrCode.value = await QRCode.toDataURL(res.data);
@ -349,6 +348,7 @@ const reload = async () => {
cart.value.comments = `购买${response.value?.data.shortName}`;
if(response.value?.data.price){
cart.value.payPrice = response.value?.data.price;
cart.value.adminUrl = response.value?.data.domain;
computeTotalPrice();
}
useHead({

Loading…
Cancel
Save