Browse Source

第一版

xiaoxin 3 years ago
parent
commit
f495be75f8
100 changed files with 12972 additions and 555 deletions
  1. 16 0
      .hbuilderx/launch.json
  2. 5 5
      App.vue
  3. 262 0
      components/multiple-picker/multiple-picker.vue
  4. 5 2
      components/search.vue
  5. 9 7
      main.js
  6. 79 72
      manifest.json
  7. 20 0
      package.json
  8. 14 5
      pages.json
  9. 62 0
      pages/404/404.vue
  10. 352 118
      pages/detail/detail.vue
  11. 578 209
      pages/home/home.vue
  12. 20 28
      pages/index/index.vue
  13. 194 66
      pages/my/my.vue
  14. 99 43
      pages/record/record.vue
  15. BIN
      static/assigned.png
  16. 1 0
      static/header-icon.svg
  17. BIN
      static/pass.png
  18. 67 0
      uni_modules/rudon-multiSelector/changelog.md
  19. 537 0
      uni_modules/rudon-multiSelector/components/rudon-multiSelector/rudon-multiSelector.vue
  20. 84 0
      uni_modules/rudon-multiSelector/package.json
  21. 1 0
      uni_modules/rudon-multiSelector/readme.md
  22. 1 0
      unpackage/dist/build/h5/assets/404-7bd80ffa.css
  23. 1 0
      unpackage/dist/build/h5/assets/_plugin-vue_export-helper.1b428a4d.js
  24. 1 0
      unpackage/dist/build/h5/assets/bottom.64dd5779.js
  25. BIN
      unpackage/dist/build/h5/assets/clock-2a23ba7e.png
  26. 1 0
      unpackage/dist/build/h5/assets/detail-23ec828e.css
  27. 1 0
      unpackage/dist/build/h5/assets/getParams.10f08682.js
  28. 1 0
      unpackage/dist/build/h5/assets/home-8cc363a6.css
  29. 6 0
      unpackage/dist/build/h5/assets/index-220b8b44.js
  30. 1 0
      unpackage/dist/build/h5/assets/index-88c6c4d6.css
  31. 1 0
      unpackage/dist/build/h5/assets/isWeixin.44451021.js
  32. BIN
      unpackage/dist/build/h5/assets/man-c9231f78.png
  33. 1 0
      unpackage/dist/build/h5/assets/my-982e0760.css
  34. BIN
      unpackage/dist/build/h5/assets/no-bus-49df1801.png
  35. 1 0
      unpackage/dist/build/h5/assets/no-bus.fca891d8.js
  36. 1 0
      unpackage/dist/build/h5/assets/pages-404-404.d799f2fb.js
  37. 1 0
      unpackage/dist/build/h5/assets/pages-detail-detail.b8aa56fd.js
  38. 1 0
      unpackage/dist/build/h5/assets/pages-home-home.c662ba40.js
  39. 1 0
      unpackage/dist/build/h5/assets/pages-index-index.600a5fd0.js
  40. 1 0
      unpackage/dist/build/h5/assets/pages-my-my.0c7f5999.js
  41. 1 0
      unpackage/dist/build/h5/assets/pages-record-record.28d838a3.js
  42. 1 0
      unpackage/dist/build/h5/assets/record-e99b76ed.css
  43. 1 0
      unpackage/dist/build/h5/assets/search-5d196260.css
  44. 1 0
      unpackage/dist/build/h5/assets/search.1c6c0837.js
  45. 1 0
      unpackage/dist/build/h5/assets/uni-app.es.18e68793.js
  46. 1 0
      unpackage/dist/build/h5/assets/uni.545a1a57.css
  47. 24 0
      unpackage/dist/build/h5/index.html
  48. BIN
      unpackage/dist/build/h5/static/assigned.png
  49. BIN
      unpackage/dist/build/h5/static/bottom.png
  50. BIN
      unpackage/dist/build/h5/static/box.png
  51. BIN
      unpackage/dist/build/h5/static/boy.png
  52. BIN
      unpackage/dist/build/h5/static/cancel.png
  53. BIN
      unpackage/dist/build/h5/static/clock.png
  54. 20 0
      unpackage/dist/build/h5/static/customicons.css
  55. BIN
      unpackage/dist/build/h5/static/customicons.ttf
  56. BIN
      unpackage/dist/build/h5/static/gril.png
  57. 1 0
      unpackage/dist/build/h5/static/header-icon.svg
  58. BIN
      unpackage/dist/build/h5/static/man.png
  59. BIN
      unpackage/dist/build/h5/static/my-active.png
  60. BIN
      unpackage/dist/build/h5/static/my.png
  61. BIN
      unpackage/dist/build/h5/static/no-bus.png
  62. BIN
      unpackage/dist/build/h5/static/pass.png
  63. BIN
      unpackage/dist/build/h5/static/right.png
  64. BIN
      unpackage/dist/build/h5/static/school-active.png
  65. BIN
      unpackage/dist/build/h5/static/school.png
  66. BIN
      unpackage/dist/build/h5/static/subscribe.png
  67. BIN
      unpackage/dist/build/h5/static/success.png
  68. BIN
      unpackage/dist/build/h5/static/waiting.png
  69. BIN
      unpackage/dist/build/h5/static/woman.png
  70. 28 0
      unpackage/dist/dev/mp-weixin/app.js
  71. 38 0
      unpackage/dist/dev/mp-weixin/app.json
  72. 2362 0
      unpackage/dist/dev/mp-weixin/app.wxss
  73. 7085 0
      unpackage/dist/dev/mp-weixin/common/vendor.js
  74. 37 0
      unpackage/dist/dev/mp-weixin/components/search.js
  75. 4 0
      unpackage/dist/dev/mp-weixin/components/search.json
  76. 1 0
      unpackage/dist/dev/mp-weixin/components/search.wxml
  77. 39 0
      unpackage/dist/dev/mp-weixin/components/search.wxss
  78. 27 0
      unpackage/dist/dev/mp-weixin/pages/404/404.js
  79. 6 0
      unpackage/dist/dev/mp-weixin/pages/404/404.json
  80. 1 0
      unpackage/dist/dev/mp-weixin/pages/404/404.wxml
  81. 19 0
      unpackage/dist/dev/mp-weixin/pages/404/404.wxss
  82. 119 0
      unpackage/dist/dev/mp-weixin/pages/detail/detail.js
  83. 8 0
      unpackage/dist/dev/mp-weixin/pages/detail/detail.json
  84. 1 0
      unpackage/dist/dev/mp-weixin/pages/detail/detail.wxml
  85. 93 0
      unpackage/dist/dev/mp-weixin/pages/detail/detail.wxss
  86. 135 0
      unpackage/dist/dev/mp-weixin/pages/home/home.js
  87. 5 0
      unpackage/dist/dev/mp-weixin/pages/home/home.json
  88. 1 0
      unpackage/dist/dev/mp-weixin/pages/home/home.wxml
  89. 162 0
      unpackage/dist/dev/mp-weixin/pages/home/home.wxss
  90. 40 0
      unpackage/dist/dev/mp-weixin/pages/index/index.js
  91. 5 0
      unpackage/dist/dev/mp-weixin/pages/index/index.json
  92. 1 0
      unpackage/dist/dev/mp-weixin/pages/index/index.wxml
  93. 0 0
      unpackage/dist/dev/mp-weixin/pages/index/index.wxss
  94. 100 0
      unpackage/dist/dev/mp-weixin/pages/my/my.js
  95. 7 0
      unpackage/dist/dev/mp-weixin/pages/my/my.json
  96. 1 0
      unpackage/dist/dev/mp-weixin/pages/my/my.wxml
  97. 80 0
      unpackage/dist/dev/mp-weixin/pages/my/my.wxss
  98. 82 0
      unpackage/dist/dev/mp-weixin/pages/record/record.js
  99. 8 0
      unpackage/dist/dev/mp-weixin/pages/record/record.json
  100. 0 0
      unpackage/dist/dev/mp-weixin/pages/record/record.wxml

+ 16 - 0
.hbuilderx/launch.json

@@ -0,0 +1,16 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version": "0.0",
+    "configurations": [{
+     	"default" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "local"
+     	},
+     	"type" : "uniCloud"
+     }
+    ]
+}

+ 5 - 5
App.vue

@@ -1,14 +1,13 @@
 <script>
 	export default {
 		onLaunch: function() {
-			// console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
-			// console.log('App Launch')
+
 		},
 		onShow: function() {
-			// console.log('App Show')
+
 		},
 		onHide: function() {
-			// console.log('App Hide')
+
 		}
 	}
 </script>
@@ -18,6 +17,7 @@
 	@import '@/uni_modules/uni-scss/index.scss';
 	/* #ifndef APP-NVUE */
 	@import '@/static/customicons.css';
+
 	// 设置整个项目的背景色
 	page {
 		background-color: #fff;
@@ -29,4 +29,4 @@
 		color: #333;
 		padding: 10px;
 	}
-</style>
+</style>

+ 262 - 0
components/multiple-picker/multiple-picker.vue

