py 2 tahun lalu
induk
melakukan
dcf7cd9b52

+ 2 - 1
.env.js

@@ -3,7 +3,8 @@ let ENV_CONFIG = null;
 
 if (nodeEnv === 'development') {
     //开发环境
-    ENV_CONFIG = require('.env.dev.js');
+    ENV_CONFIG = require('.env.prod.js');
+	// ENV_CONFIG = require('.env.dev.js');
 } else {
     //生产环境
     ENV_CONFIG = require('.env.prod.js');

+ 2 - 2
.env.prod.js

@@ -1,6 +1,6 @@
 const config = {
-    baseUrl: 'https://test-userapi.sjzkeji.com',
-    socketUrl: 'https://test-userapi.sjzkeji.com',
+    baseUrl: 'https://userapi.sjzkeji.com',
+    socketUrl: 'https://userapi.sjzkeji.com',
     appName:'正式环境'
 }
 module.exports = config;

+ 1 - 1
manifest.json

@@ -99,7 +99,7 @@
             "https" : false,
             "proxy" : {
                 "/api" : {
-                    "target" : "https://test-userapi.sjzkeji.com",
+                    "target" : "https://userapi.sjzkeji.com",
                     "changeOrigin" : true,
                     "secure" : false,
                     "pathRewrite" : {

+ 6 - 4
pages-school/school-circle.vue

@@ -278,9 +278,7 @@
 		data() {
 			return {
 				isShowIpnut: false,
-
 				classList: [],
-
 				total: 0,
 				list: [],
 				fromData: {
@@ -290,7 +288,6 @@
 					page: 1,
 				},
 				isAJAX: false,
-
 				schoolData: {
 					school_name: '',
 				},
@@ -314,11 +311,11 @@
 					content: '',
 					reply_id: '',
 				},
-
 				// 回复评论
 				replyData: {
 					page: 1,
 				},
+				isAjax: false,
 				alumni_str: '' // 校友圈提示
 			}
 		},
@@ -411,11 +408,16 @@
 				let circleSchoolId = uni.getStorageSync('circleSchoolId');
 				let school_id = uni.getStorageSync('school_id');
 				this.fromData.school_id = circleSchoolId ? circleSchoolId : school_id
+				if(this.isAjax) {
+					return
+				}
+				this.isAjax = true
 				getAlumniList(this.fromData).then((res) => {
 					if (res.code === 1) {
 						this.list = [...this.list, ...res.data.items];
 						this.total = res.data.total;
 					}
+					this.isAjax = false
 				})
 			},
 

+ 8 - 6
pages-takeout/confirm-mod/coupon.vue

@@ -6,15 +6,12 @@
 					选择优惠券
 					<uni-icons @click="closeCoupon" class="box-close" type="closeempty" size="20"></uni-icons>
 				</view>
-
 				<view class="flex-justify-around">
 					<view @click="setType(1)" class="fs-28 fw-600 mb-24" :class="type == 1?'fc-41ABF5':''">
 						可用优惠券({{shopCouponData.coupon.length}})</view>
 					<view @click="setType(2)" class="fs-28 fw-600 mb-24" :class="type == 2?'fc-41ABF5':''">
 						可领优惠券({{shopCouponData.receive.length}})</view>
 				</view>
-
-
 				<view class="scroll-view-css" v-if="type == 1">
 					<view v-if="shopCouponData.coupon.length === 0" class="scroll-view-css">
 						<EnBlank :customSrc='true'>
@@ -161,10 +158,15 @@
 				this.$refs.popupCoupon.close();
 			},
 			setFun(item) {
-				this.$emit('giveCouPon', item);
-				this.closeCoupon();
+				if (this.coupon_id == item.id) {
+					this.coupon_id = ''
+					this.$emit('giveCouPon', '');
+					this.closeCoupon();
+				} else {
+					this.$emit('giveCouPon', item);
+					this.closeCoupon();
+				}
 			},
-
 			getFun(item) {
 				if (this.isAJAX) {
 					return

+ 0 - 1
pages-takeout/confirm-mod/dryClean-coupon.vue

@@ -166,7 +166,6 @@
 					this.closeCoupon();
 				}
 			},
-
 			getFun(item) {
 				if (this.isAJAX) {
 					return

+ 7 - 3
pages-takeout/goods-order.vue

@@ -117,7 +117,6 @@
 			</view>
 		</view>
 
-
 		<Coupon ref="coupon" @giveCouPon='giveCouPon'></Coupon>
 		<SelectAddress ref="selectAddress" @giveAddress='giveAddress'></SelectAddress>
 		<Time ref="selectTime" @giveTime='giveTime' @timeAndType='timeAndType'></Time>
@@ -262,8 +261,13 @@
 				}
 			},
 			giveCouPon(e) {
-				this.quanMoney = Number(e.money);
-				this.fromData.coupon_id = e.id;
+				if (e.id) {
+					this.quanMoney = Number(e.money);
+					this.fromData.coupon_id = e.id;
+				} else {
+					this.quanMoney = ''
+					this.fromData.coupon_id = 0
+				}
 			},
 			timeAndType(type, time) {
 				// 时间选择

+ 1 - 0
pages/index/index.vue

@@ -461,6 +461,7 @@
 						}
 					} else {
 						tools.error(res.msg)
+						this.couponData.splice(index, 1)
 					}
 				})
 			},

+ 3 - 1
service/ajax.js

@@ -45,7 +45,9 @@ export const request = (url, method, data, show = false) => {
             resolve(res.data)
           }
         }else if(res.statusCode === 401){
-          uni.clearStorageSync()
+          // uni.clearStorageSync()
+		  uni.removeStorageSync('token')
+		  uni.removeStorageSync('m_id')
           uni.reLaunch({
             url: '/pages/login/index'
           });