Просмотр исходного кода

更新会员充值绑定特定商家和暖心认证

1410417013 7 месяцев назад
Родитель
Сommit
63c99f16a6
7 измененных файлов с 878 добавлено и 49 удалено
  1. 2 2
      common/config.js
  2. 179 40
      my/vip/index.vue
  3. 643 0
      my/vip/shop.vue
  4. 5 0
      pages.json
  5. 13 0
      pages/index/index.vue
  6. 35 6
      pages/index/shop/confirmOrder.vue
  7. 1 1
      pages/index/shop/index.vue

+ 2 - 2
common/config.js

@@ -8,8 +8,8 @@ const ROOTPATH1 = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
 const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss-test/websocket/"
 const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss-test/ordersChat/"
 
-// const ROOTPATH = "http://192.168.161.190:8171/sqx_fast";
-// const ROOTPATH1 = "http://192.168.161.190:8171/sqx_fast";
+// const ROOTPATH = "http://192.168.161.225:8171/sqx_fast";
+// const ROOTPATH1 = "http://192.168.161.225:8171/sqx_fast";
 // const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss/websocket/"
 // const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss/ordersChat/"
 

+ 179 - 40
my/vip/index.vue

@@ -2,18 +2,20 @@
 	<view>
 		<view class="">
 			<view class="margin-lr margin-top" style="position: relative;border-radius: 10upx;overflow: hidden;">
-				<image src="../static/vip/vip.png" style="width: 100%;height: 250rpx;"></image>
-				<view class=" u-flex u-p-l-30 u-p-t-80 u-p-b-30" style="position: absolute;top: 0;width: 100%;">
-					<view class="u-m-r-20">
-						<u-avatar :src="avatar" size="100"></u-avatar>
+				<image src="https://mxys.chuanghai-tech.com/wmfile/20251112/c35cb76f45884a4a933c4a8d32c6742c.png" style="width: 100%;height: 250rpx;"></image>
+				<view class=" u-flex u-p-l-30 u-p-t-40 u-p-b-30" style="position: absolute;top: 0;width: 100%;">
+					<view class="u-m-r-20" style="margin-top: -15px;">
+						<!-- <u-avatar :src="avatar" size="100"></u-avatar> -->
+						<image src="https://mxys.chuanghai-tech.com/wmfile/20251112/34324c384d2543d0ba4cdfef27f6a337.png" style="width: 20px;height: 20px;"></image>
 					</view>
 					<view class="u-flex-1 ">
-						<view class="u-font-18 text-white text-bold">{{userName}}</view>
-						<view class="u-font-10 text-bold" style="margin-top: 10rpx;color: #999999;" v-if="vipExpirationTime && isVip">有效期:{{vipExpirationTime}}</view>
-						<view class="u-font-14 u-m-t-10 u-tips-color" style="color: #C59D7C;" v-if="!isVip">您目前还未开通会员
+						<view class="" style="color: #2A748D; font-size: 20px;">{{userName}}</view>
+						<view class="u-font-10 text-bold" style="margin-top: 10rpx;color: #376477;margin-left: -20px;" v-if="vipExpirationTime && isVip">有效期:{{vipExpirationTime}}</view>
+						<view class="u-font-12 u-m-t-10 u-tips-color" style="color: #376477;margin-left: -20px;" v-if="!isVip">您目前还未开通会员
 						</view>
 					</view>
 				</view>
+				<image src="https://mxys.chuanghai-tech.com/wmfile/20251112/222489f5f1f24623b2dc8e93e836b5ca.png" style="width: 121px;height: 84px;float: right;margin-top: -120px;"></image>
 			</view>
 			<!-- <view class="flex justify-center margin-top-sm flex-wrap padding-lr-sm">
 				<view style="display: inline-block;width: 216rpx;height: 250rpx;margin: 10rpx 10rpx;">
@@ -25,7 +27,7 @@
 					</view>
 				</view>
 			</view> -->
-			<view class="flex justify-center align-center margin-top" v-if="!isVip">
+			<!-- <view class="flex justify-center align-center margin-top" v-if="!isVip">
 				<view class="" @click="showpay=true"
 					style="position: relative;left: 0;right: 0;border-radius: 10upx;overflow: hidden;display: inline-block;margin: auto;">
 					<image src="../static/vip/bg.png" style="width: 459rpx;height: 129rpx;"></image>
@@ -34,28 +36,29 @@
 						<view class="text-bold">¥<text class="text-xxl">{{vipList.value}}</text></view>
 					</view>
 				</view>
-			</view>
+			</view> -->
 
 
-			<view class="padding-tb radius margin-top margin-lr"
-				style="background-color: #343339;border-radius: 10upx;">
-				<view class="text-center text-xl text-bold " style="color: #CAB49C;">会员特权</view>
+			<view class="padding-tb radius margin-top margin-lr vip2bg">
+				<view class="text-center text-xl text-bold " style="color: #2A748D;">会员特权</view>
 				<view class="flex  flex-wrap">
 					<view v-for="(item,index) in MemberList" :key="index"
 						style="width: 33%;text-align: center;margin-top: 34upx;">
 						<image :src="item.memberImg" mode="" style="margin: 0 auto;height: 45rpx;width: 45rpx;"></image>
