py преди 1 година
родител
ревизия
36ae86d14e
променени са 5 файла, в които са добавени 111 реда и са изтрити 35 реда
  1. 3 1
      api/seckill.js
  2. 19 2
      common/css/common.css
  3. 1 1
      pages.json
  4. 88 31
      pages/index/index.vue
  5. BIN
      static/img/index/q.png

+ 3 - 1
api/seckill.js

@@ -2,4 +2,6 @@ import {request} from '../service/ajax.js'
 
 const newsUrl = '/api/seckill/'
 // 秒杀商品
-export const getSeckillGoods = (data) => request(newsUrl + 'goods', 'post', { ...data },false)
+export const getSeckillGoods = (data) => request(newsUrl + 'goods', 'post', { ...data },false)
+// 首页团购秒杀
+export const seckillGroupGoods = (data) => request(newsUrl + 'group_goods', 'post', { ...data },false)

+ 19 - 2
common/css/common.css

@@ -358,6 +358,10 @@ image {
 	color: #F75820;
 }
 
+.fc-F5531E {
+	color: #F5531E;
+}
+
 .fc-FF7F00 {
 	color: #FF7F00;
 }
@@ -415,7 +419,9 @@ image {
 .bgc-4FB3EF {
 	background-color: #4FB3EF;
 }
-
+.bgc-5CC2FF {
+	background-color: #5CC2FF;
+}
 .bgc-41ABF5 {
 	background-color: #41ABF5;
 }
@@ -471,6 +477,7 @@ image {
 .bgc-48D3C5 {
 	background: linear-gradient(-90deg, #48D3C5, #26B7A7);
 }
+
 .bgc-4db8ff {
 	background: linear-gradient(-90deg, #4db8ff, #1aa3ff);
 }
@@ -522,6 +529,10 @@ image {
 
 
 /* 圆角 */
+.b-rad-5 {
+	border-radius: 5rpx;
+}
+
 .b-rad-12 {
 	border-radius: 12rpx;
 }
@@ -590,7 +601,9 @@ image {
 .pt-33 {
 	padding-top: 33rpx;
 }
-
+.pt-40 {
+	padding-top: 40rpx;
+}
 .p-t-80 {
 	padding-top: 80rpx;
 }
@@ -865,4 +878,8 @@ image {
 
 .b-b-EFF2F5 {
 	border-bottom: 1rpx solid #EFF2F5;
+}
+
+.b-F5541E {
+	border: 1rpx solid #F5541E;
 }

+ 1 - 1
pages.json

@@ -283,7 +283,7 @@
 				{
 					"path": "laundry-info",
 					"style": {
-						"navigationBarTitleText": "票务详情"
+						"navigationBarTitleText": "干洗详情"
 					}
 				}
 			]

+ 88 - 31
pages/index/index.vue

@@ -151,8 +151,8 @@
 				<view class="yztg-box p-30 box-border-box">
 					<image class="tj-bg" src="@/static/img/index/tj-bg.png" mode=""></image>
 					<image class="qwzd-img z-2" src="@/static/img/index/qwzd.png" mode=""></image>
-					<view class="z-2 ptp-24 b-b-F0 align-items-center flex-justify-space" v-for="(item,index) in 3"
-						:key="index">
+					<view class="z-2 ptp-24 b-b-F0 align-items-center flex-justify-space mb-12"
+						v-for="(item,index) in group_goods_List" :key="index">
 						<view class="align-items-center">
 							<image v-show="index === 0" class="pm-img mr-20" src="@/static/img/index/1.png" mode="">
 							</image>
@@ -163,22 +163,25 @@
 							<view class="zk-box text-align-center mr-10">
 								<image class="zk-img" src="@/static/img/index/zk-img.png" mode=""></image>
 								<view class="fs-20 fc-f z-2">
-									7.9折
+									{{((Number(item.seckill_money)/Number(item.line_price))*10).toFixed(1)}}折
 								</view>
 							</view>
 							<view class="fs-24 fc-0 max-w-252 text-overflow-ellipsis-one">
-								小艾轻松推拿肩膀书荒
+								{{item.title}}
 							</view>
 						</view>
 						<view class="align-items-center">
 							<view class="fs-24 fc-F43D04 fw-b mr-10">
-								¥ <text class="fs-28 fc-F43D04 fw-b">38.00</text>
+								¥ <text class="fs-28 fc-F43D04 fw-b">{{item.seckill_money}}</text>
 							</view>
 							<view class="fs-20 fc-a text-line-through">
-								¥48.00
+								¥{{item.line_price}}
 							</view>
 						</view>
 					</view>
+					<view class="text-align-center fs-24 fc-9 z-2">
+						查看更多
+					</view>
 				</view>
 			</view>
 			<!-- 类型选择 -->
@@ -206,7 +209,7 @@
 						</view>
 						<view class="flex-1">
 							<view class="align-items-center mb-8">
-								<view class="right-box-title fs-32 fw-600 text-overflow-ellipsis-one">{{item.shop_name}}
+								<view class="right-box-title fs-28 fw-b text-overflow-ellipsis-one">{{item.shop_name}}
 								</view>
 								<image class="right-box-title-img" src="@/static/img/toRight.png" mode=""></image>
 							</view>
@@ -217,20 +220,24 @@
 								<view class="fc-0  fs-24 mr-12">{{item.shop_sales}}人购买</view>
 							</view>
 							<view class="align-items-center flex-wrap-wrap">
-								<view class="quan-list align-items-center mr-12 mb-16"
+								<view class="quan-list b-F5541E box-border-box bgc-f align-items-center b-rad-5 mr-10"
 									v-for="(info1,index1) in item.coupon" :key="index1">
-									<view class="quan-list-1 fs-24 fc-f">券</view>
-									<view class="quan-list-2 fs-24 fc-FB3D03">{{info1.money}}元</view>
+									<image class="quan-list-1" src="@/static/img/index/q.png" mode=""></image>
+									<view class="quan-list-2 fs-24 fc-F5531E">{{info1.money}}元</view>
 								</view>
 							</view>
 						</view>
 					</view>
 					<view class="goods-items-list display-flex">
 						<view class="goods-items-list-box" v-for="(info2,index2) in item.goods" :key="index2">
-							<view v-show="info2.label === 3" class="label-box text-align-center bgc-F5811E fs-24 fc-f">推荐</view>
-							<view v-show="info2.label === 2" class="label-box text-align-center bgc-FF5555 fs-24 fc-f">新品</view>
-							<view v-show="info2.label === 1" class="label-box text-align-center bgc-48D3C5 fs-24 fc-f">折扣</view>
-							<view v-show="info2.label === 4" class="label-box text-align-center bgc-4db8ff fs-24 fc-f">招牌</view>
+							<view v-show="info2.label === 3" class="label-box text-align-center bgc-F5811E fs-24 fc-f">
+								推荐</view>
+							<view v-show="info2.label === 2" class="label-box text-align-center bgc-FF5555 fs-24 fc-f">
+								新品</view>
+							<view v-show="info2.label === 1" class="label-box text-align-center bgc-48D3C5 fs-24 fc-f">
+								折扣</view>
+							<view v-show="info2.label === 4" class="label-box text-align-center bgc-4db8ff fs-24 fc-f">
+								招牌</view>
 							<image class="mb-18" :src="info2.goods_image" mode="aspectFill"></image>
 							<view class="mb-12 fw-600 text-overflow-ellipsis-one fs-24">{{info2.goods_name}}</view>
 							<view class="">
@@ -240,6 +247,23 @@
 						</view>
 					</view>
 				</view>
+				<view class="pt-40 flex-direction align-items-center" v-if="this.goodsList.length === this.total">
+					<view class="fs-32 fc-0 fw-b">
+						小主都到这里了
+					</view>
+					<view class="fs-32 fc-0 fw-b mb-26">
+						还没有找到满意的店铺吗?
+					</view>
+					<view class="fs-24 fc-0 mb-32">
+						可以提交你意见与反馈哟。我们一定尽快努力达成!
+					</view>
+					<view class="list-but align-items-center flex-justify-center bgc-5CC2FF" @click="goFeedback">
+						<view class="fs-28 fc-f mr-10">
+							去提交
+						</view>
+						<view class="sj-fff"></view>
+					</view>
+				</view>
 			</view>
 		</view>
 		<uni-popup ref="popup" type="center" border-radius="10px 10px 10px 10px" :is-mask-click="false">
@@ -313,7 +337,8 @@
 		commonPopNotice
 	} from '@/api/common.js';
 	import {
-		getSeckillGoods
+		getSeckillGoods,
+		seckillGroupGoods
 	} from '@/api/seckill.js'
 	import {
 		getTakeaway
@@ -388,7 +413,8 @@
 				},
 				noticeList: [],
 				bannerList: [],
-				seckillGoodsList: [],
+				seckillGoodsList: [], // 秒杀商品
+				group_goods_List: [], //团购秒杀
 				typeList: [], //分类数组
 				category_id: 0, //分类id
 				goodsList: [],
@@ -450,6 +476,7 @@
 			// this.getNotice();
 			this.alumniHeatList()
 			this.getSeckillGoods();
+			this.seckillGroupGoods()
 			this.getTakeaway();
 			let userToken = uni.getStorageSync('token')
 			if (userToken) {
@@ -504,6 +531,12 @@
 			})
 		},
 		methods: {
+			goFeedback() {
+				// 问题反馈
+				uni.navigateTo({
+					url: '/pages-my/feedback'
+				})
+			},
 			shopHome() {
 				shopHome().then((res) => {
 					if (res.code === 1) {
@@ -732,6 +765,15 @@
 					}
 				})
 			},
+			seckillGroupGoods() {
+				seckillGroupGoods().then((res) => {
+					if (res.code === 1) {
+						if (res.code === 1) {
+							this.group_goods_List = res.data
+						}
+					}
+				})
+			},
 			getTakeaway() {
 				getTakeaway().then((res) => {
 					if (res.code === 1) {
@@ -839,6 +881,21 @@
 	}
 </script>
 <style lang="scss" scoped>
+	.list-but {
+		width: 140rpx;
+		height: 48rpx;
+		line-height: 48rpx;
+		border-radius: 24rpx;
+	}
+
+	.sj-fff {
+		width: 0;
+		height: 0;
+		border-top: 8rpx solid transparent;
+		border-right: 8rpx solid transparent;
+		border-left: 8rpx solid #fff;
+		border-bottom: 8rpx solid transparent;
+	}
 
 	.bot-list-box {
 		padding: 0 24rpx 24rpx;
@@ -1305,24 +1362,24 @@
 				}
 
 				.quan-list {
+					min-width: 88rpx;
+					height: 28rpx;
+					line-height: 28rpx;
+
 					.quan-list-1 {
-						width: 32rpx;
-						height: 34rpx;
-						background: #FB3D03;
-						border-radius: 5rpx 0rpx 0rpx 5rpx;
-						text-align: center;
-						line-height: 34rpx;
+						width: 38rpx;
+						height: 28rpx;
 					}
 
-					.quan-list-2 {
-						box-sizing: border-box;
-						height: 34rpx;
-						line-height: 34rpx;
-						padding: 0 4rpx;
-						border-radius: 0 5rpx 5rpx 0;
-						border: 1rpx solid #FB3D03;
-						text-align: center;
-					}
+					// .quan-list-2 {
+					// 	box-sizing: border-box;
+					// 	height: 34rpx;
+					// 	line-height: 34rpx;
+					// 	padding: 0 4rpx;
+					// 	border-radius: 0 5rpx 5rpx 0;
+					// 	border: 1rpx solid #FB3D03;
+					// 	text-align: center;
+					// }
 				}
 			}
 		}

BIN
static/img/index/q.png