liuguofeng 6 месяцев назад
Родитель
Сommit
7ec54f1062

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

@@ -34,7 +34,6 @@
 						<view class="product_title">
 							<view class="product_text">
 								<text>{{item.name}}</text>
-
 							</view>
 							<view class="time">
 								<text>{{item.spec}}</text>
@@ -223,7 +222,7 @@
 		position: fixed;
 		margin: 0rpx auto;
 		padding: 20rpx 0rpx;
-		// background-color: #FFFFFF;
+		background-color: #ffffff;
 		.search_box{
 			width: 590rpx;
 			height: 60rpx;

+ 15 - 6
jiaoyu_mp/pages/score/index.vue

@@ -40,16 +40,16 @@
 				</view>
 			</view>
 			<view class="course_option">
-				<view class="option_name">
+				<view class="option_name" :class="{'active': selectedOption === 1  }" @click="highlightOption(1)">
 					综合
 				</view>
-				<view class="option_name">
+				<view class="option_name" :class="{'active': selectedOption === 2  }" @click="highlightOption(2)">
 					我可兑换
 				</view>
-				<view class="option_name">
+				<view class="option_name" :class="{'active': selectedOption === 3  }" @click="highlightOption(3)">
 					销量
 				</view>
-				<view class="option_name">
+				<view class="option_name" :class="{'active': selectedOption === 4  }" @click="highlightOption(4)">
 					积分
 				</view>
 			</view>
@@ -79,7 +79,9 @@
 				// 是否请求中
 				isReqing:false,
 				//用户名称
-				username:''
+				username:'',
+				
+				selectedOption: 1,// 用于记录当前选中的积分商品选项
 			}
 		},
 		onLoad() {
@@ -190,7 +192,10 @@
 				uni.navigateTo({
 					url:"/pages/score/product?id="+item.id,
 				})
-			}
+			},
+			highlightOption(index) {
+			  this.selectedOption = index;
+			},
 		}
 	}
 </script>
@@ -260,6 +265,10 @@
 				background-color: #e2e2e2;
 			}
 		}
