瀏覽代碼

修改首页

pangqijun 1 年之前
父節點
當前提交
4caafa47bc
共有 2 個文件被更改,包括 12 次插入15 次删除
  1. 12 13
      pages/index/diy/components/latestGroupBuying.vue
  2. 0 2
      pages/index/diy/index_mall.vue

+ 12 - 13
pages/index/diy/components/latestGroupBuying.vue

@@ -14,9 +14,9 @@
 					<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.goodsList">
+							v-for="item in e.goodsImage">
 							<!-- 通过for循环生成view -->
-							<image style="width: 108rpx;height: 108rpx;" :src="item.goodsCover" mode="scaleToFill" />
+							<image style="width: 108rpx;height: 108rpx;" :src="item" mode="scaleToFill" />
 						</view>
 					</scroll-view>
 				</view>
@@ -26,12 +26,12 @@
 			<view class="wrapper">
 				<view class="price">
 					<view>
-						¥{{ e.minPrice || 0.00 }} ~ ¥ {{ e.minPrice || 0.00 }}
+						¥{{ e.minPrice || 0.00 }} ~ ¥ {{ e.maxPrice || 0.00 }}
 					</view>
 				</view>
-				<view class="introduce" @click="goToDetail(e.id)">
+				<view class="introduce" @click="goToDetail(e)">
 					<view>
-						{{ e.goodsName || '测试名字' }}
+						{{ e.mainTitle || '测试名字' }}
 					</view>
 					<image src="http://www.gzzzyd.com/groupon/home_slices/进入箭头2小@2x.png" mode="scaleToFill" />
 
@@ -52,7 +52,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> -->
-						<uni-countdown :show-day="false" :hour="12" :minute="12" :second="12"></uni-countdown>
+						<uni-countdown :show-day="false" :hour="e.h" :minute="e.m" :second="e.s"></uni-countdown>
 					</view>
 				</view>
 				<view class="self-pickup-point">
@@ -61,11 +61,10 @@
 					</view>
 					<view class="a-m">
 						<view class="am1">
-							<view class="am1-1">
-								上海市浦东新区秀浦路29号三层303室
+							<view class="am1-1">{{e.selfTake.name}}
 							</view>
 							<view class="am1-2">
-								距您1.8km
+								距您{{e.selfTake.distanceDesc}}
 								<image src="http://www.gzzzyd.com/groupon/order_details/距离@2x.png" mode="scaleToFill" />
 							</view>
 						</view>
@@ -179,16 +178,16 @@ export default {
 			}
 		},
 		getLatestGroupon() {
+			let longitude = uni.getStorageSync('user_longitude');
+			let latitude = uni.getStorageSync('user_latitude');
 			let that = this;
 			latestGroupon({
 				current: 1,
 				size: 1,
-				longitude: that.positionInfo.longitude,
-				latitude: that.positionInfo.latitude
+				longitude: longitude,
+				latitude: latitude
 			}).then(res => {
-
 				this.grouponData = res.data.records;
-				console.log(this.grouponData)
 			})
 		},
 		getHistoryGroupon() {

+ 0 - 2
pages/index/diy/index_mall.vue

@@ -273,8 +273,6 @@ export default {
 					uni.setStorageSync('user_longitude', res.longitude);
 					uni.setStorageSync('user_latitude', res.latitude);
 					console.log("dizhixinxi -> ", res)
-					that.positionInfo.longitude = res.longitude;
-					that.positionInfo.latitude = res.latitude;
 					that.markers[0].longitude = res.longitude;
 					that.markers[0].latitude = res.latitude;
 					getAddress(res.longitude,res.latitude).then(res =>{