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 { export interface MyCart {
appName?: string, appName?: string,
domain?: string, domain?: string,
adminUrl?: string;
num?: number, num?: number,
type?: number; type?: number;
payType?: number, payType?: number,

1
composables/configState.ts

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

2
pages/product/create/index.vue

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

Loading…
Cancel
Save