ソースを参照

添加积分功能

xiaoxin 1 年間 前
コミット
8f07ea1417
5 ファイル変更550 行追加418 行削除
  1. 8 8
      common/config.js
  2. 266 263
      my/integral/index.vue
  3. 129 144
      my/integral/integralDet.vue
  4. 73 1
      pages/index/shop/confirmOrder.vue
  5. 74 2
      pages/index/shop/payOrder.vue

+ 8 - 8
common/config.js

@@ -1,13 +1,13 @@
-const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";
-const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";
-const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss/websocket/"
-const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss/ordersChat/"
+// const ROOTPATH = "https://mxys.chuanghai-tech.com/sqx_fast";
+// const ROOTPATH1 = "https://mxys.chuanghai-tech.com/sqx_fast";
+// const ROOTPATH2 = "wss://mxys.chuanghai-tech.com/wss/websocket/"
+// const ROOTPATH3 = "wss://mxys.chuanghai-tech.com/wss/ordersChat/"
 
 
-// const ROOTPATH = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
-// 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 = "https://mxys.chuanghai-tech.com/wm-test/wm-api/sqx_fast";
+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/"
 
 module.exports = {
 	APIHOST: ROOTPATH,

+ 266 - 263
my/integral/index.vue

@@ -1,263 +1,266 @@
-<template>
-	<view class="integral_all">
-		<!-- 积分信息 -->
-		<view class="information">
-			<view class="information_le">
-				<view class="information_text1">当前可用积分</view>
-				<view class="information_text2">{{integralNum}}</view>
-				<view class="information_text3" @click="goDet(1)" >积分明细 <u-icon name="arrow-right" size="28"></u-icon></view>
-			</view>
-			<view class="information_ri">
-				
-				<image src="../static/integral/rectangular.png" mode="r"></image>
-				
-				<view class="information_text4" @click="goDet(2)">兑换记录</view>
-			</view>
-			<!-- <view class="duihuan"  @click="goDet(2)">
-				兑换记录
-			</view> -->
-		</view>
-		<!-- 兑换商品 -->
-		<view class="integral_goods">
-			<view class="integral_goods_sty">
-				<view class="integral_goods_sty1" v-for="(item,index) in dataList" :key='index' >
-					<image :src="item.couponPicture" mode=""></image>
-					<view class="integral_goods_text">{{item.couponName}}</view>
-					<view class="integral_goods_sty_bo">
-						<view class="integral_goods_sty_bo_le"><text
-								class="integral_goods_text2">{{item.needIntegral}}</text>积分</view>
-						<view class="integral_goods_sty_bo_ri" @click="exchange(item)">兑换</view>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				btnnum: 0,
-				page: 1,
-				limit: 10,
-				dataList: [],
-				integralNum: 0
-			};
-		},
-		onLoad() {
-			this.getIntegral()
-			this.getData()
-		},
-		methods: {
-			exchange(e) {
-				let that = this
-				uni.showModal({
-					title: '提示',
-					content: '确定兑换' + e.couponName + '吗?',
-					success: function(res) {
-						if (res.confirm) {
-							console.log('用户点击确定');
-							that.$Request.post("/app/coupon/buyCoupon", {
-								couponId: e.couponId
-							}).then(res => {
-								if (res.code == 0) {
-									uni.showToast({
-										title: '兑换成功'
-									})
-									that.getIntegral()
-								} else {
-									uni.showToast({
-										title: res.msg,
-										icon: 'none'
-									})
-								}
-							});
-						} else if (res.cancel) {
-							console.log('用户点击取消');
-						}
-					}
-				});
-			},
-			goDet(e) {
-				uni.navigateTo({
-					url:'/my/integral/integralDet?classify='+e
-				})
-			},
-			change(e) {
-				this.btnnum = e
-				console.log(this.btnnum)
-			},
-			getIntegral() {
-				this.$Request.get("/app/userintegral/selectUserIntegral").then(res => {
-					if (res.code == 0) {
-						this.integralNum = res.data.integralNum
-					}
-				});
-			},
-			getData() {
-				let data = {
-					page: this.page,
-					limit: this.limit,
-					shopId:0
-				}
-				this.$Request.get("/app/coupon/selectCouponList", data).then(res => {
-					if (res.code == 0) {
-						if (this.page == 1) {
-							this.dataList = res.data.list
-						} else {
-							this.dataList = [...this.dataList, ...res.data.list]
-						}
-					}
-				});
-			}
-		},
-		onReachBottom: function() {
-			this.page = this.page + 1;
-			this.getData();
-		},
-	}
-</script>
-
-<style scoped>
-	.integral_all {
-		width: 100%;
-		background-color: #FCD202;
-	}
-
-	/* 积分信息 */
-	.information {
-		width: 94%;
-		padding: 4% 3% 5%;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-	}
-
-	.information_le {
-		/* width: 70%; */
-		color: #FFFFFF;
-	}
-
-	.information_text1 {
-		font-size: 28rpx;
-		font-weight: 500;
-		color: #FFFFFF;
-		margin-bottom: 10upx;
-		line-height: 32rpx
-	}
-
-	.information_text2 {
-		font-size: 60rpx;
-		font-weight: bold;
-		color: #FFFFFF;
-		margin-bottom: 10upx;
-	}
-
-	.information_text3 {
-		font-size: 28rpx;
-		font-weight: 500;
-		color: #FFFFFF;
-		line-height: 32rpx;
-	}
-
-	.information_ri {
-		/* width: 30%; */
-		/* padding-top: 50rpx; */
-		position: relative;
-	}
-
-	.information_ri image {
-		width: 218rpx;
-		height: 98rpx;
-	}
-
-	.information_text4 {
-		color: #FFFFFF;
-		position: absolute;
-		/* bottom: 0; */
-		left: 51rpx;
-		top: 23rpx;
-		font-size: 28upx;
-		/* right: 0; */
-		/* margin: auto; */
-	}
-	.duihuan {
-		padding: 8rpx 18rpx;
-		background-color: #FCD202;
-		box-shadow: 0 0 10rpx #FCD202;
-	}
-
-	/* 兑换商品 */
-	.integral_goods {
-		width: 100%;
-		background-color: #F5F5F5;
-		border-top-left-radius: 18rpx;
-		border-top-right-radius: 18rpx;
-		padding-bottom: 3%;
-	}
-
-	.integral_goods_sty {
-		width: 94%;
-		margin: 0 auto;
-		display: flex;
-		flex-wrap: wrap;
-		justify-content: space-between;
-		padding-top: 3%;
-	}
-
-	.integral_goods_sty1 {
-		width: 48.5%;
-		/* margin-left: 3%; */
-		background-color: #FFFFFF;
-		padding: 0 2% 4%;
-		border-radius: 18rpx;
-		margin-bottom: 3%;
-	}
-
-	/* .integral_goods_sty1:first-child {
-		margin-left: 0;
-	} */
-
-	.integral_goods_sty1 image {
-		width: 100%;
-		height: 240upx;
-	}
-
-	.integral_goods_text {
-		font-size: 35rpx;
-		font-weight: bold;
-		color: #333333;
-		line-height: 1.8;
-	}
-
-	.integral_goods_sty_bo {
-		display: flex;
-		margin-top: 2%;
-	}
-
-	.integral_goods_sty_bo_le {
-		width: 65%;
-		color: #999999;
-		font-size: 30rpx;
-	}
-
-	.integral_goods_text2 {
-		color: #D80204;
-		
-		font-size: 28rpx;
-		margin-right: 4upx;
-		font-weight: bold;
-	}
-
-	.integral_goods_sty_bo_ri {
-		width: 35%;
-		background-color: #FCD202;
-		font-size: 24rpx;
-		font-weight: bold;
-		color: #333333;
-		padding: 2% 0;
-		text-align: center;
-		border-radius: 50rpx;
-	}
-</style>
+<template>
+	<view class="integral_all">
+		<!-- 积分信息 -->
+		<view class="information">
+			<view class="information_le">
+				<view class="information_text1">当前可用积分</view>
+				<view class="information_text2">{{ integralNum }}</view>
+				<view class="information_text3" @click="goDet(1)">
+					积分明细
+					<u-icon name="arrow-right" size="28"></u-icon>
+				</view>
+			</view>
+			<view class="information_ri">
+				<image src="../static/integral/rectangular.png" mode="r"></image>
+
+				<view class="information_text4" @click="goDet(2)">兑换记录</view>
+			</view>
+		</view>
+		<!-- 兑换商品 -->
+		<view class="integral_goods">
+			<view class="integral_goods_sty">
+				<view class="integral_goods_sty1" v-for="(item, index) in dataList" :key="index">
+					<image :src="item.couponPicture" mode=""></image>
+					<view class="integral_goods_text">{{ item.couponName }}</view>
+					<view class="integral_goods_sty_bo">
+						<view class="integral_goods_sty_bo_le">
+							<text class="integral_goods_text2">{{ item.needIntegral }}</text>
+							积分
+						</view>
+						<view class="integral_goods_sty_bo_ri" @click="exchange(item)">兑换</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			btnnum: 0,
+			page: 1,
+			limit: 10,
+			dataList: [],
+			integralNum: 0
+		}
+	},
+	onLoad() {
+		this.getIntegral()
+		this.getData()
+	},
+	methods: {
+		exchange(e) {
+			let that = this
+			uni.showModal({
+				title: '提示',
+				content: '确定兑换' + e.couponName + '吗?',
+				success: function (res) {
+					if (res.confirm) {
+						console.log('用户点击确定')
+						that.$Request
+							.post('/app/coupon/buyCoupon', {
+								couponId: e.couponId
+							})
+							.then((res) => {
+								if (res.code == 0) {
+									uni.showToast({
+										title: '兑换成功'
+									})
+									that.getIntegral()
+								} else {
+									uni.showToast({
+										title: res.msg,
+										icon: 'none'
+									})
+								}
+							})
+					} else if (res.cancel) {
+						console.log('用户点击取消')
+					}
+				}
+			})
+		},
+		goDet(e) {
+			uni.navigateTo({
+				url: '/my/integral/integralDet?classify=' + e
+			})
+		},
+		change(e) {
+			this.btnnum = e
+			console.log(this.btnnum)
+		},
+		getIntegral() {
+			this.$Request.get('/app/userintegral/selectUserIntegral').then((res) => {
+				if (res.code == 0) {
+					this.integralNum = res.data.integralNum
+				}
+			})
+		},
+		getData() {
+			let data = {
+				page: this.page,
+				limit: this.limit,
+				shopId: 0
+			}
+			this.$Request.get('/app/coupon/selectCouponList', data).then((res) => {
+				if (res.code == 0) {
+					if (this.page == 1) {
+						this.dataList = res.data.list
+					} else {
+						this.dataList = [...this.dataList, ...res.data.list]
+					}
+				}
+			})
+		}
+	},
+	onReachBottom: function () {
+		this.page = this.page + 1
+		this.getData()
+	}
+}
+</script>
+
+<style scoped>
+.integral_all {
+	width: 100%;
+	background-color: #fcd202;
+}
+
+/* 积分信息 */
+.information {
+	width: 94%;
+	padding: 4% 3% 5%;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+}
+
+.information_le {
+	/* width: 70%; */
+	color: #ffffff;
+}
+
+.information_text1 {
+	font-size: 28rpx;
+	font-weight: 500;
+	color: #ffffff;
+	margin-bottom: 10upx;
+	line-height: 32rpx;
+}
+
+.information_text2 {
+	font-size: 60rpx;
+	font-weight: bold;
+	color: #ffffff;
+	margin-bottom: 10upx;
+}
+
+.information_text3 {
+	font-size: 28rpx;
+	font-weight: 500;
+	color: #ffffff;
+	line-height: 32rpx;
+}
+
+.information_ri {
+	/* width: 30%; */
+	/* padding-top: 50rpx; */
+	position: relative;
+}
+
+.information_ri image {
+	width: 218rpx;
+	height: 98rpx;
+}
+
+.information_text4 {
+	color: #ffffff;
+	position: absolute;
+	/* bottom: 0; */
+	left: 51rpx;
+	top: 23rpx;
+	font-size: 28upx;
+	/* right: 0; */
+	/* margin: auto; */
+}
+.duihuan {
+	padding: 8rpx 18rpx;
+	background-color: #fcd202;
+	box-shadow: 0 0 10rpx #fcd202;
+}
+
+/* 兑换商品 */
+.integral_goods {
+	width: 100%;
+	background-color: #f5f5f5;
+	border-top-left-radius: 18rpx;
+	border-top-right-radius: 18rpx;
+	padding-bottom: 3%;
+}
+
+.integral_goods_sty {
+	width: 94%;
+	margin: 0 auto;
+	display: flex;
+	flex-wrap: wrap;
+	justify-content: space-between;
+	padding-top: 3%;
+}
+
+.integral_goods_sty1 {
+	width: 48.5%;
+	/* margin-left: 3%; */
+	background-color: #ffffff;
+	padding: 0 2% 4%;
+	border-radius: 18rpx;
+	margin-bottom: 3%;
+}
+
+/* .integral_goods_sty1:first-child {
+		margin-left: 0;
+	} */
+
+.integral_goods_sty1 image {
+	width: 100%;
+	height: 240upx;
+}
+
+.integral_goods_text {
+	font-size: 35rpx;
+	font-weight: bold;
+	color: #333333;
+	line-height: 1.8;
+}
+
+.integral_goods_sty_bo {
+	display: flex;
+	margin-top: 2%;
+}
+
+.integral_goods_sty_bo_le {
+	width: 65%;
+	color: #999999;
+	font-size: 30rpx;
+}
+
+.integral_goods_text2 {
+	color: #d80204;
+
+	font-size: 28rpx;
+	margin-right: 4upx;
+	font-weight: bold;
+}
+
+.integral_goods_sty_bo_ri {
+	width: 35%;
+	background-color: #fcd202;
+	font-size: 24rpx;
+	font-weight: bold;
+	color: #333333;
+	padding: 2% 0;
+	text-align: center;
+	border-radius: 50rpx;
+}
+</style>

