绿满眶商城微信小程序-uniapp
xiangpei
2025-06-24 e351838f98b82952c940c21e0ba62f176dfb9f9b
pages/video/video-goods-detail.vue
@@ -29,10 +29,9 @@
<script>
   import {getGoodsDetail} from "@/api/video.js"
   import UButton from '@/uview-components/uview-ui/components/u-button/u-button.vue';
   import { buyBack } from "@/api/trade.js";
   import '@/components/uview-components/uview-ui';
   export default {
      components: {UButton},
      computed: {
         totalMoney() {
            return this.goodsList.reduce((total, goods) => {
@@ -62,7 +61,17 @@
         },
         // 生成订单-支付
         toPay() {
            const buyList = this.goodsList.map(goods => {
               return {
                  skuId: goods.id,
                  num: goods.goodsNum
               }
            })
            buyBack(buyList).then(res => {
               uni.navigateTo({
                  url: "/pages/order/fillorder?way=CART"
               })
            })
         }
      }
   }