From ce8c8392de2459f7819591f37a70077e5bf85ddf Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期四, 28 八月 2025 17:17:26 +0800
Subject: [PATCH] 浏览足迹
---
pages/video/video-goods-detail.vue | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/pages/video/video-goods-detail.vue b/pages/video/video-goods-detail.vue
index d12c0d1..62ae3a8 100644
--- a/pages/video/video-goods-detail.vue
+++ b/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) => {
@@ -54,6 +53,11 @@
this.getGoodsList();
},
methods: {
+ selectGoods(goods,id){
+ uni.navigateTo({
+ url: `/pages/product/goods?id=${goods.id}&goodsId=${goods.goodsId}`
+ })
+ },
// 鑾峰彇鍟嗗搧鍒楄〃
async getGoodsList() {
getGoodsDetail(this.videoId).then(res => {
@@ -62,7 +66,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"
+ })
+ })
}
}
}
--
Gitblit v1.8.0