From ed67e7f78dd0bffdfc22faf7009e32367509f278 Mon Sep 17 00:00:00 2001
From: "yangsai@163.com" <2624183217@qq.com>
Date: Thu, 9 May 2024 20:18:32 +0800
Subject: [PATCH] YS
---
pages/goods/detail.vue | 45 ++++++++++++++++++++++++++++++++++--------
pages/goods/list.vue | 11 ++++++++---
pages/index/index.vue | 12 +++++++----
3 files changed, 53 insertions(+), 15 deletions(-)
diff --git a/pages/goods/detail.vue b/pages/goods/detail.vue
index fbb9eda..9fa2afe 100644
--- a/pages/goods/detail.vue
+++ b/pages/goods/detail.vue
@@ -33,11 +33,11 @@
¥{{goods.line_price_min?Number(goods.line_price_min):0}}
-
+
-
+
¥{{(goods.line_price_min>0&&goods.goods_price_min>0)?Number((Number(goods.line_price_min)-Number(goods.goods_price_min)).toFixed(2)):0}}
+
+ 限时抢购
+
+
+ 距活动{{seckillText}}
+
+
+ {{timeData.hours>=10?timeData.hours:"0"+Number(timeData.hours)}}
+ :
+ {{timeData.minutes>=10?timeData.minutes:"0"+Number(timeData.minutes)}}
+ :
+ {{timeData.seconds>=10?timeData.seconds:"0"+Number(timeData.seconds)}}
+
+
+
@@ -285,7 +305,7 @@
-
+
@@ -294,7 +314,7 @@
- 立即购买
+ 立即抢购
@@ -445,6 +465,7 @@
},
data() {
return {
+ timestamp: new Date().getTime(),
goods_sku_no: "",
isTodo: false,
result: {},
@@ -498,6 +519,7 @@
multiArray: [],
multiData: [],
stockValue: '有货',
+ timeData: {},
addressResult: {
province: '江苏省',
city: '南京市',
@@ -517,7 +539,8 @@
// this.goodsId = options.goodsId ? options.goodsId : null
this.pre_id = options.pre_id ? options.pre_id : null;
this.isSeckill = options.isSeckill ? options.isSeckill : null;
- this.isBuy = options.isBuy ? decodeURIComponent(options.isBuy) : null;
+ this.isBuy = options.isBuy ? Number(options.isBuy) : null;
+ console.log(this.isBuy);
this.seckillText = options.seckillText ? decodeURIComponent(options.seckillText) : null;
this.getSuggestGoods()
this.getServeList()
@@ -550,6 +573,7 @@
this.isLogin = false;
this.userInfo = {}
}
+ console.log(this.userInfo)
},
onPageScroll(e) {
if (e.scrollTop <= 200) { // 当滚动到顶部且向下滑动时为true
@@ -601,6 +625,9 @@
]
}
},
+ onChangeSeckillCutDownTime(e) {
+ this.timeData = e
+ },
// 获取多列的索引
multiChange: function(e) {
this.multiIndex = e.detail.value;
@@ -1323,9 +1350,10 @@
}
.right {
- display: flex;
+ //display: flex;
align-items: center;
margin-right: 40rpx;
+ flex-flow: column;
.rightPrice {
overflow: hidden;
@@ -1350,7 +1378,7 @@
}
.rightBox {
- // min-width: 195rpx;
+ min-width: 120rpx;
padding: 0 20rpx;
height: 64rpx;
background: #FFFFFF;
@@ -1358,7 +1386,8 @@
display: flex;
align-items: center;
justify-content: center;
-
+ width: 40%;
+ float:right;
image {
width: 38rpx;
height: 38rpx;
diff --git a/pages/goods/list.vue b/pages/goods/list.vue
index 05e2326..4da93a7 100644
--- a/pages/goods/list.vue
+++ b/pages/goods/list.vue
@@ -256,7 +256,8 @@
sortType: 'all', // 排序类型
sortPrice: '', // 价格排序 (true高到低 false低到高)
options: {}, // 当前页面参数
- list: getEmptyPaginateObj(), // 商品列表数据
+ list: [], // 商品列表数据
+ // list: getEmptyPaginateObj(), // 商品列表数据
// 上拉加载配置
upOption: {
@@ -316,7 +317,8 @@
// 刷新列表数据
this.$refs.uWaterfall1.clear();
this.list.data = []
- this.list = getEmptyPaginateObj()
+ this.list = []
+ //this.list = getEmptyPaginateObj()
this.mescroll.resetUpScroll()
},
getGoodsTypeList(category_id) {
@@ -329,6 +331,8 @@
.then(res => {
if (res.data.list.length > 0) {
that.tabbar = res.data.list;
+ that.isBanrdActive = 0
+ that.list= [];
that.onChage(that.tabbar[0], 1,0)
// res.data.list.forEach(item => {
// item.children.forEach(item_1 => {
@@ -433,6 +437,7 @@
let arr = getMoreListData(newList, app.list, pageNo);
app.list.data = app.arrayUnique(arr, 'goods_id')
app.total = result.data.list.total;
+ console.log(app.list)
resolve(newList)
})
.catch(reject)
@@ -449,7 +454,7 @@
app.sortPrice = newSortPrice
app.$refs.uWaterfall1.clear();
app.list.data = []
- app.list = getEmptyPaginateObj()
+ app.list = []
app.mescroll.resetUpScroll()
}
},
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 8c968ed..16e2724 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -175,7 +175,7 @@
- ¥{{item.seckill_price_max}}
+ ¥{{item.original_price}}
@@ -190,7 +190,7 @@
-
+
查看更多
@@ -827,8 +827,10 @@
GoodsApi.chartsGoodsJing().then(result => {
let arr = result.data;
let finalArr = arr.filter(item => {
+ console.log(val)
return item.category_id == val
})
+ console.log(finalArr)
if (finalArr.length > 0) {
let arr = finalArr[0].goods_list
if (arr && arr.length > 0) {
@@ -840,6 +842,7 @@
})
}
this.paihangList = arr
+ console.log(this.paihangList)
}
})
},
@@ -853,6 +856,7 @@
let count_down_time = result.data.tabbar[0].count_down_time.replace(/-/g, '/');
this.seckillCutDownTime = Math.ceil((new Date(count_down_time).getTime() - new Date()
.getTime()));
+ console.log(this.seckillCutDownTime)
} else {
this.seckillCutDownTime = 0
}
@@ -1829,7 +1833,7 @@
&>image {
width: 90rpx;
- height: 90rpx;
+ height: 100rpx;
}
.priceBox {
@@ -1837,7 +1841,7 @@
height: 34rpx;
width: 134rpx;
left: 0;
- top: 70rpx;
+ top: 80rpx;
z-index: 2;
image {