Browse Source

版本更新

liuguofeng 6 months ago
parent
commit
ad547f9881

+ 2 - 1
jiaoyu_mp/manifest.json

@@ -50,7 +50,8 @@
     "quickapp" : {},
     /* 小程序特有相关 */
     "mp-weixin" : {
-        "appid" : "wx24a9669e84ba1f0b",
+        // "appid" : "wx24a9669e84ba1f0b",
+		"appid": "wxe270937ea4d7f7d5",
         "setting" : {
             "urlCheck" : true,
             "es6" : true,

+ 32 - 13
jiaoyu_mp/pages/course/index.vue

@@ -9,24 +9,30 @@
 					<view class="right">
 						<view class="title">
 							{{item.course_name}}
+							<!-- 拳击课程 -->
 						</view>
 						<view class="skill">
 							{{item.desc}}
+							<!-- 拳击课程修炼 -->
 						</view>
 						<view class="course_option">
 							<view class="course_num">
 								课程数量:{{item.course_number}}
 							</view>
-							<view class="course_num">
+<!-- 							<view class="course_num">
 								总计10课堂
+							</view> -->
+							<view class="remain_class">
+								预约人数:{{item.reservation_number}}
 							</view>
 						</view>
 						<view class="course_remain">
 							<view class="remain_class">
-								预约人数:{{item.reservation_number}}
+								<!-- 预约人数:{{item.reservation_number}} -->
 							</view>
 							<view class="price">
 								¥{{item.price_total}}
+								<!-- ¥100 -->
 							</view>
 						</view>
 					</view>
@@ -116,13 +122,16 @@
 				width: 660rpx;
 				margin: 20rpx auto;
 				.left{
-					width: 240rpx;
+					width: 200rpx;
+					// height: 200rpx;
 					// background-color: aqua;
-
+					// border: 2rpx solid;
+					border-radius: 20rpx;
 					image{
-						width: 240rpx;
-						height: 240rpx;
+						width: 200rpx;
+						height: 200rpx;
 						border-radius: 20rpx;
+						border: 2rpx solid;
 					}
 				}
 				.right{
@@ -152,13 +161,6 @@
 							padding: 5rpx;
 							color: #3985ff;
 						}
-					}
-					.course_remain{
-							display: flex;
-							justify-content: space-between;
-							flex-wrap: wrap;
-							width: 420rpx;
-							margin-top: 30rpx;
 						.remain_class{
 							display: inline-flex;
 							justify-content: center;
@@ -169,6 +171,23 @@
 							border-radius: 15rpx;
 							color: #ffffff;
 						}
+					}
+					.course_remain{
+							display: flex;
+							justify-content: space-between;
+							flex-wrap: wrap;
+							width: 420rpx;
+							margin-top: 30rpx;
+						// .remain_class{
+						// 	display: inline-flex;
+						// 	justify-content: center;
+						// 	width: 180rpx;
+						// 	margin: 5rpx;
+						// 	padding: 5rpx;
+						// 	background-color: #3985ff;
+						// 	border-radius: 15rpx;
+						// 	color: #ffffff;
+						// }
 						.price{
 							width: 180rpx;
 							margin: 5rpx;

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

@@ -36,7 +36,7 @@
 								<text>{{item.name}}</text>
 							</view>
 							<view class="time">
-								<text>距今日结束08:02:56</text>
+								<text>{{item.spec}}</text>
 							</view>
 						</view>
 						<view class="stock_price">

+ 77 - 23
jiaoyu_mp/pages/login/index.vue

@@ -20,30 +20,84 @@
 			}
 		},
 		methods: {
+			// getPhonenumber(re){
+			// 	// // 如果授权失败的话
+			// 	if( re.detail.errMsg != "getPhoneNumber:ok"){
+			// 		uni.showToast({
+			// 			icon:"error",
+			// 			title:"授权失败"
+			// 		})
+			// 		return;
+			// 	}
+			// 	// 授权成功以后,调用登录
+			// 	this.$http.request('api/wechat/phone_number',{code:re.detail.code},'post').then((re)=>{
+			// 		// 成功的话
+			// 		if( re.code == 'success' ){
+			// 			// 存储登录标识
+			// 			uni.setStorageSync('userLogin',re.data);
+			// 			// 跳转到页面
+			// 			uni.switchTab({url:"/pages/user/index"})
+			// 		}else{
+			// 			uni.showToast({
+			// 				title: re.msg,
+			// 				icon:"none"
+			// 			})
+			// 		}
+			// 	});
+			// },
 			getPhonenumber(re){
-				// // 如果授权失败的话
-				if( re.detail.errMsg != "getPhoneNumber:ok"){
-					uni.showToast({
-						icon:"error",
-						title:"授权失败"
-					})
-					return;
-				}
-				// 授权成功以后,调用登录
-				this.$http.request('api/wechat/phone_number',{code:re.detail.code},'post').then((re)=>{
-					// 成功的话
-					if( re.code == 'success' ){
-						// 存储登录标识
-						uni.setStorageSync('userLogin',re.data);
-						// 跳转到页面
-						uni.switchTab({url:"/pages/user/index"})
-					}else{
-						uni.showToast({
-							title: re.msg,
-							icon:"none"
-						})
-					}
-				});
+			  // // 如果授权失败的话
+			  if( re.detail.errMsg != "getPhoneNumber:ok"){
+			   uni.showToast({
+			    icon:"error",
+			    title:"授权失败"
+			   })
+			   return;
+			  }
+			     //获取openid
+			     uni.login({
+			       provider: 'weixin',
+			       success: (loginRes) => {
+			         // 登录成功,获取用户code
+			         const { code } = loginRes;
+			         console.log(code);
+			         // 发送code到后台换取openId, sessionKey, unionId
+			         this.$http.request('api/wechat/jscode2session',{code:code},'post').then((e)=>{
+			           // 成功的话
+			           if( e.code == 'success'){
+			             //获取openid
+			             this.openid = e.data;
+			             // 授权成功以后,调用登录
+			             this.$http.request('api/wechat/phone_number',{code:re.detail.code,openid:this.openid},'post').then((re)=>{
+			               // 成功的话
+			               if( re.code == 'success'){
+			                 // 存储登录标识
+			                 uni.setStorageSync('userLogin',re.data);
+			                 // 跳转到页面
+			                 uni.switchTab({url:"/pages/user/index"})
+			               }else{
+			                 uni.showToast({
+			                   title: re.msg,
+			                   icon:"none"
+			                 })
+			               }
+			             });
+			           }else{
+			             uni.showToast({
+			               title: e.msg,
+			               icon:"none"
+			             })
+			           }
+			         });
+			       },
+			       fail: (err) => {
+			         console.log('uni.login 接口调用失败,将无法正常使用开放接口等服务', err);
+			         uni.showToast({
+			           title: '登录失败',
+			           icon: 'none'
+			         });
+			       }
+			     });
 			},
 			toPhoneLogin(re){
 				// 登录效果

+ 23 - 13
jiaoyu_mp/pages/product/index.vue

@@ -13,17 +13,20 @@
 					<text>{{productInfo.name}}</text>
 				</view>
 				<view class="product_subtitle">
-					<text>我是副标题</text>
+					<text>{{productInfo.spec}}</text>
 				</view>
-				<view class="product_spec">
-					<view class="spec_name">¥{{productInfo.price}}</view> 
+				<view class="price_stock">
+					<view class="product_price">
+						<text>¥{{productInfo.price}}</text>
+						<text class="product_market">¥{{productInfo.market_price}}</text>
+					</view> 
 					<view class="product_stock">库存{{productInfo.stock}}个</view>
 				</view>
 				<view class="product_coupon">
 					<view class="coupon_text">
 						优惠卷
 					</view>
-					<view class="coupon_info" @click="productCouponList()">
+					<view class="coupon_info"   @click="openCoupon()">
 						<view class="text">
 							满50减10
 						</view>
@@ -59,7 +62,7 @@
 			</view>
 		</view> -->
 		<view class="order_car">
-			<navigator url="/pages/car/index" open-type="switchTab" class="to_car" >
+			<navigator url="/pages/index/index" open-type="switchTab" class="to_car" >
 				<image src="../../static/tabbar/score.png" class="car_icon" ></image>
 				<view class="text">
 					首页
@@ -135,7 +138,7 @@
 				<view class="order_price" v-if="specBtnType==1" >合计: ¥{{priceTotal}}</view>
 				<view class="order_btn">
 					<button class="to_order" @click="createOrder()" v-if="specBtnType==1" data-eventsync="true" >立即购买</button>
-					<button class="to_car" @click="createCart()" v-if="specBtnType==2" data-eventsync="true" >加入购物车</button>
+					<!-- <button class="to_car" @click="createCart()" v-if="specBtnType==2" data-eventsync="true" >加入购物车</button> -->
 				</view>
 			</view>
 		</uni-popup>
@@ -815,11 +818,11 @@
 					}
 				});
 			},
