From e91b5372f85e35191737f36f87474e56bbbb945f Mon Sep 17 00:00:00 2001
From: linyumoya <785145220@qq.com>
Date: Thu, 26 Sep 2024 11:20:45 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/api.js | 15 ++
pages_order/components/product/productList.vue | 155 +++++++++++----------
pages_order/mine/volunteer.vue | 2 +
pages_order/product/productDetail.vue | 181 ++++++++++++++-----------
pages_order/product/productList.vue | 76 ++++++-----
5 files changed, 246 insertions(+), 183 deletions(-)
diff --git a/api/api.js b/api/api.js
index 9500245..7033eeb 100644
--- a/api/api.js
+++ b/api/api.js
@@ -195,6 +195,21 @@ const config = {
showLoading: true,
},
+
+
+ //文创好物-获取商品详情
+ queryWaresById: {
+ url: '/wares/queryWaresById',
+ method: 'GET',
+ showLoading: true,
+ },
+ //文创好物-获取商品列表
+ queryWaresList: {
+ url: '/wares/queryWaresList',
+ method: 'GET',
+ showLoading: true,
+ },
+
}
diff --git a/pages_order/components/product/productList.vue b/pages_order/components/product/productList.vue
index f804bad..2441561 100644
--- a/pages_order/components/product/productList.vue
+++ b/pages_order/components/product/productList.vue
@@ -1,112 +1,129 @@
-
-
+
+
- 桌布租赁
+ {{item.waresTitle}}
- ¥58元/起
+ ¥{{item.waresPrice}}元/起
限时优惠
- ¥48
+ ¥{{item.waresPrice * item.waresDiscount}}
-
+
\ No newline at end of file
diff --git a/pages_order/mine/volunteer.vue b/pages_order/mine/volunteer.vue
index dd1ca34..f4a4125 100644
--- a/pages_order/mine/volunteer.vue
+++ b/pages_order/mine/volunteer.vue
@@ -17,6 +17,8 @@
+
+
diff --git a/pages_order/product/productDetail.vue b/pages_order/product/productDetail.vue
index f3c5301..aa6b859 100644
--- a/pages_order/product/productDetail.vue
+++ b/pages_order/product/productDetail.vue
@@ -1,24 +1,21 @@
-
+
-
+
-
+
- 桌布租赁
+ {{productDetailList.waresTitle}}
- ¥45.9起
+ ¥{{productDetailList.waresPrice}}起
- 已售1000+
+ {{productDetailList.waresSales}}
@@ -34,35 +31,33 @@
-
+
免费上门退·7天无理由退货·快递发货
-
+
品牌;适应人群
-
+
详情
-
+
-
-
+
+
-
+
@@ -70,94 +65,120 @@
import submit from '../components/product/submit.vue'
import submitUnitSelect from '../components/product/submitUnitSelect.vue'
export default {
- components : {
+ components: {
submit,
submitUnitSelect
},
data() {
return {
- productDetail : {
- image : 'https://cdn.uviewui.com/uview/swiper/swiper3.png,https://cdn.uviewui.com/uview/swiper/swiper2.png',
- content : '',
+ productDetail: {
+ image: 'https://cdn.uviewui.com/uview/swiper/swiper3.png,https://cdn.uviewui.com/uview/swiper/swiper2.png',
+ content: '',
+ productId: '',
+ productDetailList:''
},
}
},
onLoad(args) {
- console.log(args);
+ this.productId = args.id
+ this.queryWaresById()
},
methods: {
// 分享商品
- share(){
-
+ share() {
+
},
// 选择完成规格立即租赁下单
- submit(){
-
+ submit() {
+
+ },
+ queryWaresById() {
+ this.$api('queryWaresById', {
+ waresId: this.productId
+ },
+ res => {
+ if (res.code == 200) {
+ console.log(res);
+ this.productDetailList = res.result
+ }
+ })
}
}
}
+
\ No newline at end of file
diff --git a/pages_order/product/productList.vue b/pages_order/product/productList.vue
index 4bafbe7..6fbeee1 100644
--- a/pages_order/product/productList.vue
+++ b/pages_order/product/productList.vue
@@ -2,27 +2,19 @@
-
+
-
+
-
+
-
+
-
-
-
+
+
+
@@ -30,14 +22,13 @@
import cartAction from '../components/product/cartAction.vue'
import productList from '../components/product/productList.vue'
export default {
- components : {
+ components: {
productList,
cartAction,
},
data() {
return {
- tabs: [
- {
+ tabs: [{
name: '综合'
},
{
@@ -54,9 +45,13 @@
pageNo: 1,
pageSize: 10,
},
- state : 0,
+ list: [],
+ state: 0,
}
},
+ onShow() {
+ this.getProductList()
+ },
methods: {
//点击tab栏
clickTabs(index) {
@@ -67,24 +62,37 @@
}
// this.getOrderList()
},
+ getProductList() {
+ this.$api('queryWaresList', this.queryParams,
+ res => {
+ if (res.code == 200) {
+ this.list = res.result
+ console.log(this.list);
+ }
+ })
+ }
+
}
}
+
\ No newline at end of file