Browse Source

初始化代码

soft5566 3 years ago
parent
commit
0a2567ba58
100 changed files with 9447 additions and 0 deletions
  1. 18 0
      .gitignore
  2. 16 0
      .hbuilderx/launch.json
  3. 40 0
      App.vue
  4. 20 0
      index.html
  5. 1122 0
      lib/qqmap-wx-jssdk.js
  6. 39 0
      main.js
  7. 96 0
      manifest.json
  8. 5 0
      package.json
  9. 84 0
      pages.json
  10. 87 0
      pages/gongyuxiangqing/css/gongyuxiangqing.css
  11. 69 0
      pages/gongyuxiangqing/gongyuxiangqing.vue
  12. 59 0
      pages/huoquanshibai/huoquanshibai.vue
  13. 490 0
      pages/index/css/index.css
  14. 699 0
      pages/index/index.vue
  15. 314 0
      pages/my_orderlist/css/my_orderlist.css
  16. 491 0
      pages/my_orderlist/my_orderlist.vue
  17. 127 0
      pages/myself/css/myself.css
  18. 161 0
      pages/myself/myself.vue
  19. 258 0
      pages/order_mark/css/order_mark.css
  20. 316 0
      pages/order_mark/order_mark.vue
  21. 305 0
      pages/order_room/css/order_room.css
  22. 356 0
      pages/order_room/order_room.vue
  23. 47 0
      pages/ruzhuxuzhi/ruzhuxuzhi.vue
  24. 46 0
      pages/zhifuchenggong/css/zhifuchenggong.css
  25. 38 0
      pages/zhifuchenggong/zhifuchenggong.vue
  26. 20 0
      static/customicons.css
  27. BIN
      static/customicons.ttf
  28. BIN
      static/gongyuxiangqing/sheshi_icon.png
  29. 1 0
      static/gongyuxiangqing/sheshi_icon.svg
  30. BIN
      static/index/index_bg.jpg
  31. 1 0
      static/index/index_bg.svg
  32. 1 0
      static/index/index_kongtiao.svg
  33. 1 0
      static/index/index_lock.svg
  34. 1 0
      static/index/index_map.svg
  35. 1 0
      static/index/index_nosmoking.svg
  36. 1 0
      static/index/index_phone.svg
  37. 4 0
      static/index/index_ruzhu.svg
  38. 7 0
      static/index/index_tuifang.svg
  39. 1 0
      static/index/index_wifi.svg
  40. 4 0
      static/index/index_xuzhu.svg
  41. 1 0
      static/index/room_image.svg
  42. BIN
      static/index/ruzhu.png
  43. 1 0
      static/index/swiper_img1.svg
  44. 1 0
      static/index/swiper_x.svg
  45. BIN
      static/index/tuifang.png
  46. BIN
      static/index/welcome.png
  47. BIN
      static/index/xuzhi.png
  48. 4 0
      static/index/xuzhi.svg
  49. 1 0
      static/my/baoxiu.svg
  50. 1 0
      static/my/dairuzhu.svg
  51. 1 0
      static/my/no_pay.svg
  52. 1 0
      static/my/no_zhifu.svg
  53. 1 0
      static/my/person_phone.svg
  54. BIN
      static/my/touxiang.png
  55. 1 0
      static/my/touxiang.svg
  56. 1 0
      static/my/wancheng.svg
  57. 1 0
      static/my/yiquxiao.svg
  58. 1 0
      static/my/yiruzhu.svg
  59. 1 0
      static/order_room/jiantou.svg
  60. BIN
      static/order_room/order_bg.jpg
  61. 1 0
      static/order_room/order_bg.svg
  62. BIN
      static/success.png
  63. 1 0
      static/tabbar/apart_dian.svg
  64. 1 0
      static/tabbar/apartment.svg
  65. 1 0
      static/tabbar/myself.svg
  66. 1 0
      static/tabbar/myself_dian.svg
  67. 1 0
      uni.scss
  68. 29 0
      uni_modules/uni-badge/changelog.md
  69. 268 0
      uni_modules/uni-badge/components/uni-badge/uni-badge.vue
  70. 88 0
      uni_modules/uni-badge/package.json
  71. 10 0
      uni_modules/uni-badge/readme.md
  72. 6 0
      uni_modules/uni-breadcrumb/changelog.md
  73. 121 0
      uni_modules/uni-breadcrumb/components/uni-breadcrumb-item/uni-breadcrumb-item.vue
  74. 41 0
      uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue
  75. 88 0
      uni_modules/uni-breadcrumb/package.json
  76. 66 0
      uni_modules/uni-breadcrumb/readme.md
  77. 16 0
      uni_modules/uni-calendar/changelog.md
  78. 546 0
      uni_modules/uni-calendar/components/uni-calendar/calendar.js
  79. 12 0
      uni_modules/uni-calendar/components/uni-calendar/i18n/en.json
  80. 8 0
      uni_modules/uni-calendar/components/uni-calendar/i18n/index.js
  81. 12 0
      uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hans.json
  82. 12 0
      uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hant.json
  83. 188 0
      uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue
  84. 562 0
      uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue
  85. 350 0
      uni_modules/uni-calendar/components/uni-calendar/util.js
  86. 88 0
      uni_modules/uni-calendar/package.json
  87. 103 0
      uni_modules/uni-calendar/readme.md
  88. 26 0
      uni_modules/uni-card/changelog.md
  89. 270 0
      uni_modules/uni-card/components/uni-card/uni-card.vue
  90. 90 0
      uni_modules/uni-card/package.json
  91. 12 0
      uni_modules/uni-card/readme.md
  92. 36 0
      uni_modules/uni-collapse/changelog.md
  93. 402 0
      uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue
  94. 147 0
      uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue
  95. 89 0
      uni_modules/uni-collapse/package.json
  96. 12 0
      uni_modules/uni-collapse/readme.md
  97. 15 0
      uni_modules/uni-combox/changelog.md
  98. 275 0
      uni_modules/uni-combox/components/uni-combox/uni-combox.vue
  99. 90 0
      uni_modules/uni-combox/package.json
  100. 0 0
      uni_modules/uni-combox/readme.md

+ 18 - 0
.gitignore

@@ -0,0 +1,18 @@
+.DS_Store
+node_modules/
+dist/
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+package-lock.json
+tests/**/coverage/
+
+unpackage/
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln

+ 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"
+     }
+    ]
+}

+ 40 - 0
App.vue

@@ -0,0 +1,40 @@
+<script>
+	export default {
+		onLaunch: function() {
+			console.log('App Launch')
+			// console.log(localStorage.getItem('token')=='null')
+			if(localStorage.getItem('token')=='null' && localStorage.getItem('errorMsg')=='null') {
+				window.location.href ='https://open.wecard.qq.com/connect/oauth/authorize?app_key=4FD5599032819781&response_type=code&scope=snsapi_userinfo&ocode=1015730314&redirect_uri=https://chtech.ncjti.edu.cn/hotel/ihotel-api/ihotel/hotelUser/weixiaoAuth&state=https://chtech.ncjti.edu.cn/hotel/ihotel-api/ihotel/hotelUser/weixiaoAuth';
+			} else if (localStorage.getItem('token')=='null' && localStorage.getItem('errorMsg')=='获取用户信息失败') {
+				uni.navigateTo({
+					url:'pages/huoquanshibai/huoquanshibai'
+				})
+			}
+			
+		},
+		onShow: function() {
+			console.log('App Show')
+		},
+		onHide: function() {
+			console.log('App Hide')
+		}
+	}
+</script>
+
+<style lang="scss">
+	/*每个页面公共css */
+	@import '@/uni_modules/uni-scss/index.scss';
+	/* #ifndef APP-NVUE */
+	@import '@/static/customicons.css';
+	// 设置整个项目的背景色
+	page {
+		background-color: #f5f5f5;
+	}
+
+	/* #endif */
+	.example-info {
+		font-size: 14px;
+		color: #333;
+		padding: 10px;
+	}
+</style>

+ 20 - 0
index.html

@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <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-->
+  </head>
+  <body>
+    <div id="app"><!--app-html--></div>
+    <script type="module" src="/main.js"></script>
+  </body>
+</html>

File diff suppressed because it is too large
+ 1122 - 0
lib/qqmap-wx-jssdk.js


+ 39 - 0
main.js

@@ -0,0 +1,39 @@
+
+// #ifndef VUE3
+import Vue from 'vue'
+import App from './App'
+import axios from "axios"
+import qs from 'qs'
+import getUrlKey from './utils/getToken.js'
+localStorage.setItem('token',getUrlKey('token'))
+localStorage.setItem('errorMsg',getUrlKey('errorMsg'))
+console.log(localStorage.getItem('token'))
+console.log(localStorage.getItem('errorMsg'))
+
+//引入公共接口
+import {myRequest} from './utils/api.js'
+//挂载全局
+Vue.prototype.$myRequest = myRequest
+
+Vue.config.productionTip = false
+
+App.mpType = 'app'
+Vue.prototype.$axios = axios;
+Vue.prototype.$qs = qs;
+
+const app = new Vue({
+    ...App
+})
+app.$mount()
+// #endif
+
+// #ifdef VUE3
+import { createSSRApp } from 'vue'
+import App from './App.vue'
+export function createApp() {
+  const app = createSSRApp(App)
+  return {
+    app
+  }
+}
+// #endif

+ 96 - 0
manifest.json

@@ -0,0 +1,96 @@
+{
+    "name" : "School_apartment",
+    "appid" : "__UNI__1EB2D7B",
+    "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" : {
+                "maps" : {}
+            }
+        }
+    },
+    /* SDK配置 */
+    "quickapp" : {},
+    /* 快应用特有相关 */
+    "mp-weixin" : {
+        /* 小程序特有相关 */
+        "appid" : "",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true,
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "需要获取您的地理位置,请确认授权,否则地图功能将无法使用"
+            }
+        }
+    },
+    "h5" : {
+        "devServer" : {
+            "port" : 8000, //端口
+            "disableHostCheck" : true,
+            "proxy" : {
+                //使用代理
+				// https://chtech.ncjti.edu.cn/hotel/ihotel-api/ihotel/roomType/list
+                "/hotel/ihotel-api" : {
+                    "target" : "https://chtech.ncjti.edu.cn/hotel/ihotel-api", //目标地址
+                    "changeOrigin" : true,
+                    "secure" : true, // 设置支持https协议的代理
+
+                    // 设置地址重定向,把程序中/api开头的路径替换成:http://t.yushu.im"
+                    "pathRewrite" : {
+                        "/hotel/ihotel-api" : "" // 设置/api路径重定向
+                    }
+                }
+            }
+        },
+        "sdkConfigs" : {
+            "maps" : {
+                "qqmap" : {
+                    "key" : "BJUBZ-4V3CD-G7Q4K-HFQBZ-AJI6K-WLFAF"
+                }
+            }
+        },
+        "router" : {
+            "base" : "/hotel/h5"
+        }
+    }
+}

+ 5 - 0
package.json

@@ -0,0 +1,5 @@
+{
+  "dependencies": {
+    "axios": "^0.27.2"
+  }
+}

+ 84 - 0
pages.json

@@ -0,0 +1,84 @@
+{
+	"pages": [{
+		"path": "pages/index/index",
+		"style": {
+			"navigationBarTitleText": "智慧校园公寓"
+		}
+	},
+	{
+		"path": "pages/myself/myself",
+		"style": {
+			"navigationBarTitleText": "我的"
+		}
+	},
+	{
+		"path": "pages/order_room/order_room",
+		"style": {
+			"navigationBarTitleText": "填写订单"
+		}
+	},
+	{
+		"path": "pages/my_orderlist/my_orderlist",
+		"style": {
+			"navigationBarTitleText": "我的订单"
+		}
+	},
+	{
+		"path": "pages/order_mark/order_mark",
+		"style": {
+			"navigationBarTitleText": "订单详情"
+		}
+	},
+	{
+		"path": "pages/ruzhuxuzhi/ruzhuxuzhi",
+		"style":{
+			"navigationBarTitleText": "入住须知"
+		}
+	},
+	{
+		"path": "pages/zhifuchenggong/zhifuchenggong",
+		"style":{
+			"navigationBarTitleText": "支付成功"
+		}
+	},
+	{
+		"path": "pages/huoquanshibai/huoquanshibai",
+		"style":{
+			"navigationBarTitleText": "获权失败"
+		}
+	},
+	{
+		"path": "pages/gongyuxiangqing/gongyuxiangqing",
+		"style":{
+			"navigationBarTitleText": "公寓详情"
+		}
+	}
+	],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "uni-app",
+		"navigationBarBackgroundColor": "#FFFFFF",
+		"backgroundColor": "#FFFFFF",
+		"app-plus": {
+			"background": "#efeff4"
+		}
+	},
+	"tabBar": {//底部导航
+		"color": "#7A7E83",
+		"selectedColor": "#296DE3",
+		"borderStyle": "black",
+		"backgroundColor": "#ffffff",
+		"list": [{
+			"pagePath": "pages/index/index",
+			"iconPath": "static/tabbar/apartment.svg",
+			"selectedIconPath": "static/tabbar/apart_dian.svg",//选中时的图片路径
+			"text": "公寓"
+		}, {
+			"pagePath": "pages/myself/myself",
+			"iconPath": "static/tabbar/myself.svg",
+			"selectedIconPath": "static/tabbar/myself_dian.svg",
+			"text": "我的"
+		}]
+	}
+
+}

+ 87 - 0
pages/gongyuxiangqing/css/gongyuxiangqing.css

@@ -0,0 +1,87 @@
+.content {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		background-color: #F2F3F5;
+	}
+	.xuzhi{
+		display: revert;
+		margin-top: 20rpx;
+		width: 750rpx;
+		height: 664rpx;
+		background: rgba(255, 255, 255, 1);
+		color: rgba(102, 102, 102, 1);
+		font-size: 28rpx;
+		font-weight: 400;
+	}
+	.xiang_title{
+		margin-left: 50rpx;
+		margin-top: 15rpx;
+		color: rgba(0, 0, 0, 1);
+		font-size: 32rpx;
+		font-weight: 700;
+		font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
+	}
+	.xiang_txt{
+		margin-left: 50rpx;
+		margin-top: 15rpx;
+		margin-right: 15rpx;
+		color: rgba(128, 128, 128, 1);
+		font-size: 28rpx;
+		font-weight: 400;
+		display: block;
+		text-indent: 56rpx;
+	}
+	/* 第二部分公寓设施 */
+	.sheshi{
+		display: revert;
+		margin-top: 37rpx;
+		width: 750rpx;
+		height: 535rpx;
+		background: rgba(255, 255, 255, 1);
+		color: rgba(128, 128, 128, 1);
+		font-size: 28rpx;
+		font-weight: 400;
+	}
+	.sheshi_title{
+		margin-left: 50rpx;
+		margin-top: 15rpx;
+		color: rgba(0, 0, 0, 1);
+		font-size: 32rpx;
+		font-weight: 700;
+		font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
+	}
+	/* .sheshi_txt{
+		margin-left: 90rpx;
+		margin-top: 30rpx;
+		margin-right: 15rpx;
+		color: rgba(128, 128, 128, 1);
+		font-size: 28rpx;
+		font-weight: 400;
+	} */
+	.sheshi_txt_left{
+		position: absolute;
+		float: left;
+		margin-left: 90rpx;
+		/* margin-top: -430rpx; */
+		margin-right: 15rpx;
+		color: rgba(128, 128, 128, 1);
+		font-size: 28rpx;
+		font-weight: 400;
+	}
+	.sheshi_txt_right{
+		position: absolute;
+		float: right;
+		margin-left: 420rpx;
+		/* margin-top: -430rpx; */
+		margin-right: 15rpx;
+		color: rgba(128, 128, 128, 1);
+		font-size: 28rpx;
+		font-weight: 400;
+	}
+	.sheshi_icon{
+		width: 26rpx;
+		height: 26rpx;
+		margin-right: 5px;
+	}

+ 69 - 0
pages/gongyuxiangqing/gongyuxiangqing.vue

@@ -0,0 +1,69 @@
+<template>
+	<view class="content">
+		<view class="xuzhi">
+			<view class="xiang_title">公寓介绍</view>
+			<view class="xiang_txt">
+				         我们从分享时机、分享形式、分享动机、分享场景4个维度来聊聊「社交分享」的那些事儿。<br>
+				<text style="display: block;text-indent: 56rpx;">所以监听用户的截图操作,提示用户进行分享,既缩短了以前分享截图的操作路径,避免了在之前长路径中的行为流失(比如截图完成后忘记分享或觉得麻烦放弃分享等等),也让用户觉得更加贴心。</text>
+				         <text style="display: block;text-indent: 56rpx;">用户分享内容到社交媒体或好友,不应该是一种粗暴的强制行为,我们应该在保证产品本身内容有吸引力的核心前提下,仔细揣摩用户心理,结合产品本身的特色,在不同情境下提供给用户最合适的分享平台及方式,让用户分享成为一种水到渠。</text>
+				        <text style="display: block;text-indent: 56rpx;">营业时间:24小时</text>
+				         <text style="display: block;text-indent: 56rpx;">联系电话:<text @click="telphone(phone)" style="color:rgba(41, 109, 227, 1);">{{phone}}</text></text>
+			</view>
+		</view>
+		<!-- 第二部分,公寓设施 -->
+		<view class="sheshi">
+			<view class="sheshi_title">公寓设施</view>
+			<view class="sheshi_txt_left">
+				<view style="margin-top: 30rpx;" class="sheshi_txt" v-for="(item,index) in sheshiList" :key="index">
+					<image class="sheshi_icon" src="../../static/gongyuxiangqing/sheshi_icon.png"></image>{{item.list}}
+				</view>
+			</view>
+			<view class="sheshi_txt_right">
+				<view style="margin-top: 30rpx;" v-for="(item,index) in sheshiList2" :key="index">
+					<image class="sheshi_icon" src="../../static/gongyuxiangqing/sheshi_icon.png"></image>{{item.list}}
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				sheshiList:[
+					{id:1,list:'免费洗刷用品'},
+					{id:2,list:'24小时热水'},
+					{id:3,list:'客房wifi覆盖'},
+					{id:4,list:'电视'},
+					{id:5,list:'电吹风'},
+					{id:6,list:'分体式空调'},
+				],
+				sheshiList2:[
+					{id:1,list:'吹风机'},
+					{id:2,list:'宽带上网接口'},
+					{id:3,list:'独立卫生间'},
+					{id:4,list:'拖鞋'},
+					{id:5,list:'电水壶'},
+					{id:6,list:'免费瓶装水'},
+				],
+				phone:'0791-82293574'
+			}
+		},
+		onLoad() {
+			
+		},
+		methods: {
+			//拨打电话
+			telphone(phone){
+				uni.makePhoneCall({ 
+					phoneNumber: phone ,
+				}) // 传参带入号码即可
+			},
+		}
+	}
+</script>
+
+<style>
+	@import url("./css/gongyuxiangqing.css");
+</style>

+ 59 - 0
pages/huoquanshibai/huoquanshibai.vue

@@ -0,0 +1,59 @@
+<template>
+	<view class="content">
+		<view class="text-area">
+			<text class="top-line"></text>
+				<view class="item">
+					<!-- <image src="../../static/success.png" class="success-img"></image> -->
+					<text class="success-text">获权失败</text>
+				</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		
+	}
+</script>
+
+<style>
+	.content {
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+		}
+		
+		.text-area {
+			display: flex;
+			justify-content: center;
+		}
+		.top-line{
+			margin-top: 0rpx;
+			margin-left: 0;
+			position: absolute;
+			width: 750rpx;
+			height: 1rpx;
+			background: #CCCCCC;
+		}
+		.item{
+			margin-top: 400rpx;
+			text-align: center;
+			width: 750rpx;
+			height: 1206rpx;
+		}
+		.success-img{
+			margin-left: 242rpx;
+			margin-top: 73rpx;
+			width: 261rpx;
+			height: 266rpx;
+		}
+		.success-text{
+			margin-left: 276rpx;
+			margin-top: 433rpx;
+			font-size: 49rpx;
+			font-family: Microsoft YaHei-3970(82674968);
+			font-weight: 400;
+			color: #333333;
+		}
+</style>

+ 490 - 0
pages/index/css/index.css