+ 129 - 144
my/integral/integralDet.vue

@@ -1,144 +1,129 @@
-<template>
-	<view>
-		<view style="text-align: left;padding-bottom: 10rpx;">
-			<view v-for="(item, index) in list" :key="index" class="item">
-				<view>
-					<!-- <view style="margin-bottom: 8upx;text-align: right;">
-						<text v-if="item.type == 1" style="margin-bottom: 8upx;color: #ecd4b4">充值</text>
-						<text v-if="item.type == 2" style="margin-bottom: 8upx;color: #ecd4b4">提现</text>
-					</view> -->
-					<view style="color: #999999;font-size: 28upx;">
-						<view style="margin-bottom: 8upx">{{item.title}}</view>
-						<!-- <view v-if="item.classify === 2" style="margin-bottom: 8upx"> 返佣类型:直属返佣</view> -->
-						<!-- <view v-if="item.classify === 3" style="margin-bottom: 8upx"> 返佣类型:非直属支付</view> -->
-						<view style="margin-bottom: 8upx">{{item.content}}</view>
-						<view style="margin-bottom: 8upx"> 创建时间:{{item.createTime}}</view>
-						<view style="margin-bottom: 8upx;text-align: right;">
-							<text v-if="item.type == 1" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text style="color: #000000;">+</text>{{item.num}}积分</text>
-							<text v-if="item.type == 2" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text style="color: #000000;">-</text>{{item.num}}积分</text>
-						</view>
-					</view>
-				</view>
-			</view>
-			<!-- 加载更多提示 -->
-			<!-- <view class="s-col is-col-24" v-if="list.length > 0">
-				<load-more :loadingType="loadingType" :contentText="contentText"></load-more>
-			</view> -->
-			<!-- 加载更多提示 -->
-			<!-- <empty v-if="list.length === 0" des="暂无明细数据" show="false"></empty> -->
-			<empty v-if="list.length == 0" content="暂无数据" ></empty>
-		</view>
-	</view>
-</template>
-
-<script>
-	import empty from '@/components/empty.vue'
-	export default {
-		components: {
-			empty
-		},
-		data() {
-			return {
-				list: [],
-				page: 1,
-				limit: 10,
-				tabIndex: 1,
-				checkReZhiShu: '否',
-				checkReTuanZhang: '否',
-				checkReFeiZhiShu: '否',
-				scrollTop: false,
-				contentText: {
-					contentdown: '上拉显示更多',
-					contentrefresh: '正在加载...',
-					contentnomore: '没有更多数据了'
-				},
-				classify: '',
-				totalCount: 0
-			}
-		},
-		onLoad(option) {
-			this.classify = option.classify
-			if(this.classify == 2) {
-				uni.setNavigationBarTitle({
-					title: "兑换记录"
-				});
-			}
-			this.$queue.showLoading("加载中...");
-			this.getList();
-		},
-		onPageScroll: function(e) {
-			this.scrollTop = e.scrollTop > 200;
-		},
-		methods: {
-			getList() {
-				let data = {
-					page: this.page,
-					limit: this.limit,
-					classify: this.classify==2?this.classify:''
-				}
-				this.$Request.getT('/app/userintegraldetails/selectIntegraldetailsList',data ).then(res => {
-					if (res.code === 0) {
-						this.totalCount = res.data.totalCount
-						if (this.page === 1) {
-							this.list = res.data.list;
-						} else {
-							this.list = [...this.list, ...res.data.list];
-						}
-					} 
-					uni.stopPullDownRefresh();
-					uni.hideLoading();
-				});
-			}
-		},
-		onReachBottom: function() {
-			// this.page = this.page + 1;
-			// this.getList();
-			if(this.list.length<this.totalCount) {
-				this.page = this.page + 1;
-				this.getList()
-			} else {
-				uni.showToast({
-					title: '已经到底了',
-					icon: 'none'
-				})
-			}
-		},
-		onPullDownRefresh: function() {
-			this.page = 1;
-			this.getList();
-		}
-	}
-</script>
-
-<style lang="less">
-	page {
-		// background: #1c1b20;
-	}
-
-	.tui-tab-item-title {
-		// color: #ffffff;
-		font-size: 30rpx;
-		height: 80rpx;
-		line-height: 80rpx;
-		flex-wrap: nowrap;
-		white-space: nowrap;
-	}
-
-	.tui-tab-item-title-active {
-		border-bottom: 1px solid #5E81F9;
-		color: #5E81F9;
-		font-size: 32upx;
-		font-weight: bold;
-		border-bottom-width: 6upx;
-		text-align: center;
-	}
-	
-	.item {
-		background: #FFFFFF;
-		padding: 32rpx;
-		margin: 32rpx;
-		font-size: 28rpx;
-		box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
-		border-radius: 16upx;
-	}
-</style>
+<template>
+	<view>
+		<view style="text-align: left; padding-bottom: 10rpx">
+			<view v-for="(item, index) in list" :key="index" class="item">
+				<view>
+					<view style="color: #999999; font-size: 28upx">
+						<view style="margin-bottom: 8upx">{{ item.title }}</view>
+						<view style="margin-bottom: 8upx">{{ item.content }}</view>
+						<view style="margin-bottom: 8upx" v-if="classify == 1 && item.orderNumber">订单号:{{ item.orderNumber }}</view>
+						<view style="margin-bottom: 8upx">获取时间:{{ item.createTime }}</view>
+						<view style="margin-bottom: 8upx" v-if="classify == 1">有效期:{{ item.expTime ? item.expTime : '无时间限制' }}</view>
+						<view style="margin-bottom: 8upx; text-align: right">
+							<text v-if="item.type == 1" style="color: #ecd4b4; font-size: 32upx; font-weight: 600">
+								<text style="color: #000000">+</text>
+								{{ item.num }}积分
+							</text>
+							<text v-if="item.type == 2" style="color: #ecd4b4; font-size: 32upx; font-weight: 600">
+								<text style="color: #000000">-</text>
+								{{ item.num }}积分
+							</text>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<empty v-if="list.length == 0" content="暂无数据"></empty>
+		</view>
+	</view>
+</template>
+
+<script>
+import empty from '@/components/empty.vue'
+export default {
+	components: {
+		empty
+	},
+	data() {
+		return {
+			list: [],
+			page: 1,
+			limit: 10,
+			classify: '',
+			totalCount: 0
+		}
+	},
+	onLoad(option) {
+		this.classify = option.classify
+		if (this.classify == 2) {
+			uni.setNavigationBarTitle({
+				title: '兑换记录'
+			})
+		}
+		this.$queue.showLoading('加载中...')
+		this.getList()
+	},
+	methods: {
+		getList() {
+			let data = {
+				page: this.page,
+				limit: this.limit,
+				classify: this.classify == 2 ? this.classify : ''
+			}
+			this.$Request.getT('/app/userintegraldetails/selectIntegraldetailsList', data).then((res) => {
+				// console.log(res, '999')
+				if (res.code === 0) {
+					this.totalCount = res.data.totalCount
+					if (this.page === 1) {
+						this.list = res.data.list
+					} else {
+						this.list = [...this.list, ...res.data.list]
+					}
+				}
+				uni.stopPullDownRefresh()
+				uni.hideLoading()
+			})
+		}
+	},
+	onReachBottom: function () {
+		// this.page = this.page + 1;
+		// this.getList();
+		if (this.list.length < this.totalCount) {
+			this.page = this.page + 1
+			this.getList()
+		} else {
+			uni.showToast({
+				title: '已经到底了',
+				icon: 'none'
+			})
+		}
+	},
+	onPullDownRefresh: function () {
+		this.page = 1
+		this.getList()
+	}
+}
+</script>
+
+<style lang="less">
+page {
+	// background: #1c1b20;
+}
+
+.tui-tab-item-title {
+	// color: #ffffff;
+	font-size: 30rpx;
+	height: 80rpx;
+	line-height: 80rpx;
+	flex-wrap: nowrap;
+	white-space: nowrap;
+}
+
+.tui-tab-item-title-active {
+	border-bottom: 1px solid #5e81f9;
+	color: #5e81f9;
+	font-size: 32upx;
+	font-weight: bold;
+	border-bottom-width: 6upx;
+	text-align: center;
+}
+
+.item {
+	background: #ffffff;
+	padding: 32rpx;
+	margin: 32rpx;
+	font-size: 28rpx;
+	box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
+	border-radius: 16upx;
+}
+</style>

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