-						<view class="grid-text margin-top-sm" style="color: #DFC5A7;">{{item.memberName}}</view>
+						<view class="grid-text margin-top-sm" style="color: #2A748D;">{{item.memberName}}</view>
 					</view>
 				</view>
 			</view>
+			
+			<view class="nuanxin" @click="natNuan()">暖心认证</view>
 		</view>
 		<view style="height: 110rpx;"></view>
 		<view class="flex justify-between cu-bar foot bg padding-lr" v-if="!isVip">
-			<view style="color: #DFC5A7;">
-				实付:<text style="font-size: 38upx;margin-top: 8upx;">{{price}}</text>
+			<view style="color: #DC2626;">
+				<text style="color: #001713;">实付:</text><text style="font-size: 38upx;margin-top: 8upx;">¥{{price}}</text>
 			</view>
-			<view class="">
-				<u-button :custom-style="customStyle" @click="showpay=true" shape="circle" :hair-line="false">立即开通
+			<view class=""> 
+				<u-button :custom-style="customStyle" @click="popupShow2=true" shape="circle" :hair-line="false">立即开通
 				</u-button>
 			</view>
 		</view>
@@ -84,6 +87,39 @@
 				<view class="pay_btn" @click="pay()">确认支付</view>
 			</view>
 		</u-popup>
+		
+		<!-- 推广码弹框 -->
+		<u-popup v-model="popupShow2" border-radius="20" mode="center">
+			<view class="nuan_kuang">
+				<view style="text-align: center;font-size: 18px;color: #001713;">推广码</view>
+				<view class="cu-form-group">
+					<view class="title">推广码</view>
+					<input placeholder="没有可不填" style="border: 1rpx solid;padding-left: 10px;" name="input" v-model="tuiguangma" maxlength="11"></input>
+				</view>
+				<view style="display: flex;margin-top: 20px;">
+					<view class="nuan_butt" style="margin-left: 70px;" @click="tuiguang()">确定</view>
+				</view>
+			</view>
+		</u-popup>
+
+		<!-- 暖心认证弹框 -->
+		<u-popup v-model="popupShow" border-radius="20" mode="center">
+			<view class="nuan_kuang">
+				<view style="text-align: center;font-size: 18px;color: #001713;">暖心认证</view>
+				<view class="cu-form-group">
+					<view class="title">学号</view>
+					<input placeholder="请输入学号" name="input" v-model="xuehao" maxlength="11"></input>
+				</view>
+				<view class="cu-form-group">
+					<view class="title">姓名</view>
+					<input placeholder="请输入姓名" name="input" v-model="studentName" type="text"></input>
+				</view>
+				<view style="display: flex;margin-top: 20px;">
+					<view class="nuan_qu" @click="popupShow=false">取消</view>
+					<view class="nuan_butt" @click="nuanQue">确定</view>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -96,10 +132,10 @@
 				closeable: true,
 				openLists: [],
 				customStyle: {
-					width: '250rpx',
-					color: '#402321',
-					background: "#DFC5A7",
-					border: 0,
+					width: '136px',
+					color: '#FFFFFF',
+					background: "#2A748D",
+					border: 0, 
 					fontWeight: '700'
 				},
 				gridData: [{
@@ -136,7 +172,12 @@
 				price: 0,
 				MemberList: [],
 				isVip: false,
-				openWay: 2
+				openWay: 2,
+				popupShow:false,//暖心认证弹框
+				tuiguangma:'',
+				xuehao:'',
+				studentName:'',
+				popupShow2:false,//推广码弹框
 			}
 		},
 		onLoad() {
@@ -161,11 +202,13 @@
 				image: '../../static/images/my/weixin.png',
 				text: '微信',
 				id: 2
-			},{
-				image: '../../static/images/my/jinbi.png',
-				text: '零钱',
-				id: 1
-			}]
+			},
+			// {
+			// 	image: '../../static/images/my/jinbi.png',
+			// 	text: '零钱',
+			// 	id: 1
+			// },
+			]
 			// #endif
 
 			// #ifdef H5
@@ -180,7 +223,7 @@
 			},{
 				image: '../../static/images/my/jinbi.png',
 				text: '零钱',
-				id: 1
+				id: 1 
 			}]
 			// #endif
 