@@ -0,0 +1,262 @@
+<template>
+	<view class="popup" v-show="show">
+		<view class="bg" @tap="cancelMultiple"></view>
+	    <view class="selectMultiple" :animation="animationData">
+	    	<view class="multipleBody">
+	    		<view class="title">
+	    			<view class="close" @tap="cancelMultiple">
+	    				取消
+	    			</view>
+	    			<view class="name">
+	    				{{title}}
+	    			</view>
+	    			<view class="confirm" @tap="confirmMultiple">
+	    				确认
+	    			</view>
+	    		</view>
+	    		<view class="list">
+					<view class="mask mask-top"></view>
+					<view class="mask mask-bottom"></view>
+	    			<scroll-view class="diet-list" scroll-y="true">
+	    				<view v-for="(item, index) in list" :class="['item', item.selected ? 'checked' : '']" @tap="onChange(index, item)">
+	    					<span>{{item.label}}</span>
+	    					<view class="icon" v-show="item.selected">
+								<icon type="success_no_circle" size="16" color="#2D8DFF"/>
+	    					</view>
+	    				</view>
+	    			</scroll-view>
+	    		</view>
+	    	</view>
+	    </view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name:"multiple-picker",
+		data() {
+			return {
+				// 选中值
+				value: [],
+				// 选中列表
+				selected: [],
+				// 列表数据
+				list: [],
+				// 出场动画
+				animationData: {},
+			};
+		},
+		props: {
+			// 是否显示
+			show: {
+				type: Boolean,
+				default: false
+			},
+			// 标题
+			title: {
+				type: String,
+				default: ''
+			},
+			//数据列表
+			columns: {
+				type: Array,
+				default: [
+					{
+						label: '测试1',
+						value: '1',
+					}
+				]
+			},
+			// 默认选中
+			defaultIndex: {
+				type: Array,
+				default: [],
+			}
+		},
+		watch: {
+			// 监听是否显示
+			show(val) {
+				if(val) {
+					this.openMultiple();
+				}
+			}
+		},
+		methods: {
+			// 列点击事件
+			onChange(index, item) {
+				// 是否已选中
+				if(this.value.indexOf(item.value.toString()) >= 0) {
+					this.list[index].selected = false;
+				}
+				else {
+					this.list[index].selected = true;
+				}
+				
+				// 筛选已勾选数据
+				this.value = [];
+				this.selected = [];
+				this.list.forEach((col_item, col_index) => {
+					if(col_item.selected) {
+						this.value.push(col_item.value.toString());
+						this.selected.push({
+							label: col_item.label,
+							value: col_item.value,
+						});
+					}
+				});
+				this.$emit("change", {selected: this.selected, value: this.value});
+			},
+			// 弹出框开启触发事件
+			openMultiple() {
+				// 初始化列表数据,默认勾选数据
+				this.value = this.defaultIndex;
+				this.columns.forEach((item, index) => {
+					this.$set(item, "selected", false);
+					if(this.value.indexOf(item.value.toString()) >= 0) {
+						item.selected = true;
+					}
+				});
+				this.list = Object.assign([], this.columns);
+				// 弹出动画
+				this.openAnimation();
+			},
+			// 确认
+			confirmMultiple() {
+				this.$emit("confirm", {selected: this.selected, value: this.value});
+			},
+			// 关闭/取消
+			cancelMultiple() {
+				this.$emit("cancel");
+			},
+			// 展开动画
+			openAnimation() {
+				var animation = uni.createAnimation()
+				animation.translate(0, 300).step({ duration: 0 });
+				this.animationData = animation.export();
+				this.$nextTick(() => {
+					animation.translate(0, 0).step({ duration: 300, timingFunction: 'ease' });
+					this.animationData = animation.export()
+				})
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.popup {
+		width: 100%;
+		height: 100vh;
+		position: fixed;
+		z-index: 99999;
+		left: 0;
+		bottom: 0;
+		
+		.bg {
+			width: 100%;
+			height: 100%;
+			background-color: rgba(black, .5);
+		}
+	}
+	.selectMultiple {
+		width: 100%;
+		position: absolute;
+		left: 0;
+		bottom: 0;
+		background-color: white;
+		
+		.multipleBody {
+			width: 100%;
+			padding: 30rpx;
+			box-sizing: border-box;
+			padding-bottom: 80rpx;
+			
+			.title {
+				font-size: 28rpx;
+				display: flex;
+				flex-direction: row;
+				
+				.close {
+					width: 80rpx;
+					opacity: .5;
+				}
+				.name {
+					width: 530rpx;
+					text-align: center;
+					overflow: hidden;
+					display: -webkit-box;
+					-webkit-box-orient:vertical;
+					-webkit-line-clamp:1;
+				}
+				.confirm {
+					width: 80rpx;
+					text-align: right;
+					color: #2D8DFF;
+				}
+			}
+			.list {
+				width: 100%;
+				padding-top: 30rpx;
+				position: relative;
+				
+				.mask {
+					width: 100%;
+					height: 120rpx;
+					position: absolute;
+					left: 0;
+					z-index: 2;
+					pointer-events: none;
+					
+					&.mask-top {
+						top: 30rpx;
+						background-image: linear-gradient(to bottom, #fff, rgba(#fff, 0));
+					}
+					&.mask-bottom {
+						bottom: 0;
+						background-image: linear-gradient(to bottom, rgba(#fff, 0), #fff);
+					}
+				}
+				
+				.diet-list {
+					max-height: 400rpx;
+				}
+				
+				.item {
+					position: relative;
+					width: 100%;
+					line-height: 40rpx;
+					border-bottom: 1px solid rgba($color: #000000, $alpha: .05);
+					padding: 20rpx 0;
+					font-size: 30rpx;
+					box-sizing: border-box;
+					text-align: center;
+					
+					span {
+						overflow: hidden;
+						display: -webkit-box;
+						-webkit-box-orient:vertical;
+						-webkit-line-clamp:1;
+						padding: 0 40rpx;
+					}
+					
+					.icon {
+						position: absolute;
+						right: 10rpx;
+						top: 50%;
+						transform: translateY(-50%);
+						height: 16px;
+					}
+					&.checked {
+						color: #2D8DFF;
+					}
+					&:last-child {
+						border-bottom: none;
+						margin-bottom: 60rpx;
+					}
+					&:first-child {
+						margin-top: 60rpx;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 5 - 2
components/search.vue

@@ -25,9 +25,12 @@
 		ref
 	} from "vue"
 
-	const typeList = ref(['全部', '预约成功', '已通行', '已取消', '候补中'])
+	defineProps({
+		typeList: Array,
+		timeList: Array
+	})
+
 	const typeIndex = ref(0)
-	const timeList = ref(['全部', '当天', '本周', '本月'])
 	const timeIndex = ref(0)
 
 	const conveyData = defineEmits(["handLeConveyData"])

+ 9 - 7
main.js

@@ -1,4 +1,3 @@
-
 // #ifndef VUE3
 import Vue from 'vue'
 import App from './App'
@@ -8,18 +7,21 @@ Vue.config.productionTip = false
 App.mpType = 'app'
 
 const app = new Vue({
-    ...App
+	...App
 })
 app.$mount()
 // #endif
 
 // #ifdef VUE3
-import { createSSRApp } from 'vue'
+import {
+	createSSRApp
+} from 'vue'
 import App from './App.vue'
+
 export function createApp() {
-  const app = createSSRApp(App)
-  return {
-    app
-  }
+	const app = createSSRApp(App)
+	return {
+		app
+	}
 }
 // #endif

+ 79 - 72
manifest.json

@@ -1,73 +1,80 @@
 {
-	"name": "校车预约",
-	"appid": "__UNI__43F49FA",
-	"description": "",
-	"versionName": "1.0.0",
-	"versionCode": "100",
-	"transformPx": false,
-	"app-plus": {
-		/* 5+App特有相关 */
-		"usingComponents": true,
-		"nvueCompiler": "uni-app",
-		"nvueStyleCompiler": "uni-app",
-		"splashscreen": {
-			"alwaysShowBeforeRender": true,
-			"waiting": true,
-			"autoclose": true,
-			"delay": 0
-		},
-		"modules": {},
-		/* 模块配置 */
-		"distribute": {
-			/* 应用发布信息 */
-			"android": {
-				/* android打包配置 */
-				"permissions": [
-					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-					"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
-					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-					"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
-					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-					"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-					"<uses-feature android:name=\"android.hardware.camera\"/>",
-					"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-				]
-			},
-			"ios": {},
-			/* ios打包配置 */
-			"sdkConfigs": {}
-		}
-	},
-	/* SDK配置 */
-	"quickapp": {},
-	/* 快应用特有相关 */
-	"mp-weixin": {
-		/* 小程序特有相关 */
-		"appid": "",
-		"setting": {
-			"urlCheck": false
-		},
-		"usingComponents": true
-	},
-	"vueVersion": "3",
-	"h5": {
-		"title": "校车预约",
-		"devServer": {
-			"disableHostCheck": true,
-			"proxy": {
-				"/carbook": {
-					"target": "https://chtech.ncjti.edu.cn/carstop/carbook", //目标接口域名
-					"changeOrigin": true, //是否跨域
-					"secure": false // 设置支持https协议的代理
-				}
-			}
-		}
-	}
-}
+    "name" : "校车预约",
+    "appid" : "__UNI__43F49FA",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    "app-plus" : {
+        /* 5+App特有相关 */
+        "usingComponents" : true,
+        "nvueCompiler" : "uni-app",
+        "nvueStyleCompiler" : "uni-app",
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        "modules" : {},
+        /* 模块配置 */
+        "distribute" : {
+            /* 应用发布信息 */
+            "android" : {
+                /* android打包配置 */
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            "ios" : {},
+            /* ios打包配置 */
+            "sdkConfigs" : {}
+        }
+    },
+    /* SDK配置 */
+    "quickapp" : {},
+    /* 快应用特有相关 */
+    "mp-weixin" : {
+        /* 小程序特有相关 */
+        "appid" : "",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true
+    },
+    "vueVersion" : "3",
+    "h5" : {
+        "title" : "校车预约",
+        "devServer" : {
+            "disableHostCheck" : true,
+            "proxy" : {
+                "/carstop/carbook" : {
+                    //目标接口域名
+                    "target" : "https://chtech.ncjti.edu.cn/carstop/carbook",
+                    // "target": "http://192.168.161.170:8088/carBook",
+                    //是否跨域
+                    "changeOrigin" : true,
+                    // 设置支持https协议的代理
+                    "secure" : false
+                }
+            }
+        },
+        "router" : {
+            "base" : "/carstop/dist5/"
+        }
+    }
+}

+ 20 - 0
package.json

@@ -0,0 +1,20 @@
+{
+    "id": "multiple-picker",
+    "name": "下拉多选,完全仿照微信原生效果,简单美观可扩展",
+    "displayName": "下拉多选,完全仿照微信原生效果,简单美观可扩展",
+    "version": "v1.1",
+    "description": "一个简单的多选组件,支持异步数据、默认选中值、可支持多个使用、完全仿照微信原生效果,代码量少且注释多",
+    "keywords": [
+        "多选组件",
+        "多选",
+        "select多选",
+        "uview多选",
+        "picker多选"
+    ],
+    "dcloudext": {
+        "category": [
+            "前端组件",
+            "通用组件"
+        ]
+    }
+}

+ 14 - 5
pages.json

@@ -10,26 +10,35 @@
 			"path": "pages/home/home",
 			"style": {
 				"navigationBarTitleText": "校车预约",
-				"navigationStyle": "custom"
+				"navigationStyle": "custom",
+				"enablePullDownRefresh": true
 			}
 		},
 		{
 			"path": "pages/my/my",
 			"style": {
 				"navigationBarTitleText": "我的预约",
-				"navigationStyle": "custom"
+				"navigationStyle": "custom",
+				"enablePullDownRefresh": true
 			}
 		}, {
 			"path": "pages/record/record",
 			"style": {
-				"navigationBarTitleText": "校车预约",
+				"navigationBarTitleText": "预约记录",
 				"navigationStyle": "custom",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": true
 			}
 		}, {
 			"path": "pages/detail/detail",
 			"style": {
-				"navigationBarTitleText": "校车预约",
+				"navigationBarTitleText": "预约详情",
+				"navigationStyle": "custom",
+				"enablePullDownRefresh": false
+			}
+		}, {
+			"path": "pages/404/404",
+			"style": {
+				"navigationBarTitleText": "错误页面",
 				"navigationStyle": "custom",
 				"enablePullDownRefresh": false
 			}

+ 62 - 0
pages/404/404.vue

@@ -0,0 +1,62 @@
+<template>
+	<view class="container">
+		<view class="img">
+			<img src="../../static/no-bus.png">
+		</view>
+		<view class="info">
+			{{info}}
+		</view>
+	</view>
+</template>
+
+<script setup>
+	import {
+		ref
+	} from "vue"
+
+	import {
+		onLoad
+	} from "@dcloudio/uni-app"
+
+	import {
+		getQueryString
+	} from "../../util/getParams.js"
+
+	const info = ref('')
+
+	onLoad(() => {
+		getMessage()
+	})
+
+	const getMessage = () => {
+		const message = getQueryString('message')
+		if (message) {
+			info.value = message
+		} else {
+			info.value = '404'
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.container {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+
+		.img {
+			margin-top: 200rpx;
+			width: 480rpx;
+			height: 508rpx;
+
+			img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.info {
+			padding: 0 30rpx;
+		}
+	}
+</style>

+ 352 - 118
pages/detail/detail.vue

@@ -1,68 +1,90 @@
 <template>
 	<view class="container">
-
 		<!-- 车牌号区域 -->
 		<view class="box">
 			<view class="left">
 				车牌号
 			</view>
-
-			<picker style="width: 40%;" @change="bindPickerChange($event,1)" :value="busIndex" :range="busList">
-				<view class="right">
-					{{busList[busIndex]}}
-					<div class="right-img">
-						<img src="../../static/bottom.png">
-					</div>
+			<view class="right2">
+				<view class="item">
+					<view :class="['select', form.selectValue ? 'selected' : '']"
+						@tap="handleMultiple(form.selectIndex)">
+						{{form.selectValue || '请选择'}}
+					</view>
 				</view>
-			</picker>
+			</view>
+			<!-- 车牌号选项弹窗区域 -->
+			<transition>
+				<multiple-picker title="请选择" :show="selectMultiple.show" :columns="selectMultiple.columns"
+					:defaultIndex="selectMultiple.index" @confirm="confirmMultiple"
+					@cancel="selectMultiple.show = false" @change="changeMultiple">
+				</multiple-picker>
+			</transition>
 		</view>
 
 		<!-- 人数区域 -->
 		<view class="box">
 			<view class="left">
-				人数
+				容量
 			</view>
-
-			<!-- <picker style="width: 40%;" @change="bindPickerChange($event,1)" :value="busIndex" :range="busList"> -->
 			<view class="right">
-				<!-- {{busList[busIndex]}}
-					<div class="right-img">
-						<img src="../../static/bottom.png">
-					</div> -->
-				55
+				{{info.contain}}
 			</view>
-			<!-- </picker> -->
 		</view>
 
-		<!-- 时间区域 -->
-		<view class="box">
+		<!-- 发车日期区域 -->
+		<view class="box" v-if="info.state_str!='候补中'">
 			<view class="left">
-				时间
+				发车日期
 			</view>
 			<view class="right">
-				<uni-datetime-picker v-model="single">
-					<view class="right">
-						{{single}}
-						<div class="right-img">
-							<img src="../../static/bottom.png">
-						</div>
-					</view>
-				</uni-datetime-picker>
+				{{info.yy_date}}
 			</view>
 		</view>
 
+		<!-- 发车时间区域 -->
+		<view class="box" v-if="info.state_str!='候补中'">
+			<view class="left">
+				发车时间
+			</view>
+			<picker style="width: 40%;" @change="bindPickerChange($event,1)" mode="time" :value="info.ci_time">
+				<view class="right">
+					{{info.ci_time}}
+					<view class="right-img">
+						<img src="../../static/bottom.png">
+					</view>
+				</view>
+			</picker>
+		</view>
+
 		<!-- 路线区域 -->
 		<view class="box">
 			<view class="left">
 				路线
 			</view>
 
-			<picker style="width: 40%;" @change="bindPickerChange($event,1)" :value="pathIndex" :range="pathList">
+			<picker style="width: 60%;" @change="bindPickerChange($event,2)" :range="pathList" range-key="route">
 				<view class="right">
-					{{pathList[pathIndex]}}
-					<div class="right-img">
+					{{info.route}}
+					<view class="right-img">
 						<img src="../../static/bottom.png">
-					</div>
+					</view>
+				</view>
+			</picker>
+		</view>
+
+		<!-- 终点站区域 -->
+		<view class="box">
+			<view class="left">
+				终点站
+			</view>
+
+			<picker style="width: 60%;" @change="bindPickerChange($event,3)" :range="endList" range-key="route_end">
+				<view class="right">
+					{{info.route_end}}
+					<view class="right-img">
+						<img src="../../static/bottom.png">
+					</view>
 				</view>
 			</picker>
 		</view>
@@ -72,38 +94,44 @@
 			<view class="left">
 				状态
 			</view>
+			<view class="right">
+				{{info.state_str}}
+			</view>
+		</view>
 
-			<!-- <picker style="width: 40%;" @change="bindPickerChange($event,1)" :value="busIndex" :range="busList"> -->
+		<!-- 提前一天预约区域 -->
+		<view class="box">
+			<view class="left">
+				可否提前一天预约
+			</view>
 			<view class="right">
-				<!-- {{busList[busIndex]}} -->
-				预约进行中
-				<!-- <div class="right-img">
-						<img src="../../static/bottom.png">
-					</div> -->
+				<!-- <switch :checked="isCheck" /> -->
+				{{info.before_state==0?'可以':'不可以'}}
 			</view>
-			<!-- </picker> -->
+		</view>
+
+		<!-- 保存按钮区域 -->
+		<view class="saveBtn" @click="handleSave">
+			保存
 		</view>
 
 		<!-- 人员名单区域 -->
 		<view class="list">
-			<view class="list-title">
-				人员名单(25/52
+			<view class="list-title" v-if="info.user_num!=0">
+				人员名单({{info.user_num}}/{{info.contain}}
 			</view>
 			<view class="list-item" v-for="(item,index) in listData" :key="index">
 				<view class="item-img">
-					<img :src="item.url">
+					<img src="../../static/man.png">
 				</view>
 				<view class="item-info">
 					<view class="info-name">
 						<view>
-							{{item.name}}
-						</view>
-						<view class="info-name-img">
-							<img :src="item.sex ===1?'../../static/boy.png':'../../static/gril.png'">
+							{{item.user_name}}
 						</view>
 					</view>
 					<view class="info-mes">
-						{{item.identity}}<span>{{item.time}}</span>
+						{{item.user_zz}}<span>{{item.yy_time}}</span>
 					</view>
 				</view>
 				<view class="item-type">
@@ -123,91 +151,249 @@
 		onLoad
 	} from '@dcloudio/uni-app'
 
+	import {
+		myRequest
+	} from "../../util/api.js"
+
+	import {
+		isWeixin
+	} from "../../util/isWeixin.js"
+
 	onLoad((options) => {
-		info.value = JSON.parse(options.info)
-		console.log(info.value);
+		if (isWeixin()) {
+			info.value = JSON.parse(options.info)
+			// console.log(info.value);
+			// 获取人员列表
+			getData(info.value)
+			// 获取路线数组
+			getPathList()
+			// 获取终点站列表
+			getEndList()
+			// 获取车牌号列表
+			getBusList()
+			// 处理车牌号数据
+			form.value.selectValue = info.value.car_number
+
+			setTimeout(() => {
+				let temList = []
+				selectMultiple.value.columns.forEach((item) => {
+					if (item.label == form.value.selectValue) {
+						temList.push(item.value)
+					}
+				})
+				form.value.selectIndex = temList
+			}, 500)
+		} else {
+			uni.redirectTo({
+				url: "/pages/404/404?message=请在微信客户端打开链接"
+			})
+		}
 	})
 
+	// 带过来的预约详情数据
 	const info = ref({})
 
-	const busList = ref(["赣AU8G96", "赣AU8G99", "赣AU8G86"])
-	const busIndex = ref(0)
+	// 车牌号绑定数据
+	const form = ref({
+		selectValue: '',
+		selectIndex: [],
+	})
+	// 车牌号数组相关数据
+	const selectMultiple = ref({
+		show: false,
+		index: [],
+		columns: [],
+	})
 
-	const pathList = ref(["墨轩湖 - 综合楼", "墨轩湖 - 老校区 - 美程宾馆", "墨轩湖 - 老校区"])
-	const pathIndex = ref(0)
+	// 路线数组
+	const pathList = ref([])
 
-	const single = ref('2023-03-28 17:10')
+	// 终点站数组
+	const endList = ref(["666", "888", "999"])
 
-	const bindPickerChange = (e, type) => {
-		console.log(123);
+	// switch开关状态
+	// const isCheck = ref(false)
+
+	// 人员列表数组
+	const listData = ref([])
+
+	// 获取路线数组请求
+	const getPathList = async () => {
+		const res = await myRequest({
+			url: '/appqueryRoute.action',
+		})
+		// console.log(res);
+		pathList.value = res.data
+	}
+	// 获取终点站数组请求
+	const getEndList = async () => {
+		const res = await myRequest({
+			url: '/appqueryEndRoutes.action',
+			data: {
+				route: info.value.route
+			}
+		})
+		// console.log(res);
+		endList.value = res.data
+	}
+	// 获取车牌号数组请求
+	const getBusList = async () => {
+		const res = await myRequest({
+			url: '/appqueryCarInfos.action',
+		})
+		// console.log(res);
+		if (res.data.length) {
+			let temList = []
+			res.data.forEach((item, index) => {
+				temList.push({
+					label: item.car_number,
+					value: index.toString()
+				})
+			})
+			selectMultiple.value.columns = temList
+		}
+	}
+
+	// 获取人员名单请求
+	const getData = async (value) => {
+		const {
+			route,
+			route_end,
+			yy_date,
+			ci_time,
+			car_number
+		} = value
+
+		const res = await myRequest({
+			url: '/appqueryAppointeds.action',
+			data: {
+				route,
+				route_end,
+				yy_date,
+				ci_time,
+				car_number
+			}
+		})
+		// console.log(res)
+		listData.value = res.data
+	}
+
+	// 保存按钮回调
+	const handleSave = () => {
+		uni.showModal({
+			title: '提示',
+			content: '确定保存吗?',
+			success: (res) => {
+				if (res.confirm) {
+					handleSaveRequest()
+				} else if (res.cancel) {}
+			}
+		});
+	}
+
+	// 保存请求
+	const handleSaveRequest = () => {
+		console.log(info.value);
+		const {
+			id,
+			car_number,
+			ci_time,
+			route,
+			route_end,
+			contain
+		} = info.value
+
+		uni.request({
+			url: '/carstop/carbook/scheupdate.action',
+			method: "post",
+			data: {
+				id,
+				car_number,
+				ci_time,
+				route,
+				route_end,
+				contain
+			},
+			success: (res) => {
+				if (res.data.code == 200) {
+					uni.showToast({
+						title: res.data.message
+					})
+					setTimeout(() => {
+						uni.redirectTo({
+							url: "/pages/record/record"
+						})
+					}, 1500)
+				}
+			}
+		});
+	}
+
+	// 点击车牌号下拉框回调
+	const handleMultiple = (val) => {
+		// console.log(val);
+		selectMultiple.value.index = val || [];
+		selectMultiple.value.show = true;
+	}
+
+	// 车牌号下拉框确定按钮回调
+	const confirmMultiple = (e) => {
+		// console.log(e);
+		// console.log(e.value);
+		if (selectMultiple.value.index != e.value) {
+			let temp = [];
+			e.selected.forEach(item => {
+				temp.push(item.label);
+			})
+			form.value.selectValue = temp.toString();
+			info.value.car_number = temp.toString();
+		}
+		form.value.selectIndex = e.value;
+		selectMultiple.value.show = false;
+		// 获取汽车容量
+		getBusContain()
+	}
+
+	// 获取汽车容量请求
+	const getBusContain = async () => {
+		const res = await myRequest({
+			url: '/appqueryCarContain.action',
+			data: {
+				car_number: form.value.selectValue
+			}
+		})
+		// console.log(res);
+		info.value.contain = res.data
 	}
 
+	// 下拉框选择时的回调
+	const changeMultiple = (e) => {
+		// console.log(e);
+	}
 
-	const listData = ref([{
-			name: '张三',
-			url: '../../static/man.png',
-			// 1代表男生,2代表女生
-			sex: 1,
-			identity: '教职工',
-			time: '2023-03-01  10:33:12',
-			// 1代表已预约
-			type: 1
-		},
-		{
-			name: '小刘',
-			url: '../../static/woman.png',
-			// 1代表男生,2代表女生
-			sex: 2,
-			identity: '教职工',
-			time: '2023-03-01  10:33:12',
-			// 1代表已预约
-			type: 1
-		},
-		{
-			name: '小王',
-			url: '../../static/woman.png',
-			// 1代表男生,2代表女生
-			sex: 2,
-			identity: '教职工',
-			time: '2023-03-01  10:33:12',
-			// 1代表已预约
-			type: 1
-		},
-		{
-			name: '张三',
-			url: '../../static/man.png',
-			// 1代表男生,2代表女生
-			sex: 1,
-			identity: '教职工',
-			time: '2023-03-01  10:33:12',
-			// 1代表已预约
-			type: 1
-		},
-		{
-			name: '小刘',
-			url: '../../static/woman.png',
-			// 1代表男生,2代表女生
-			sex: 2,
-			identity: '教职工',
-			time: '2023-03-01  10:33:12',
-			// 1代表已预约
-			type: 1
-		},
-		{
-			name: '小王',
-			url: '../../static/woman.png',
-			// 1代表男生,2代表女生
-			sex: 2,
-			identity: '教职工',
-			time: '2023-03-01  10:33:12',
-			// 1代表已预约
-			type: 1
+	// 原生下拉框的选择回调事件
+	const bindPickerChange = (e, type) => {
+		if (type == 1) {
+			info.value.ci_time = e.detail.value
+		} else if (type == 2) {
+			info.value.route = pathList.value[e.detail.value].route
+			getEndList()
+		} else if (type == 3) {
+			console.log(e.detail.value);
+			console.log("终点站");
 		}
-	])
+	}
+
+	// 提前一天预约switch切换回调
+	// const switchChange = (e) => {
+	// 	console.log(e.detail.value);
+	// 	isCheck.value = e.detail.value
+	// }
 </script>
 
 <style lang="scss" scoped>
 	.container {
+		background-color: #fff;
 
 		.box {
 			display: flex;
@@ -240,10 +426,48 @@
 					}
 				}
 			}
+
+			.right2 {
+				flex: 2;
+				display: flex;
+				justify-content: flex-end;
+
+				.item {
+					width: 100%;
+					padding: 20rpx 0;
+
+					.select {
+						width: 100%;
+						padding-top: 6px;
+						padding-bottom: 6px;
+						padding-left: 9px;
+						border-radius: 4px;
+						font-size: 15px;
+						text-align: end;
+						box-sizing: border-box;
+						color: #CCCCCC;
+						line-height: 26px;
+
+						&.selected {
+							color: black;
+						}
+					}
+				}
+			}
+		}
+
+		.saveBtn {
+			margin: 20rpx 30rpx;
+			line-height: 100rpx;
+			text-align: center;
+			color: #fff;
+			font-size: 34rpx;
+			border-radius: 15rpx;
+			background: linear-gradient(180deg, #8684FF 0%, #3C50E8 100%);
 		}
 
 		.list {
-			padding: 33rpx 30rpx;
+			padding: 13rpx 30rpx;
 
 			.list-title {
 				height: 41rpx;
@@ -318,4 +542,14 @@
 			}
 		}
 	}
+
+	.v-enter-active,
+	.v-leave-active {
+		transition: opacity 0.5s ease;
+	}
+
+	.v-enter-from,
+	.v-leave-to {
+		opacity: 0;
+	}
 </style>

+ 578 - 209
pages/home/home.vue

@@ -1,66 +1,104 @@
 <template>
 	<view class="container">
-		<!-- 选择发车时间区域 -->
-		<view class="time">
-			<view class="time-title">
-				选择发车时间 <span>/ 开启校车之旅</span>
+		<!-- 头部时间信息区域 -->
+		<view class="header-time">
+			<view class="today" @click="handleChangeTime">
+				{{dateType=='明天'?'今天':''}}
 			</view>
+			<view class="time-info">
+				{{currentMonth}}月{{currentDay}}日
+				<span>{{dateType}}</span>
+				{{currentWeek}}
+			</view>
+			<view class="tomorrow" @click="handleChangeTime">
+				{{dateType=='今天'?'明天':''}}
+			</view>
+		</view>
 
-			<view class="time-list">
-				<view :class="currentIndex1 === index?'active':'time-list-item'" v-for="(item,index) in timeList"
-					:key="index" @click="handleChangeCurrentIndex(index,1,item)">
-					{{item}}
+		<!-- 头部路线信息区域 -->
+		<view class="header-path">
+			<view class="path-title">
+				请选择路线
+			</view>
+			<view class="path-list" v-if="pathList.length">
+				<view :class="currentIndex1 === index?'active path-item':'path-item'" v-for="(item,index) in pathList"
+					:key="index" @click="handleChangeCurrentIndex(1,index,item)">
+					{{item.route}}
 				</view>
 			</view>
+			<view class="path-list-nodata" v-else>
+				暂无数据
+			</view>
 		</view>
 
-		<!-- 选择预约车辆区域 -->
-		<view class="bus">
-			<view class="bus-title">
-				选择预约车辆 <span>/ 墨轩湖 - 综合楼</span>
+		<!-- 车辆列表区域 -->
+		<view class="carList">
+			<view class="carList-title">
+				选择车辆
 			</view>
-			<view class="bus-list" v-if="busList.length">
-				<view :class="currentIndex2 === index?'active':'bus-list-item'" v-for="(item,index) in busList"
-					:key="index" @click="handleChangeCurrentIndex(index,2,item)">
-					{{item}}
+			<view :class="[currentIndex2 === index?'active ':'',item.can_order==0?'unactive':'','carList-item']"
+				v-for="(item,index) in busList" :key="index" @click="handleChangeCurrentIndex(2,index,item)">
+				<view class="item-time">
+					{{item.ci_time}}
 				</view>
-			</view>
-			<view class="bus-list-nodata" v-else>
-				<view class="nodata-img">
-					<img src="../../static/no-bus.png" alt="">
-					<view class="nodata-info">
-						请先选择发车时间
+				<view class="item-info">
+					<view class="item-info-place">
+						{{item.route_end}}
 					</view>
+					<view class="item-info-detail">
+						车牌:{{item.car_number}}
+						<span>容量:{{item.boarde_num+'/'+item.contain}}</span>
+					</view>
+				</view>
+			</view>
+
+			<!-- 没有数据时展示的区域 -->
+			<view class="carList-nodata" v-if="busList.length==0">
+				<img src="../../static/no-bus.png">
+				<view class="nodata-info">
+					暂无数据
 				</view>
 			</view>
 		</view>
 
 		<!-- 立即预约按钮区域 -->
-		<view class="btn">
-			<view class="btn-clock">
-				<img src="../../static/clock.png">
-			</view>
-			<view class="btn-info">
-				<view class="btn-info-title">
-					预约截止时间
+		<view class="btn-box" v-if="busList.length">
+			<view class="btn">
+				<view class="btn-clock">
+					<img src="../../static/clock.png">
 				</view>
-				<view class="btn-info-time">
-					2023-10-03 15:15:15
+				<view class="btn-info" v-if="status">
+					<view class="btn-info-title">
+						开始预约时间段
+					</view>
+					<view>
+						{{yy_duration}}
+					</view>
+				</view>
+				<view class="btn-info" v-else>
+					<view class="btn-info-title2">
+						候补截止时间
+					</view>
+					<view class="btn-info-time">
+						{{hh_end}}
+					</view>
 				</view>
-			</view>
 
-			<view class="btn-button" @click="handleSub">
-				立即预约
+				<view class="btn-button" @click="handleSub">
+					<!-- {{status?'立即预约':'候补预约'}} -->
+					{{status?'立即预约':dateType=='今天'?'候补预约':'立即预约'}}
+				</view>
 			</view>
 		</view>
 
-		<!-- 预约截止时间区域 -->
-		<view class="info">
+		<!-- 温馨提示区域 -->
+		<view class="box-info">
 			<view class="info-title">
-				预约说明
+				温馨提示
 			</view>
 			<view class="info-detail">
-				预约成功后请提前5分钟到校车地点,若迟到需重新排队或预约;如有疑问请联系后勤。后勤电话:13689545487
+				预约截止时间为发车前{{yy_end}}分钟,如当月爽约{{black_count}}次,账号会被锁定,锁定后联系车队长解锁。车队长联系方式:<span
+					@click="handlePhone(13576937506)">13576937506</span>,候补功能仅当日开放。
 			</view>
 		</view>
 	</view>
@@ -68,276 +106,607 @@
 
 <script setup>
 	import {
-		ref
+		ref,
+		computed,
+		watch
 	} from "vue"
+
 	import {
-		onLoad
+		onLoad,
+		onPullDownRefresh,
+		onShow
 	} from "@dcloudio/uni-app"
 
 	import {
 		myRequest
 	} from "../../util/api.js"
 
+	import {
+		isWeixin
+	} from "../../util/isWeixin.js"
+
 	onLoad(() => {
-		wxcode.value = uni.getStorageSync('wxcode')
-		alert(wxcode.value)
-		getUserInfo()
+		if (isWeixin()) {
+			card_number.value = uni.getStorageSync('bus_card_number')
+			getUserInfo()
+		} else {
+			uni.redirectTo({
+				url: "/pages/404/404?message=请在微信客户端打开链接"
+			})
+		}
 	})
-	const wxcode = ref('')
-	const currentIndex1 = ref(null)
-	const currentIndex2 = ref(null)
-	const currentTime = ref(null)
-	const currentBus = ref(null)
 
-	// 发车时间列表
-	const timeList = ref([
-		'2023-10-10 15:15:15', '2023-10-10 16:15:15', '2023-10-10 18:15:15'
-	])
+	onShow(() => {
+		getTimeFormat()
+		getPathList()
+		getOrderConfig()
+		currentIndex1.value = 0
+		currentIndex2.value = null
+		currentBusId.value = null
+		busList.value = []
+		setTimeout(() => {
+			currentPath.value = pathList.value[0].route
+			getBusList(pathList.value[0].route)
+		}, 200)
+	})
 
+	// 页面下拉触发刷新回调
+	onPullDownRefresh(() => {
+		getUserInfo()
+		getTimeFormat()
+		getPathList()
+		getOrderConfig()
+		currentIndex1.value = 0
+		currentIndex2.value = null
+		currentBusId.value = null
+		busList.value = []
+		setTimeout(function() {
+			currentPath.value = pathList.value[0].route
+			getBusList(pathList.value[0].route)
+			uni.stopPullDownRefresh();
+		}, 500);
+	})
+
+	// 用户card_number
+	const card_number = ref('')
+	// 判断是今天还是明天
+	const dateType = ref("今天")
+	// 当前月份
+	const currentMonth = ref("")
+	// 当前日期
+	const currentDay = ref("")
+	// 当前星期
+	const currentWeek = ref("")
+	// 发车路线列表
+	const pathList = ref([])
+	// 发车路线当前选中项
+	const currentIndex1 = ref(0)
+	// 当前发车路线
+	const currentPath = ref(null)
 	// 发车车辆列表
-	const busList = ref(['车牌尾号:6601(63/63)', '车牌尾号:6661(63/63)', '车牌尾号:6001(63/63)'])
-	// const busList = ref([])
+	const busList = ref([])
+	// 预约车辆当前选中项
+	const currentIndex2 = ref(null)
+	// 当前预约车辆ID
+	const currentBusId = ref(null)
+	// 开始预约时间段
+	const yy_duration = ref("")
+	// 预约截止时间
+	const yy_end = ref("")
+	// 候补截止时间
+	const hh_end = ref("")
+	// 爽约次数
+	const black_count = ref("")
+
+	// 候补预约状态  true表示预约 false表示候补
+	const status = ref(true)
+
+	// 监听车辆列表更改候补预约状态
+	watch(
+		() => busList.value,
+		(newValue) => {
+			status.value = newValue.some(item =>
+				item.can_order == 1
+			)
+		})
 
+	// 获取用户信息
 	const getUserInfo = async () => {
 		const res = await myRequest({
-			url: '/carBook/useropenid.action',
-			method: 'post',
+			url: '/appget_user.action',
 			data: {
-				wxcode: wxcode.value
+				card_number: card_number.value,
 			}
 		})
-		alert(JSON.stringify(res))
-		console.log(res);
+		// console.log(res);
+		uni.setStorageSync("bus-userInfo", JSON.stringify(res.data))
+		if (res.data && res.data.user_zz !== '教师') {
+			uni.reLaunch({
+				url: "/pages/record/record"
+			})
+		}
+	}
+
+	// 获取所有的发车路线
+	const getPathList = async () => {
+		const res = await myRequest({
+			url: '/appqueryRoute.action',
+		})
+		// console.log(res);
+		pathList.value = res.data
 	}
 
-	// 改变选中项回调
-	const handleChangeCurrentIndex = (index, type, value) => {
-		if (type === 1) {
-			currentIndex1.value = index
-			currentTime.value = value
-		} else {
-			currentIndex2.value = index
-			currentBus.value = value
-		}
+	// 根据路线查询所有车次
+	const getBusList = async (route) => {
+		busList.value = []
+		// 处理时间参数
+		let date = new Date()
+		let year = date.getFullYear()
+
+		const res = await myRequest({
+			url: '/appqueryCarNums.action',
+			data: {
+				date: `${year}-${currentMonth.value}-${currentDay.value}`,
+				route: route || currentPath.value
+			}
+		})
+		// console.log(res);
+		busList.value = res.data || []
+	}
+
+	// 获取预约时间段数据
+	const getOrderConfig = async () => {
+		const res = await myRequest({
+			url: '/appqueryConfig.action',
+		})
+		// console.log(res);
+		yy_duration.value = res.data.yy_duration
+		yy_end.value = res.data.yy_end
+		hh_end.value = res.data.hh_end
+		black_count.value = res.data.black_count
 	}
 
 	// 立即预约按钮回调
 	const handleSub = () => {
-		if (!currentTime.value) {
+		if (status.value) {
+			if (!currentPath.value) {
+				uni.showToast({
+					title: '请选择路线',
+					icon: "none"
+				})
+				return
+			}
+			if (!currentBusId.value) {
+				uni.showToast({
+					title: '请选择车辆',
+					icon: "none"
+				})
+				return
+			}
+			uni.showModal({
+				title: '提示',
+				content: '确定预约吗?',
+				success: (res) => {
+					if (res.confirm) {
+						handleSubscribe()
+					} else if (res.cancel) {
+
+					}
+				}
+			});
+		} else {
+			if (dateType.value == '明天') {
+				uni.showToast({
+					title: '候补功能仅当日开放',
+					icon: "none"
+				})
+				return
+			}
+			if (!currentPath.value) {
+				uni.showToast({
+					title: '请选择路线',
+					icon: "none"
+				})
+				return
+			}
+			if (pathList.value[currentIndex1.value].is_repair == 0) {
+				uni.showToast({
+					title: '当前路线不可候补',
+					icon: "none"
+				})
+				return
+			}
+			uni.showModal({
+				title: '提示',
+				content: '确定候补预约吗?',
+				success: (res) => {
+					if (res.confirm) {
+						handleStandby()
+					} else if (res.cancel) {}
+				}
+			});
+		}
+	}
+
+	// 预约请求
+	const handleSubscribe = async () => {
+		// 处理时间参数
+		let date = new Date()
+		let year = date.getFullYear()
+		const res = await myRequest({
+			url: '/appmakeAppointment.action',
+			data: {
+				date: `${year}-${currentMonth.value}-${currentDay.value}`,
+				card_number: card_number.value,
+				id: currentBusId.value,
+				yyEnd: yy_end.value,
+			}
+		})
+		// console.log(res);
+		if (res) {
 			uni.showToast({
-				title: '请先选择发车时间',
-				icon: "none"
+				title: res.message
+			})
+			currentIndex1.value = null
+			currentIndex2.value = null
+			currentPath.value = null
+			currentBusId.value = null
+			busList.value = []
+			uni.switchTab({
+				url: "/pages/my/my"
 			})
-			return
 		}
-		if (!currentBus.value) {
+	}
+
+	// 候补预约请求
+	const handleStandby = async () => {
+		const res = await myRequest({
+			url: '/appwait_appointment.action',
+			data: {
+				route: currentPath.value,
+				card_number: card_number.value,
+				hh_end: hh_end.value
+			}
+		})
+		// console.log(res);
+		if (res) {
 			uni.showToast({
-				title: '请先选择预约车辆',
-				icon: "none"
+				title: res.message
+			})
+			currentIndex1.value = null
+			currentIndex2.value = null
+			currentPath.value = null
+			currentBusId.value = null
+			uni.switchTab({
+				url: "/pages/my/my"
 			})
-			return
 		}
-		uni.showModal({
-			title: '提示',
-			content: '确定预约吗?',
-			success: (res) => {
-				if (res.confirm) {
-					console.log(123);
-				} else if (res.cancel) {
+	}
 
-				}
+	// 改变选中项回调
+	const handleChangeCurrentIndex = (type, index, item) => {
+		if (type === 1) {
+			currentIndex2.value = null
+			currentBusId.value = null
+			currentIndex1.value = index
+			currentPath.value = item.route
+			getBusList()
+		} else {
+			// 如果车辆不能预约则不进行任何操作
+			if (item.can_order == 0) {
+
+			} else {
+				currentIndex2.value = index
+				currentBusId.value = item.id
 			}
+		}
+	}
+
+	// 切换日期回调
+	const handleChangeTime = () => {
+		if (dateType.value == "今天") {
+			dateType.value = "明天"
+			getTimeFormat(1)
+		} else {
+			dateType.value = "今天"
+			getTimeFormat()
+		}
+		// currentIndex1.value = null
+		// currentPath.value = null
+		// currentIndex2.value = null
+		// currentBusId.value = null
+		// busList.value = []
+		currentIndex1.value = 0
+		currentPath.value = pathList.value[0].route
+		currentIndex2.value = null
+		currentBusId.value = null
+		busList.value = []
+		getBusList()
+	}
+
+	// 获取格式化时间 日期 和 星期
+	const getTimeFormat = (dayType) => {
+		let date = new Date()
+		if (dayType) {
+			let targetday = date.getTime() + 1000 * 60 * 60 * 24
+			date.setTime(targetday)
+		}
+		let month = (date.getMonth() + 1 + '').padStart(2, "0")
+		let day = (date.getDate() + '').padStart(2, "0")
+		let week = date.getDay()
+		let weekArr = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
+
+		currentMonth.value = month
+		currentDay.value = day
+		currentWeek.value = weekArr[week]
+	}
+
+	// 点击电话回调
+	const handlePhone = (phone) => {
+		uni.makePhoneCall({
+			phoneNumber: phone
 		});
 	}
 </script>
 
 <style lang="scss" scoped>
 	.container {
-		padding: 0 30rpx;
+		background-color: #EBECED;
 
-		.time {
-			.time-title {
-				height: 128rpx;
-				line-height: 128rpx;
-				font-size: 30rpx;
-				font-weight: bold;
+		.header-time {
+			display: flex;
+			align-items: center;
+			padding: 0 30rpx;
+			height: 118rpx;
+			background-color: #fff;
+
+			.today,
+			.tomorrow {
+				width: 72rpx;
+				font-size: 24rpx;
+				color: #999999;
+			}
+
+			.time-info {
+				flex: 1;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				font-size: 34rpx;
 
 				span {
+					margin: 0 15rpx;
 					font-size: 24rpx;
-					font-weight: 400;
-					color: #B3B3B3;
+					color: #3D51E8;
 				}
 			}
+		}
 
-			.time-list {
-				display: grid;
-				grid-template-columns: 1fr 1fr;
-				grid-auto-rows: 100rpx;
-				grid-gap: 30rpx 20rpx;
+		.header-path {
+			margin-top: 20rpx;
+			padding: 0 30rpx;
+			background-color: #fff;
 
-				.time-list-item {
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					font-size: 26rpx;
-					border: 1rpx solid #CCCCCC;
-					border-radius: 12rpx;
+			.path-title {
+				line-height: 95rpx;
+				font-size: 34rpx;
+				font-weight: bold;
+			}
+
+			.path-list {
+				display: flex;
+				justify-content: space-between;
+				flex-wrap: wrap;
+
+				.path-item {
+					margin-bottom: 20rpx;
+					padding: 0 8rpx;
+					min-width: 45%;
+					line-height: 96rpx;
+					text-align: center;
+					font-size: 27rpx;
+					border-radius: 14rpx;
+					background-color: #EBEBEB;
 				}
 
 				.active {
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					font-size: 26rpx;
-					border: 1rpx solid #CCCCCC;
-					border-radius: 12rpx;
 					color: #fff;
-					background-image: linear-gradient(#8684FF, #3D50E7);
+					background-color: #5C60F3;
+
+					.item-info {
+						.item-info-detail {
+							color: #fff;
+						}
+					}
 				}
 
-				.disable {
-					background: #E6E6E6;
+				.unactive {
+					color: #A6A6A6;
+
+					.item-info {
+						.item-info-detail {
+							color: #A6A6A6;
+						}
+					}
 				}
 			}
+
+			.path-list-nodata {
+				text-align: center;
+				color: #999999;
+				padding-bottom: 20rpx;
+			}
 		}
 
-		.bus {
-			.bus-title {
-				height: 128rpx;
-				line-height: 128rpx;
-				font-size: 30rpx;
-				font-weight: bold;
+		.carList {
+			margin-top: 20rpx;
+			padding-bottom: 30rpx;
+			min-height: 508rpx;
+			background-color: #fff;
 
-				span {
-					font-size: 24rpx;
-					font-weight: 400;
-				}
+			.carList-title {
+				padding-left: 30rpx;
+				line-height: 95rpx;
+				font-size: 34rpx;
+				font-weight: bold;
 			}
 
-			.bus-list {
+			.carList-item {
 				display: flex;
-				flex-direction: column;
+				align-items: center;
+				box-sizing: border-box;
+				padding: 37rpx 30rpx 32rpx;
+				height: 163rpx;
 
-				.bus-list-item {
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					margin-bottom: 30rpx;
-					height: 100rpx;
-					font-size: 26rpx;
-					border: 1rpx solid #CCCCCC;
-					border-radius: 12rpx;
+				.item-time {
+					position: relative;
+					width: 128rpx;
+					font-weight: bold;
 				}
 
-				.active {
-					display: flex;
-					justify-content: center;
-					align-items: center;
-					margin-bottom: 30rpx;
-					height: 100rpx;
-					font-size: 26rpx;
-					border: 1rpx solid #CCCCCC;
-					border-radius: 12rpx;
-					color: #fff;
-					background-image: linear-gradient(#8684FF, #3D50E7);
+				.item-time::after {
+					content: "";
+					height: 77rpx;
+					position: absolute;
+					top: -15rpx;
+					right: 0;
+					border-right: 1px solid #A6A6A6;
 				}
 
-				.disable {
-					background: #E6E6E6;
-				}
-			}
+				.item-info {
+					display: flex;
+					flex-direction: column;
+					justify-content: space-around;
+					margin-left: 50rpx;
+					height: 100%;
 
-			.bus-list-nodata {
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				color: #B3B3B3;
+					.item-info-place {
+						font-weight: bold;
+					}
 
-				.nodata-img {
-					position: relative;
-					width: 500rpx;
-					height: 500rpx;
+					.item-info-detail {
+						color: #999999;
+						font-size: 26rpx;
 
-					img {
-						width: 100%;
-						height: 100%;
+						span {
+							margin-left: 20rpx;
+						}
 					}
+				}
+			}
 
-					.nodata-info {
-						position: absolute;
-						left: 250rpx;
-						bottom: 50rpx;
-						transform: translateX(-50%);
-						white-space: nowrap;
+			.active {
+				color: #fff;
+				background-color: #5C60F3;
+
+				.item-info {
+					.item-info-detail {
+						color: #fff;
 					}
 				}
 			}
-		}
 
-		.btn {
-			position: relative;
-			display: flex;
-			margin-top: 50rpx;
-			padding: 24rpx 30rpx;
-			box-sizing: border-box;
-			height: 115rpx;
-			border-radius: 15rpx;
-			box-shadow: 0px 0px 12rpx rgba(0, 0, 0, .12);
+			.unactive {
+				color: #A6A6A6;
+
+				.item-info {
+					.item-info-detail {
+						color: #A6A6A6;
+					}
+				}
+			}
 
-			.btn-clock {
-				width: 61rpx;
-				height: 61rpx;
+			.carList-nodata {
+				padding: 0 30rpx;
+				text-align: center;
 
 				img {
-					width: 100%;
+					height: 508rpx;
+				}
+
+				.nodata-info {
+					padding-bottom: 10rpx;
+					color: #999999;
 				}
 			}
+		}
 
-			.btn-info {
-				margin-left: 18rpx;
-				flex: 1;
+		.btn-box {
+			padding: 0 30rpx;
+			background-color: #fff;
+
+			.btn {
+				position: relative;
 				display: flex;
-				flex-direction: column;
-				justify-content: center;
+				align-items: center;
+				width: 690rpx;
+				height: 95rpx;
+				border-radius: 15rpx;
+				box-shadow: 0px 0px 12rpx rgba(0, 0, 0, .12);
 
-				.btn-info-title {
-					font-size: 28rpx;
-					color: #5863F1;
+				.btn-clock {
+					margin-left: 30rpx;
+					width: 61rpx;
+					height: 61rpx;
+
+					img {
+						width: 100%;
+					}
 				}
 
-				.btn-info-time {
+				.btn-info {
+					margin-left: 18rpx;
+					flex: 1;
+					display: flex;
+					flex-direction: column;
+					justify-content: center;
 					font-size: 24rpx;
-					color: #B3B3B3;
+					color: #5863F1;
+
+					.btn-info-title {
+						margin-bottom: 8rpx;
+					}
+
+					.btn-info-title2 {
+						font-size: 28rpx;
+						margin-bottom: 8rpx;
+					}
+
+					.btn-info-time {
+						color: #B3B3B3;
+
+					}
 				}
-			}
 
-			.btn-button {
-				position: absolute;
-				right: 0;
-				top: -7rpx;
-				width: 257rpx;
-				height: 130rpx;
-				line-height: 130rpx;
-				text-align: center;
-				font-size: 30rpx;
-				color: #fff;
-				background: url(../../static/box.png);
-				background-size: 100% 100%;
+				.btn-button {
+					position: absolute;
+					right: 0;
+					top: -7rpx;
+					width: 257rpx;
+					height: 113rpx;
+					line-height: 113rpx;
+					text-align: center;
+					font-size: 30rpx;
+					color: #fff;
+					background: url(../../static/box.png);
+					background-size: 100% 100%;
+				}
 			}
 		}
 
-		.info {
-			margin: 40rpx 0;
+		.box-info {
+			padding: 30rpx 30rpx 40rpx;
+			background-color: #fff;
 
 			.info-title {
 				height: 41rpx;
 				font-size: 28rpx;
+				color: #666666;
 			}
 
 			.info-detail {
 				margin-top: 5rpx;
-				height: 70rpx;
-				color: #B3B3B3;
+				color: #999999;
 				font-size: 24rpx;
 			}
 		}

+ 20 - 28
pages/index/index.vue

@@ -1,5 +1,6 @@
 <template>
 	<view>
+		<!-- 授权页面 -->
 	</view>
 </template>
 
@@ -8,22 +9,30 @@
 		onLoad
 	} from "@dcloudio/uni-app"
 
+	import {
+		getQueryString
+	} from "../../util/getParams.js"
+
 	const APPKEY = '4AA7B3944BDF3739'
 	const ocode = '1015730314'
-	const URL = 'http://192.168.161.78:5173/#/pages/index/index'
+	// 线上地址
+	const URL = 'https://chtech.ncjti.edu.cn/carstop/carbook/appopenid.action'
+	// 本地地址
+	// const URL = 'http://192.168.161.170:8088/carBook/appopenid.action'
 
 	onLoad(() => {
 		loginFilter()
 	})
 
+	// 获取用户card_number
 	const loginFilter = () => {
-		const wxcode = uni.getStorageSync('wxcode')
-		if (!wxcode) {
-			const wxcode = getQueryString('wxcode')
-			if (!wxcode) {
-				getWxcodeURL()
+		const card_number = uni.getStorageSync('bus_card_number')
+		if (!card_number) {
+			const card_number = getQueryString('card_number')
+			if (!card_number) {
+				getCardnumberURL()
 			} else {
-				uni.setStorageSync('wxcode', wxcode)
+				uni.setStorageSync('bus_card_number', card_number)
 				uni.switchTab({
 					url: "/pages/home/home"
 				})
@@ -35,27 +44,10 @@
 		}
 	}
 
-	const getWxcodeURL = () => {
+	// 跳转授权页面
+	const getCardnumberURL = () => {
 		window.
 		location.href =
-			`https://open.wecard.qq.com/connect/oauth/authorize?app_key=${APPKEY}&response_type=code&scope=snsapi_base&ocode=${ocode}&redirect_uri=${encodeURIComponent(URL)}`
+			`https://open.wecard.qq.com/connect/oauth/authorize?app_key=${APPKEY}&response_type=code&scope=snsapi_base&ocode=${ocode}&redirect_uri=${URL}&state=${URL}`
 	}
-
-	//获取当前URL指定参数
-	const getQueryString = (name) => {
-		// 获取URL
-		let url = window.location.href;
-		// 正则匹配URL
-		let pattern = new RegExp("[?&]" + name + "=([^&]+)", "i");
-		let matcher = pattern.exec(url);
-		if (matcher == null || matcher.length < 1) {
-			return false;
-		}
-		// 输出指定的参数值
-		return decodeURIComponent(matcher[1]);
-	}
-</script>
-
-<style lang="scss" scoped>
-
-</style>
+</script>

+ 194 - 66
pages/my/my.vue

@@ -1,51 +1,62 @@
 <template>
 	<view class="container">
 		<!-- 筛选区域 -->
-		<Search @handLeConveyData="getConveyData" />
+		<Search :typeList="typeList" :timeList="timeList" @handLeConveyData="getConveyData" />
 
 		<!-- 列表区域 -->
 		<view class="list" v-for="(item,index) in listData" :key="index">
 			<view class="list-title">
-				<view v-if="item.title">
-					{{item.title }}
+				<view>
+					{{item.route }}
 				</view>
-				<view v-else>
-					墨轩湖到黄家湖
-				</view>
-				<view class="list-img" :class="item.type ===1 ? 'mr-30':''">
-					<img v-if="item.type===1" src="../../static/success.png">
-					<img v-if="item.type===2" src="../../static/pass.png">
-					<img v-if="item.type===3" src="../../static/cancel.png">
-					<img v-if="item.type===4" src="../../static/waiting.png">
+				<view class="list-img" :class="item.state ===1 ? 'mr-30':''">
+					<img v-if="item.state===1" src="../../static/success.png">
+					<img v-if="item.state===2" src="../../static/pass.png">
+					<img v-if="item.state===3" src="../../static/waiting.png">
+					<img v-if="item.state===4" src="../../static/cancel.png">
 				</view>
 			</view>
 			<view class="list-info">
 				<view class="list-info-item">
-					<span>下单时间:</span>{{item.orderTime}}
+					<span>预约号:</span>{{item.row_num}}
+				</view>
+				<view class="list-info-item">
+					<span>下单时间:</span>{{item.yy_time}}
 				</view>
-				<view class="list-info-item" v-if="item.departureTime">
-					<span>发车时间:</span>{{item.departureTime}}
+				<view class="list-info-item" v-if="item.state===1">
+					<span>发车时间:</span>{{item.yy_date}}
 				</view>
-				<view class="list-info-item" v-if="item.busNumber">
-					<span>车辆尾号:</span>{{item.busNumber}}
+				<view class="list-info-item" v-if="item.state===1||item.state===2">
+					<span>车牌号:</span>{{item.car_number}}
 				</view>
-				<view class="list-info-item" v-if="item.capacity">
-					<span>容 量:</span>{{item.capacity}}
+				<view class="list-info-item">
+					<span>终点站:</span>{{item.route_end}}
+				</view>
+				<view class="list-info-item" v-if="item.state===1||item.state===2">
+					<span>容 量:</span>{{item.contain}}人
 				</view>
-				<view class="list-info-item2" v-if="item.message">
-					<span>变更信息:</span>{{item.message}}
+				<view class="list-info-item2" v-if="item.state===1||item.state===2">
+					<span>变更信息:</span>{{item.remark!=''?item.remark:'无'}}
 				</view>
 			</view>
 			<view class="list-button">
-				<view class="list-button-change" v-if="item.type ===1">
+				<!-- <view class="list-button-change" v-if="item.state ===1" @click="handleChange">
 					更换车次
+				</view> -->
+				<view class="list-button-change" v-if="item.state ===1&&item.contain==6" @click="handleOnCar(item.id)">
+					我已上车
 				</view>
-				<view class="list-button-cancel" v-if="item.type ===1">
+				<view class="list-button-cancel" v-if="item.state ===1||item.state ===3" @click="handleCancel(item.id)">
 					取消预约
 				</view>
-				<view class="list-button-cancel" v-if="item.type ===4">
-					取消候补
-				</view>
+			</view>
+		</view>
+
+		<!-- 无数据时展示的区域 -->
+		<view class="list-nodata" v-if="listData.length ==0">
+			<img src="../../static/no-bus.png">
+			<view>
+				暂无数据
 			</view>
 		</view>
 
@@ -57,49 +68,150 @@
 		ref
 	} from "vue"
 
+	import {
+		onLoad,
+		onShow,
+		onPullDownRefresh
+	} from "@dcloudio/uni-app"
+
+	import {
+		myRequest
+	} from "../../util/api.js"
+
+	import {
+		isWeixin
+	} from "../../util/isWeixin.js"
+
 	import Search from '../../components/search'
 
-	// 1代表成功,2代表通行,3代表取消,4代表候补中
-	const listData = ref([{
-			type: 1,
-			title: '墨轩湖 - 综合楼',
-			orderTime: '2023-03-31  15:15:15',
-			departureTime: '2023-03-31  15:15:15',
-			busNumber: '0269',
-			capacity: '53人',
-			message: '车辆0290变更为6001,容量53变更为63车辆0290变更为6001,容量53变更为63车辆0290变更为6001,容量53变更为63'
-		},
-		{
-			type: 2,
-			title: '墨轩湖 - 综合楼',
-			orderTime: '2023-03-31  15:15:15',
-			departureTime: '2023-03-31  15:15:15',
-			busNumber: '0269',
-			capacity: '53人',
-			message: '车辆0290变更为6001,容量53变更为63'
-		},
-		{
-			type: 3,
-			title: '墨轩湖 - 综合楼',
-			orderTime: '2023-03-31  15:15:15',
-			departureTime: '2023-03-31  15:15:15',
-			busNumber: '0269',
-			capacity: '53人',
-			message: '车辆0290变更为6001,容量53变更为63'
-		},
-		{
-			type: 4,
-			// title: '墨轩湖 - 综合楼',
-			orderTime: '2023-03-31  15:15:15',
-			// departureTime: '2023-03-31  15:15:15',
-			// busNumber: '0269',
-			// capacity: '53人',
-			// message: '车辆0290变更为6001,容量53变更为63'
+	onLoad(() => {
+		if (isWeixin()) {
+			card_number.value = uni.getStorageSync('bus_card_number')
+		} else {
+			uni.redirectTo({
+				url: "/pages/404/404?message=请在微信客户端打开链接"
+			})
 		}
-	])
+	})
+	onShow(() => {
+		getMyData()
+	})
+
+	onPullDownRefresh(() => {
+		getMyData()
+		setTimeout(function() {
+			uni.stopPullDownRefresh();
+		}, 500);
+	})
+
+	// 用户card_number
+	const card_number = ref('')
+	// 筛选条件状态列表
+	const typeList = ref(['全部', '预约成功', '已乘车', '候补中', '已取消'])
+	// 筛选条件时间列表
+	const timeList = ref(['全部', '当天', '本周', '本月'])
+	// 预约状态 0:全部 1:预约成功 2:已乘车 3:候补中 4:已取消
+	const result_state = ref(0)
+	// 时间状态 1:全部 2:当天 3:本周 4:本月
+	const date_state = ref(1)
+
+	// 预约记录数据
+	// 1代表成功,2代表已乘车,3代表已分配,4代表候补中,5代表已取消
+	const listData = ref([])
+
+	// 获取用户预约数据
+	const getMyData = async () => {
+		listData.value = []
+		const res = await myRequest({
+			url: '/appqueryUserOrders.action',
+			data: {
+				result_state: result_state.value,
+				date_state: date_state.value,
+				card_number: card_number.value,
+			}
+		})
+		// console.log(res);
+		listData.value = res.data
+	}
 
+	// 更换车次按钮回调
+	const handleChange = () => {
+		uni.switchTab({
+			url: "/pages/home/home"
+		})
+	}
+
+	// 我已上车按钮回调
+	const handleOnCar = (id) => {
+		uni.showModal({
+			title: '提示',
+			content: '确定已经上车吗?',
+			success: (res) => {
+				if (res.confirm) {
+					handleOnCarRequest(id)
+				} else if (res.cancel) {}
+			}
+		});
+	}
+
+	// 已上车请求
+	const handleOnCarRequest = async (id) => {
+		const res = await myRequest({
+			url: '/appBoarding.action',
+			data: {
+				card_number: card_number.value,
+				record_id: id
+			}
+		})
+		// console.log(res);
+		if (res) {
+			uni.showToast({
+				title: res.message
+			})
+			setTimeout(() => {
+				getMyData()
+			}, 1500)
+		}
+	}
+
+	// 取消预约按钮回调
+	const handleCancel = (id) => {
+		uni.showModal({
+			title: '提示',
+			content: '确定取消预约吗?',
+			success: (res) => {
+				if (res.confirm) {
+					handleCancelRequest(id)
+				} else if (res.cancel) {}
+			}
+		});
+	}
+	// 取消预约请求
+	const handleCancelRequest = async (id) => {
+		const res = await myRequest({
+			url: '/appcancelOrder.action',
+			data: {
+				card_number: card_number.value,
+				record_id: id
+			}
+		})
+		// console.log(res);
+		if (res) {
+			uni.showToast({
+				title: res.message
+			})
+			setTimeout(() => {
+				getMyData()
+			}, 1500)
+		}
+	}
+
+	// 筛选下拉框确定选择回调
 	const getConveyData = (Obj) => {
-		console.log(Obj);
+		// console.log(Obj);
+		result_state.value = Obj.typeIndex
+		date_state.value = Obj.timeIndex - 0 + 1
+		getMyData()
 	}
 </script>
 
@@ -154,7 +266,7 @@
 
 					span {
 						display: inline-block;
-						width: 140rpx;
+						width: 160rpx;
 						text-align-last: justify;
 						color: #999999;
 					}
@@ -173,25 +285,41 @@
 				text-align: center;
 
 				.list-button-change {
+					display: flex;
+					justify-content: center;
+					align-items: center;
 					margin: 17rpx 0 40rpx 0;
 					width: 170rpx;
 					height: 70rpx;
-					line-height: 70rpx;
 					color: #fff;
 					border-radius: 15rpx;
 					background: linear-gradient(#8684FF, #3C50E8);
 				}
 
 				.list-button-cancel {
+					display: flex;
+					justify-content: center;
+					align-items: center;
 					margin: 17rpx 30rpx 40rpx;
 					width: 170rpx;
 					height: 70rpx;
-					line-height: 70rpx;
 					color: #999999;
 					border-radius: 15rpx;
 					background-color: #E6E6E6;
 				}
 			}
 		}
+
+		.list-nodata {
+			margin-top: -20rpx;
+			padding-top: 100rpx;
+			background-color: #fff;
+			text-align: center;
+			color: #999999;
+
+			img {
+				width: 600rpx;
+			}
+		}
 	}
 </style>

+ 99 - 43
pages/record/record.vue

@@ -1,13 +1,13 @@
 <template>
 	<view class="container">
 		<!-- 筛选区域 -->
-		<Search @handLeConveyData="getConveyData" />
+		<Search :typeList="typeList" :timeList="timeList" @handLeConveyData="getConveyData" />
 
 		<!-- 列表区域 -->
 		<view class="list" v-for="(item,index) in listData" :key="index" @click="handleLookDetail(item)">
 			<view class="list-title">
 				<view class="title-number">
-					车牌:{{item.number?item.number:'无'}}
+					车牌:{{item.car_number!=0?item.car_number:'无'}}
 				</view>
 				<view class="title-icon">
 					<img src="../../static/right.png">
@@ -15,26 +15,36 @@
 			</view>
 			<view class="list-item">
 				状态:
-				<span class="list-item-type" v-if="item.type ===1">预约进行中</span>
-				<span v-if="item.type ===2">预约已截止</span>
-				<span class="list-item-type" v-if="item.type ===3">候补排队中</span>
-				<span v-if="item.type ===4">候补已截止</span>
+				<span :class="item.state_str=='预约进行中'||item.state_str=='候补中'?'list-item-type':''">{{item.state_str}}
+				</span>
 			</view>
 			<view class="list-item">
-				日期:<span>{{item.date}}</span>
+				发车日期:<span>{{item.yy_date}}</span>
 			</view>
-			<view class="list-item" v-if="item.departureTime">
-				发车时间:<span>{{item.departureTime}}</span>
+			<view class="list-item" v-if="item.state_str=='预约进行中'||item.state_str=='已截止'">
+				发车时间:<span>{{item.ci_time}}</span>
 			</view>
-			<view class="list-item" v-if="item.path">
-				线路:<span>{{item.path}}</span>
+			<view class="list-item">
+				线路:<span>{{item.route}}</span>
+			</view>
+			<view class="list-item">
+				终点:<span>{{item.route_end}}</span>
 			</view>
 			<view class="list-item">
 				人数:
-				<view class="list-item-progress" v-if="item.type===1||item.type ===2">
-					<progress activeColor="#3C50E8" stroke-width="9" :percent="15" />
+				<view class="list-item-progress" v-if="item.state_str=='预约进行中'||item.state_str=='已截止'">
+					<progress activeColor="#3C50E8" stroke-width="9" :percent="item.percent?item.percent:0" />
 				</view>
-				<span>{{item.proportion}}</span>
+				<span v-if="item.state_str=='预约进行中'||item.state_str=='已截止'">{{item.user_num+'/'+item.contain}}</span>
+				<span v-else>{{item.contain}}</span>
+			</view>
+		</view>
+
+		<!-- 无数据时展示的区域 -->
+		<view class="list-nodata" v-if="listData.length ==0">
+			<img src="../../static/no-bus.png">
+			<view>
+				暂无数据
 			</view>
 		</view>
 
@@ -45,46 +55,80 @@
 	import {
 		ref
 	} from "vue"
+
+	import {
+		onLoad,
+		onPullDownRefresh
+	} from "@dcloudio/uni-app"
+
+	import {
+		myRequest
+	} from "../../util/api.js"
+
+	import {
+		isWeixin
+	} from "../../util/isWeixin.js"
+
 	import Search from '../../components/search'
 
-	// 1代表预约进行中,2代表预约已截止,3代表候补排队中,4代表候补已截止
-	const listData = ref([{
-			number: '赣M06001',
-			type: 1,
-			date: "2023.03.01",
-			departureTime: "15:30",
-			path: "墨轩湖 - 综合楼",
-			proportion: '25/52'
-		},
-		{
-			number: '赣M06001',
-			type: 2,
-			date: "2023.03.01",
-			departureTime: "15:30",
-			path: "墨轩湖 - 综合楼",
-			proportion: '25/52'
-		},
-		{
-			type: 3,
-			date: "2023.03.01",
-			proportion: '25'
-		},
-		{
-			type: 4,
-			date: "2023.03.01",
-			proportion: '25'
+	onLoad(() => {
+		if (isWeixin()) {
+			getData()
+		} else {
+			uni.redirectTo({
+				url: "/pages/404/404?message=请在微信客户端打开链接"
+			})
+		}
+	})
+
+	onPullDownRefresh(() => {
+		getData()
+		setTimeout(function() {
+			uni.stopPullDownRefresh()
+		}, 500)
+	})
+	// 预约状态数组
+	const typeList = ref(['全部', '预约进行中', '已截止', '已分配', '候补中'])
+	// 时间状态数组
+	const timeList = ref(['全部', '今天', '明天'])
+	// 时间状态  全部:1  今天:2  明天:3
+	const date_state = ref(1)
+	// 预约状态  全部:0  预约进行中:1  已截止:2  已分配:3   候补中:4
+	const result_state = ref(0)
+
+	// 预约记录数据
+	const listData = ref([])
+
+	// 获取预约记录数据
+	const getData = async () => {
+		const res = await myRequest({
+			url: '/appcarCaptainManage.action',
+			data: {
+				date_state: date_state.value,
+				result_state: result_state.value,
+			}
+		})
+		// console.log(res.data);
+		if (res.data.length) {
+			res.data.forEach((item) => {
+				item.percent = Math.ceil(parseInt(item.user_num) / parseInt(item.contain))
+			})
 		}
-	])
+		listData.value = res.data
+	}
 
+	// 点击每一条记录回调
 	const handleLookDetail = (item) => {
 		const info = JSON.stringify(item)
 		uni.navigateTo({
 			url: `/pages/detail/detail?info=${info}`
 		})
 	}
-
+	// 条件筛选框选择回调
 	const getConveyData = (Obj) => {
-		console.log(Obj);
+		date_state.value = Obj.timeIndex - 0 + 1
+		result_state.value = Obj.typeIndex
+		getData()
 	}
 </script>
 
@@ -149,5 +193,17 @@
 				}
 			}
 		}
+
+		.list-nodata {
+			margin-top: -20rpx;
+			padding-top: 100rpx;
+			background-color: #fff;
+			text-align: center;
+			color: #999999;
+
+			img {
+				width: 600rpx;
+			}
+		}
 	}
 </style>

BIN
static/assigned.png


File diff suppressed because it is too large
+ 1 - 0
static/header-icon.svg


BIN
static/pass.png


+ 67 - 0
uni_modules/rudon-multiSelector/changelog.md

@@ -0,0 +1,67 @@
+## 1.0.0(2022-11-21)
+```text
+<template>
+	<view style="padding: 20px 10%;">
+
+
+		<!-- 多选下拉菜单 - 使用默认的显示方式 -->
+		<view style="border: 1px solid gray;">
+			<rudon-multiSelector welcome="请选择" :is_using_slot="false" :is_using_icon="true" :localdata="options" @change="whenChanged"></rudon-multiSelector>
+		</view>
+
+
+		<!-- 多选下拉菜单 - 使用自定义的显示方式 -->
+		<view style="border: 1px solid gray;margin-top: 200px;">			
+			<rudon-multiSelector :is_using_slot="true" :localdata="options" @change="whenChanged">
+				<view>
+					{{JSON.stringify(options)}}
+				</view>
+			</rudon-multiSelector>
+		</view>
+		
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				// 初始选项
+				options: [{
+						value: 0,
+						text: "数学",
+						is_selected: false,
+					},
+					{
+						value: 1,
+						text: "美术",
+						is_selected: false,
+					},
+					{
+						value: 2,
+						text: "体育",
+						is_selected: true
+					}
+				],
+
+			}
+		},
+
+		methods: {
+
+			whenChanged(e) {
+				console.log(JSON.stringify(e))
+				this.options = e
+			}
+
+			// METHODS结束
+		}
+	}
+</script>
+
+
+<style>
+
+</style>
+```

+ 537 - 0
uni_modules/rudon-multiSelector/components/rudon-multiSelector/rudon-multiSelector.vue

@@ -0,0 +1,537 @@
+<template>
+	<view class="rudon-component__select componentW100">
+		
+		<!-- 组件介绍 -->
+		<!-- 名称:rudon-multiSelector 多选下拉菜单 -->
+		<!-- 作者:Rudon <https://rudon.blog.csdn.net> -->
+		<!-- 用途:多选下拉菜单 -->
+		<!-- 用法:
+				0)参考https://uniapp.dcloud.net.cn/component/uniui/uni-data-select.html
+				1)项目安装本组件, 
+				2)vue中直接引用即可,例如下面的例子
+		-->
+		<!-- 例如:
+		<rudon-multiSelector :clear="false" :localdata="菜单对象" @change="mss($event, item)"></rudon-multiSelector>
+		-->
+		
+		
+		<span v-if="label" class="uni-label-text hide-on-phone">{{label + ':'}}</span>
+		<view class="rudon-select componentW100">
+			<view class="rudon-select__input-box componentW100" @click="toggleSelector">
+				
+				<!-- 显示插槽内容 -->
+				<view class="" v-show="is_using_slot">
+					<slot></slot>
+				</view>
+				<!-- 不显示插槽内容 -->
+				<view class="componentW100" v-show="!is_using_slot" style="display: flex; justify-content: space-between; align-items: center; flex-direction: row;">
+					<!-- 欢迎语句 -->
+					<view v-show="!onShowNames.length">
+						{{welcome}}
+					</view>
+					<!-- 已选内容 -->
+					<view v-show="onShowNames.length">
+						{{onShowNames.join(', ')}}
+					</view>
+					<!-- 下拉图标 -->
+					<view v-show="is_using_icon">
+						<uni-icons type="bottom" color="#c0c4cc" size="16" v-show="!showSelector"></uni-icons>
+						<uni-icons type="top" color="#c0c4cc" size="16" v-show="showSelector"></uni-icons>
+					</view>
+				</view>
+				
+				
+				<!-- 遍历 -->
+				<!-- <text v-for="(item, index) in onShowNames" :key="'selected_items_'+index">
+					{{item}}
+				</text> -->
+				
+				
+			</view>
+			<view class="rudon-select--mask" v-if="showSelector" @click="toggleSelector" />
+			<view class="rudon-select__selector componentW100" v-if="showSelector">
+				<view class="uni-popper__arrow"></view>
+				<scroll-view scroll-y="true" class="rudon-select__selector-scroll">
+					<view class="rudon-select__selector-empty" v-if="mixinDatacomResData.length === 0">
+						<text>{{emptyTips}}</text>
+					</view>
+					
+					<view v-else class="rudon-select__selector-item" v-for="(item,index) in mixinDatacomResData" :key="index" @click="selectOneItem(item)" style="padding: 10px 0 10px 0; display: flex; flex-direction: row; align-items: center; justify-content: flex-start;">
+						<view class="" style="padding: 0 8px 0 4px;">
+							
+							<!-- 未选中 -->
+							<uni-icons type="checkbox-filled" size="25" color="#ebebeb" v-show="!item.is_selected"></uni-icons>
+							
+							<!-- 已选中 -->
+							<uni-icons type="checkbox-filled" size="25" color="#f08418" v-show="item.is_selected"></uni-icons>
+							
+						</view>
+						<view>
+							<text :class="{'rudon-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
+						</view>
+						
+						
+					</view>
+					
+				</scroll-view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * DataChecklist 数据选择器
+	 * @description 通过数据渲染的下拉框组件
+	 * @tutorial https://uniapp.dcloud.io/component/uniui/uni-data-select
+	 * @property {String} value 默认值
+	 * @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
+	 * @property {Boolean} clear 是否可以清空已选项
+	 * @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
+	 * @property {String} label 左侧标题
+	 * @property {String} placeholder 输入框的提示文字
+	 * @event {Function} change  选中发生变化触发
+	 */
+
+	export default {
+		name: "rudon-multiSelector",
+		mixins: [uniCloud.mixinDatacom || {}],
+		data() {
+			return {
+				showSelector: false,
+				current: '',
+				mixinDatacomResData: [],
+				apps: [],
+				channels: [],
+				
+				
+			};
+		},
+		props: {
+			// 初始化显示提示语 - 当没有选项选中时
+			welcome: {
+				type: String,
+				default: ''
+			},
+			
+			// 是否使用slot
+			is_using_slot: {
+				type: Boolean,
+				default: false
+			},
+			
+			// 是否使用非slot模式下的右边的向下箭头图标
+			is_using_icon: {
+				type: Boolean,
+				default: true
+			},
+			
+			
+			/**
+			 * 本地数据, 格式:
+			 *  [
+					{
+						// 值
+						value: 0,
+						// 显示文字
+						text: "服装业",
+						// 是否已选中
+						is_selected: false,
+					},
+					{
+						// 值
+						value: 1,
+						// 显示文字
+						text: "矿业",
+						// 是否已选中
+						is_selected: false,
+					}
+			    ]
+			 */
+			localdata: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			value: {
+				type: [String, Number],
+				default: ''
+			},
+			modelValue: {
+				type: [String, Number],
+				default: ''
+			},
+			label: {
+				type: String,
+				default: ''
+			},
+			placeholder: {
+				type: String,
+				default: '...'
+			},
+			emptyTips: {
+				type: String,
+				default: '无选项'
+			},
+			clear: {
+				type: Boolean,
+				default: true
+			},
+			defItem: {
+				type: Number,
+				default: 0
+			}
+		},
+		created() {
+			this.last = `${this.collection}_last_selected_option_value`
+			if (this.collection && !this.localdata.length) {
+				this.mixinDatacomEasyGet()
+			}
+		},
+		computed: {
+			// 已选中的标题
+			onShowNames () {
+				let res = []
+				for (let i in this.localdata) {
+					let cur = this.localdata[i]
+					if (cur.hasOwnProperty('is_selected') && cur.is_selected) {
+						// 已选中
+						if (cur.hasOwnProperty('text')) {
+							res.push(cur.text)
+						} else if (cur.hasOwnProperty('title')) {
+							res.push(cur.title)
+						} else {
+							res.push('标题缺失')
+						}
+					}
+				}
+				return res
+			}
+		},
+		watch: {
+			localdata: {
+				immediate: true,
+				handler(val, old) {
+					if (Array.isArray(val)) {
+						this.mixinDatacomResData = val
+					}
+				}
+			},
+			// #ifndef VUE3
+			value() {
+				this.initDefVal()
+			},
+			// #endif
+			// #ifdef VUE3
+			modelValue() {
+				this.initDefVal()
+			},
+			// #endif
+			mixinDatacomResData: {
+				immediate: true,
+				handler(val) {
+					if (val.length) {
+						this.initDefVal()
+					}
+				}
+			}
+		},
+		methods: {
+			initDefVal() {
+				let defValue = ''
+				if ((this.value || this.value === 0) && !this.isDisabled(this.value)) {
+					defValue = this.value
+				} else if ((this.modelValue || this.modelValue === 0) && !this.isDisabled(this.modelValue)) {
+					defValue = this.modelValue
+				} else {
+					let strogeValue
+					if (this.collection) {
+						strogeValue = uni.getStorageSync(this.last)
+					}
+					if (strogeValue || strogeValue === 0) {
+						defValue = strogeValue
+					} else {
+						let defItem = ''
+						if (this.defItem > 0 && this.defItem < this.mixinDatacomResData.length) {
+							defItem = this.mixinDatacomResData[this.defItem - 1].value
+						}
+						defValue = defItem
+					}
+					this.emit(defValue)
+				}
+				const def = this.mixinDatacomResData.find(item => item.value === defValue)
+				this.current = def ? this.formatItemName(def) : ''
+			},
+
+			/**
+			 * @param {[String, Number]} value
+			 * 判断用户给的 value 是否同时为禁用状态
+			 */
+			isDisabled(value) {
+				let isDisabled = false;
+
+				this.mixinDatacomResData.forEach(item => {
+					if (item.value === value) {
+						isDisabled = item.disable
+					}
+				})
+
+				return isDisabled;
+			},
+
+			clearVal() {
+				this.emit('')
+				if (this.collection) {
+					uni.removeStorageSync(this.last)
+				}
+			},
+			change(item) {
+				if (!item.disable) {
+					this.showSelector = false
+					this.current = this.formatItemName(item)
+					this.emit(item.value)
+				}
+			},
+			emit(val) {
+				
+				if (val != '' && val != null) {
+					this.$emit('change', val)
+				}
+				
+				this.$emit('input', val)
+				this.$emit('update:modelValue', val)
+				if (this.collection) {
+					uni.setStorageSync(this.last, val)
+				}
+			},
+
+			toggleSelector() {
+				this.showSelector = !this.showSelector
+			},
+			formatItemName(item) {
+				let {
+					text,
+					value,
+					channel_code
+				} = item
+				channel_code = channel_code ? `(${channel_code})` : ''
+				return this.collection.indexOf('app-list') > 0 ?
+					`${text}(${value})` :
+					(
+						text ?
+						text :
+						`未命名${channel_code}`
+					)
+			},
+			
+			// 点击某一个成员,选中或者反选
+			selectOneItem (item) {
+				// console.log(JSON.stringify(item))
+				
+				
+				// 允许选择
+				let tobe = (item.is_selected)? false: true
+				
+				for (let i in this.localdata) {
+					if (this.localdata[i].value == item.value) {
+						this.localdata[i].is_selected = tobe
+					}
+				}
+				
+				this.emit(this.localdata)
+			}
+			
+			
+			// Methods结束
+		}
+	}
+</script>
+
+<style lang="scss">
+	$uni-base-color: #6a6a6a !default;
+	$uni-main-color: #3a3a3a !default;
+	$uni-secondary-color: #909399 !default;
+	$uni-border-3: #DCDCDC;
+
+
+	/* #ifndef APP-NVUE */
+	@media screen and (max-width: 100%) {
+		.hide-on-phone {
+			display: none;
+		}
+	}
+
+	/* #endif */
+	.rudon-component__select {
+		display: flex;
+		align-items: center;
+		cursor: pointer;
+	}
+
+	.uni-label-text {
+		font-size: 14px;
+		font-weight: bold;
+		color: $uni-base-color;
+		margin: auto 0;
+		margin-right: 5px;
+	}
+
+	.rudon-select {
+		font-size: 14px;
+		// border: 1px solid $uni-border-3;
+		box-sizing: border-box;
+		border-radius: 1px;
+		padding: 0 5px;
+		position: relative;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		user-select: none;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		// border-bottom: solid 1px $uni-border-3;
+	}
+
+	.rudon-select__label {
+		font-size: 16px;
+		line-height: 22px;
+		padding-right: 10px;
+		color: $uni-secondary-color;
+	}
+
+	.rudon-select__input-box {
+		min-height: 20px;
+		position: relative;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex: 1;
+		flex-direction: row;
+		align-items: center;
+	}
+
+	.rudon-select__input {
+		flex: 1;
+		font-size: 14px;
+		height: 22px;
+		line-height: 22px;
+	}
+
+	.rudon-select__input-plac {
+		font-size: 14px;
+		color: $uni-secondary-color;
+	}
+
+	.rudon-select__selector {
+		/* #ifndef APP-NVUE */
+		box-sizing: border-box;
+		/* #endif */
+		position: absolute;
+		top: calc(100% + 12px);
+		left: 0;
+		width: auto;
+		background-color: #FFFFFF;
+		border: 1px solid #EBEEF5;
+		border-radius: 6px;
+		box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+		z-index: 2;
+		padding: 4px 0;
+	}
+
+	.rudon-select__selector-scroll {
+		padding: 5px;
+		/* #ifndef APP-NVUE */
+		max-height: 200px;
+		box-sizing: border-box;
+		/* #endif */
+	}
+
+	.rudon-select__selector-empty,
+	.rudon-select__selector-item {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		cursor: pointer;
+		/* #endif */
+		line-height: 20px;
+		font-size: 14px;
+		text-align: center;
+		/* border-bottom: solid 1px $uni-border-3; */
+		padding: 10px 20px;
+		
+		width: auto;
+		white-space: nowrap;
+		flex-wrap: nowrap;
+	}
+
+	.rudon-select__selector-item:hover {
+		background-color: #f9f9f9;
+	}
+
+	.rudon-select__selector-empty:last-child,
+	.rudon-select__selector-item:last-child {
+		/* #ifndef APP-NVUE */
+		border-bottom: none;
+		/* #endif */
+	}
+
+	.rudon-select__selector__disabled {
+		opacity: 0.4;
+		cursor: default;
+	}
+
+	/* picker 弹出层通用的指示小三角 */
+	.uni-popper__arrow,
+	.uni-popper__arrow::after {
+		position: absolute;
+		display: block;
+		width: 0;
+		height: 0;
+		border-color: transparent;
+		border-style: solid;
+		border-width: 6px;
+	}
+
+	.uni-popper__arrow {
+		filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.03));
+		top: -6px;
+		left: 10%;
+		margin-right: 3px;
+		border-top-width: 0;
+		border-bottom-color: #EBEEF5;
+	}
+
+	.uni-popper__arrow::after {
+		content: " ";
+		top: 1px;
+		margin-left: -6px;
+		border-top-width: 0;
+		border-bottom-color: #fff;
+	}
+
+	.rudon-select__input-text {
+		color: $uni-main-color;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		-o-text-overflow: ellipsis;
+		overflow: hidden;
+		width: auto;
+	}
+
+	.rudon-select__input-placeholder {
+		color: $uni-base-color;
+	}
+
+	.rudon-select--mask {
+		position: fixed;
+		top: 0;
+		bottom: 0;
+		right: 0;
+		left: 0;
+	}
+	
+	// 全宽
+	.componentW100 {
+		width: 100%;
+	}
+</style>

+ 84 - 0
uni_modules/rudon-multiSelector/package.json

@@ -0,0 +1,84 @@
+{
+  "id": "rudon-multiSelector",
+  "displayName": "Rudon多选下拉菜单",
+  "version": "1.0.0",
+  "description": "rudon-multiSelector 多选下拉菜单",
+  "keywords": [
+    "multiSelector",
+    "多选",
+    "下拉",
+    "picker"
+],
+  "repository": "",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+  "dcloudext": {
+    "type": "component-vue",
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "插件不采集任何数据",
+      "permissions": "无"
+    },
+    "npmurl": ""
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "Vue": {
+          "vue2": "y",
+          "vue3": "y"
+        },
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y",
+          "钉钉": "y",
+          "快手": "y",
+          "飞书": "y",
+          "京东": "y"
+        },
+        "快应用": {
+          "华为": "y",
+          "联盟": "y"
+        }
+      }
+    }
+  }
+}

+ 1 - 0
uni_modules/rudon-multiSelector/readme.md

@@ -0,0 +1 @@
+# rudon-multiSelector

+ 1 - 0
unpackage/dist/build/h5/assets/404-7bd80ffa.css

@@ -0,0 +1 @@
+.container[data-v-15b3bcf2]{display:flex;flex-direction:column;align-items:center}.container .img[data-v-15b3bcf2]{margin-top:6.25rem;width:15rem;height:15.875rem}.container .img img[data-v-15b3bcf2]{width:100%;height:100%}.container .info[data-v-15b3bcf2]{padding:0 .9375rem}

+ 1 - 0
unpackage/dist/build/h5/assets/_plugin-vue_export-helper.1b428a4d.js

@@ -0,0 +1 @@
+const o=(o,t)=>{const c=o.__vccOpts||o;for(const[s,n]of t)c[s]=n;return c};export{o as _};

+ 1 - 0
unpackage/dist/build/h5/assets/bottom.64dd5779.js

@@ -0,0 +1 @@
+const A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAALCAYAAACZIGYHAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAACUSURBVCiRpZCxEYMwDABf8jx0GSAeg5IuY8RbeAAOjxHTU8EC2YQ0cS7xmTMBVZase0kvbXt7iHDlRKgI4xkA4ATg6DbrSgzBWwUwBndkhRC8BVCAvvdRFfsn4zPYpMc8T8+muQjsOssNg7+nRPLfmp/k4bumeVPNTw4oQip+igNMqbjh58dDFQKwLFNMoLeHbqv3BYXxNKwN3dULAAAAAElFTkSuQmCC";export{A as _};

BIN
unpackage/dist/build/h5/assets/clock-2a23ba7e.png


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/detail-23ec828e.css


+ 1 - 0
unpackage/dist/build/h5/assets/getParams.10f08682.js

@@ -0,0 +1 @@
+const e=e=>{let n=window.location.href,o=new RegExp("[?&]"+e+"=([^&]+)","i").exec(n);return!(null==o||o.length<1)&&decodeURIComponent(o[1])};export{e as g};

File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/home-8cc363a6.css


File diff suppressed because it is too large
+ 6 - 0
unpackage/dist/build/h5/assets/index-220b8b44.js


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/index-88c6c4d6.css


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/isWeixin.44451021.js


BIN
unpackage/dist/build/h5/assets/man-c9231f78.png


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/my-982e0760.css


BIN
unpackage/dist/build/h5/assets/no-bus-49df1801.png


+ 1 - 0
unpackage/dist/build/h5/assets/no-bus.fca891d8.js

@@ -0,0 +1 @@
+const s="/carstop/dist5/assets/no-bus-49df1801.png";export{s as _};

File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/pages-404-404.d799f2fb.js


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/pages-detail-detail.b8aa56fd.js


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/pages-home-home.c662ba40.js


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/pages-index-index.600a5fd0.js


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/pages-my-my.0c7f5999.js


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/pages-record-record.28d838a3.js


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/record-e99b76ed.css


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/search-5d196260.css


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/search.1c6c0837.js


+ 1 - 0
unpackage/dist/build/h5/assets/uni-app.es.18e68793.js

@@ -0,0 +1 @@
+import{L as s,M as a,O as o,N as r,P as n,Q as t,R as e}from"./index-220b8b44.js";function i(s,a){return t(s)?a:s}const c=o=>(r,n=a())=>{!e&&s(o,r,n)},f=c(o),m=c(r),p=c(n);export{f as a,p as b,m as o,i as r};

File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/assets/uni.545a1a57.css


+ 24 - 0
unpackage/dist/build/h5/index.html

@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <link rel="stylesheet" href="/carstop/dist5/assets/uni.545a1a57.css">
+
+    <meta charset="UTF-8" />
+    <script>
+      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
+        CSS.supports('top: constant(a)'))
+      document.write(
+        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
+        (coverSupport ? ', viewport-fit=cover' : '') + '" />')
+    </script>
+    <title>校车预约</title>
+    <!--preload-links-->
+    <!--app-context-->
+    <script type="module" crossorigin src="/carstop/dist5/assets/index-220b8b44.js"></script>
+    <link rel="stylesheet" href="/carstop/dist5/assets/index-88c6c4d6.css">
+  </head>
+  <body>
+    <div id="app"><!--app-html--></div>
+    
+  </body>
+</html>

BIN
unpackage/dist/build/h5/static/assigned.png


BIN
unpackage/dist/build/h5/static/bottom.png


BIN
unpackage/dist/build/h5/static/box.png


BIN
unpackage/dist/build/h5/static/boy.png


BIN
unpackage/dist/build/h5/static/cancel.png


BIN
unpackage/dist/build/h5/static/clock.png


+ 20 - 0
unpackage/dist/build/h5/static/customicons.css

@@ -0,0 +1,20 @@
+@font-face {
+  font-family: "customicons"; /* Project id 2878519 */
+  src:url('/static/customicons.ttf') format('truetype');
+}
+
+.customicons {
+  font-family: "customicons" !important;
+}
+
+.youxi:before {
+  content: "\e60e";
+}
+
+.wenjian:before {
+  content: "\e60f";
+}
+
+.zhuanfa:before {
+  content: "\e610";
+}

BIN
unpackage/dist/build/h5/static/customicons.ttf


BIN
unpackage/dist/build/h5/static/gril.png


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/static/header-icon.svg


BIN
unpackage/dist/build/h5/static/man.png


BIN
unpackage/dist/build/h5/static/my-active.png


BIN
unpackage/dist/build/h5/static/my.png


BIN
unpackage/dist/build/h5/static/no-bus.png


BIN
unpackage/dist/build/h5/static/pass.png


BIN
unpackage/dist/build/h5/static/right.png


BIN
unpackage/dist/build/h5/static/school-active.png


BIN
unpackage/dist/build/h5/static/school.png


BIN
unpackage/dist/build/h5/static/subscribe.png


BIN
unpackage/dist/build/h5/static/success.png


BIN
unpackage/dist/build/h5/static/waiting.png


BIN
unpackage/dist/build/h5/static/woman.png


+ 28 - 0
unpackage/dist/dev/mp-weixin/app.js

@@ -0,0 +1,28 @@
+"use strict";
+Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
+const common_vendor = require("./common/vendor.js");
+if (!Math) {
+  "./pages/index/index.js";
+  "./pages/home/home.js";
+  "./pages/my/my.js";
+  "./pages/record/record.js";
+  "./pages/detail/detail.js";
+  "./pages/404/404.js";
+}
+const _sfc_main = {
+  onLaunch: function() {
+  },
+  onShow: function() {
+  },
+  onHide: function() {
+  }
+};
+const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "E:/workSpace/schoolBus-reservation/App.vue"]]);
+function createApp() {
+  const app = common_vendor.createSSRApp(App);
+  return {
+    app
+  };
+}
+createApp().app.mount("#app");
+exports.createApp = createApp;

+ 38 - 0
unpackage/dist/dev/mp-weixin/app.json

@@ -0,0 +1,38 @@
+{
+  "pages": [
+    "pages/index/index",
+    "pages/home/home",
+    "pages/my/my",
+    "pages/record/record",
+    "pages/detail/detail",
+    "pages/404/404"
+  ],
+  "window": {
+    "navigationBarTextStyle": "black",
+    "navigationBarTitleText": "校车预约",
+    "navigationBarBackgroundColor": "#F8F8F8",
+    "backgroundColor": "#F8F8F8"
+  },
+  "tabBar": {
+    "color": "#A6A6A6",
+    "selectedColor": "#3C50E8",
+    "backgroundColor": "#fff",
+    "borderStyle": "black",
+    "position": "bottom",
+    "list": [
+      {
+        "pagePath": "pages/home/home",
+        "text": "首页",
+        "iconPath": "static/school.png",
+        "selectedIconPath": "static/school-active.png"
+      },
+      {
+        "pagePath": "pages/my/my",
+        "text": "我的",
+        "iconPath": "static/my.png",
+        "selectedIconPath": "static/my-active.png"
+      }
+    ]
+  },
+  "usingComponents": {}
+}

File diff suppressed because it is too large
+ 2362 - 0
unpackage/dist/dev/mp-weixin/app.wxss


File diff suppressed because it is too large
+ 7085 - 0
unpackage/dist/dev/mp-weixin/common/vendor.js


+ 37 - 0
unpackage/dist/dev/mp-weixin/components/search.js

@@ -0,0 +1,37 @@
+"use strict";
+const common_vendor = require("../common/vendor.js");
+const _sfc_main = {
+  __name: "search",
+  emits: ["handLeConveyData"],
+  setup(__props, { emit: conveyData }) {
+    const typeList = common_vendor.ref(["全部", "预约成功", "已通行", "已取消", "候补中"]);
+    const typeIndex = common_vendor.ref(0);
+    const timeList = common_vendor.ref(["全部", "当天", "本周", "本月"]);
+    const timeIndex = common_vendor.ref(0);
+    const bindPickerChange = (e, type) => {
+      if (type === 1) {
+        typeIndex.value = e.detail.value;
+      } else {
+        timeIndex.value = e.detail.value;
+      }
+      conveyData("handLeConveyData", {
+        typeIndex: typeIndex.value,
+        timeIndex: timeIndex.value
+      });
+    };
+    return (_ctx, _cache) => {
+      return {
+        a: common_vendor.t(typeList.value[typeIndex.value]),
+        b: common_vendor.o(($event) => bindPickerChange($event, 1)),
+        c: typeIndex.value,
+        d: typeList.value,
+        e: common_vendor.t(timeList.value[timeIndex.value]),
+        f: common_vendor.o(($event) => bindPickerChange($event, 2)),
+        g: timeIndex.value,
+        h: timeList.value
+      };
+    };
+  }
+};
+const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-5fd12acd"], ["__file", "E:/workSpace/schoolBus-reservation/components/search.vue"]]);
+wx.createComponent(Component);

+ 4 - 0
unpackage/dist/dev/mp-weixin/components/search.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/dev/mp-weixin/components/search.wxml


+ 39 - 0
unpackage/dist/dev/mp-weixin/components/search.wxss

@@ -0,0 +1,39 @@
+/* 水平间距 */
+/* 水平间距 */
+.search.data-v-5fd12acd {
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+  margin-bottom: 20rpx;
+  height: 100rpx;
+  font-size: 28rpx;
+  background-color: #fff;
+}
+.search .search-type.data-v-5fd12acd {
+  flex: 1;
+  display: flex;
+  justify-content: space-evenly;
+}
+.search .search-type .search-type-img.data-v-5fd12acd {
+  margin-top: -5rpx;
+  width: 17rpx;
+  height: 12rpx;
+}
+.search .search-type .search-type-img img.data-v-5fd12acd {
+  width: 100%;
+  height: 100%;
+}
+.search .search-time.data-v-5fd12acd {
+  flex: 1;
+  display: flex;
+  justify-content: space-evenly;
+}
+.search .search-time .search-time-img.data-v-5fd12acd {
+  margin-top: -5rpx;
+  width: 17rpx;
+  height: 12rpx;
+}
+.search .search-time .search-time-img img.data-v-5fd12acd {
+  width: 100%;
+  height: 100%;
+}

+ 27 - 0
unpackage/dist/dev/mp-weixin/pages/404/404.js

@@ -0,0 +1,27 @@
+"use strict";
+const common_vendor = require("../../common/vendor.js");
+const util_getParams = require("../../util/getParams.js");
+const _sfc_main = {
+  __name: "404",
+  setup(__props) {
+    const info = common_vendor.ref("");
+    common_vendor.onLoad(() => {
+      getMessage();
+    });
+    const getMessage = () => {
+      const message = util_getParams.getQueryString("message");
+      if (message) {
+        info.value = message;
+      } else {
+        info.value = "404";
+      }
+    };
+    return (_ctx, _cache) => {
+      return {
+        a: common_vendor.t(info.value)
+      };
+    };
+  }
+};
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-f50617b2"], ["__file", "E:/workSpace/schoolBus-reservation/pages/404/404.vue"]]);
+wx.createPage(MiniProgramPage);

+ 6 - 0
unpackage/dist/dev/mp-weixin/pages/404/404.json

@@ -0,0 +1,6 @@
+{
+  "navigationBarTitleText": "错误页面",
+  "navigationStyle": "custom",
+  "enablePullDownRefresh": false,
+  "usingComponents": {}
+}

+ 1 - 0
unpackage/dist/dev/mp-weixin/pages/404/404.wxml

@@ -0,0 +1 @@
+<view class="container data-v-f50617b2"><view class="img data-v-f50617b2"><image class="data-v-f50617b2" src="/static/no-bus.png"></image></view><view class="info data-v-f50617b2">{{a}}</view></view>

+ 19 - 0
unpackage/dist/dev/mp-weixin/pages/404/404.wxss

@@ -0,0 +1,19 @@
+/* 水平间距 */
+/* 水平间距 */
+.container.data-v-f50617b2 {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+.container .img.data-v-f50617b2 {
+  margin-top: 200rpx;
+  width: 480rpx;
+  height: 508rpx;
+}
+.container .img img.data-v-f50617b2 {
+  width: 100%;
+  height: 100%;
+}
+.container .info.data-v-f50617b2 {
+  padding: 0 30rpx;
+}

+ 119 - 0
unpackage/dist/dev/mp-weixin/pages/detail/detail.js

@@ -0,0 +1,119 @@
+"use strict";
+const common_vendor = require("../../common/vendor.js");
+if (!Array) {
+  const _easycom_uni_datetime_picker2 = common_vendor.resolveComponent("uni-datetime-picker");
+  _easycom_uni_datetime_picker2();
+}
+const _easycom_uni_datetime_picker = () => "../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.js";
+if (!Math) {
+  _easycom_uni_datetime_picker();
+}
+const _sfc_main = {
+  __name: "detail",
+  setup(__props) {
+    common_vendor.onLoad((options) => {
+      info.value = JSON.parse(options.info);
+      console.log(info.value);
+    });
+    const info = common_vendor.ref({});
+    const busList = common_vendor.ref(["赣AU8G96", "赣AU8G99", "赣AU8G86"]);
+    const busIndex = common_vendor.ref(0);
+    const pathList = common_vendor.ref(["墨轩湖 - 综合楼", "墨轩湖 - 老校区 - 美程宾馆", "墨轩湖 - 老校区"]);
+    const pathIndex = common_vendor.ref(0);
+    const single = common_vendor.ref("2023-03-28 17:10");
+    const bindPickerChange = (e, type) => {
+      console.log(123);
+    };
+    const listData = common_vendor.ref([
+      {
+        name: "张三",
+        url: "../../static/man.png",
+        // 1代表男生,2代表女生
+        sex: 1,
+        identity: "教职工",
+        time: "2023-03-01  10:33:12",
+        // 1代表已预约
+        type: 1
+      },
+      {
+        name: "小刘",
+        url: "../../static/woman.png",
+        // 1代表男生,2代表女生
+        sex: 2,
+        identity: "教职工",
+        time: "2023-03-01  10:33:12",
+        // 1代表已预约
+        type: 1
+      },
+      {
+        name: "小王",
+        url: "../../static/woman.png",
+        // 1代表男生,2代表女生
+        sex: 2,
+        identity: "教职工",
+        time: "2023-03-01  10:33:12",
+        // 1代表已预约
+        type: 1
+      },
+      {
+        name: "张三",
+        url: "../../static/man.png",
+        // 1代表男生,2代表女生
+        sex: 1,
+        identity: "教职工",
+        time: "2023-03-01  10:33:12",
+        // 1代表已预约
+        type: 1
+      },
+      {
+        name: "小刘",
+        url: "../../static/woman.png",
+        // 1代表男生,2代表女生
+        sex: 2,
+        identity: "教职工",
+        time: "2023-03-01  10:33:12",
+        // 1代表已预约
+        type: 1
+      },
+      {
+        name: "小王",
+        url: "../../static/woman.png",
+        // 1代表男生,2代表女生
+        sex: 2,
+        identity: "教职工",
+        time: "2023-03-01  10:33:12",
+        // 1代表已预约
+        type: 1
+      }
+    ]);
+    return (_ctx, _cache) => {
+      return {
+        a: common_vendor.t(busList.value[busIndex.value]),
+        b: common_vendor.o(($event) => bindPickerChange()),
+        c: busIndex.value,
+        d: busList.value,
+        e: common_vendor.t(single.value),
+        f: common_vendor.o(($event) => single.value = $event),
+        g: common_vendor.p({
+          modelValue: single.value
+        }),
+        h: common_vendor.t(pathList.value[pathIndex.value]),
+        i: common_vendor.o(($event) => bindPickerChange()),
+        j: pathIndex.value,
+        k: pathList.value,
+        l: common_vendor.f(listData.value, (item, index, i0) => {
+          return {
+            a: item.url,
+            b: common_vendor.t(item.name),
+            c: item.sex === 1 ? "../../static/boy.png" : "../../static/gril.png",
+            d: common_vendor.t(item.identity),
+            e: common_vendor.t(item.time),
+            f: index
+          };
+        })
+      };
+    };
+  }
+};
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-eca06f3c"], ["__file", "E:/workSpace/schoolBus-reservation/pages/detail/detail.vue"]]);
+wx.createPage(MiniProgramPage);

+ 8 - 0
unpackage/dist/dev/mp-weixin/pages/detail/detail.json

@@ -0,0 +1,8 @@
+{
+  "navigationBarTitleText": "校车预约",
+  "navigationStyle": "custom",
+  "enablePullDownRefresh": false,
+  "usingComponents": {
+    "uni-datetime-picker": "../../uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker"
+  }
+}

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


+ 93 - 0
unpackage/dist/dev/mp-weixin/pages/detail/detail.wxss

@@ -0,0 +1,93 @@
+/* 水平间距 */
+/* 水平间距 */
+.container .box.data-v-eca06f3c {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 0 30rpx;
+  height: 98rpx;
+  font-size: 28rpx;
+  border-bottom: 1rpx solid #E6E6E6;
+}
+.container .box .left.data-v-eca06f3c {
+  flex: 1;
+  color: #999999;
+}
+.container .box .right.data-v-eca06f3c {
+  flex: 1;
+  display: flex;
+  justify-content: flex-end;
+}
+.container .box .right .right-img.data-v-eca06f3c {
+  margin-left: 27rpx;
+  margin-top: -5rpx;
+  width: 17rpx;
+  height: 12rpx;
+}
+.container .box .right .right-img img.data-v-eca06f3c {
+  width: 100%;
+  height: 100%;
+}
+.container .list.data-v-eca06f3c {
+  padding: 33rpx 30rpx;
+}
+.container .list .list-title.data-v-eca06f3c {
+  height: 41rpx;
+  color: #999999;
+  font-size: 28rpx;
+}
+.container .list .list-item.data-v-eca06f3c {
+  display: flex;
+  align-items: center;
+  box-sizing: border-box;
+  padding: 29rpx 0 26rpx 0;
+  height: 155rpx;
+  border-bottom: 1rpx solid #E6E6E6;
+}
+.container .list .list-item .item-img.data-v-eca06f3c {
+  width: 100rpx;
+  height: 100rpx;
+  border-radius: 50%;
+}
+.container .list .list-item .item-img img.data-v-eca06f3c {
+  width: 100%;
+  height: 100%;
+}
+.container .list .list-item .item-info.data-v-eca06f3c {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-evenly;
+  margin-left: 6rpx;
+  height: 100rpx;
+}
+.container .list .list-item .item-info .info-name.data-v-eca06f3c {
+  display: flex;
+  align-items: center;
+  font-size: 32rpx;
+}
+.container .list .list-item .item-info .info-name .info-name-img.data-v-eca06f3c {
+  margin-left: 26rpx;
+  width: 30rpx;
+  height: 35rpx;
+}
+.container .list .list-item .item-info .info-name .info-name-img img.data-v-eca06f3c {
+  width: 100%;
+  height: 100%;
+}
+.container .list .list-item .item-info .info-mes.data-v-eca06f3c {
+  font-size: 24rpx;
+  color: #999999;
+}
+.container .list .list-item .item-info .info-mes span.data-v-eca06f3c {
+  margin-left: 26rpx;
+  color: #A6A6A6;
+}
+.container .list .list-item .item-type.data-v-eca06f3c {
+  width: 104rpx;
+  height: 41rpx;
+}
+.container .list .list-item .item-type img.data-v-eca06f3c {
+  width: 100%;
+  height: 100%;
+}

+ 135 - 0
unpackage/dist/dev/mp-weixin/pages/home/home.js

@@ -0,0 +1,135 @@
+"use strict";
+const common_vendor = require("../../common/vendor.js");
+const util_api = require("../../util/api.js");
+const util_isWeixin = require("../../util/isWeixin.js");
+const _sfc_main = {
+  __name: "home",
+  setup(__props) {
+    common_vendor.onLoad(() => {
+      util_isWeixin.isWeixin();
+      card_number.value = common_vendor.index.getStorageSync("card_number");
+      getUserInfo();
+      getTimeList();
+    });
+    const card_number = common_vendor.ref("");
+    const currentIndex1 = common_vendor.ref(null);
+    const currentIndex2 = common_vendor.ref(null);
+    const currentTime = common_vendor.ref(null);
+    const currentBus = common_vendor.ref(null);
+    const timeList = common_vendor.ref([]);
+    const busPath = common_vendor.ref("");
+    const startTime = common_vendor.ref("");
+    const busList = common_vendor.ref([]);
+    const getUserInfo = async () => {
+      const res = await util_api.myRequest({
+        url: "/appget_user.action",
+        method: "get",
+        data: {
+          card_number: card_number.value
+        }
+      });
+      common_vendor.index.setStorageSync("bus-userInfo", JSON.stringify(res));
+    };
+    const getTimeList = async () => {
+      const res = await util_api.myRequest({
+        url: "/appallTime.action",
+        method: "post"
+      });
+      timeList.value = res;
+    };
+    const getBusList = async (ci_time) => {
+      busList.value = [];
+      const res = await util_api.myRequest({
+        url: "/appbanByTime.action",
+        method: "get",
+        data: {
+          ci_time
+        }
+      });
+      busList.value = res;
+    };
+    const handleChangeCurrentIndex = (index, type, item) => {
+      if (type === 1) {
+        currentIndex1.value = index;
+        currentTime.value = item.start_time;
+        getBusList(currentTime.value);
+      } else {
+        currentIndex2.value = index;
+        currentBus.value = item.car_number;
+        startTime.value = item.starty_time;
+        busPath.value = item.route;
+      }
+    };
+    const handleSub = () => {
+      if (!currentTime.value) {
+        common_vendor.index.showToast({
+          title: "请选择发车时间",
+          icon: "none"
+        });
+        return;
+      }
+      if (!currentBus.value) {
+        common_vendor.index.showToast({
+          title: "请选择预约车辆",
+          icon: "none"
+        });
+        return;
+      }
+      common_vendor.index.showModal({
+        title: "提示",
+        content: "确定预约吗?",
+        success: (res) => {
+          if (res.confirm) {
+            handleSubscribe();
+          } else if (res.cancel)
+            ;
+        }
+      });
+    };
+    const handleSubscribe = async () => {
+      const res = await util_api.myRequest({
+        url: "/apporder.action",
+        method: "post",
+        data: {
+          card_number: card_number.value,
+          car_number: currentBus.value,
+          ci_time: currentTime.value
+        }
+      });
+      console.log(res);
+    };
+    return (_ctx, _cache) => {
+      return common_vendor.e({
+        a: common_vendor.f(timeList.value, (item, index, i0) => {
+          return {
+            a: common_vendor.t(item.start_time),
+            b: common_vendor.n(currentIndex1.value === index ? "active" : "time-list-item"),
+            c: item.id,
+            d: common_vendor.o(($event) => handleChangeCurrentIndex(index, 1, item), item.id)
+          };
+        }),
+        b: busList.value.length
+      }, busList.value.length ? {
+        c: common_vendor.t(busPath.value)
+      } : {}, {
+        d: busList.value.length
+      }, busList.value.length ? {
+        e: common_vendor.f(busList.value, (item, index, i0) => {
+          return {
+            a: common_vendor.t(item.car_number),
+            b: common_vendor.n(currentIndex2.value === index ? "active" : "bus-list-item"),
+            c: item.id,
+            d: common_vendor.o(($event) => handleChangeCurrentIndex(index, 2, item), item.id)
+          };
+        })
+      } : {}, {
+        f: startTime.value
+      }, startTime.value ? {
+        g: common_vendor.t(startTime.value),
+        h: common_vendor.o(handleSub)
+      } : {});
+    };
+  }
+};
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-07e72d3c"], ["__file", "E:/workSpace/schoolBus-reservation/pages/home/home.vue"]]);
+wx.createPage(MiniProgramPage);

+ 5 - 0
unpackage/dist/dev/mp-weixin/pages/home/home.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "校车预约",
+  "navigationStyle": "custom",
+  "usingComponents": {}
+}

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


File diff suppressed because it is too large
+ 162 - 0
unpackage/dist/dev/mp-weixin/pages/home/home.wxss


+ 40 - 0
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -0,0 +1,40 @@
+"use strict";
+const common_vendor = require("../../common/vendor.js");
+const util_getParams = require("../../util/getParams.js");
+const _sfc_main = {
+  __name: "index",
+  setup(__props) {
+    const APPKEY = "4AA7B3944BDF3739";
+    const ocode = "1015730314";
+    const URL = "https://chtech.ncjti.edu.cn/carstop/carbook/appopenid.action";
+    common_vendor.onLoad(() => {
+      loginFilter();
+    });
+    const loginFilter = () => {
+      const card_number = common_vendor.index.getStorageSync("card_number");
+      if (!card_number) {
+        const card_number2 = util_getParams.getQueryString("card_number");
+        if (!card_number2) {
+          getCardnumberURL();
+        } else {
+          common_vendor.index.setStorageSync("card_number", card_number2);
+          common_vendor.index.switchTab({
+            url: "/pages/home/home"
+          });
+        }
+      } else {
+        common_vendor.index.switchTab({
+          url: "/pages/home/home"
+        });
+      }
+    };
+    const getCardnumberURL = () => {
+      window.location.href = `https://open.wecard.qq.com/connect/oauth/authorize?app_key=${APPKEY}&response_type=code&scope=snsapi_base&ocode=${ocode}&redirect_uri=${URL}&state=${URL}`;
+    };
+    return (_ctx, _cache) => {
+      return {};
+    };
+  }
+};
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__file", "E:/workSpace/schoolBus-reservation/pages/index/index.vue"]]);
+wx.createPage(MiniProgramPage);

+ 5 - 0
unpackage/dist/dev/mp-weixin/pages/index/index.json

@@ -0,0 +1,5 @@
+{
+  "navigationBarTitleText": "授权中",
+  "navigationStyle": "custom",
+  "usingComponents": {}
+}

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

@@ -0,0 +1 @@
+<view></view>

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


+ 100 - 0
unpackage/dist/dev/mp-weixin/pages/my/my.js

@@ -0,0 +1,100 @@
+"use strict";
+const common_vendor = require("../../common/vendor.js");
+if (!Math) {
+  common_vendor.unref(Search)();
+}
+const Search = () => "../../components/search.js";
+const _sfc_main = {
+  __name: "my",
+  setup(__props) {
+    const listData = common_vendor.ref([
+      {
+        type: 1,
+        title: "墨轩湖 - 综合楼",
+        orderTime: "2023-03-31  15:15:15",
+        departureTime: "2023-03-31  15:15:15",
+        busNumber: "0269",
+        capacity: "53人",
+        message: "车辆0290变更为6001,容量53变更为63车辆0290变更为6001,容量53变更为63车辆0290变更为6001,容量53变更为63"
+      },
+      {
+        type: 2,
+        title: "墨轩湖 - 综合楼",
+        orderTime: "2023-03-31  15:15:15",
+        departureTime: "2023-03-31  15:15:15",
+        busNumber: "0269",
+        capacity: "53人",
+        message: "车辆0290变更为6001,容量53变更为63"
+      },
+      {
+        type: 3,
+        title: "墨轩湖 - 综合楼",
+        orderTime: "2023-03-31  15:15:15",
+        departureTime: "2023-03-31  15:15:15",
+        busNumber: "0269",
+        capacity: "53人",
+        message: "车辆0290变更为6001,容量53变更为63"
+      },
+      {
+        type: 4,
+        // title: '墨轩湖 - 综合楼',
+        orderTime: "2023-03-31  15:15:15"
+        // departureTime: '2023-03-31  15:15:15',
+        // busNumber: '0269',
+        // capacity: '53人',
+        // message: '车辆0290变更为6001,容量53变更为63'
+      }
+    ]);
+    const getConveyData = (Obj) => {
+      console.log(Obj);
+    };
+    return (_ctx, _cache) => {
+      return {
+        a: common_vendor.o(getConveyData),
+        b: common_vendor.f(listData.value, (item, index, i0) => {
+          return common_vendor.e({
+            a: item.title
+          }, item.title ? {
+            b: common_vendor.t(item.title)
+          } : {}, {
+            c: item.type === 1
+          }, item.type === 1 ? {} : {}, {
+            d: item.type === 2
+          }, item.type === 2 ? {} : {}, {
+            e: item.type === 3
+          }, item.type === 3 ? {} : {}, {
+            f: item.type === 4
+          }, item.type === 4 ? {} : {}, {
+            g: common_vendor.n(item.type === 1 ? "mr-30" : ""),
+            h: common_vendor.t(item.orderTime),
+            i: item.departureTime
+          }, item.departureTime ? {
+            j: common_vendor.t(item.departureTime)
+          } : {}, {
+            k: item.busNumber
+          }, item.busNumber ? {
+            l: common_vendor.t(item.busNumber)
+          } : {}, {
+            m: item.capacity
+          }, item.capacity ? {
+            n: common_vendor.t(item.capacity)
+          } : {}, {
+            o: item.message
+          }, item.message ? {
+            p: common_vendor.t(item.message)
+          } : {}, {
+            q: item.type === 1
+          }, item.type === 1 ? {} : {}, {
+            r: item.type === 1
+          }, item.type === 1 ? {} : {}, {
+            s: item.type === 4
+          }, item.type === 4 ? {} : {}, {
+            t: index
+          });
+        })
+      };
+    };
+  }
+};
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-2f1ef635"], ["__file", "E:/workSpace/schoolBus-reservation/pages/my/my.vue"]]);
+wx.createPage(MiniProgramPage);

+ 7 - 0
unpackage/dist/dev/mp-weixin/pages/my/my.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "我的预约",
+  "navigationStyle": "custom",
+  "usingComponents": {
+    "search": "../../components/search"
+  }
+}

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


+ 80 - 0
unpackage/dist/dev/mp-weixin/pages/my/my.wxss

@@ -0,0 +1,80 @@
+/* 水平间距 */
+/* 水平间距 */
+.container.data-v-2f1ef635 {
+  display: flex;
+  flex-direction: column;
+  background-color: #F2F2F2;
+}
+.container .list.data-v-2f1ef635 {
+  margin-bottom: 20rpx;
+  font-size: 32rpx;
+  background-color: #fff;
+}
+.container .list .list-title.data-v-2f1ef635 {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 0 30rpx;
+  height: 94rpx;
+  font-weight: bold;
+  font-size: 32rpx;
+  border-bottom: 1rpx solid #E6E6E6;
+}
+.container .list .list-title .list-img.data-v-2f1ef635 {
+  width: 121rpx;
+  height: 34rpx;
+}
+.container .list .list-title .list-img img.data-v-2f1ef635 {
+  height: 100%;
+}
+.container .list .list-title .mr-30.data-v-2f1ef635 {
+  margin-right: 30rpx;
+}
+.container .list .list-info.data-v-2f1ef635 {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-evenly;
+  padding: 0 30rpx;
+  margin-top: 15rpx;
+}
+.container .list .list-info .list-info-item.data-v-2f1ef635,
+.container .list .list-info .list-info-item2.data-v-2f1ef635 {
+  line-height: 60rpx;
+  font-size: 28rpx;
+  color: #333333;
+}
+.container .list .list-info .list-info-item span.data-v-2f1ef635,
+.container .list .list-info .list-info-item2 span.data-v-2f1ef635 {
+  display: inline-block;
+  width: 140rpx;
+  text-align-last: justify;
+  color: #999999;
+}
+.container .list .list-info .list-info-item.data-v-2f1ef635 {
+  height: 60rpx;
+}
+.container .list .list-button.data-v-2f1ef635 {
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
+  font-size: 28rpx;
+  text-align: center;
+}
+.container .list .list-button .list-button-change.data-v-2f1ef635 {
+  margin: 17rpx 0 40rpx 0;
+  width: 170rpx;
+  height: 70rpx;
+  line-height: 70rpx;
+  color: #fff;
+  border-radius: 15rpx;
+  background: linear-gradient(#8684FF, #3C50E8);
+}
+.container .list .list-button .list-button-cancel.data-v-2f1ef635 {
+  margin: 17rpx 30rpx 40rpx;
+  width: 170rpx;
+  height: 70rpx;
+  line-height: 70rpx;
+  color: #999999;
+  border-radius: 15rpx;
+  background-color: #E6E6E6;
+}

+ 82 - 0
unpackage/dist/dev/mp-weixin/pages/record/record.js

@@ -0,0 +1,82 @@
+"use strict";
+const common_vendor = require("../../common/vendor.js");
+if (!Math) {
+  common_vendor.unref(Search)();
+}
+const Search = () => "../../components/search.js";
+const _sfc_main = {
+  __name: "record",
+  setup(__props) {
+    const listData = common_vendor.ref([
+      {
+        number: "赣M06001",
+        type: 1,
+        date: "2023.03.01",
+        departureTime: "15:30",
+        path: "墨轩湖 - 综合楼",
+        proportion: "25/52"
+      },
+      {
+        number: "赣M06001",
+        type: 2,
+        date: "2023.03.01",
+        departureTime: "15:30",
+        path: "墨轩湖 - 综合楼",
+        proportion: "25/52"
+      },
+      {
+        type: 3,
+        date: "2023.03.01",
+        proportion: "25"
+      },
+      {
+        type: 4,
+        date: "2023.03.01",
+        proportion: "25"
+      }
+    ]);
+    const handleLookDetail = (item) => {
+      const info = JSON.stringify(item);
+      common_vendor.index.navigateTo({
+        url: `/pages/detail/detail?info=${info}`
+      });
+    };
+    const getConveyData = (Obj) => {
+      console.log(Obj);
+    };
+    return (_ctx, _cache) => {
+      return {
+        a: common_vendor.o(getConveyData),
+        b: common_vendor.f(listData.value, (item, index, i0) => {
+          return common_vendor.e({
+            a: common_vendor.t(item.number ? item.number : "无"),
+            b: item.type === 1
+          }, item.type === 1 ? {} : {}, {
+            c: item.type === 2
+          }, item.type === 2 ? {} : {}, {
+            d: item.type === 3
+          }, item.type === 3 ? {} : {}, {
+            e: item.type === 4
+          }, item.type === 4 ? {} : {}, {
+            f: common_vendor.t(item.date),
+            g: item.departureTime
+          }, item.departureTime ? {
+            h: common_vendor.t(item.departureTime)
+          } : {}, {
+            i: item.path
+          }, item.path ? {
+            j: common_vendor.t(item.path)
+          } : {}, {
+            k: item.type === 1 || item.type === 2
+          }, item.type === 1 || item.type === 2 ? {} : {}, {
+            l: common_vendor.t(item.proportion),
+            m: index,
+            n: common_vendor.o(($event) => handleLookDetail(item), index)
+          });
+        })
+      };
+    };
+  }
+};
+const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ef6850c5"], ["__file", "E:/workSpace/schoolBus-reservation/pages/record/record.vue"]]);
+wx.createPage(MiniProgramPage);

+ 8 - 0
unpackage/dist/dev/mp-weixin/pages/record/record.json

@@ -0,0 +1,8 @@
+{
+  "navigationBarTitleText": "校车预约",
+  "navigationStyle": "custom",
+  "enablePullDownRefresh": false,
+  "usingComponents": {
+    "search": "../../components/search"
+  }
+}

+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/record/record.wxml


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