xiaoxin 1 سال پیش
والد
کامیت
4ab5298f7a
5فایلهای تغییر یافته به همراه44 افزوده شده و 26 حذف شده
  1. 1 0
      common/config.js
  2. 2 2
      my/integral/integralDet.vue
  3. 20 11
      pages/index/shop/confirmOrder.vue
  4. 15 8
      pages/index/shop/payOrder.vue
  5. 6 5
      pages/order/feedback.vue

+ 1 - 0
common/config.js

@@ -9,6 +9,7 @@ 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,
 	APIHOST1: ROOTPATH1,

+ 2 - 2
my/integral/integralDet.vue

@@ -8,7 +8,7 @@
 						<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" 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>
@@ -126,4 +126,4 @@ page {
 	box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
 	border-radius: 16upx;
 }
-</style>
+</style>

+ 20 - 11
pages/index/shop/confirmOrder.vue

@@ -132,7 +132,7 @@
 		</view>
 
 		<!-- 积分介绍 -->
-		<view class="food">
+		<view class="food" v-if="isIntegral">
 			<view class="food_top">
 				<view class="">获取积分</view>
 				<view class="">{{ intergral }}</view>
@@ -364,19 +364,21 @@ export default {
 			status: null,
 			showReach: null,
 			// 基础实付满多少
-			ruleAmount1: '',
+			ruleAmount1: 0,
 			// 基础实付满多少送的积分
-			ruleValue1: '',
+			ruleValue1: 0,
 			// 超过多少
-			ruleMaxAmount: '',
+			ruleMaxAmount: 0,
 			// 第二阶段实付满多少
-			ruleAmount2: '',
+			ruleAmount2: 0,
 			// 第二阶段实付满多少送的积分
-			ruleValue2: '',
+			ruleValue2: 0,
 			// 每笔订单获取的积分上限
-			maxIntegral: '',
+			maxIntegral: 0,
 			// 可获得积分
-			intergral: ''
+			intergral: 0,
+			// 是否显示积分模块
+			isIntegral: false
 		}
 	},
 	onLoad(option) {
@@ -515,7 +517,7 @@ export default {
 				money: this.totalPrice1
 			}
 			this.$Request.get('/app/userintegral/getIntegralByMoney', data).then((res) => {
-				// console.log(res, '999')
+				console.log(res, '999')
 				if (res.code == 0) {
 					this.intergral = res.data.intergral
 					this.maxIntegral = res.data.maxIntegral
@@ -524,6 +526,11 @@ export default {
 					this.ruleMaxAmount = res.data.ruleMaxAmount
 					this.ruleValue1 = res.data.ruleValue1
 					this.ruleValue2 = res.data.ruleValue2
+					if (res.data.flag == 1) {
+						this.isIntegral = true
+					} else {
+						this.isIntegral = false
+					}
 				}
 			})
 		},
@@ -1261,7 +1268,7 @@ export default {
 				// #ifdef MP-WEIXIN
 
 				this.$Request.get('/app/new-pay/enable-new-pay').then((res) => {
-					// console.log(res, '987')
+					console.log(res, '987')
 					if (res.code == 0) {
 						let data = {
 							userId: uni.getStorageSync('userId'),
@@ -1277,11 +1284,13 @@ export default {
 							type: res.enable ? 1 : 3
 						}
 
-						// console.log(data)
+						console.log(data)
 
 						if (res.enable) {
+							console.log('xin')
 							this.newPay(data)
 						} else {
+							console.log('jiu')
 							this.oldPay(data)
 						}
 					}

+ 15 - 8
pages/index/shop/payOrder.vue

@@ -124,7 +124,7 @@
 		</view>
 
 		<!-- 积分介绍 -->
-		<view class="food">
+		<view class="food" v-if="isIntegral">
 			<view class="food_top">
 				<view class="">获取积分</view>
 				<view class="">{{ intergral }}</view>
@@ -350,19 +350,21 @@ export default {
 			reservationOpenFlag: 0, //1预约,0不预约
 			shopId: '',
 			// 基础实付满多少
-			ruleAmount1: '',
+			ruleAmount1: 0,
 			// 基础实付满多少送的积分
-			ruleValue1: '',
+			ruleValue1: 0,
 			// 超过多少
-			ruleMaxAmount: '',
+			ruleMaxAmount: 0,
 			// 第二阶段实付满多少
-			ruleAmount2: '',
+			ruleAmount2: 0,
 			// 第二阶段实付满多少送的积分
-			ruleValue2: '',
+			ruleValue2: 0,
 			// 每笔订单获取的积分上限
-			maxIntegral: '',
+			maxIntegral: 0,
 			// 可获得积分
-			intergral: ''
+			intergral: 0,
+			// 是否显示积分模块
+			isIntegral: false
 		}
 	},
 	onLoad(option) {
@@ -490,6 +492,11 @@ export default {
 					this.ruleMaxAmount = res.data.ruleMaxAmount
 					this.ruleValue1 = res.data.ruleValue1
 					this.ruleValue2 = res.data.ruleValue2
+					if (res.data.flag == 1) {
+						this.isIntegral = true
+					} else {
+						this.isIntegral = false
+					}
 				}
 			})
 		},

+ 6 - 5
pages/order/feedback.vue

@@ -52,7 +52,7 @@
 			</view>
 			<u-rate :count="count" min-count="1" active-color="#FCD202" v-model="value"></u-rate>
 		</view>
-		<button type="primary" style="background: #fcd202; margin-top: 32upx" class="feedback-submit" @tap="send">提交</button>
+		<button type="primary" style="background: #fcd202; margin-top: 32upx" class="feedback-submit" @tap="send_throttle">提交</button>
 
 		<!-- 用于图片压缩的canvas画布 -->
 		<canvas
@@ -73,6 +73,7 @@
 <script>
 import configUrl from '../../common/config.js'
 import getLessLimitSizeImage from '@/utils/imageCompress.js'
+import { throttle } from '@/utils/throttle.js'
 export default {
 	data() {
 		return {
@@ -186,11 +187,11 @@ export default {
 			this.sendDate.score = e
 		},
 
-		send() {
-			//发送反馈
-			// console.log(this.sendDate,'111111111');
-			// console.log(this.shopBanner.join(','),'22222222222222222')
+		send_throttle: throttle(function () {
+			this.send()
+		}, 2000),
 
+		send() {
 			if (!this.sendDate.content) {
 				uni.showToast({
 					icon: 'none',