+		.active{
+			background-color: #1FBE7E !important;
+			color: #fff;
+		}
 	}
 	.product_box{
 		display: block;

+ 3 - 1
jiaoyu_mp/pages/score/product.vue

@@ -535,11 +535,13 @@
 			.product_title{
 				font-size: 30rpx;
 				line-height: 40rpx;
+				padding: 5rpx 0rpx;
 			}
 			.product_subtitle{
 				color: #999999;
 				line-height: 40rpx;
 				font-size: 24rpx;
+				padding: 5rpx 0rpx;
 			}
 		}
 		.product_spec{
@@ -547,7 +549,7 @@
 			font-size: 24rpx;
 			line-height: 30rpx;
 			overflow: hidden;
-			margin-top: 20rpx;
+			// margin-top: 20rpx;
 			.spec_name{
 				float: left;
 				color: red;

+ 2 - 2
jiaoyu_mp/pagesA/course/reservation.vue

@@ -326,9 +326,9 @@
 			initOnload() {
 				this.dateArr = this.initData() // 日期栏初始化
 				this.timeArr = this.initTime(this.isQuantum) //时间选项初始化
-				console.log(this.timeArr);
+				// console.log(this.timeArr);
 				this.timeQuanBegin = this.timeQuanEnd = ""
-				console.log(this.orderTimeArr)
+				// console.log(this.orderTimeArr)
 				let isFullTime = true
 				this.timeArr.forEach((item, index) => {
 					// 时间段

+ 1 - 1
jiaoyu_mp/pagesA/orders/userorder.vue

@@ -286,7 +286,7 @@
 				justify-content: flex-end;
 				.more{
 					padding: 20rpx;
-					 position: relative;
+					position: relative;
 					.more-options {
 					    position: absolute;
 						width: 150rpx;

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

@@ -5,6 +5,7 @@
   position: fixed;
   margin: 0rpx auto;
   padding: 20rpx 0rpx;
+  background-color: #ffffff;
 }
 .search_fixed .search_box {
   width: 590rpx;

+ 15 - 2
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/index.js

@@ -21,7 +21,9 @@ const _sfc_main = {
       // 是否请求中
       isReqing: false,
       //用户名称
-      username: ""
+      username: "",
+      selectedOption: 1
+      // 用于记录当前选中的积分商品选项
     };
   },
   onLoad() {
@@ -108,6 +110,9 @@ const _sfc_main = {
       common_vendor.index.navigateTo({
         url: "/pages/score/product?id=" + item.id
       });
+    },
+    highlightOption(index) {
+      this.selectedOption = index;
     }
   }
 };
@@ -138,7 +143,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
     f: common_vendor.p({
       type: "search",
       size: "20"
-    })
+    }),
+    g: $data.selectedOption === 1 ? 1 : "",
+    h: common_vendor.o(($event) => $options.highlightOption(1)),
+    i: $data.selectedOption === 2 ? 1 : "",
+    j: common_vendor.o(($event) => $options.highlightOption(2)),
+    k: $data.selectedOption === 3 ? 1 : "",
+    l: common_vendor.o(($event) => $options.highlightOption(3)),
+    m: $data.selectedOption === 4 ? 1 : "",
+    n: common_vendor.o(($event) => $options.highlightOption(4))
   });
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

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

@@ -1 +1 @@
-<view><view class="product_box"><view wx:if="{{a}}" class="to_bottom"> -----还没有积分产品-----</view><view class="product_list"><view wx:for="{{b}}" wx:for-item="item" wx:key="e" bindtap="{{item.d}}" data-eventsync="true" class="product_item"><image class="product_image" src="{{item.a}}" mode=""></image><view class="product_name"><text>{{item.b}}</text></view><view class="stock_price"><view class="product_price"><text>{{item.c}} 积分</text></view></view></view></view></view><view class="header_fixed"><view class="user_title"><view class="user_prc"><image src="{{c}}"></image></view><view class="title"><view class="">{{d}}</view><view class="">{{e}}积分 </view></view></view><view class="search"><view class="search_box"><view class="search_input"><input type="text" placeholder="一年级系统班"/></view><view class="search_icon"><uni-icons wx:if="{{f}}" u-i="b5b70676-0" bind:__l="__l" u-p="{{f}}"></uni-icons></view></view></view><view class="course_option"><view class="option_name"> 综合 </view><view class="option_name"> 我可兑换 </view><view class="option_name"> 销量 </view><view class="option_name"> 积分 </view></view></view><view class="to_bottom"> -----到底了-----</view></view>
+<view><view class="product_box"><view wx:if="{{a}}" class="to_bottom"> -----还没有积分产品-----</view><view class="product_list"><view wx:for="{{b}}" wx:for-item="item" wx:key="e" bindtap="{{item.d}}" data-eventsync="true" class="product_item"><image class="product_image" src="{{item.a}}" mode=""></image><view class="product_name"><text>{{item.b}}</text></view><view class="stock_price"><view class="product_price"><text>{{item.c}} 积分</text></view></view></view></view></view><view class="header_fixed"><view class="user_title"><view class="user_prc"><image src="{{c}}"></image></view><view class="title"><view class="">{{d}}</view><view class="">{{e}}积分 </view></view></view><view class="search"><view class="search_box"><view class="search_input"><input type="text" placeholder="一年级系统班"/></view><view class="search_icon"><uni-icons wx:if="{{f}}" u-i="b5b70676-0" bind:__l="__l" u-p="{{f}}"></uni-icons></view></view></view><view class="course_option"><view class="{{['option_name', g && 'active']}}" bindtap="{{h}}"> 综合 </view><view class="{{['option_name', i && 'active']}}" bindtap="{{j}}"> 我可兑换 </view><view class="{{['option_name', k && 'active']}}" bindtap="{{l}}"> 销量 </view><view class="{{['option_name', m && 'active']}}" bindtap="{{n}}"> 积分 </view></view></view><view class="to_bottom"> -----到底了-----</view></view>

+ 4 - 0
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/index.wxss

@@ -63,6 +63,10 @@
   margin: 20rpx 0rpx;
   background-color: #e2e2e2;
 }
+.header_fixed .active {
+  background-color: #1FBE7E !important;
+  color: #fff;
+}
 .product_box {
   display: block;
   overflow: hidden;

+ 2 - 1
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pages/score/product.wxss

@@ -42,18 +42,19 @@
 .product_info .product_title_info .product_title {
   font-size: 30rpx;
   line-height: 40rpx;
+  padding: 5rpx 0rpx;
 }
 .product_info .product_title_info .product_subtitle {
   color: #999999;
   line-height: 40rpx;
   font-size: 24rpx;
+  padding: 5rpx 0rpx;
 }
 .product_info .product_spec {
   color: #999999;
   font-size: 24rpx;
   line-height: 30rpx;
   overflow: hidden;
-  margin-top: 20rpx;
 }
 .product_info .product_spec .spec_name {
   float: left;

+ 0 - 2
jiaoyu_mp/unpackage/dist/dev/mp-weixin/pagesA/course/reservation.js

@@ -271,9 +271,7 @@ const _sfc_main = {
     initOnload() {
       this.dateArr = this.initData();
       this.timeArr = this.initTime(this.isQuantum);
-      console.log(this.timeArr);
       this.timeQuanBegin = this.timeQuanEnd = "";
-      console.log(this.orderTimeArr);
       this.timeArr.forEach((item, index) => {
         if (this.isQuantum) {
           if (this.shcedule_list[index].reservation_status === 1) {