@@ -0,0 +1,490 @@
+.content {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	background-color: #F2F3F5;
+}
+/* 背景图 */
+.index_bg {
+	width: 750rpx;
+	height: 320rpx;
+	margin: 0 auto;
+	background-image: url(../../static/index/index_bg.jpg);
+	background-size: 100% 100%;
+	background-attachment: inherit;
+	background-repeat: no-repeat;
+	margin-top: 0px;
+}
+/* 欢迎光临 */
+.welcome{
+	width: 163px;
+	height: 60px;
+	background: rgba(255, 255, 255, 0.4);
+	backdrop-filter: blur(5px);
+}
+.welcome_img{
+	position: absolute;
+	margin-left: 20px;
+	margin-top: 8px;
+	width: 125px;
+	height: 44px;
+}
+/* <!-- 第一层公寓名称卡片 --> */
+.uni-ka{
+	width: 710rpx;
+	height: 254rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 10px;
+}
+.uni-title{
+	position: absolute;
+	margin-left: 29rpx;
+	margin-top: 21rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 34rpx;
+	font-weight: 500;
+}
+.uni-sub-title{
+	position: absolute;
+	margin-left: 31rpx;
+	margin-top: 77rpx;
+	color: rgba(153, 153, 153, 1);
+	font-size: 20rpx;
+	font-weight: 400;
+}
+.uni-extra{
+	position: absolute;
+	margin-left: 560rpx;
+	margin-top: 71rpx;
+	color: rgba(102, 102, 102, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.uni-body{
+	position: absolute;
+	margin-left: 31rpx;
+	margin-top: 144rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 14px;
+	font-weight: 500;
+}
+.uni-body2{
+	position: absolute;
+	margin-left: 31rpx;
+	margin-top: 147rpx;
+	color: rgba(153, 153, 153, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.uni-map{
+	position: absolute;
+	float: right;
+	width: 50rpx;
+	height: 79rpx;
+	margin: 0 auto;
+	margin-left: 552rpx;
+	margin-top: 137rpx;
+}
+.uni-phone{
+	position: absolute;
+	float: right;
+	width: 50rpx;
+	height: 79rpx;
+	margin-left: 630rpx;
+	margin-top: 137rpx;
+}
+/* 第二层工具 */
+.item-list{
+	display: flex;
+	flex-direction: row;
+	justify-content: flex-start;
+	width: 710rpx;
+	height: 181rpx;
+	margin-top: 20rpx;
+	margin-left: 10rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 10px;
+}
+.item-list-one{
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	width: 306rpx;
+	/* margin-right: 60rpx; */
+	margin-top: 20px;
+}
+.img-btn{
+	width: 59rpx;
+	height: 54rpx;
+}
+.list-txt{
+	width: 150rpx;
+	text-align: center;
+	font-size: 28rpx;
+	margin-top: 10rpx;
+	color: rgba(0, 0, 0, 1);
+	font-weight: 400;
+}
+/* 第三层订房 */
+.room-list{
+	display: flex;
+	flex-direction: row;
+	justify-content: flex-start;
+	width: 710rpx;
+	/* height: 981rpx; */
+	margin-top: 20rpx;
+	margin-left: 10rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 10px, 10px, 0px, 0px;
+}
+/* 选择住房日期 */
+.select-time{
+	display: flex;
+	flex-direction: row;
+	justify-content: flex-start;
+	position: absolute;
+	width: 710rpx;
+	height: 120rpx;
+	margin: 0;
+}
+.select-time-one{
+	margin-top: 32rpx;
+	margin-left: 77rpx;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+}
+.select-list{
+	color: rgba(153, 153, 153, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.select-list-time{
+	color: rgba(0, 0, 0, 1);
+	font-size: 34rpx;
+	font-weight: 400;
+}
+.select-center{
+	width: 190rpx;
+	height: 120rpx;
+}
+.select-line1{
+	position: absolute;
+	margin-left: 40px;
+	margin-top: 36px;
+	width: 17rpx;
+	height: 1px;
+	background: rgba(41, 109, 227, 1);
+}
+.select-circle{
+	position: absolute;
+	width: 81rpx;
+	height: 46rpx;
+	margin-left: 49px;
+	margin-top: 24px;
+	background: rgba(240, 242, 245, 1);
+	border: 1px solid rgba(41, 109, 227, 1);
+	border-radius: 33rpx;
+	text-align: center;
+	color: rgba(0, 0, 0, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.select-line2{
+	position: absolute;
+	margin-left: 94px;
+	margin-top: 36px;
+	width: 17rpx;
+	height: 1px;
+	background: rgba(41, 109, 227, 1);
+}
+/* 房型列表 */
+.room-kuang{
+	display: block; 
+	margin-top: 150rpx;
+}
+.room-xinxi{
+	display: -webkit-box;
+	flex-direction: column;
+	align-items: center;
+	width: 710rpx;
+	height: 213rpx;
+	margin-top: 20rpx;
+}
+.room-image{
+	position: absolute;
+	margin-left: 31rpx;
+	width: 213rpx;
+	height: 161rpx;
+	border-radius: 5px;
+}
+.room-name{
+	position: absolute;
+	margin-left: 260rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 34rpx;
+	font-weight: 400;
+}
+.room-mark{
+	position: absolute;
+	margin-left: 260rpx;
+	margin-top: 46rpx;
+	color: rgba(153, 153, 153, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.room-icon{
+	position: absolute;
+	margin-left: 261rpx;
+	margin-top: 116rpx;
+}
+.before-price{
+	position: absolute;
+	margin-left: 606rpx;
+	color: rgba(153, 153, 153, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.room-price{
+	position: absolute;
+	/* margin-left: 605rpx; */
+	margin-top: 46rpx;
+	margin-left: 606rpx;
+	color: rgba(255, 87, 51, 1);
+	font-size: 42rpx;
+	font-weight: 500;
+}
+.room-button{
+	position: absolute;
+	margin-left: 579rpx;
+	margin-top: 96rpx;
+	width: 100rpx;
+	height: 66rpx;
+	background: rgba(41, 109, 227, 1);
+	border-radius: 11px;
+	color: rgba(255, 255, 255, 1);
+	font-size: 36rpx;
+	font-weight: 500;
+	text-align: center;
+	line-height: 66rpx;
+}
+.room-button2{
+	position: absolute;
+	margin-left: 569rpx;
+	margin-top: 96rpx;
+	width: 120rpx;
+	height: 66rpx;
+	background: rgba(128, 127, 131, 0.5);
+	border-radius: 11px;
+	color: rgba(255, 255, 255, 1);
+	font-size: 36rpx;
+	font-weight: 500;
+	text-align: center;
+	line-height: 66rpx;
+}
+.room-line{
+	position: absolute;
+	margin-left: 0rpx;
+	margin-top: 194rpx;
+	width: 710rpx;
+	height: 1px;
+	background: rgba(220, 225, 230, 1);
+}
+/* 房间样式弹窗页面 */
+.popup_bg_picker{
+	width: 700rpx;
+	height: 800rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 6rpx;
+}
+.popup_bg{
+	width: 650rpx;
+	height: 738rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 6rpx;
+}
+.popup_title{
+	position: absolute;
+	margin-left: 40rpx;
+	margin-top: 20rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 32rpx;
+	font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
+	font-weight: 400;
+}
+.popup_error{
+	position: absolute;
+	margin-left: 577rpx;
+	margin-top: 15rpx;
+	width: 32px;
+	height: 32px;
+	background-image: url(../../static/index/swiper_x.svg);
+}
+/* 轮播图 */
+.swiper{
+	position: absolute;
+	margin-left: 0rpx;
+	margin-top: 87rpx;
+	width: 650rpx;
+	height: 340rpx;
+}
+.swiper-item{
+	width: 650rpx;
+	height: 340rpx;
+}
+.swiper-img{
+	position: absolute;
+	width: 650rpx;
+	height: 340rpx;
+	margin: 0;
+}
+.popup_title2{
+	position: absolute;
+	margin-left: 38rpx;
+	margin-top: 444rpx;
+	color: rgba(56, 56, 56, 1);
+	font-size: 28rpx;
+	font-weight: 500;
+	font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
+}
+.popup_txt{
+	position: absolute;
+	margin-left: 46rpx;
+	margin-right: 43rpx;
+	margin-top: 496rpx;
+	color: rgba(128, 128, 128, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+	width: 561rpx;
+	height: 217rpx;
+	overflow-y: auto;
+}
+.popup_txt_in{
+	width: 551rpx;
+	height: 217rpx;
+}
+.popup_txt::-webkit-scrollbar {/*滚动条整体样式*/
+    width: 9rpx;
+    height: 240rpx;
+    background-color: #707371;
+}
+.popup_txt::-webkit-scrollbar-thumb {/*滚动条整体样式*/
+    background-color: #707371;
+    border-radius: 5px;
+}
+.popup_txt::-webkit-scrollbar-track {/*滚动条里面轨道*/
+    background: #cac9d3;
+}
+/* 办理续住弹窗 */
+.popup_bg_xu{
+	width: 650rpx;
+	height: 575rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 6rpx;
+}
+.select-time-xu{
+	display: flex;
+	flex-direction: row;
+	justify-content: flex-start;
+	position: absolute;
+	width: 630rpx;
+	height: 120rpx;
+	margin-top: 128rpx;
+	margin-left: 0rpx;
+}
+.select-time-one-xu{
+	margin-top: 32rpx;
+	margin-left: 55rpx;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+}
+.popup_xu_line{
+	position: absolute;
+	margin-left: 0rpx;
+	margin-top: 86rpx;
+	width: 646rpx;
+	height: 0px;
+	background: rgba(204, 204, 204, 1);
+	border: 1rpx solid rgba(229, 229, 229, 1);
+}
+.popup_xu_txt{
+	position: absolute;
+	margin-left: 52rpx;
+	margin-top: 282rpx;
+	color: rgba(166, 166, 166, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+/* 支付框 */
+.fukuan{
+	display: flex;
+	padding-top: 475rpx;
+	width: 650rpx;
+	height: 100rpx;
+	background: rgba(255, 255, 255, 1);
+	box-shadow: inset 0rpx -4rpx 10rpx rgba(0, 0, 0, 0.15);
+	box-sizing: border-box;
+}
+.fu-price{
+	width: 363rpx;
+	color: rgba(255, 87, 51, 1);
+	font-size: 44rpx;
+	font-weight: 500;
+	text-align: center;
+	line-height: 100rpx;
+}
+.fu-zhifu{
+	float: right;
+	width: 288rpx;
+	height: 100rpx;
+	background: rgba(41, 109, 227, 1);
+	color: rgba(255, 255, 255, 1);
+	font-size: 40rpx;
+	font-weight: 400;
+	text-align: center;
+	line-height: 100rpx;
+}
+/* uni-calendar选中背景色 */
+>>>.uni-calendar-item--isDay[data-v-6097fd5b] {
+    background-color: #fff;
+    opacity: 0.8;
+    color: #2979ff;
+}
+>>>.uni-calendar-item--before-checked[data-v-6097fd5b] {
+    background-color: #0055ff;
+    color: #fff;
+	opacity: 1;
+}
+
+>>>.uni-calendar-item--after-checked[data-v-6097fd5b] {
+    background-color: #0055ff;
+    color: #fff;
+	opacity: 1;
+}
+
+/* >>>.uni-calendar-item--multiple[data-v-6097fd5b] {
+    opacity: 0.5;
+} */
+/* 弹出框 */
+.kuang_txt{
+	align-items: center;
+	justify-content: center;
+	padding: 15rpx;
+	height: 150rpx;
+	/* width: 180rpx; */
+	line-height: 150rpx;
+	text-align: center;
+	background-color: #fff;
+}
+.kuang_txt_tui{
+	align-items: center;
+	justify-content: center;
+	padding: 15rpx;
+	height: 150rpx;
+	width: 180rpx;
+	line-height: 150rpx;
+	text-align: center;
+	background-color: #fff;
+}

+ 699 - 0
pages/index/index.vue

@@ -0,0 +1,699 @@
+<template>
+	<view class="content">
+		<!-- 背景图 -->
+		<view class="index_bg">
+			<view class="welcome"><image class="welcome_img" src="../../static/index/welcome.png"></image></view>
+		</view>
+		<!-- 第一层公寓名称卡片 -->
+		<view class="uni-ka" style="margin-top: -40px;margin-bottom:0px;">
+			<text class="uni-title">墨轩湖姬子公寓(南昌交通学院)</text>
+			<text class="uni-sub-title">2021年装修 | 智能门锁 | 房间wifi | 免费停车</text>
+			<text class="uni-extra" @click="navigateToXiangqing">设施/详情></text>
+			<text class="uni-body">江西省宜春市靖安县墨轩湖大道1号</text>
+			<image class="uni-phone" @click="telphone(phone)" src="../../static/index/index_phone.svg"></image>
+			<a href="https://uri.amap.com/marker?position=115.387261,28.788671&name=南昌交通学院智慧公寓">
+				<image class="uni-map" @click="mapDaohang('115.387261','28.788671')" src="../../static/index/index_map.svg"></image>
+			</a>
+			<br><text class="uni-body2">距离我{{distance}}km</text>
+		</view>
+		<!-- 第二层工具 -->
+		<view class="item-list">
+		  <view class="item-list-one" @click="navigateToXuzhi">
+		    <image src="../../static/index/xuzhi.png" class="img-btn" height="100%" width="100%"></image>
+			<text class="list-txt">入住须知</text>
+		  </view>
+		  <view class="item-list-one" @click="navigateToDairuzhu('warn')">
+		    <image src="../../static/index/ruzhu.png" class="img-btn"></image>
+		    <text class="list-txt">办理入住</text>
+		  </view>
+		  <!-- <view class="item-list-one" @click="navigateToXuzhu">
+		    <image src="../../static/index/index_xuzhu.svg" class="img-btn"></image>
+		    <text class="list-txt">办理续住</text>
+		  </view> -->
+		  <view class="item-list-one" @click="navigateToTuifang('warn')">
+		    <image src="../../static/index/tuifang.png" class="img-btn"></image>
+		    <text class="list-txt">办理退房</text>
+		  </view>
+		</view>
+		<!-- 退房失败时弹框 -->
+		<!-- <uni-popup ref="popup_tui" type="center" width="300rpx" height="300rpx" background-color="#fff">
+			<view class="kuang_txt_tui">
+				<text>请先订房</text>
+			</view>
+		</uni-popup> -->
+		<uni-popup ref="popup_tui" type="dialog">
+			<uni-popup-dialog :type="msgType" cancelText="关闭" confirmText="确定" content="请先订房!" @confirm="dialogConfirm"
+				@close="dialogClose"></uni-popup-dialog>
+		</uni-popup>
+		<!-- 第三层订房 -->
+		<view class="room-list">
+			<!-- 选择住房日期 -->
+			<view class="select-time" @click="openCalendar">
+				<view class="select-time-one">
+				  <text class="select-list">{{startWeek}}入住</text>
+				  <text class="select-list-time">{{startTime}}</text>
+				</view>
+				<view class="select-center">
+					<view class="select-line1"></view>
+					<view class="select-circle">{{ruzhu_num}}晚</view>
+					<view class="select-line2"></view>
+				</view>
+				<view class="select-time-one">
+				  <text class="select-list">{{endWeek}}离店</text>
+				  <text class="select-list-time">{{endTime}}</text>
+				</view>
+			</view>
+			<uni-popup ref="popup_picker" :mask-click="true">
+				<view class=popup_bg_picker>
+					<!-- <text class="popup_title">取消</text>
+					<text class="popup_error" style="margin-left: 272px;" @click="popup_pickerClose">确定</text> -->
+				<uni-calendar :selected="info.selected" class="uni-calendar--hook" :clear-date="true" :date="info.date" :insert="info.insert" :lunar="info.lunar" :startDate="info.startDate"
+				:endDate="info.endDate" :range="info.range" @change="change"/>
+				</view>
+			</uni-popup>
+			<!-- 房型列表 -->
+			<view class="room-kuang">
+				<view class="room-xinxi" v-for="(item,index) in roomType" :key="index">
+					<image class="room-image" :src="item.masterImage" @click="inputDialogToggle(item.id)"></image>
+					<view class="room-name">{{item.typeName}}</view>
+					<view class="room-mark">{{item.typeShortDesc}}</view>
+					<view class="room-icon">
+						<image src="../../static/index/index_wifi.svg" style="width: 30rpx;height: 30rpx;"></image>
+						<image src="../../static/index/index_kongtiao.svg" style="width: 26rpx;height: 26rpx;margin-left: 10rpx;"></image>
+						<image src="../../static/index/index_nosmoking.svg" style="width: 30rpx;height: 30rpx;margin-left: 10rpx;"></image>
+						<image src="../../static/index/index_lock.svg" style="width: 30rpx;height: 30rpx;margin-left: 10rpx;"></image>
+					</view>
+					<view class="before-price"><strike>¥{{item.usualPrice}}</strike></view>
+					<view class="room-price">¥{{item.discountPrice}}</view>
+					<view class="room-button" :class="{'room-button2': item.enableNum == 0}">
+						<text v-if="item.enableNum==0">已满</text>
+						<text v-else @click="navigateToOrderRoom(item.enableNum,item.id,item.typeName)">订</text>
+					</view>
+					<view class="room-line"  v-if="index<(roomType.length-1)"></view>
+				</view>
+			</view>
+			
+		</view>
+		<!-- 订房时弹框 -->
+		<!-- <uni-popup ref="popup_order" type="center" width="300rpx" height="300rpx" background-color="#fff">
+			<view class="kuang_txt">
+				<text>{{order_txt}}</text>
+			</view>
+		</uni-popup> -->
+		<uni-popup ref="popup_order" type="dialog">
+			<uni-popup-dialog :type="msgType" cancelText="关闭" confirmText="确定" :content="order_txt" @confirm="dialogConfirm"
+				@close="dialogClose"></uni-popup-dialog>
+		</uni-popup>
+		<!-- 房间样式弹窗页面 -->
+		<uni-popup ref="popup" type="dialog" :mask-click="false">
+			<view class="popup_bg">
+				<text class="popup_title">户型详情</text>
+				<text class="popup_error" @click="popupClose"></text>
+				<!-- 轮播图 -->
+				<swiper class="swiper" circular :indicator-dots="indicatorDots">
+					<swiper-item v-for="(item, index) in img" :key="index">
+						<view class="swiper-item">
+							<image :src="item" class="swiper-img"></image>
+						</view>
+					</swiper-item>
+				</swiper>
+				<text class="popup_title2">便利设施</text>
+				<view class="popup_txt"><view class="popup_txt_in">{{typeText}}</view></view>
+			</view>
+		</uni-popup>
+		<!-- 有一个可续住订单时办理续住弹窗页面 -->
+		<uni-popup ref="popup_xuzhu" type="dialog" :mask-click="false">
+			<view class="popup_bg_xu">
+				<text class="popup_title">办理续住</text>
+				<text class="popup_error" @click="popupXuzhuClose"></text>
+				<text class="popup_xu_line"></text>
+				<!-- 时间选择 -->
+				<view class="select-time-xu" @click="openXuCalendar">
+					<view class="select-time-one-xu">
+					  <text class="select-list">周四入住</text>
+					  <text class="select-list-time">07月21日</text>
+					</view>
+					<view class="select-center">
+						<view class="select-line1"></view>
+						<view class="select-circle">1晚</view>
+						<view class="select-line2"></view>
+					</view>
+					<view class="select-time-one-xu">
+					  <text class="select-list">周五离店</text>
+					  <text class="select-list-time">07月22日</text>
+					</view>
+				</view>
+				<text class="popup_xu_txt">注:办理续住最多7天,如超过7天需要重新预定</text>
+				<!-- 支付框 -->
+				<view class="fukuan">
+					<view class="fu-price"><text style="font-size: 28rpx;">总计:</text>¥20.00</view>
+					<view class="fu-zhifu">立即支付</view>
+				</view>
+			</view>
+		</uni-popup>
+		<uni-popup ref="popup_xu" :mask-click="true">
+			<uni-calendar :selected="infoXu.selected" class="uni-calendar--hook" :clear-date="true" :date="infoXu.date" :insert="infoXu.insert" :lunar="infoXu.lunar" :startDate="infoXu.startDate"
+			:endDate="infoXu.endDate" :range="infoXu.range" @change="changeXu"/>
+		</uni-popup>
+		<!-- 无可续住订单时办理续住弹窗页面 -->
+		<uni-popup ref="popup_xuzhu_no" type="dialog">
+			<uni-popup-dialog cancelText="关闭" confirmText="确定" content="请先订房"
+				@close="dialogClose"></uni-popup-dialog>
+		</uni-popup>
+			
+	</view>
+</template>
+
+<script>
+	/**
+	 * 获取任意时间
+	 */
+	function getDate(date, AddDayCount = 0) {
+		if (!date) {
+			date = new Date()
+		}
+		if (typeof date !== 'object') {
+			date = date.replace(/-/g, '/')
+		}
+		const dd = new Date(date)
+
+		dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
+
+		var a = new Array("日", "一", "二", "三", "四", "五", "六");  
+		var week = new Date().getDay();    
+		var week2 = new Date().getDay()+1;    
+		const y = dd.getFullYear()
+		const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
+		const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
+		const h = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours()
+		const f = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes()
+		const s = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds()
+		return {
+			fullDate: y + '-' + m + '-' + d,
+			fullDate2: y + '-' + m + '-' + d+' '+h+':'+f+':'+s,
+			fullTime: m + '月' + d + '日',
+			year: y,
+			month: m,
+			date: d,
+			day: dd.getDay(),
+			sWeek:"周"+ a[week],
+			eWeek:"周"+ a[week2]
+		}
+	}
+	// 导入图片
+	import AMap from "../../lib/qqmap-wx-jssdk.js"
+	export default {
+		data() {
+			return {
+				showCalendar: false,
+				info: {
+					lunar: true,
+					range: true,
+					insert: true,
+					selected: [],
+					startDate:'',
+					date:'',
+					endDate:''
+				},
+				msgType: 'warn',
+				distance: 0, //"距离"
+				startTime:'',//默认到店日期
+				endTime:'',//默认离店日期
+				startDate:'',//默认到店日期接口数据
+				endDate:'',//默认离店日期接口数据
+				startWeek:'',// 默认入店日
+				endWeek:'',// 默认离店
+				payMount:0,//房间价格
+				freeRoom:0,//房间剩余
+				ruzhu_num:1,//入住夜晚数
+				//续住里选择器
+				infoXu: {
+					lunar: true,
+					range: true,
+					insert: true,
+					selected: [],
+					startDate:'',
+					date:'',
+					endDate:''
+				},
+				roomType:[],
+				typeText:'',//房型详细描述
+				indicatorDots: true,//滚动图片提示条默认出现
+				img:[],//轮播图里图片
+				phone:'0791-82293574',//电话
+				latitude: '', // 默认当前纬度
+				longitude:'',
+				scale: 12, // 默认16
+				markers: [],
+				markerHeight: 30,
+				xuzhu_type:[],// 办理续住判断条件
+				xuzhu_panduan:[],// 办理续住判断条件赋值
+				tui_type:[],// 办理退房判断条件
+				tui_panduan:[],// 办理退房判断条件赋值
+				dai_type:[],// 办理入住判断条件
+				dai_panduan:[],// 办理入住判断条件赋值
+				order_txt:'',//订房事故时信息
+			}
+		},
+		onLoad() {
+			this.startDate = getDate(new Date()).fullDate2
+			this.endDate =  getDate(new Date(),1).fullDate2
+			this.getRoomType()
+		},
+		mounted() {
+			
+		},
+		onReady() {
+			this.$nextTick(() => {
+				this.showCalendar = true
+			})
+			// TODO 模拟请求异步同步数据
+			setTimeout(() => {
+				// console.log('date:'+getDate(new Date()).fullDate)
+				// console.log('startDate:'+getDate(new Date()).fullDate)
+				// console.log('startWeek:'+getDate(new Date()).eWeek)
+				this.info.date = getDate(new Date()).fullDate
+				this.info.startDate = getDate(new Date()).fullDate
+				this.info.endDate =  getDate(new Date(),6).fullDate
+				this.infoXu.date = getDate(new Date()).fullDate
+				this.infoXu.startDate = getDate(new Date()).fullDate
+				this.infoXu.endDate =  getDate(new Date(),6).fullDate
+				this.startTime = getDate(new Date()).fullTime
+				this.endTime = getDate(new Date(),1).fullTime
+				this.startWeek = getDate(new Date()).sWeek
+				this.endWeek = getDate(new Date(),1).eWeek
+			}, 1)
+			
+			//   wx请求获取位置权限
+			this.getAuthorize()
+				.then(() => {
+					//   同意后获取
+					this.getLocationInfo();
+				})
+				.catch(() => {
+					const that = this;
+					uni.getLocation({
+						type: "gcj02",
+						success: function(res) {
+							// 暂时
+							that.longitude = res.longitude;
+							that.latitude = res.latitude;
+							var long = 0;
+							var lat = 0;
+							//小数点保留六位  经度
+							if (that.longitude.toString().indexOf('.') > 0) {
+								const longlatsplit = that.longitude.toString().split('.');
+								if (longlatsplit.length >= 2) {
+									long = parseFloat(longlatsplit[0] === "" ? 0 : longlatsplit[0]) + parseFloat("." + longlatsplit[1].slice(0,6));
+								}
+							}
+							if (that.latitude.toString().indexOf('.') > 0) {
+								const longlatsplit1 = that.latitude.toString().split('.');
+								if (longlatsplit1.length >= 2) {
+									lat = parseFloat(longlatsplit1[0] === "" ? 0 : longlatsplit1[0]) + parseFloat("." + longlatsplit1[1].slice(0,6));
+								}
+							}
+							that.distance = that.getMapDistance(lat,long,'28.788671','115.387261');
+							that.markers = [{
+								id: "",
+								latitude: res.latitude,
+								longitude: res.longitude,
+								iconPath: "../../static/img/phone.png",
+								width: that.markerHeight, //宽
+								height: that.markerHeight, //高
+							}, ];
+						},
+					});
+					//   不同意给出弹框,再次确认
+					// this.openConfirm()
+					// 	.then(() => {
+					// 		this.getLocationInfo();
+					// 	})
+					// 	.catch(() => {
+					// 		this.rejectGetLocation();
+					// 	});
+				});
+		},
+			
+		methods: {
+			
+			// 房型接口
+			getRoomType() {
+			  let _self = this
+			  _self.roomType = []
+			  
+			  this.$axios.get("/hotel/ihotel-api/ihotel/roomType/list?startDate="+this.startDate.substring(0,10)+"&endDate="+this.endDate.substring(0,10)).then(res => {
+				res = res.data
+				if (res.success) {
+					// console.log(res)
+				  res.data.forEach(data => {
+					if (data.flag !== '-1') {
+					  _self.roomType.push(data)
+					}
+				  })
+				} else {
+				  console.log('获取房型失败')
+				}
+			  });
+			},
+			// 房型详情接口
+			getRoomTypeInfo(id) {
+			  let _self = this
+			  _self.typeText=''
+			  _self.img=[]
+			  this.$axios.get(`/hotel/ihotel-api/ihotel/roomType/info/${id}`).then(res => {
+				res = res.data
+				if (res.success) {
+					// console.log(res)
+					_self.typeText=res.data.typeDesc
+					_self.img=res.data.typeImage.split(',')
+					// console.log(_self.img)
+				} else {
+				  console.log('获取房型详情失败')
+				}
+			  });
+			},
+			// 订单列表
+			getOrderPage() {
+			  let _self = this
+			  _self.xuzhu_type=[]
+			  _self.tui_type=[]
+			  _self.dai_type=[]
+			  this.$axios.get("/hotel/ihotel-api/ihotel/hotelOrder/user/order/page?curPage=1&pageSize=100",
+			  {
+				  headers:{
+					  'user_token':localStorage.getItem('token')
+				  }
+			  }).then(res => {
+				res = res.data
+				if (res.success) {
+				  res.data.list.forEach(data => {
+					if (data.flag !== '-1') {
+					  _self.xuzhu_type.push(data.orderStatu)
+					  _self.tui_type.push(data.orderStatu)
+					  _self.dai_type.push(data.orderStatu)
+					  // console.log(_self.xuzhu_type)
+					}
+				  })
+				} else {
+				  console.log('获取订单列表失败')
+				}
+			  });
+			},
+			
+			// 跳转到入住须知
+			navigateToXuzhi(){
+				uni.navigateTo({
+				  url: "../ruzhuxuzhi/ruzhuxuzhi",
+				});
+			},
+			// 跳转到公寓详情
+			navigateToXiangqing(){
+				uni.navigateTo({
+				  url: "../gongyuxiangqing/gongyuxiangqing",
+				});
+			},
+			// 订房间 
+			navigateToOrderRoom(enableNum,id,typeName) {
+				let _self = this
+				_self.roomType = []
+				if (enableNum>=1){
+					uni.navigateTo({
+					  url: "../order_room/order_room?roomTypeId="+id +"&enableStartTime="+this.startDate+"&enableEndTime="+this.endDate+"&startTime="+this.startTime+"&endTime="+this.endTime+"&typeName="+typeName,
+					});
+				}
+				this.getRoomType()
+				
+				
+			},
+			//办理入住跳转
+			navigateToDairuzhu(type){
+				this.dai_panduan=[]
+				setTimeout(() => {
+					this.getOrderPage()
+				},1)
+				setTimeout(() => {
+					for (let i=0;i<this.dai_type.length;i++){
+						this.dai_type.forEach(val => {
+							if(val[i]==2) {
+								this.dai_panduan.push(val)
+							}
+						})
+					}
+					if(this.dai_panduan.length>=1) {
+						uni.navigateTo({
+							url:"../my_orderlist/my_orderlist?Inv=2"
+						})
+					}else if(this.dai_panduan.length<1) {
+						this.msgType = type
+						this.order_txt='请先订房!'
+						this.$refs.popup_order.open()
+					}
+				},150)
+			},
+			//办理退房
+			navigateToTuifang(type){
+				this.tui_panduan=[]
+				setTimeout(() => {
+					this.getOrderPage()
+				},1)
+				setTimeout(() => {
+					for (let i=0;i<this.tui_type.length;i++){
+						this.tui_type.forEach(val => {
+							if(val[i]==3) {
+								this.tui_panduan.push(val)
+							}
+						})
+					}
+					if(this.tui_panduan.length>=1) {
+						uni.navigateTo({
+							url:"../my_orderlist/my_orderlist?Inv=3"
+						})
+					}else if(this.tui_panduan.length<1) {
+						this.msgType = type
+						this.$refs.popup_tui.open()
+					}
+				},150)
+			},
+			//户型详情弹窗
+			inputDialogToggle(id) {
+				this.$refs.popup.open()
+				this.getRoomTypeInfo(id)
+			},
+			popupClose() {
+				this.$refs.popup.close()
+			},
+			//办理续住弹窗
+			navigateToXuzhu(){
+				this.xuzhu_panduan=[]
+				setTimeout(() => {
+					this.getOrderPage()
+				},1)
+				setTimeout(() => {
+					for (let i=0;i<this.xuzhu_type.length;i++){
+						this.xuzhu_type.forEach(val => {
+							if(val[i]==3) {
+								this.xuzhu_panduan.push(val)
+							}
+						})
+					}
+					console.log(this.xuzhu_panduan)
+					if(this.xuzhu_panduan.length>1) {
+						uni.navigateTo({
+							url:"../my_orderlist/my_orderlist?Inv=3"
+						})
+					}else if(this.xuzhu_panduan.length==1) {
+						this.$refs.popup_xuzhu.open()
+					}else if(this.xuzhu_panduan.length==0) {
+						this.$refs.popup_xuzhu_no.open()
+					}
+				},150)
+			},
+			popupXuzhuClose() {
+				this.$refs.popup_xuzhu.close()
+			},
+			// 不可续住关闭弹窗
+			dialogClose(){
+				this.$refs.popup_xuzhu_no.close()
+			},
+			// 日期选择器弹窗开启
+			openCalendar() {
+				this.$refs.popup_picker.open()
+			},
+			change(e) {
+				this.info.selected=[
+					{
+						date: e.range.before,
+						info: '到店'
+					},
+					{
+						date: e.range.after,
+						info: '离店'
+					}
+				]
+				if(e.range.before!=''&&e.range.after=='') {
+					this.startWeek='周'+e.lunar.ncWeek.substring(2,3)
+				} else if(e.range.before!=''&&e.range.after!=''){
+					if((new Date(e.range.after).getTime())<(new Date(e.range.before).getTime())) {
+						this.order_txt='离店日期不能小于到店日期'
+						this.$refs.popup_order.open()
+					}else{
+						this.endWeek='周'+e.lunar.ncWeek.substring(2,3)
+						this.startTime=e.range.before.substring(5,7)+'月'+e.range.before.substring(8,10)+'日'
+						this.endTime=e.range.after.substring(5,7)+'月'+e.range.after.substring(8,10)+'日'
+						this.startDate = e.range.before +' 14:00:00'
+						this.endDate =  e.range.after +' 12:00:00'
+						this.ruzhu_num=parseInt(((new Date(e.range.after).getTime())-(new Date(e.range.before).getTime()))/1000/60/60/24)
+						if(this.endDate !=' 12:00:00') {
+							this.getRoomType()
+						}
+					}
+				}
+				
+			},
+			// 续住里日期选择器弹窗
+			openXuCalendar() {
+				this.$refs.popup_xu.open()
+			},
+			changeXu(e) {
+				console.log('1change 返回:', e)
+				// 模拟动态打卡
+				if (this.infoXu.selected.length > 5) return
+				this.infoXu.selected.push({
+					date: e.range.before,
+					info: '到店'
+				})
+				this.infoXu.selected.push({
+					date: e.range.after,
+					info: '离店'
+				})
+			},
+			//拨打电话
+			telphone(phone){
+				uni.makePhoneCall({ 
+					phoneNumber: phone ,
+				}) // 传参带入号码即可
+			},
+			
+			//   初次位置授权
+			getAuthorize() {
+				return new Promise((resolve, reject) => {
+					uni.authorize({
+						scope: "scope.userLocation",
+						success: () => {
+							resolve(); // 允许授权
+						},
+						fail: () => {
+							reject(); // 拒绝授权
+						},
+					});
+				});
+			},
+			// 确认授权后,获取用户位置
+			getLocationInfo() {
+				const that = this;
+				uni.getLocation({
+					type: "gcj02",
+					success: function(res) {
+						// 暂时
+						that.longitude = res.longitude; //118.787575;
+						that.latitude = res.latitude; //32.05024;
+						console.log("获取当前的用户经度", that.longitude);
+						console.log("获取当前的用户纬度", that.latitude);
+						var long = 0;
+						var lat = 0;
+						//小数点保留六位  经度
+						if (that.longitude.toString().indexOf('.') > 0) {
+							const longlatsplit = that.longitude.toString().split('.');
+							if (longlatsplit.length >= 2) {
+								long = parseFloat(longlatsplit[0] === "" ? 0 : longlatsplit[0]) + parseFloat("." + longlatsplit[1].slice(0,6));
+							}
+						}
+						if (that.latitude.toString().indexOf('.') > 0) {
+							const longlatsplit1 = that.latitude.toString().split('.');
+							if (longlatsplit1.length >= 2) {
+								lat = parseFloat(longlatsplit1[0] === "" ? 0 : longlatsplit1[0]) + parseFloat("." + longlatsplit1[1].slice(0,6));
+							}
+						}
+						console.log("纬度", lat);
+						that.distance = that.getMapDistance(lat,long,'28.788671','115.387261');
+						console.log(that.distance)
+						that.markers = [{
+							id: "",
+							latitude: res.latitude,
+							longitude: res.longitude,
+							iconPath: "../../static/img/phone.png",
+							width: that.markerHeight, //宽
+							height: that.markerHeight, //高
+						}, ];
+					},
+				});
+			},
+			// 拒绝授权后,弹框提示是否手动打开位置授权
+			openConfirm() {
+				return new Promise((resolve, reject) => {
+					uni.showModal({
+						title: "请求授权当前位置",
+						content: "我们需要获取地理位置信息,为您推荐路线",
+						success: (res) => {
+							// if (res.confirm) { 
+							// 	uni.openSetting().then((res) => {
+							// 		if (res[1].authSetting["scope.userLocation"] === true) {
+							// 			resolve(); // 打开地图权限设置
+							// 		} else {
+							// 			reject();
+							// 			console.log('reject')
+							// 		}
+							// 	});
+							// } else if (res.cancel) {
+							// 	reject();
+							// }
+						},
+					});
+				});
+			},
+			
+			// 彻底拒绝位置获取
+			rejectGetLocation() {
+				uni.showToast({
+					title: "你拒绝了授权,无法获得周边信息",
+					icon: "none",
+					duration: 2000,
+				});
+			},
+			//打开地图导航
+			mapDaohang(lon,lat){
+			},
+			
+			//进行经纬度转换为距离的计算
+			Rad(d) {
+				return d * Math.PI / 180.0; //经纬度转换成三角函数中度分表形式。
+			},
+			/*
+			 计算距离,参数分别为第一点的纬度,经度;第二点的纬度,经度
+			 默认单位km
+			*/
+			getMapDistance(lat1, lng1, lat2, lng2) {
+				// console.log(this.Rad(lat1))
+				// console.log(this.Rad(lng1))
+				// console.log(this.Rad(lat2))
+				// console.log(this.Rad(lng2))
+				// console.log(this.Rad(28.678651))
+				var radLat1 = this.Rad(lat1);
+				var radLat2 = this.Rad(lat2);
+				var a = radLat1 - radLat2;
+				var b = this.Rad(lng1) - this.Rad(lng2);
+				var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
+					Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
+				s = s * 6378.137; // EARTH_RADIUS;
+				s = Math.round(s * 10000) / 10000; //输出为公里
+				s=s.toFixed(2);
+				return s;
+			},
+		}
+	}
+</script>
+
+<style>
+	@import url("./css/index.css");
+</style>

+ 314 - 0
pages/my_orderlist/css/my_orderlist.css

@@ -0,0 +1,314 @@
+.content {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	background-color: #F2F3F5;
+}
+/*切换栏*/
+.inv-h-w {
+	background-color: #FFFFFF;
+	height: 98rpx;
+	display: flex;
+	top: 0;
+	width: 100%;
+	white-space: nowrap;
+	overflow-y: hidden;
+	overflow-x: auto;
+	border: 1rpx solid #fdfdfc;
+}
+.inv-h-w::-webkit-scrollbar-thumb {
+	/*滚动条里面小方块*/
+	border-radius: 5px;
+	background: blue;
+}
+
+.inv-h {
+	display: inline-flex;
+	font-size: 28rpx;
+	flex: 1;
+	text-align: center;
+	margin-left: 5rpx;
+	margin-right: 5rpx;
+	padding-left: 20rpx;
+	padding-right: 20rpx;
+	height: 98rpx;
+	line-height: 98rpx;
+	color: rgba(128, 128, 128, 1);
+}
+
+.inv-h-se {
+	/* display: inline-flex; */
+	color: rgba(0, 0, 0, 1);
+	font-size: 28rpx;
+	font-weight: bold;
+	height: 92rpx;
+	line-height: 98rpx;
+	border-bottom: 6rpx solid rgba(41, 109, 227, 1);
+}
+
+/* 订单样式 */
+.room-kuang{
+	display: block; 
+	width: 750rpx;
+	background-color: #FFFFFF;
+	margin-top: 5rpx;
+}
+.room-xinxi{
+	/* display: -webkit-box; */
+	flex-direction: column;
+	align-items: center;
+	width: 710rpx;
+	height: 243rpx;
+	margin-top: 20rpx;
+}
+.room-image{
+	position: absolute;
+	margin-left: 51rpx;
+	margin-top: 10rpx;
+	width: 165rpx;
+	height: 125rpx;
+	border-radius: 5px;
+}
+.room-name{
+	position: absolute;
+	margin-left: 236rpx;
+	margin-top: 10rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 34rpx;
+	font-weight: 400;
+}
+.room-time{
+	position: absolute;
+	margin-left: 236rpx;
+	margin-top: 56rpx;
+	color: rgba(166, 166, 166, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.room-order{
+	position: absolute;
+	margin-left: 236rpx;
+	margin-top: 96rpx;
+	color: rgba(166, 166, 166, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.room-type{
+	position: absolute;
+	margin-left: 627rpx;
+	color: rgba(128, 128, 128, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.room-price{
+	position: absolute;
+	margin-left: 601rpx;
+	margin-top: 46rpx;
+	color: rgba(56, 56, 56, 1);
+	font-size: 42rpx;
+	font-weight: 500;
+}
+.room-count{
+	position: absolute;
+	margin-left: 51rpx;
+	margin-top: 155rpx;
+	font-size: 24rpx;
+	font-weight: 400;
+	color:#FF5733;
+}
+.room-count-txt{
+	position: absolute;
+	margin-left: 205rpx;
+	margin-top: 155rpx;
+	color: rgba(128, 128, 128, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.room-button{
+	position: absolute;
+	margin-left: 381rpx;
+	margin-top: 146rpx;
+	width: 146rpx;
+	height: 56rpx;
+	border: 1px solid rgba(41, 109, 227, 1);
+	border-radius: 4px;
+	text-align: center;
+	line-height: 56rpx;
+	color: rgba(41, 109, 227, 1);
+}
+.room-button2{
+	position: absolute;
+	margin-left: 551rpx;
+	margin-top: 146rpx;
+	width: 146rpx;
+	height: 56rpx;
+	border: 1px solid rgba(41, 109, 227, 1);
+	border-radius: 4px;
+	text-align: center;
+	line-height: 56rpx;
+	color: rgba(41, 109, 227, 1);
+}
+.room-button3{
+	position: absolute;
+	margin-left: 551rpx;
+	margin-top: 146rpx;
+	width: 146rpx;
+	height: 56rpx;
+	background: rgba(41, 109, 227, 1);
+	border-radius: 4px;
+	text-align: center;
+	line-height: 56rpx;
+	color: rgba(255, 255, 255, 1);
+	font-size: 28rpx;
+}
+.room-line{
+	position: absolute;
+	margin-left: 20rpx;
+	margin-top: 225rpx;
+	width: 710rpx;
+	height: 1px;
+	background: rgba(220, 225, 230, 1);
+}
+/* 办理续住弹窗 */
+.popup_bg_xu{
+	width: 650rpx;
+	height: 575rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 6rpx;
+}
+.popup_title{
+	position: absolute;
+	margin-left: 40rpx;
+	margin-top: 20rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 32rpx;
+	font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
+	font-weight: 400;
+}
+.popup_error{
+	position: absolute;
+	margin-left: 577rpx;
+	margin-top: 15rpx;
+	width: 32px;
+	height: 32px;
+	background-image: url(../../static/index/swiper_x.svg);
+}
+.select-list{
+	color: rgba(153, 153, 153, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.select-list-time{
+	color: rgba(0, 0, 0, 1);
+	font-size: 34rpx;
+	font-weight: 400;
+}
+.select-center{
+	width: 190rpx;
+	height: 120rpx;
+}
+.select-line1{
+	position: absolute;
+	margin-left: 40px;
+	margin-top: 36px;
+	width: 17rpx;
+	height: 1px;
+	background: rgba(41, 109, 227, 1);
+}
+.select-circle{
+	position: absolute;
+	width: 81rpx;
+	height: 46rpx;
+	margin-left: 49px;
+	margin-top: 24px;
+	background: rgba(240, 242, 245, 1);
+	border: 1px solid rgba(41, 109, 227, 1);
+	border-radius: 33rpx;
+	text-align: center;
+	color: rgba(0, 0, 0, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.select-line2{
+	position: absolute;
+	margin-left: 94px;
+	margin-top: 36px;
+	width: 17rpx;
+	height: 1px;
+	background: rgba(41, 109, 227, 1);
+}
+.select-time-xu{
+	display: flex;
+	flex-direction: row;
+	justify-content: flex-start;
+	position: absolute;
+	width: 630rpx;
+	height: 120rpx;
+	margin-top: 128rpx;
+	margin-left: 0rpx;
+}
+.select-time-one-xu{
+	margin-top: 32rpx;
+	margin-left: 55rpx;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+}
+.popup_xu_line{
+	position: absolute;
+	margin-left: 0rpx;
+	margin-top: 86rpx;
+	width: 646rpx;
+	height: 0px;
+	background: rgba(204, 204, 204, 1);
+	border: 1rpx solid rgba(229, 229, 229, 1);
+}
+.popup_xu_txt{
+	position: absolute;
+	margin-left: 52rpx;
+	margin-top: 282rpx;
+	color: rgba(166, 166, 166, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+/* 支付框 */
+.fukuan{
+	display: flex;
+	padding-top: 475rpx;
+	width: 650rpx;
+	height: 100rpx;
+	background: rgba(255, 255, 255, 1);
+	box-shadow: inset 0rpx -4rpx 10rpx rgba(0, 0, 0, 0.15);
+	box-sizing: border-box;
+}
+.fu-price{
+	width: 363rpx;
+	color: rgba(255, 87, 51, 1);
+	font-size: 44rpx;
+	font-weight: 500;
+	text-align: center;
+	line-height: 100rpx;
+}
+.fu-zhifu{
+	float: right;
+	width: 288rpx;
+	height: 100rpx;
+	background: rgba(41, 109, 227, 1);
+	color: rgba(255, 255, 255, 1);
+	font-size: 40rpx;
+	font-weight: 400;
+	text-align: center;
+	line-height: 100rpx;
+}
+/* 弹出框 */
+.kuang_txt{
+	align-items: center;
+	justify-content: center;
+	padding: 15rpx;
+	height: 150rpx;
+	/* width: 180rpx; */
+	line-height: 150rpx;
+	text-align: center;
+	background-color: #fff;
+}

+ 491 - 0
pages/my_orderlist/my_orderlist.vue

@@ -0,0 +1,491 @@
+<template>
+	<view class="content">
+		<!-- 切换栏 -->
+		<scroll-view :scroll-x="true" class="inv-h-w">
+			<view :class="['inv-h',Inv==6?'inv-h-se':'']" @click="changeTab(6)">全部</view>
+			<view :class="['inv-h',Inv==1?'inv-h-se':'']" @click="changeTab(1)">待支付</view>
+			<view :class="['inv-h',Inv==2?'inv-h-se':'']" @click="changeTab(2)">待入住</view>
+			<view :class="['inv-h',Inv==3?'inv-h-se':'']" @click="changeTab(3)">已入住</view>
+			<view :class="['inv-h',Inv==0?'inv-h-se':'']" @click="changeTab(0)">已取消</view>
+			<view :class="['inv-h',Inv==4?'inv-h-se':'']" @click="changeTab(4)">待结账</view>
+			<view :class="['inv-h',Inv==5?'inv-h-se':'']" @click="changeTab(5)">已完成</view>
+		</scroll-view>
+		<!-- 订单样式 -->
+		<view class="room-kuang">
+			<view class="room-xinxi" v-for="(item,index) in troom" :key="index">
+				<view @click="navigateToOrderMark(item.id)">
+				<image class="room-image" :src="item.roomTypeMasterImg"></image>
+				<view class="room-name">{{item.roomTypeName}}</view>
+				<view class="room-time">{{item.enableStartTime|snippet}}-{{item.enableEndTime|snippet}}</view>
+				<view class="room-order">订单号:{{item.id}}</view>
+				<view class="room-type">
+					<text v-if="item.orderStatu==0">已取消</text>
+					<text v-if="item.orderStatu==1">待支付</text>
+					<text v-if="item.orderStatu==2">待入住</text>
+					<text v-if="item.orderStatu==3">已入住</text>
+					<text v-if="item.orderStatu==4">
+						待结账
+					</text>
+					<text v-if="item.orderStatu==5">已完成</text>
+				</view>
+				<view class="room-price">¥{{item.payAmount}}</view>
+				</view>
+				<uni-countdown v-if="item.orderStatu == 1" class="room-count" color="#FF5733" :show-day="false" :second="timeupSecond" @timeup="timeup(item.createTime)" />
+				<text v-if="item.orderStatu == 1" class="room-count-txt">之后取消</text>
+				<view class="room-button" v-if="item.orderStatu != 4 && item.orderStatu != 2 && item.orderStatu != 3">
+					<text v-if="item.orderStatu == 0" @click="openDel(item.id,'warn')">删除</text>
+					<text v-if="item.orderStatu == 1" @click="openQu(item.id,'warn')">取消订单</text>
+					<text v-if="item.orderStatu == 5" @click="openDel(item.id,'warn')">删除</text>
+					<!-- <text v-if="item.orderStatu == 2">取消订单</text> -->
+					<!-- <text v-if="item.orderStatu == 3" @click="navigateToXuzhu">续住</text> -->
+				</view>
+				<view class="room-button2" :class="{'room-button3': item.orderStatu == 1 || item.orderStatu == 4}">
+					<text v-if="item.orderStatu == 0" @click="navigateToZaici(item.enableStartTime,item.enableEndTime,item.roomTypeId)">再次预定</text>
+					<text v-if="item.orderStatu == 1" @click="getOrderPay(item.id)">支付</text>
+					<text v-if="item.orderStatu == 4" @click="navigateToJiezhang(item.id)">去处理</text>
+					<text v-if="item.orderStatu == 5" @click="navigateToWanchengZaici(item.roomTypeId)">再次预定</text>
+					<text v-if="item.orderStatu == 2" @click="openRu(item.id,'warn')">办理入住</text>
+					<text v-if="item.orderStatu == 3" @click="openTui(item.id,'warn')">退房</text>
+					
+				</view>
+				<view class="room-line"  v-if="index<(troom.length-1)"></view>
+			</view>
+		</view>
+		<!-- 提示时弹框 -->
+		<uni-popup ref="popup_order2" type="dialog">
+			<uni-popup-dialog :type="msgType2" cancelText="关闭" confirmText="确定" :content='order_txt2' @confirm="dialogConfirm"
+				@close="dialogClose"></uni-popup-dialog>
+		</uni-popup>
+		<uni-popup ref="popup_order" type="dialog">
+			<uni-popup-dialog :type="msgType" cancelText="关闭" :content='order_txt'></uni-popup-dialog>
+		</uni-popup>
+		<!-- 办理续住弹窗 -->
+		<uni-popup ref="popup_xuzhu" type="dialog" :mask-click="false">
+			<view class="popup_bg_xu">
+				<text class="popup_title">办理续住</text>
+				<text class="popup_error" @click="popupXuzhuClose"></text>
+				<text class="popup_xu_line"></text>
+				<!-- 时间选择 -->
+				<view class="select-time-xu" @click="openXuCalendar">
+					<view class="select-time-one-xu">
+					  <text class="select-list">周四入住</text>
+					  <text class="select-list-time">07月21日</text>
+					</view>
+					<view class="select-center">
+						<view class="select-line1"></view>
+						<view class="select-circle">1晚</view>
+						<view class="select-line2"></view>
+					</view>
+					<view class="select-time-one-xu">
+					  <text class="select-list">周五离店</text>
+					  <text class="select-list-time">07月22日</text>
+					</view>
+				</view>
+				<text class="popup_xu_txt">注:办理续住最多7天,如超过7天需要重新预定</text>
+				<!-- 支付框 -->
+				<view class="fukuan">
+					<view class="fu-price"><text style="font-size: 28rpx;">总计:</text>¥20.00</view>
+					<view class="fu-zhifu">立即支付</view>
+				</view>
+			</view>
+		</uni-popup>
+		<uni-popup ref="popup_xu" :mask-click="true">
+			<uni-calendar :selected="infoXu.selected" class="uni-calendar--hook" :clear-date="true" :date="infoXu.date" :insert="infoXu.insert" :lunar="infoXu.lunar" :startDate="infoXu.startDate"
+			:endDate="infoXu.endDate" :range="infoXu.range" @change="changeXu"/>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	/**
+	 * 获取任意时间
+	 */
+	function getDate(date, AddDayCount = 0) {
+		if (!date) {
+			date = new Date()
+		}
+		if (typeof date !== 'object') {
+			date = date.replace(/-/g, '/')
+		}
+		const dd = new Date(date)
+	
+		dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
+	
+		var a = new Array("日", "一", "二", "三", "四", "五", "六");  
+		var week = new Date().getDay();    
+		var week2 = new Date().getDay()+1;    
+		const y = dd.getFullYear()
+		const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
+		const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
+		const h = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours()
+		const f = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes()
+		const s = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds()
+		return {
+			fullDate: y + '-' + m + '-' + d,
+			fullDate2: y + '-' + m + '-' + d+' '+h+':'+f+':'+s,
+			fullTime: m + '月' + d + '日',
+			year: y,
+			month: m,
+			date: d,
+			day: dd.getDay(),
+			sWeek:"周"+ a[week],
+			eWeek:"周"+ a[week2]
+		}
+	}
+	// 导入图片
+	import room1 from '../../static/index/room_image.svg'
+	import room2 from '../../static/index/room_image.svg'
+	export default {
+		data(){
+			return {
+				Inv: 6,
+				room:[],
+				troom:[],
+				timeupSecond:null,
+				//续住里选择器
+				infoXu: {
+					lunar: true,
+					range: true,
+					insert: true,
+					selected: [],
+					startDate:'',
+					date:'',
+					endDate:'',
+					order_txt:'',//提交订单时信息
+				},
+				msgType:'warn',
+				msgType2:'warn',
+				order_txt:'',//
+				order_txt2:'',//
+				tankuang:false,//弹框是否确定
+				order_txt_id:'',
+			}
+		},
+		filters:{
+			//字过长变为...
+			snippet: function(value) {
+				if(value.length>=10) {
+					return value.slice(0, 10);
+				} else {
+					return value
+				}
+			},
+		},
+		onShow() {
+			// 模拟从后台拿到的数据
+			var room = []
+			// list数组中为每一项添加双向绑定的属性---这个属性要在页面显示(onShow)添加
+			room.forEach(el => el.isChecked = false);
+			this.room = room;
+			this.troom = room;//真实数据赋值给页面数据
+			this.changeTab(this.Inv)
+		},
+		onLoad(option) {
+			this.Inv=option.Inv;
+		},
+		/**
+		* 生命周期函数--监听页面卸载
+		*/
+		onUnload: function () {
+		  clearInterval(this.timer);
+		},
+		mounted(){
+		},
+		onReady() {
+			this.$nextTick(() => {
+				this.showCalendar = true
+			})
+			// TODO 模拟请求异步同步数据
+			setTimeout(() => {
+				// console.log('date:'+getDate(new Date()).fullDate)
+				// console.log('startDate:'+getDate(new Date()).fullDate)
+				// console.log('endDate:'+getDate(new Date(),6).fullDate)
+				this.infoXu.date = getDate(new Date()).fullDate
+				this.infoXu.startDate = getDate(new Date()).fullDate
+				this.infoXu.endDate =  getDate(new Date(),6).fullDate
+			}, 2000)
+		},
+		methods:{
+			// 订单列表
+			getOrderPage() {
+				  let _self = this
+				  var Inv2=this.Inv
+				  _self.troom = []
+				  _self.room = []
+				  if (this.Inv==6) {
+					  Inv2=''
+				  }
+				  this.$axios.get("/hotel/ihotel-api/ihotel/hotelOrder/user/order/page?curPage=1&pageSize=100&statu="+Inv2,
+				  {
+					  headers:{
+						  'user_token':localStorage.getItem('token')
+					  }
+				  }).then(res => {
+					res = res.data
+					if (res.success) {
+						// console.log(res)
+					  res.data.list.forEach(data => {
+						_self.troom.push(data)
+						_self.room.push(data)
+					  })
+					} else {
+					  console.log('获取订单列表失败')
+					}
+				  });
+			},
+			//待确认的弹框操作
+			dialogConfirm() {
+				this.$refs.popup_order2.close()
+				this.tankuang=true
+				if(this.tankuang==true) {
+					if(this.order_txt2=='确定删除?') {
+						this.getOrderDelete(this.order_txt_id)
+					} else if(this.order_txt2=='确定退房?') {
+						this.getOrderReturn(this.order_txt_id)
+					} else if(this.order_txt2=='确定入住?') {
+						this.getOrderHold(this.order_txt_id)
+					} else if(this.order_txt2=='确定取消订单?') {
+						this.getOrderCancel(this.order_txt_id)
+					}
+				} 
+			},
+			dialogClose(){
+				this.$refs.popup_order2.close()
+			},
+			//删除弹框
+			openDel(id,type){
+				this.order_txt_id=id
+				this.msgType2 = type
+				this.order_txt2='确定删除?'
+				this.$refs.popup_order2.open()
+			},
+			//退房弹框
+			openTui(id,type) {
+				this.order_txt_id=id
+				this.msgType2 = type
+				this.order_txt2='确定退房?'
+				this.$refs.popup_order2.open()
+			},
+			//入住弹框
+			openRu(id,type) {
+				this.order_txt_id=id
+				this.msgType2 = type
+				this.order_txt2='确定入住?'
+				this.$refs.popup_order2.open()
+			},
+			//取消订单弹框
+			openQu(id,type) {
+				this.order_txt_id=id
+				this.msgType2 = type
+				this.order_txt2='确定取消订单?'
+				this.$refs.popup_order2.open()
+			},
+			// 支付订单
+			getOrderPay(id) {
+				  let _self = this
+				  this.$axios.get(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/pay/${id}`,
+				  {
+					  headers:{
+						  'user_token':localStorage.getItem('token')
+					  }
+				  }).then(res => {
+					res = res.data
+					if (res.success) {
+						if(res.data.payAmount==0) {
+							uni.navigateTo({
+								url: '../zhifuchenggong/zhifuchenggong?orderId='+res.data.orderId
+							})
+						} else {
+							window.location.href = res.data.payUrl;
+						}
+						
+					} else {
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+						console.log('支付失败')
+					}
+				  });
+			},
+			// 办理退房
+			getOrderReturn(order_txt_id) {
+				let _self = this
+				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
+				this.$axios.put(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/return/${this.order_txt_id}`,).then(res => {
+					res = res.data
+					if (res.success) {
+						this.order_txt='退房成功'
+						this.$refs.popup_order.open()
+						this.getOrderPage()
+					} else {
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+					}
+					
+				});
+				this.tankuang==false
+			},
+			// 办理入住
+			getOrderHold(order_txt_id) {
+				let _self = this
+				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
+				this.$axios.put(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/hold/${this.order_txt_id}`,).then(res => {
+					res = res.data
+					if (res.success) {
+						this.order_txt='办理入住成功'
+						this.$refs.popup_order.open()
+						this.getOrderPage()
+					} else {
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+					}
+				});
+			},
+			// 删除订单
+			getOrderDelete(order_txt_id) {
+				let _self = this
+				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
+				this.$axios.delete(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/${this.order_txt_id}`,).then(res => {
+					res = res.data
+					if (res.success) {
+						this.order_txt='删除订单成功'
+						this.$refs.popup_order.open()
+						this.getOrderPage()
+					} else {
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+					}
+				});
+				this.tankuang==false
+			},
+			// 待支付取消订单
+			getOrderCancel(order_txt_id) {
+				let _self = this
+				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
+				this.$axios.put(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/cancel/${this.order_txt_id}`,).then(res => {
+					res = res.data
+					if (res.success) {
+						this.order_txt='取消成功'
+						this.$refs.popup_order.open()
+						this.getOrderPage()
+					} else {
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+					}
+				});
+			},
+			// 订单取消再次预订
+			navigateToZaici(enableStartTime,enableEndTime,roomTypeId){
+				uni.navigateTo({
+					url:"../order_room/order_room?enableStartTime="+enableStartTime+"&enableEndTime="+enableEndTime+"&startTime="+enableStartTime.substring(5,7)+'月'+enableStartTime.substring(8,10)+'日'+"&endTime="+enableEndTime.substring(5,7)+'月'+enableEndTime.substring(8,10)+'日'+"&roomTypeId="+roomTypeId
+				})
+			},
+			// 订单已完成再次预订
+			navigateToWanchengZaici(roomTypeId){
+				uni.navigateTo({
+					url:'../order_room/order_room?roomTypeId='+roomTypeId
+				})
+			},
+			//处理结账
+			navigateToJiezhang(id) {
+				uni.navigateTo({
+					url:"../order_mark/order_mark?orderId="+id
+				})
+			},
+			/*
+			  * @Explain:选项卡点击切换
+			  */
+			changeTab(Inv) {
+				console.log(Inv)
+				var that = this;
+				this.Inv =Inv
+				var arr = [];
+				this.getOrderPage(this.Inv)
+				that.room.map(item => {//遍历真实数据,拿到所需要的数据放在页面数据tlist中,展示在页面上
+					if(item.orderStatu == this.Inv){
+						arr.push(item);
+					}
+				})
+				that.troom = arr;
+				// if(this.Inv == 6){//获取全部数据
+				// 	that.troom = that.room;
+				// }
+				//滚动到顶部
+				uni.pageScrollTo({
+					duration: 0, //过渡时间必须为0,否则运行到手机会报错
+					scrollTop: 0 //滚动到实际距离是元素距离顶部的距离减去最外层盒子的滚动距离(如res.top - data.top)
+				})
+			},
+			// 倒计时
+			timeup(createTime) {
+				    var that = this;
+				    /**setInterval间歇调用 */
+				    that.timer = setInterval(function () {
+					//订单下单时间
+					var buy_time = createTime;
+					//计算剩余下单时间
+					var time = (new Date(buy_time).getTime() + 10* 60 * 1000) - (new Date().getTime());
+					if(time>0){
+					  //计算剩余的分钟
+					  var minutes = parseInt(time / 1000 / 60 % 60, 10);
+					  //计算剩余的秒数
+					  var seconds = parseInt(time / 1000 % 60, 10);
+					  that.timeupSecond=parseInt(time / 1000);
+					  // console.log(that.timeupSecond)
+					  //判断分钟和秒数小于10要在前面加个0.
+					  if(minutes<10){
+						minutes = '0' + minutes;
+					  }
+					  if (seconds < 10) {
+						seconds = '0' + seconds;
+					  }
+					  var timer = minutes + ":" + seconds;
+					}
+				}, 1000);
+				if(that.timeupSecond==0) {
+					uni.showToast({
+						title: '时间到'
+					})
+					this.getOrderPage()
+				}
+				
+				// this.timeupSecond = 0
+			},
+			// 跳转到订单详情
+			navigateToOrderMark(id) {
+				// console.log(id)
+				uni.navigateTo({
+					url: "../order_mark/order_mark?orderId="+id,
+				})
+			},
+			//办理续住弹窗
+			navigateToXuzhu(){
+				this.$refs.popup_xuzhu.open()
+			},
+			popupXuzhuClose() {
+				this.$refs.popup_xuzhu.close()
+			},
+			// 续住里日期选择器弹窗
+			openXuCalendar() {
+				this.$refs.popup_xu.open()
+			},
+			changeXu(e) {
+				console.log('1change 返回:', e)
+				// 模拟动态打卡
+				if (this.infoXu.selected.length > 5) return
+				this.infoXu.selected.push({
+					date: e.range.before,
+					info: '到店'
+				})
+				this.infoXu.selected.push({
+					date: e.range.after,
+					info: '离店'
+				})
+			},
+			
+		},
+	}
+</script>
+
+<style>
+	@import url(./css/my_orderlist.css);
+</style>

+ 127 - 0
pages/myself/css/myself.css

@@ -0,0 +1,127 @@
+.content {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	background-color: #F2F3F5;
+}
+.person{
+	display: revert;
+	margin-top: 20rpx;
+	margin-left: 20rpx;
+	margin-right: 20rpx;
+	width: 710rpx;
+	height: 190rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 9rpx;
+}
+.person_touxiang{
+	margin-left: 30rpx;
+	margin-top: 40rpx;
+	width: 110rpx;
+	height: 110rpx;
+	border-radius: 55px;
+}
+.person_name{
+	position: absolute;
+	margin-left: 22rpx;
+	margin-top: 50rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 36rpx;
+	font-weight: 600;
+}
+.person_identity{
+	position: absolute;
+	margin-left: 14rpx;
+	width: 91rpx;
+	height: 38rpx;
+	background: rgba(41, 109, 227, 1);
+	border-radius: 145rpx;
+	color: rgba(255, 255, 255, 1);
+	font-size: 20rpx;
+	font-weight: 400;
+	line-height: 38rpx;
+	text-align: center;
+}
+.person_phone{
+	position: absolute;
+	margin-left: 22rpx;
+	margin-top: 98rpx;
+	color: rgba(128, 128, 128, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+/* 第二部分,我的订单 */
+.my_order{
+	display: revert;
+	margin-top: 20rpx;
+	margin-left: 20rpx;
+	margin-right: 20rpx;
+	width: 710rpx;
+	height: 397rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 9rpx;
+}
+.order_title{
+	margin-left: 28rpx;
+	margin-top: 30rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 32rpx;
+	font-weight: 500;
+}
+.order_all{
+	margin-left: 602rpx;
+	margin-top: -30rpx;
+	color: rgba(128, 128, 128, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.item-list{
+	display: flex;
+	flex-direction: row;
+	justify-content: flex-start;
+	width: 710rpx;
+	height: 121rpx;
+	margin-top: 20rpx;
+	margin-left: 10rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 10px;
+}
+.item-list-one{
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	width: 150rpx;
+	margin-right: 30rpx;
+	margin-top: 20rpx;
+}
+.img-btn{
+	width: 59rpx;
+	height: 54rpx;
+}
+.list-txt{
+	width: 150rpx;
+	text-align: center;
+	font-size: 28rpx;
+	margin-top: 10rpx;
+	color: rgba(0, 0, 0, 1);
+	font-weight: 400;
+}
+/* 第三部分,我的服务 */
+.my_help{
+	display: revert;
+	margin-top: 20rpx;
+	margin-left: 20rpx;
+	margin-right: 20rpx;
+	width: 710rpx;
+	height: 269rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 9rpx;
+}
+.help_title{
+	margin-left: 28rpx;
+	margin-top: 30rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 32rpx;
+	font-weight: 500;
+}

+ 161 - 0
pages/myself/myself.vue

@@ -0,0 +1,161 @@
+<template>
+	<view class="content">
+		<view class="person">
+			<image class="person_touxiang" v-if="touxiang==''" src="../../static/my/touxiang.svg"></image>
+			<image class="person_touxiang" v-else :src="touxiang"></image>
+			<text class="person_name">{{cardName}}
+				<text class="person_identity">
+					<text v-if="cardIdentity==0">其他</text>
+					<text v-if="cardIdentity==1">学生</text>
+					<text v-if="cardIdentity==4">教职工</text>
+					<text v-if="cardIdentity==5">校友</text>
+				</text>
+			</text>
+			<text class="person_phone">{{cardNum}}</text>
+		</view>
+		<!-- 第二部分,我的订单 -->
+		<view class="my_order">
+			<view class="order_title">我的订单</view>
+			<view class="order_all" @click="navigateToAll">全部></view>
+			<view class="item-list">
+			  <view class="item-list-one" @click="navigateToDaizhifu">
+			    <image src="../../static/my/no_zhifu.svg" class="img-btn"></image>
+			    <text class="list-txt">待支付</text>
+			  </view>
+			  <view class="item-list-one" @click="navigateToDairuzhu">
+			    <image src="../../static/my/dairuzhu.svg" class="img-btn"></image>
+			    <text class="list-txt">待入住</text>
+			  </view>
+			  <view class="item-list-one" @click="navigateToYiruzhu">
+			    <image src="../../static/my/yiruzhu.svg" class="img-btn"></image>
+			    <text class="list-txt">已入住</text>
+			  </view>
+			  <view class="item-list-one" @click="navigateToYiquxiao">
+			    <image src="../../static/my/yiquxiao.svg" class="img-btn"></image>
+			    <text class="list-txt">已取消</text>
+			  </view>
+			</view>
+			<view class="item-list">
+			  <view class="item-list-one" @click="navigateToDaijiezhang">
+			    <image src="../../static/my/no_pay.svg" class="img-btn"></image>
+			    <text class="list-txt">待结账</text>
+			  </view>
+			  <view class="item-list-one" @click="navigateToYiwancheng">
+			    <image src="../../static/my/wancheng.svg" class="img-btn"></image>
+			    <text class="list-txt">已完成</text>
+			  </view>
+			</view>
+		</view>
+		<!-- 第三部分,我的服务 -->
+		<view class="my_help">
+			<view class="help_title">我的服务</view>
+			<view class="item-list">
+			  <view class="item-list-one" @click="telphone(phone)">
+			    <image src="../../static/my/person_phone.svg" class="img-btn"></image>
+			    <text class="list-txt">人工热线</text>
+			  </view>
+			  <!-- <view class="item-list-one" @click="navigateToBaoxiu">
+			    <image src="../../static/my/baoxiu.svg" class="img-btn"></image>
+			    <text class="list-txt">房间报修</text>
+			  </view> -->
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				phone:'0791-82293574',//客服热线电话
+				cardName:'',//用户名
+				cardIdentity:'',//身份
+				cardNum:'',//卡号
+				touxiang:'',
+			}
+		},
+		onLoad() {
+			this.getUserInfo()
+		},
+		methods: {
+			// 获取用户信息
+			getUserInfo() {
+				  let _self = this
+				  this.$axios.get("/hotel/ihotel-api/ihotel/hotelUser/userInfo",
+				  {
+					  headers:{
+						  'user_token':localStorage.getItem('token')
+					  }
+				  }).then(res => {
+					res = res.data
+					if (res.success) {
+						if (res.data.statu == '1') {
+						  _self.cardName=res.data.name
+						  _self.cardIdentity=res.data.identityType
+						  _self.cardNum=res.data.telPhone
+						  _self.touxiang=res.data.headImage
+						}else {
+							alert('您没有权限,请联系客服')
+						}
+					} else {
+					  console.log('获取用户信息失败')
+					}
+				  });
+			},
+			//跳转到全部订单
+			navigateToAll(){
+				uni.navigateTo({
+					url:"../my_orderlist/my_orderlist?Inv=6"
+				})
+			},
+			//跳转到待支付订单
+			navigateToDaizhifu(){
+				uni.navigateTo({ 
+					url: "../my_orderlist/my_orderlist?Inv=1",
+				})
+			},
+			//跳转到待入住订单
+			navigateToDairuzhu(){
+				uni.navigateTo({ 
+					url: "../my_orderlist/my_orderlist?Inv=2"
+				})
+			},
+			//跳转到已入住订单
+			navigateToYiruzhu(){
+				uni.navigateTo({ 
+					url: "../my_orderlist/my_orderlist?Inv=3"
+				})
+			},
+			//跳转到已取消订单
+			navigateToYiquxiao(){
+				uni.navigateTo({ 
+					url: "../my_orderlist/my_orderlist?Inv=0"
+				})
+			},
+			//跳转到待结账订单
+			navigateToDaijiezhang(){
+				uni.navigateTo({ 
+					url: "../my_orderlist/my_orderlist?Inv=4"
+				})
+			},
+			//跳转到已完成订单
+			navigateToYiwancheng(){
+				uni.navigateTo({ 
+					url: "../my_orderlist/my_orderlist?Inv=5"
+				})
+			},
+			//拨打人工热线
+			telphone(phone){
+				uni.makePhoneCall({ phoneNumber: phone }) // 传参带入号码即可
+			},
+			//跳转到房间报修
+			navigateToBaoxiu(){
+				window.location.href='https://jtishfw.ncjti.edu.cn/baoxiu/repair-h5/#/'
+			}
+		}
+	}
+</script>
+
+<style>
+	@import url("./css/myself.css");
+</style>

+ 258 - 0
pages/order_mark/css/order_mark.css

@@ -0,0 +1,258 @@
+.content {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	background-color: #F2F3F5;
+}
+/* 第一层模块 */
+.one-order3{
+	width: 750rpx;
+	height: 438rpx;
+	background: rgba(41, 109, 227, 1);
+}
+.room-button-6{
+	position: absolute;
+	margin-left: 159rpx;
+	margin-top: 250rpx;
+	width: 175rpx;
+	height: 82rpx;
+	border: 1px solid rgba(255, 255, 255, 1);
+	border-radius: 9px;
+	color: rgba(255, 255, 255, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+	text-align: center;
+	line-height: 82rpx;
+}
+.room-button2-6{
+	position: absolute;
+	margin-left: 410rpx;
+	margin-top: 250rpx;
+	width: 175rpx;
+	height: 82rpx;
+	border: 1px solid rgba(255, 255, 255, 1);
+	border-radius: 9px;
+	color: rgba(255, 255, 255, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+	text-align: center;
+	line-height: 82rpx;
+}
+.one-order{
+	width: 750rpx;
+	height: 646rpx;
+	background: rgba(41, 109, 227, 1);
+}
+.one-order-title{
+	position: absolute;
+	width: 720rpx;
+	margin-left: 30rpx;
+	margin-top: 34rpx;
+	color: rgba(255, 255, 255, 1);
+	font-size: 34rpx;
+	font-weight: 400;
+	line-height: 62rpx;
+}
+.all-price{
+	float: right;
+	margin-right: 29rpx;
+	font-size: 32rpx;
+}
+.one-order-menshi{
+	position: absolute;
+	width: 720rpx;
+	margin-left: 30rpx;
+	margin-top: 135rpx;
+	color: rgba(255, 255, 255, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+	line-height: 41rpx;
+}
+.menshi-price{
+	float: right;
+	margin-right: 28rpx;
+}
+.one-order-fuli{
+	position: absolute;
+	width: 720rpx;
+	margin-left: 30rpx;
+	margin-top: 196rpx;
+	color: rgba(255, 255, 255, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+	line-height: 41rpx;
+}
+.fuli-price{
+	float: right;
+	margin-right: 28rpx;
+}
+.one-order-yufukuan{
+	position: absolute;
+	width: 720rpx;
+	margin-left: 30rpx;
+	margin-top: 257rpx;
+	color: rgba(255, 255, 255, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+	line-height: 41rpx;
+}
+.yufukuan-price{
+	float: right;
+	margin-right: 28rpx;
+}
+.one-order-zhu{
+	position: absolute;
+	margin-left: 32rpx;
+	margin-right: 29rpx;
+	margin-top: 341rpx;
+	color: rgba(255, 255, 255, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.room-button{
+	position: absolute;
+	margin-left: 164rpx;
+	margin-top: 491rpx;
+	width: 175rpx;
+	height: 82rpx;
+	border: 1px solid rgba(255, 255, 255, 1);
+	border-radius: 9px;
+	color: rgba(255, 255, 255, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+	text-align: center;
+	line-height: 82rpx;
+}
+.room-button2{
+	position: absolute;
+	margin-left: 415rpx;
+	margin-top: 491rpx;
+	width: 175rpx;
+	height: 82rpx;
+	border: 1px solid rgba(255, 255, 255, 1);
+	border-radius: 9px;
+	color: rgba(255, 255, 255, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+	text-align: center;
+	line-height: 82rpx;
+}
+.buttonNo{
+	margin-left: 285rpx;
+}
+/* 第二层模块 */
+.two-order{
+	margin-top: -30rpx;
+	width: 690rpx;
+	height: 459rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 7px;
+	color: rgba(166, 166, 166, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+}
+.two-order3{
+	margin-top: -30rpx;
+	width: 690rpx;
+	height: 618rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 7px;
+	color: rgba(166, 166, 166, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+}
+.two-order4{
+	margin-top: -30rpx;
+	width: 690rpx;
+	height: 673rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 7px;
+	color: rgba(166, 166, 166, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+}
+.two-order-title{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 30rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 32rpx;
+	font-weight: 400;
+}
+.two-order-name{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 101rpx;
+}
+.two-order-phone{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 156rpx;
+}
+.two-order-count{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 211rpx;
+}
+.two-order-time{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 266rpx;
+}
+.two-order-xing{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 321rpx;
+}
+.two-order-zhuTime{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 376rpx;
+}
+.two-order-txt{
+	color: rgba(102, 102, 102, 1);
+}
+.two-order-shui{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 431rpx;
+}
+.two-order-dian{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 486rpx;
+}
+.two-order-secret{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 541rpx;
+}
+.two-order-shui2{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 541rpx;
+}
+.two-order-dian2{
+	position: absolute;
+	margin-left: 30rpx;
+	margin-top: 596rpx;
+}
+.order-mark{
+	margin-top: 174rpx;
+	text-align: center;
+	color: rgba(204, 204, 204, 1);
+	font-size: 20rpx;
+	font-weight: 400;
+}
+/* 弹出框 */
+.kuang_txt{
+	align-items: center;
+	justify-content: center;
+	padding: 15rpx;
+	height: 150rpx;
+	/* width: 180rpx; */
+	line-height: 150rpx;
+	text-align: center;
+	background-color: #fff;
+}

+ 316 - 0
pages/order_mark/order_mark.vue

@@ -0,0 +1,316 @@
+<template>
+	<view class="content">
+		<!-- 第一层模块 -->
+		<view class="one-order3" v-if="orderList.orderStatu == 5">
+			<view class="one-order-title">订单已完成 / 期待您再次光临<text class="all-price">¥{{orderList.shouldFree}}</text></view>
+			<view class="one-order-menshi">水电扣除<text class="menshi-price">¥{{orderList.totalFree}}</text></view>
+			<view class="room-button-6"@click="getOrderDelete(orderList.orderId)">
+				<text>删除订单</text>
+			</view>
+			<view class="room-button2-6" @click="navigateToWanchengZaici(orderList.roomTypeId)">
+				<text>再次预定</text>
+			</view>
+		</view>
+		<view class="one-order3" v-else-if="orderList.orderStatu == 4">
+			<view class="one-order-title">待结账</view>
+			<view class="one-order-menshi" v-if="billXin.flag==1">
+				预退款<text class="menshi-price">¥{{billXin.refundFee}}</text>
+			</view>
+			<view class="one-order-menshi" v-if="billXin.flag==2">
+				预补缴<text class="menshi-price">¥{{billXin.supperFee}}</text>
+			</view>
+			<view class="room-button-6">
+				<text>删除订单</text>
+			</view>
+			<view class="room-button2-6" v-if="billXin.flag==1">
+				<text>退款</text>
+			</view>
+			<view class="room-button2-6" v-if="billXin.flag==2">
+				<text>补缴</text>
+			</view>
+		</view>
+		<view class="one-order" v-else>
+			<view class="one-order-title">
+				<text v-if="orderList.orderStatu == 0">订单已取消 / 期待您再次光临</text>
+				<text v-if="orderList.orderStatu == 1">请在10分钟之内支付</text>
+				<text v-if="orderList.orderStatu == 2">预定成功 / 等待您的入住</text>
+				<text v-if="orderList.orderStatu == 3">办理成功 / 期待您的到来</text>
+				<text class="all-price">¥{{orderList.payAmount}}</text>
+			</view>
+			<view class="one-order-menshi">门市价<text class="menshi-price">¥{{orderList.roomTypeUsualPrice}}</text></view>
+			<view class="one-order-fuli">教师福利<text class="fuli-price">¥{{orderList.roomTypeDiscountPrice}}</text></view>
+			<view class="one-order-yufukuan">
+				预付款<text class="yufukuan-price">¥{{orderList.payAmount}}</text>
+			</view>
+			<!-- <view class="one-order-zhu">
+				注:水费为0.62元/吨,电费为1.1元/度;补助吨数为3吨,补助度
+				数为10度,超出标准需在预付款中扣除,未超出原路返回预
+				付款
+			</view> -->
+			<view class="room-button" v-if="orderList.orderStatu != 2&& orderList.orderStatu != 3">
+				<text v-if="orderList.orderStatu == 0" @click="navigateToZaici(orderList.enableStartTime,orderList.enableEndTime,orderList.roomTypeId)">再次预定</text>
+				<text v-if="orderList.orderStatu == 1" @click="openQu()(orderList.orderId,'warn')">取消订单</text>
+				<!-- <text v-if="orderList.orderStatu == 3">办理续住</text> -->
+			</view>
+			<view class="room-button2" :class="{'buttonNo': orderList.orderStatu == 3 || orderList.orderStatu == 2}">
+				<text v-if="orderList.orderStatu == 0" @click="openDel(orderList.orderId,'warn')">删除</text>
+				<text v-if="orderList.orderStatu == 1" @click="getOrderPay(orderList.orderId)">支付</text>
+				<text v-if="orderList.orderStatu == 3" @click="openTui(orderList.orderId,'warn')">办理退房</text>
+				<text v-if="orderList.orderStatu == 2" @click="openRu(orderList.orderId,'warn')">办理入住</text>
+			</view>
+		</view>
+		<!-- 第二层模块 -->
+		<view class="two-order" :class="{'two-order3': orderList.orderStatu == 3,'two-order4': orderList.orderStatu == 5||orderList.orderStatu == 4}">
+			<view class="two-order-title">订单信息</view>
+			<view class="two-order-name">预定信息:<text class="two-order-txt">{{orderList.userName}}</text></view>
+			<view class="two-order-phone">手机号码:<text class="two-order-txt">{{orderList.userPhone}}</text></view>
+			<view class="two-order-count">订  单  号:<text class="two-order-txt">{{orderList.orderId}}</text></view>
+			<view class="two-order-time">下单时间:<text class="two-order-txt">{{orderList.createTime}}</text></view>
+			<view class="two-order-xing">户         型:<text class="two-order-txt">{{orderList.roomNo}}</text></view>
+			<view class="two-order-zhuTime">入离时间:<text class="two-order-txt" v-if="orderList.enableStartTime,orderList.enableEndTime">入住日{{orderList.enableStartTime.substring(11,16)}}后   离店日{{orderList.enableEndTime.substring(11,16)}}前</text></view>
+			<view class="two-order-secret" v-if="orderList.orderStatu ==3">房间门锁密码:{{orderList.lockRealtimePassword}}</view>
+			<view class="two-order-shui" v-if="orderList.orderStatu == 5||orderList.orderStatu ==4||orderList.orderStatu ==3">水起码:{{orderList.startOfWater}}吨</view>
+			<view class="two-order-dian" v-if="orderList.orderStatu == 5||orderList.orderStatu ==4||orderList.orderStatu ==3">电起码:{{orderList.startOfElectric}}度</view>
+			<view class="two-order-shui2" v-if="orderList.orderStatu == 5||orderList.orderStatu == 4">水起码:{{orderList.startOfWater}}吨</view>
+			<view class="two-order-dian2" v-if="orderList.orderStatu == 5||orderList.orderStatu == 4">电起码:{{orderList.startOfElectric}}度</view>
+		</view>
+		
+		<view class="order-mark">您的满意是我们最大的追求</view>
+		<!-- 提示时弹框 -->
+		<uni-popup ref="popup_order2" type="dialog">
+			<uni-popup-dialog :type="msgType2" cancelText="关闭" confirmText="确定" :content='order_txt2' @confirm="dialogConfirm"
+				@close="dialogClose"></uni-popup-dialog>
+		</uni-popup>
+		<uni-popup ref="popup_order" type="dialog">
+			<uni-popup-dialog :type="msgType" cancelText="关闭" :content='order_txt'></uni-popup-dialog>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	export default {
+		data(){
+			return {
+				orderList:'',//订单整体
+				orderId:'',//订单号
+				billXin:'',//结账信息
+				order_txt:'',//弹框提示信息
+				msgType:'warn',
+				msgType2:'warn',
+				order_txt:'',//
+				order_txt2:'',//
+				tankuang:false,//弹框是否确定
+				order_txt_id:'',
+			}
+		},
+		onShow() {
+			// 获取当前小程序的页面栈
+			let pages = getCurrentPages();
+			// 数组中索引最大的页面--当前页面
+			let currentPage = pages[pages.length-1];
+			// 打印出当前页面中的 options
+			this.orderId=currentPage.options.orderId
+			this.getOrderInfo(this.orderId)
+			this.getOrderBill(this.orderId)
+		},
+		onload(option){
+			console.log('不能执行onload')
+		},
+		methods:{
+			//获取每个订单详情
+			getOrderInfo() {
+				  let _self = this
+				  _self.orderList = []
+				  this.$axios.get(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/${this.orderId}`,
+				  {
+					  headers:{
+					  		'user_token':localStorage.getItem('token')
+					  }
+				  }
+				  ).then(res => {
+					res = res.data
+					if (res.success) {
+						console.log(res)
+						this.orderList=res.data
+					} else {
+					  console.log('获取订单列表失败')
+					}
+				  });
+			},
+			//待确认的弹框操作
+			dialogConfirm() {
+				this.$refs.popup_order2.close()
+				this.tankuang=true
+				if(this.tankuang==true) {
+					if(this.order_txt2=='确定删除?') {
+						this.getOrderDelete(this.order_txt_id)
+					} else if(this.order_txt2=='确定退房?') {
+						this.getOrderReturn(this.order_txt_id)
+					} else if(this.order_txt2=='确定入住?') {
+						this.getOrderHold(this.order_txt_id)
+					} else if(this.order_txt2=='确定取消订单?') {
+						this.getOrderCancel(this.order_txt_id)
+					}
+				} 
+			},
+			dialogClose(){
+				this.$refs.popup_order2.close()
+			},
+			//删除弹框
+			openDel(orderId,type){
+				this.order_txt_id=orderId
+				this.msgType2 = type
+				this.order_txt2='确定删除?'
+				this.$refs.popup_order2.open()
+			},
+			//退房弹框
+			openTui(orderId,type) {
+				this.order_txt_id=orderId
+				this.msgType2 = type
+				this.order_txt2='确定退房?'
+				this.$refs.popup_order2.open()
+			},
+			//入住弹框
+			openRu(orderId,type) {
+				this.order_txt_id=orderId
+				this.msgType2 = type
+				this.order_txt2='确定入住?'
+				this.$refs.popup_order2.open()
+			},
+			//取消订单弹框
+			openQu(orderId,type) {
+				this.order_txt_id=orderId
+				this.msgType2 = type
+				this.order_txt2='确定取消订单?'
+				this.$refs.popup_order2.open()
+			},
+			// 订单结账信息
+			getOrderBill() {
+				  let _self = this
+				  this.$axios.get(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/bill/${this.orderId}`,
+				  {
+					  headers:{
+						  'user_token':localStorage.getItem('token')
+					  }
+				  }).then(res => {
+					res = res.data
+					if (res.success) {
+						// console.log(res)
+						if(res.data.flag!='3') {
+							this.billXin=res.data
+						}
+						
+					} else {
+					  console.log('获取结账信息失败')
+					}
+				  });
+			},
+			// 订单取消再次预订
+			navigateToZaici(enableStartTime,enableEndTime,roomTypeId){
+				uni.navigateTo({
+					url:"../order_room/order_room?enableStartTime="+enableStartTime+"&enableEndTime="+enableEndTime+"&startTime="+enableStartTime.substring(5,7)+'月'+enableStartTime.substring(8,10)+'日'+"&endTime="+enableEndTime.substring(5,7)+'月'+enableEndTime.substring(8,10)+'日'+"&roomTypeId="+roomTypeId
+				})
+			},
+			// 待支付取消订单
+			getOrderCancel(order_txt_id) {
+				let _self = this
+				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
+				this.$axios.put(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/cancel/${this.order_txt_id}`,).then(res => {
+					res = res.data
+					if (res.success) {
+						this.order_txt='取消成功'
+						this.$refs.popup_order.open()
+						this.getOrderInfo()
+					} else {
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+					}
+				});
+			},
+			// 支付订单
+			getOrderPay(orderId) {
+				  let _self = this
+				  this.$axios.get(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/pay/${orderId}`,
+				  {
+					  headers:{
+						  'user_token':localStorage.getItem('token')
+					  }
+				  }).then(res => {
+					res = res.data
+					if (res.success) {
+						if(res.data.payAmount==0) {
+							uni.navigateTo({
+								url: '../zhifuchenggong/zhifuchenggong?orderId='+res.data.orderId
+							})
+						} else {
+							window.location.href = res.data.payUrl;
+						}
+					} else {
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+						console.log('支付失败')
+					}
+				  });
+			},
+			// 删除订单
+			getOrderDelete(order_txt_id) {
+				let _self = this
+				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
+				this.$axios.delete(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/${this.order_txt_id}`,).then(res => {
+					res = res.data
+					if (res.success) {
+						this.order_txt='删除订单成功'
+						this.$refs.popup_order.open()
+						this.getOrderInfo()
+					} else {
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+					}
+				});
+			},
+			// 订单已完成再次预订
+			navigateToWanchengZaici(roomTypeId){
+				uni.navigateTo({
+					url:'../order_room/order_room?roomTypeId='+roomTypeId
+				})
+			},
+			// 办理入住
+			getOrderHold(order_txt_id) {
+				let _self = this
+				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
+				this.$axios.put(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/hold/${this.order_txt_id}`,).then(res => {
+					res = res.data
+					if (res.success) {
+						this.order_txt='办理入住成功'
+						this.$refs.popup_order.open()
+						this.getOrderInfo()
+					} else {
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+					}
+				});
+			},
+			// 办理退房
+			getOrderReturn(order_txt_id) {
+				let _self = this
+				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
+				this.$axios.put(`/hotel/ihotel-api/ihotel/hotelOrder/user/order/return/${this.order_txt_id}`,).then(res => {
+					res = res.data
+					if (res.success) {
+						this.order_txt='退房成功'
+						this.$refs.popup_order.open()
+						this.getOrderInfo()
+						this.getOrderBill()
+					} else {
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+					}
+				});
+			},
+		}
+	}
+</script>
+
+<style>
+	@import url("./css/order_mark.css");
+</style>

+ 305 - 0
pages/order_room/css/order_room.css

@@ -0,0 +1,305 @@
+.content {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	background-color: #F2F3F5;
+}
+/* 背景图 */
+.index_bg {
+	width: 750rpx;
+	height: 320rpx;
+	margin: 0 auto;
+	background-image: url(../../static/order_room/order_bg.jpg);
+	background-size: 100% 100%;
+	background-attachment: inherit;
+	background-repeat: no-repeat;
+	margin-top: 0px;
+}
+/* 欢迎光临 */
+.welcome{
+	width: 163px;
+	height: 60px;
+	background: rgba(255, 255, 255, 0.4);
+	backdrop-filter: blur(5px);
+}
+.welcome_img{
+	position: absolute;
+	margin-left: 20px;
+	margin-top: 8px;
+	width: 125px;
+	height: 44px;
+}
+/* 第一层标题 */
+.touming_bg{
+	margin-top: -120rpx;
+	margin-bottom:0px;
+	width: 750rpx;
+	height: 115rpx;
+	background: rgba(255, 255, 255, 0.4);
+	backdrop-filter: blur(4rpx);
+}
+.touming_title{
+	margin-left: 20rpx;
+	margin-top: 13rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 34rpx;
+	font-weight: 600;
+	font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
+}
+.touming_txt{
+	margin-left: 20rpx;
+	margin-top: 5rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+/* 第二层表单 */
+.two_all{
+	margin-top: 0rpx;
+	width: 750rpx;
+	height: 655rpx;
+	background: rgba(255, 255, 255, 1);
+}
+/* 选择住房日期 */
+.select-time{
+	display: flex;
+	flex-direction: row;
+	justify-content: flex-start;
+	position: absolute;
+	width: 750rpx;
+	height: 144rpx;
+	margin: 0;
+	background: rgba(255, 255, 255, 1);
+}
+.select-time-one{
+	margin-top: 32rpx;
+	margin-left: 90rpx;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+}
+.select-list{
+	color: rgba(153, 153, 153, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.select-list-time{
+	color: rgba(0, 0, 0, 1);
+	font-size: 34rpx;
+	font-weight: 400;
+}
+.select-center{
+	width: 190rpx;
+	height: 120rpx;
+}
+.select-line1{
+	position: absolute;
+	margin-left: 37px;
+	margin-top: 46px;
+	width: 17rpx;
+	height: 1px;
+	background: rgba(41, 109, 227, 1);
+}
+.select-circle{
+	position: absolute;
+	width: 81rpx;
+	height: 46rpx;
+	margin-left: 46px;
+	margin-top: 34px;
+	background: rgba(240, 242, 245, 1);
+	border: 1px solid rgba(41, 109, 227, 1);
+	border-radius: 33rpx;
+	text-align: center;
+	color: rgba(0, 0, 0, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+.select-line2{
+	position: absolute;
+	margin-left: 91px;
+	margin-top: 46px;
+	width: 17rpx;
+	height: 1px;
+	background: rgba(41, 109, 227, 1);
+}
+.form_bg{
+	margin-left: 21rpx;
+	width: 709rpx;
+	height: 621rpx;
+	background: rgba(247, 249, 250, 1);
+	border-radius: 5rpx;
+}
+.form_title{
+	position: absolute;
+	margin-left: 29rpx;
+	margin-top: 166rpx;
+	color: rgba(128, 128, 128, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+}
+.form-name{
+	position: absolute;
+	margin-left: 29rpx;
+	margin-top: 238rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+}
+.form-line{
+	position: absolute;
+	margin-left: 29rpx;
+	margin-top: 301rpx;
+	width: 650rpx;
+	background: rgba(204, 204, 204, 1);
+	border: 1px solid rgba(230, 230, 230, 1);
+}
+.form-phone{
+	position: absolute;
+	margin-left: 29rpx;
+	margin-top: 326rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+}
+.uni-list-cell-db{
+	position: absolute;
+	width: 670rpx;
+	margin-left: 29rpx;
+	margin-top: 414rpx;
+	color: rgba(0, 0, 0, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+}
+.jiantou{
+	float: right;
+	margin-top: -44rpx;
+	width: 39rpx;
+	height: 39rpx;
+}
+.uni-textarea{
+	position: absolute;
+	margin-left: 29rpx;
+	margin-top: 502rpx;
+}
+.textsrea-txt{
+	position: absolute;
+	margin-left: 575rpx;
+	margin-top: 574rpx;
+}
+/* 第三层表单 */
+.three_all{
+	margin-top: 20rpx;
+	width: 750rpx;
+	height: 263rpx;
+	background: rgba(255, 255, 255, 1);
+}
+.three-title{
+	position: absolute;
+	margin-left: 20rpx;
+	margin-top: 30rpx;
+	color: rgba(51, 51, 51, 1);
+	font-size: 32rpx;
+	font-weight: 400;
+}
+.three-mark{
+	position: absolute;
+	margin-left: 20rpx;
+	margin-top: 83rpx;
+	color: rgba(102, 102, 102, 1);
+	font-size: 28rpx;
+	font-weight: 400;
+}
+.three-zhu{
+	position: absolute;
+	margin-left: 20rpx;
+	margin-top: 152rpx;
+	width: 700rpx;
+	color: rgba(153, 153, 153, 1);
+	font-size: 24rpx;
+	font-weight: 400;
+}
+/* 注释 */
+.zhushi{
+	display: flex;
+	margin-top: 50rpx;
+	color: rgba(153, 153, 153, 1);
+	font-size: 20rpx;
+	font-weight: 400;
+	text-align: center;
+}
+.zhushi-mark{
+	margin-left: 20rpx;
+}
+.zhushi-circle{
+	margin-left: 30rpx;
+	position: absolute;
+	width: 8rpx;
+	height: 8rpx;
+	border-radius: 50px;
+	background: rgba(153, 153, 153, 1);
+}
+/* 支付框 */
+.fukuan{
+	display: flex;
+	margin-top: 38rpx;
+	width: 750rpx;
+	height: 100rpx;
+	background: rgba(255, 255, 255, 1);
+	box-shadow: 0rpx -4rpx 10rpx rgba(0, 0, 0, 0.15);
+}
+.fu-price{
+	width: 463rpx;
+	color: rgba(255, 87, 51, 1);
+	font-size: 44rpx;
+	font-weight: 500;
+	text-align: center;
+	line-height: 100rpx;
+}
+.fu-zhifu{
+	float: right;
+	width: 287rpx;
+	height: 100rpx;
+	background: rgba(41, 109, 227, 1);
+	color: rgba(255, 255, 255, 1);
+	font-size: 40rpx;
+	font-weight: 400;
+	text-align: center;
+	line-height: 100rpx;
+}
+.room-button2{
+	float: right;
+	width: 287rpx;
+	height: 100rpx;
+	background: rgba(128, 127, 131, 0.5);
+	color: rgba(255, 255, 255, 1);
+	font-size: 40rpx;
+	font-weight: 400;
+	text-align: center;
+	line-height: 100rpx;
+}
+/* 日期选择器弹窗 */
+.popup_bg_picker{
+	width: 700rpx;
+	height: 800rpx;
+	background: rgba(255, 255, 255, 1);
+	border-radius: 6rpx;
+}
+/* uni-calendar选中背景色 */
+
+>>>.uni-calendar-item--isDay[data-v-6097fd5b] {
+    background-color: #fff;
+    opacity: 0.8;
+    color: #2979ff;
+}
+>>>.uni-calendar-item--before-checked[data-v-6097fd5b] {
+    background-color: #0055ff;
+    color: #fff;
+	opacity: 1;
+}
+
+>>>.uni-calendar-item--after-checked[data-v-6097fd5b] {
+    background-color: #0055ff;
+    color: #fff;
+	opacity: 1;
+}

+ 356 - 0
pages/order_room/order_room.vue

@@ -0,0 +1,356 @@
+<template>
+	<view class="content">
+		<!-- 背景图 -->
+		<view class="index_bg">
+			<view class="welcome"><image class="welcome_img" src="../../static/index/welcome.png"></image></view>
+		</view>
+		<!-- 第一层标题 -->
+		<view class="touming_bg">
+			<view class="touming_title">墨轩湖姬子公寓(南昌交通学院)</view>
+			<view class="touming_txt">尊敬的老师,您辛苦了,欢迎入住!</view>
+		</view>
+		<!-- 第二层表单 -->
+		<view class="two_all">
+			<view class="select-time" @click="openCalendar">
+				<view class="select-time-one">
+				  <text class="select-list">{{startWeek}}入住</text>
+				  <text class="select-list-time">{{startTime}}</text>
+				</view>
+				<view class="select-center">
+					<view class="select-line1"></view>
+					<view class="select-circle">{{ruzhu_num}}晚</view>
+					<view class="select-line2"></view>
+				</view>
+				<view class="select-time-one">
+				  <text class="select-list">{{endWeek}}离店</text>
+				  <text class="select-list-time">{{endTime}}</text>
+				</view>
+			</view>
+			<uni-popup ref="popup_picker" :mask-click="true">
+				<view class=popup_bg_picker>
+				<uni-calendar :selected="info.selected" class="uni-calendar--hook" :clear-date="true" :date="info.date" :insert="info.insert" :lunar="info.lunar" :startDate="info.startDate"
+				:endDate="info.endDate" :range="info.range" @change="change"/>
+				</view>
+			</uni-popup>
+			<view class="form_bg">
+				<view class="form_title">{{typeName}}</view>
+				<!-- 自定义表单 -->
+				<view class="form-name">{{cardName}}</view>
+				<view class="form-line"></view>
+				<view class="form-phone">{{cardPhone}}</view>
+				<view class="form-line" style="margin-top: 389rpx;"></view>
+				<view class="uni-list-cell-db">
+					<picker @change="bindPickerChange" :value="index" :range="array">
+						<view class="uni-input">{{array[index]}}</view>
+						<text class="jiantou">〉</text>
+					</picker>
+				</view>
+				<view class="form-line" style="margin-top: 477rpx;"></view>
+				<view class="uni-textarea">
+					<textarea @blur="bindTextAreaBlur" placeholder="在此填写您的要求" maxlength="50" auto-height />
+				</view>
+				<text class="textsrea-txt">{{textNum}}/50</text>
+			</view>
+		</view>
+		<!-- 第三层表单 -->
+		<view class="three_all">
+			<view class="three-title">
+				您是【
+				<text v-if="cardIdentity==4">教师</text>
+				<text v-if="cardIdentity==0">其他</text>
+				<text v-if="cardIdentity==1">学生</text>
+				<text v-if="cardIdentity==5">校友</text>
+				】
+			</view>
+			<view class="three-mark">本人可以免费入住,需要预交费<text style="color: rgba(255, 87, 51, 1);">{{payMount}}</text>元,即可享受权益</view>
+			<!-- <view class="three-zhu">注:水费为0.62元/吨,电费为1.1元/度;补助吨数为3吨,补助度数
+         为10度,超出标准需在预付款中扣除,未超出原路返回预付款</view> -->
+		</view>
+		<!-- 注释 -->
+		<view class="zhushi">
+			<text class="zhushi-mark"><text class="zhushi-circle"></text>低价保证</text> 
+			<text class="zhushi-mark"><text class="zhushi-circle"></text>入住免房费</text> 
+			<text class="zhushi-mark"><text class="zhushi-circle"></text>提前选好房</text>
+		</view>
+		<!-- 支付框 -->
+		<view class="fukuan">
+			<view class="fu-price"><text style="font-size: 28rpx;">总计:</text>¥{{payMount}}</view>
+			<view class="fu-zhifu" :class="{'room-button2': freeRoom == 0}">
+				<text v-if="freeRoom==0">房间已满</text>
+				<text v-else @click="getOrderSubmit('warn')">立即支付</text>
+			</view>
+		</view>
+		<!-- 提交订单时弹框 -->
+		<uni-popup ref="popup_order" type="dialog">
+			<uni-popup-dialog :type="msgType" cancelText="关闭" confirmText="确定" :content="order_txt" @confirm="dialogConfirm"
+				@close="dialogClose"></uni-popup-dialog>
+		</uni-popup>
+		
+	</view>
+</template>
+
+<script>
+	/**
+	 * 获取任意时间
+	 */
+	function getDate(date, AddDayCount = 0) {
+		if (!date) {
+			date = new Date()
+		}
+		if (typeof date !== 'object') {
+			date = date.replace(/-/g, '/')
+		}
+		const dd = new Date(date)
+	
+		dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
+	
+		var a = new Array("日", "一", "二", "三", "四", "五", "六");  
+		var week = new Date().getDay();    
+		var week2 = new Date().getDay()+1;    
+		const y = dd.getFullYear()
+		const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
+		const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
+		const h = dd.getHours() < 10 ? '0' + dd.getHours() : dd.getHours()
+		const f = dd.getMinutes() < 10 ? '0' + dd.getMinutes() : dd.getMinutes()
+		const s = dd.getSeconds() < 10 ? '0' + dd.getSeconds() : dd.getSeconds()
+		return {
+			fullDate: y + '-' + m + '-' + d,
+			fullDate2: y + '-' + m + '-' + d+' '+h+':'+f+':'+s,
+			fullTime: m + '月' + d + '日',
+			year: y,
+			month: m,
+			date: d,
+			day: dd.getDay(),
+			sWeek:"周"+ a[week],
+			eWeek:"周"+ a[week2]
+		}
+	}
+	export default {
+		data() {
+			return {
+				showCalendar: false,
+				info: {
+					lunar: true,
+					range: true,
+					insert: true,
+					selected: [],
+					startDate:'',
+					date:'',
+					endDate:''
+				},
+				startTime:'',//到店日期
+				endTime:'',//离店日期
+				startDate:'',//默认到店日期接口数据
+				endDate:'',//默认离店日期接口数据
+				startWeek:'',// 默认入店日
+				endWeek:'',// 默认离店
+				array: ['18:00前到店', '19:00前到店', '20:00前到店', '21:00前到店'],
+				index: 0,
+				mayTime:'',// 预计到店时间
+				typeName:'',//户型名
+				textNum:0,//输入框当前字数
+				cardName:'',//用户名
+				cardPhone:'',//用户电话
+				cardIdentity:'',//身份
+				submitToken:'',//请求令牌
+				roomTypeId:'',//房间类型id
+				remark:'',//备注要求
+				payMount:0,//应付金额
+				freeRoom:0,//剩余房间
+				ruzhu_num:1,//入住夜晚
+				order_txt:'',//提交订单时信息
+				msgType:'warn',
+			}
+		},
+		onLoad(option) {
+			console.log(option)
+			// this.payMount=Number(option.payMount)
+			// this.ruzhu_num=option.ruzhu_num
+			// this.freeRoom=option.freeRoom
+			this.roomTypeId=option.roomTypeId
+			this.typeName=option.typeName
+			this.startTime=option.startTime
+			this.endTime=option.endTime
+			this.startDate=option.enableStartTime.substring(0,11)+"12:00:00"
+			this.endDate=option.enableEndTime.substring(0,11)+"14:00:00"
+			this.startWeek=this.getweekday(this.startDate)
+			this.endWeek=this.getweekday(this.endDate)
+			this.mayTime=this.startDate.substring(0,11)+"18:00:00"
+			// console.log(this.getweekday(this.startDate))
+			this.getTokenSubmit()
+		},
+		mounted() {
+			this.getUserInfo()
+			this.getOrderConfirm('warn')
+		},
+		onReady() {
+			this.$nextTick(() => {
+				this.showCalendar = true
+			})
+			// TODO 模拟请求异步同步数据
+			setTimeout(() => {
+				this.info.date = getDate(new Date()).fullDate
+				this.info.startDate = getDate(new Date()).fullDate
+				this.info.endDate =  getDate(new Date(),6).fullDate
+				this.startTime = getDate(new Date()).fullTime
+				this.endTime = getDate(new Date(),1).fullTime
+				this.startWeek = getDate(new Date()).sWeek
+				this.endWeek = getDate(new Date(),1).eWeek
+				this.ruzhu_num=1
+			}, 20)
+		},
+		methods: {
+			// 获取请求令牌
+			getTokenSubmit() {
+				  let _self = this
+				  this.$axios.get("/hotel/ihotel-api/ihotel/hotelOrder/user/submit/token",
+				  {
+					  headers:{
+						  'user_token':localStorage.getItem('token')
+					  }
+				  }).then(res => {
+					res = res.data
+					if (res.success) {
+						this.submitToken=res.data.submitToken
+					} else {
+					  console.log('获取请求令牌失败')
+					}
+				  });
+			},
+			// 获取用户信息
+			getUserInfo() {
+				  let _self = this
+				  this.$axios.get("/hotel/ihotel-api/ihotel/hotelUser/userInfo",
+				  {
+					  headers:{
+						  'user_token':localStorage.getItem('token')
+					  }
+				  }).then(res => {
+					res = res.data
+					if (res.success) {
+						if (res.data.statu == '1') {
+						  _self.cardName=res.data.name
+						  _self.cardPhone=res.data.telPhone
+						  _self.cardIdentity=res.data.identityType
+						}else {
+							alert('您没有权限,请联系客服')
+						}
+					} else {
+					  console.log('获取用户信息失败')
+					}
+				  });
+			},
+			// 确认订单
+			getOrderConfirm(type) {
+				let _self = this
+				this.$axios.get("/hotel/ihotel-api/ihotel/hotelOrder/user/order/confirm?startTime="+this.startDate.substring(0,10)+"&endTime="+this.endDate.substring(0,10)+'&roomTypeId='+this.roomTypeId).then(res => {
+					res = res.data
+					if (res.success) {
+					  this.payMount=res.data.totalAmount
+					  this.freeRoom=res.data.freeNum
+					  this.ruzhu_num=res.data.nums
+					} else {
+						this.msgType = type
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+					}
+				});
+			},
+			// 提交订单
+			getOrderSubmit(type) {
+				this.payUrl=''
+				let _self = this
+				this.$axios.defaults.headers.common['user_token'] = localStorage.getItem('token');
+				this.$axios.defaults.headers.common['request_token'] = this.submitToken;
+				this.$axios.defaults.headers.common['Content-Type'] ='application/json'
+				this.$axios.post("/hotel/ihotel-api/ihotel/hotelOrder/user/order/submit",
+				{
+					"enableStartTime":this.startDate,//入住时间
+					"enableEndTime":this.endDate,//离店时间
+					"roomTypeId":this.roomTypeId,//房间类型id
+					"payAmount":this.payMount,//需支付金额
+					"userName":this.cardName,
+					"userPhone":this.cardPhone,
+					"mayIntoTime":this.mayTime,
+					"remark":this.remark,
+				}
+				).then(res => {
+					res = res.data
+					if (res.success) {
+						if(res.data.payAmount==0) {
+							uni.navigateTo({
+								url:'../zhifuchenggong/zhifuchenggong?orderId='+res.data.orderId
+							})
+						} else {
+							window.location.href = res.data.payUrl;
+						}
+						
+					} else {
+						this.msgType = type
+						this.order_txt=res.message
+						this.$refs.popup_order.open()
+					}
+				});
+			},
+			// 计算指定时间是周几
+			getweekday(date){
+			   // date例如:'2022-03-05'
+				var weekArray = new Array("周日","周一", "周二", "周三", "周四", "周五", "周六")
+				var weeka  = weekArray[new Date(date).getDay()]
+				return weeka
+			},
+			//日历选择器
+			openCalendar() {
+				this.$refs.popup_picker.open()
+			},
+			change(e) {
+				console.log('1change 返回:', e)
+				// 模拟动态打卡
+				// if (this.info.selected.length > 5) return
+				this.info.selected=[
+					{
+						date: e.range.before,
+						info: '到店'
+					},
+					{
+						date: e.range.after,
+						info: '离店'
+					}
+				]
+				if(e.range.before!=''&&e.range.after=='') {
+					this.startWeek='周'+e.lunar.ncWeek.substring(2,3)
+				} else if(e.range.before!=''&&e.range.after!=''){
+					if((new Date(e.range.after).getTime())<(new Date(e.range.before).getTime())) {
+						this.order_txt='离店日期不能小于到店日期'
+						this.$refs.popup_order.open()
+					}else{
+						this.endWeek='周'+e.lunar.ncWeek.substring(2,3)
+						this.startTime=e.range.before.substring(5,7)+'月'+e.range.before.substring(8,10)+'日'
+						this.endTime=e.range.after.substring(5,7)+'月'+e.range.after.substring(8,10)+'日'
+						this.startDate = e.range.before +' 14:00:00'
+						this.endDate =  e.range.after +' 12:00:00'
+						this.ruzhu_num=parseInt(((new Date(e.range.after).getTime())-(new Date(e.range.before).getTime()))/1000/60/60/24)
+					}
+				}
+			},
+			//选择器
+			bindPickerChange: function(e) {
+				console.log('picker发送选择改变,携带值为', e.detail.value)
+				this.index = e.detail.value
+				this.mayTime = this.startDate.substring(0,11)+this.array[this.index].substring(0,5)+":00"
+				// console.log(this.mayTime)
+			},
+			// 输入框
+			bindTextAreaBlur: function (e) {
+				// console.log(e.detail.cursor)
+				// console.log(e.detail.value)
+				this.textNum=e.detail.cursor
+				this.remark=e.detail.value
+			}
+		}
+	}
+</script>
+
+<style>
+	@import url("./css/order_room.css");
+</style>

+ 47 - 0
pages/ruzhuxuzhi/ruzhuxuzhi.vue

@@ -0,0 +1,47 @@
+<template>
+	<view class="content">
+		<view class="xuzhi">
+			<view style="margin-left: 50rpx;margin-top: 15rpx;margin-right: 15rpx;" v-for="(item,index) in xuzhiList" :key="index">•{{item.list}}</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				xuzhiList:[
+					{id:1,list:'酒店在14:00后办理入住;'},
+					{id:2,list:'我们从分享时机、分享形式、分享动机、分享场景4个维度来聊聊;'},
+					{id:3,list:'我们从分享时机、分享形式、分享动机、分享场景4个维度来聊聊,时机、分享形式、分享动机、分享场景4个维度来聊聊;'},
+				]
+			}
+		},
+		onLoad() {
+			
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+	.content {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		background-color: #F2F3F5;
+	}
+	.xuzhi{
+		display: revert;
+		margin-top: 20rpx;
+		width: 750rpx;
+		height: 1300rpx;
+		background: rgba(255, 255, 255, 1);
+		color: rgba(102, 102, 102, 1);
+		font-size: 28rpx;
+		font-weight: 400;
+	}
+</style>

+ 46 - 0
pages/zhifuchenggong/css/zhifuchenggong.css

@@ -0,0 +1,46 @@
+.content {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+	}
+	
+	.text-area {
+		display: flex;
+		justify-content: center;
+	}
+	.top-line{
+		margin-top: 0rpx;
+		margin-left: 0;
+		position: absolute;
+		width: 750rpx;
+		height: 1rpx;
+		background: #CCCCCC;
+	}
+	.item{
+		margin-top: 0rpx;
+		margin-left: 0;
+		width: 750rpx;
+		height: 1206rpx;
+	}
+	.success-img{
+		margin-left: 242rpx;
+		margin-top: 73rpx;
+		width: 261rpx;
+		height: 266rpx;
+	}
+	.success-text{
+		margin-left: 276rpx;
+		margin-top: 433rpx;
+		font-size: 49rpx;
+		font-family: Microsoft YaHei-3970(82674968);
+		font-weight: 400;
+		color: #333333;
+	}
+	.success button{
+		margin-left: 233rpx;
+		margin-top: 110rpx;
+		width: 280rpx;
+		height: 104rpx;
+		border-radius: 52rpx;
+	}

+ 38 - 0
pages/zhifuchenggong/zhifuchenggong.vue

@@ -0,0 +1,38 @@
+<template>
+	<view class="content">
+		<view class="text-area">
+			<text class="top-line"></text>
+				<view class="item">
+					<image src="../../static/success.png" class="success-img"></image>
+					<text class="success-text">支付成功</text>
+					<view class="success">
+						<button form-type="submit" type="primary" @click="success">我知道了</button>
+					</view>
+				</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				orderId:'',//订单id
+			}
+		},
+		onLoad(option) {
+			this.orderId=option.orderId
+		},
+		methods: {
+			success() {
+				uni.navigateTo({
+					url:'../order_mark/order_mark?orderId='+this.orderId
+				})
+			},
+		}
+	}
+</script>
+
+<style>
+	@import url("./css/zhifuchenggong.css");
+</style>

+ 20 - 0
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
static/customicons.ttf


BIN
static/gongyuxiangqing/sheshi_icon.png


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


BIN
static/index/index_bg.jpg


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


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


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


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


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


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


File diff suppressed because it is too large
+ 4 - 0
static/index/index_ruzhu.svg


File diff suppressed because it is too large
+ 7 - 0
static/index/index_tuifang.svg


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


File diff suppressed because it is too large
+ 4 - 0
static/index/index_xuzhu.svg


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


BIN
static/index/ruzhu.png


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


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


BIN
static/index/tuifang.png


BIN
static/index/welcome.png


BIN
static/index/xuzhi.png


File diff suppressed because it is too large
+ 4 - 0
static/index/xuzhi.svg


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


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


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


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


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


BIN
static/my/touxiang.png


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


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


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


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


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


BIN
static/order_room/order_bg.jpg


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


BIN
static/success.png


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


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


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


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


+ 1 - 0
uni.scss

@@ -0,0 +1 @@
+@import '@/uni_modules/uni-scss/variables.scss';

+ 29 - 0
uni_modules/uni-badge/changelog.md

@@ -0,0 +1,29 @@
+## 1.2.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-badge](https://uniapp.dcloud.io/component/uniui/uni-badge)
+## 1.1.7(2021-11-08)
+- 优化 升级ui
+- 修改 size 属性默认值调整为 small
+- 修改 type 属性,默认值调整为 error,info 替换 default
+## 1.1.6(2021-09-22)
+- 修复 在字节小程序上样式不生效的 bug
+## 1.1.5(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.4(2021-07-29)
+- 修复 去掉 nvue 不支持css 的 align-self 属性,nvue 下不暂支持 absolute 属性
+## 1.1.3(2021-06-24)
+- 优化 示例项目
+## 1.1.1(2021-05-12)
+- 新增 组件示例地址
+## 1.1.0(2021-05-12)
+- 新增 uni-badge 的 absolute 属性,支持定位
+- 新增 uni-badge 的 offset 属性,支持定位偏移
+- 新增 uni-badge 的 is-dot 属性,支持仅显示有一个小点
+- 新增 uni-badge 的 max-num 属性,支持自定义封顶的数字值,超过 99 显示99+
+- 优化 uni-badge 属性 custom-style, 支持以对象形式自定义样式
+## 1.0.7(2021-05-07)
+- 修复 uni-badge 在 App 端,数字小于10时不是圆形的bug
+- 修复 uni-badge 在父元素不是 flex 布局时,宽度缩小的bug
+- 新增 uni-badge 属性 custom-style, 支持自定义样式
+## 1.0.6(2021-02-04)
+- 调整为uni_modules目录规范

+ 268 - 0
uni_modules/uni-badge/components/uni-badge/uni-badge.vue

@@ -0,0 +1,268 @@
+<template>
+	<view class="uni-badge--x">
+		<slot />
+		<text v-if="text" :class="classNames" :style="[badgeWidth, positionStyle, customStyle, dotStyle]"
+			class="uni-badge" @click="onClick()">{{displayValue}}</text>
+	</view>
+</template>
+
+<script>
+	/**
+	 * Badge 数字角标
+	 * @description 数字角标一般和其它控件(列表、9宫格等)配合使用,用于进行数量提示,默认为实心灰色背景
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=21
+	 * @property {String} text 角标内容
+	 * @property {String} size = [normal|small] 角标内容
+	 * @property {String} type = [info|primary|success|warning|error] 颜色类型
+	 * 	@value info 灰色
+	 * 	@value primary 蓝色
+	 * 	@value success 绿色
+	 * 	@value warning 黄色
+	 * 	@value error 红色
+	 * @property {String} inverted = [true|false] 是否无需背景颜色
+	 * @property {Number} maxNum 展示封顶的数字值,超过 99 显示 99+
+	 * @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 开启绝对定位, 角标将定位到其包裹的标签的四角上		
+	 * 	@value rightTop 右上
+	 * 	@value rightBottom 右下
+	 * 	@value leftTop 左上
+	 * 	@value leftBottom 左下
+	 * @property {Array[number]} offset	距定位角中心点的偏移量,只有存在 absolute 属性时有效,例如:[-10, -10] 表示向外偏移 10px,[10, 10] 表示向 absolute 指定的内偏移 10px
+	 * @property {String} isDot = [true|false] 是否显示为一个小点
+	 * @event {Function} click 点击 Badge 触发事件
+	 * @example <uni-badge text="1"></uni-badge>
+	 */
+
+	export default {
+		name: 'UniBadge',
+		emits: ['click'],
+		props: {
+			type: {
+				type: String,
+				default: 'error'
+			},
+			inverted: {
+				type: Boolean,
+				default: false
+			},
+			isDot: {
+				type: Boolean,
+				default: false
+			},
+			maxNum: {
+				type: Number,
+				default: 99
+			},
+			absolute: {
+				type: String,
+				default: ''
+			},
+			offset: {
+				type: Array,
+				default () {
+					return [0, 0]
+				}
+			},
+			text: {
+				type: [String, Number],
+				default: ''
+			},
+			size: {
+				type: String,
+				default: 'small'
+			},
+			customStyle: {
+				type: Object,
+				default () {
+					return {}
+				}
+			}
+		},
+		data() {
+			return {};
+		},
+		computed: {
+			width() {
+				return String(this.text).length * 8 + 12
+			},
+			classNames() {
+				const {
+					inverted,
+					type,
+					size,
+					absolute
+				} = this
+				return [
+					inverted ? 'uni-badge--' + type + '-inverted' : '',
+					'uni-badge--' + type,
+					'uni-badge--' + size,
+					absolute ? 'uni-badge--absolute' : ''
+				].join(' ')
+			},
+			positionStyle() {
+				if (!this.absolute) return {}
+				let w = this.width / 2,
+					h = 10
+				if (this.isDot) {
+					w = 5
+					h = 5
+				}
+				const x = `${- w  + this.offset[0]}px`
+				const y = `${- h + this.offset[1]}px`
+
+				const whiteList = {
+					rightTop: {
+						right: x,
+						top: y
+					},
+					rightBottom: {
+						right: x,
+						bottom: y
+					},
+					leftBottom: {
+						left: x,
+						bottom: y
+					},
+					leftTop: {
+						left: x,
+						top: y
+					}
+				}
+				const match = whiteList[this.absolute]
+				return match ? match : whiteList['rightTop']
+			},
+			badgeWidth() {
+				return {
+					width: `${this.width}px`
+				}
+			},
+			dotStyle() {
+				if (!this.isDot) return {}
+				return {
+					width: '10px',
+					height: '10px',
+					borderRadius: '10px'
+				}
+			},
+			displayValue() {
+				const {
+					isDot,
+					text,
+					maxNum
+				} = this
+				return isDot ? '' : (Number(text) > maxNum ? `${maxNum}+` : text)
+			}
+		},
+		methods: {
+			onClick() {
+				this.$emit('click');
+			}
+		}
+	};
+</script>
+
+<style lang="scss" >
+	$uni-primary: #2979ff !default;
+	$uni-success: #4cd964 !default;
+	$uni-warning: #f0ad4e !default;
+	$uni-error: #dd524d !default;
+	$uni-info: #909399 !default;
+
+
+	$bage-size: 12px;
+	$bage-small: scale(0.8);
+
+	.uni-badge--x {
+		/* #ifdef APP-NVUE */
+		// align-self: flex-start;
+		/* #endif */
+		/* #ifndef APP-NVUE */
+		display: inline-block;
+		/* #endif */
+		position: relative;
+	}
+
+	.uni-badge--absolute {
+		position: absolute;
+	}
+
+	.uni-badge--small {
+		transform: $bage-small;
+		transform-origin: center center;
+	}
+
+	.uni-badge {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		overflow: hidden;
+		box-sizing: border-box;
+		/* #endif */
+		justify-content: center;
+		flex-direction: row;
+		height: 20px;
+		line-height: 18px;
+		color: #fff;
+		border-radius: 100px;
+		background-color: $uni-info;
+		background-color: transparent;
+		border: 1px solid #fff;
+		text-align: center;
+		font-family: 'Helvetica Neue', Helvetica, sans-serif;
+		font-size: $bage-size;
+		/* #ifdef H5 */
+		z-index: 999;
+		cursor: pointer;
+		/* #endif */
+
+		&--info {
+			color: #fff;
+			background-color: $uni-info;
+		}
+
+		&--primary {
+			background-color: $uni-primary;
+		}
+
+		&--success {
+			background-color: $uni-success;
+		}
+
+		&--warning {
+			background-color: $uni-warning;
+		}
+
+		&--error {
+			background-color: $uni-error;
+		}
+
+		&--inverted {
+			padding: 0 5px 0 0;
+			color: $uni-info;
+		}
+
+		&--info-inverted {
+			color: $uni-info;
+			background-color: transparent;
+		}
+
+		&--primary-inverted {
+			color: $uni-primary;
+			background-color: transparent;
+		}
+
+		&--success-inverted {
+			color: $uni-success;
+			background-color: transparent;
+		}
+
+		&--warning-inverted {
+			color: $uni-warning;
+			background-color: transparent;
+		}
+
+		&--error-inverted {
+			color: $uni-error;
+			background-color: transparent;
+		}
+
+	}
+</style>

+ 88 - 0
uni_modules/uni-badge/package.json

@@ -0,0 +1,88 @@
+{
+  "id": "uni-badge",
+  "displayName": "uni-badge 数字角标",
+  "version": "1.2.0",
+  "description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。",
+  "keywords": [
+    "",
+    "badge",
+    "uni-ui",
+    "uniui",
+    "数字角标",
+    "徽章"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": ["uni-scss"],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "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"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 10 - 0
uni_modules/uni-badge/readme.md

@@ -0,0 +1,10 @@
+## Badge 数字角标
+> **组件名:uni-badge**
+> 代码块: `uBadge`
+
+数字角标一般和其它控件(列表、9宫格等)配合使用,用于进行数量提示,默认为实心灰色背景,
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-badge)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 
+
+

+ 6 - 0
uni_modules/uni-breadcrumb/changelog.md

@@ -0,0 +1,6 @@
+## 0.1.2(2022-06-08)
+- 修复 微信小程序 separator 不显示问题
+## 0.1.1(2022-06-02)
+- 新增 支持 uni.scss 修改颜色
+## 0.1.0(2022-04-21)
+- 初始化

+ 121 - 0
uni_modules/uni-breadcrumb/components/uni-breadcrumb-item/uni-breadcrumb-item.vue

@@ -0,0 +1,121 @@
+<template>
+	<view class="uni-breadcrumb-item">
+		<view :class="{
+			'uni-breadcrumb-item--slot': true,
+			'uni-breadcrumb-item--slot-link': to && currentPage !== to
+			}" @click="navTo">
+			<slot />
+		</view>
+		<i v-if="separatorClass" class="uni-breadcrumb-item--separator" :class="separatorClass" />
+		<text v-else class="uni-breadcrumb-item--separator">{{ separator }}</text>
+	</view>
+</template>
+<script>
+	/**
+	 * BreadcrumbItem 面包屑导航子组件
+	 * @property {String/Object} to 路由跳转页面路径/对象
+	 * @property {Boolean} replace 在使用 to 进行路由跳转时,启用 replace 将不会向 history 添加新记录(仅 h5 支持)
+	 */
+	export default {
+		data() {
+			return {
+				currentPage: ""
+			}
+		},
+		options: {
+			virtualHost: true
+		},
+		props: {
+			to: {
+				type: String,
+				default: ''
+			},
+			replace:{
+				type: Boolean,
+				default: false
+			}
+		},
+		inject: {
+			uniBreadcrumb: {
+				from: "uniBreadcrumb",
+				default: null
+			}
+		},
+		created(){
+			const pages = getCurrentPages()
+			const page = pages[pages.length-1]
+
+			if(page){
+				this.currentPage = `/${page.route}`
+			}
+		},
+		computed: {
+			separator() {
+				return this.uniBreadcrumb.separator
+			},
+			separatorClass() {
+				return this.uniBreadcrumb.separatorClass
+			}
+		},
+		methods: {
+			navTo() {
+				const { to } = this
+
+				if (!to || this.currentPage === to){
+					return
+				}
+
+				if(this.replace){
+					uni.redirectTo({
+						url:to
+					})
+				}else{
+					uni.navigateTo({
+						url:to
+					})
+				}
+			}
+		}
+	}
+</script>
+<style lang="scss">
+	$uni-primary: #2979ff !default;
+	$uni-base-color: #6a6a6a !default;
+	$uni-main-color: #3a3a3a !default;
+	.uni-breadcrumb-item {
+		display: flex;
+		align-items: center;
+		white-space: nowrap;
+		font-size: 14px;
+
+		&--slot {
+			color: $uni-base-color;
+			padding: 0 10px;
+
+			&-link {
+				color: $uni-main-color;
+				font-weight: bold;
+				/* #ifndef APP-NVUE */
+				cursor: pointer;
+				/* #endif */
+
+				&:hover {
+					color: $uni-primary;
+				}
+			}
+		}
+
+		&--separator {
+			font-size: 12px;
+			color: $uni-base-color;
+		}
+
+		&:first-child &--slot {
+			padding-left: 0;
+		}
+		
+		&:last-child &--separator {
+			display: none;
+		}
+	}
+</style>

+ 41 - 0
uni_modules/uni-breadcrumb/components/uni-breadcrumb/uni-breadcrumb.vue

@@ -0,0 +1,41 @@
+<template>
+	<view class="uni-breadcrumb">
+		<slot />
+	</view>
+</template>
+<script>
+	/**
+	 * Breadcrumb 面包屑导航父组件
+	 * @description 显示当前页面的路径,快速返回之前的任意页面
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=xxx
+	 * @property {String} separator 分隔符,默认为斜杠'/'
+	 * @property {String} separatorClass 图标分隔符 class
+	 */
+	export default {
+		options: {
+			virtualHost: true
+		},
+		props: {
+			separator: {
+				type: String,
+				default: '/'
+			},
+			separatorClass: {
+				type: String,
+				default: ''
+			}
+		},
+
+		provide() {
+			return {
+				uniBreadcrumb: this
+			}
+		}
+
+	}
+</script>
+<style lang="scss">
+	.uni-breadcrumb {
+		display: flex;
+	}
+</style>

+ 88 - 0
uni_modules/uni-breadcrumb/package.json

@@ -0,0 +1,88 @@
+{
+  "id": "uni-breadcrumb",
+  "displayName": "uni-breadcrumb 面包屑",
+  "version": "0.1.2",
+  "description": "Breadcrumb  面包屑",
+  "keywords": [
+    "uni-breadcrumb",
+    "breadcrumb",
+    "uni-ui",
+    "面包屑导航",
+    "面包屑"
+],
+  "repository": "",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+        "前端组件",
+        "通用组件"
+    ],
+    "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": "n"
+        },
+        "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",
+          "阿里": "u",
+          "百度": "u",
+          "字节跳动": "u",
+        "QQ": "u",
+        "京东": "u"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        }
+      }
+    }
+  }
+}

+ 66 - 0
uni_modules/uni-breadcrumb/readme.md

@@ -0,0 +1,66 @@
+
+## breadcrumb 面包屑导航
+> **组件名:uni-breadcrumb**
+> 代码块: `ubreadcrumb`
+
+显示当前页面的路径,快速返回之前的任意页面。
+
+### 安装方式
+
+本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。
+
+如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
+
+### 基本用法
+
+在 ``template`` 中使用组件
+
+```html
+<uni-breadcrumb separator="/">
+	<uni-breadcrumb-item v-for="(route,index) in routes" :key="index" :to="route.to">{{route.name}}</uni-breadcrumb-item>
+</uni-breadcrumb>
+```
+
+```js
+export default {
+		name: "uni-stat-breadcrumb",
+		data() {
+			return {
+				routes: [{
+					to: '/A',
+					name: 'A页面'
+				}, {
+					to: '/B',
+					name: 'B页面'
+				}, {
+					to: '/C',
+					name: 'C页面'
+				}]
+			};
+		}
+	}
+```
+
+
+## API
+
+### Breadcrumb Props
+
+|属性名			|类型	|默认值	|说明				|
+|:-:			|:-:	|:-:	|:-:				|
+|separator		|String	|斜杠'/' |分隔符				|
+|separatorClass	|String	|		|图标分隔符 class	    |
+
+### Breadcrumb Item Props
+
+|属性名	|类型			|默认值	|说明																			|
+|:-:	|:-:			|:-:	|:-:																			|
+|to		|String     	|		|路由跳转页面路径           														|
+|replace|Boolean		|		|在使用 to 进行路由跳转时,启用 replace 将不会向 history 添加新记录(仅 h5 支持)         |
+
+
+
+
+## 组件示例
+
+点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/breadcrumb/breadcrumb](https://hellouniapp.dcloud.net.cn/pages/extUI/breadcrumb/breadcrumb)

+ 16 - 0
uni_modules/uni-calendar/changelog.md

@@ -0,0 +1,16 @@
+## 1.4.5(2022-02-25)
+- 修复 条件编译 nvue 不支持的 css 样式
+## 1.4.4(2022-02-25)
+- 修复 条件编译 nvue 不支持的 css 样式
+## 1.4.3(2021-09-22)
+- 修复 startDate、 endDate 属性失效的 bug
+## 1.4.2(2021-08-24)
+- 新增 支持国际化
+## 1.4.1(2021-08-05)
+- 修复 弹出层被 tabbar 遮盖 bug
+## 1.4.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.3.16(2021-05-12)
+- 新增 组件示例地址
+## 1.3.15(2021-02-04)
+- 调整为uni_modules目录规范 

+ 546 - 0
uni_modules/uni-calendar/components/uni-calendar/calendar.js

@@ -0,0 +1,546 @@
+/**
+* @1900-2100区间内的公历、农历互转
+* @charset UTF-8
+* @github  https://github.com/jjonline/calendar.js
+* @Author  Jea杨(JJonline@JJonline.Cn)
+* @Time    2014-7-21
+* @Time    2016-8-13 Fixed 2033hex、Attribution Annals
+* @Time    2016-9-25 Fixed lunar LeapMonth Param Bug
+* @Time    2017-7-24 Fixed use getTerm Func Param Error.use solar year,NOT lunar year
+* @Version 1.0.3
+* @公历转农历:calendar.solar2lunar(1987,11,01); //[you can ignore params of prefix 0]
+* @农历转公历:calendar.lunar2solar(1987,09,10); //[you can ignore params of prefix 0]
+*/
+/* eslint-disable */
+var calendar = {
+
+  /**
+      * 农历1900-2100的润大小信息表
+      * @Array Of Property
+      * @return Hex
+      */
+  lunarInfo: [0x04bd8, 0x04ae0, 0x0a570, 0x054d5, 0x0d260, 0x0d950, 0x16554, 0x056a0, 0x09ad0, 0x055d2, // 1900-1909
+    0x04ae0, 0x0a5b6, 0x0a4d0, 0x0d250, 0x1d255, 0x0b540, 0x0d6a0, 0x0ada2, 0x095b0, 0x14977, // 1910-1919
+    0x04970, 0x0a4b0, 0x0b4b5, 0x06a50, 0x06d40, 0x1ab54, 0x02b60, 0x09570, 0x052f2, 0x04970, // 1920-1929
+    0x06566, 0x0d4a0, 0x0ea50, 0x06e95, 0x05ad0, 0x02b60, 0x186e3, 0x092e0, 0x1c8d7, 0x0c950, // 1930-1939
+    0x0d4a0, 0x1d8a6, 0x0b550, 0x056a0, 0x1a5b4, 0x025d0, 0x092d0, 0x0d2b2, 0x0a950, 0x0b557, // 1940-1949
+    0x06ca0, 0x0b550, 0x15355, 0x04da0, 0x0a5b0, 0x14573, 0x052b0, 0x0a9a8, 0x0e950, 0x06aa0, // 1950-1959
+    0x0aea6, 0x0ab50, 0x04b60, 0x0aae4, 0x0a570, 0x05260, 0x0f263, 0x0d950, 0x05b57, 0x056a0, // 1960-1969
+    0x096d0, 0x04dd5, 0x04ad0, 0x0a4d0, 0x0d4d4, 0x0d250, 0x0d558, 0x0b540, 0x0b6a0, 0x195a6, // 1970-1979
+    0x095b0, 0x049b0, 0x0a974, 0x0a4b0, 0x0b27a, 0x06a50, 0x06d40, 0x0af46, 0x0ab60, 0x09570, // 1980-1989
+    0x04af5, 0x04970, 0x064b0, 0x074a3, 0x0ea50, 0x06b58, 0x05ac0, 0x0ab60, 0x096d5, 0x092e0, // 1990-1999
+    0x0c960, 0x0d954, 0x0d4a0, 0x0da50, 0x07552, 0x056a0, 0x0abb7, 0x025d0, 0x092d0, 0x0cab5, // 2000-2009
+    0x0a950, 0x0b4a0, 0x0baa4, 0x0ad50, 0x055d9, 0x04ba0, 0x0a5b0, 0x15176, 0x052b0, 0x0a930, // 2010-2019
+    0x07954, 0x06aa0, 0x0ad50, 0x05b52, 0x04b60, 0x0a6e6, 0x0a4e0, 0x0d260, 0x0ea65, 0x0d530, // 2020-2029
+    0x05aa0, 0x076a3, 0x096d0, 0x04afb, 0x04ad0, 0x0a4d0, 0x1d0b6, 0x0d250, 0x0d520, 0x0dd45, // 2030-2039
+    0x0b5a0, 0x056d0, 0x055b2, 0x049b0, 0x0a577, 0x0a4b0, 0x0aa50, 0x1b255, 0x06d20, 0x0ada0, // 2040-2049
+    /** Add By JJonline@JJonline.Cn**/
+    0x14b63, 0x09370, 0x049f8, 0x04970, 0x064b0, 0x168a6, 0x0ea50, 0x06b20, 0x1a6c4, 0x0aae0, // 2050-2059
+    0x0a2e0, 0x0d2e3, 0x0c960, 0x0d557, 0x0d4a0, 0x0da50, 0x05d55, 0x056a0, 0x0a6d0, 0x055d4, // 2060-2069
+    0x052d0, 0x0a9b8, 0x0a950, 0x0b4a0, 0x0b6a6, 0x0ad50, 0x055a0, 0x0aba4, 0x0a5b0, 0x052b0, // 2070-2079
+    0x0b273, 0x06930, 0x07337, 0x06aa0, 0x0ad50, 0x14b55, 0x04b60, 0x0a570, 0x054e4, 0x0d160, // 2080-2089
+    0x0e968, 0x0d520, 0x0daa0, 0x16aa6, 0x056d0, 0x04ae0, 0x0a9d4, 0x0a2d0, 0x0d150, 0x0f252, // 2090-2099
+    0x0d520], // 2100
+
+  /**
+      * 公历每个月份的天数普通表
+      * @Array Of Property
+      * @return Number
+      */
+  solarMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],
+
+  /**
+      * 天干地支之天干速查表
+      * @Array Of Property trans["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
+      * @return Cn string
+      */
+  Gan: ['\u7532', '\u4e59', '\u4e19', '\u4e01', '\u620a', '\u5df1', '\u5e9a', '\u8f9b', '\u58ec', '\u7678'],
+
+  /**
+      * 天干地支之地支速查表
+      * @Array Of Property
+      * @trans["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
+      * @return Cn string
+      */
+  Zhi: ['\u5b50', '\u4e11', '\u5bc5', '\u536f', '\u8fb0', '\u5df3', '\u5348', '\u672a', '\u7533', '\u9149', '\u620c', '\u4ea5'],
+
+  /**
+      * 天干地支之地支速查表<=>生肖
+      * @Array Of Property
+      * @trans["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"]
+      * @return Cn string
+      */
+  Animals: ['\u9f20', '\u725b', '\u864e', '\u5154', '\u9f99', '\u86c7', '\u9a6c', '\u7f8a', '\u7334', '\u9e21', '\u72d7', '\u732a'],
+
+  /**
+      * 24节气速查表
+      * @Array Of Property
+      * @trans["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"]
+      * @return Cn string
+      */
+  solarTerm: ['\u5c0f\u5bd2', '\u5927\u5bd2', '\u7acb\u6625', '\u96e8\u6c34', '\u60ca\u86f0', '\u6625\u5206', '\u6e05\u660e', '\u8c37\u96e8', '\u7acb\u590f', '\u5c0f\u6ee1', '\u8292\u79cd', '\u590f\u81f3', '\u5c0f\u6691', '\u5927\u6691', '\u7acb\u79cb', '\u5904\u6691', '\u767d\u9732', '\u79cb\u5206', '\u5bd2\u9732', '\u971c\u964d', '\u7acb\u51ac', '\u5c0f\u96ea', '\u5927\u96ea', '\u51ac\u81f3'],
+
+  /**
+      * 1900-2100各年的24节气日期速查表
+      * @Array Of Property
+      * @return 0x string For splice
+      */
+  sTermInfo: ['9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f',
+    '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+    '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f', 'b027097bd097c36b0b6fc9274c91aa',
+    '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd0b06bdb0722c965ce1cfcc920f',
+    'b027097bd097c36b0b6fc9274c91aa', '9778397bd19801ec9210c965cc920e', '97b6b97bd19801ec95f8c965cc920f',
+    '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd197c36c9210c9274c91aa',
+    '97b6b97bd19801ec95f8c965cc920e', '97bd09801d98082c95f8e1cfcc920f', '97bd097bd097c36b0b6fc9210c8dc2',
+    '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec95f8c965cc920e', '97bcf97c3598082c95f8e1cfcc920f',
+    '97bd097bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+    '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+    '97b6b97bd19801ec9210c965cc920e', '97bcf97c3598082c95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722',
+    '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f',
+    '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+    '97bcf97c359801ec95f8c965cc920f', '97bd097bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+    '97b6b97bd19801ec9210c965cc920e', '97bcf97c359801ec95f8c965cc920f', '97bd097bd07f595b0b6fc920fb0722',
+    '9778397bd097c36b0b6fc9210c8dc2', '9778397bd19801ec9210c9274c920e', '97b6b97bd19801ec95f8c965cc920f',
+    '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
+    '97b6b97bd19801ec95f8c965cc920f', '97bd07f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
+    '9778397bd097c36c9210c9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bd07f1487f595b0b0bc920fb0722',
+    '7f0e397bd097c36b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+    '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+    '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+    '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e', '97bcf7f1487f531b0b0bb0b6fb0722',
+    '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b97bd19801ec9210c965cc920e',
+    '97bcf7f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+    '97b6b97bd19801ec9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+    '9778397bd097c36b0b6fc9210c91aa', '97b6b97bd197c36c9210c9274c920e', '97bcf7f0e47f531b0b0bb0b6fb0722',
+    '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '9778397bd097c36c9210c9274c920e',
+    '97b6b7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c36b0b6fc9210c8dc2',
+    '9778397bd097c36b0b70c9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
+    '7f0e397bd097c35b0b6fc9210c8dc2', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
+    '7f0e27f1487f595b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+    '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+    '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+    '7f0e397bd097c35b0b6fc920fb0722', '9778397bd097c36b0b6fc9274c91aa', '97b6b7f0e47f531b0723b0b6fb0721',
+    '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9274c91aa',
+    '97b6b7f0e47f531b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+    '9778397bd097c36b0b6fc9210c91aa', '97b6b7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+    '7f0e397bd07f595b0b0bc920fb0722', '9778397bd097c36b0b6fc9210c8dc2', '977837f0e37f149b0723b0787b0721',
+    '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f5307f595b0b0bc920fb0722', '7f0e397bd097c35b0b6fc9210c8dc2',
+    '977837f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e37f1487f595b0b0bb0b6fb0722',
+    '7f0e397bd097c35b0b6fc9210c8dc2', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+    '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722', '977837f0e37f14998082b0787b06bd',
+    '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd097c35b0b6fc920fb0722',
+    '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+    '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+    '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14998082b0787b06bd',
+    '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0b0bb0b6fb0722', '7f0e397bd07f595b0b0bc920fb0722',
+    '977837f0e37f14998082b0723b06bd', '7f07e7f0e37f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+    '7f0e397bd07f595b0b0bc920fb0722', '977837f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b0721',
+    '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f595b0b0bb0b6fb0722', '7f0e37f0e37f14898082b0723b02d5',
+    '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e37f1487f531b0b0bb0b6fb0722',
+    '7f0e37f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+    '7f0e37f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
+    '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e37f14898082b072297c35',
+    '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722',
+    '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f149b0723b0787b0721',
+    '7f0e27f1487f531b0b0bb0b6fb0722', '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14998082b0723b06bd',
+    '7f07e7f0e47f149b0723b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722', '7f0e37f0e366aa89801eb072297c35',
+    '7ec967f0e37f14998082b0723b06bd', '7f07e7f0e37f14998083b0787b0721', '7f0e27f0e47f531b0723b0b6fb0722',
+    '7f0e37f0e366aa89801eb072297c35', '7ec967f0e37f14898082b0723b02d5', '7f07e7f0e37f14998082b0787b0721',
+    '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66aa89801e9808297c35', '665f67f0e37f14898082b0723b02d5',
+    '7ec967f0e37f14998082b0787b0721', '7f07e7f0e47f531b0723b0b6fb0722', '7f0e36665b66a449801e9808297c35',
+    '665f67f0e37f14898082b0723b02d5', '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721',
+    '7f0e36665b66a449801e9808297c35', '665f67f0e37f14898082b072297c35', '7ec967f0e37f14998082b0787b06bd',
+    '7f07e7f0e47f531b0723b0b6fb0721', '7f0e26665b66a449801e9808297c35', '665f67f0e37f1489801eb072297c35',
+    '7ec967f0e37f14998082b0787b06bd', '7f07e7f0e47f531b0723b0b6fb0721', '7f0e27f1487f531b0b0bb0b6fb0722'],
+
+  /**
+      * 数字转中文速查表
+      * @Array Of Property
+      * @trans ['日','一','二','三','四','五','六','七','八','九','十']
+      * @return Cn string
+      */
+  nStr1: ['\u65e5', '\u4e00', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341'],
+
+  /**
+      * 日期转农历称呼速查表
+      * @Array Of Property
+      * @trans ['初','十','廿','卅']
+      * @return Cn string
+      */
+  nStr2: ['\u521d', '\u5341', '\u5eff', '\u5345'],
+
+  /**
+      * 月份转农历称呼速查表
+      * @Array Of Property
+      * @trans ['正','一','二','三','四','五','六','七','八','九','十','冬','腊']
+      * @return Cn string
+      */
+  nStr3: ['\u6b63', '\u4e8c', '\u4e09', '\u56db', '\u4e94', '\u516d', '\u4e03', '\u516b', '\u4e5d', '\u5341', '\u51ac', '\u814a'],
+
+  /**
+      * 返回农历y年一整年的总天数
+      * @param lunar Year
+      * @return Number
+      * @eg:var count = calendar.lYearDays(1987) ;//count=387
+      */
+  lYearDays: function (y) {
+    var i; var sum = 348
+    for (i = 0x8000; i > 0x8; i >>= 1) { sum += (this.lunarInfo[y - 1900] & i) ? 1 : 0 }
+    return (sum + this.leapDays(y))
+  },
+
+  /**
+      * 返回农历y年闰月是哪个月;若y年没有闰月 则返回0
+      * @param lunar Year
+      * @return Number (0-12)
+      * @eg:var leapMonth = calendar.leapMonth(1987) ;//leapMonth=6
+      */
+  leapMonth: function (y) { // 闰字编码 \u95f0
+    return (this.lunarInfo[y - 1900] & 0xf)
+  },
+
+  /**
+      * 返回农历y年闰月的天数 若该年没有闰月则返回0
+      * @param lunar Year
+      * @return Number (0、29、30)
+      * @eg:var leapMonthDay = calendar.leapDays(1987) ;//leapMonthDay=29
+      */
+  leapDays: function (y) {
+    if (this.leapMonth(y)) {
+      return ((this.lunarInfo[y - 1900] & 0x10000) ? 30 : 29)
+    }
+    return (0)
+  },
+
+  /**
+      * 返回农历y年m月(非闰月)的总天数,计算m为闰月时的天数请使用leapDays方法
+      * @param lunar Year
+      * @return Number (-1、29、30)
+      * @eg:var MonthDay = calendar.monthDays(1987,9) ;//MonthDay=29
+      */
+  monthDays: function (y, m) {
+    if (m > 12 || m < 1) { return -1 }// 月份参数从1至12,参数错误返回-1
+    return ((this.lunarInfo[y - 1900] & (0x10000 >> m)) ? 30 : 29)
+  },
+
+  /**
+      * 返回公历(!)y年m月的天数
+      * @param solar Year
+      * @return Number (-1、28、29、30、31)
+      * @eg:var solarMonthDay = calendar.leapDays(1987) ;//solarMonthDay=30
+      */
+  solarDays: function (y, m) {
+    if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
+    var ms = m - 1
+    if (ms == 1) { // 2月份的闰平规律测算后确认返回28或29
+      return (((y % 4 == 0) && (y % 100 != 0) || (y % 400 == 0)) ? 29 : 28)
+    } else {
+      return (this.solarMonth[ms])
+    }
+  },
+
+  /**
+     * 农历年份转换为干支纪年
+     * @param  lYear 农历年的年份数
+     * @return Cn string
+     */
+  toGanZhiYear: function (lYear) {
+    var ganKey = (lYear - 3) % 10
+    var zhiKey = (lYear - 3) % 12
+    if (ganKey == 0) ganKey = 10// 如果余数为0则为最后一个天干
+    if (zhiKey == 0) zhiKey = 12// 如果余数为0则为最后一个地支
+    return this.Gan[ganKey - 1] + this.Zhi[zhiKey - 1]
+  },
+
+  /**
+     * 公历月、日判断所属星座
+     * @param  cMonth [description]
+     * @param  cDay [description]
+     * @return Cn string
+     */
+  toAstro: function (cMonth, cDay) {
+    var s = '\u9b54\u7faf\u6c34\u74f6\u53cc\u9c7c\u767d\u7f8a\u91d1\u725b\u53cc\u5b50\u5de8\u87f9\u72ee\u5b50\u5904\u5973\u5929\u79e4\u5929\u874e\u5c04\u624b\u9b54\u7faf'
+    var arr = [20, 19, 21, 21, 21, 22, 23, 23, 23, 23, 22, 22]
+    return s.substr(cMonth * 2 - (cDay < arr[cMonth - 1] ? 2 : 0), 2) + '\u5ea7'// 座
+  },
+
+  /**
+      * 传入offset偏移量返回干支
+      * @param offset 相对甲子的偏移量
+      * @return Cn string
+      */
+  toGanZhi: function (offset) {
+    return this.Gan[offset % 10] + this.Zhi[offset % 12]
+  },
+
+  /**
+      * 传入公历(!)y年获得该年第n个节气的公历日期
+      * @param y公历年(1900-2100);n二十四节气中的第几个节气(1~24);从n=1(小寒)算起
+      * @return day Number
+      * @eg:var _24 = calendar.getTerm(1987,3) ;//_24=4;意即1987年2月4日立春
+      */
+  getTerm: function (y, n) {
+    if (y < 1900 || y > 2100) { return -1 }
+    if (n < 1 || n > 24) { return -1 }
+    var _table = this.sTermInfo[y - 1900]
+    var _info = [
+      parseInt('0x' + _table.substr(0, 5)).toString(),
+      parseInt('0x' + _table.substr(5, 5)).toString(),
+      parseInt('0x' + _table.substr(10, 5)).toString(),
+      parseInt('0x' + _table.substr(15, 5)).toString(),
+      parseInt('0x' + _table.substr(20, 5)).toString(),
+      parseInt('0x' + _table.substr(25, 5)).toString()
+    ]
+    var _calday = [
+      _info[0].substr(0, 1),
+      _info[0].substr(1, 2),
+      _info[0].substr(3, 1),
+      _info[0].substr(4, 2),
+
+      _info[1].substr(0, 1),
+      _info[1].substr(1, 2),
+      _info[1].substr(3, 1),
+      _info[1].substr(4, 2),
+
+      _info[2].substr(0, 1),
+      _info[2].substr(1, 2),
+      _info[2].substr(3, 1),
+      _info[2].substr(4, 2),
+
+      _info[3].substr(0, 1),
+      _info[3].substr(1, 2),
+      _info[3].substr(3, 1),
+      _info[3].substr(4, 2),
+
+      _info[4].substr(0, 1),
+      _info[4].substr(1, 2),
+      _info[4].substr(3, 1),
+      _info[4].substr(4, 2),
+
+      _info[5].substr(0, 1),
+      _info[5].substr(1, 2),
+      _info[5].substr(3, 1),
+      _info[5].substr(4, 2)
+    ]
+    return parseInt(_calday[n - 1])
+  },
+
+  /**
+      * 传入农历数字月份返回汉语通俗表示法
+      * @param lunar month
+      * @return Cn string
+      * @eg:var cnMonth = calendar.toChinaMonth(12) ;//cnMonth='腊月'
+      */
+  toChinaMonth: function (m) { // 月 => \u6708
+    if (m > 12 || m < 1) { return -1 } // 若参数错误 返回-1
+    var s = this.nStr3[m - 1]
+    s += '\u6708'// 加上月字
+    return s
+  },
+
+  /**
+      * 传入农历日期数字返回汉字表示法
+      * @param lunar day
+      * @return Cn string
+      * @eg:var cnDay = calendar.toChinaDay(21) ;//cnMonth='廿一'
+      */
+  toChinaDay: function (d) { // 日 => \u65e5
+    var s
+    switch (d) {
+      case 10:
+        s = '\u521d\u5341'; break
+      case 20:
+        s = '\u4e8c\u5341'; break
+        break
+      case 30:
+        s = '\u4e09\u5341'; break
+        break
+      default :
+        s = this.nStr2[Math.floor(d / 10)]
+        s += this.nStr1[d % 10]
+    }
+    return (s)
+  },
+
+  /**
+      * 年份转生肖[!仅能大致转换] => 精确划分生肖分界线是“立春”
+      * @param y year
+      * @return Cn string
+      * @eg:var animal = calendar.getAnimal(1987) ;//animal='兔'
+      */
+  getAnimal: function (y) {
+    return this.Animals[(y - 4) % 12]
+  },
+
+  /**
+      * 传入阳历年月日获得详细的公历、农历object信息 <=>JSON
+      * @param y  solar year
+      * @param m  solar month
+      * @param d  solar day
+      * @return JSON object
+      * @eg:console.log(calendar.solar2lunar(1987,11,01));
+      */
+  solar2lunar: function (y, m, d) { // 参数区间1900.1.31~2100.12.31
+    // 年份限定、上限
+    if (y < 1900 || y > 2100) {
+      return -1// undefined转换为数字变为NaN
+    }
+    // 公历传参最下限
+    if (y == 1900 && m == 1 && d < 31) {
+      return -1
+    }
+    // 未传参  获得当天
+    if (!y) {
+      var objDate = new Date()
+    } else {
+      var objDate = new Date(y, parseInt(m) - 1, d)
+    }
+    var i; var leap = 0; var temp = 0
+    // 修正ymd参数
+    var y = objDate.getFullYear()
+    var m = objDate.getMonth() + 1
+    var d = objDate.getDate()
+    var offset = (Date.UTC(objDate.getFullYear(), objDate.getMonth(), objDate.getDate()) - Date.UTC(1900, 0, 31)) / 86400000
+    for (i = 1900; i < 2101 && offset > 0; i++) {
+      temp = this.lYearDays(i)
+      offset -= temp
+    }
+    if (offset < 0) {
+      offset += temp; i--
+    }
+
+    // 是否今天
+    var isTodayObj = new Date()
+    var isToday = false
+    if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
+      isToday = true
+    }
+    // 星期几
+    var nWeek = objDate.getDay()
+    var cWeek = this.nStr1[nWeek]
+    // 数字表示周几顺应天朝周一开始的惯例
+    if (nWeek == 0) {
+      nWeek = 7
+    }
+    // 农历年
+    var year = i
+    var leap = this.leapMonth(i) // 闰哪个月
+    var isLeap = false
+
+    // 效验闰月
+    for (i = 1; i < 13 && offset > 0; i++) {
+      // 闰月
+      if (leap > 0 && i == (leap + 1) && isLeap == false) {
+        --i
+        isLeap = true; temp = this.leapDays(year) // 计算农历闰月天数
+      } else {
+        temp = this.monthDays(year, i)// 计算农历普通月天数
+      }
+      // 解除闰月
+      if (isLeap == true && i == (leap + 1)) { isLeap = false }
+      offset -= temp
+    }
+    // 闰月导致数组下标重叠取反
+    if (offset == 0 && leap > 0 && i == leap + 1) {
+      if (isLeap) {
+        isLeap = false
+      } else {
+        isLeap = true; --i
+      }
+    }
+    if (offset < 0) {
+      offset += temp; --i
+    }
+    // 农历月
+    var month = i
+    // 农历日
+    var day = offset + 1
+    // 天干地支处理
+    var sm = m - 1
+    var gzY = this.toGanZhiYear(year)
+
+    // 当月的两个节气
+    // bugfix-2017-7-24 11:03:38 use lunar Year Param `y` Not `year`
+    var firstNode = this.getTerm(y, (m * 2 - 1))// 返回当月「节」为几日开始
+    var secondNode = this.getTerm(y, (m * 2))// 返回当月「节」为几日开始
+
+    // 依据12节气修正干支月
+    var gzM = this.toGanZhi((y - 1900) * 12 + m + 11)
+    if (d >= firstNode) {
+      gzM = this.toGanZhi((y - 1900) * 12 + m + 12)
+    }
+
+    // 传入的日期的节气与否
+    var isTerm = false
+    var Term = null
+    if (firstNode == d) {
+      isTerm = true
+      Term = this.solarTerm[m * 2 - 2]
+    }
+    if (secondNode == d) {
+      isTerm = true
+      Term = this.solarTerm[m * 2 - 1]
+    }
+    // 日柱 当月一日与 1900/1/1 相差天数
+    var dayCyclical = Date.UTC(y, sm, 1, 0, 0, 0, 0) / 86400000 + 25567 + 10
+    var gzD = this.toGanZhi(dayCyclical + d - 1)
+    // 该日期所属的星座
+    var astro = this.toAstro(m, d)
+
+    return { 'lYear': year, 'lMonth': month, 'lDay': day, 'Animal': this.getAnimal(year), 'IMonthCn': (isLeap ? '\u95f0' : '') + this.toChinaMonth(month), 'IDayCn': this.toChinaDay(day), 'cYear': y, 'cMonth': m, 'cDay': d, 'gzYear': gzY, 'gzMonth': gzM, 'gzDay': gzD, 'isToday': isToday, 'isLeap': isLeap, 'nWeek': nWeek, 'ncWeek': '\u661f\u671f' + cWeek, 'isTerm': isTerm, 'Term': Term, 'astro': astro }
+  },
+
+  /**
+      * 传入农历年月日以及传入的月份是否闰月获得详细的公历、农历object信息 <=>JSON
+      * @param y  lunar year
+      * @param m  lunar month
+      * @param d  lunar day
+      * @param isLeapMonth  lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
+      * @return JSON object
+      * @eg:console.log(calendar.lunar2solar(1987,9,10));
+      */
+  lunar2solar: function (y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
+    var isLeapMonth = !!isLeapMonth
+    var leapOffset = 0
+    var leapMonth = this.leapMonth(y)
+    var leapDay = this.leapDays(y)
+    if (isLeapMonth && (leapMonth != m)) { return -1 }// 传参要求计算该闰月公历 但该年得出的闰月与传参的月份并不同
+    if (y == 2100 && m == 12 && d > 1 || y == 1900 && m == 1 && d < 31) { return -1 }// 超出了最大极限值
+    var day = this.monthDays(y, m)
+    var _day = day
+    // bugFix 2016-9-25
+    // if month is leap, _day use leapDays method
+    if (isLeapMonth) {
+      _day = this.leapDays(y, m)
+    }
+    if (y < 1900 || y > 2100 || d > _day) { return -1 }// 参数合法性效验
+
+    // 计算农历的时间差
+    var offset = 0
+    for (var i = 1900; i < y; i++) {
+      offset += this.lYearDays(i)
+    }
+    var leap = 0; var isAdd = false
+    for (var i = 1; i < m; i++) {
+      leap = this.leapMonth(y)
+      if (!isAdd) { // 处理闰月
+        if (leap <= i && leap > 0) {
+          offset += this.leapDays(y); isAdd = true
+        }
+      }
+      offset += this.monthDays(y, i)
+    }
+    // 转换闰月农历 需补充该年闰月的前一个月的时差
+    if (isLeapMonth) { offset += day }
+    // 1900年农历正月一日的公历时间为1900年1月30日0时0分0秒(该时间也是本农历的最开始起始点)
+    var stmap = Date.UTC(1900, 1, 30, 0, 0, 0)
+    var calObj = new Date((offset + d - 31) * 86400000 + stmap)
+    var cY = calObj.getUTCFullYear()
+    var cM = calObj.getUTCMonth() + 1
+    var cD = calObj.getUTCDate()
+
+    return this.solar2lunar(cY, cM, cD)
+  }
+}
+
+export default calendar

+ 12 - 0
uni_modules/uni-calendar/components/uni-calendar/i18n/en.json

@@ -0,0 +1,12 @@
+{
+	"uni-calender.ok": "ok",
+	"uni-calender.cancel": "cancel",
+	"uni-calender.today": "today",
+	"uni-calender.MON": "MON",
+	"uni-calender.TUE": "TUE",
+	"uni-calender.WED": "WED",
+	"uni-calender.THU": "THU",
+	"uni-calender.FRI": "FRI",
+	"uni-calender.SAT": "SAT",
+	"uni-calender.SUN": "SUN"
+}

+ 8 - 0
uni_modules/uni-calendar/components/uni-calendar/i18n/index.js

@@ -0,0 +1,8 @@
+import en from './en.json'
+import zhHans from './zh-Hans.json'
+import zhHant from './zh-Hant.json'
+export default {
+	en,
+	'zh-Hans': zhHans,
+	'zh-Hant': zhHant
+}

+ 12 - 0
uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hans.json

@@ -0,0 +1,12 @@
+{
+	"uni-calender.ok": "确定",
+	"uni-calender.cancel": "取消",
+	"uni-calender.today": "今日",
+	"uni-calender.SUN": "日",
+	"uni-calender.MON": "一",
+	"uni-calender.TUE": "二",
+	"uni-calender.WED": "三",
+	"uni-calender.THU": "四",
+	"uni-calender.FRI": "五",
+	"uni-calender.SAT": "六"
+}

+ 12 - 0
uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hant.json

@@ -0,0 +1,12 @@
+{
+	"uni-calender.ok": "確定",
+	"uni-calender.cancel": "取消",
+	"uni-calender.today": "今日",
+	"uni-calender.SUN": "日",
+	"uni-calender.MON": "一",
+	"uni-calender.TUE": "二",
+	"uni-calender.WED": "三",
+	"uni-calender.THU": "四",
+	"uni-calender.FRI": "五",
+	"uni-calender.SAT": "六"
+}

+ 188 - 0
uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue

@@ -0,0 +1,188 @@
+<template>
+	<view class="uni-calendar-item__weeks-box" :class="{
+		'uni-calendar-item--disable':weeks.disable,
+		'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
+		'uni-calendar-item--checked':(calendar.fullDate === weeks.fullDate && !weeks.isDay) ,
+		'uni-calendar-item--before-checked':weeks.beforeMultiple,
+		'uni-calendar-item--multiple': weeks.multiple,
+		'uni-calendar-item--after-checked':weeks.afterMultiple,
+		}"
+	 @click="choiceDate(weeks)">
+		<view class="uni-calendar-item__weeks-box-item">
+			<text v-if="selected&&weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
+			<text class="uni-calendar-item__weeks-box-text" :class="{
+				'uni-calendar-item--isDay-text': weeks.isDay,
+				'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
+				'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
+				'uni-calendar-item--before-checked':weeks.beforeMultiple,
+				'uni-calendar-item--multiple': weeks.multiple,
+				'uni-calendar-item--after-checked':weeks.afterMultiple,
+				'uni-calendar-item--disable':weeks.disable,
+				}">{{weeks.date}}</text>
+			<text v-if="!lunar&&!weeks.extraInfo && weeks.isDay" class="uni-calendar-item__weeks-lunar-text" :class="{
+				'uni-calendar-item--isDay-text':weeks.isDay,
+				'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
+				'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
+				'uni-calendar-item--before-checked':weeks.beforeMultiple,
+				'uni-calendar-item--multiple': weeks.multiple,
+				'uni-calendar-item--after-checked':weeks.afterMultiple,
+				}">{{todayText}}</text>
+			<text v-if="lunar&&!weeks.extraInfo" class="uni-calendar-item__weeks-lunar-text" :class="{
+				'uni-calendar-item--isDay-text':weeks.isDay,
+				'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
+				'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
+				'uni-calendar-item--before-checked':weeks.beforeMultiple,
+				'uni-calendar-item--multiple': weeks.multiple,
+				'uni-calendar-item--after-checked':weeks.afterMultiple,
+				'uni-calendar-item--disable':weeks.disable,
+				}">{{weeks.isDay ? todayText : (weeks.lunar.IDayCn === '初一'?weeks.lunar.IMonthCn:weeks.lunar.IDayCn)}}</text>
+			<text v-if="weeks.extraInfo&&weeks.extraInfo.info" class="uni-calendar-item__weeks-lunar-text" :class="{
+				'uni-calendar-item--extra':weeks.extraInfo.info,
+				'uni-calendar-item--isDay-text':weeks.isDay,
+				'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate && weeks.isDay,
+				'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate && !weeks.isDay,
+				'uni-calendar-item--before-checked':weeks.beforeMultiple,
+				'uni-calendar-item--multiple': weeks.multiple,
+				'uni-calendar-item--after-checked':weeks.afterMultiple,
+				'uni-calendar-item--disable':weeks.disable,
+				}">{{weeks.extraInfo.info}}</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+	initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from './i18n/index.js'
+	const {	t	} = initVueI18n(messages)
+	export default {
+		emits:['change'],
+		props: {
+			weeks: {
+				type: Object,
+				default () {
+					return {}
+				}
+			},
+			calendar: {
+				type: Object,
+				default: () => {
+					return {}
+				}
+			},
+			selected: {
+				type: Array,
+				default: () => {
+					return []
+				}
+			},
+			lunar: {
+				type: Boolean,
+				default: false
+			}
+		},
+		computed: {
+			todayText() {
+				return t("uni-calender.today")
+			},
+		},
+		methods: {
+			choiceDate(weeks) {
+				this.$emit('change', weeks)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	$uni-font-size-base:14px;
+	$uni-text-color:#333;
+	$uni-font-size-sm:12px;
+	$uni-color-error: #e43d33;
+	$uni-opacity-disabled: 0.3;
+	$uni-text-color-disable:#c0c0c0;
+	$uni-color-primary: #2979ff;
+	.uni-calendar-item__weeks-box {
+		flex: 1;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.uni-calendar-item__weeks-box-text {
+		font-size: $uni-font-size-base;
+		color: $uni-text-color;
+	}
+
+	.uni-calendar-item__weeks-lunar-text {
+		font-size: $uni-font-size-sm;
+		color: $uni-text-color;
+	}
+
+	.uni-calendar-item__weeks-box-item {
+		position: relative;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		width: 100rpx;
+		height: 100rpx;
+	}
+
+	.uni-calendar-item__weeks-box-circle {
+		position: absolute;
+		top: 5px;
+		right: 5px;
+		width: 8px;
+		height: 8px;
+		border-radius: 8px;
+		background-color: $uni-color-error;
+
+	}
+
+	.uni-calendar-item--disable {
+		background-color: rgba(249, 249, 249, $uni-opacity-disabled);
+		color: $uni-text-color-disable;
+	}
+
+	.uni-calendar-item--isDay-text {
+		color: $uni-color-primary;
+	}
+
+	.uni-calendar-item--isDay {
+		background-color: $uni-color-primary;
+		opacity: 0.8;
+		color: #fff;
+	}
+
+	.uni-calendar-item--extra {
+		color: $uni-color-error;
+		opacity: 0.8;
+	}
+
+	.uni-calendar-item--checked {
+		background-color: $uni-color-primary;
+		color: #fff;
+		opacity: 0.8;
+	}
+
+	.uni-calendar-item--multiple {
+		background-color: $uni-color-primary;
+		color: #fff;
+		opacity: 0.8;
+	}
+	.uni-calendar-item--before-checked {
+		background-color: #ff5a5f;
+		color: #fff;
+	}
+	.uni-calendar-item--after-checked {
+		background-color: #ff5a5f;
+		color: #fff;
+	}
+</style>

+ 562 - 0
uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue

@@ -0,0 +1,562 @@
+<template>
+	<view class="uni-calendar">
+		<view v-if="!insert&&show" class="uni-calendar__mask" :class="{'uni-calendar--mask-show':aniMaskShow}" @click="clean"></view>
+		<view v-if="insert || show" class="uni-calendar__content" :class="{'uni-calendar--fixed':!insert,'uni-calendar--ani-show':aniMaskShow}">
+			<view v-if="!insert" class="uni-calendar__header uni-calendar--fixed-top">
+				<view class="uni-calendar__header-btn-box" @click="close">
+					<text class="uni-calendar__header-text uni-calendar--fixed-width">{{cancelText}}</text>
+				</view>
+				<view class="uni-calendar__header-btn-box" @click="confirm">
+					<text class="uni-calendar__header-text uni-calendar--fixed-width">{{okText}}</text>
+				</view>
+			</view>
+			<view class="uni-calendar__header">
+				<view class="uni-calendar__header-btn-box" @click.stop="pre">
+					<view class="uni-calendar__header-btn uni-calendar--left"></view>
+				</view>
+				<picker mode="date" :value="date" fields="month" @change="bindDateChange">
+					<text class="uni-calendar__header-text">{{ (nowDate.year||'') +' / '+( nowDate.month||'')}}</text>
+				</picker>
+				<view class="uni-calendar__header-btn-box" @click.stop="next">
+					<view class="uni-calendar__header-btn uni-calendar--right"></view>
+				</view>
+				<text class="uni-calendar__backtoday" @click="backtoday">{{todayText}}</text>
+
+			</view>
+			<view class="uni-calendar__box">
+				<view v-if="showMonth" class="uni-calendar__box-bg">
+					<text class="uni-calendar__box-bg-text">{{nowDate.month}}</text>
+				</view>
+				<view class="uni-calendar__weeks">
+					<view class="uni-calendar__weeks-day">
+						<text class="uni-calendar__weeks-day-text">{{SUNText}}</text>
+					</view>
+					<view class="uni-calendar__weeks-day">
+						<text class="uni-calendar__weeks-day-text">{{monText}}</text>
+					</view>
+					<view class="uni-calendar__weeks-day">
+						<text class="uni-calendar__weeks-day-text">{{TUEText}}</text>
+					</view>
+					<view class="uni-calendar__weeks-day">
+						<text class="uni-calendar__weeks-day-text">{{WEDText}}</text>
+					</view>
+					<view class="uni-calendar__weeks-day">
+						<text class="uni-calendar__weeks-day-text">{{THUText}}</text>
+					</view>
+					<view class="uni-calendar__weeks-day">
+						<text class="uni-calendar__weeks-day-text">{{FRIText}}</text>
+					</view>
+					<view class="uni-calendar__weeks-day">
+						<text class="uni-calendar__weeks-day-text">{{SATText}}</text>
+					</view>
+				</view>
+				<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
+					<view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
+						<calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar" :selected="selected" :lunar="lunar" @change="choiceDate"></calendar-item>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import Calendar from './util.js';
+	import calendarItem from './uni-calendar-item.vue'
+	import {
+	initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from './i18n/index.js'
+	const {	t	} = initVueI18n(messages)
+	/**
+	 * Calendar 日历
+	 * @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=56
+	 * @property {String} date 自定义当前时间,默认为今天
+	 * @property {Boolean} lunar 显示农历
+	 * @property {String} startDate 日期选择范围-开始日期
+	 * @property {String} endDate 日期选择范围-结束日期
+	 * @property {Boolean} range 范围选择
+	 * @property {Boolean} insert = [true|false] 插入模式,默认为false
+	 * 	@value true 弹窗模式
+	 * 	@value false 插入模式
+	 * @property {Boolean} clearDate = [true|false] 弹窗模式是否清空上次选择内容
+	 * @property {Array} selected 打点,期待格式[{date: '2019-06-27', info: '签到', data: { custom: '自定义信息', name: '自定义消息头',xxx:xxx... }}]
+	 * @property {Boolean} showMonth 是否选择月份为背景
+	 * @event {Function} change 日期改变,`insert :ture` 时生效
+	 * @event {Function} confirm 确认选择`insert :false` 时生效
+	 * @event {Function} monthSwitch 切换月份时触发
+	 * @example <uni-calendar :insert="true":lunar="true" :start-date="'2019-3-2'":end-date="'2019-5-20'"@change="change" />
+	 */
+	export default {
+		components: {
+			calendarItem
+		},
+		emits:['close','confirm','change','monthSwitch'],
+		props: {
+			date: {
+				type: String,
+				default: ''
+			},
+			selected: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			lunar: {
+				type: Boolean,
+				default: false
+			},
+			startDate: {
+				type: String,
+				default: ''
+			},
+			endDate: {
+				type: String,
+				default: ''
+			},
+			range: {
+				type: Boolean,
+				default: false
+			},
+			insert: {
+				type: Boolean,
+				default: true
+			},
+			showMonth: {
+				type: Boolean,
+				default: true
+			},
+			clearDate: {
+				type: Boolean,
+				default: true
+			}
+		},
+		data() {
+			return {
+				show: false,
+				weeks: [],
+				calendar: {},
+				nowDate: '',
+				aniMaskShow: false
+			}
+		},
+		computed:{
+			/**
+			 * for i18n
+			 */
+
+			okText() {
+				return t("uni-calender.ok")
+			},
+			cancelText() {
+				return t("uni-calender.cancel")
+			},
+			todayText() {
+				return t("uni-calender.today")
+			},
+			monText() {
+				return t("uni-calender.MON")
+			},
+			TUEText() {
+				return t("uni-calender.TUE")
+			},
+			WEDText() {
+				return t("uni-calender.WED")
+			},
+			THUText() {
+				return t("uni-calender.THU")
+			},
+			FRIText() {
+				return t("uni-calender.FRI")
+			},
+			SATText() {
+				return t("uni-calender.SAT")
+			},
+			SUNText() {
+				return t("uni-calender.SUN")
+			},
+		},
+		watch: {
+			date(newVal) {
+				// this.cale.setDate(newVal)
+				this.init(newVal)
+			},
+			startDate(val){
+				this.cale.resetSatrtDate(val)
+				this.cale.setDate(this.nowDate.fullDate)
+				this.weeks = this.cale.weeks
+			},
+			endDate(val){
+				this.cale.resetEndDate(val)
+				this.cale.setDate(this.nowDate.fullDate)
+				this.weeks = this.cale.weeks
+			},
+			selected(newVal) {
+				this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
+				this.weeks = this.cale.weeks
+			}
+		},
+		created() {
+			// 获取日历方法实例
+			this.cale = new Calendar({
+				// date: new Date(),
+				selected: this.selected,
+				startDate: this.startDate,
+				endDate: this.endDate,
+				range: this.range,
+			})
+			// 选中某一天
+			// this.cale.setDate(this.date)
+			this.init(this.date)
+			// this.setDay
+		},
+		methods: {
+			// 取消穿透
+			clean() {},
+			bindDateChange(e) {
+				const value = e.detail.value + '-1'
+				console.log(this.cale.getDate(value));
+				this.init(value)
+			},
+			/**
+			 * 初始化日期显示
+			 * @param {Object} date
+			 */
+			init(date) {
+				this.cale.setDate(date)
+				this.weeks = this.cale.weeks
+				this.nowDate = this.calendar = this.cale.getInfo(date)
+			},
+			/**
+			 * 打开日历弹窗
+			 */
+			open() {
+				// 弹窗模式并且清理数据
+				if (this.clearDate && !this.insert) {
+					this.cale.cleanMultipleStatus()
+					// this.cale.setDate(this.date)
+					this.init(this.date)
+				}
+				this.show = true
+				this.$nextTick(() => {
+					setTimeout(() => {
+						this.aniMaskShow = true
+					}, 50)
+				})
+			},
+			/**
+			 * 关闭日历弹窗
+			 */
+			close() {
+				this.aniMaskShow = false
+				this.$nextTick(() => {
+					setTimeout(() => {
+						this.show = false
+						this.$emit('close')
+					}, 300)
+				})
+			},
+			/**
+			 * 确认按钮
+			 */
+			confirm() {
+				this.setEmit('confirm')
+				this.close()
+			},
+			/**
+			 * 变化触发
+			 */
+			change() {
+				if (!this.insert) return
+				this.setEmit('change')
+			},
+			/**
+			 * 选择月份触发
+			 */
+			monthSwitch() {
+				let {
+					year,
+					month
+				} = this.nowDate
+				this.$emit('monthSwitch', {
+					year,
+					month: Number(month)
+				})
+			},
+			/**
+			 * 派发事件
+			 * @param {Object} name
+			 */
+			setEmit(name) {
+				let {
+					year,
+					month,
+					date,
+					fullDate,
+					lunar,
+					extraInfo
+				} = this.calendar
+				this.$emit(name, {
+					range: this.cale.multipleStatus,
+					year,
+					month,
+					date,
+					fulldate: fullDate,
+					lunar,
+					extraInfo: extraInfo || {}
+				})
+			},
+			/**
+			 * 选择天触发
+			 * @param {Object} weeks
+			 */
+			choiceDate(weeks) {
+				if (weeks.disable) return
+				this.calendar = weeks
+				// 设置多选
+				this.cale.setMultiple(this.calendar.fullDate)
+				this.weeks = this.cale.weeks
+				this.change()
+			},
+			/**
+			 * 回到今天
+			 */
+			backtoday() {
+				console.log(this.cale.getDate(new Date()).fullDate);
+				let date = this.cale.getDate(new Date()).fullDate
+				// this.cale.setDate(date)
+				this.init(date)
+				this.change()
+			},
+			/**
+			 * 上个月
+			 */
+			pre() {
+				const preDate = this.cale.getDate(this.nowDate.fullDate, -1, 'month').fullDate
+				this.setDate(preDate)
+				this.monthSwitch()
+
+			},
+			/**
+			 * 下个月
+			 */
+			next() {
+				const nextDate = this.cale.getDate(this.nowDate.fullDate, +1, 'month').fullDate
+				this.setDate(nextDate)
+				this.monthSwitch()
+			},
+			/**
+			 * 设置日期
+			 * @param {Object} date
+			 */
+			setDate(date) {
+				this.cale.setDate(date)
+				this.weeks = this.cale.weeks
+				this.nowDate = this.cale.getInfo(date)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	$uni-bg-color-mask: rgba($color: #000000, $alpha: 0.4);
+	$uni-border-color: #EDEDED;
+	$uni-text-color: #333;
+	$uni-bg-color-hover:#f1f1f1;
+	$uni-font-size-base:14px;
+	$uni-text-color-placeholder: #808080;
+	$uni-color-subtitle: #555555;
+	$uni-text-color-grey:#999;
+	.uni-calendar {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+	}
+
+	.uni-calendar__mask {
+		position: fixed;
+		bottom: 0;
+		top: 0;
+		left: 0;
+		right: 0;
+		background-color: $uni-bg-color-mask;
+		transition-property: opacity;
+		transition-duration: 0.3s;
+		opacity: 0;
+		/* #ifndef APP-NVUE */
+		z-index: 99;
+		/* #endif */
+	}
+
+	.uni-calendar--mask-show {
+		opacity: 1
+	}
+
+	.uni-calendar--fixed {
+		position: fixed;
+		/* #ifdef APP-NVUE */
+		bottom: 0;
+		/* #endif */
+		left: 0;
+		right: 0;
+		transition-property: transform;
+		transition-duration: 0.3s;
+		transform: translateY(460px);
+		/* #ifndef APP-NVUE */
+		bottom: calc(var(--window-bottom));
+		z-index: 99;
+		/* #endif */
+	}
+
+	.uni-calendar--ani-show {
+		transform: translateY(0);
+	}
+
+	.uni-calendar__content {
+		background-color: #fff;
+	}
+
+	.uni-calendar__header {
+		position: relative;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		height: 50px;
+		border-bottom-color: $uni-border-color;
+		border-bottom-style: solid;
+		border-bottom-width: 1px;
+	}
+
+	.uni-calendar--fixed-top {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: space-between;
+		border-top-color: $uni-border-color;
+		border-top-style: solid;
+		border-top-width: 1px;
+	}
+
+	.uni-calendar--fixed-width {
+		width: 50px;
+		// padding: 0 15px;
+	}
+
+	.uni-calendar__backtoday {
+		position: absolute;
+		right: 0;
+		top: 25rpx;
+		padding: 0 5px;
+		padding-left: 10px;
+		height: 25px;
+		line-height: 25px;
+		font-size: 12px;
+		border-top-left-radius: 25px;
+		border-bottom-left-radius: 25px;
+		color: $uni-text-color;
+		background-color: $uni-bg-color-hover;
+	}
+
+	.uni-calendar__header-text {
+		text-align: center;
+		width: 100px;
+		font-size: $uni-font-size-base;
+		color: $uni-text-color;
+	}
+
+	.uni-calendar__header-btn-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		width: 50px;
+		height: 50px;
+	}
+
+	.uni-calendar__header-btn {
+		width: 10px;
+		height: 10px;
+		border-left-color: $uni-text-color-placeholder;
+		border-left-style: solid;
+		border-left-width: 2px;
+		border-top-color: $uni-color-subtitle;
+		border-top-style: solid;
+		border-top-width: 2px;
+	}
+
+	.uni-calendar--left {
+		transform: rotate(-45deg);
+	}
+
+	.uni-calendar--right {
+		transform: rotate(135deg);
+	}
+
+
+	.uni-calendar__weeks {
+		position: relative;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+	}
+
+	.uni-calendar__weeks-item {
+		flex: 1;
+	}
+
+	.uni-calendar__weeks-day {
+		flex: 1;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		height: 45px;
+		border-bottom-color: #F5F5F5;
+		border-bottom-style: solid;
+		border-bottom-width: 1px;
+	}
+
+	.uni-calendar__weeks-day-text {
+		font-size: 14px;
+	}
+
+	.uni-calendar__box {
+		position: relative;
+	}
+
+	.uni-calendar__box-bg {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		justify-content: center;
+		align-items: center;
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+	}
+
+	.uni-calendar__box-bg-text {
+		font-size: 200px;
+		font-weight: bold;
+		color: $uni-text-color-grey;
+		opacity: 0.1;
+		text-align: center;
+		/* #ifndef APP-NVUE */
+		line-height: 1;
+		/* #endif */
+	}
+</style>

+ 350 - 0
uni_modules/uni-calendar/components/uni-calendar/util.js

@@ -0,0 +1,350 @@
+import CALENDAR from './calendar.js'
+
+class Calendar {
+	constructor({
+		date,
+		selected,
+		startDate,
+		endDate,
+		range
+	} = {}) {
+		// 当前日期
+		this.date = this.getDate(new Date()) // 当前初入日期
+		// 打点信息
+		this.selected = selected || [];
+		// 范围开始
+		this.startDate = startDate
+		// 范围结束
+		this.endDate = endDate
+		this.range = range
+		// 多选状态
+		this.cleanMultipleStatus()
+		// 每周日期
+		this.weeks = {}
+		// this._getWeek(this.date.fullDate)
+	}
+	/**
+	 * 设置日期
+	 * @param {Object} date
+	 */
+	setDate(date) {
+		this.selectDate = this.getDate(date)
+		this._getWeek(this.selectDate.fullDate)
+	}
+
+	/**
+	 * 清理多选状态
+	 */
+	cleanMultipleStatus() {
+		this.multipleStatus = {
+			before: '',
+			after: '',
+			data: []
+		}
+	}
+
+	/**
+	 * 重置开始日期
+	 */
+	resetSatrtDate(startDate) {
+		// 范围开始
+		this.startDate = startDate
+
+	}
+
+	/**
+	 * 重置结束日期
+	 */
+	resetEndDate(endDate) {
+		// 范围结束
+		this.endDate = endDate
+	}
+
+	/**
+	 * 获取任意时间
+	 */
+	getDate(date, AddDayCount = 0, str = 'day') {
+		if (!date) {
+			date = new Date()
+		}
+		if (typeof date !== 'object') {
+			date = date.replace(/-/g, '/')
+		}
+		const dd = new Date(date)
+		switch (str) {
+			case 'day':
+				dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
+				break
+			case 'month':
+				if (dd.getDate() === 31) {
+					dd.setDate(dd.getDate() + AddDayCount)
+				} else {
+					dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期
+				}
+				break
+			case 'year':
+				dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期
+				break
+		}
+		const y = dd.getFullYear()
+		const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
+		const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
+		return {
+			fullDate: y + '-' + m + '-' + d,
+			year: y,
+			month: m,
+			date: d,
+			day: dd.getDay()
+		}
+	}
+
+
+	/**
+	 * 获取上月剩余天数
+	 */
+	_getLastMonthDays(firstDay, full) {
+		let dateArr = []
+		for (let i = firstDay; i > 0; i--) {
+			const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate()
+			dateArr.push({
+				date: beforeDate,
+				month: full.month - 1,
+				lunar: this.getlunar(full.year, full.month - 1, beforeDate),
+				disable: true
+			})
+		}
+		return dateArr
+	}
+	/**
+	 * 获取本月天数
+	 */
+	_currentMonthDys(dateData, full) {
+		let dateArr = []
+		let fullDate = this.date.fullDate
+		for (let i = 1; i <= dateData; i++) {
+			let nowDate = full.year + '-' + (full.month < 10 ?
+				full.month : full.month) + '-' + (i < 10 ?
+				'0' + i : i)
+			// 是否今天
+			let isDay = fullDate === nowDate
+			// 获取打点信息
+			let info = this.selected && this.selected.find((item) => {
+				if (this.dateEqual(nowDate, item.date)) {
+					return item
+				}
+			})
+
+			// 日期禁用
+			let disableBefore = true
+			let disableAfter = true
+			if (this.startDate) {
+				// let dateCompBefore = this.dateCompare(this.startDate, fullDate)
+				// disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)
+				disableBefore = this.dateCompare(this.startDate, nowDate)
+			}
+
+			if (this.endDate) {
+				// let dateCompAfter = this.dateCompare(fullDate, this.endDate)
+				// disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)
+				disableAfter = this.dateCompare(nowDate, this.endDate)
+			}
+			let multiples = this.multipleStatus.data
+			let checked = false
+			let multiplesStatus = -1
+			if (this.range) {
+				if (multiples) {
+					multiplesStatus = multiples.findIndex((item) => {
+						return this.dateEqual(item, nowDate)
+					})
+				}
+				if (multiplesStatus !== -1) {
+					checked = true
+				}
+			}
+			let data = {
+				fullDate: nowDate,
+				year: full.year,
+				date: i,
+				multiple: this.range ? checked : false,
+				beforeMultiple: this.dateEqual(this.multipleStatus.before, nowDate),
+				afterMultiple: this.dateEqual(this.multipleStatus.after, nowDate),
+				month: full.month,
+				lunar: this.getlunar(full.year, full.month, i),
+				disable: !(disableBefore && disableAfter),
+				isDay
+			}
+			if (info) {
+				data.extraInfo = info
+			}
+
+			dateArr.push(data)
+		}
+		return dateArr
+	}
+	/**
+	 * 获取下月天数
+	 */
+	_getNextMonthDays(surplus, full) {
+		let dateArr = []
+		for (let i = 1; i < surplus + 1; i++) {
+			dateArr.push({
+				date: i,
+				month: Number(full.month) + 1,
+				lunar: this.getlunar(full.year, Number(full.month) + 1, i),
+				disable: true
+			})
+		}
+		return dateArr
+	}
+
+	/**
+	 * 获取当前日期详情
+	 * @param {Object} date
+	 */
+	getInfo(date) {
+		if (!date) {
+			date = new Date()
+		}
+		const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate)
+		return dateInfo
+	}
+
+	/**
+	 * 比较时间大小
+	 */
+	dateCompare(startDate, endDate) {
+		// 计算截止时间
+		startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
+		// 计算详细项的截止时间
+		endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
+		if (startDate <= endDate) {
+			return true
+		} else {
+			return false
+		}
+	}
+
+	/**
+	 * 比较时间是否相等
+	 */
+	dateEqual(before, after) {
+		// 计算截止时间
+		before = new Date(before.replace('-', '/').replace('-', '/'))
+		// 计算详细项的截止时间
+		after = new Date(after.replace('-', '/').replace('-', '/'))
+		if (before.getTime() - after.getTime() === 0) {
+			return true
+		} else {
+			return false
+		}
+	}
+
+
+	/**
+	 * 获取日期范围内所有日期
+	 * @param {Object} begin
+	 * @param {Object} end
+	 */
+	geDateAll(begin, end) {
+		var arr = []
+		var ab = begin.split('-')
+		var ae = end.split('-')
+		var db = new Date()
+		db.setFullYear(ab[0], ab[1] - 1, ab[2])
+		var de = new Date()
+		de.setFullYear(ae[0], ae[1] - 1, ae[2])
+		var unixDb = db.getTime() - 24 * 60 * 60 * 1000
+		var unixDe = de.getTime() - 24 * 60 * 60 * 1000
+		for (var k = unixDb; k <= unixDe;) {
+			k = k + 24 * 60 * 60 * 1000
+			arr.push(this.getDate(new Date(parseInt(k))).fullDate)
+		}
+		return arr
+	}
+	/**
+	 * 计算阴历日期显示
+	 */
+	getlunar(year, month, date) {
+		return CALENDAR.solar2lunar(year, month, date)
+	}
+	/**
+	 * 设置打点
+	 */
+	setSelectInfo(data, value) {
+		this.selected = value
+		this._getWeek(data)
+	}
+
+	/**
+	 *  获取多选状态
+	 */
+	setMultiple(fullDate) {
+		let {
+			before,
+			after
+		} = this.multipleStatus
+
+		if (!this.range) return
+		if (before && after) {
+			this.multipleStatus.before = ''
+			this.multipleStatus.after = ''
+			this.multipleStatus.data = []
+		} else {
+			if (!before) {
+				this.multipleStatus.before = fullDate
+			} else {
+				this.multipleStatus.after = fullDate
+				if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
+					this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
+				} else {
+					this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
+				}
+			}
+		}
+		this._getWeek(fullDate)
+	}
+
+	/**
+	 * 获取每周数据
+	 * @param {Object} dateData
+	 */
+	_getWeek(dateData) {
+		const {
+			year,
+			month
+		} = this.getDate(dateData)
+		let firstDay = new Date(year, month - 1, 1).getDay()
+		let currentDay = new Date(year, month, 0).getDate()
+		let dates = {
+			lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天
+			currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数
+			nextMonthDays: [], // 下个月开始几天
+			weeks: []
+		}
+		let canlender = []
+		const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length)
+		dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData))
+		canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays)
+		let weeks = {}
+		// 拼接数组  上个月开始几天 + 本月天数+ 下个月开始几天
+		for (let i = 0; i < canlender.length; i++) {
+			if (i % 7 === 0) {
+				weeks[parseInt(i / 7)] = new Array(7)
+			}
+			weeks[parseInt(i / 7)][i % 7] = canlender[i]
+		}
+		this.canlender = canlender
+		this.weeks = weeks
+	}
+
+	//静态方法
+	// static init(date) {
+	// 	if (!this.instance) {
+	// 		this.instance = new Calendar(date);
+	// 	}
+	// 	return this.instance;
+	// }
+}
+
+
+export default Calendar

+ 88 - 0
uni_modules/uni-calendar/package.json

@@ -0,0 +1,88 @@
+{
+  "id": "uni-calendar",
+  "displayName": "uni-calendar 日历",
+  "version": "1.4.5",
+  "description": "日历组件",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "日历",
+    "",
+    "打卡",
+    "日历选择"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "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"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 103 - 0
uni_modules/uni-calendar/readme.md

@@ -0,0 +1,103 @@
+
+
+## Calendar 日历
+> **组件名:uni-calendar**
+> 代码块: `uCalendar`
+
+
+日历组件
+
+> **注意事项**
+> 为了避免错误使用,给大家带来不好的开发体验,请在使用组件前仔细阅读下面的注意事项,可以帮你避免一些错误。
+> - 本组件农历转换使用的js是 [@1900-2100区间内的公历、农历互转](https://github.com/jjonline/calendar.js)  
+> - 仅支持自定义组件模式
+> - `date`属性传入的应该是一个 String ,如: 2019-06-27 ,而不是 new Date()
+> - 通过 `insert` 属性来确定当前的事件是 @change 还是 @confirm 。理应合并为一个事件,但是为了区分模式,现使用两个事件,这里需要注意
+> - 弹窗模式下无法阻止后面的元素滚动,如有需要阻止,请在弹窗弹出后,手动设置滚动元素为不可滚动
+
+
+### 安装方式
+
+本组件符合[easycom](https://uniapp.dcloud.io/collocation/pages?id=easycom)规范,`HBuilderX 2.5.5`起,只需将本组件导入项目,在页面`template`中即可直接使用,无需在页面中`import`和注册`components`。
+
+如需通过`npm`方式使用`uni-ui`组件,另见文档:[https://ext.dcloud.net.cn/plugin?id=55](https://ext.dcloud.net.cn/plugin?id=55)
+
+### 基本用法
+
+在 ``template`` 中使用组件
+
+```html
+<view>
+	<uni-calendar 
+	:insert="true"
+	:lunar="true" 
+	:start-date="'2019-3-2'"
+	:end-date="'2019-5-20'"
+	@change="change"
+	 />
+</view>
+```
+
+### 通过方法打开日历
+
+需要设置 `insert` 为 `false`
+
+```html
+<view>
+	<uni-calendar 
+	ref="calendar"
+	:insert="false"
+	@confirm="confirm"
+	 />
+	 <button @click="open">打开日历</button>
+</view>
+```
+
+```javascript
+
+export default {
+	data() {
+		return {};
+	},
+	methods: {
+		open(){
+			this.$refs.calendar.open();
+		},
+		confirm(e) {
+			console.log(e);
+		}
+	}
+};
+
+```
+
+
+## API
+
+### Calendar Props
+
+|  属性名	|    类型	| 默认值| 说明																													|
+| 		| 																													|
+| date		| String	|-		| 自定义当前时间,默认为今天																							|
+| lunar		| Boolean	| false	| 显示农历																												|
+| startDate	| String	|-		| 日期选择范围-开始日期																									|
+| endDate	| String	|-		| 日期选择范围-结束日期																									|
+| range		| Boolean	| false	| 范围选择																												|
+| insert	| Boolean	| false	| 插入模式,可选值,ture:插入模式;false:弹窗模式;默认为插入模式														|
+|clearDate	|Boolean	|true	|弹窗模式是否清空上次选择内容	|
+| selected	| Array		|-		| 打点,期待格式[{date: '2019-06-27', info: '签到', data: { custom: '自定义信息', name: '自定义消息头',xxx:xxx... }}]	|
+|showMonth	| Boolean	| true	| 是否显示月份为背景																									|
+
+### Calendar Events
+
+|  事件名		| 说明								|返回值|
+| 								|		| 									|
+| open	| 弹出日历组件,`insert :false` 时生效|- 	|
+
+
+
+
+
+## 组件示例
+
+点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar](https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar)

+ 26 - 0
uni_modules/uni-card/changelog.md

@@ -0,0 +1,26 @@
+## 1.3.1(2021-12-20)
+- 修复 在vue页面下略缩图显示不正常的bug
+## 1.3.0(2021-11-19)
+- 重构插槽的用法 ,header 替换为 title 
+- 新增 actions 插槽
+- 新增 cover 封面图属性和插槽
+- 新增 padding 内容默认内边距离
+- 新增 margin 卡片默认外边距离
+- 新增 spacing 卡片默认内边距
+- 新增 shadow 卡片阴影属性
+- 取消 mode 属性,可使用组合插槽代替
+- 取消 note 属性 ,使用actions插槽代替
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-card](https://uniapp.dcloud.io/component/uniui/uni-card)
+## 1.2.1(2021-07-30)
+- 优化 vue3下事件警告的问题
+## 1.2.0(2021-07-13)
+- 组件兼容 vue3,如何创建vue3项目详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.8(2021-07-01)
+- 优化 图文卡片无图片加载时,提供占位图标
+- 新增 header 插槽,自定义卡片头部( 图文卡片 mode="style" 时,不支持)
+- 修复 thumbnail 不存在仍然占位的 bug
+## 1.1.7(2021-05-12)
+- 新增 组件示例地址
+## 1.1.6(2021-02-04)
+- 调整为uni_modules目录规范

+ 270 - 0
uni_modules/uni-card/components/uni-card/uni-card.vue

@@ -0,0 +1,270 @@
+<template>
+	<view class="uni-card" :class="{ 'uni-card--full': isFull, 'uni-card--shadow': isShadow,'uni-card--border':border}"
+		:style="{'margin':isFull?0:margin,'padding':spacing,'box-shadow':isShadow?shadow:''}">
+		<!-- 封面 -->
+		<slot name="cover">
+			<view v-if="cover" class="uni-card__cover">
+				<image class="uni-card__cover-image" mode="widthFix" @click="onClick('cover')" :src="cover"></image>
+			</view>
+		</slot>
+		<slot name="title">
+			<view v-if="title || extra" class="uni-card__header">
+				<!-- 卡片标题 -->
+				<view class="uni-card__header-box" @click="onClick('title')">
+					<view v-if="thumbnail" class="uni-card__header-avatar">
+						<image class="uni-card__header-avatar-image" :src="thumbnail" mode="aspectFit" />
+					</view>
+					<view class="uni-card__header-content">
+						<text class="uni-card__header-content-title uni-ellipsis">{{ title }}</text>
+						<text v-if="title&&subTitle"
+							class="uni-card__header-content-subtitle uni-ellipsis">{{ subTitle }}</text>
+					</view>
+				</view>
+				<view class="uni-card__header-extra" @click="onClick('extra')">
+					<text class="uni-card__header-extra-text">{{ extra }}</text>
+				</view>
+			</view>
+		</slot>
+		<!-- 卡片内容 -->
+		<view class="uni-card__content" :style="{padding:padding}" @click="onClick('content')">
+			<slot></slot>
+		</view>
+		<view class="uni-card__actions" @click="onClick('actions')">
+			<slot name="actions"></slot>
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * Card 卡片
+	 * @description 卡片视图组件
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=22
+	 * @property {String} title 标题文字
+	 * @property {String} subTitle 副标题
+	 * @property {Number} padding 内容内边距
+	 * @property {Number} margin 卡片外边距
+	 * @property {Number} spacing 卡片内边距
+	 * @property {String} extra 标题额外信息
+	 * @property {String} cover 封面图(本地路径需要引入)
+	 * @property {String} thumbnail 标题左侧缩略图
+	 * @property {Boolean} is-full = [true | false] 卡片内容是否通栏,为 true 时将去除padding值
+	 * @property {Boolean} is-shadow = [true | false] 卡片内容是否开启阴影
+	 * @property {String} shadow 卡片阴影
+	 * @property {Boolean} border 卡片边框
+	 * @event {Function} click 点击 Card 触发事件
+	 */
+	export default {
+		name: 'UniCard',
+		emits: ['click'],
+		props: {
+			title: {
+				type: String,
+				default: ''
+			},
+			subTitle: {
+				type: String,
+				default: ''
+			},
+			padding: {
+				type: String,
+				default: '10px'
+			},
+			margin: {
+				type: String,
+				default: '15px'
+			},
+			spacing: {
+				type: String,
+				default: '0 10px'
+			},
+			extra: {
+				type: String,
+				default: ''
+			},
+			cover: {
+				type: String,
+				default: ''
+			},
+			thumbnail: {
+				type: String,
+				default: ''
+			},
+			isFull: {
+				// 内容区域是否通栏
+				type: Boolean,
+				default: false
+			},
+			isShadow: {
+				// 是否开启阴影
+				type: Boolean,
+				default: true
+			},
+			shadow: {
+				type: String,
+				default: '0px 0px 3px 1px rgba(0, 0, 0, 0.08)'
+			},
+			border: {
+				type: Boolean,
+				default: true
+			}
+		},
+		methods: {
+			onClick(type) {
+				this.$emit('click', type)
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	$uni-border-3: #EBEEF5 !default;
+	$uni-shadow-base:0 0px 6px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
+	$uni-main-color: #3a3a3a !default;
+	$uni-base-color: #6a6a6a !default;
+	$uni-secondary-color: #909399 !default;
+	$uni-spacing-sm: 8px !default;
+	$uni-border-color:$uni-border-3;
+	$uni-shadow: $uni-shadow-base;
+	$uni-card-title: 15px;
+	$uni-cart-title-color:$uni-main-color;
+	$uni-card-subtitle: 12px;
+	$uni-cart-subtitle-color:$uni-secondary-color;
+	$uni-card-spacing: 10px;
+	$uni-card-content-color: $uni-base-color;
+
+	.uni-card {
+		margin: $uni-card-spacing;
+		padding: 0 $uni-spacing-sm;
+		border-radius: 4px;
+		overflow: hidden;
+		font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
+		background-color: #fff;
+		flex: 1;
+
+		.uni-card__cover {
+			position: relative;
+			margin-top: $uni-card-spacing;
+			flex-direction: row;
+			overflow: hidden;
+			border-radius: 4px;
+			.uni-card__cover-image {
+				flex: 1;
+				// width: 100%;
+				/* #ifndef APP-PLUS */
+				vertical-align: middle;
+				/* #endif */
+			}
+		}
+
+		.uni-card__header {
+			display: flex;
+			border-bottom: 1px $uni-border-color solid;
+			flex-direction: row;
+			align-items: center;
+			padding: $uni-card-spacing;
+			overflow: hidden;
+
+			.uni-card__header-box {
+				/* #ifndef APP-NVUE */
+				display: flex;
+				/* #endif */
+				flex: 1;
+				flex-direction: row;
+				align-items: center;
+				overflow: hidden;
+			}
+
+			.uni-card__header-avatar {
+				width: 40px;
+				height: 40px;
+				overflow: hidden;
+				border-radius: 5px;
+				margin-right: $uni-card-spacing;
+				.uni-card__header-avatar-image {
+					flex: 1;
+					width: 40px;
+					height: 40px;
+				}
+			}
+
+			.uni-card__header-content {
+				/* #ifndef APP-NVUE */
+				display: flex;
+				/* #endif */
+				flex-direction: column;
+				justify-content: center;
+				flex: 1;
+				// height: 40px;
+				overflow: hidden;
+
+				.uni-card__header-content-title {
+					font-size: $uni-card-title;
+					color: $uni-cart-title-color;
+					// line-height: 22px;
+				}
+
+				.uni-card__header-content-subtitle {
+					font-size: $uni-card-subtitle;
+					margin-top: 5px;
+					color: $uni-cart-subtitle-color;
+				}
+			}
+
+			.uni-card__header-extra {
+				line-height: 12px;
+
+				.uni-card__header-extra-text {
+					font-size: 12px;
+					color: $uni-cart-subtitle-color;
+				}
+			}
+		}
+
+		.uni-card__content {
+			padding: $uni-card-spacing;
+			font-size: 14px;
+			color: $uni-card-content-color;
+			line-height: 22px;
+		}
+
+		.uni-card__actions {
+			font-size: 12px;
+		}
+	}
+
+	.uni-card--border {
+		border: 1px solid $uni-border-color;
+	}
+
+	.uni-card--shadow {
+		position: relative;
+		/* #ifndef APP-NVUE */
+		box-shadow: $uni-shadow;
+		/* #endif */
+	}
+
+	.uni-card--full {
+		margin: 0;
+		border-left-width: 0;
+		border-left-width: 0;
+		border-radius: 0;
+	}
+
+	/* #ifndef APP-NVUE */
+	.uni-card--full:after {
+		border-radius: 0;
+	}
+
+	/* #endif */
+	.uni-ellipsis {
+		/* #ifndef APP-NVUE */
+		overflow: hidden;
+		white-space: nowrap;
+		text-overflow: ellipsis;
+		/* #endif */
+		/* #ifdef APP-NVUE */
+		lines: 1;
+		/* #endif */
+	}
+</style>

+ 90 - 0
uni_modules/uni-card/package.json

@@ -0,0 +1,90 @@
+{
+  "id": "uni-card",
+  "displayName": "uni-card 卡片",
+  "version": "1.3.1",
+  "description": "Card 组件,提供常见的卡片样式。",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "card",
+    "",
+    "卡片"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [
+			"uni-icons",
+			"uni-scss"
+		],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "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"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 12 - 0
uni_modules/uni-card/readme.md

@@ -0,0 +1,12 @@
+
+
+## Card 卡片
+> **组件名:uni-card**
+> 代码块: `uCard`
+
+卡片视图组件。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-card)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 
+
+

+ 36 - 0
uni_modules/uni-collapse/changelog.md

@@ -0,0 +1,36 @@
+## 1.4.3(2022-01-25)
+- 修复 初始化的时候 ,open 属性失效的bug
+## 1.4.2(2022-01-21)
+- 修复 微信小程序resize后组件收起的bug
+## 1.4.1(2021-11-22)
+- 修复 vue3中个别scss变量无法找到的问题
+## 1.4.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-collapse](https://uniapp.dcloud.io/component/uniui/uni-collapse)
+## 1.3.3(2021-08-17)
+- 优化 show-arrow 属性默认为true
+## 1.3.2(2021-08-17)
+- 新增 show-arrow 属性,控制是否显示右侧箭头
+## 1.3.1(2021-07-30)
+- 优化 vue3下小程序事件警告的问题
+## 1.3.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.2.2(2021-07-21)
+- 修复 由1.2.0版本引起的 change 事件返回 undefined 的Bug
+## 1.2.1(2021-07-21)
+- 优化 组件示例
+## 1.2.0(2021-07-21)
+- 新增 组件折叠动画
+- 新增 value\v-model 属性 ,动态修改面板折叠状态
+- 新增 title 插槽 ,可定义面板标题
+- 新增 border 属性 ,显示隐藏面板内容分隔线
+- 新增 title-border 属性 ,显示隐藏面板标题分隔线
+- 修复 resize 方法失效的Bug
+- 修复 change 事件返回参数不正确的Bug
+- 优化 H5、App 平台自动更具内容更新高度,无需调用 reszie() 方法
+## 1.1.7(2021-05-12)
+- 新增 组件示例地址
+## 1.1.6(2021-02-05)
+- 优化 组件引用关系,通过uni_modules引用组件
+## 1.1.5(2021-02-05)
+- 调整为uni_modules目录规范

+ 402 - 0
uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue

@@ -0,0 +1,402 @@
+<template>
+	<view class="uni-collapse-item">
+		<!-- onClick(!isOpen) -->
+		<view @click="onClick(!isOpen)" class="uni-collapse-item__title"
+			:class="{'is-open':isOpen &&titleBorder === 'auto' ,'uni-collapse-item-border':titleBorder !== 'none'}">
+			<view class="uni-collapse-item__title-wrap">
+				<slot name="title">
+					<view class="uni-collapse-item__title-box" :class="{'is-disabled':disabled}">
+						<image v-if="thumb" :src="thumb" class="uni-collapse-item__title-img" />
+						<text class="uni-collapse-item__title-text">{{ title }}</text>
+					</view>
+				</slot>
+			</view>
+			<view v-if="showArrow"
+				:class="{ 'uni-collapse-item__title-arrow-active': isOpen, 'uni-collapse-item--animation': showAnimation === true }"
+				class="uni-collapse-item__title-arrow">
+				<uni-icons :color="disabled?'#ddd':'#bbb'" size="14" type="bottom" />
+			</view>
+		</view>
+		<view class="uni-collapse-item__wrap" :class="{'is--transition':showAnimation}"
+			:style="{height: (isOpen?height:0) +'px'}">
+			<view :id="elId" ref="collapse--hook" class="uni-collapse-item__wrap-content"
+				:class="{open:isheight,'uni-collapse-item--border':border&&isOpen}">
+				<slot></slot>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	// #ifdef APP-NVUE
+	const dom = weex.requireModule('dom')
+	// #endif
+	/**
+	 * CollapseItem 折叠面板子组件
+	 * @description 折叠面板子组件
+	 * @property {String} title 标题文字
+	 * @property {String} thumb 标题左侧缩略图
+	 * @property {String} name 唯一标志符
+	 * @property {Boolean} open = [true|false] 是否展开组件
+	 * @property {Boolean} titleBorder = [true|false] 是否显示标题分隔线
+	 * @property {Boolean} border = [true|false] 是否显示分隔线
+	 * @property {Boolean} disabled = [true|false] 是否展开面板
+	 * @property {Boolean} showAnimation = [true|false] 开启动画
+	 * @property {Boolean} showArrow = [true|false] 是否显示右侧箭头
+	 */
+	export default {
+		name: 'uniCollapseItem',
+		props: {
+			// 列表标题
+			title: {
+				type: String,
+				default: ''
+			},
+			name: {
+				type: [Number, String],
+				default: ''
+			},
+			// 是否禁用
+			disabled: {
+				type: Boolean,
+				default: false
+			},
+			// #ifdef APP-PLUS
+			// 是否显示动画,app 端默认不开启动画,卡顿严重
+			showAnimation: {
+				type: Boolean,
+				default: false
+			},
+			// #endif
+			// #ifndef APP-PLUS
+			// 是否显示动画
+			showAnimation: {
+				type: Boolean,
+				default: true
+			},
+			// #endif
+			// 是否展开
+			open: {
+				type: Boolean,
+				default: false
+			},
+			// 缩略图
+			thumb: {
+				type: String,
+				default: ''
+			},
+			// 标题分隔线显示类型
+			titleBorder: {
+				type: String,
+				default: 'auto'
+			},
+			border: {
+				type: Boolean,
+				default: true
+			},
+			showArrow: {
+				type: Boolean,
+				default: true
+			}
+		},
+		data() {
+			// TODO 随机生生元素ID,解决百度小程序获取同一个元素位置信息的bug
+			const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
+			return {
+				isOpen: false,
+				isheight: null,
+				height: 0,
+				elId,
+				nameSync: 0
+			}
+		},
+		watch: {
+			open(val) {
+				this.isOpen = val
+				this.onClick(val, 'init')
+			}
+		},
+		updated(e) {
+			this.$nextTick(() => {
+				this.init(true)
+			})
+		},
+		created() {
+			this.collapse = this.getCollapse()
+			this.oldHeight = 0
+			this.onClick(this.open, 'init')
+		},
+		// #ifndef VUE3
+		// TODO vue2
+		destroyed() {
+			if (this.__isUnmounted) return
+			this.uninstall()
+		},
+		// #endif
+		// #ifdef VUE3
+		// TODO vue3
+		unmounted() {
+			this.__isUnmounted = true
+			this.uninstall()
+		},
+		// #endif
+		mounted() {
+			if (!this.collapse) return
+			if (this.name !== '') {
+				this.nameSync = this.name
+			} else {
+				this.nameSync = this.collapse.childrens.length + ''
+			}
+			if (this.collapse.names.indexOf(this.nameSync) === -1) {
+				this.collapse.names.push(this.nameSync)
+			} else {
+				console.warn(`name 值 ${this.nameSync} 重复`);
+			}
+			if (this.collapse.childrens.indexOf(this) === -1) {
+				this.collapse.childrens.push(this)
+			}
+			this.init()
+		},
+		methods: {
+			init(type) {
+				// #ifndef APP-NVUE
+				this.getCollapseHeight(type)
+				// #endif
+				// #ifdef APP-NVUE
+				this.getNvueHwight(type)
+				// #endif
+			},
+			uninstall() {
+				if (this.collapse) {
+					this.collapse.childrens.forEach((item, index) => {
+						if (item === this) {
+							this.collapse.childrens.splice(index, 1)
+						}
+					})
+					this.collapse.names.forEach((item, index) => {
+						if (item === this.nameSync) {
+							this.collapse.names.splice(index, 1)
+						}
+					})
+				}
+			},
+			onClick(isOpen, type) {
+				if (this.disabled) return
+				this.isOpen = isOpen
+				if (this.isOpen && this.collapse) {
+					this.collapse.setAccordion(this)
+				}
+				if (type !== 'init') {
+					this.collapse.onChange(isOpen, this)
+				}
+			},
+			getCollapseHeight(type, index = 0) {
+				const views = uni.createSelectorQuery().in(this)
+				views
+					.select(`#${this.elId}`)
+					.fields({
+						size: true
+					}, data => {
+						// TODO 百度中可能获取不到节点信息 ,需要循环获取
+						if (index >= 10) return
+						if (!data) {
+							index++
+							this.getCollapseHeight(false, index)
+							return
+						}
+						// #ifdef APP-NVUE
+						this.height = data.height + 1
+						// #endif
+						// #ifndef APP-NVUE
+						this.height = data.height
+						// #endif
+						this.isheight = true
+						if (type) return
+						this.onClick(this.isOpen, 'init')
+					})
+					.exec()
+			},
+			getNvueHwight(type) {
+				const result = dom.getComponentRect(this.$refs['collapse--hook'], option => {
+					if (option && option.result && option.size) {
+						// #ifdef APP-NVUE
+						this.height = option.size.height + 1
+						// #endif
+						// #ifndef APP-NVUE
+						this.height = option.size.height
+						// #endif
+						this.isheight = true
+						if (type) return
+						this.onClick(this.open, 'init')
+					}
+				})
+			},
+			/**
+			 * 获取父元素实例
+			 */
+			getCollapse(name = 'uniCollapse') {
+				let parent = this.$parent;
+				let parentName = parent.$options.name;
+				while (parentName !== name) {
+					parent = parent.$parent;
+					if (!parent) return false;
+					parentName = parent.$options.name;
+				}
+				return parent;
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.uni-collapse-item {
+		/* #ifndef APP-NVUE */
+		box-sizing: border-box;
+
+		/* #endif */
+		&__title {
+			/* #ifndef APP-NVUE */
+			display: flex;
+			width: 100%;
+			box-sizing: border-box;
+			/* #endif */
+			flex-direction: row;
+			align-items: center;
+			transition: border-bottom-color .3s;
+
+			// transition-property: border-bottom-color;
+			// transition-duration: 5s;
+			&-wrap {
+				width: 100%;
+				flex: 1;
+
+			}
+
+			&-box {
+				padding: 0 15px;
+				/* #ifndef APP-NVUE */
+				display: flex;
+				width: 100%;
+				box-sizing: border-box;
+				/* #endif */
+				flex-direction: row;
+				justify-content: space-between;
+				align-items: center;
+				height: 48px;
+				line-height: 48px;
+				background-color: #fff;
+				color: #303133;
+				font-size: 13px;
+				font-weight: 500;
+				/* #ifdef H5 */
+				cursor: pointer;
+				outline: none;
+
+				/* #endif */
+				&.is-disabled {
+					.uni-collapse-item__title-text {
+						color: #999;
+					}
+				}
+
+			}
+
+			&.uni-collapse-item-border {
+				border-bottom: 1px solid #ebeef5;
+			}
+
+			&.is-open {
+				border-bottom-color: transparent;
+			}
+
+			&-img {
+				height: 22px;
+				width: 22px;
+				margin-right: 10px;
+			}
+
+			&-text {
+				flex: 1;
+				font-size: 14px;
+				/* #ifndef APP-NVUE */
+				white-space: nowrap;
+				color: inherit;
+				/* #endif */
+				/* #ifdef APP-NVUE */
+				lines: 1;
+				/* #endif */
+				overflow: hidden;
+				text-overflow: ellipsis;
+			}
+
+			&-arrow {
+				/* #ifndef APP-NVUE */
+				display: flex;
+				box-sizing: border-box;
+				/* #endif */
+				align-items: center;
+				justify-content: center;
+				width: 20px;
+				height: 20px;
+				margin-right: 10px;
+				transform: rotate(0deg);
+
+				&-active {
+					transform: rotate(-180deg);
+				}
+			}
+
+
+		}
+
+		&__wrap {
+			/* #ifndef APP-NVUE */
+			will-change: height;
+			box-sizing: border-box;
+			/* #endif */
+			background-color: #fff;
+			overflow: hidden;
+			position: relative;
+			height: 0;
+
+			&.is--transition {
+				// transition: all 0.3s;
+				transition-property: height, border-bottom-width;
+				transition-duration: 0.3s;
+				/* #ifndef APP-NVUE */
+				will-change: height;
+				/* #endif */
+			}
+
+
+
+			&-content {
+				position: absolute;
+				font-size: 13px;
+				color: #303133;
+				// transition: height 0.3s;
+				border-bottom-color: transparent;
+				border-bottom-style: solid;
+				border-bottom-width: 0;
+
+				&.uni-collapse-item--border {
+					border-bottom-width: 1px;
+					border-bottom-color: red;
+					border-bottom-color: #ebeef5;
+				}
+
+				&.open {
+					position: relative;
+				}
+			}
+		}
+
+		&--animation {
+			transition-property: transform;
+			transition-duration: 0.3s;
+			transition-timing-function: ease;
+		}
+
+	}
+</style>

+ 147 - 0
uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue

@@ -0,0 +1,147 @@
+<template>
+	<view class="uni-collapse">
+		<slot />
+	</view>
+</template>
+<script>
+	/**
+	 * Collapse 折叠面板
+	 * @description 展示可以折叠 / 展开的内容区域
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=23
+	 * @property {String|Array} value 当前激活面板改变时触发(如果是手风琴模式,参数类型为string,否则为array)
+	 * @property {Boolean} accordion = [true|false] 是否开启手风琴效果是否开启手风琴效果
+	 * @event {Function} change 切换面板时触发,如果是手风琴模式,返回类型为string,否则为array
+	 */
+	export default {
+		name: 'uniCollapse',
+		emits:['change','activeItem','input','update:modelValue'],
+		props: {
+			value: {
+				type: [String, Array],
+				default: ''
+			},
+			modelValue: {
+				type: [String, Array],
+				default: ''
+			},
+			accordion: {
+				// 是否开启手风琴效果
+				type: [Boolean, String],
+				default: false
+			},
+		},
+		data() {
+			return {}
+		},
+		computed: {
+			// TODO 兼容 vue2 和 vue3
+			dataValue() {
+				let value = (typeof this.value === 'string' && this.value === '') ||
+					(Array.isArray(this.value) && this.value.length === 0)
+				let modelValue = (typeof this.modelValue === 'string' && this.modelValue === '') ||
+					(Array.isArray(this.modelValue) && this.modelValue.length === 0)
+				if (value) {
+					return this.modelValue
+				}
+				if (modelValue) {
+					return this.value
+				}
+
+				return this.value
+			}
+		},
+		watch: {
+			dataValue(val) {
+				this.setOpen(val)
+			}
+		},
+		created() {
+			this.childrens = []
+			this.names = []
+		},
+		mounted() {
+			this.$nextTick(()=>{
+				this.setOpen(this.dataValue)
+			})
+		},
+		methods: {
+			setOpen(val) {
+				let str = typeof val === 'string'
+				let arr = Array.isArray(val)
+				this.childrens.forEach((vm, index) => {
+					if (str) {
+						if (val === vm.nameSync) {
+							if (!this.accordion) {
+								console.warn('accordion 属性为 false ,v-model 类型应该为 array')
+								return
+							}
+							vm.isOpen = true
+						}
+					}
+					if (arr) {
+						val.forEach(v => {
+							if (v === vm.nameSync) {
+								if (this.accordion) {
+									console.warn('accordion 属性为 true ,v-model 类型应该为 string')
+									return
+								}
+								vm.isOpen = true
+							}
+						})
+					}
+				})
+				this.emit(val)
+			},
+			setAccordion(self) {
+				if (!this.accordion) return
+				this.childrens.forEach((vm, index) => {
+					if (self !== vm) {
+						vm.isOpen = false
+					}
+				})
+			},
+			resize() {
+				this.childrens.forEach((vm, index) => {
+					// #ifndef APP-NVUE
+					vm.getCollapseHeight()
+					// #endif
+					// #ifdef APP-NVUE
+					vm.getNvueHwight()
+					// #endif
+				})
+			},
+			onChange(isOpen, self) {
+				let activeItem = []
+
+				if (this.accordion) {
+					activeItem = isOpen ? self.nameSync : ''
+				} else {
+					this.childrens.forEach((vm, index) => {
+						if (vm.isOpen) {
+							activeItem.push(vm.nameSync)
+						}
+					})
+				}
+				this.$emit('change', activeItem)
+				this.emit(activeItem)
+			},
+			emit(val){
+				this.$emit('input', val)
+				this.$emit('update:modelValue', val)
+			}
+		}
+	}
+</script>
+<style lang="scss" >
+	.uni-collapse {
+		/* #ifndef APP-NVUE */
+		width: 100%;
+		display: flex;
+		/* #endif */
+		/* #ifdef APP-NVUE */
+		flex: 1;
+		/* #endif */
+		flex-direction: column;
+		background-color: #fff;
+	}
+</style>

+ 89 - 0
uni_modules/uni-collapse/package.json

@@ -0,0 +1,89 @@
+{
+  "id": "uni-collapse",
+  "displayName": "uni-collapse 折叠面板",
+  "version": "1.4.3",
+  "description": "Collapse 组件,可以折叠 / 展开的内容区域。",
+  "keywords": [
+    "uni-ui",
+    "折叠",
+    "折叠面板",
+    "手风琴"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [
+			"uni-scss",
+      "uni-icons"
+    ],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "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"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 12 - 0
uni_modules/uni-collapse/readme.md

@@ -0,0 +1,12 @@
+
+
+## Collapse 折叠面板
+> **组件名:uni-collapse**
+> 代码块: `uCollapse`
+> 关联组件:`uni-collapse-item`、`uni-icons`。
+
+
+折叠面板用来折叠/显示过长的内容或者是列表。通常是在多内容分类项使用,折叠不重要的内容,显示重要内容。点击可以展开折叠部分。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-collapse)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 15 - 0
uni_modules/uni-combox/changelog.md

@@ -0,0 +1,15 @@
+## 1.0.1(2021-11-23)
+- 优化 label、label-width 属性
+## 1.0.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-combox](https://uniapp.dcloud.io/component/uniui/uni-combox)
+## 0.1.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 0.0.6(2021-05-12)
+- 新增 组件示例地址
+## 0.0.5(2021-04-21)
+- 优化 添加依赖 uni-icons, 导入后自动下载依赖
+## 0.0.4(2021-02-05)
+- 优化 组件引用关系,通过uni_modules引用组件
+## 0.0.3(2021-02-04)
+- 调整为uni_modules目录规范

+ 275 - 0
uni_modules/uni-combox/components/uni-combox/uni-combox.vue

@@ -0,0 +1,275 @@
+<template>
+	<view class="uni-combox" :class="border ? '' : 'uni-combox__no-border'">
+		<view v-if="label" class="uni-combox__label" :style="labelStyle">
+			<text>{{label}}</text>
+		</view>
+		<view class="uni-combox__input-box">
+			<input class="uni-combox__input" type="text" :placeholder="placeholder" 
+			placeholder-class="uni-combox__input-plac" v-model="inputVal" @input="onInput" @focus="onFocus" 
+@blur="onBlur" />
+			<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" @click="toggleSelector">
+			</uni-icons>
+		</view>
+		<view class="uni-combox__selector" v-if="showSelector">
+			<view class="uni-popper__arrow"></view>
+			<scroll-view scroll-y="true" class="uni-combox__selector-scroll">
+				<view class="uni-combox__selector-empty" v-if="filterCandidatesLength === 0">
+					<text>{{emptyTips}}</text>
+				</view>
+				<view class="uni-combox__selector-item" v-for="(item,index) in filterCandidates" :key="index" 
+				@click="onSelectorClick(index)">
+					<text>{{item}}</text>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * Combox 组合输入框
+	 * @description 组合输入框一般用于既可以输入也可以选择的场景
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=1261
+	 * @property {String} label 左侧文字
+	 * @property {String} labelWidth 左侧内容宽度
+	 * @property {String} placeholder 输入框占位符
+	 * @property {Array} candidates 候选项列表
+	 * @property {String} emptyTips 筛选结果为空时显示的文字
+	 * @property {String} value 组合框的值
+	 */
+	export default {
+		name: 'uniCombox',
+		emits: ['input', 'update:modelValue'],
+		props: {
+			border: {
+				type: Boolean,
+				default: true
+			},
+			label: {
+				type: String,
+				default: ''
+			},
+			labelWidth: {
+				type: String,
+				default: 'auto'
+			},
+			placeholder: {
+				type: String,
+				default: ''
+			},
+			candidates: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			emptyTips: {
+				type: String,
+				default: '无匹配项'
+			},
+			// #ifndef VUE3
+			value: {
+				type: [String, Number],
+				default: ''
+			},
+			// #endif
+			// #ifdef VUE3
+			modelValue: {
+				type: [String, Number],
+				default: ''
+			},
+			// #endif
+		},
+		data() {
+			return {
+				showSelector: false,
+				inputVal: ''
+			}
+		},
+		computed: {
+			labelStyle() {
+				if (this.labelWidth === 'auto') {
+					return ""
+				}
+				return `width: ${this.labelWidth}`
+			},
+			filterCandidates() {
+				return this.candidates.filter((item) => {
+					return item.toString().indexOf(this.inputVal) > -1
+				})
+			},
+			filterCandidatesLength() {
+				return this.filterCandidates.length
+			}
+		},
+		watch: {
+			// #ifndef VUE3
+			value: {
+				handler(newVal) {
+					this.inputVal = newVal
+				},
+				immediate: true
+			},
+			// #endif
+			// #ifdef VUE3
+			modelValue: {
+				handler(newVal) {
+					this.inputVal = newVal
+				},
+				immediate: true
+			},
+			// #endif
+		},
+		methods: {
+			toggleSelector() {
+				this.showSelector = !this.showSelector
+			},
+			onFocus() {
+				this.showSelector = true
+			},
+			onBlur() {
+				setTimeout(() => {
+					this.showSelector = false
+				}, 153)
+			},
+			onSelectorClick(index) {
+				this.inputVal = this.filterCandidates[index]
+				this.showSelector = false
+				this.$emit('input', this.inputVal)
+				this.$emit('update:modelValue', this.inputVal)
+			},
+			onInput() {
+				setTimeout(() => {
+					this.$emit('input', this.inputVal)
+					this.$emit('update:modelValue', this.inputVal)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" >
+	.uni-combox {
+		font-size: 14px;
+		border: 1px solid #DCDFE6;
+		border-radius: 4px;
+		padding: 6px 10px;
+		position: relative;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		// height: 40px;
+		flex-direction: row;
+		align-items: center;
+		// border-bottom: solid 1px #DDDDDD;
+	}
+
+	.uni-combox__label {
+		font-size: 16px;
+		line-height: 22px;
+		padding-right: 10px;
+		color: #999999;
+	}
+
+	.uni-combox__input-box {
+		position: relative;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex: 1;
+		flex-direction: row;
+		align-items: center;
+	}
+
+	.uni-combox__input {
+		flex: 1;
+		font-size: 14px;
+		height: 22px;
+		line-height: 22px;
+	}
+
+	.uni-combox__input-plac {
+		font-size: 14px;
+		color: #999;
+	}
+
+	.uni-combox__selector {
+		/* #ifndef APP-NVUE */
+		box-sizing: border-box;
+		/* #endif */
+		position: absolute;
+		top: calc(100% + 12px);
+		left: 0;
+		width: 100%;
+		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;
+	}
+
+	.uni-combox__selector-scroll {
+		/* #ifndef APP-NVUE */
+		max-height: 200px;
+		box-sizing: border-box;
+		/* #endif */
+	}
+
+	.uni-combox__selector-empty,
+	.uni-combox__selector-item {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		cursor: pointer;
+		/* #endif */
+		line-height: 36px;
+		font-size: 14px;
+		text-align: center;
+		// border-bottom: solid 1px #DDDDDD;
+		padding: 0px 10px;
+	}
+
+	.uni-combox__selector-item:hover {
+		background-color: #f9f9f9;
+	}
+
+	.uni-combox__selector-empty:last-child,
+	.uni-combox__selector-item:last-child {
+		/* #ifndef APP-NVUE */
+		border-bottom: none;
+		/* #endif */
+	}
+
+	// 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;
+	}
+
+	.uni-combox__no-border {
+		border: none;
+	}
+</style>

+ 90 - 0
uni_modules/uni-combox/package.json

@@ -0,0 +1,90 @@
+{
+  "id": "uni-combox",
+  "displayName": "uni-combox 组合框",
+  "version": "1.0.1",
+  "description": "可以选择也可以输入的表单项 ",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "combox",
+    "组合框",
+    "select"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [
+			"uni-scss",
+			"uni-icons"
+		],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "n"
+        },
+        "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"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 0 - 0
uni_modules/uni-combox/readme.md


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