@@ -130,6 +130,23 @@
 				</view>
 			</view>
 		</view>
+
+		<!-- 积分介绍 -->
+		<view class="food">
+			<view class="food_top">
+				<view class="">获取积分</view>
+				<view class="">{{ intergral }}</view>
+			</view>
+			<view class="food_bottom">
+				实付满{{ ruleAmount1 }}元得
+				<text class="bottom_text">{{ ruleValue1 }}分</text>
+				,超过{{ ruleMaxAmount }}元部分,每满{{ ruleAmount2 }}元得
+				<text class="bottom_text">{{ ruleValue2 }}分</text>
+				;每笔订单上限
+				<text class="bottom_text">{{ maxIntegral }}分</text>
+			</view>
+		</view>
+
 		<!-- 订单备注 -->
 		<view class="food">
 			<view class="padding-tb-sm text-lg text-bold text-bold text-black">订单备注</view>
@@ -345,7 +362,21 @@ export default {
 			autoSendOrder: 0, //autoSendOrder为1商家自配,0平台配送
 			reservationOpenFlag: 0, //1预约,0不预约
 			status: null,
-			showReach: null
+			showReach: null,
+			// 基础实付满多少
+			ruleAmount1: '',
+			// 基础实付满多少送的积分
+			ruleValue1: '',
+			// 超过多少
+			ruleMaxAmount: '',
+			// 第二阶段实付满多少
+			ruleAmount2: '',
+			// 第二阶段实付满多少送的积分
+			ruleValue2: '',
+			// 每笔订单获取的积分上限
+			maxIntegral: '',
+			// 可获得积分
+			intergral: ''
 		}
 	},
 	onLoad(option) {
@@ -473,7 +504,29 @@ export default {
 			this.getHuoList()
 		}, 60 * 1000) // 60 * 1000 毫秒代表一分钟
 	},
