Browse Source

修改金额显示

lex 8 months ago
parent
commit
71c71e9971
3 changed files with 15 additions and 7 deletions
  1. 12 6
      src/views/order-detail/index.tsx
  2. 2 0
      src/views/order-detail/orderStatus.ts
  3. 1 1
      vite.config.ts

+ 12 - 6
src/views/order-detail/index.tsx

@@ -305,9 +305,9 @@ export default defineComponent({
           const result = res.data || {}
           if (res.code === 998) {
             this.dialogVisiable = true
-            this.dialogContent = '您当前VIP天数更新,请刷新后尝试'
+            this.dialogContent = res.msg
             this.dialogBtnText = '刷新'
-            this.dialogType = 'refresh'
+            this.dialogType = 'back'
             return
           }
           // 支付成功
@@ -345,16 +345,16 @@ export default defineComponent({
           // 支付成功
           if (res.code === 999) {
             this.dialogVisiable = true
-            this.dialogContent = '产品信息已更新,请重新选择'
+            this.dialogContent = res.msg
             this.dialogBtnText = '确定'
             this.dialogType = 'back'
             return
           }
           if (res.code === 998) {
             this.dialogVisiable = true
-            this.dialogContent = '您当前VIP天数更新,请刷新后尝试'
+            this.dialogContent = res.msg
             this.dialogBtnText = '刷新'
-            this.dialogType = 'refresh'
+            this.dialogType = 'back'
             return
           }
           if (result.status == 'PAID') {
@@ -423,7 +423,7 @@ export default defineComponent({
         return item.couponIssueId
       })
       orderStatus.orderObject.couponId = couponIds.join(',') || ''
-      orderStatus.orderObject.couponDiscountPrice += discountCount
+      orderStatus.orderObject.couponDiscountPrice = discountCount
     },
     onConfirm(val: any) {
       const config: any = this.orderInfo.paymentConfig || {}
@@ -528,6 +528,12 @@ export default defineComponent({
                     item={item}
                     disabled={this.disabledCoupon}
                     onPriceChange={(price: number) => {
+                      console.log(
+                        price,
+                        this.orderAmount,
+                        orderStatus.orderObject.couponDiscountPrice,
+                        'orderStatus.orderObject.couponDiscountPrice'
+                      )
                       // 重置金额
                       this.orderAmount = Number(price)
                       const lastAmount = Number(

+ 2 - 0
src/views/order-detail/orderStatus.ts

@@ -137,11 +137,13 @@ export const orderInfos = () => {
     } else if (item.orderType === 'VIP') {
       params.bizContent = item.id
       params.goodsNum = item.num
+      params.bizPrice = item.salePrice
     } else if (item.orderType === "SVIP") {
       params.bizContent = item.id
       const needNumber = memberNeedNumber(item)
       params.vipEndDays = item.num > needNumber ? item.vipEndDays : null
       params.goodsNum = item.num
+      params.bizPrice = item.salePrice
     } else if (item.orderType === 'MUSIC') {
       params.bizContent = {
         musicSheetId: item.id,

+ 1 - 1
vite.config.ts

@@ -12,7 +12,7 @@ function resolve(dir: string) {
 // https://vitejs.dev/config/
 // https://github.com/vitejs/vite/issues/1930 .env
 // const proxyUrl = 'https://online.colexiu.com/'
-const proxyUrl = 'https://test.colexiu.com/'
+const proxyUrl = 'https://dev.colexiu.com/'
 // const proxyUrl = 'http://192.168.3.14:8000/'
 export default defineConfig({
   base: './',