瀏覽代碼

修改团购列表,详情页倒计时bug

pangqijun 1 年之前
父節點
當前提交
693f4e4d8a
共有 2 個文件被更改,包括 9 次插入7 次删除
  1. 1 1
      pages/groupbuying_details/index.vue
  2. 8 6
      pages/index/diy/components/latestGroupBuying.vue

+ 1 - 1
pages/groupbuying_details/index.vue

@@ -66,7 +66,7 @@
 									<image src="http://www.gzzzyd.com/groupon/home_slices/倒计时@2x.png" mode="scaleToFill" />
 									<text class="yellow">截止倒计时</text>
 									<!-- <text class="red2">02时25分19秒</text> -->
-									<u-count-down :timestamp="storeInfo.seconds" :show-days="false"></u-count-down>
+									<u-count-down :time="storeInfo.seconds * 1000" format="HH:mm:ss"></u-count-down>
 								</view>
 							</view>
 

+ 8 - 6
pages/index/diy/components/latestGroupBuying.vue

@@ -13,10 +13,10 @@
 				<view class="home">
 					<view class="count">共{{ e.goodsTotal }}个</view>
 					<scroll-view scroll-x class="navscroll"> <!-- 设置滚动条方向为横向 -->
-						<view style="width: 108rpx;height: 108rpx; margin-right: 20rpx; padding: 0;" class="item"
-							v-for="item in e.goodsImage">
+						<view style="width: 108rpx;height: 108rpx; margin-right: 20rpx; padding: 0;" class="item" 
+						v-for="(image, i2) in e.goodsImage" :key="i2">
 							<!-- 通过for循环生成view -->
-							<image style="width: 108rpx;height: 108rpx;" :src="item" mode="scaleToFill" />
+							<image style="width: 108rpx;height: 108rpx;" :src="image" mode="scaleToFill" />
 						</view>
 					</scroll-view>
 				</view>
@@ -52,7 +52,7 @@
 						<text class="yellow">截止倒计时</text>
 						<!-- <text class="red2">02时25分19秒</text> -->
 						<!-- <uni-countdown :show-day="false" :hour="e.h" :minute="e.m" :second="e.s"></uni-countdown> -->
-						<u-count-down :timestamp="e.seconds" :show-days="false"></u-count-down>
+						<u-count-down :time="e.seconds * 1000" format="HH:mm:ss"></u-count-down>
 					</view>
 				</view>
 				<view class="self-pickup-point">
@@ -192,12 +192,14 @@ export default {
 			})
 		},
 		getHistoryGroupon() {
+			let longitude = uni.getStorageSync('user_longitude');
+			let latitude = uni.getStorageSync('user_latitude');
 			let that = this;
 			historyGroupon({
 				current: 1,
 				size: 1,
-				longitude: that.positionInfo.longitude,
-				latitude: that.positionInfo.latitude
+				longitude: longitude,
+				latitude: latitude
 			}).then(res => {
 
 				that.grouponData = res.data.records;