+	watch: {
+		totalPrice1() {
+			this.getIntegralRules()
+		}
+	},
 	methods: {
+		getIntegralRules() {
+			let data = {
+				money: this.totalPrice1
+			}
+			this.$Request.get('/app/userintegral/getIntegralByMoney', data).then((res) => {
+				// console.log(res, '999')
+				if (res.code == 0) {
+					this.intergral = res.data.intergral
+					this.maxIntegral = res.data.maxIntegral
+					this.ruleAmount1 = res.data.ruleAmount1
+					this.ruleAmount2 = res.data.ruleAmount2
+					this.ruleMaxAmount = res.data.ruleMaxAmount
+					this.ruleValue1 = res.data.ruleValue1
+					this.ruleValue2 = res.data.ruleValue2
+				}
+			})
+		},
 		//获取骑手上下班时间
 		getQishou() {
 			this.$Request.get('/app/tbindent/work-time').then((res) => {
@@ -1701,6 +1754,25 @@ export default {
 	border-radius: 18rpx;
 }
 
+.food_top {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	font-size: 32rpx;
+	font-weight: bold;
+}
+
+.food_bottom {
+	margin-top: 20rpx;
+	color: #666666;
+	font-size: 28rpx;
+	line-height: 45rpx;
+}
+
+.bottom_text {
+	color: #ea0018;
+}
+
 .tosend_header_food {
 	width: 100%;
 	display: flex;

+ 74 - 2
pages/index/shop/payOrder.vue

@@ -122,6 +122,23 @@
 				</view>
 			</view>
 		</view>
+
+		<!-- 积分介绍 -->
+		<view class="food">
+			<view class="food_top">
+				<view class="">获取积分</view>
+				<view class="">{{ intergral }}</view>
+			</view>
+			<view class="food_bottom">
+				实付满{{ ruleAmount1 }}元得
+				<text class="bottom_text">{{ ruleValue1 }}分</text>
+				,超过{{ ruleMaxAmount }}元部分,每满{{ ruleAmount2 }}元得
+				<text class="bottom_text">{{ ruleValue2 }}分</text>
+				;每笔订单上限
+				<text class="bottom_text">{{ maxIntegral }}分</text>
+			</view>
+		</view>
+
 		<!-- 订单备注 -->
 		<view class="food">
 			<view class="padding-tb-sm text-lg text-bold text-bold text-black">订单备注</view>
@@ -331,7 +348,21 @@ export default {
 
 			ifPaotui: 0, //是否满减
 			reservationOpenFlag: 0, //1预约,0不预约
-			shopId: ''
+			shopId: '',
+			// 基础实付满多少
+			ruleAmount1: '',
+			// 基础实付满多少送的积分
+			ruleValue1: '',
+			// 超过多少
+			ruleMaxAmount: '',
+			// 第二阶段实付满多少
+			ruleAmount2: '',
+			// 第二阶段实付满多少送的积分
+			ruleValue2: '',
+			// 每笔订单获取的积分上限
+			maxIntegral: '',
+			// 可获得积分
+			intergral: ''
 		}
 	},
 	onLoad(option) {
@@ -439,7 +470,29 @@ export default {
 			this.getHuoList()
 		}, 60 * 1000) // 60 * 1000 毫秒代表一分钟
 	},
+	watch: {
+		totalPrice1() {
+			this.getIntegralRules()
+		}
+	},
 	methods: {
+		getIntegralRules() {
+			let data = {
+				money: this.totalPrice1
+			}
+			this.$Request.get('/app/userintegral/getIntegralByMoney', data).then((res) => {
+				console.log(res, '999')
+				if (res.code == 0) {
+					this.intergral = res.data.intergral
+					this.maxIntegral = res.data.maxIntegral
+					this.ruleAmount1 = res.data.ruleAmount1
+					this.ruleAmount2 = res.data.ruleAmount2
+					this.ruleMaxAmount = res.data.ruleMaxAmount
+					this.ruleValue1 = res.data.ruleValue1
+					this.ruleValue2 = res.data.ruleValue2
+				}
+			})
+		},
 		//获取骑手上下班时间
 		getQishou() {
 			this.$Request.get('/app/tbindent/work-time').then((res) => {
@@ -1497,6 +1550,25 @@ export default {
 	border-radius: 18rpx;
 }
 
+.food_top {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	font-size: 32rpx;
+	font-weight: bold;
+}
+
+.food_bottom {
+	margin-top: 20rpx;
+	color: #666666;
+	font-size: 28rpx;
+	line-height: 45rpx;
+}
+
+.bottom_text {
+	color: #ea0018;
+}
+
 .tosend_header_food {
 	width: 100%;
 	display: flex;
@@ -1647,4 +1719,4 @@ export default {
 		top: -20rpx; */
 	z-index: 9;
 }
-</style>
+</style>