@@ -194,6 +237,47 @@
 			this.getUserInfo()
 		},
 		methods: {
+			//推广码弹框
+			tuiguang(){
+				this.popupShow2=false
+				this.showpay=true
+			},
+			//暖心认证
+			natNuan(){
+				this.popupShow=true
+			},
+			//提交认证
+			nuanQue() {
+				const data={
+					"name": this.studentName,
+					"studentNumber": this.xuehao,
+				}
+				console.log('提交1',data)
+				if (!this.studentName) {
+					this.$queue.showToast("请输入姓名");
+				} else if (!this.xuehao) {
+					this.$queue.showToast("请输入学号");
+				}else {
+					this.$queue.showLoading("加载中...");
+					this.$Request.postJson("/app/special-favor-student/verify", {
+						name: this.studentName,
+						studentNumber: this.xuehao,
+					}).then(res => {
+						console.log('提交',res)
+						if (res.code == 0) {
+							uni.hideLoading()
+			
+							setTimeout(function() {
+								this.popupShow=false
+								this.getIsVip()
+							}, 10)
+						} else {
+							uni.hideLoading();
+							this.$queue.showToast(res.msg);
+						}
+					});
+				}
+			},
 			selectWay: function(item) {
 				this.openWay = item.id;
 			},
@@ -218,13 +302,15 @@
 			// 获取特权列表
 			getMemberList() {
 				this.$Request.get('/app/member/selectMemberList').then(res => {
-					if (res.code == 0) {
+					console.log(res,'会员特权')
+					if (res.code == 0) { 
 						this.MemberList = res.data
 					}
 				})
 			},
 			getIsVip() {
 				this.$Request.get("/app/user/selectUserMessage").then(res => {
+					console.log(res,'会员')
 					if (res.code == 0) {
 						this.vipExpirationTime = res.data.vipExpirationTime;
 						this.isVip = res.data.isVip==1?true:false
@@ -247,8 +333,13 @@
 				let userId = uni.getStorageSync('userId')
 
 				this.showpay = false
-				if (this.openWay == 1) { //余额支付
-					this.$Request.post("/app/wxPay/balanceBuyVip").then(res => {
+				if (this.openWay == 1) { //余额支付/app/wxPay/balanceBuyVip
+				let data1 = {
+						// type: 3,
+						userId:userId,
+						promoCode:this.tuiguangma,
+					}
+					this.$Request.get("/app/vip/balance-pay", data1).then(res => {
 						if (res.code == 0) {
 							this.$queue.showToast('支付成功');
 							setTimeout(function() {
@@ -261,18 +352,21 @@
 				} else if (this.openWay == 2) { //微信支付
 					// #ifdef MP-WEIXIN
 					let data = {
-						type: 3
-					}
-					this.$Request.post('/app/wxPay/wxPayJsApiBuyVip', data).then(res => {
+						// type: 3,
+						userId:userId,
+						promoCode:this.tuiguangma,
+					}///app/wxPay/wxPayJsApiBuyVip
+					console.log(data,'支付')
+					this.$Request.get('/app/vip/get-pay-param', data).then(res => {
 						console.log(res)
 						if (res.code == 0) {
 							uni.requestPayment({
 								provider: 'wxpay',
-								timeStamp: res.data.timestamp,
-								nonceStr: res.data.noncestr,
-								package: res.data.package,
-								signType: res.data.signType,
-								paySign: res.data.sign,
+								timeStamp: res.timeStamp,
+								nonceStr: res.nonceStr,
+								package: res.packageStr,
+								signType: res.signType,
+								paySign: res.paySign,
 								success: function(res) {
 									console.log(res)
 									uni.showLoading({
@@ -435,7 +529,7 @@
 
 <style>
 	.bg {
-		background-color: #1E1F31;
+		background-color: #FFFFFF;
 	}
 
 	.btn {
@@ -473,4 +567,49 @@
 		line-height: 80rpx;
 
 	}
+	.vip2bg{
+		background-image: url('https://mxys.chuanghai-tech.com/wmfile/20251112/16095cb872cf4572afc82f8755d74951.png');
+		background-size: 100%;
+	}
+	/* 暖心认证 */
+	.nuanxin{
+		width: 177px;
+		height: 47px;
+		background-color: #2A748D;
+		color: #ffffff;
+		font-size: 18px;
+		border-radius: 32px;
+		text-align: center;
+		line-height: 47px;
+		margin: 38rpx 0 0 70px;
+	}
+	/* 暖心认证弹框 */
+	.nuan_kuang{
+		padding: 30rpx 30rpx 30rpx 30rpx;
+		font-size: 15px;
+		width: 300px;
+		height: 180px;
+	}
+	.nuan_qu{
+		width: 130px;
+		height: 33px;
+		border: 2rpx solid rgba(129, 189, 179, 1);
+		background-color: rgba(129, 189, 179, 0.4);
+		color: #001713;
+		font-size: 14px;
+		border-radius: 16px;
+		text-align: center;
+		line-height: 33px;
+	}
+	.nuan_butt{
+		margin-left: 20px;
+		width: 130px;
+		height: 33px;
+		background-color: #2A748D;
+		color: #ffffff;
+		font-size: 14px;
+		border-radius: 16px;
+		text-align: center;
+		line-height: 33px;
+	}
 </style>

+ 643 - 0
my/vip/shop.vue

@@ -0,0 +1,643 @@
+<template>
+	<view v-if="XCXIsSelect=='是'">
+
+		<view style="position: fixed;top: 0;width: 100%;z-index: 999;">
+			<view class="flex justify-between align-center bg-white padding-tb padding-lr-sm">
+				<view class="flex-sub text-center" :class="current==1?'select':''" @click="confirm(1)">综合排序</view>
+				<view class="flex-sub text-center" :class="current==3?'select':''" @click="confirm(3)">距离优先</view>
+				<view class="flex-sub text-center" :class="current==4?'select':''" @click="confirm(4)">销量优先</view>
+				<view class="flex-sub text-center flex" @click="isShow = !isShow">
+					<view class="flex align-center" style="margin: 0 auto;">
+						<view :class="isShow?'select':''">筛选</view>
+						<u-icon v-if="!isShow" name="arrow-down" size="28"></u-icon>
+						<u-icon v-if="isShow" name="arrow-up" color="#558C83" size="28"></u-icon>
+					</view>
+				</view>
+			</view>
+			<view v-if="isShow"
+				style="position: absolute;top: 90rpx;width: 100%;z-index: 1000;background: rgba(0,0,0,.5);height: 100vh;"
+				@click="isShow =false">
+				<view class="padding-lr bg-white">
+					<view class="flex justify-between align-center padding-tb-sm u-border-bottom"
+						v-for="(item,index) in options4" :key='index' @click.stop="getSelect(item)">
+						<view class="text-df" :class="item.select?'select':''">{{item.shopTypeName}}</view>
+						<u-icon v-if="item.select" name="checkmark" color="#558C83" size="28"></u-icon>
+					</view>
+				</view>
+			</view>
+		</view>
+		
+		<!-- #ifdef H5 -->
+		<view class="hd flex justify-center" style="position: fixed;top: 90rpx;" v-if="hdlist.length>0">
+		<!-- #endif -->
+		<!-- #ifndef H5 -->
+		<view class="hd flex justify-center" style="position: fixed;top: 90rpx;" v-if="hdlist.length>0">
+		<!-- #endif -->
+			<view class="hd-box">
+				<scroll-view scroll-x="true" class="scroll-view_H">
+					<view class="hd-box-item" :style="currenthd==index?'background-color:#558C83;font-weight:bold':''" @click="searchhd(index,item.activityId)" v-for="(item,index) in hdlist" :key="index">{{item.activityTitle}}</view>
+				</scroll-view>
+			</view>
+		</view>
+		
+		<!-- #ifdef H5 -->
+		<view class="padding-lr-sm" style="margin-top: 80rpx;">
+			<!-- #endif -->
+			<!-- #ifndef H5 -->
+			<view class="padding-lr-sm" style="margin-top: 36px;min-height: 100vh; /* 设置最小高度为视口高度 */">
+				<!-- #endif -->
+				<view class="shopli" v-for="(item,index) in shopList" :key='index'>
+					<view class="margin-tb-sm flex justify-between bg-white padding"
+						@click="goNav(item.shopId,item,item.shopActivityList)">
+						<image :src="item.shopCover" class="radius" style="width: 160rpx;height: 160rpx;" mode="aspectFill"></image>
+						<view class=" margin-left-sm" style="width: 450rpx;">
+							<view class=" flex flex-direction justify-between">
+								<view class="text-lg text-bold text-black">{{item.shopName}}</view>
+								<view class="flex align-center margin-top-xs" style="width: 100%;">
+									<text style="color: #FF8205;"> {{item.shopScore?item.shopScore:0}}分</text>
+									<text
+										class="text-gray flex-sub margin-left-xs">销量{{item.shopSales?item.shopSales:0}}</text>
+									<view style="border: 2rpx solid #CCC6C6; border-radius: 8rpx;color: #707070;font-size: 20rpx;padding: 5rpx 8rpx; ">{{item.autoSendOrder==1?'商家配送':'平台配送'}}</view>
+								</view>
+								<view class="text-gray margin-top-xs flex justify-between">
+									<view>起送 ¥{{item.minimumDelivery}} 配送 ¥{{item.errandMoney?item.errandMoney:0}}
+									</view>
+									<view>
+										<text class="text-gray margin-left-xs">{{item.errandTime}}分钟</text>
+										<text class="text-gray margin-left-xs">{{item.distance}}</text>
+									</view>
+								</view>
+								<view style="display: flex;" v-if="item.businessHours&&item.lockHours">
+									<view class="text-gray margin-top-xs" style="background-color: #FFF5EB;color: #FF8205;border-radius: 8rpx;padding: 5rpx 16rpx;">
+										营业时间:{{item.businessHours}}-{{item.lockHours}}
+									</view>
+									</view>
+								<view class="flex margin-top-xs justify-between align-start" style="width: 100%;">
+									<view class="flex flex-wrap align-center" style="width: 100%;height: 100%;overflow: hidden;">
+										<view class="lable flex justify-center align-center" v-if="item.enableFullReductionFlag==0&&item.exemptMinMoney">
+											满{{item.exemptMinMoney}}免配送费</view>
+										<!-- <view class="lable flex justify-center align-center" v-if="item.exemptMinMoney">满{{item.exemptMinMoney}}免配送费</view> -->
+										<view v-for="(ite,ind) in item.shopActivityList" :key='ind' v-if="item.shopActivityList && ite.activityType!='1'">
+											<view class="lable flex justify-center align-center" style="border-radius: 8rpx;background-color: #ffffff;color: #FF0000;box-sizing: border-box;">
+												<text v-if="ite.activityType=='2'">时段</text>
+												<text v-if="ite.activityType=='3'">满额</text>
+												<text v-if="ite.activityType=='4'">全场</text>
+												<text style="margin-left: 3px;">|</text>
+												<text style="margin-left: 3px;">{{ite.activityName}}</text>
+											</view>
+											<!-- <view class="lable flex justify-center align-center"
+												style="border-radius: 4rpx;border: 1rpx solid red;background-color: #ffffff;color: red;box-sizing: border-box;"
+												>{{ite.activityName}}
+											</view> -->
+										</view>
+										<view class="lable flex justify-center align-center" v-for="(ite,ind) in item.shopLable" :key='ind'
+											v-if="item.shopLable">
+											{{ite}}
+										</view>
+										<view class="lable flex justify-center align-center" v-if="item.couponList" style="border-radius: 8rpx;border: 1rpx solid #F97A7A;background-color: #ffffff;color: #FF0000;box-sizing: border-box;" v-for="(it,ide) in item.couponList" :key="ide">
+											<text>优惠券</text>
+											<text style="margin-left: 3px;">|</text>
+											<text style="margin-left: 3px;">满{{it.minMoney}}减{{it.money}}</text>
+										</view>
+										<!-- <view class="lable flex justify-center align-center" v-if="item.couponList" style="border-radius: 4rpx;border: 1rpx solid red;background-color: #ffffff;color: red;box-sizing: border-box;" v-for="(it,ide) in item.couponList" :key="ide">满{{it.minMoney}}减{{it.money}}</view> -->
+									</view>
+								</view>
+							</view>
+							<view class="flex margin-top-xs">
+								<view v-for="(ite,ind) in item.goodsList" :key='ind'
+									@click.stop="goDet(ite.goodsId,item.shopId)" style="width: 33%;">
+									<image :src="ite.goodsCover" style="width: 120rpx;height: 120rpx;" class="radius"
+										mode=""></image>
+									<view class="u-line-1 text-df text-bold margin-top-xs">{{ite.goodsName}}</view>
+									<view class="text-bold margin-top-xs" style="color: #FD6416;">
+										<text class="text-sm">¥</text> {{ite.goodsMoney}}
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<empty v-if="!shopList.length"></empty>
+			
+			<!-- 打样提示 -->
+			<view v-if="hintShow" class="hintPopul" @click.stop="hintShow=false">
+				<view class="content_">
+					<image src="../../../static/images/index/shop.png" mode="" style="width: 200rpx;height: 180rpx;">
+					</image>
+					<view class="text-xl text-bold">店铺打烊啦</view>
+					<view class="hintText margin-top-sm text-gray">现在店铺已经打烊了,营业时间</view>
+					<view class="margin-top-xs text-gray margin-bottom">{{shop.businessHours}}-{{shop.lockHours}}</view>
+					<view class="skuBtn" @click="hintShow=false">知道了</view>
+				</view>
+			</view>
+		</view>
+		<view v-else>
+			<view style="font-size: 28upx;" v-html="content"></view>
+		</view>
+</template>
+
+<script>
+	import empty from '@/components/empty.vue'
+	export default {
+		components: {
+			empty
+		},
+		data() {
+			return {
+				currenthd:-1,
+				hdlist:[],
+				activityId:'',
+				isShow: false,
+				hintShow: false,
+				shop: {},
+				page: 1,
+				limit: 10,
+
+				shopList: [],
+
+				current: 1,
+				shopTypeId: '',
+				userId: '',
+				lng: '',
+				lat: '',
+				value1: 0,
+				value2: 0,
+				value3: 0,
+				value4: 0,
+				options1: [{
+					label: '综合排序',
+					value: 1,
+				}],
+				options2: [{
+					value: '3',
+					label: "距离优先"
+				}],
+				options3: [{
+					value: '4',
+					label: "销量优先"
+				}],
+				options4: [{
+					id: '',
+					select: true,
+					shopTypeName: "全部"
+				}],
+				title: '综合排序',
+				title1: '距离优先',
+				title2: '销量优先',
+				title3: '筛选',
+				totalCount: 0,
+				XCXIsSelect: '否',
+				content:'',
+				hintShow: false,
+			}
+		},
+		onLoad(e) {
+			console.log(e)
+			
+			this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
+			if (this.XCXIsSelect == '否') {
+				this.getGuize()
+				uni.setNavigationBarTitle({
+					title: '隐私政策'
+				});
+			} else {
+				uni.setNavigationBarTitle({
+					title: '店铺列表'
+				});
+			}
+			let that = this
+			uni.showLoading({
+				title: '加载中',
+				mask: true, // 是否显示透明蒙层,防止触摸穿透
+			})
+			that.shopTypeId = e.value ? e.value : ''
+			that.value2 = e.value ? e.value : 0
+			that.userId = uni.getStorageSync('userId')
+			that.getShopType()
+			uni.getLocation({
+				type: 'gcj02', //返回可以用于uni.openLocation的经纬度
+				success: function(res) {
+					that.lat = res.latitude;
+					that.lng = res.longitude;
+				}
+			});
+			that.getShopList()
+			that.gethdlist();
+		},
+		methods: {
+			//筛选活动
+			searchhd(index,activityId){
+				if(index==this.currenthd){
+					this.currenthd = -1
+					this.activityId = '';
+					this.getShopList()
+				}else{
+					this.currenthd = index;
+					this.activityId=activityId;
+					this.getShopList()
+				}
+			},
+			//获取所有活动
+			gethdlist(){
+				this.$Request.get("/app/activityManage/getActivityList").then(res => {
+					if (res.code == 0) {
+						res.data.records.map((item,index)=>{
+							if(item.activityId==14){
+								res.data.records.splice(index, 1)
+							}
+						})
+						this.hdlist = res.data.records
+					}
+				});
+			},
+			// 跳转商品详情
+			goDet(goodsId, shopId) {
+				let userId = this.$queue.getData('userId');
+				// if (!userId) {
+				// 	uni.navigateTo({
+				// 		url: '/pages/public/login'
+				// 	})
+				// 	return
+				// }
+				uni.navigateTo({
+					url: '/pages/index/shop/goodsDet?goodsId=' + goodsId + '&shopId=' + shopId + '&orderType=2'
+				})
+			},
+			getGuize() {
+				this.$Request.getT('/app/common/type/237').then(res => {
+					if (res.code == 0) {
+						this.content = res.data.value;
+						// this.tit = res.data.min
+					}
+				});
+			},
+			goBack() {
+				uni.navigateBack({
+
+				})
+			},
+			getSelect(e) {
+				console.log(e)
+				this.options4.forEach(res => {
+					if (res.id == e.id) {
+						res.select = true
+						this.page = 1
+						this.shopTypeId = e.id
+						this.getShopList();
+						this.isShow = false
+					} else {
+						res.select = false
+					}
+				})
+			},
+			confirm(e) {
+				console.log(e)
+				this.page = 1
+				this.current = e;
+
+				this.getShopList();
+			},
+			confirm2(e) {
+				console.log(e)
+				this.page = 1
+				this.current = e;
+
+				this.getShopList();
+			},
+			confirm3(e) {
+				console.log(e)
+				this.page = 1
+				this.current = e;
+
+				this.getShopList();
+			},
+			confirm4(e) {
+				console.log(e)
+				this.page = 1
+				this.shopTypeId = e
+
+				this.getShopList();
+			},
+
+			// 商户列表
+			getShopList() {
+				// this.lng = uni.getStorageSync('lng')
+				// this.lat = uni.getStorageSync('lat')
+				let data = {
+					page: this.page,
+					limit: this.limit,
+					screen: this.current,
+					shopTypeId: this.shopTypeId,
+					lng: uni.getStorageSync('lng'),
+					lat: uni.getStorageSync('lat'),
+					// activityId: this.activityId,
+				}
+				console.log(data,'输入数据') 
+				this.$Request.getT('/app/goods/selectShop', data).then(res => {
+					uni.hideLoading()
+					if (res.code == 0) {
+						console.log(res.data.list)
+						this.totalCount = res.data.totalCount
+						// 先筛选出 vipPromotion 为 1 的数据
+						const vipPromotionList = res.data.list.filter(ret => ret.vipPromotion === '1');
+						vipPromotionList.forEach(ret => {
+							if (ret.distance > 1000) {
+								ret.distance = Number((ret.distance / 1000)).toFixed(2) + "km"
+							} else {
+								if (ret.distance == 0) {
+									ret.distance = "0m";
+								} else {
+									ret.distance = Number(ret.distance).toFixed(1) + "m";
+								}
+							}
+							ret.shopLable = ret.shopLable ? ret.shopLable.split(',') : ''
+							ret.shopCover = ret.shopCover ? ret.shopCover.split(',') :
+								'https://mxys.chuanghai-tech.com/wmfile/20250814/fff4dc5d02ea4af881db9685f2e1e61d.png'
+							ret.errandTime = Math.round(ret.errandTime)
+							ret.shopScore = ret.shopScore.toFixed(1)
+						})
+
+
+						if (this.page == 1) {
+							this.shopList = vipPromotionList
+						} else {
+							this.shopList = [...this.shopList, ...vipPromotionList]
+						}
+						console.log(this.shopList)
+					}
+				})
+			},
+			// 商户类型
+			getShopType() {
+				this.$Request.getT('/app/shoptype/selectShopTypeList').then(res => {
+					if (res.code == 0) {
+						res.data.forEach(res => {
+							res.select = false
+						})
+						this.options4 = [...this.options4, ...res.data]
+					}
+				})
+			},
+			goNav(url,e,shuzu) {
+				this.shop = e
+				// console.log(e, '当前店铺')
+				
+				let myDate = new Date();
+				let hours = myDate.getHours();
+				let minute = myDate.getMinutes();
+				let openTime = this.shop.businessHours.split(':')[0] //开始小时
+				let openTime1 = this.shop.businessHours.split(':')[1] //开始分钟
+				let closeTime = this.shop.lockHours.split(':')[0] //结束小时
+				let closeTime1 = this.shop.lockHours.split(':')[1] //结束分钟.
+				// console.log(hours)
+				// console.log(minute)
+				// console.log(openTime)
+				// console.log(openTime1)
+				
+				// console.log(closeTime)
+				// console.log(closeTime1)
+				// console.log(minute >= closeTime1)
+				if (hours < openTime) {
+					this.hintShow = true
+					return
+				} else if (hours == openTime && minute < openTime1) {
+					this.hintShow = true
+					return
+				} else if (hours > closeTime) {
+					this.hintShow = true
+					return
+				} else if (hours == closeTime && minute >= closeTime1) {
+					this.hintShow = true
+					return
+				}
+				
+				// console.log(url)
+				let items = encodeURIComponent(JSON.stringify(shuzu));
+				// if (this.userId) {
+					uni.navigateTo({
+						url:'/pages/index/shop/index?shopId='+url+'&huoListss='+items+'&shopTypeId='+e.shopTypeId
+					})
+				// } else {
+				// 	uni.navigateTo({
+				// 		url: '/pages/public/login'
+				// 	})
+				// }
+			},
+			goShopDet(url, e) {
+				this.shop = e
+				// console.log(e, '当前店铺')
+
+				// let myDate = new Date();
+				// let hours = myDate.getHours();
+				// let minute = myDate.getMinutes();
+				// let openTime = this.shop.businessHours.split(':')[0] //开始小时
+				// let closeTime = this.shop.lockHours.split(':')[0] //结束小时
+				// let openTime1 = this.shop.businessHours.split(':')[1] //开始分钟
+				// let closeTime1 = this.shop.lockHours.split(':')[1] //结束分钟.
+				// console.log(hours)
+				// console.log(minute)
+				// console.log(openTime)
+				// console.log(openTime1)
+
+				// console.log(closeTime)
+				// console.log(closeTime1)
+				// console.log(minute >= closeTime1)
+				// if (hours < openTime) {
+				// 	this.hintShow = true
+				// 	return
+				// } else if (hours == openTime && minute < openTime1) {
+				// 	this.hintShow = true
+				// 	return
+				// } else if (hours >= closeTime) {
+				// 	this.hintShow = true
+				// 	return
+				// } else if (hours == closeTime && minute >= closeTime1) {
+				// 	this.hintShow = true
+				// 	return
+				// }
+
+				console.log(url)
+				if (this.userId) {
+					uni.navigateTo({
+						url
+					})
+				} else {
+					uni.navigateTo({
+						url: '/pages/public/login'
+					})
+				}
+			},
+		},
+		onReachBottom: function() {
+			if (this.shopList.length < this.totalCount) {
+				this.page = this.page + 1;
+				this.getShopList()
+			} else {
+				uni.showToast({
+					title: '已经到底了',
+					icon: 'none'
+				})
+			}
+
+		},
+	}
+</script>
+
+<style lang="scss">
+	.hd{
+		width: 100%;
+		height: auto;
+		background-color: rgb(248, 248, 248);
+		padding: 20rpx 0 20rpx 0;
+		z-index: 1;
+		// margin-top: 20rpx;
+		.hd-box{
+			width: 686rpx;
+			height: 100%;
+			.scroll-view_H{
+				width: 100%;
+				white-space: nowrap;
+			}
+			.hd-box-item{
+				display: inline-block;
+				padding: 10rpx 20rpx 10rpx 20rpx;
+				background-color: #ffffff;
+				font-size: 24rpx;
+				border-radius: 8rpx;
+				margin-right: 10rpx;
+			}
+			
+		}
+	}
+	.shopli{
+		
+	}
+	.select {
+		padding-bottom: 5rpx;
+		border-bottom: 6rpx solid #568D84;
+	}
+
+	.tabs {
+		margin: 20rpx 0;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+	}
+
+	.tabs_name {
+
+		flex: 1;
+		/* display: inline-block; */
+		text-align: center;
+		margin-bottom: 30rpx 0;
+		position: relative;
+		display: flex;
+		/* justify-content: space-between; */
+		align-items: center;
+	}
+
+	.tabs_name view {
+		margin: 0 auto;
+		display: flex;
+		align-items: center;
+	}
+
+	.tabs_2 {
+		/* width: 30%; */
+	}
+
+	.actives {
+		color: #007AFF;
+	}
+
+	.tabsicon {
+		position: absolute;
+		top: 0;
+		right: 22rpx;
+		width: 20rpx;
+		height: 40rpx;
+		z-index: 1;
+	}
+
+	.tabs_icon {
+		width: 12rpx;
+		height: 8rpx;
+		z-index: 1;
+		margin-left: 10rpx;
+	}
+
+	.icon1 {
+		/* position: absolute; */
+		/* top: 6rpx; */
+	}
+
+	.icon2 {
+		position: absolute;
+		bottom: 6rpx;
+	}
+
+
+	.hintPopul {
+		width: 100%;
+		height: 100vh;
+		position: fixed;
+		top: 0;
+		background: rgba(0, 0, 0, .4);
+		z-index: 999;
+	}
+
+	.content_ {
+		position: absolute;
+		left: 0;
+		right: 0;
+		top: 0;
+		bottom: 0;
+		margin: auto;
+		text-align: center;
+		width: 500rpx;
+		height: 400rpx;
+		border-radius: 20rpx;
+		background-color: #fff;
+		padding-top: 120rpx;
+	}
+
+	.content_ image {
+		position: absolute;
+		top: -50rpx;
+		left: 0;
+		right: 0;
+		margin: auto;
+	}
+
+	.hintText {
+		font-size: 30rpx;
+	}
+
+	.skuBtn {
+		width: 460rpx;
+		height: 60rpx;
+		line-height: 60rpx;
+		text-align: center;
+		background: #FCD202;
+		font-size: 28rpx;
+		border: 2rpx solid #FCD202;
+		color: #333333;
+		border-radius: 50rpx;
+		font-weight: 700;
+		margin: auto;
+	}
+
+	.lable {
+		border: 1rpx solid #FFE6D9;
+		height: 40rpx;
+		padding: 0 14rpx;
+		background: #FFE6D9;
+		border-radius: 4rpx;
+		font-weight: 500;
+		color: #FD6416;
+		font-size: 20rpx;
+		margin-right: 10rpx;
+		margin-bottom: 10rpx;
+	}
+</style>

+ 5 - 0
pages.json

@@ -337,6 +337,11 @@
 					"style": {
 						"navigationBarTitleText": "超级会员"
 					}
+				},{
+					"path": "vip/shop",
+					"style": {
+						"navigationBarTitleText": "会员商家"
+					}
 				}, {
 					"path": "myPingJia/myPingJia",
 					"style": {

+ 13 - 0
pages/index/index.vue

@@ -38,6 +38,9 @@
 					</u-grid>
 				</view>
 			</view>
+			<view class="padding-lr" @click="natiVip">
+				<image class="radius" style="width: 100%;height: 280rpx;" src="https://mxys.chuanghai-tech.com/wmfile/20251112/0bde5c4aa58644eab904520af3f1912a.png"></image>
+			</view>
 			<!-- 公告 -->
 			<!-- <view class="flex justify-between align-center bg-white padding-bottom padding-lr radius bg-white"
 				style="width: 100%;height: 100rpx;">
@@ -653,6 +656,16 @@
 			}
 		},
 		methods: {
+			//跳转到会员页
+			natiVip(){
+				if (this.token) {
+					uni.navigateTo({
+						url:'/my/vip/shop'
+					})
+				} else {
+					this.bindlogin()
+				}
+			},
 			//测试付钱
 			ceshi(){
 				console.log('付钱')

+ 35 - 6
pages/index/shop/confirmOrder.vue

@@ -116,6 +116,10 @@
 				<view>特殊地址跑腿费</view>
 				<view class="tosend_header_do_ri">¥{{ address.insideDeliveryFee }}</view>
 			</view>
+			<view class="tosend_header_do justify-between" v-if="Vipmoney.canReduceFlag=='1'">
+				<view>会员立减</view>
+				<view class="tosend_header_do_ri">- ¥{{ Vipmoney.reduceAmount }}</view>
+			</view>
 			<view class="tosend_header_do justify-between do_bot" @click="isShow">
 				<view>优惠券</view>
 				<view class="tosend_header_do_ri" v-if="coupon">- ¥{{ coupon.money }}</view>
@@ -358,6 +362,11 @@ export default {
 			youhui: false, //优惠活动
 			coupon: '', //选择的优惠券信息
 			huodong: '', //选择的活动信息
+			Vipmoney:{
+				canReduceFlag:'0',
+				reduceAmount:0,
+				vipReduceDesc:''
+			},//会员立减金额
 			couponList: [],
 			huoList: [], //可用活动
 			orderType: 2,
@@ -456,6 +465,7 @@ export default {
 	},
 	onShow() {
 		this.getMsgData()
+		this.getvipMoney()
 		this.addressId = this.addressId ? this.addressId : uni.getStorageSync('addressId')
 		if (this.addressId) {
 			console.log(this.addressId, '地址id')
@@ -482,6 +492,16 @@ export default {
 		}
 	},
 	methods: {
+		//获取会员立减金额
+		getvipMoney() {
+			var shopId =this.shopId
+			this.$Request.get(`/app/vip/get-can-reduce/${shopId}`).then((res) => {
+				console.log(res, '会员立减')
+				if (res.code == 0 && res.data) {
+					this.Vipmoney=res.data
+				}
+			})
+		},
 		getIntegralRules() {
 			let data = {
 				money: this.totalPrice1
@@ -799,7 +819,7 @@ export default {
 			}
 			if (this.coupon) {
 				let totalMoney = parseFloat(
-					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0).toFixed(2)
+					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
 				)
 				if (totalMoney <= 0) {
 					this.totalPrice1 = 0.01
@@ -810,7 +830,16 @@ export default {
 
 			if (this.huodong) {
 				let totalMoney = parseFloat(
-					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0).toFixed(2)
+					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
+				)
+				if (totalMoney <= 0) {
+					this.totalPrice1 = 0.01
+				} else {
+					this.totalPrice1 = totalMoney
+				}
+			}if (this.Vipmoney.canReduceFlag=='1') {
+				let totalMoney = parseFloat(
+					this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0).toFixed(2)
 				)
 				if (totalMoney <= 0) {
 					this.totalPrice1 = 0.01
@@ -838,7 +867,7 @@ export default {
 				this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
 			}
 
-			let totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)).toFixed(2)
+			let totalMoney = parseFloat(this.totalPrice1 - (this.coupon.money ? this.coupon.money : 0) - (this.huodong.discountAmount ? this.huodong.discountAmount : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
 
 			if (totalMoney <= 0) {
 				this.totalPrice1 = 0.01
@@ -864,7 +893,7 @@ export default {
 			} else {
 				this.totalPrice1 = parseFloat(this.totalPrice + this.dabaoMoney).toFixed(2)
 			}
-			let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)).toFixed(2)
+			let totalMoney = parseFloat(this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)).toFixed(2)
 			if (totalMoney <= 0) {
 				this.totalPrice1 = 0.01
 			} else {
@@ -901,7 +930,7 @@ export default {
 							}
 
 							let totalMoney = parseFloat(
-								this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)
+								this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
 							).toFixed(2)
 
 							if (totalMoney <= 0) {
@@ -946,7 +975,7 @@ export default {
 							}
 
 							let totalMoney = parseFloat(
-								this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)
+								this.totalPrice1 - (this.huodong.discountAmount ? this.huodong.discountAmount : 0) - (this.coupon.money ? this.coupon.money : 0)-(this.Vipmoney.reduceAmount?this.Vipmoney.reduceAmount:0)
 							).toFixed(2)
 
 							if (totalMoney <= 0) {

+ 1 - 1
pages/index/shop/index.vue

@@ -1008,7 +1008,7 @@ export default {
 				page: this.page,
 				limit: this.limit
 			}
-			// console.log(dataRight)
+			console.log(dataRight,'ll')
 
 			this.$Request.get('/app/goods/selectSupermarketGoodsList', dataRight).then((res) => {
 				// console.log(res, '9996329')