Quellcode durchsuchen

价格.商品跳转

zhanghui vor 1 Jahr
Ursprung
Commit
24cc546e24

+ 1 - 1
pages/groupbuying/publish_good_list/module/mescrollUni-item.vue

@@ -20,7 +20,7 @@
 							</text>
 
 						<view class="group_69 flex-row justify-between">
-							<text class="text_25">¥{{item.discountPrice}}</text>
+							<text class="text_25">¥{{item.salePrice}}</text>
 							<image class="icon_3" v-if="item.selected" src="/static/images/add.png" mode="scaleToFill" />
 							<image class="icon_3" v-else src="/static/images/add1.png" mode="scaleToFill" />
 						</view>

+ 23 - 11
pages/groupbuying_details/index.vue

@@ -1,13 +1,13 @@
 <template>
-	<view class="product-con" :style="colorStyle">
+	<view>
 		<skeleton :show="showSkeleton" :isNodes="isNodes" ref="skeleton" loading="chiaroscuro" selector="skeleton"
 			bgcolor="#FFF"></skeleton>
 
 		<view class="product-con skeleton" :style="{ visibility: showSkeleton ? 'hidden' : 'visible' }">
 			<homeList :navH="navH" :returnShow="returnShow" :currentPage="currentPage" :sysHeight="sysHeight">
 			</homeList>
-			<view class="">
-				<scroll-view :scroll-top="scrollTop" scroll-y="true" scroll-with-animation="true"
+			<view>
+				<scroll-view :scroll-top="scrollTop" scroll-y="true"  scroll-with-animation="true"
 					:style="'height:' + height + 'px;'" @scroll="scroll">
 					<view id="past0">
 						<productConSwiperGroupbuying class="skeleton-rect" :imgUrls="storeInfo.slideshow"
@@ -18,8 +18,7 @@
 								<view class="count">共{{storeInfo.goodsTotal}}个</view>
 								<scroll-view id="scrollView" scroll-x class="navscroll" :scroll-into-view="scrollIndex"
 											 :scroll-with-animation="true" onScroll :scroll-left="scrollLeft" @scroll="scroll1">
-									<view class=" goods_item_img "
-										  v-for="item in storeInfo.goodsList">
+									<view  class=" goods_item_img " v-for="item in storeInfo.goodsList" @click="toGoods(item.id)">
 										<!-- 通过for循环生成view -->
 										<image style="width: 108rpx;height: 108rpx;"
 											   :src="item.goodsCover"
@@ -78,7 +77,7 @@
 									<text class="log-top-title">团购记录</text>
 									<text class="log-top-count">共{{storeInfo.grouponUserTotal}}条</text>
 								</view>
-								<view v-if="storeInfo.grouponUsers.length>0">
+								<view v-if="storeInfo.grouponUsers">
 
 									<swiper class="scroll-Y" :autoplay="true" :vertical="true" :interval="3000" :circular="true">
 										<swiper-item v-for="(u, index) in storeInfo.grouponUsers" :key="index">
@@ -112,9 +111,9 @@
 									<text class="all-products-top-count">共{{storeInfo.goodsTotal}}件商品</text>
 								</view>
 
-								<view class="all-products-body" v-for="(item, index) in storeInfo.goodsList" :key="index">
+								<view  class="all-products-body" v-for="(item, index) in storeInfo.goodsList" :key="index">
 
-									<view class="all-products-item" @click="getGoodsDetails(item.id)">
+									<view :id="'goods'+item.id" class="all-products-item" @click="getGoodsDetails(item.id)">
 										<image
 											:src="item.goodsCover"
 											mode="scaleToFill" />
@@ -125,8 +124,8 @@
 											</view>
 											<view class="all-products-item-content-b">
 												<view style="display:flex;">
-													<text class="red">{{item.discountPrice}}</text>
-													<text class="line-thr">{{item.salePrice}}</text>
+													<text class="red">{{item.salePrice}}</text>
+<!--													<text class="line-thr">{{item.salePrice}}</text>-->
 												</view>
 
 												<view>
@@ -645,6 +644,16 @@ export default {
 		this.currentPage = !this.currentPage
 	},
 	methods: {
+
+		toGoods(id){
+			console.log(id)
+			uni.createSelectorQuery().select("#goods"+id).boundingClientRect(data =>{
+				console.log("得到布局位置信息" , data);
+				console.log("节点离页面顶部的距离为" + data.top);
+				this.scrollTop = Math.round(data.top);
+			}).exec();
+		},
+
 		timechange(e) {
 			this.timeData = e
 		},
@@ -1584,7 +1593,6 @@ export default {
 </script>
 
 <style scoped lang="scss">
-
 	.userAvatarImg{
 		margin-left: -20rpx;
 		border-radius: 20rpx;
@@ -2642,5 +2650,9 @@ action-sheet-item {
 		vertical-align: super;
 	}
 
+	.page{
+		height: auto !important;
+		padding: 1rpx;
+	}
 </style>
 

+ 1 - 1
pages/groupbuying_details/order_details_confirm/index.vue

@@ -12,7 +12,7 @@
 					</view>
 					<view class="all-products-item-content-b">
 						<view style="display:flex;">
-							<text class="red"> ¥{{item.discountPrice}}</text>
+							<text class="red"> ¥{{item.salePrice}}</text>
 						</view>
 
 						<view>