-			productCouponList(){
-				uni.navigateTo({
-					url:"/pages/coupon/order_coupon"
-				})
-			}
+			// productCouponList(){
+			// 	uni.navigateTo({
+			// 		url:"/pages/coupon/order_coupon"
+			// 	})
+			// }
 		}
 	}
 </script>
@@ -875,17 +878,24 @@
 				font-size: 24rpx;
 			}
 		}
-		.product_spec{
+		.price_stock{
 			color: #999999;
 			font-size: 24rpx;
 			line-height: 30rpx;
 			overflow: hidden;
 			margin-top: 20rpx;
-			.spec_name{
+			.product_price{
 				float: left;
 				color: red;
 				font-size: 38rpx;
 				line-height: 60rpx;
+				.product_market{
+					font-size: 24rpx;
+					color: #999999;
+					line-height: 30rpx;
+					margin-left: 10rpx;
+					text-decoration: line-through;
+				}
 			}
 			.product_stock{
 				float: right;

+ 2 - 3
jiaoyu_mp/pages/user/index.vue

@@ -86,15 +86,14 @@
 					</view>
 					<view class="navigator_title">签到</view>
 				</navigator>
-				<navigator class="navigator_item" url="/pagesA/user/favorites" >
+<!-- 				<navigator class="navigator_item" url="/pagesA/user/favorites" >
 					<view class="navigator_image_favo">
-						<!-- <image class="navigator_image" src="../../static/user_icon/user_class_icon.png" mode=""></image> -->
 						<view class="star_icon">
 							<uni-icons type="star-filled" size="40" color= "#fff"></uni-icons>
 						</view>
 					</view>
 					<view class="navigator_title">我的收藏</view>
-				</navigator>
+				</navigator> -->
 			</view>
 		</view>
 		

+ 22 - 13
jiaoyu_mp/pagesA/course/reservation.vue

@@ -195,7 +195,7 @@
 				dateArr: [], //日期数据
 				timeArr: [], //时间数据
 				nowDate: "", // 当前日期
-				dateActive: 0, //选中的日期索引
+				dateActive: -1, //选中的日期索引
 				timeActive: 0, //选中的时间索引
 				timeQuanBeginIndex: 0, //时间段开始的下标
 				selectDate: "", //选择的日期
@@ -208,11 +208,6 @@
 
 			}
 		},
-		created(props) {
-			this.selectDate = this.nowDate =this.currentTime().date
-			 
-			this.initOnload()
-		},
 		onLoad(e) {
 			//接受url参数
 			let {orders_product_id,course_id} = e
@@ -223,7 +218,10 @@
 		onShow() {
 			//doto 这行代码应该放在请求成功之后执行
 			this.defaultTeacherDesc()
-
+			
+			// this.selectDate = this.nowDate =this.currentTime().date
+			 
+			this.initOnload()
 
 			if(this.orders_product_id > 0 && this.course_id > 0){
 				
@@ -233,7 +231,7 @@
 						
 						
 						// this.selectDate = this.nowDate =this.currentTime().date
-						 
+						// this.defaultTeacherDesc()
 						// this.initOnload()
 					}
 				})
@@ -262,6 +260,7 @@
 						this.course_name = this.data[index]["list"].course_name
 						this.course_image = this.data[index]["list"].course_image
 						this.start_time = this.data[index]["list"].start_time
+						this.selectDate = 
 						this.schedule_id = this.data[index]["list"].id
 						this.initOnload()
 					}
@@ -285,6 +284,7 @@
 			},
 			//预约课程事件
 			reservationPopup(){
+				//如果没有选择老师
 				  if(this.schedule_id === 0){
 					  uni.showToast({
 					  	title:"请选择老师",
@@ -292,6 +292,15 @@
 					  })
 					  return
 				  }
+				  //没有选择预约日期
+				  if(this.dateActive < 0){
+					  uni.showToast({
+					  	title:"请选择预约日期",
+					  	icon:"none"
+					  })
+					  return
+				  }
+				  //没有选择预约时间
 				  if(this.orderDateTime === "暂无选择"){
 					  uni.showToast({
 					  	title:"请选择预约时间",
@@ -300,9 +309,8 @@
 					  return
 				  }
 				  
-				  
-
-				  this.$http.request("api/course/get_schedule_list",{course_id:this.course_id,orders_product_id:this.orders_product_id},'post').then((res)=>{
+				//
+				  this.$http.request("api/course/reservation/",{orders_product_id:this.orders_product_id,schedule_id:this.schedule_id},'post').then((res)=>{
 					  if(res.code === 'success'){
 						  if(this.reservation_number < this.course_number){
 						  	this.reservation_number++
@@ -413,6 +421,7 @@
 			
 			// 日期选择事件
 			selectDateEvent(index, item) {
+				if(this.dateActive == index)return
 				this.dateActive = index
 				this.selectDate = item.date
 				if(!this.isMultiple){
@@ -536,12 +545,12 @@
 							time.push(`${date} ${item}`)
 						})
 					}
-					 this.$emit('change', time)
+					 // this.$emit('change', time)
 					//this.isTime = time
 				} else {
 					//这是单选模式
 					 this.appointTime.push(this.orderDateTime);
-					 this.$emit('change', this.orderDateTime)
+					 // this.$emit('change', this.orderDateTime)
 				}
 			
 			},

+ 1 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/course/index.wxml

@@ -1 +1 @@
-<view class="course_layout"><view class="course_list"><view wx:for="{{a}}" wx:for-item="item" wx:key="h" class="course_item"><view class="course_title"><view class="left"><image src="{{b}}"></image></view><view class="right"><view class="title">{{item.a}}</view><view class="skill">{{item.b}}</view><view class="course_option"><view class="course_num"> 课程数量:{{item.c}}</view><view class="course_num"> 总计10课堂 </view></view><view class="course_remain"><view class="remain_class"> 预约人数:{{item.d}}</view><view class="price"> ¥{{item.e}}</view></view></view></view><view class="btn_title"><view class="title"> 上课地址:{{item.f}}</view><view class="btn"><navigator url="{{item.g}}"><view class="course_make_btn"> 预约上课 </view></navigator><navigator url="/pagesA/course/usercourse"><view class="user_course_btn"> 我的预约 </view></navigator></view></view></view></view><view class="to_bottom">---到底啦---</view></view>
+<view class="course_layout"><view class="course_list"><view wx:for="{{a}}" wx:for-item="item" wx:key="h" class="course_item"><view class="course_title"><view class="left"><image src="{{b}}"></image></view><view class="right"><view class="title">{{item.a}} </view><view class="skill">{{item.b}} </view><view class="course_option"><view class="course_num"> 课程数量:{{item.c}}</view><view class="remain_class"> 预约人数:{{item.d}}</view></view><view class="course_remain"><view class="remain_class"></view><view class="price"> ¥{{item.e}} </view></view></view></view><view class="btn_title"><view class="title"> 上课地址:{{item.f}}</view><view class="btn"><navigator url="{{item.g}}"><view class="course_make_btn"> 预约上课 </view></navigator><navigator url="/pagesA/course/usercourse"><view class="user_course_btn"> 我的预约 </view></navigator></view></view></view></view><view class="to_bottom">---到底啦---</view></view>

+ 13 - 11
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/course/index.wxss

@@ -19,12 +19,14 @@
   margin: 20rpx auto;
 }
 .course_layout .course_list .course_item .course_title .left {
-  width: 240rpx;
+  width: 200rpx;
+  border-radius: 20rpx;
 }
 .course_layout .course_list .course_item .course_title .left image {
-  width: 240rpx;
-  height: 240rpx;
+  width: 200rpx;
+  height: 200rpx;
   border-radius: 20rpx;
+  border: 2rpx solid;
 }
 .course_layout .course_list .course_item .course_title .right {
   font-size: 24rpx;
@@ -55,14 +57,7 @@
   padding: 5rpx;
   color: #3985ff;
 }
-.course_layout .course_list .course_item .course_title .right .course_remain {
-  display: flex;
-  justify-content: space-between;
-  flex-wrap: wrap;
-  width: 420rpx;
-  margin-top: 30rpx;
-}
-.course_layout .course_list .course_item .course_title .right .course_remain .remain_class {
+.course_layout .course_list .course_item .course_title .right .course_option .remain_class {
   display: inline-flex;
   justify-content: center;
   width: 180rpx;
@@ -72,6 +67,13 @@
   border-radius: 15rpx;
   color: #ffffff;
 }
+.course_layout .course_list .course_item .course_title .right .course_remain {
+  display: flex;
+  justify-content: space-between;
+  flex-wrap: wrap;
+  width: 420rpx;
+  margin-top: 30rpx;
+}
 .course_layout .course_list .course_item .course_title .right .course_remain .price {
   width: 180rpx;
   margin: 5rpx;

+ 4 - 3
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -137,9 +137,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
       return {
         a: item.thumb,
         b: common_vendor.t(item.name),
-        c: common_vendor.t(item.price),
-        d: common_vendor.o(($event) => $options.toDetail(item), index),
-        e: index
+        c: common_vendor.t(item.spec),
+        d: common_vendor.t(item.price),
+        e: common_vendor.o(($event) => $options.toDetail(item), index),
+        f: index
       };
     }),
     d: common_vendor.p({

+ 1 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/index/index.wxml

@@ -1 +1 @@
-<view><view class="banner_box"><view class="banner_list"><swiper class="banner_swiper" autoplay="{{true}}"><swiper-item wx:for="{{a}}" wx:for-item="item" wx:key="c"><image src="{{item.a}}" class="image" mode="widthFix" bindtap="{{item.b}}"></image></swiper-item></swiper></view></view><view class="product_box"><view wx:if="{{b}}" class="to_bottom"> -----还没有产品啦-----</view><view class="product_list"><view wx:for="{{c}}" wx:for-item="item" wx:key="e" bindtap="{{item.d}}" data-eventsync="true" class="product_item"><view class="product_left"><image class="product_image" src="{{item.a}}" mode=""></image></view><view class="product_right"><view class="product_title"><view class="product_text"><text>{{item.b}}</text></view><view class="time"><text>距今日结束08:02:56</text></view></view><view class="stock_price"><view class="product_price"><label style="font-size:26rpx">¥</label><text>{{item.c}}</text></view><view class="product_order_but"><button>立即购买</button></view></view></view></view></view></view><view class="search_fixed"><navigator url="/pagesA/search/index" class="search_box"><view class="search_input"><text>搜索</text></view><uni-icons wx:if="{{d}}" class="icon" u-i="406c9705-0" bind:__l="__l" u-p="{{d}}"></uni-icons><view class="search_btn"><uni-icons wx:if="{{e}}" u-i="406c9705-1" bind:__l="__l" u-p="{{e}}"></uni-icons></view></navigator></view><view wx:if="{{f}}" class="to_bottom"> -----到底啦-----</view></view>
+<view><view class="banner_box"><view class="banner_list"><swiper class="banner_swiper" autoplay="{{true}}"><swiper-item wx:for="{{a}}" wx:for-item="item" wx:key="c"><image src="{{item.a}}" class="image" mode="widthFix" bindtap="{{item.b}}"></image></swiper-item></swiper></view></view><view class="product_box"><view wx:if="{{b}}" class="to_bottom"> -----还没有产品啦-----</view><view class="product_list"><view wx:for="{{c}}" wx:for-item="item" wx:key="f" bindtap="{{item.e}}" data-eventsync="true" class="product_item"><view class="product_left"><image class="product_image" src="{{item.a}}" mode=""></image></view><view class="product_right"><view class="product_title"><view class="product_text"><text>{{item.b}}</text></view><view class="time"><text>{{item.c}}</text></view></view><view class="stock_price"><view class="product_price"><label style="font-size:26rpx">¥</label><text>{{item.d}}</text></view><view class="product_order_but"><button>立即购买</button></view></view></view></view></view></view><view class="search_fixed"><navigator url="/pagesA/search/index" class="search_box"><view class="search_input"><text>搜索</text></view><uni-icons wx:if="{{d}}" class="icon" u-i="406c9705-0" bind:__l="__l" u-p="{{d}}"></uni-icons><view class="search_btn"><uni-icons wx:if="{{e}}" u-i="406c9705-1" bind:__l="__l" u-p="{{e}}"></uni-icons></view></navigator></view><view wx:if="{{f}}" class="to_bottom"> -----到底啦-----</view></view>

+ 55 - 6
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/login/index.js

@@ -6,6 +6,31 @@ const _sfc_main = {
     return {};
   },
   methods: {
+    // getPhonenumber(re){
+    // 	// // 如果授权失败的话
+    // 	if( re.detail.errMsg != "getPhoneNumber:ok"){
+    // 		uni.showToast({
+    // 			icon:"error",
+    // 			title:"授权失败"
+    // 		})
+    // 		return;
+    // 	}
+    // 	// 授权成功以后,调用登录
+    // 	this.$http.request('api/wechat/phone_number',{code:re.detail.code},'post').then((re)=>{
+    // 		// 成功的话
+    // 		if( re.code == 'success' ){
+    // 			// 存储登录标识
+    // 			uni.setStorageSync('userLogin',re.data);
+    // 			// 跳转到页面
+    // 			uni.switchTab({url:"/pages/user/index"})
+    // 		}else{
+    // 			uni.showToast({
+    // 				title: re.msg,
+    // 				icon:"none"
+    // 			})
+    // 		}
+    // 	});
+    // },
     getPhonenumber(re) {
       if (re.detail.errMsg != "getPhoneNumber:ok") {
         common_vendor.index.showToast({
@@ -14,13 +39,37 @@ const _sfc_main = {
         });
         return;
       }
-      this.$http.request("api/wechat/phone_number", { code: re.detail.code }, "post").then((re2) => {
-        if (re2.code == "success") {
-          common_vendor.index.setStorageSync("userLogin", re2.data);
-          common_vendor.index.switchTab({ url: "/pages/user/index" });
-        } else {
+      common_vendor.index.login({
+        provider: "weixin",
+        success: (loginRes) => {
+          const { code } = loginRes;
+          console.log(code);
+          this.$http.request("api/wechat/jscode2session", { code }, "post").then((e) => {
+            if (e.code == "success") {
+              this.openid = e.data;
+              this.$http.request("api/wechat/phone_number", { code: re.detail.code, openid: this.openid }, "post").then((re2) => {
+                if (re2.code == "success") {
+                  common_vendor.index.setStorageSync("userLogin", re2.data);
+                  common_vendor.index.switchTab({ url: "/pages/user/index" });
+                } else {
+                  common_vendor.index.showToast({
+                    title: re2.msg,
+                    icon: "none"
+                  });
+                }
+              });
+            } else {
+              common_vendor.index.showToast({
+                title: e.msg,
+                icon: "none"
+              });
+            }
+          });
+        },
+        fail: (err) => {
+          console.log("uni.login 接口调用失败,将无法正常使用开放接口等服务", err);
           common_vendor.index.showToast({
-            title: re2.msg,
+            title: "登录失败",
             icon: "none"
           });
         }

+ 40 - 42
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/product/index.js

@@ -472,12 +472,12 @@ const _sfc_main = {
           });
         }
       });
-    },
-    productCouponList() {
-      common_vendor.index.navigateTo({
-        url: "/pages/coupon/order_coupon"
-      });
     }
+    // productCouponList(){
+    // 	uni.navigateTo({
+    // 		url:"/pages/coupon/order_coupon"
+    // 	})
+    // }
   }
 };
 if (!Array) {
@@ -502,40 +502,42 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     d: common_vendor.o((...args) => $options.goBack && $options.goBack(...args)),
     e: $data.productInfo.thumb,
     f: common_vendor.t($data.productInfo.name),
-    g: common_vendor.t($data.productInfo.price),
-    h: common_vendor.t($data.productInfo.stock),
-    i: common_vendor.o(($event) => $options.productCouponList()),
-    j: common_assets._imports_0$1,
-    k: common_assets._imports_1$1,
-    l: common_vendor.o(($event) => $options.showSpecPopup(1)),
-    m: $data.specBtnType == 1
+    g: common_vendor.t($data.productInfo.spec),
+    h: common_vendor.t($data.productInfo.price),
+    i: common_vendor.t($data.productInfo.market_price),
+    j: common_vendor.t($data.productInfo.stock),
+    k: common_vendor.o(($event) => $options.openCoupon()),
+    l: common_assets._imports_0$1,
+    m: common_assets._imports_1$1,
+    n: common_vendor.o(($event) => $options.showSpecPopup(1)),
+    o: $data.specBtnType == 1
   }, $data.specBtnType == 1 ? common_vendor.e({
-    n: !$data.checkedAddr.id
+    p: !$data.checkedAddr.id
   }, !$data.checkedAddr.id ? {} : {}, {
-    o: common_vendor.t($data.checkedAddr.contact_name),
-    p: common_vendor.t($data.checkedAddr.contact_phone),
-    q: common_vendor.t($data.checkedAddr.contact_province),
-    r: common_vendor.t($data.checkedAddr.contact_city),
-    s: common_vendor.t($data.checkedAddr.contact_area),
-    t: common_vendor.t($data.checkedAddr.contact_addr),
-    v: common_vendor.o(($event) => $options.showAddrPopup())
+    q: common_vendor.t($data.checkedAddr.contact_name),
+    r: common_vendor.t($data.checkedAddr.contact_phone),
+    s: common_vendor.t($data.checkedAddr.contact_province),
+    t: common_vendor.t($data.checkedAddr.contact_city),
+    v: common_vendor.t($data.checkedAddr.contact_area),
+    w: common_vendor.t($data.checkedAddr.contact_addr),
+    x: common_vendor.o(($event) => $options.showAddrPopup())
   }) : {}, {
-    w: $data.productInfo.thumb,
-    x: common_vendor.t($data.productInfo.name),
-    y: $data.isShowPrice
+    y: $data.productInfo.thumb,
+    z: common_vendor.t($data.productInfo.name),
+    A: $data.isShowPrice
   }, $data.isShowPrice ? {
-    z: common_vendor.t($data.productInfo.price),
-    A: common_vendor.t($data.productInfo.market_price)
+    B: common_vendor.t($data.productInfo.price),
+    C: common_vendor.t($data.productInfo.market_price)
   } : {}, {
-    B: common_assets._imports_3,
-    C: common_vendor.o(($event) => $options.changeQuantity(-1)),
-    D: common_vendor.o(($event) => $options.changeQuantity(0)),
-    E: $data.quantity,
-    F: common_vendor.o(($event) => $data.quantity = $event.detail.value),
-    G: common_assets._imports_4,
-    H: common_vendor.o(($event) => $options.changeQuantity(1)),
-    I: common_vendor.t($data.productInfo.stock),
-    J: common_vendor.f($data.productInfo.product_attr, (spec, spec_index, i0) => {
+    D: common_assets._imports_3,
+    E: common_vendor.o(($event) => $options.changeQuantity(-1)),
+    F: common_vendor.o(($event) => $options.changeQuantity(0)),
+    G: $data.quantity,
+    H: common_vendor.o(($event) => $data.quantity = $event.detail.value),
+    I: common_assets._imports_4,
+    J: common_vendor.o(($event) => $options.changeQuantity(1)),
+    K: common_vendor.t($data.productInfo.stock),
+    L: common_vendor.f($data.productInfo.product_attr, (spec, spec_index, i0) => {
       return {
         a: common_vendor.t(spec.spec_name),
         b: common_vendor.f(spec.attr_list, (option, attr_index, i1) => {
@@ -549,17 +551,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
         c: spec_index
       };
     }),
-    K: $data.specBtnType == 1
-  }, $data.specBtnType == 1 ? {
-    L: common_vendor.t($data.priceTotal)
-  } : {}, {
     M: $data.specBtnType == 1
   }, $data.specBtnType == 1 ? {
-    N: common_vendor.o(($event) => $options.createOrder())
+    N: common_vendor.t($data.priceTotal)
   } : {}, {
-    O: $data.specBtnType == 2
-  }, $data.specBtnType == 2 ? {
-    P: common_vendor.o(($event) => $options.createCart())
+    O: $data.specBtnType == 1
+  }, $data.specBtnType == 1 ? {
+    P: common_vendor.o(($event) => $options.createOrder())
   } : {}, {
     Q: common_vendor.sr("specPopup", "618774e2-1"),
     R: common_vendor.o($options.popupChange),

File diff suppressed because it is too large
+ 0 - 0
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/product/index.wxml


+ 10 - 3
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/product/index.wxss

@@ -48,20 +48,27 @@
   line-height: 40rpx;
   font-size: 24rpx;
 }
-.product_info .product_spec {
+.product_info .price_stock {
   color: #999999;
   font-size: 24rpx;
   line-height: 30rpx;
   overflow: hidden;
   margin-top: 20rpx;
 }
-.product_info .product_spec .spec_name {
+.product_info .price_stock .product_price {
   float: left;
   color: red;
   font-size: 38rpx;
   line-height: 60rpx;
 }
-.product_info .product_spec .product_stock {
+.product_info .price_stock .product_price .product_market {
+  font-size: 24rpx;
+  color: #999999;
+  line-height: 30rpx;
+  margin-left: 10rpx;
+  text-decoration: line-through;
+}
+.product_info .price_stock .product_stock {
   float: right;
   line-height: 60rpx;
 }

+ 1 - 14
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/index.js

@@ -51,14 +51,6 @@ const _sfc_main = {
     }
   }
 };
-if (!Array) {
-  const _easycom_uni_icons2 = common_vendor.resolveComponent("uni-icons");
-  _easycom_uni_icons2();
-}
-const _easycom_uni_icons = () => "../../uni_modules/uni-icons/components/uni-icons/uni-icons.js";
-if (!Math) {
-  _easycom_uni_icons();
-}
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return {
     a: $data.StatusBarHeight + "px",
@@ -71,12 +63,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     h: common_assets._imports_2,
     i: common_assets._imports_3$1,
     j: common_assets._imports_4$1,
-    k: common_assets._imports_5,
-    l: common_vendor.p({
-      type: "star-filled",
-      size: "40",
-      color: "#fff"
-    })
+    k: common_assets._imports_5
   };
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

+ 1 - 3
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/index.json

@@ -1,7 +1,5 @@
 {
   "navigationBarTitleText": "我的",
   "navigationStyle": "custom",
-  "usingComponents": {
-    "uni-icons": "../../uni_modules/uni-icons/components/uni-icons/uni-icons"
-  }
+  "usingComponents": {}
 }

File diff suppressed because it is too large
+ 0 - 0
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/user/index.wxml


+ 13 - 11
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/course/reservation.js

@@ -154,7 +154,7 @@ const _sfc_main = {
       //时间数据
       nowDate: "",
       // 当前日期
-      dateActive: 0,
+      dateActive: -1,
       //选中的日期索引
       timeActive: 0,
       //选中的时间索引
@@ -171,10 +171,6 @@ const _sfc_main = {
       // days: ['周一', '周二', '周三', '周四', '周五'],
     };
   },
-  created(props) {
-    this.selectDate = this.nowDate = this.currentTime().date;
-    this.initOnload();
-  },
   onLoad(e) {
     let { orders_product_id, course_id } = e;
     this.orders_product_id = orders_product_id;
@@ -182,6 +178,7 @@ const _sfc_main = {
   },
   onShow() {
     this.defaultTeacherDesc();
+    this.initOnload();
     if (this.orders_product_id > 0 && this.course_id > 0) {
       this.$http.request("api/course/get_schedule_list", { orders_product_id: this.orders_product_id, course_id: this.course_id }, "post").then((res) => {
         if (res.code === "success") {
@@ -207,7 +204,7 @@ const _sfc_main = {
           this.course_name = this.data[index]["list"].course_name;
           this.course_image = this.data[index]["list"].course_image;
           this.start_time = this.data[index]["list"].start_time;
-          this.schedule_id = this.data[index]["list"].id;
+          this.selectDate = this.schedule_id = this.data[index]["list"].id;
           this.initOnload();
         }
       }
@@ -234,6 +231,13 @@ const _sfc_main = {
         });
         return;
       }
+      if (this.dateActive < 0) {
+        common_vendor.index.showToast({
+          title: "请选择预约日期",
+          icon: "none"
+        });
+        return;
+      }
       if (this.orderDateTime === "暂无选择") {
         common_vendor.index.showToast({
           title: "请选择预约时间",
@@ -241,7 +245,7 @@ const _sfc_main = {
         });
         return;
       }
-      this.$http.request("api/course/get_schedule_list", { course_id: this.course_id, orders_product_id: this.orders_product_id }, "post").then((res) => {
+      this.$http.request("api/course/reservation/", { orders_product_id: this.orders_product_id, schedule_id: this.schedule_id }, "post").then((res) => {
         if (res.code === "success") {
           if (this.reservation_number < this.course_number) {
             this.reservation_number++;
@@ -316,6 +320,8 @@ const _sfc_main = {
     },
     // 日期选择事件
     selectDateEvent(index, item) {
+      if (this.dateActive == index)
+        return;
       this.dateActive = index;
       this.selectDate = item.date;
       if (!this.isMultiple) {
@@ -418,16 +424,12 @@ const _sfc_main = {
           this.$emit("change", this.orderTimeArr);
           return;
         }
-        let time = [];
         for (let date in this.orderTimeArr) {
           this.orderTimeArr[date].forEach((item) => {
-            time.push(`${date} ${item}`);
           });
         }
-        this.$emit("change", time);
       } else {
         this.appointTime.push(this.orderDateTime);
-        this.$emit("change", this.orderDateTime);
       }
     },
     //字符串拼接

+ 1 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/project.config.json

@@ -19,7 +19,7 @@
   },
   "compileType": "miniprogram",
   "libVersion": "3.6.5",
-  "appid": "wx24a9669e84ba1f0b",
+  "appid": "wxe270937ea4d7f7d5",
   "projectname": "开邻智数",
   "condition": {
     "search": {

+ 7 - 6
jiaoyu_mp/unpackage/dist/dev/mp-weixin/project.private.config.json

@@ -2,21 +2,22 @@
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
   "projectname": "开邻智数",
   "setting": {
-    "compileHotReLoad": true
+    "compileHotReLoad": true,
+    "urlCheck": false
   },
   "condition": {
     "miniprogram": {
       "list": [
         {
-          "name": "pages/product/index",
-          "pathName": "pagesA/course/reservation",
-          "query": "orders_product_id=undefinedcourse_id",
+          "name": "pagesA/course/index",
+          "pathName": "pages/index/index",
+          "query": "",
           "launchMode": "default",
           "scene": null
         },
         {
-          "name": "pagesA/course/index",
-          "pathName": "pages/index/index",
+          "name": "pages/product/index",
+          "pathName": "pagesA/course/reservation",
           "query": "",
           "launchMode": "default",
           "scene": null

+ 2 - 2
jiaoyu_mp/unpackage/dist/dev/mp-weixin/utils/request.js

@@ -1,7 +1,7 @@
 "use strict";
 const common_vendor = require("../common/vendor.js");
-var domain = "https://kailin.dfwy.tech/";
-domain = common_vendor.index.getAccountInfoSync().miniProgram.envVersion == "release" ? "https://mall.findit.ltd/" : "https://kailin.dfwy.tech/";
+var domain = "https://edu.dfwy.tech/";
+domain = common_vendor.index.getAccountInfoSync().miniProgram.envVersion == "release" ? "https://mall.findit.ltd/" : "https://edu.dfwy.tech/";
 const request = (url, data = {}, method = "GET") => {
   let userLogin = common_vendor.index.getStorageSync("userLogin");
   if (userLogin && userLogin.authcode)

+ 3 - 2
jiaoyu_mp/utils/request.js

@@ -1,8 +1,9 @@
 // 请求域名
-var domain = 'https://kailin.dfwy.tech/'
+// var domain = 'https://kailin.dfwy.tech/'
+var domain = 'https://edu.dfwy.tech/'
 // #ifdef MP-WEIXIN
 // 'http://127.0.0.1:8000/';
-domain = uni.getAccountInfoSync().miniProgram.envVersion == 'release' ? 'https://mall.findit.ltd/' : 'https://kailin.dfwy.tech/';
+domain = uni.getAccountInfoSync().miniProgram.envVersion == 'release' ? 'https://mall.findit.ltd/' : 'https://edu.dfwy.tech/';
 // #endif
 
 // 发送网络请求的函数

Some files were not shown because too many files changed in this diff