zouling 1 年之前
父節點
當前提交
fe9b838360
共有 100 個文件被更改,包括 4600 次插入749 次删除
  1. 10 1
      .gitignore
  2. 11 0
      1.txt
  3. 二進制
      40fbd6d4d4e4b2feea076c59423a03ce.keystore
  4. 158 6
      App.vue
  5. 7 1
      api/login.js
  6. 10 0
      api/mine/mine.js
  7. 91 0
      api/mine/order.js
  8. 75 0
      api/mine/register.js
  9. 24 0
      api/system/user.js
  10. 61 0
      components/footer/footer.vue
  11. 768 0
      components/lunc-calendar/calendar.js
  12. 934 0
      components/lunc-calendar/lunc-calendar.vue
  13. 126 0
      components/lunc-calendar/readme.md
  14. 39 0
      components/nodata/nodata.vue
  15. 129 0
      components/order/list.vue
  16. 72 0
      components/order/popup.vue
  17. 78 0
      components/order/stepbar.vue
  18. 60 0
      components/toptab/navbar.vue
  19. 176 0
      components/toptab/phonebtn.vue
  20. 99 0
      components/toptab/tab.vue
  21. 0 167
      components/uni-section/uni-section.vue
  22. 8 3
      config.js
  23. 2 0
      main.js
  24. 48 16
      manifest.json
  25. 24 0
      package-lock.json
  26. 5 0
      package.json
  27. 60 38
      pages.json
  28. 80 0
      pages/agreement.vue
  29. 0 43
      pages/index.vue
  30. 311 0
      pages/index/index.vue
  31. 374 166
      pages/login.vue
  32. 2 2
      pages/mine/about/index.vue
  33. 8 3
      pages/mine/avatar/index.vue
  34. 267 102
      pages/mine/index.vue
  35. 121 0
      pages/mine/pwd/forgetpwd.vue
  36. 24 10
      pages/mine/pwd/index.vue
  37. 100 0
      pages/mine/pwd/resetpwd.vue
  38. 1 1
      pages/mine/setting/index.vue
  39. 1 1
      pages/register.vue
  40. 31 177
      pages/work/index.vue
  41. 2 2
      permission.js
  42. 31 0
      plugins/amap-wx.130.js
  43. 二進制
      static/images/banner/banner01.jpg
  44. 二進制
      static/images/banner/banner02.jpg
  45. 二進制
      static/images/banner/banner03.jpg
  46. 二進制
      static/images/mine/habg.png
  47. 二進制
      static/images/mine/lcicon.png
  48. 二進制
      static/images/mine/ldicon.png
  49. 二進制
      static/images/mine/lnicon.png
  50. 二進制
      static/images/mine/miconc.png
  51. 二進制
      static/images/mine/miconf.png
  52. 二進制
      static/images/mine/micong.png
  53. 二進制
      static/images/mine/miconj.png
  54. 二進制
      static/images/mine/miconl.png
  55. 二進制
      static/images/mine/mnotic.png
  56. 二進制
      static/images/mine/pcicon.png
  57. 二進制
      static/images/mine/pnicon.png
  58. 二進制
      static/images/mine/profile.png
  59. 二進制
      static/images/mine/rimg.png
  60. 二進制
      static/images/mine/success.png
  61. 二進制
      static/images/mine/wrimg.png
  62. 二進制
      static/images/navbg.png
  63. 二進制
      static/images/noiconp.png
  64. 二進制
      static/images/order/come/fillf.png
  65. 二進制
      static/images/order/come/fillin.png
  66. 二進制
      static/images/order/come/filln.png
  67. 二進制
      static/images/order/come/line.png
  68. 二進制
      static/images/order/come/up.png
  69. 二進制
      static/images/order/come/ytbg.png
  70. 二進制
      static/images/order/staff/head.png
  71. 二進制
      static/images/order/staff/listline.png
  72. 二進制
      static/images/tabbar/home.png
  73. 二進制
      static/images/tabbar/home_.png
  74. 二進制
      static/images/tabbar/mine.png
  75. 二進制
      static/images/tabbar/mine_.png
  76. 二進制
      static/images/tabbar/road.png
  77. 二進制
      static/images/tabbar/road_.png
  78. 二進制
      static/images/tabbar/trends.png
  79. 二進制
      static/images/tabbar/trends_.png
  80. 二進制
      static/images/tabbar/work.png
  81. 二進制
      static/images/tabbar/work_.png
  82. 二進制
      static/images/weather/weaion.png
  83. 二進制
      static/images/weather/weaiona.png
  84. 二進制
      static/images/weather/weaionb.png
  85. 二進制
      static/images/weather/weaionc.png
  86. 二進制
      static/images/weather/weaiond.png
  87. 二進制
      static/images/weather/weaione.png
  88. 二進制
      static/images/weather/weaionf.png
  89. 二進制
      static/images/weather/weaiong.png
  90. 二進制
      static/images/weather/weaionh.png
  91. 二進制
      static/images/weather/weaioni.png
  92. 二進制
      static/images/weather/weaionj.png
  93. 1 1
      static/index.html
  94. 二進制
      static/logo.png
  95. 153 0
      static/style.css
  96. 2 1
      store/getters.js
  97. 11 2
      store/modules/user.js
  98. 2 1
      uni.scss
  99. 0 2
      uni_modules/uni-badge/changelog.md
  100. 3 3
      uni_modules/uni-badge/components/uni-badge/uni-badge.vue

+ 10 - 1
.gitignore

@@ -11,6 +11,15 @@
 /.vscode/*
 /.hbuilderx/*
 
-package-lock.json
+
 yarn.lock
 
+
+unpackage/
+
+
+/mp-weixin
+/unpackage
+
+.DS_Store
+node_modules/

+ 11 - 0
1.txt

@@ -0,0 +1,11 @@
+包名:zs.yuanqu.app
+
+
+证书别名:__uni__9ace566
+证书私钥密码:UmhugJmm
+
+SHA1: 73:E5:A0:DD:64:51:C9:85:18:EF:A1:00:23:3E:81:90:C8:9F:12:3C
+
+高德key:b85f0c64b3c9a082d740912cf3019c88
+
+极光appkey:

二進制
40fbd6d4d4e4b2feea076c59423a03ce.keystore


+ 158 - 6
App.vue

@@ -2,12 +2,163 @@
   import config from './config'
   import store from '@/store'
   import { getToken } from '@/utils/auth'
-
+import {updateUserProfile,findVersion} from "@/api/system/user.js"
+  const baseUrl = config.baseUrl
   export default {
+	data(){
+		return{
+			platform:'Android'  
+		}
+	},
     onLaunch: function() {
-      this.initApp()
+	  // #ifdef APP
+	  this.onlineWgt(); //版本更新
+	  // var url=baseUrl; 
+	  // if(url.indexOf('https://lyyy.qs163.cn')!=-1){
+	  	
+	  	
+	  // }else{
+	  // } 
+	  // #endif
     },
     methods: {
+		//热更新
+		// this.getJGtuifn()
+		// 在线跟新
+		onlineWgt() {
+			let that = this;
+			plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
+				that.comparisonVersionNo(widgetInfo.versionCode);
+			});
+			// that.comparisonVersionNo()
+		},
+		comparisonVersionNo(versionCode) {
+			let that = this;
+			// console.log("aaaaaaa===versionCode", versionCode);
+			const parmas = {
+				model: that.platform
+			}   
+			findVersion(parmas).then(res => {
+				console.log(res)  
+				if (res.code == "200") {
+					let versionNos = res.data.code;
+					// console.log(versionNos,'versionNos')
+					let filePath = res.data.path;
+					if (Number(versionNos) > Number(versionCode)) { //服务器返回1更新,0则不更新
+						uni.showModal({
+							title: '提示',
+							content: '发现新版本,是否升级',
+							success: function(res) {
+								// console.log(widgetInfo.version);
+								if (res.confirm) {
+									console.log('用户点击确定');
+									that.getProperty(filePath);
+								} else if (res.cancel) {
+									console.log('用户点击取消');
+								}
+							}
+						});
+					}
+				}
+			}).catch(error=>{
+				uni.hideLoading()
+				console.log(error)
+			})
+		},
+		getProperty(getProperty) {
+			// console.log("bbbbbbbbb----------->", getProperty)
+			let that = this;
+			// console.log(baseUrl + getProperty)
+			// 在线升级app/热更新
+			that.showwri = true;
+			const downloadTask = uni.downloadFile({ //下载文件
+				url: baseUrl + getProperty,
+				success: (downloadResult) => {
+					// console.log(downloadResult);
+					if (downloadResult.statusCode == 200) {
+						// 更新升级
+						plus.runtime.install(downloadResult.tempFilePath, {
+							force: true
+						}, function() {
+							// console.log('install success...');
+							that.showwri = false;
+							plus.nativeUI.alert("应用资源更新完成!", function() {
+								plus.runtime.restart();
+							});
+						}, function(e) {
+							that.showwri = false;
+							plus.nativeUI.alert("更新失败,请稍后再试");
+						});
+					}
+				}
+			});
+			downloadTask.onProgressUpdate((res) => { //下载文件的进度
+				that.totalBytesWritten = res.totalBytesWritten; //当前下载大小
+				that.progress = res.progress; //当前下载比例
+				that.totalBytesExpectedToWrite = res.totalBytesExpectedToWrite; //
+			});
+		},
+		// 极光推送
+		getJGtuifn(){ 
+			//#ifdef APP-PLUS
+				var jpushModule = uni.requireNativePlugin("JG-JPush");
+				jpushModule.setLoggerEnable(true);
+				// 初始化函数
+				jpushModule.initJPushService();
+				jpushModule.addConnectEventListener(result=>{
+					let connectEnable = result.connectEnable
+					// console.log("jpush连接", connectEnable)
+				})
+				jpushModule.getRegistrationID(result => {
+					// console.log("注册ID.....",result)
+					this.registerID = result.registerID;
+					if(getToken()){
+						var params={
+							jgId:this.registerID,
+						}
+						updateUserProfile(params).then(res=>{
+							if(rtes.code==200){
+								console.log(res,9)
+							}
+						})
+					}	
+				})
+				jpushModule.isPushStopped(result=>{
+					let code = result.code
+					console.log('连接状态回调',result)
+				});
+				// 设置别名
+				jpushModule.setAlias({
+					'alias' : 'coder',
+					'sequence': 1
+				})
+				jpushModule.addNotificationListener(result=>{
+					let notificationEventType = result.notificationEventType
+					let messageID = result.messageID
+					let title = result.title
+					let content = result.content
+					let extras = result.extras
+					console.log('通知事件回调',result)
+					// 推送一个本地通知
+					jpushModule.addLocalNotification({
+						messageID,
+						title,
+						content,
+						extras
+					})
+				})
+				jpushModule.addNotificationListener(result => {
+				console.log(result)
+				if (result.notificationEventType == "notificationOpened") {
+				  //点击窗口通知栏推送的消息 跳转指定页面
+					uni.reLaunch({
+						url:'/pages/login'
+					})
+				}
+		 
+			});
+			//#endif 
+		},
       // 初始化应用
       initApp() {
         // 初始化应用配置
@@ -21,14 +172,15 @@
         this.globalData.config = config
       },
       checkLogin() {
-        if (!getToken()) {
-          this.$tab.reLaunch('/pages/login') 
-        }
+        // if (!getToken()) {
+        //   this.$tab.reLaunch('/pages/login') 
+        // }
       }
     }
   }
 </script>
 
 <style lang="scss">
-  @import '@/static/scss/index.scss'
+  @import '@/static/scss/index.scss';
+  @import "@/static/style.css";
 </style>

+ 7 - 1
api/login.js

@@ -1,5 +1,4 @@
 import request from '@/utils/request'
-
 // 登录方法
 export function login(username, password, code, uuid) {
   const data = {
@@ -57,3 +56,10 @@ export function getCodeImg() {
     timeout: 20000
   })
 }
+// 获取手机验证码
+export function sendSmsFn(data) {
+  return request({
+    'url': '/sendSms/'+data,
+    'method': 'get'
+  })
+}

+ 10 - 0
api/mine/mine.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+//获取子部门列表system:dept:list
+export function getDeptList(data) {
+  return request({
+    'url': '/system/dept/list/'+data,
+    'method': 'get',
+  })
+}
+
+

+ 91 - 0
api/mine/order.js

@@ -0,0 +1,91 @@
+import request from '@/utils/request'
+// 查询预约时段配置信息列表
+export function getReservatTime(data) {
+  return request({
+    'url': '/reservat/time/list',
+    'method': 'get',
+	'data':data
+  })
+}
+// 新增预约
+export function getReservatAdd(data) {
+  return request({
+    'url': '/system/reservat',
+    'method': 'post',
+	'data':data
+  })
+}
+// 查询陵园预约信息列表
+export function getReservatList(data) {
+  return request({
+    'url': '/system/reservat/list',
+    'method': 'get',
+	'data':data
+  })
+}
+// 审核
+export function getReservatSh(data) {
+  return request({
+    'url': '/system/reservat/sh',
+    'method': 'post',
+	'data':data
+  })
+}
+// end
+
+// 查询陵园预约配置信息列表
+export function getConfigList(data) {
+  return request({
+    'url': '/reservat/config/list',
+    'method': 'get',
+	'data':data
+  })
+}
+// H5时段信息 日历
+export function getCalendarList(data) {
+  return request({
+    'url': '/boman/common/reservatConfig/calendar',
+    'method': 'post',
+	'data':data
+  })
+}
+
+// 预约详情
+export function getReservatDetail(data) {
+  return request({
+    'url': '/system/reservat/'+data,
+    'method': 'get',
+  })
+}
+// 取消预约
+export function getReservatDel(data) {
+  return request({
+    'url': '/system/reservat/delete/'+data,
+    'method': 'get',
+  })
+}
+// 预约首页统计 system:reservat:add
+export function getReservatcountl(data) {
+  return request({
+    'url': '/boman/common/indexStatistics',
+    'method': 'post',
+	'data':data
+  })
+}
+// 预约信息核销 system:reservat:cav
+export function getReservatvav(data) {
+  return request({
+    'url': '/system/reservat/hx',
+    'method': 'get',
+	'data':data
+  })
+}
+// 预约须知
+export function getNewsList(data) {
+  return request({
+    'url': '/system/news/list',
+    'method': 'get',
+	'data':data
+  })
+}
+// 新的end

+ 75 - 0
api/mine/register.js

@@ -0,0 +1,75 @@
+import request from '@/utils/request'
+
+
+// 字典值yzdqId
+export function getDictionaryFn(data) {
+  return request({
+    url: '/system/dict/data/type/'+data,
+    method: 'get',
+	type:true
+  })
+}
+// 参数设置
+export function getconfigKeyFn(data) {
+  return request({
+    url: '/system/config/scoreWatermark/'+data,
+    method: 'get',
+	type:true
+  })
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// // 流程发起时获取下一节点
+// export function getflowableNextRegFn(data) {
+//   return request({
+//     'url': '/flowable/task/nextFlowNodeByStart',
+//     'method': 'post',
+// 	data:data
+//   })
+// }
+// // 发起流程
+// export function getflowableRegFn(id,data) {
+//   return request({
+//     'url': '/flowable/definition/start/'+id,
+//     'method': 'post',
+// 	data:data
+//   })
+// }
+
+// //获取流程定义列表
+// export function getflowlistFn(data) {
+//   return request({
+//     'url': '/flowable/definition/list',
+//     'method': 'get',
+// 	'data':data
+//   })
+// }
+// //获取自己发起的流程
+// export function getflowMyFn(data) {
+//   return request({
+//     'url': '/flowable/task/myProcess',
+//     'method': 'get',
+// 	'data':data
+//   })
+// }

+ 24 - 0
api/system/user.js

@@ -13,6 +13,21 @@ export function updateUserPwd(oldPassword, newPassword) {
     params: data
   })
 }
+// 忘记密码发送短信
+export function getappForgetPW(data) {
+  return request({
+    url: '/applet/appForgetPW/'+data,
+    method: 'get',
+  })
+}
+// 重置密码
+export function getappCheck(data) {
+  return request({
+    url: '/applet/appCheck',
+    method: 'get',
+	'data':data
+  })
+}
 
 // 查询用户个人信息
 export function getUserProfile() {
@@ -39,3 +54,12 @@ export function uploadAvatar(data) {
     filePath: data.filePath
   })
 }
+
+// 下载版本更新
+export function findVersion(data) {
+  return request({
+    url: '/system/app/new',
+    method: 'get',
+    data: data
+  })
+}

+ 61 - 0
components/footer/footer.vue

@@ -0,0 +1,61 @@
+<template>
+	<view>
+		
+	
+	<view style="height: 100rpx;"></view>
+    <view class="com_footer">
+        <view class="in_item" v-for="(item,k) in footlist" :key="k" @click="gotopage(item)">
+			<image class="in_img" v-if="active == item.module" :src="item.icon_checked" mode="scaleToFill"></image>
+			<image class="in_img" v-else :src="item.icon_nochecked" mode="scaleToFill"></image>
+			<view class="in_txt" v-if="active == item.module" :style="'color: #'+color_checked">{{item.title}}</view>
+			<view class="in_txt" v-else :style="'color: #'+color_nochecked">{{item.title}}</view>
+        </view>
+    </view>
+	</view>
+</template>
+
+<script>
+	// import api from '../../api/api.js'
+	// import plugins from '../../commen/js/plugin.js'
+    export default {
+		props:[
+			'footlist',
+			'footerindex',
+			'color_checked',
+			'color_nochecked',
+			'isHomeIndex'
+		],
+        data () {
+            return{
+				active :'',
+            }
+        },
+		mounted() {
+			var that = this;
+			this.active = this.footerindex;
+		},
+        methods:{
+            // 跳转底部导航页面
+			gotopage(e){
+				var that = this;
+				let link = e.link, module = e.module, def = e.default, title = e.title;
+				if(module == 'home'){
+					this.$tab.reLaunch('/pages/index/index')
+				}else if(module == 'mine'){
+					this.$tab.reLaunch('/pages/mine/index')
+				}
+			},
+			
+        }
+    }
+</script>
+
+
+
+<style type="text/css">
+    .com_footer{ display: flex;position: fixed;box-sizing: border-box;z-index: 99;width: 100%;height: 100rpx;bottom: 0;left: 0;background-color: #fff;overflow: hidden;box-shadow: 0px 0px 16rpx 0px rgba(87,87,87,0.41);}
+	.com_footer .in_item{ display: block;flex: 1;padding: 12rpx 0 0 0;overflow: hidden; }
+	.com_footer .in_img{ display: block;width: 44rpx;height: 44rpx;margin: 0 auto; }
+	.com_footer .in_txt{ font-size: 26rpx;color: #999;text-align: center; font-weight: bold;}
+	.com_footer .in_txt_on{ color: #20AD20; }
+</style>

+ 768 - 0
components/lunc-calendar/calendar.js

@@ -0,0 +1,768 @@
+/**
+ * @1900-2100区间内的公历、农历互转
+ * @charset UTF-8
+ * @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]
+ */
+export 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, 0x16a95, 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
+		0x092e0, 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"
+	],
+
+	/**
+	 * 阳历节日
+	 */
+	festival: {
+		'1-1': {
+			title: '元旦'
+		},
+		'2-14': {
+			title: '情人节'
+		},
+		'3-8': {
+			title: '妇女节'
+		},
+		'3-12': {
+			title: '植树节'
+		},
+		'4-1': {
+			title: '愚人节'
+		},
+		'4-5': {
+			title: '清明节'
+		},
+		'5-1': {
+			title: '劳动节'
+		},
+		'5-4': {
+			title: '青年节'
+		},
+		'5-12': {
+			title: '护士节'
+		},
+		'6-1': {
+			title: '儿童节'
+		},
+		'7-1': {
+			title: '建党节'
+		},
+		'8-1': {
+			title: '建军节'
+		},
+		'9-10': {
+			title: '教师节'
+		},
+		'10-1': {
+			title: '国庆节'
+		},
+		'12-24': {
+			title: '平安夜'
+		},
+		'12-25': {
+			title: '圣诞节'
+		},
+	},
+
+	/**
+	 * 农历节日
+	 */
+	lfestival: {
+		'12-30': {
+			title: '除夕'
+		},
+		'1-1': {
+			title: '春节'
+		},
+		'1-15': {
+			title: '元宵节'
+		},
+		'2-2': {
+			title: '龙抬头'
+		},
+		'5-5': {
+			title: '端午节'
+		},
+		'7-7': {
+			title: '七夕节'
+		},
+		'7-15': {
+			title: '中元节'
+		},
+		'8-15': {
+			title: '中秋节'
+		},
+		'9-9': {
+			title: '重阳节'
+		},
+		'10-1': {
+			title: '寒衣节'
+		},
+		'10-15': {
+			title: '下元节'
+		},
+		'12-8': {
+			title: '腊八节'
+		},
+		'12-23': {
+			title: '北方小年'
+		},
+		'12-24': {
+			title: '南方小年'
+		},
+	},
+
+	/**
+	 * 返回默认定义的阳历节日
+	 */
+	getFestival() {
+		return this.festival
+	},
+
+	/**
+	 * 返回默认定义的内容里节日
+	 */
+	getLunarFestival() {
+		return this.lfestival
+	},
+
+	/**
+	 * 
+	 * @param {Object} 按照festival的格式输入数据,设置阳历节日
+	 */
+	setFestival(param = {}) {
+		this.festival = param
+	},
+
+	/**
+	 * 
+	 * @param {Object} 按照lfestival的格式输入数据,设置农历节日
+	 */
+	setLunarFestival(param = {}) {
+		this.lfestival = param
+	},
+
+	/**
+	 * 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, 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;
+			case 30:
+				s = '\u4e09\u5341';
+				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
+		y = parseInt(y)
+		m = parseInt(m)
+		d = parseInt(d)
+		//年份限定、上限
+		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, leap = 0,
+			temp = 0;
+		//修正ymd参数
+		var y = objDate.getFullYear(),
+			m = objDate.getMonth() + 1,
+			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(),
+			isToday = false;
+		if (isTodayObj.getFullYear() == y && isTodayObj.getMonth() + 1 == m && isTodayObj.getDate() == d) {
+			isToday = true;
+		}
+		//星期几
+		var nWeek = objDate.getDay(),
+			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);
+
+		var solarDate = y + '-' + m + '-' + d
+		var lunarDate = year + '-' + month + '-' + day
+
+		var festival = this.festival
+		var lfestival = this.lfestival
+
+		var festivalDate = m + '-' + d
+		var lunarFestivalDate = month + '-' + day
+
+		return {
+			// date: solarDate,
+			// lunarDate: lunarDate,
+			festival: festival[festivalDate] ? festival[festivalDate].title : null,
+			lunarFestival: lfestival[lunarFestivalDate] ? lfestival[lunarFestivalDate].title : null,
+			'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
+		y = parseInt(y)
+		m = parseInt(m)
+		d = parseInt(d)
+		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,
+			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;

+ 934 - 0
components/lunc-calendar/lunc-calendar.vue

@@ -0,0 +1,934 @@
+<template>
+	<view class="lunc-calendar">
+		<!-- 头部上下月按钮及月份 -->
+		<view class="header">
+			<!-- <text class="day_tit" >选择日期</text> -->
+			<text class="head-icon head-pre-month nocheck"  v-if="showChangeBtn&&!isshowPrev"></text>
+			<text class="head-icon head-pre-month" v-if="showChangeBtn&&isshowPrev" @click="changeMonthOrWeek('prev')"></text>
+			<text class="head-month">{{selDate.year+'年'+(selDate.month<10?'0'+selDate.month:selDate.month)+'月'}}</text>
+			<text class="head-icon head-next-month" v-if="showChangeBtn" @click="changeMonthOrWeek('next')"></text>
+			<text class="go-to-today" v-if="showToday" @click="goToday">今天</text>
+		</view>
+		<!-- 星期 -->
+		<view class="week-area" :class="firstDayOfWeek=='sunday'?'week-tit':''">
+			<text class="week-font" v-for="(item, index) in weekArr" :key="index ">{{ getWeekType + '' + item }}</text>
+		</view>
+		<!-- 日历 -->
+		<swiper class="calendar-data" :current="shrinkType?tranCurrent:tranIndex" circular :duration="tranDuration"
+			@change="swiperChange" @animationfinish="swiperEndChange" :style="{height:shrinkType?'112rpx':'532rpx'}">
+			<swiper-item class="swiper-item swiper-prev-item" v-for="(a, i) in getAllData" :key="i">
+				<text class="month-bg" v-if="showMonthBg">{{ getMontBg }}</text>
+				<view class="month-days" :class="[shrinkType?'item-week':'']">
+					<view class="week-days" v-for="(b, j) in a" :key="j">
+						<view class="day" v-for="(c, k) in b" :key="k" @click="clickDay(c)">
+							<!-- 之前日期不可约 -->
+							<view class="day-info" :class="[c.dayClass, getIsSelDay(c)&&'is-sel', c.dayType!='normal'&&'un-month',c.isBefore?'day-infoa':''
+							]">
+								<text class="day-solar">{{ c.day }}</text>
+							</view>
+							<!-- 法定不可约,周六日不可约  不可约优先级高于节假日-->
+							<!-- <view class="day-info" :class="[c.dayClass, getIsSelDay(c)&&'is-sel', c.dayType!='normal'&&'un-month',
+							c.sign && c.sign.length > 0&&c.sign[0].title!='可预约'||c.sign.length==0 || configWeek.indexOf(c.week)!=-1 || c.isHoliday&&configHoliday=='N'?'day-infoa':''
+							]">
+								<text class="day-solar">{{ c.day }}</text>
+								节假日
+								<template v-if="showLunar || c.sign && c.sign.length > 0 || c.isHoliday">
+									<text class="day-sign"  v-if="c.sign && c.sign.length > 0">
+									
+										<block v-if="c.isHoliday">{{c.dayLunar}}</block>
+										<block v-else>{{ configWeek.indexOf(c.week)==-1?c.sign[0].title:'不可约' }}</block>
+									</text>
+									<text class="day-lunar" v-else>{{c.dayLunar}}</text>
+								</template>
+							</view> -->
+						</view>
+					</view>
+				</view>
+			</swiper-item>
+		</swiper>
+		<!-- 收缩按钮 -->
+		<view class="shrink" v-if="showShrink" @click="changeShrink">
+			<image :src="upimg" class="shrink-img" :class="[shrinkType?'shrink-open':'shrink-close']"></image>
+			<!-- <text class="shrink-btn" ></text> -->
+		</view>
+	</view>
+</template>
+<script>
+	let { calendar } = require("./calendar.js");
+	/**
+	 * @property {Boolean} showLunar = [true|false] 是否显示农历,默认false
+	 * @property {Boolean} showMonthBg = [true|false] 是否显示月份背景,默认true
+	 * @property {Boolean} showChangeBtn = [true|false] 是否显示上月下月箭头按钮,默认true
+	 * @property {String} firstDayOfWeek = [monday|sunday] 周几为每周的第一天,默认monday
+	 *  @value monday 每周从周一开始(默认)
+	 *  @value sunday 每周从周日开始
+	 * @property {String} weekType = [''|周|星期] 星期的前缀;如周一周二或星期一星期二,为空则只显示一、二等;不用预设值时可自定义前缀,填的值即为星期前缀;默认周
+	 *  @value '' 星期显示:只显示一、二等
+	 *  @value 周 星期显示:周一、周二等(默认)
+	 *  @value 星期 星期显示:星期一、星期二等
+	 * @property {Boolean} weekend = [true|false] 周末标红(周六周日日期用红色字体),默认true
+	 * @property {Boolean} showShrink = [true|false] 是否显示收缩按钮,可显示一周的日期,默认false
+	 * @property {String} shrinkState = [week|month] 收缩状态,默认month
+	 *  @value week 默认打开显示周数据(收起状态)
+	 *  @value month 默认打开显示月数据(展开状态)
+	 * @property {Array} signList 标记数组,若当前有多个标记,则显示最后一个,期待格式[{date: '2021-09-10', title: '生日', info: '八月初四张三生日'}]
+	 * @event {Function()} dayChange 点击日期触发事件,返回参数e={year,month,day,week,date,lunar,daySign},详情参数见文档
+	 * @event {Function()} monthChange 切换月份触发事件,返回参数e={year,month,type},详情参数见文档
+	 * @event {Function()} shrinkClick 收缩和展开时触发事件,返回参数e=week|month
+	 */
+	export default {
+		name: 'LuncCalendar',
+		props: {
+			//是否显示农历
+			showLunar: {
+				type: Boolean,
+				default: false
+			},
+			//是否显示月份背景
+			showMonthBg: {
+				type: Boolean,
+				default: true
+			},
+			//是否显示上月下月按钮
+			showChangeBtn: {
+				type: Boolean,
+				default: true
+			},
+			//每周的周几为第一天
+			firstDayOfWeek: {
+				type: String,
+				default: 'monday'
+			},
+			//每周的周几为第一天
+			weekType: {
+				type: String,
+				default: '周'
+			},
+			//周末标红
+			weekend: {
+				type: Boolean,
+				default: true
+			},
+			//是否可收缩,收起来后以周显示
+			showShrink: {
+				type: Boolean,
+				default: false
+			},
+			// 默认打开状态(收起或展开)
+			shrinkState:{
+				type: String,
+				default: 'month'
+			},
+			//标记
+			signList: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			// 周几不可约
+			configWeek:{
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			// 节假日预约
+			configHoliday:{
+				type: String,
+				default () {
+					return 'Y'
+				}
+			},
+		},
+		data() {
+			return {
+				upimg:require("@/static/images/order/come/up.png"),
+				weekArr: ['一', '二', '三', '四', '五', '六', '日'], //星期数组
+				today: {}, //今天日期 -> year, month, day
+				selDate: {}, //选中日期信息 -> year, month, day
+
+				allMonthList: [], // 月份数据 -> [[[周],[周]],[月],[月]]
+				tranIndex: 1, // 月份轮播所在位置
+				allWeekList: [], // 周月份数据 -> [[[周]],[月],[月]]
+				tranCurrent: 1, // 周轮播所在位置
+				tranDuration: 300, //轮播时间(单位毫秒)
+
+				signArr: this.signList, // 标记列表
+				showToday: false, //显示回到今天(非当月才显示)
+				isshowPrev:false,//切换当月的上一个月
+				shrinkType: false, // 收缩状态,true:收起(显示周),false展开(显示月)
+				deterChange: true, // 防止切换月份过快
+			}
+		},
+		created() {
+			let nd = new Date();
+			this.today = {
+				year: nd.getFullYear(),
+				month: nd.getMonth() + 1,
+				day: nd.getDate()
+			}
+			if (this.firstDayOfWeek == "sunday") this.weekArr = ['日', '一', '二', '三', '四', '五', '六'];
+			this.initDate();
+		},
+		watch: {
+			signList(nList, oList){
+				this.signArr = nList;
+				this.setSignList();
+			}
+		},
+		computed: {
+			getAllData() { // 切换周或月时,展示的数据不同
+				return this.shrinkType ? this.allWeekList : this.allMonthList;
+			},
+			getMontBg() { // 获取当前月背景
+				let monthBg = this.selDate.month;
+				return !this.shrinkType ? (monthBg < 10 ? '0' + monthBg : monthBg) : '';
+			},
+			getIsSelDay(c) { // 判断是否是选中日期
+				return (d) => {
+					let { year, month, day } = this.selDate;
+					if(year == d.year && month == d.month && day == d.day){
+						this.$emit('getIsSelDayFn',d)
+					}
+					return year == d.year && month == d.month && day == d.day
+				}
+			},
+			getWeekType(){
+				let weekType = this.weekType;
+				if(weekType && weekType != "true" && weekType != "''" && weekType != '""'){
+					return weekType
+				}else{
+					return ''
+				}
+			}
+		},
+		methods: {
+			initDate() { // 初始化日期
+				this.selDate = JSON.parse(JSON.stringify(this.today));
+				let monthList = this.getMonthData(this.selDate); // 获取当月数据
+				let prevMonthList = this.getMonthData(this.getMonthDate(this.selDate, -1)); // 上月数据
+				let nextMonthList = this.getMonthData(this.getMonthDate(this.selDate)); // 下月数据
+				this.allMonthList = [prevMonthList, monthList, nextMonthList]
+				this.tranIndex = 1;
+				if(this.shrinkState == "week" && !this.shrinkType) this.changeShrink();
+			},
+			/**
+			 * 根据指定日期获取当月的数据
+			 * @param {Object} date = { year, month, day } 指定的日期
+			 */
+			getMonthData(date) {
+				const { year, month, day } = date; //指定的日期
+				let maxDay = new Date(year, month, 0).getDate(); //当前月最大日期
+				let firstWeek = new Date(year + "/" + month + "/1").getDay(); //月份1号的星期数
+				if (this.firstDayOfWeek == "monday") firstWeek = firstWeek - 1 < 0 ? 6 : firstWeek - 1;
+				let list = [];
+				//每月显示42天,6周,每周7天
+				for (var i = 0; i < 42; i++) {
+					let dayInfo = {}; // 每天的详细信息
+					if (i < firstWeek) { //指定月份上月的最后几天
+						let { year, month } = this.getMonthDate(date, -1);
+						let preMaxDay = new Date(year, month, 0).getDate(); //上月最大日期
+						let day = preMaxDay - firstWeek + i + 1;
+						dayInfo = this.getDayInfo({ year, month, day }, 'prev');
+					} else if (i > maxDay + firstWeek - 1) { //指定月份下月的前几天
+						let { year, month } = this.getMonthDate(date);
+						let day = i - maxDay - firstWeek + 1;
+						dayInfo = this.getDayInfo({ year, month, day }, 'next');
+					} else {
+						let day = i - firstWeek + 1;
+						dayInfo = this.getDayInfo({ year, month, day }, 'normal');
+					}
+					if (i % 7 == 0) list.push(new Array());
+					list[list.length - 1].push(dayInfo);
+				}
+				return list;
+			},
+			/**
+			 * 获取指定日期的详细信息,包括农历节假日等
+			 * @param {Object} date = { year, month, day } 指定的日期
+			 * @param {String} dayType = [prev|next|normal] 日期类型,上月|下月|当前月
+			 */
+			getDayInfo(date, dayType) {
+				const { year, month, day } = date;
+				let isToday = false; //是否今天
+				let isBefore=false;//是否今天之前
+				if (year == this.today.year && month == this.today.month && day == this.today.day) isToday = true;
+				if(year==this.today.year&&month == this.today.month && day < this.today.day) isBefore=true;
+				
+				let week = new Date(year + "/" + month + "/" + day).getDay(); //星期数
+				let lunar = calendar.solar2lunar(year, month, day); //农历
+				let dayLunar = lunar.IDayCn == '初一' ? lunar.IMonthCn + lunar.IDayCn : lunar.IDayCn;
+				if (lunar.festival) dayLunar = lunar.festival; // 阳历节日
+				else if (lunar.lunarFestival) dayLunar = lunar.lunarFestival; // 农历节日
+				else if (lunar.Term) dayLunar = lunar.Term; // 节气
+				let holidayArr = ["元旦", "春节", "清明节", "劳动节", "端午节", "中秋节", "国庆节"];
+				let isHoliday = false;
+				if (holidayArr.indexOf(dayLunar) != -1) isHoliday = true;
+				let dayInfo = {
+					date: year + "-" + month + "-" + day,
+					year, month, day, week,
+					lunar, // 农历
+					dayLunar, // 显示的农历
+					isToday, // 是否是今日
+					isBefore,//是否今天之前
+					isHoliday, // 是否是节假日
+					dayType, // 日期类型,上月、下月或当前月
+					sign: this.getSignByDate(date)
+				}
+				let dayClass = this.getDayClass(dayInfo);
+				dayInfo["dayClass"] = dayClass;
+				return dayInfo;
+			},
+			/**
+			 * 根据日期详细信息添加对应的class
+			 * @param {Object} dayInfo 日期详情
+			 */
+			getDayClass(dayInfo) {
+				let dClass = "";
+				if (dayInfo.isToday) dClass += ' is-today'; // 今天日期
+				if (dayInfo.isHoliday) dClass += ' is-holiday'; // 法定假日
+				if (this.weekend && (dayInfo.week == 0 || dayInfo.week == 6)) dClass += ' week-end'; // 周末标红
+				return dClass;
+			},
+			/**
+			 * 根据日期获取日期对应的事件
+			 * @param {Object} date = { year, month, day } 指定的日期
+			 */
+			getSignByDate(date) {
+				const { year, month, day } = date;
+				let dayDateS = new Date(year + "/" + month + "/" + day + " 00:00:00").getTime();
+				let dayDateE = new Date(year + "/" + month + "/" + day + " 23:59:59").getTime();
+				let daySign = [];
+				this.signArr.map(sign => {
+					let signDate = sign.date.replace(/-/g, '/');
+					let signTimes = new Date(sign.date).getTime();
+					if (signTimes >= dayDateS && signTimes <= dayDateE) daySign.push(sign)
+				})
+				return daySign;
+			},
+
+			/**
+			 * 获取月份数据
+			 * @param {String} type=[pre|next]
+			 */
+			getOtherData(type) {
+				let nowMont = this.getMonthDate(this.selDate, type == 'prev' ? -1 : 1); // 获取当前月份
+				this.selDate = nowMont; // 切换月份后设置选中的日期
+				let monthData = this.getMonthData(this.getMonthDate(nowMont, type == 'prev' ? -1 : 1));
+				// 获取上月或下月轮播所在位置
+				let current = this.getTranIndex().prevNum;
+				if (type == "next") current = this.getTranIndex().nextNum;
+				this.allMonthList.splice(current, 1, monthData);
+				this.judgeShowToday();
+				this.returnMonthChange(type);
+			},
+			/**
+			 * 获取周数据
+			 * @param {String} type=[pre|next]
+			 */
+			getOtherWeekData(type) {
+				let oldSel = this.selDate; // 原选中的日期
+				let newSel = this.getDateByDateAndDay(oldSel, type == 'prev' ? -7 : 7); // 获取7天前或后的日期
+				if (oldSel.month != newSel.month) { // 跨月,先设置跨月后的月历
+					// 设置月轮播位置
+					let current = this.getTranIndex("month").prevNum;
+					if (type == "next") current = this.getTranIndex("month").nextNum;
+					this.tranIndex = current;
+					this.getOtherData(type);
+				}
+				this.selDate = newSel;
+				this.getWeekData(type);
+				this.judgeShowToday();
+			},
+
+			// 从月历中获取周数据,切换周后获取上周或下周数据
+			getWeekData(type) {
+				const { prevNum: prevIndex, nowNum: nowIndex, nextNum: nextIndex } = this.getTranIndex("month");
+				const { prevNum: prevCurrent, nowNum: nowCurrent, nextNum: nextCurrent } = this.getTranIndex("week");
+				const { year: selYear, month: selMonth, day: selDay } = this.selDate;
+				let sDate = selYear + "-" + selMonth + "-" + selDay
+				let prevMonthList = this.allMonthList[prevIndex];
+				let nowMonthList = this.allMonthList[nowIndex];
+				let nextMonthList = this.allMonthList[nextIndex];
+				for (let i = 0; i < nowMonthList.length; i++) {
+					for (let j = 0; j < nowMonthList[i].length; j++) {
+						if (sDate == nowMonthList[i][j].date) {
+							this.returnDayChange(nowMonthList[i][j]); // 返回选中的日期
+							if (type == "next") {
+								this.allWeekList.splice(nextCurrent, 1, [nowMonthList[i + 1]]);
+								if (i == 5) this.allWeekList.splice(nextCurrent, 1, [nextMonthList[1]]);
+							} else {
+								this.allWeekList.splice(prevCurrent, 1, [nowMonthList[i - 1]]);
+								if (i == 0) {
+									for (let k = prevMonthList.length - 1; k >= 0; k--) {
+										if (prevMonthList[k][6].dayType == "normal") {
+											this.allWeekList.splice(prevCurrent, 1, [prevMonthList[k]]);
+											break;
+										}
+									}
+								}
+							}
+							break;
+						}
+					}
+				}
+			},
+			// 根据月份数据获取周数据,相当初始化周数据
+			getAllWeekData() {
+				const { prevNum, nowNum, nextNum } = this.getTranIndex("month");
+				const { year: selYear, month: selMonth, day: selDay } = this.selDate;
+				let sDate = selYear + "-" + selMonth + "-" + selDay; // 选中的日期
+				let allWeekList = [[],[],[]];
+				let prevMonthList = this.allMonthList[prevNum];
+				let nowMonthList = this.allMonthList[nowNum];
+				let nextMonthList = this.allMonthList[nextNum];
+				for (let i = 0; i < nowMonthList.length; i++) {
+					for (let j = 0; j < nowMonthList[i].length; j++) {
+						if (sDate == nowMonthList[i][j].date) {
+							allWeekList[0][0] = nowMonthList[i - 1];
+							allWeekList[1][0] = nowMonthList[i];
+							allWeekList[2][0] = nowMonthList[i + 1];
+							if (i == 5) {
+								allWeekList[2][0] = nextMonthList[1];
+							} else if (i == 0) {
+								for (let k = prevMonthList.length - 1; k >= 0; k--) {
+									if (prevMonthList[k][6].dayType == "normal") {
+										allWeekList[0][0] = prevMonthList[k];
+										break;
+									}
+								}
+							}
+							break;
+						}
+					}
+				}
+				this.allWeekList = allWeekList;
+			},
+			// 滑动切换结束
+			swiperEndChange() {
+				this.tranDuration = 300;
+			},
+			// 滑动切换月份或周
+			swiperChange(e) {
+				let current = e.detail.current;
+				let oldIndex = this.shrinkType ? this.tranCurrent : this.tranIndex;
+				let type = (oldIndex - current == -1 || oldIndex - current == 2) ? 'next' : 'prev';
+				if (this.shrinkType) {
+					this.tranCurrent = current;
+					if (current != oldIndex) this.getOtherWeekData(type);
+				} else {
+					this.tranIndex = current;
+					if (current != oldIndex) this.getOtherData(type);
+				}
+			},
+			// 点击切换月份或周(上月下月切换或上周下周切换)type = [prev|next] 切换类型
+			changeMonthOrWeek(type) {
+				if (!this.deterChange) return;
+				this.deterChange = false;
+				setTimeout(_ => {
+					this.deterChange = true;
+				}, 400); // 防止点击过快
+				this.tranDuration = 300;
+				let tranType = this.shrinkType ? 'week' : 'month';
+				let current = this.getTranIndex(tranType).prevNum;
+				if (type == "next") current = this.getTranIndex(tranType).nextNum;
+				if (tranType == "week") {
+					this.tranCurrent = current; 
+					this.getOtherWeekData(type);
+				} else {
+					this.tranIndex = current;
+					this.getOtherData(type);
+				}
+			},
+			// 点击收缩按钮,切换显示月份或显示周
+			changeShrink() {
+				this.shrinkType = !this.shrinkType;
+				if (this.tranDuration != 0) this.tranDuration = 0;
+				if (this.shrinkType) {
+					this.tranCurrent = 1;
+					this.getAllWeekData();
+				}
+				this.returnShrinkChange();
+				this.judgeShowToday();
+			},
+			// 点击回到今天
+			goToday() {
+				if (this.tranDuration != 0) this.tranDuration = 0;
+				let oldDate = JSON.parse(JSON.stringify(this.selDate));
+				this.initDate();
+				if (this.shrinkType) {
+					this.tranCurrent = 1;
+					this.getAllWeekData();
+					let today = this.today;
+					// 判断是否需要触发改变月份事件
+					if(oldDate.year != today.year || oldDate.month != today.month){
+						this.returnMonthChange("today");
+					}else{
+						this.returnDayChange(this.today);
+					}
+				} else {
+					this.returnMonthChange("today"); // 事件
+				}
+				this.judgeShowToday();
+			},
+			// 点击日期
+			clickDay(dayInfo) {
+				// var isweek=this.configWeek.indexOf(dayInfo.week)
+				// if(dayInfo.sign && dayInfo.sign.length > 0&&dayInfo.sign[0].title!='可预约'||dayInfo.sign.length==0||isweek!=-1||dayInfo.isHoliday&&this.configHoliday=='N'){
+				// 	return
+				// }
+				if(dayInfo.isBefore){
+					return
+				}
+				
+				let { year, month, day } = this.selDate;
+				if (day == dayInfo.day && month == dayInfo.month && year == dayInfo.year) return;
+				let oldSel = JSON.parse(JSON.stringify(this.selDate));
+				this.selDate.day = dayInfo.day;
+				if (oldSel.month != dayInfo.month) {
+					if (!this.shrinkType) {
+						this.changeMonthOrWeek(dayInfo.dayType);
+						return;
+					} else {
+						this.selDate.year = dayInfo.year;
+						this.selDate.month = dayInfo.month;
+						let nowSel = JSON.parse(JSON.stringify(this.selDate));
+						let type = "nowNum"
+						if (nowSel.year > oldSel.year || (nowSel.year === oldSel.year && nowSel.month > oldSel.month)){
+							type = "nextNum"
+						} else if (nowSel.year < oldSel.year || (nowSel.year === oldSel.year && nowSel.month < oldSel.month)){
+							type = "prevNum"
+						}
+						this.tranIndex = this.getTranIndex("month")[type];
+						let monthData = this.getMonthData(this.getMonthDate(this.selDate, type == 'prevNum' ? -1 : 1));
+						let current = this.getTranIndex("month")[type];
+						this.allMonthList.splice(current, 1, monthData); // 设置上月或下月数据
+					}
+					this.returnMonthChange(dayInfo.dayType);
+				} else {
+					this.returnDayChange(dayInfo);
+				}
+			},
+			// 判断是否需要显示回到今天(非本月或本周时显示)
+			judgeShowToday() {
+				const { year, month, day } = this.today;
+				const { year: selYeat, month: selMonth, day: selDay } = this.selDate;
+				if (this.shrinkType) { // 显示的周
+					let selTimes = new Date(selYeat, selMonth - 1, selDay).getTime(); // 选中日期的时间戳
+					let week = new Date(year, month - 1, day).getDay(); // 今天星期
+					let firstWD = this.getDateByDateAndDay(this.today, -week + (this.firstDayOfWeek == "monday" ? 1 : 0));
+					let lastWD = this.getDateByDateAndDay(this.today, 6 - week + (this.firstDayOfWeek == "monday" ? 1 : 0));
+					let firstTimes = new Date(firstWD.year, firstWD.month - 1, firstWD.day).getTime();
+					let lastTimes = new Date(lastWD.year, lastWD.month - 1, lastWD.day).getTime();
+					if (selTimes > lastTimes || selTimes < firstTimes) this.showToday = true;
+					else this.showToday = false;
+					if(selTimes > lastTimes) this.isshowPrev=true;
+					else this.isshowPrev=false;
+				} else {
+					if (year != selYeat || month != selMonth) this.showToday = true;
+					else this.showToday = false;
+					// 判断是并不是当前月上一个月
+					if(Number(selYeat)>Number(year)||Number(selMonth)>Number(month)) this.isshowPrev=true;
+					else this.isshowPrev=false;
+				}
+			},
+
+			// 重新设置标记
+			setSignList() {
+				this.allMonthList.map(month => {
+					month.map(week => {
+						week.map(day => {
+							day.sign = this.getSignByDate({ year: day.year, month: day.month, day: day.day })
+						})
+					})
+				})
+			},
+			/**
+			 * 添加标记
+			 * @param {Array} list 需要添加的标记
+			 */
+			addSignList(list) {
+				let signArr = this.signArr.concat(list);
+				this.signArr = signArr;
+				this.setSignList();
+			},
+			/**
+			 * 删除标记
+			 * 根据date和title共同判断是否删除
+			 * @param {Array} list 需要删除的标记
+			 */
+			deleteSignList(list) {
+				let signArr = this.signArr;
+				signArr = signArr.filter(s => {
+					if (list.find(l => l.date == s.date && l.title == s.title)) return false
+					else return true;
+				})
+				this.signArr = signArr;
+				this.setSignList();
+			},
+			/**
+			 * 事件 - 设置返回日期
+			 * @param {Object} dayInfo 日期详情
+			 */
+			returnDayChange(dayInfo) {
+				let { year, month, day } = dayInfo;
+				let dayDate = year + "-" + (month < 10 ? '0' + month : month) + "-" + (day < 10 ? '0' + day : day)
+				let returnData = {
+					date: dayDate,
+					year: year,
+					month: month,
+					day: day,
+					week: dayInfo.week,
+					daySign: dayInfo.sign
+				}
+				if (this.showLunar) returnData["lunar"] = dayInfo.lunar;
+				this.$emit("dayChange", returnData);
+			},
+			/**
+			 * 事件 - 设置返回月份
+			 * @param {String} type 类型
+			 */
+			returnMonthChange(type) {
+				let selDate = this.selDate.year + "-" + this.selDate.month + "-" + this.selDate.day;
+				let monthList = this.allMonthList.flat().flat(); // 二维转一维
+				let dayInfo = monthList.find(day => day.date == selDate);
+				this.returnDayChange(dayInfo)
+				this.$emit("monthChange", {
+					year: dayInfo.year,
+					month: dayInfo.month,
+					type: type
+				});
+			},
+			/**
+			 * 事件 - 返回收缩状态
+			 */
+			returnShrinkChange() {
+				let type = this.shrinkType ? 'week' : 'month'
+				this.$emit("shrinkClick", type);
+			},
+			/**
+			 * 获取上一个或下一个轮播位置
+			 * @param {String} type = [month|week] 轮播类型,月轮播(tranIndex),周轮播(tranCurrent)
+			 * @returns {Object} {prevNum, nowNum, nextNum}
+			 */
+			getTranIndex(type = 'month') {
+				let current = this.tranIndex;
+				if (type == "week") current = this.tranCurrent;
+				let prevNum = current - 1 < 0 ? 2 : current - 1;
+				let nowNum = current;
+				let nextNum = current + 1 > 2 ? 0 : current + 1;
+				return { prevNum, nowNum, nextNum }
+			},
+			/**
+			 * 根据日期获取几天后的日期
+			 * @param {Object} date = {year, month, day} 当前日期
+			 * @param {Number} day 当前日期的几天前或几天后(负数)
+			 * @returns {Object} {year, month, day}
+			 */
+			getDateByDateAndDay(date, num) {
+				let dTime = new Date(date.year + "/" + date.month + "/" + date.day).getTime() + num * 24 * 60 * 60 * 1000;
+				let nd = new Date(dTime);
+				return {
+					year: nd.getFullYear(),
+					month: nd.getMonth() + 1,
+					day: nd.getDate()
+				}
+			},
+			/**
+			 * 获取几个月前或后的日期
+			 * @param {Object} date = {year, month, day} 当前日期
+			 * @param {Number} num 当前日期的num月前或后,默认1月后(下月)
+			 * @returns {Object} {year, month, day}
+			 */
+			getMonthDate(date, num = 1) {
+				let nextMonth = date.month + num;
+				let diffYear = parseInt(Math.abs(nextMonth) / 12);
+				let year = date.year;
+				let month = nextMonth;
+				if (nextMonth > 12) {
+					year = date.year + diffYear;
+					month = nextMonth % 12;
+				} else if (nextMonth < 1) {
+					year = date.year - (diffYear + 1);
+					month = nextMonth + 12 * (diffYear + 1);
+				}
+				let monthMaxDay = new Date(year, month, 0).getDate(); // 月份最大日期
+				let day = date.day > monthMaxDay ? monthMaxDay : date.day;
+				return { year, month, day }
+			},
+		}
+	}
+</script>
+<style lang="scss">
+	.lunc-calendar {
+		background-color: #FFF;
+
+		// 头部
+		.header {
+			display: flex;
+			flex-direction: row;
+			justify-content: center;
+			align-items: center;
+			position: relative;
+			height: 88rpx;
+			line-height: 88rpx;
+			border-bottom: 2rpx solid $com-cd3;
+
+			.head-month {
+				font-size: 30rpx;
+				padding: 0 40rpx;
+				font-weight: bold;
+			}
+			.day_tit{
+				position: absolute;
+				left: 0rpx;
+				top: 26rpx;
+				font-size: 30rpx;
+				line-height: 36rpx;
+				color:  #161616;
+				text-align: center;
+				font-weight: bold;
+			}
+			.go-to-today {
+				position: absolute;
+				right: 16rpx;
+				top: 26rpx;
+				font-size: 24rpx;
+				line-height: 36rpx;
+				color: $com-cd3;
+				text-align: center;
+				width: 80rpx;
+				height: 36rpx;
+				border: 2rpx solid $com-cd3;
+				border-radius: 18rpx;
+				box-sizing: border-box;
+			}
+
+			.head-icon {
+				content: '';
+				display: flex;
+				width: 22rpx;
+				height: 22rpx;
+				border-top: 2rpx solid $com-cd3;
+				border-left: 2rpx solid $com-cd3;
+			}
+
+			.head-icon.head-pre-month {
+				transform: rotate(-45deg);
+			}
+
+			.head-icon.head-next-month {
+				transform: rotate(135deg);
+			}
+			.head-icon.nocheck {
+				border-top: 2rpx solid #aaaaaa;
+				border-left: 2rpx solid #aaaaaa;
+			}
+		}
+
+		// 星期
+		.week-area {
+			display: flex;
+			flex-direction: row;
+			align-items: center;
+			// border-bottom: 1px solid #EEE;
+			padding: 16rpx 0;
+			// margin: 0 10rpx;
+
+			.week-font {
+				flex: 1;
+				text-align: center;
+				color: #161616;
+				font-size: 30rpx;
+				font-weight: bold;
+			}
+			&.week-tit{
+				.week-font:first-child{color: #aaaaaa;}
+				.week-font:last-child{color: #aaaaaa;}
+			}
+		}
+
+		// 日历
+		.calendar-data {
+			// transition: all 300ms;
+
+			.swiper-item {
+				position: relative;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				flex-direction: row;
+
+				.month-bg {
+					position: absolute;
+					font-size: 460rpx;
+					color: #EEE;
+					font-weight: bold;
+					opacity: 0.4;
+					z-index: -1;
+				}
+
+				.month-days {
+					flex: 1;
+					// margin-top: 10rpx;
+					position: relative;
+
+					.week-days {
+						display: flex;
+						flex-direction: row;
+
+						.day {
+							flex: 1;
+							width: 14.28%;
+							text-align: center;
+							// height: 84rpx;
+							height: 76rpx;
+							color: #000;
+							/* #ifndef APP-NVUE */
+							padding: 0 6rpx;
+							/* #endif */
+							// box-sizing: border-box;
+							display: flex;
+
+							.day-info {
+								flex: 1;
+								display: flex;
+								flex-direction: column;
+								justify-content: flex-start;
+								align-items: center;
+								position: relative;
+								
+								.day-solar {
+									display: flex;
+									font-size: 30rpx;
+									line-height: 76rpx;
+									width: calc(100% - 4rpx);
+									// height: 50rpx;
+									// padding-top: 10rpx;
+									border-radius: 16rpx 16rpx 0 0;
+									color: #161616;
+									box-sizing: border-box;
+									// background:#ffffff;
+									display: block;
+									// font-weight: bold;
+								}
+
+								.day-lunar,
+								.day-sign {
+									color: #161616;
+									font-size: 24rpx;
+									line-height: 24rpx;
+									transform: scale(0.8);
+									white-space: nowrap;
+									margin-top: 6rpx;
+								}
+
+								.day-sign {
+									color: #161616 !important;
+								}
+
+								.day-tag {
+									content: "";
+									position: absolute;
+									top: 8rpx;
+									right: 8rpx;
+									width: 10rpx;
+									height: 10rpx;
+									border-radius: 6rpx;
+									background-color: #F75858;
+								}
+							}
+							// 非当月日期
+							.day-info.un-month {
+								opacity: 0.25;
+								transition: opacity 300ms;
+							}
+
+							// 今天日期
+							.is-today .day-solar,
+							.is-today .day-sign,
+							.is-today .day-lunar {
+								color: $com-cd3;
+							}
+
+							// 周末
+							.week-end .day-solar {
+								// color: #FF9595;
+							}
+
+							// 法定假日
+							.is-holiday .day-solar,
+							.is-holiday .day-sign,
+							.is-holiday .day-lunar {
+								color: #161616 !important;
+							}
+							//不能预约的日期
+							.day-infoa,{
+								.day-solar{color: #AAAAAA !important;}
+								.day-sign{color: #AAAAAA !important;}
+								.day-lunar{color: #AAAAAA !important;}
+							}
+							// .is-holiday{
+							// 	.day-solar{color: #AAAAAA !important;}
+							// 	.day-sign{color: #AAAAAA !important;}
+							// }
+							// 当前选中的日期
+							.is-sel {
+								background-color: $com-cd3;
+								border-radius: 16rpx;
+								.day-solar{color: #ffffff !important}
+								.day-sign{color: #ffffff !important;}
+							}
+						}
+					}
+
+					// .week-days.week-hide {
+					// 	display: none;
+					// }
+				}
+
+				.item-week {
+					.un-month {
+						opacity: 1 !important;
+					}
+				}
+			}
+		}
+
+		// 收缩按钮
+		.shrink {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 60rpx;
+			// border-top: 1px solid #DDD;
+			.shrink-img{width: 32rpx;height: 18rpx;}
+			/* #ifndef APP-NVUE */
+			.shrink-btn {
+				width: 32rpx;
+				height: 32rpx;
+				background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAMhJREFUOE/dky8LAkEQxd9w0WjV72KxWXfggmAyWWzXxHbNYjIJhoOZarvid9FqNB4jCyes3h9OLghu3fceb36zS+h5qKcf/xYgIisAayJKnHMa8lFVZ2YpgB0z7193FQYisgCwAXA3s8QLicgbhwC2zHwMgxshBkFeXzE2Nvh2rW8NsiybRFE0ZuZTXZCIzIuiuMZxfKltICJTAAciegDwIM9eqKozAKmZDQAsmTlvHSGY/1YKR00cWl9iGYRP8p220BXm7//CE8WyQBHBXZb9AAAAAElFTkSuQmCC);
+			}
+			.shrink-close {
+				transform: rotate(180deg);
+			}
+			/* #endif */
+			/* #ifdef APP-NVUE */
+			.shrink-btn{
+				content: '';
+				display: flex;
+				width: 18rpx;
+				height: 18rpx;
+				border-top: 2rpx solid #606266;
+				border-left: 2rpx solid #606266;
+				transform: rotate(-135deg);
+			}
+
+			.shrink-close {
+				transform: rotate(45deg);
+			}
+			/* #endif */
+		}
+	}
+</style>

+ 126 - 0
components/lunc-calendar/readme.md

@@ -0,0 +1,126 @@
+## 日历组件
+### 简单介绍
+- 组件需要依赖 sass 插件 ,请自行安装;
+- 本组件依赖 uni-app内置组件`swiper`组件,请与`swiper`组件配合使用;
+- nvue页面中的`swiper`组件部分功能不支持,详情见[uni-app内置组件:swiper](https://uniapp.dcloud.net.cn/component/swiper.html)
+- 通过uni_modules引用组件,在页面template中即可直接使用,无需在页面中import和注册components;
+- 可设置显示收缩按钮,收缩后只显示一个星期的日期,展开后显示一个月的日期;可以通过触摸屏幕左右滑动切换月份或切换周;
+- 可根据需要选择是否显示农历日期,且会显示节日,如春节、端午、国庆、腊八节等;
+- 本组件农历转换使用的js是 [@1900-2100区间内的公历、农历互转](https://github.com/jjonline/calendar.js)
+- 欢迎大家下载使用,项目源码示例:[https://gitee.com/lunc9932/calendar](https://gitee.com/lunc9932/calendar)
+- 若有插件导入失败,重启编辑器;
+
+### API
+#### 属性说明
+| 属性名           | 类型     | 默认值   | 说明              |
+|-----------------|----------|----------|-----------------------|
+| showLunar       | Boolean  | false    | 是否显示农历             |
+| firstDayOfWeek  | String   | monday   | 周几为每周的第一天,可选值:monday / sunday<br>monday:每周从周一开始;sunday:每周从周日开始           |
+| showMonthBg     | Boolean  | true     | 是否显示月份背景               |
+| weekend         | Boolean  | true     | 周末标红(周六周日日期用红色字体)  |
+| shouChangeBtn   | Boolean  | true     | 是否显示上月下月箭头按钮      |
+| weekType        | Boolean  | 周       | 星期的前缀,如星期一星期二,或周一周二,也可以只显示一、二等      |
+| showShrink      | Boolean  | false    | 是否显示收缩按钮      |
+| shrinkState     | String   | month    | 默认显示周数据还是月数据(收起或展开),可选值:week / month<br>week:默认打开显示周数据(收起状态);month:默认打开显示月数据(展开状态)      |
+| signList        | Array    | []       | 标记数组,若同日期有多个标记,则显示最后一个<br>期待格式[{date: '2021-09-10', title: '生日', info: '八月初四张三生日'}]  |
+
+注意:
+1. 标记日期会在日期下方显示“title”内容,建议“title”内容不超过4个汉字;
+2. 农历日期、节日、标记日期,只会显示其一,优先级 标记 > 节日 > 农历日期;
+3. `showShrink`表示是否显示收缩按钮,并不是表示收起或展开状态;
+
+#### 方法说明
+| 方法名          | 说明        | 参数 |
+|-----------------|------------|--------|
+| addSignList     | 添加标记    | (Array:list),传入需要添加的标记数组,日期相同不会覆盖,只显示第一个出现的标记         |
+| deleteSignList  | 删除标记    | (Array:list),传入需要删除的标记数组,根据 date 和 title 同时判断进行删除         |
+
+方法使用:在组件上添加 `ref` 属性,在调用对应的方法:`this.$refs.calendar.addSignList([])` 即可,详情见下方的基本用法;<br>
+**原 setSignList() 方法已弃用;**
+
+
+#### 事件说明
+| 事件名        | 说明                | 返回值 |
+|---------------|--------------------|--------|
+| @dayChange    | 选中日期改变时触发,包括点击日期、切换月份和切换周都会改变选中日期 | dayInfo,详情见下方说明 |
+| @monthChange  | 切换月份时触发,包括点击切换月份按钮、选中日期时切换的月份等都会改变触发 | monthInfo,详情见下方说明 |
+| @shrinkClick   | 收缩和展开时触发事件 | 返回当前状态:week / month<br>week:当前显示的一个星期(收起);month:当前显示的一个月(展开) |
+
+#### @dayChange 返回值 dayInfo 说明
+| 值      | 类型    | 说明  |
+| ------- | ------ | ----- |
+| date    | String | 日期,格式“yyyy-MM-dd” |
+| year    | Number | 年    |
+| month   | Number | 月    |
+| day     | Number | 日    |
+| week    | Number | 星期几 |
+| daySign | Array  | 当前日期的标记,若没有则为空数组 |
+| lunar   | Object | 农历信息,包含农历日期、节日、生肖等;<br>只有属性 showLunar 设置为 true 时才会返回此值; |
+
+#### @monthChange 返回值 monthInfo 说明
+| 值    | 类型    | 说明  |
+| ----- | ------ | ----- |
+| year  | Number | 年    |
+| month | Number | 月    |
+| type  | String | 返回类型:today / pre / next<br>today:当前月份,pre:上个月,next:下个月 |
+
+
+### 基本用法
+在`template`中使用组件
+
+```
+<view class="content">
+  <view class="content-item">
+    <lunc-calendar ref="calendar" :showLunar="true" :showMonthBg="true" :showShrink="true" :signList="signList"
+      @dayChange="dayChange" weekType="星期" @monthChange="monthChange" @shrinkClick="shrinkClick">
+    <view class="operation">
+      <view class="button" @click="addSign">新增标记</view>
+      <view class="button" @click="updateSign">修改标记</view>
+    </view>
+  </view>
+  <view class="content-item">
+    <lunc-calendar :showShrink="true" shrinkState="week"></lunc-calendar>
+  </view>
+</view>
+```
+在`script`中使用
+
+```
+export default {
+  data() {
+    return {
+      signList: [{date: "2023-06-25",title: "生日",info: "张三生日"},
+        {date: "2023-06-19",title: "朋友聚会"}, 
+        {date: "2023-07-22",title: "纪念日"}, 
+        {date: "2023-04-11",title: "聚会"}, 
+        {date: "2023-07-23",title: "郊游"}, 
+        {date: "2023-08-19",title: "游玩"}],
+    }
+  },
+  methods: {
+    dayChange(dayInfo) { // 点击日期
+      console.log("点击日期", JSON.parse(JSON.stringify(dayInfo)));
+    },
+    monthChange(monthInfo) { // 切换月份
+      console.log("切换月份", JSON.parse(JSON.stringify(monthInfo)));
+    },
+    shrinkClick(type) {
+      console.log("当前状态", type);
+    },
+
+    addSign() { // 添加标记
+      let addList = [{date: "2023-06-28",title: "休息"}, 
+        {date: "2023-06-01",title: "上班"}];
+      // 调用 addSignList 方法,传入需要添加的标记数组
+      this.$refs.calendar.addSignList(addList);
+    },
+    deleteSign() { // 删除标记
+      let deleteList = [{date: "2023-06-01",title: "上班"}];
+      // 调用 deleteSignList 方法,传入需要删除的标记数组
+      this.$refs.calendar.deleteSignList(deleteList);
+    }
+  }
+}
+```
+
+

+ 39 - 0
components/nodata/nodata.vue

@@ -0,0 +1,39 @@
+<template>
+	<view class="nodata" :style="'padding-top:'+padtop+'rpx'">
+		<image :src="noiconpimg"></image>
+		<view>{{notxt}}</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		props:{
+			notxt:{
+				type: String,
+				default () {
+					return '暂无数据'
+				}
+			},
+			padtop:{
+				type: Number,
+				default () {
+					return 100
+				}
+			}
+		},
+		data(){
+			return{
+				noiconpimg:require("@/static/images/noiconp.png"),
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+// 无数据
+.nodata{
+	display: flex;flex-direction: column;align-items: center;box-sizing: border-box;padding-bottom: 100rpx;
+	image{width: 456rpx;height: 178rpx;margin-bottom: 28rpx;}
+	view{font-size: 30rpx;color: #AAAAAA;font-weight: bold;}
+}	
+</style>

+ 129 - 0
components/order/list.vue

@@ -0,0 +1,129 @@
+<template>
+  <view>
+	<view v-if="datalist.length>0">
+		<!-- 预约 -->
+		<block v-if="type==1">
+			<view class="ylist" v-for="(ite,idx) in datalist" :key='idx' @click="getDetail(ite.reservatId)">
+				
+			</view>
+		</block>
+		<view class="shax" v-if="wtdt">{{wtdt}}</view>
+	</view>
+	<block v-else>
+		<no-data></no-data>
+	</block>
+  </view>
+</template>
+
+<script>
+	import { selectDictValue } from '@/utils/common.js';
+	import noData from "@/components/nodata/nodata.vue"
+  export default {
+	props:{
+		datalist: {
+			type: Array,
+			default () {
+				return []
+			}
+		},
+		adrlist:{
+			type: Array,
+			default () {
+				return []
+			}
+		},
+		wtdt:{
+			type: String,
+			default () {
+				return ''
+			}
+		},
+		type:{
+			type: [String,Number],
+			default () {
+				return ''
+			}
+		},
+	},
+	components:{
+		noData
+	},
+	data(){
+		return{
+		}
+	},
+	onLoad: function() {
+	},
+	methods:{
+		kaType(data, list) {
+			return selectDictValue(list, data);
+		},
+		getDelFn(id){
+			var that=this;
+			uni.showModal({
+				title: '确认删除',
+				content: "是否确认删除该预约",
+				cancelText: '取消',
+				confirmText: '确认',
+				success: function(res) {
+					if (res.confirm) {
+						that.$emit("getDelFn",id)
+					} else if (res.cancel) {
+						// console.log('用户点击取消');
+					}
+				}
+			});
+		},
+		gettypeFn(type,id){
+			var that=this;
+			var str="拒绝"
+			if(type==3){
+				str='同意'
+			}
+			uni.showModal({
+				title: '确认'+str,
+				content: "是否确认"+str+"该预约",
+				cancelText: '取消',
+				confirmText: '确认',
+				success: function(res) {
+					if (res.confirm) {
+						var newobj={
+							type:type,
+							id:id
+						}
+						that.$emit("gettypeFn",newobj)
+					} else if (res.cancel) {
+						// console.log('用户点击取消');
+					}
+				}
+			});
+		},
+		getDetail(e){
+			this.$emit('getDetail',e)
+		},
+		typeFn(data){
+			if(data){
+				var newArr=[]
+				var astr=data.split('-')
+				astr.forEach(ite=>{
+					var a=ite.substring(0,5);
+					newArr.push(a)
+				})
+				return newArr.join('-')
+			}else{
+				return ''
+			}
+			
+			
+		},
+	},
+	
+  }
+</script>
+
+<style lang="scss" scoped>
+// 预约
+.ylist{background: #FFFFFF;border-radius: 14rpx;margin-bottom: 30rpx;position: relative;
+}
+
+</style>

+ 72 - 0
components/order/popup.vue

@@ -0,0 +1,72 @@
+<template>
+	<view>
+		<!-- 弹窗 -->
+		<view class="bgbox" @click="getClose" v-if="type"></view>
+
+		<!-- 提示 -->
+		<view class="tips" v-if="type==1">
+			<image :src="bgimg" class="bgimg"></image>
+			<view class="tipa">
+				<view class="tit mb12">温馨提示</view>
+				<view class="txt">您当前已有<text>1</text>条预约申请</view>
+				<view class="txt">可前往查看详情</view>
+				<view class="flexcj mt16">
+					<view class="tbtn btn1" @click="getClose">查看详情</view>
+					<view class="tbtn btn2" @click="getClose">我知道了</view>	
+				</view>
+			</view>
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		props:{
+			type: {
+				type: Number,
+				default () {
+					return 0
+				}
+			},
+		},
+		watch:{
+		},
+		data(){
+			return{
+				// type:0,
+				bgimg:require("@/static/images/order/come/ytbg.png"),
+				
+			}
+		},
+		mounted() {
+		},
+		methods:{
+			getClose(){
+				this.$emit("getClose")
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	// 公共
+		
+// end
+.tips{
+	position: fixed;left: 100rpx;right: 100rpx;height: 494rpx;top: 50%;margin-top: -280rpx;border-radius: 14rpx;z-index: 10;background: #FEFEFE;
+	padding-bottom: 36rpx;box-sizing: border-box;
+	.bgimg{width: 100%;height: 204rpx;}
+	
+	.tipa{padding:4rpx 40rpx 0;
+		.tit{font-size: 30rpx;font-weight: bold;color: #000000;text-align: center;}
+		.txt{font-size: 30rpx;font-weight: 500;color: #666666;text-align: center;
+			text{color: $com-cd3;padding: 0 4rpx;}
+		}
+		.tbtn{text-align: center;font-size: 30rpx;font-weight: 500;flex:0 0 auto;width: 214rpx;height: 70rpx;border-radius: 35rpx;line-height: 70rpx;
+			&.btn1{color: #666666;;border: 2rpx solid #E6E6E6;}
+			&.btn2{color: $com-cd3;border: 1px solid $com-cd3;}
+		}
+	}	
+}
+</style>

+ 78 - 0
components/order/stepbar.vue

@@ -0,0 +1,78 @@
+<template>
+  <view class="stepbar" :class="fixeda?'sfixed':''">
+	  <block v-for="(ite,idx) in steps" :key="idx">
+		  <view class="steps" :class="ite.status>0?'act':''" v-if="reservatType!=2&&ite.val==2||ite.val!=2">
+		  	<image :src="filln" class="img" v-if="ite.status==0"></image>
+		  	<image :src="fillin" class="img" v-if="ite.status==1"></image>
+		  	<image :src="fillf" class="img" v-if="ite.status==2"></image>
+		  	<view class="tit">{{ite.tit}}</view>
+			<image :src="line" class="line"></image>
+		  	<!-- <view class="line"></view> -->
+		  </view>
+	  </block>
+  </view>
+</template>
+
+<script>
+//fixeda   固定
+  export default {
+	props:{
+		steps: {
+			type: Array,
+			default () {
+				return []
+			}
+		},
+		fixeda:{
+			type: Boolean,
+			default () {
+				return false
+			}
+		},
+		reservatType:{
+			type: [Number,String],
+			default () {
+				return 1
+			}
+		}
+	},
+	components:{
+		
+	},
+	data(){
+		return{
+			fillin:require("@/static/images/order/come/fillin.png"),//填写
+			fillf:require("@/static/images/order/come/fillf.png"), //完成
+			filln:require("@/static/images/order/come/filln.png"),//未填
+			line:require("@/static/images/order/come/line.png"),//完成
+		}
+	},
+	onLoad: function() {
+	},
+	methods:{
+		getDetail(e){
+			this.$emit('getDetail')
+		} 
+	},
+	
+  }
+</script>
+
+<style lang="scss" scoped>
+// .sfixed{position: absolute;left: 0;right: 0;top: 0;z-index: 10;}
+.stepbar{background: transparent;display: flex;align-items: center;padding: 30rpx 0rpx;flex: 0 0 auto;
+	.steps{display: flex;flex-direction: column;flex: 1;align-items: center;position: relative;
+		.img{width: 30rpx;height: 30rpx;margin-bottom: 20rpx;}
+		.tit{font-size: 24rpx;font-weight: bold;color: #ffffff;opacity: 0.7;
+
+		}
+		.line{position: absolute;width: 102rpx;height:18rpx;top: 6rpx;right: 0;transform: translateX(50%);opacity: 0.7;}
+		&:last-of-type{.line{display: none;}}
+		&.act{
+			.line{opacity: 1;}
+			.tit{opacity: 1;}
+		}
+	}
+
+}
+</style>

+ 60 - 0
components/toptab/navbar.vue

@@ -0,0 +1,60 @@
+<template>
+	<view>
+		<image :src="navbg" class="navbg"></image>
+		<uni-nav-bar :left-icon="leftflag?'left':''" :title="navtit" color="#ffffff"  :background-color="bgColor" :border="navborder" statusBar='true' fixed="true" @clickLeft='getBack'>
+			<!-- <block slot="default">
+				<view class="navtit">
+					<view>{{navtit}}</view>
+				</view>
+			</block> -->
+		</uni-nav-bar>
+	</view>
+</template>
+
+<script>
+	export default{
+		props:{
+			bgColor:{
+				type: String,
+				default () {
+					return 'transparent'
+				}
+			},
+			navborder:{
+				type: Boolean,
+				default () {
+					return false
+				}
+			},
+			navtit:'',
+			leftflag:{
+				type: Boolean,
+				default () {
+					return false
+				}
+			}
+		},
+		data(){
+			return{
+				navbg:require("@/static/images/navbg.png"),
+				backgroundColor: "transparent",
+			}
+		},
+		methods:{
+			getBack(){
+				if(this.leftflag){
+					uni.navigateBack({
+						delta:1
+					})
+				}
+				
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+.navbg{width: 100%;height: 692rpx;position: fixed;left: 0;right: 0;top: 0;z-index: 1;}
+.navtit{display: flex;align-items: center;justify-content: center;font-size: 30rpx;color: #ffffff;width: 100%;
+}	
+</style>

+ 176 - 0
components/toptab/phonebtn.vue

@@ -0,0 +1,176 @@
+<template>
+  <view>
+	  <view class="box_hei" @click="getClose" v-if="type">
+	  	<view @click.stop="btns"  class="hei_box">
+	  		<view class="box_top">
+	  			<view class="box_title">
+	  				<view>
+	  					智能校管家 申请使用
+	  				</view>
+	  			</view>
+	  			<view class="box_nameq">你的手机号码</view>
+	  		</view>
+	  		<!-- <view class="boxs"></view> -->
+	  		<view class="box_btns">
+	  			<view @click="getClose" class="box_btn box_btn1">拒绝</view>
+	  			<button class="box_btn box_btn2" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">允许</button>
+	  		</view>
+	  	</view>
+	  </view>
+  </view>
+</template>
+
+<script>
+	// import tabSearch from "@/components/toptab/search.vue"
+	import {getweChatOpenid} from "@/api/login.js"
+  export default {
+	  props:{
+		type:{
+			type:Boolean,
+			default () {
+				return true
+			}
+		},
+	  },
+	data(){
+		return{
+			sucimg:require("@/static/images/mine/success.png") 
+		}
+	},
+	methods:{
+		getClose(){
+			this.$emit("getClose")
+		},
+		btns(){
+			
+		},
+		async getPhoneNumber(e){
+			const {iv,encryptedData} = e.detail;
+			var that=this;
+			uni.login({
+			    provider: 'weixin',
+			    success: (res) => {
+			        // 获取用户信息
+					if(res.code) {
+						var params={
+							iv: iv,
+							encryptedData: encryptedData,
+							code : res.code,
+						}
+						// 登录还是注册
+						that.$emit("getPhoneNumber",params)
+						
+					}
+			    }
+			})			
+		}, 
+	},
+	onLoad: function() {
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+.box_hei{
+		width: 100%;
+		height: 100%;
+		background: rgba(0,0,0,.8);
+		position: fixed;
+		top: 0;
+		left: 0;
+		z-index: 3;
+		.hei_box{
+			background: #fff;
+			border-radius:22upx 22upx 0 0;
+			height: 440upx;
+			padding: 52upx 28upx 104upx;
+			position: absolute;
+			bottom:0;
+			width: 100%;
+			box-sizing: border-box;
+			.box_top{
+				padding: 0 18upx 62upx;
+				.box_title{
+					display: flex;
+					justify-content: space-between;
+					font-size: 30upx;
+					margin-bottom: 30upx;
+					view{
+						display: flex;
+						align-items: center;
+						color: #333333;
+					}
+					.img{
+						margin-right: 14upx;
+						width: 180upx;
+						height: 48upx;
+					}
+					.imgs{
+						width: 40upx;
+						height: 40upx;
+					}
+				}
+				.box_nameq{
+					color: #333333;
+					font-size: 44upx;
+					font-weight: bold;
+				}
+			}
+			.box_phone{
+				height: 106upx;
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				font-size: 28upx;
+				color: #A6A6A6;
+				border-bottom: 1upx solid #EBEBEB;
+				border-top: 1upx solid #EBEBEB;
+				view{
+					display: flex;
+					align-items: center;
+				}
+				.img{
+					width: 26upx;
+					height: 22upx;
+				}
+				span{
+					color: #333333;
+					font-size: 32upx;
+					padding-right: 18upx;
+					font-weight: bold;
+				}
+			}
+			.box_qita{
+				height: 106upx;
+				font-size: 28upx;
+				color: #7CA4FC;
+				line-height: 106upx;
+			}
+			.boxs{
+				height: 50upx;
+			}
+			.box_btns{
+				margin-top: 10upx;
+				display: flex;
+				justify-content: space-between;
+				.box_btn{
+					width: 324upx;
+					height: 82upx;
+					font-size: 32upx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					border-radius: 4upx;
+				}
+				.box_btn1{
+					background: #F3F3F3;
+					color: #33B925;
+				}
+				.box_btn2{
+					background: #37962B;
+					color: #FFFFFF;
+				}
+			}
+		}
+	}
+</style>

+ 99 - 0
components/toptab/tab.vue

@@ -0,0 +1,99 @@
+<template>
+	<view class="listtopb flexc" >
+		<block v-for="(ite,idx) in tablist" :key='idx'>
+			<block v-if='ite.limt'>
+				<view class="tit" :style="'height:'+height+'rpx'" :class="tabidx==ite.val?'act':''" @click="getTab(ite.val)" v-if="checkPermi([ite.limt])">
+					<view class="f16 fw mb6 tits" >{{ite.tit}}</view>
+					<view class="f500 f14 txt" v-if="ite.txt||ite.txt==0">{{ite.txt}}</view>
+					<image :src="tapline" class="line"></image>
+				</view>
+			</block>
+			<block v-else>
+				<view class="tit" :style="'height:'+height+'rpx'" :class="tabidx==ite.val?'act':''" @click="getTab(ite.val)" >
+					<view class="f16 fw mb6 tits" >{{ite.tit}}</view>
+					<view class="f500 f14 txt" v-if="ite.txt||ite.txt==0">{{ite.txt}}</view>
+					<image :src="tapline" class="line"></image>
+				</view>
+				
+			</block>
+		</block>
+		<!-- 切换按钮 -->
+		<view :style="'height:'+height+'rpx'" class="chebox" @click="getroleFn" v-if="checkPermi(['register:teacher:list'])&&tabbtn">
+			<image :src="micone"></image>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	export default{
+		props:{
+			tablist:{
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			height:{
+				type: Number,
+				default () {
+					return 100
+				}
+			},
+			tabbtn:{
+				type:Boolean,
+				default () {
+					return false
+				}
+			},
+			tabidx:{
+				type: Number,
+				default () {
+					return 0
+				}
+			}
+		},
+		data(){
+			return{
+				// :0,
+				tapline:require("@/static/images/hline.png"), 
+				micone:require("@/static/images/micone.png"),
+			}
+		},
+		mounted() {
+			// this.tabidxs=this.tabidx
+		},
+		methods:{
+			checkPermi, checkRole,
+			getTab(idx){
+				// this.tabidxs=idx;
+				this.$emit('getCheck',idx)
+			},
+			getroleFn(){
+				this.$emit('getroleFn')
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.listtopb{
+		background-color: #ffffff;
+		 .tit{flex: 1;display: flex;flex-direction: column;justify-content: center;position: relative;
+			view{text-align: center;}
+			.tits{color: #AAAAAA ;}
+			.txt{color: #aaaaaa;}
+			.line{width: 40rpx;height: 12rpx;position: absolute;left: 50%;margin-left: -20rpx;bottom: 6rpx;display: none;}
+		 &.act{
+			 // &::after{content: '';width: 100rpx;height: 6rpx;background:#FE5706 ;position: absolute;left: 50%;margin-left: -50rpx;bottom: 0;}
+			.tits{color: #161616;}
+			.txt{color: #FE5706;}
+			.line{display: block;}
+			}
+		 }
+		.chebox{width: 96rpx;background: #FFFFFF;
+box-shadow: -10rpx 0rpx 10rpx 0rpx rgba(196,191,191,0.22);display: flex;align-items: center;justify-content: center;
+			image{width: 30rpx;height: 26rpx;}
+		}
+	}
+</style>

+ 0 - 167
components/uni-section/uni-section.vue

@@ -1,167 +0,0 @@
-<template>
-	<view class="uni-section">
-		<view class="uni-section-header" @click="onClick">
-				<view class="uni-section-header__decoration" v-if="type" :class="type" />
-        <slot v-else name="decoration"></slot>
-
-        <view class="uni-section-header__content">
-          <text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text>
-          <text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text>
-        </view>
-
-        <view class="uni-section-header__slot-right">
-          <slot name="right"></slot>
-        </view>
-		</view>
-
-		<view class="uni-section-content" :style="{padding: _padding}">
-			<slot />
-		</view>
-	</view>
-</template>
-
-<script>
-
-	/**
-	 * Section 标题栏
-	 * @description 标题栏
-	 * @property {String} type = [line|circle|square] 标题装饰类型
-	 * 	@value line 竖线
-	 * 	@value circle 圆形
-	 * 	@value square 正方形
-	 * @property {String} title 主标题
-	 * @property {String} titleFontSize 主标题字体大小
-	 * @property {String} titleColor 主标题字体颜色
-	 * @property {String} subTitle 副标题
-	 * @property {String} subTitleFontSize 副标题字体大小
-	 * @property {String} subTitleColor 副标题字体颜色
-	 * @property {String} padding 默认插槽 padding
-	 */
-
-	export default {
-		name: 'UniSection',
-    emits:['click'],
-		props: {
-			type: {
-				type: String,
-				default: ''
-			},
-			title: {
-				type: String,
-				required: true,
-				default: ''
-			},
-      titleFontSize: {
-        type: String,
-        default: '14px'
-      },
-			titleColor:{
-				type: String,
-				default: '#333'
-			},
-			subTitle: {
-				type: String,
-				default: ''
-			},
-      subTitleFontSize: {
-        type: String,
-        default: '12px'
-      },
-      subTitleColor: {
-        type: String,
-        default: '#999'
-      },
-			padding: {
-				type: [Boolean, String],
-				default: false
-			}
-		},
-    computed:{
-      _padding(){
-        if(typeof this.padding === 'string'){
-          return this.padding
-        }
-
-        return this.padding?'10px':''
-      }
-    },
-		watch: {
-			title(newVal) {
-				if (uni.report && newVal !== '') {
-					uni.report('title', newVal)
-				}
-			}
-		},
-    methods: {
-			onClick() {
-				this.$emit('click')
-			}
-		}
-	}
-</script>
-<style lang="scss" >
-	$uni-primary: #2979ff !default;
-
-	.uni-section {
-		background-color: #fff;
-    .uni-section-header {
-      position: relative;
-      /* #ifndef APP-NVUE */
-      display: flex;
-      /* #endif */
-      flex-direction: row;
-      align-items: center;
-      padding: 12px 10px;
-      font-weight: normal;
-
-      &__decoration{
-        margin-right: 6px;
-        background-color: $uni-primary;
-        &.line {
-          width: 4px;
-          height: 12px;
-          border-radius: 10px;
-        }
-
-        &.circle {
-          width: 8px;
-          height: 8px;
-          border-top-right-radius: 50px;
-          border-top-left-radius: 50px;
-          border-bottom-left-radius: 50px;
-          border-bottom-right-radius: 50px;
-        }
-
-        &.square {
-          width: 8px;
-          height: 8px;
-        }
-      }
-
-      &__content {
-        /* #ifndef APP-NVUE */
-        display: flex;
-        /* #endif */
-        flex-direction: column;
-        flex: 1;
-        color: #333;
-
-        .distraction {
-          flex-direction: row;
-          align-items: center;
-        }
-        &-sub {
-          margin-top: 2px;
-        }
-      }
-
-      &__slot-right{
-        font-size: 14px;
-      }
-    }
-
-    .uni-section-content{
-      font-size: 14px;
-    }
-	}
-</style>

+ 8 - 3
config.js

@@ -1,8 +1,13 @@
 // 应用全局配置
 module.exports = {
-  // baseUrl: 'https://vue.ruoyi.vip/prod-api',
-  baseUrl: 'http://192.168.101.168:8010',
-  // baseUrl: 'http://localhost:8080',
+  baseUrl: 'https://vue.ruoyi.vip/prod-api',
+  // baseUrl: 'https://lyyy.qs163.cn/prod-api',
+  // baseUrl: 'http://192.168.101.168:8065',
+  // baseUrl: 'http://192.168.101.11:8089',
+  // baseUrlimg: 'http://114.99.127.243:2001',
+  Clientid:'428a8310cd442757ae699df5d894f051',//
+ // https://xygl.cnzxy.cn h5链接地址
+  confirmflag:false,//是否有弹窗
   // 应用信息
   appInfo: {
     // 应用名称

+ 2 - 0
main.js

@@ -4,9 +4,11 @@ import store from './store' // store
 import plugins from './plugins' // plugins
 import './permission' // permission
 Vue.use(plugins)
+import {toast} from "@/utils/common.js"
 
 Vue.config.productionTip = false
 Vue.prototype.$store = store
+Vue.prototype.$toast=toast;
 
 App.mpType = 'app'
 

+ 48 - 16
manifest.json

@@ -1,20 +1,25 @@
 {
-    "name" : "若依移动端",
-    "appid" : "__UNI__25A9D80",
+    "name" : "园区安防",
+    "appid" : "__UNI__9ACE566",
     "description" : "",
-    "versionName" : "1.1.0",
-    "versionCode" : "100",
+    "versionName" : "1.0.0",
+    "versionCode" : 100,
     "transformPx" : false,
     "app-plus" : {
         "usingComponents" : true,
         "nvueCompiler" : "uni-app",
+        "compatible" : {
+            "ignoreVersion" : true //true表示忽略版本检查提示框,HBuilderX1.9.0及以上版本支持
+        },
         "splashscreen" : {
             "alwaysShowBeforeRender" : true,
             "waiting" : true,
             "autoclose" : true,
             "delay" : 0
         },
-        "modules" : {},
+        "modules" : {
+            "Geolocation" : {}
+        },
         "distribute" : {
             "android" : {
                 "permissions" : [
@@ -35,13 +40,35 @@
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                 ]
             },
-            "ios" : {},
-            "sdkConfigs" : {}
+            "ios" : {
+                "dSYMs" : false
+            },
+            "sdkConfigs" : {
+                "ad" : {},
+                "maps" : {
+                    "amap" : {
+                        "appkey_ios" : "",
+                        "appkey_android" : ""
+                    }
+                },
+                "geolocation" : {
+                    "amap" : {
+                        "__platform__" : [ "android" ],
+                        "appkey_ios" : "b85f0c64b3c9a082d740912cf3019c88",
+                        "appkey_android" : "b85f0c64b3c9a082d740912cf3019c88"
+                    }
+                }
+            },
+            "icons" : {
+                "android" : {
+                    "xhdpi" : "static/logo.png"
+                }
+            }
         }
     },
     "quickapp" : {},
     "mp-weixin" : {
-        "appid" : "wxccd7e2a0911b3397",
+        "appid" : "wx694b1ba10320b8bc",
         "setting" : {
             "urlCheck" : false,
             "es6" : false,
@@ -51,19 +78,24 @@
         "optimization" : {
             "subPackages" : true
         },
-        "usingComponents" : true
+        "usingComponents" : true,
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "获取当前位置"
+            }
+        }
     },
     "vueVersion" : "2",
     "h5" : {
         "template" : "static/index.html",
-        "devServer" : {
-            "port" : 9090,
-            "https" : false
-        },
-        "title" : "RuoYi-App",
+        "title" : "智慧校园访客系统",
         "router" : {
-            "mode" : "hash",
-            "base" : "./"
+            "mode" : "history",
+            "base" : ""
+        },
+        "devServer" : {
+            "https" : false,
+            "port" : 9090
         }
     }
 }

+ 24 - 0
package-lock.json

@@ -0,0 +1,24 @@
+{
+  "name": "zheng_xie_ui",
+  "lockfileVersion": 2,
+  "requires": true,
+  "packages": {
+    "": {
+      "dependencies": {
+        "base-64": "^1.0.0"
+      }
+    },
+    "node_modules/base-64": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz",
+      "integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
+    }
+  },
+  "dependencies": {
+    "base-64": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz",
+      "integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
+    }
+  }
+}

+ 5 - 0
package.json

@@ -0,0 +1,5 @@
+{
+  "dependencies": {
+    "base-64": "^1.0.0"
+  }
+}

+ 60 - 38
pages.json

@@ -1,29 +1,46 @@
 {
-  "pages": [{
-    "path": "pages/login",
-    "style": {
-      "navigationBarTitleText": "登录"
-    }
-  }, {
+  "pages": [
+	  
+	{
+	"path": "pages/login",
+	"style": {
+		"navigationBarTitleText": "登录",
+		"h5":{
+			"titleNView":false
+			}
+		}
+	},
+	{
+	  "path": "pages/index/index",
+	  "style": {
+	    "navigationBarTitleText": "智慧访客预约系统",
+	    "navigationStyle": "custom"
+	  }},
+	
+  {
     "path": "pages/register",
     "style": {
       "navigationBarTitleText": "注册"
     }
-  }, {
-    "path": "pages/index",
-    "style": {
-      "navigationBarTitleText": "若依移动端框架",
-      "navigationStyle": "custom"
-    }
-  }, {
+  }, 
+	{
+	  "path": "pages/agreement",
+	  "style": {
+	    "navigationBarTitleText": "用户协议及隐私条款"
+	  }
+	},
+	
+  {
     "path": "pages/work/index",
     "style": {
       "navigationBarTitleText": "工作台"
     }
-  }, {
+	}, {
     "path": "pages/mine/index",
     "style": {
-      "navigationBarTitleText": "我的"
+      "navigationBarTitleText": "我的",
+	  "navigationStyle": "custom",
+	  "enablePullDownRefresh":true
     }
   }, {
     "path": "pages/mine/avatar/index",
@@ -45,6 +62,16 @@
     "style": {
       "navigationBarTitleText": "修改密码"
     }
+	}, {
+	  "path": "pages/mine/pwd/forgetpwd",
+	  "style": {
+	    "navigationBarTitleText": "忘记密码"
+	  }
+	}, {
+	  "path": "pages/mine/pwd/resetpwd",
+	  "style": {
+	    "navigationBarTitleText": "重置密码"
+	  }
   }, {
     "path": "pages/mine/setting/index",
     "style": {
@@ -71,29 +98,24 @@
       "navigationBarTitleText": "浏览文本"
     }
   }],
-  "tabBar": {
-    "color": "#000000",
-    "selectedColor": "#000000",
-    "borderStyle": "white",
-    "backgroundColor": "#ffffff",
-    "list": [{
-        "pagePath": "pages/index",
-        "iconPath": "static/images/tabbar/home.png",
-        "selectedIconPath": "static/images/tabbar/home_.png",
-        "text": "首页"
-      }, {
-        "pagePath": "pages/work/index",
-        "iconPath": "static/images/tabbar/work.png",
-        "selectedIconPath": "static/images/tabbar/work_.png",
-        "text": "工作台"
-      }, {
-        "pagePath": "pages/mine/index",
-        "iconPath": "static/images/tabbar/mine.png",
-        "selectedIconPath": "static/images/tabbar/mine_.png",
-        "text": "我的"
-      }
-    ]
-  },
+  // "tabBar": {
+  //   "color": "#000000",
+  //   "selectedColor": "#000000",
+  //   "borderStyle": "white",
+  //   "backgroundColor": "#ffffff",
+  //   "list": [{
+  //       "pagePath": "pages/index/index",
+  //       "iconPath": "static/images/tabbar/home.png",
+  //       "selectedIconPath": "static/images/tabbar/home_.png",
+  //       "text": "首页"
+  //     }, {
+  //       "pagePath": "pages/mine/index",
+  //       "iconPath": "static/images/tabbar/mine.png",
+  //       "selectedIconPath": "static/images/tabbar/mine_.png",
+  //       "text": "我的"
+  //     }
+  //   ]
+  // },
   "globalStyle": {
     "navigationBarTextStyle": "black",
     "navigationBarTitleText": "RuoYi",

+ 80 - 0
pages/agreement.vue

@@ -0,0 +1,80 @@
+<template>
+	<view class="agreen">
+		 <!-- <view class="tit">用户协议及隐私条款</view> -->
+		 <view class="txt tn2">尊敬的用户,欢迎使用中新云有限公司提供的服务。在使用前请您阅读如下服务协议,使用本应用即表示您同意接受本协议,本协议产生法律效力,特别涉及免除或者限制中新云有限公司责任的条款,请仔细阅读。如有任何问题,可向中新云有限公司咨询。</view>
+		 <view class="tits">1. 服务条款的确认和接受</view>
+		 <view class="txt tn2">通过访问或使用本应用,表示用户同意接受本协议的所有条件和条款</view>
+		 <view class="tits">2. 服务条款的变更和修改</view>
+		 <view class="txt tn2">中新云有限公司有权在必要时修改服务条款,服务条款一旦发生变更,将会在重要页面上提示修改内容。如果不同意所改动的内容,用户可以放弃获得的本应用信息服务。如果用户继续享用本应用的信息服务,则视为接受服务条款的变更。本应用保留随时修改或中断服务而不需要通知用户的权利。本应用行使修改或中断服务的权利,不需对用户或第三方负责。</view>
+		 <view class="tits">3.用户行为</view>
+		 <view class="txt tn2">中新云有限公司有权对用户使用中新云智APP的情况进行审查和监督,如用户在使用中新云智APP时违反任何以下规定,中新云有限公司或其授权的人有权要求用户改正或直接采取一切必要的措施以减轻用户不当行为造成的影响。</view>
+		 <view class="tits">3.1 用户账号、密码和安全</view>
+		 <view class="txt tn2">用户一旦注册成功,便成为中新云有限公司的合法用户,将得到一个密码和帐号。同时,此账号密码可登录中新云有限公司中新云智APP程序。因此用户应采取合理措施维护其密码和帐号的安全。用户对利用该密码和帐号所进行的一切活动负全部责任;由该等活动所导致的任何损失或损害由用户承担,中新云有限公司不承担任何责任。 用户的密码和帐号遭到未授权的使用或发生其他任何安全问题,用户可以立即通知中新云有限公司,中新云有限公司有权予以关闭并注销其内容。</view>
+		 <view class="tits">3.2 账号注册时的禁止行为</view>
+		 <view class="txt">(1)冒充任何人或机构,或以虚伪不实的方式谎称或使人误认为与任何人或任何机构有关的名称;</view>
+		 <view class="txt">(2)请勿注册不文明、不健康名字,或包含歧视、侮辱、猥亵类词语的名字;</view>
+		 <view class="txt">(3)请勿注册易产生歧义、引起他人误解的名字;</view>
+		 <view class="tits">3.3 用户在本应用上不得发布下列违法信息和照片:</view>
+		 <view class="txt">(1)反对宪法所确定的基本原则的;</view>
+		 <view class="txt">(2)危害国家安全,泄露国家秘密,颠覆国家政权,破坏国家统一的;</view>
+		 <view class="txt">(3)损害国家荣誉和利益的;</view>
+		 <view class="txt">(4)煽动民族仇恨、民族歧视,破坏民族团结的;</view>
+		 <view class="txt">(5)破坏国家宗教政策,宣扬邪教和封建迷信的;</view>
+		 <view class="txt">(6)散布谣言,扰乱社会秩序,破坏社会稳定的;</view>
+		 <view class="txt">(7)散布淫秽、色情、赌博、暴力、凶杀、恐怖或者教唆犯罪的;</view>
+		 <view class="txt">(8)侮辱或者诽谤他人,侵害他人合法权益的;</view>
+		 <view class="txt">(9)含有法律、行政法规禁止的其他内容的;</view>
+		 <view class="txt">(10)禁止骚扰、毁谤、威胁、仿冒网站其他用户;</view>
+		 <view class="txt">(11)严禁煽动非法集会、结社、游行、示威、聚众扰乱社会秩序;</view>
+		 <view class="txt">(12)严禁发布可能会妨害第三方权益的文件或者信息,例如(包括但不限于):病毒代码、黑客程序、软件破解注册信息。</view>
+		 <view class="txt">(13)禁止上传他人作品。其中包括你从互联网上下载、截图或收集的他人的作品;</view>
+		 <view class="txt">(14)禁止上传广告、横幅、标志等网络图片;</view>
+		 <view class="tits">3.4 账号盗用</view>
+		 <view class="txt tn2">盗取他人用户账号或利用网络通讯骚扰他人,均属于非法行为。用户不得采用测试、欺骗等任何非法手段,盗取其他用户的账号和对他人进行骚扰。</view>
+		 
+		  <view class="tit">隐私条款</view>
+		 <view class="tits">1.用户信息公开情况说明</view>
+		 <view class="txt tn2">尊重用户个人隐私是中新云有限公司的一项基本政策。所以,中新云有限公司不会在未经合法用户授权时公开、编辑或透露其注册资料及保存在本应用中的非公开内容,除非有下列情况:</view>
+		 <view class="txt">(1)有关法律规定或中新云有限公司合法服务程序规定;</view>
+		 <view class="txt">(2)在紧急情况下,为维护用户及公众的权益;</view>
+		 <view class="txt">(3)为维护中新云有限公司的商标权、专利权及其他任何合法权益;</view>
+		 <view class="txt">(4)其他需要公开、编辑或透露个人信息的情况;</view>
+		 <view class="txt tn2">在以下(包括但不限于)几种情况下,中新云有限公司有权使用用户的个人信息:</view>
+		 <view class="txt">(1)在进行促销或抽奖时,中新云有限公司可能会与赞助商共享用户的个人信息,在这些情况下中新云有限公司会在发送用户信息之前进行提示,并且用户可以通过不参与来终止传送过程;</view>
+		 <view class="txt">(2)中新云有限公司可以将用户信息与第三方数据匹配;</view>
+		 <view class="txt">(3)中新云有限公司会通过透露合计用户统计数据,向未来的合作伙伴、广告商及其他第三方以及为了其他合法目的而描述中新云有限公司的服务;</view>
+
+		 <view class="tits">2.隐私权政策适用范围</view>
+		 <view class="txt">(1)用户在登录本应用服务器时留下的个人身份信息;</view>
+		 <view class="txt">(2)用户通过本应用服务器与其他用户或非用户之间传送的各种资讯;</view>
+		 <view class="txt">(3)本应用与商业伙伴共享的其他用户或非用户的各种信息;</view>
+		 <view class="tits">3.资讯公开与共享</view>
+		 <view class="txt tn2">中新云有限公司不会将用户的个人信息和资讯故意透露、出租或出售给任何第三方。但以下情况除外:</view>
+		 <view class="txt">(1)用户本人同意与第三方共享信息和资讯;</view>
+		 <view class="txt">(2)只有透露用户的个人信息和资讯,才能提供用户所要求的某种产品和服务;</view>
+		 <view class="txt">(3)应代表本应用提供产品或服务的主体的要求提供(除非我们另行通知,否则该等主体无权将相关用户个人信息和资讯用于提供产品和服务之外的其他用途):根据法律法规或行政命令的要求提供;因外部审计需要而提供;用户违反了本应用服务条款或任何其他产品及服务的使用规定;经本站评估,用户的帐户存在风险,需要加以保护。</view>
+		 <view class="tits">4.账户删除申请</view>
+		 <view class="txt tn2">用户有权在任何时候编辑用户在中新云有限公司的帐户信息和资讯,用户也可以填写相关申请表格,要求删除个人帐户,但是用户无条件同意在你的帐户删除后,该帐户内及与该帐户相关的信息和资讯仍然保留在本网站档案记录中,除上述第三条规定的情况外,中新云有限公司将为用户保密。</view>
+		 
+	</view>
+</template>
+
+<script>
+	export default{
+		data(){
+			return{
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+.agreen{padding: 40rpx 32rpx;box-sizing: border-box;background-color: #ffffff;}
+	.tit{font-size: 40rpx;color: #333333;font-weight: bold;text-align: center;margin-bottom: 36rpx;}
+	.tits{font-size: 32rpx;color: #333333;font-weight: 500;line-height: 68rpx;}
+	.txt{font-size: 30rpx;color: #343434;text-indent: 2em;margin-bottom: 20rpx;
+	&.tn2{text-indent: 0;}
+	}
+	
+</style>

+ 0 - 43
pages/index.vue

@@ -1,43 +0,0 @@
-<template>
-  <view class="content">
-    <image class="logo" src="@/static/logo.png"></image>
-    <view class="text-area">
-      <text class="title">Hello RuoYi</text>
-    </view>
-  </view>
-</template>
-
-<script>
-  export default {
-    onLoad: function() {
-    }
-  }
-</script>
-
-<style>
-  .content {
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-  }
-
-  .logo {
-    height: 200rpx;
-    width: 200rpx;
-    margin-top: 200rpx;
-    margin-left: auto;
-    margin-right: auto;
-    margin-bottom: 50rpx;
-  }
-
-  .text-area {
-    display: flex;
-    justify-content: center;
-  }
-
-  .title {
-    font-size: 36rpx;
-    color: #8f8f94;
-  }
-</style>

+ 311 - 0
pages/index/index.vue

@@ -0,0 +1,311 @@
+<template>
+	<view class="yybox">
+		<view class="navbox">
+			<image :src="navbg" class="navbg"></image>
+			<uni-nav-bar  color="#ffffff" leftWidth='340rpx'  :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
+				<block slot="left">
+					<view class="navleft">
+						<view>{{city}} {{daytime}}</view>
+						<view>农历{{lunar}}</view>
+					</view>
+				</block>
+				<block slot="right">
+					<view class="topr flexccc" v-if="weather">
+						<image :src="weathericon" class="navright"></image>
+						<view class="f12 cof">{{weather}} {{temperature}}­°C</view>
+					</view>
+				</block>
+			</uni-nav-bar>
+		</view>
+		<!-- 主体 -->
+		<view class="yymain">
+			<view class="yycard">
+				<view class="top flexccc">
+					<image :src="headimg"></image>
+					<view>欢迎您,尊敬的管理员!</view>
+				</view>
+				<view class="flexcc">
+					<view class="list">
+						<view class="tit">613</view>
+						<view class="txt">来访数(位)</view>
+					</view>
+					<view class="list">
+						<view class="tit">246</view>
+						<view class="txt">本月预约(位)</view>
+					</view>
+					<view class="list">
+						<view class="tit">613</view>
+						<view class="txt">今日来访(位)</view>
+					</view>
+					<view class="list">
+						<view class="tit">613</view>
+						<view class="txt">今日预约(位)</view>
+					</view>
+					
+				</view>
+			</view>
+			<view class="yylists">
+				<view class="yyltab flexcj">
+					<view class="left flexc">待审批列表<image :src="listline"></image></view>
+					<view class="right" @click="getMoreFn">查看更多 >></view>
+				</view>
+				<!-- 列表 -->
+				<view>
+					<y-list type='1' :datalist="list" :wtdt="wtdt" @getDetail='getDetail' :adrlist="adrlist" @getDelFn="getDelFn" @gettypeFn="gettypeFn"></y-list>
+				</view>
+			</view>
+		</view>
+	
+	<footers v-if="isfootflag" :footlist="footlist" :footerindex="footerindex" :color_checked="color_checked" :color_nochecked="color_nochecked" :isHomeIndex="true"></footers>
+  </view>
+</template>
+
+<script>
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import self from '@/utils/location.js';
+	import yList from "@/components/order/list.vue"
+	let { calendar } = require("@/components/lunc-calendar/calendar.js");
+	import {getReservatcountl,getReservatList,getReservatDel,getReservatSh} from "@/api/mine/order.js"
+	import {getDictionaryFn} from "@/api/mine/register.js"
+	import footers from '@/components/footer/footer.vue'
+  export default {
+	components:{yList,footers},
+	data(){
+		return{
+			footlist:[
+				{module:'home',title:'首页',icon_checked:require('@/static/images/tabbar/home_.png'),icon_nochecked:require('@/static/images/tabbar/home.png')},
+				{module:'mine',title:'我的',icon_checked:require('@/static/images/tabbar/mine_.png'),icon_nochecked:require('@/static/images/tabbar/mine.png')},
+				],
+			footerindex:'home',
+			isfootflag:true,
+			color_checked :'161616',
+			color_nochecked :'666666',
+			navbg:require("@/static/images/navbg.png"),
+			headimg:require("@/static/images/order/staff/head.png"),
+			listline:require("@/static/images/order/staff/listline.png"),
+			backgroundColor: "transparent",
+			city:'',
+			weather:'',
+			temperature:'',
+			list:[],
+			adrlist:[],
+			pageSize: 10,
+			pageNum: 1,
+			reachflag: false,
+			wtdt:'',
+			daytime:'',
+			lunar:'',
+			weathericon:require("@/static/images/weather/weaionf.png"),
+			
+		}
+	},
+	onPageScroll(e) {
+		var scrollTop = Number(e.scrollTop);
+		if (scrollTop > 0) {
+			this.backgroundColor = '#0491FD'
+		} else {
+			this.backgroundColor = 'transparent'
+		}
+	},
+	onLoad: function() {
+		uni.$on('refreshdatalist',(e) => {
+			this.reachflag=false;
+			this.pageNum=1;
+			this.list=[];
+			this.getDataFn();
+			// this.getcount();
+		})
+		
+		this.init()
+		// this.getcount()
+		this.getDataFn()
+		
+	},
+	onUnload() {
+		uni.$off('refreshdatalist')
+	},
+
+	onShow() {
+		var that=this;
+		this.time();
+		// #ifndef H5
+		self.getLocation(function(res){
+			if(res==-1){
+				that.setflag=true
+			}else{
+				// that.getAdrinfoFn(res)
+				// that.location = `${res.lng},${res.lat}`
+				that.city=res.city;
+				that.temperature=res.temperature;
+				that.weather=res.weather;
+				that.weathericon=res.icon;
+			}			
+		})
+		// #endif
+	},
+	mounted() {
+	},
+	// 上拉触底加载更多触发事件
+	onReachBottom() {
+		if (this.reachflag) {
+			this.pageNum++
+			this.getDataFn()
+		}
+	},
+	methods:{
+		checkPermi, checkRole,
+		init(){
+			// 记录来源
+			getDictionaryFn('jluly').then(res=>{
+				if(res.code==200){
+					this.adrlist = res.data.map(v => {
+						return {
+							dictLabel: v.dictLabel,
+							dictValue: Number(v.dictValue)
+						}
+					})
+				}
+			})
+		},
+		getMoreFn(){
+			this.$tab.navigateTo("/pages/order/list")
+		},
+		getDelFn(id){
+			var that=this;
+			getReservatDel(id).then(res=>{
+				if(res.code==200){
+					that.$toast('删除成功')
+					setTimeout(function(){
+						that.reachflag=true;
+						that.pageNum=1;
+						that.list=[];
+						that.getDataFn();
+						// that.getcount();
+					},1500)
+					
+				}else{
+					that.$toast(res.msg)
+				}
+			})
+		},
+		gettypeFn(ite){
+			var that=this;
+			var params={
+				reservatId:ite.id,
+				visitType:ite.type
+			}
+			getReservatSh(params).then(res=>{
+				if(res.code==200){
+					that.$toast('审核成功')
+					setTimeout(function(){
+						that.reachflag=true;
+						that.pageNum=1;
+						that.list=[];
+						that.getDataFn();
+						// that.getcount();
+					},1500)
+					
+				}else{
+					that.$toast(res.msg)
+				}
+			})
+		},
+		time() {
+			var date = new Date();
+			var y = date.getFullYear();
+			var m = date.getMonth() + 1;
+			var d = date.getDate();
+			let lunar = calendar.solar2lunar(y, m, d); //农历
+			this.lunar=lunar.IMonthCn+lunar.IDayCn;
+			this.daytime=m+'月'+d+"日";
+			// var h = date.getHours();
+			// var min = date.getMinutes();
+			// var s = date.getSeconds();
+			// var week = date.getDay(); //获取当前星期X(0-6,0代表星期天)
+			// var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
+			// var yearStr = y + '-' + (m < 10 ? ('0' + m) : m) + '-' + (d < 10 ? ('0' + d) : d)
+			// var timeStr = (h < 10 ? ('0' + h) : h) + ':' + (min < 10 ? ('0' + min) : min) + ':' + (s < 10 ? (
+			// 	'0' + s) : s);
+			// this.kaTime = yearStr + ' ' + timeStr;
+		},
+		getcount(){
+			
+			getReservatcountl().then(res=>{
+				if(res.code==200){
+					this.conuntinfo=res.data
+				}else{
+					this.$toast(res.msg)
+				}
+			})
+		},
+		getDetail(data){
+			this.$tab.navigateTo('/pages/order/staffcode?type=look&id='+data)
+		},
+		getDataFn(){
+			var params={
+				pageSize:this.pageSize,
+				pageNum: this.pageNum,
+				// visitType:3
+			}
+			getReservatList(params).then(res=>{
+				if(res.code==200){
+					if (res.rows.length < this.pageSize) {
+						this.reachflag = false
+						this.wtdt = '到底了~';
+					} else {
+						var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -	1)
+						if (num < res.total) {
+							this.reachflag = true
+							this.wtdt = '上拉加载更多'
+						} else {
+							this.reachflag = false
+							this.wtdt = '到底了~';
+						}
+					}
+					if (this.pageNum == 1) {
+						this.list = res.rows;
+					} else {
+						this.list = this.list.concat(res.rows)
+					}
+				}else{
+					this.$toast(res.msg)
+				}
+			}) 
+			
+		},
+	},
+	
+  }
+</script>
+
+<style lang="scss" scoped>
+.navbox{
+	.navbg{width: 100%;height: 692rpx;position: fixed;left: 0;right: 0;top: 0;z-index: 1;}	
+}
+.navleft{padding-left: 12rpx;
+		view{font-weight: bold;font-size: 26rpx;color: #FFFFFF;line-height: 36rpx;}
+	}
+	.navright{width: 40rpx;height: 40rpx;}
+.yymain{
+	flex: 1;z-index: 2;padding-top: 20rpx;
+}
+.yycard{width: 684rpx;height: 306rpx;background: #FFFFFF;border-radius: 14rpx;margin: 0 auto;
+	.top{
+		image{width: 132rpx;height: 132rpx;margin-bottom: 12rpx;margin-top: -56rpx;}
+		view{font-weight: bold;font-size: 30rpx;color: #161616;}
+	}
+	.list{text-align: center;flex: 1;padding-top: 44rpx;
+		.tit{font-weight: bold;font-size: 36rpx;color: #0391FD;margin-bottom: 16rpx;}
+		.txt{font-weight: bold;font-size: 18rpx;color: #666666;}
+	}
+}
+.yylists{width: 684rpx;margin: 42rpx auto 0;
+	.yyltab{margin-bottom: 28rpx;
+		.left{font-weight: bold;font-size: 15px;color: #161616;
+			image{width: 110rpx;height: 14rpx;margin-left: 16rpx;}
+		}
+		.right{font-size: 500;font-size: 22rpx;color: #AAAAAA;}
+	}
+}
+
+</style>

+ 374 - 166
pages/login.vue

@@ -1,189 +1,384 @@
 <template>
-  <view class="normal-login-container">
-    <view class="logo-content align-center justify-center flex">
-      <image style="width: 100rpx;height: 100rpx;" :src="globalConfig.appInfo.logo" mode="widthFix">
-      </image>
-      <text class="title">若依移动端登录</text>
-    </view>
-    <view class="login-form-content">
-      <view class="input-item flex align-center">
-        <view class="iconfont icon-user icon"></view>
-        <input v-model="loginForm.username" class="input" type="text" placeholder="请输入账号" maxlength="30" />
-      </view>
-      <view class="input-item flex align-center">
-        <view class="iconfont icon-password icon"></view>
-        <input v-model="loginForm.password" type="password" class="input" placeholder="请输入密码" maxlength="20" />
-      </view>
-      <view class="input-item flex align-center" style="width: 60%;margin: 0px;" v-if="captchaEnabled">
-        <view class="iconfont icon-code icon"></view>
-        <input v-model="loginForm.code" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
-        <view class="login-code"> 
-          <image :src="codeUrl" @click="getCode" class="login-code-img"></image>
-        </view>
-      </view>
-      <view class="action-btn">
-        <button @click="handleLogin" class="login-btn cu-btn block bg-blue lg round">登录</button>
-      </view>
-      <view class="reg text-center" v-if="register">
-        <text class="text-grey1">没有账号?</text>
-        <text @click="handleUserRegister" class="text-blue">立即注册</text>
-      </view>
-      <view class="xieyi text-center">
-        <text class="text-grey1">登录即代表同意</text>
-        <text @click="handleUserAgrement" class="text-blue">《用户协议》</text>
-        <text @click="handlePrivacy" class="text-blue">《隐私协议》</text>
-      </view>
-    </view>
-     
+  <view class="regbox pregbox flexdc" v-if="loginflag" style="padding-top: 60rpx;">
+	  <image :src="headimg" class="headimg flex0"></image>
+	   
+	  <view class="flex1" style="position: relative;">
+		  <!-- #ifdef APP-PLUS -->
+		  <!-- <image :src="ldicon" class="mzimg flex0"></image>
+			<view class="mb24 mt50">
+				<view class="f25 c16 fw5 mb30 txc">133****0756</view>
+				<view class="rbtn">本机号码一键登录</view>
+			</view> -->
+		  <!-- #endif -->
+		  <!-- #ifdef MP-WEIXIN -->
+		   <!-- #endif -->
+		  <view class="tab flexcc">
+			  <block v-for="(ite,idx) in tablist" :key="idx">
+				  <view v-if="ite.val!=1"  class="tabtit" :class="tabidx==ite.val?'act':''" @click="getTab(ite.val)">
+				  {{ite.tit}}</view> 
+			  </block>
+			 
+		  </view>
+		  <!-- 手机号登录 -->
+		  <view class="login-form-content" v-if="tabidx!=1">
+
+		  	<view class="input-item">
+		  		<view class="login_tit">账号</view>
+		  		<view class="login_box">
+		  			<!-- <view class="login_boxl">+86</view> -->
+		  			 <input  v-model="loginForm.username" class="input" type="text" placeholder="请输入登录账号" maxlength="30" />
+		  		</view>
+		  	</view>
+		  	<block v-if="tabidx==2">
+		  		<view class="input-item" >
+					<view class="flexcj">
+						<view class="login_tit">密码</view>
+						<view class="login_jz" @click="jzflag=!jzflag">
+							<image :src="pcicon" v-if="jzflag"></image>
+							<image :src="pnicon" v-else></image>
+							<view>记住密码</view>
+						</view>
+					</view>
+		  			
+		  			 <view class="login_box">
+		  				 <input v-if="checkeye" v-model="loginForm.password" type="text"  class="input" placeholder="请输入密码" maxlength="20" />
+		  				 <input v-else v-model="loginForm.password" type="password"  class="input" placeholder="请输入密码" maxlength="20" />
+						 <view class="line flex0"></view>
+						 <view class="login_txt" @click="getForget"><text>忘记密码</text></view>
+		  			 </view>
+		  		</view>
+		  		<view class="input-item flex align-center" style="width: 60%;margin: 0px;margin-bottom: 24rpx;" v-if="captchaEnabled">
+		  		  <input v-model="tucode" type="number" class="input" placeholder="请输入验证码" maxlength="4" />
+		  		  <view class="login-code"> 
+		  		    <image :src="codeUrl" @click="getCode" class="login-code-img"></image>
+		  		  </view  >
+		  		</view>
+		  		 
+		  	</block>
+		  	<!-- <view v-if="tabidx==0" class="input-item" style="margin-bottom: 24rpx;" >
+		  		<view class="login_tit">验证码</view>
+		  		 <view style="display: flex;align-items: center;">
+		  			 <input v-model="duancode" type="code" class="input" placeholder="请输入短信验证码" maxlength="20" />
+		  			 <view v-if="timefalg" class="codes">重新发送{{time}}s</view>
+		  			 <view v-else class="codess" @click="getsendCode">发送验证码</view>
+		  		 </view>
+		  	</view> -->
+		    <button v-if="captchaEnabled"  type="primary" class=" rbtn mb24 mt50" :class="tucode&&loginForm.username&&loginForm.password?'btn2':'btn'"  @click="getLogin">登录</button>
+		    <button v-else type="primary" class=" rbtn mb24 mt50" :class="loginForm.username&&loginForm.password?'btn2':'btn'"   @click="getLogin">登录</button>
+		  </view>
+		  <!-- 微信登录 -->
+		  <block v-if="tabidx==1">
+			  <button  type="primary" class="rbtn mb24 mt50" open-type="getUserInfo" @getuserinfo="getuserinfo" >
+			  	<text class="btn-txt">快捷登录</text>
+			  </button>
+		  </block>
+		  
+		  
+		  <!-- 账号密码登录 -->
+			<view class="lread" @click="checkflag=!checkflag">
+				<view class="lreadl">
+					<image :src="checkimg" v-if="checkflag"></image>
+					<image :src="ncheckimg" v-else></image>
+				</view>
+				<view class="tit">登录即代表您已阅读并同意<text @click.stop="handlePrivacy">用户协议</text>及<text @click.stop="handlePrivacy">隐私政策</text></view>
+			</view>
+			 <!-- <view class="bbcode">版本号:ZXY_YY_1.3</view> -->
+	  </view>
+	 
+	    
+	  <!-- <view class="rtxt mt26" @click="getregister">还没账号?去申请注册</view> -->
+	  <phone-btn :type="typeflag" @getPhoneNumber='getPhoneNumber' @getClose="getClose"></phone-btn>
   </view>
 </template>
 
 <script>
-  import { getCodeImg } from '@/api/login'
-
+	import * as base64 from "base-64"
+	import {getweChatLogin,getInfo,getweChatOpenid,getCodeImg,getCode,sendSmsOnly} from "@/api/login.js"
+	import {getUserProfile} from "@/api/system/user.js"
+	import { getToken } from '@/utils/auth'
+	import phoneBtn from "@/components/toptab/phonebtn.vue"
   export default {
-    data() {
-      return {
-        codeUrl: "",
-        captchaEnabled: true,
-        // 用户注册开关
-        register: false,
-        globalConfig: getApp().globalData.config,
-        loginForm: {
-          username: "admin",
-          password: "admin123",
-          code: "",
-          uuid: ''
-        }
-      }
-    },
-    created() {
-      this.getCode()
+	  components:{
+		  phoneBtn
+	  },
+	data(){
+		return{
+			headimg:require('@/static/logo.png'),
+			ldicon:require('@/static/images/mine/ldicon.png'),
+			checkimg:require('@/static/images/mine/lcicon.png'),
+			ncheckimg:require('@/static/images/mine/lnicon.png'),
+			rimg:require('@/static/images/mine/rimg.png'),
+			pcicon:require('@/static/images/mine/pcicon.png'),
+			pnicon:require('@/static/images/mine/pnicon.png'),
+			checkflag:false,
+			typeflag: false,
+			loginflag:false,
+			captchaEnabled: false,
+			duancode:'',//短信验证码
+			checkeye:false,
+			tucode:'',
+			codeUrl:'',
+			time:'',
+			timefalg:'',
+			tabidx:2,
+			tablist:[{tit:'微信登录',val:1},{tit:'密码登录',val:2},],
+			loginForm: {
+				username: "",
+				code: "",
+				password:'',
+			},
+			voList:[],
+			voindex:0,
+			jzflag:false
+		}
+	},
+	
+	methods:{
+		getTab(idx){
+			this.tabidx=idx;
+		},
+
+		// 获取图形验证码
+		getCode() {
+		  getCodeImg().then(res => {
+		    this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
+		    if (this.captchaEnabled) {
+		      this.codeUrl = 'data:image/gif;base64,' + res.img
+		      this.loginForm.uuid = res.uuid
+		    }
+		  })
+		},
+		getForget(){
+			this.$tab.navigateTo(`/pages/mine/pwd/forgetpwd`)
+		},
+		getSchoolFn(){
+			this.$tab.navigateTo(`/mine/pages/mine/school?id=`+this.loginForm.school)
+		},
+		 getregister(){
+			 this.$tab.navigateTo(`/mine/pages/login/register`)
+			 // this.$tab.navigateTo(`/mine/pages/mine/applyregister`)
+			 // this.$tab.navigateTo(`/mine/pages/mine/auth`)
+		 },
+		 getLogin(){
+			 if(!this.loginForm.username||!this.loginForm.password||(!this.tucode&& this.captchaEnabled)){
+			 	 return
+			 }
+			// let regphone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
+			// if(!regphone.test(this.loginForm.username)){
+			// 	this.$toast('请输入正确的手机号')
+			// 	return
+			// }
+			 // if(!this.checkflag){
+			 // 	this.$toast("请同意用户协议")
+			 // 	return
+			 // }
+			 this.loginForm.code=this.tucode;
+			 this.pwdLogin()
+		 },
+		 // 密码登录
+		 async pwdLogin() {
+		 	var that=this;
+			
+		   this.$store.dispatch('Login', this.loginForm).then((res) => {
+			   // 判断是否记住密码
+			  if(that.jzflag){
+			  	var newObj={
+			  		username:that.loginForm.username,
+			  		password:base64.encode(that.loginForm.password),
+			  	}	
+			  	uni.setStorageSync('account', JSON.parse(JSON.stringify(newObj)))
+			  }else{
+			  	uni.removeStorageSync('account')
+			  } 
+		     this.$modal.closeLoading()
+		 		  this.$toast('登录成功')
+		 		  setTimeout(function(){
+		 			  that.loginSuccess()
+		 		  },1500)
+		     
+		   }).catch((error) => {
+		    setTimeout(function(){
+		 		if (that.captchaEnabled&&that.tabidx==2) {
+		 			that.getCode()
+				}
+		 	},1000)
+		   })
+		 },
+		 handlePrivacy(){
+			this.$tab.navigateTo(`/pages/agreement`)  
+		 },
+		 getClose() {
+		 	this.typeflag = false
+		 },
+		 btns() {
+		 	
+		 },
+		 getPhoneNumber(data){
+			 var that=this;
+			 var params=data
+			 params.tenantId=this.loginForm.tenantId
+			 that.$store.dispatch('Login', params).then(() => {
+			   that.$modal.closeLoading()
+			 	that.$toast('登录成功')
+				that.typeflag=false;
+			   that.loginSuccess(data)
+			 }).catch(() => {
+			   // if (this.captchaEnabled) {
+			   //   this.getCode()
+			   // }
+			 })
+		 },
+		 // 登录成功后,处理函数
+		 loginSuccess(result) {
+		   // 设置用户信息
+		   var that=this;
+		   this.$store.dispatch('GetInfo').then(res => {
+			   this.$tab.reLaunch('/pages/index/index') 
+			   // 判断有几个角色 进入选择页面
+			   // var roles=that.$store.state.user.roles;
+			   // var userroles=that.$store.state.user.userroles;
+			   // if(roles.length>0){
+				  //  // 默认选择学校 老师 家长
+				  //  var a,b,c,type;
+				  //  if(roles.includes('school')){
+						// type='school'
+				  //  }else if(roles.includes('teacher')){
+					 //   type='teacher'
+				  //  }else if(roles.includes('parents')){
+					 //   type='parents'
+				  //  }else{
+					 //  that.$tab.reLaunch('/pages/index/index')
+					 //   return
+				  //  }
+				  // Object.keys(userroles).some((key) => {
+				  // 	if (userroles[key].roleKey == ('' + type)) {
+				  // 		that.$store.dispatch('checkRole', userroles[key]).then(() => {
+				  // 		  that.$tab.reLaunch('/pages/index/index') 
+				  // 		}).catch(() => {
+				  		 
+				  // 		})
+				  // 		return true;
+				  // 	}
+				  // })
+			   // }else{
+				  // this.$tab.reLaunch('/pages/index/index') 
+			   // }
+		   })
+		 },
+		 
+		 async getuserinfo(e) {
+			 // if(!this.checkflag){
+				//  this.$toast("请同意用户协议")
+				//  return
+			 // }
+			 // 判断是不是有学校
+		 	const {iv,encryptedData} = e.detail
+		 	const {nickName, avatarUrl, ...userInfo} = e.detail.userInfo
+			// console.log(e.detail)
+		 	try{
+				uni.login({
+                    provider: 'weixin',
+                    success: (res) => {
+                        // 获取用户信息
+						if(res.code){
+							this.avatarUrl = avatarUrl
+							this.nickName = nickName
+							this.code = res.code
+							this.userInfo =e.detail.userInfo
+							uni.setStorageSync('userInfo', e.detail.userInfo)
+							uni.setStorageSync('lcheckflag',true)
+							this.typeflag=true;
+						}
+                    }
+                })
+		 	} catch(e){
+		 		//TODO handle the exception
+		 	}
+		 },
+	},
+	
+	onLoad: function() {
+		this.getCode()
+		if (getToken()) {
+			this.$tab.reLaunch('/pages/index/index') 
+			// 判断有什么角色
+		} else {
+			this.loginflag=true;
+			// this.getCode()
+			if(uni.getStorageSync('lcheckflag')){
+				this.checkflag=true
+			}else{
+				this.checkflag=false
+			}
+		  if(uni.getStorageSync('account')){
+		  	var newObj=JSON.parse(JSON.stringify(uni.getStorageSync('account')))
+		  	this.loginForm.username=newObj.username;
+		  	this.loginForm.password=base64.decode(newObj.password);
+		  	this.jzflag=true;
+		  }
+		  
+		}	
     },
-    methods: {
-      // 用户注册
-      handleUserRegister() {
-        this.$tab.redirectTo(`/pages/register`)
-      },
-      // 隐私协议
-      handlePrivacy() {
-        let site = this.globalConfig.appInfo.agreements[0]
-        this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
-      },
-      // 用户协议
-      handleUserAgrement() {
-        let site = this.globalConfig.appInfo.agreements[1]
-        this.$tab.navigateTo(`/pages/common/webview/index?title=${site.title}&url=${site.url}`)
-      },
-      // 获取图形验证码
-      getCode() {
-        getCodeImg().then(res => {
-          this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
-          if (this.captchaEnabled) {
-            this.codeUrl = 'data:image/gif;base64,' + res.img
-            this.loginForm.uuid = res.uuid
-          }
-        })
-      },
-      // 登录方法
-      async handleLogin() {
-        if (this.loginForm.username === "") {
-          this.$modal.msgError("请输入您的账号")
-        } else if (this.loginForm.password === "") {
-          this.$modal.msgError("请输入您的密码")
-        } else if (this.loginForm.code === "" && this.captchaEnabled) {
-          this.$modal.msgError("请输入验证码")
-        } else {
-          this.$modal.loading("登录中,请耐心等待...")
-          this.pwdLogin()
-        }
-      },
-      // 密码登录
-      async pwdLogin() {
-        this.$store.dispatch('Login', this.loginForm).then(() => {
-          this.$modal.closeLoading()
-          this.loginSuccess()
-        }).catch(() => {
-          if (this.captchaEnabled) {
-            this.getCode()
-          }
-        })
-      },
-      // 登录成功后,处理函数
-      loginSuccess(result) {
-        // 设置用户信息
-        this.$store.dispatch('GetInfo').then(res => {
-          this.$tab.reLaunch('/pages/index')
-        })
-      }
-    }
   }
 </script>
 
-<style lang="scss">
-  page {
-    background-color: #ffffff;
-  }
-
-  .normal-login-container {
-    width: 100%;
-
-    .logo-content {
-      width: 100%;
-      font-size: 21px;
-      text-align: center;
-      padding-top: 15%;
-
-      image {
-        border-radius: 4px;
+<style lang="scss" scoped>
+.headimg{width: 136rpx;height: 136rpx;margin:0 auto 36rpx;}
+.mzimg{width: 100rpx;height: 44rpx;margin: 0 auto ;}
+.rtxt{font-size: 32rpx;font-weight: 500;
+color: $com-cd3;text-align: center;}
+.bbcode{position: absolute;width: 100%;text-align: center;left: 0;bottom: -80rpx;font-size: 24rpx;color: #666666;}
+.lread{
+	display: flex;align-items: flex-start;justify-content: center;
+	.lreadl{padding-top: 4rpx;
+		image{width: 28rpx;height: 28rpx;margin-right: 14rpx;}
+	}
+	.tit{font-size: 26rpx;font-weight: 500;color: #666666;line-height: 40rpx;
+	text{color:$com-cd3;text-decoration: underline;padding: 0 6rpx;}
+}
+}
+.tab{
+	.tabtit{font-size: 32rpx;font-weight: 500;color: #666666;padding: 0 24rpx;position: relative;
+	&.act{color: $com-cd3;font-weight: bold;}
+		&::before{content: '';position: absolute;left: 0;top: 50%;margin-top: -10rpx;width: 2rpx;height: 20rpx;background: #DADADA;}
+		&:first-child::before{display: none;}
+	}
+	
+}
+.rbtn {
+		&.btn{background: #9a9c9e;color: #ffffff;}
+		&.btn2{background: $com-cd3;color: #ffffff;}
       }
-
-      .title {
-        margin-left: 10px;
-      }
-    }
-
-    .login-form-content {
-      text-align: center;
-      margin: 20px auto;
-      margin-top: 15%;
-      width: 80%;
-
+.login-form-content {
+      margin: 0 auto;
+      width: 100%;
+		
       .input-item {
-        margin: 20px auto;
-        background-color: #f5f6f7;
-        height: 45px;
-        border-radius: 20px;
-
+        // margin-bottom:48rpx;
+        border-bottom: 2rpx solid #CDCDCD;
+		padding: 40rpx 0 0rpx;
         .icon {
-          font-size: 38rpx;
+          font-size: 40rpx;
           margin-left: 10px;
           color: #999;
         }
-
+		.login_tit{
+			font-size: 34rpx;
+			font-weight: bold;
+			color: #343434;margin-bottom: 10rpx;
+		}
+		.login_box{display: flex;align-items: center;
+			.rimgs{width: 18rpx;height: 30rpx;flex: 0 0 auto;margin-left: 20rpx;}
+		}
         .input {
           width: 100%;
-          font-size: 14px;
-          line-height: 20px;
-          text-align: left;
-          padding-left: 15px;
+          font-size: 34rpx;
+		  height: 80rpx;
+		  line-height: 80rpx;
         }
 
       }
 
-      .login-btn {
-        margin-top: 40px;
-        height: 45px;
-      }
-      
-      .reg {
-        margin-top: 15px;
-      }
-      
-      .xieyi {
-        color: #333;
-        margin-top: 20px;
-      }
       
       .login-code {
         height: 38px;
@@ -197,6 +392,19 @@
         }
       }
     }
-  }
-
+// .image{width: 32rpx;height: 32rpx;margin-right: 14rpx;}
+.input_ye image{width: 34rpx;height: 18rpx;}
+.codess{font-size: 34rpx;color: $com-cd3;flex: 0 0 auto;min-width: 200rpx;text-align: center;border-left: 2rpx solid #CDCDCD;}
+.codes{background: none;font-size: 28rpx;flex: 0 0 auto;width: 180rpx;text-align: center;border-left: 2rpx solid #CDCDCD;}
+.login_box{display: flex;align-items: center;}
+.login_boxl{width:130rpx;font-size: 34rpx;color: #343434;border-right: 2rpx solid #CDCDCD;}
+.login_txt{text-align: right;flex: 0 0 auto; padding:0 24rpx;
+	text{font-size: 30rrpx;color:#666666;}
+}
+.line{width: 2rpx;height: 24rpx;background: #CDCDCD;margin: 0 10rpx;}
+.login_jz{display: flex;align-items: center;justify-content: flex-end;flex: 0 0 auto;
+	image{width: 30rpx;height: 30rpx;margin-right: 12rpx;}
+	view{color: #666666;font-size: 28rpx;}
+}
+// app
 </style>

+ 2 - 2
pages/mine/about/index.vue

@@ -1,9 +1,9 @@
 <template>
   <view class="about-container">
     <view class="header-section text-center">
-      <image style="width: 150rpx;height: 150rpx;" src="/static/logo200.png" mode="widthFix">
+      <image style="width: 150rpx;height: 150rpx;" src="/static/logo.png" mode="widthFix">
       </image>
-      <uni-title type="h2" title="若依移动端"></uni-title>
+      <uni-title type="h2" title="智能校管家"></uni-title>
     </view>
 
     <view class="content-section">

+ 8 - 3
pages/mine/avatar/index.vue

@@ -4,7 +4,7 @@
 			<view class='cropper-content'>
 				<view v-if="isShowImg" class="uni-corpper" :style="'width:'+cropperInitW+'px;height:'+cropperInitH+'px;background:#000'">
 					<view class="uni-corpper-content" :style="'width:'+cropperW+'px;height:'+cropperH+'px;left:'+cropperL+'px;top:'+cropperT+'px'">
-						<image :src="imageSrc" :style="'width:'+cropperW+'px;height:'+cropperH+'px'"></image>
+						<image  :src="imageSrc" :style="'width:'+cropperW+'px;height:'+cropperH+'px'"></image>
 						<view class="uni-corpper-crop-box" @touchstart.stop="contentStartMove" @touchmove.stop="contentMoveing" @touchend.stop="contentTouchEnd"
 						    :style="'left:'+cutL+'px;top:'+cutT+'px;right:'+cutR+'px;bottom:'+cutB+'px'">
 							<view class="uni-cropper-view-box">
@@ -68,7 +68,9 @@
 		 */
 		data() {
 			return {
-				imageSrc: store.getters.avatar,
+				imageurl: store.getters.avatar,
+				avatarimg:require("@/static/images/mine/profile.png"),
+				imageSrc:'',
 				isShowImg: false,
 				// 初始化的宽高
 				cropperInitW: SCREEN_WIDTH,
@@ -103,6 +105,9 @@
 		onReady: function () {
 			this.loadImage()
 		},
+		onLoad:function(){
+			this.imageSrc=this.imageurl?this.imageurl:this.avatarimg
+		},
 		methods: {
 			setData: function (obj) {
 				let that = this
@@ -123,7 +128,7 @@
 			},
 			loadImage: function () {
 				var _this = this
-
+				
 				uni.getImageInfo({
 					src: _this.imageSrc,
 					success: function success(res) {

+ 267 - 102
pages/mine/index.vue

@@ -1,134 +1,243 @@
 <template>
-  <view class="mine-container" :style="{height: `${windowHeight}px`}">
+  <view class="mine-container" >
     <!--顶部个人信息栏-->
-    <view class="header-section">
-      <view class="flex padding justify-between">
-        <view class="flex align-center">
-          <view v-if="!avatar" class="cu-avatar xl round bg-white">
-            <view class="iconfont icon-people text-gray icon"></view>
-          </view>
-          <image v-if="avatar" @click="handleToAvatar" :src="avatar" class="cu-avatar xl round" mode="widthFix">
-          </image>
-          <view v-if="!name" @click="handleToLogin" class="login-tip">
-            点击登录
-          </view>
-          <view v-if="name" @click="handleToInfo" class="user-info">
-            <view class="u_title">
-              用户名:{{ name }}
-            </view>
-          </view>
-        </view>
-        <view @click="handleToInfo" class="flex align-center">
-          <text>个人信息</text>
-          <view class="iconfont icon-right"></view>
-        </view>
-      </view>
-    </view>
-
-    <view class="content-section">
-      <view class="mine-actions grid col-4 text-center">
-        <view class="action-item" @click="handleJiaoLiuQun">
-          <view class="iconfont icon-friendfill text-pink icon"></view>
-          <text class="text">交流群</text>
-        </view>
-        <view class="action-item" @click="handleBuilding">
-          <view class="iconfont icon-service text-blue icon"></view>
-          <text class="text">在线客服</text>
-        </view>
-        <view class="action-item" @click="handleBuilding">
-          <view class="iconfont icon-community text-mauve icon"></view>
-          <text class="text">反馈社区</text>
-        </view>
-        <view class="action-item" @click="handleBuilding">
-          <view class="iconfont icon-dianzan text-green icon"></view>
-          <text class="text">点赞我们</text>
-        </view>
-      </view>
-
-      <view class="menu-list">
-        <view class="list-cell list-cell-arrow" @click="handleToEditInfo">
-          <view class="menu-item-box">
-            <view class="iconfont icon-user menu-icon"></view>
-            <view>编辑资料</view>
-          </view>
-        </view>
-        <view class="list-cell list-cell-arrow" @click="handleHelp">
-          <view class="menu-item-box">
-            <view class="iconfont icon-help menu-icon"></view>
-            <view>常见问题</view>
-          </view>
-        </view>
-        <view class="list-cell list-cell-arrow" @click="handleAbout">
-          <view class="menu-item-box">
-            <view class="iconfont icon-aixin menu-icon"></view>
-            <view>关于我们</view>
-          </view>
-        </view>
-        <view class="list-cell list-cell-arrow" @click="handleToSetting">
-          <view class="menu-item-box">
-            <view class="iconfont icon-setting menu-icon"></view>
-            <view>应用设置</view>
-          </view>
-        </view>
-      </view>
-
-    </view>
-  </view>
+		<view class="home_top">
+		  <uni-nav-bar title="我的" :background-color="backgroundColor" :border="navborder" statusBar='true' fixed="true">
+			  <!-- checkPermi(['system:notice:list']) -->
+			  <!-- <block slot="left" >
+			  		<view class="min_top" @click="getMessage">
+			  			<image :src="noticimg"></image>
+						<view class="circ"></view>
+			  		</view>
+			  </block> -->
+		  </uni-nav-bar> 
+	  </view>
+	  <image :src="abg" class="abg"></image>
+	 
+	<view style="margin-top: -487rpx;position: relative;padding:0 34rpx 20rpx;">
+		<view class="header_top flexc mb6" @click="handleToinfo">
+			<image v-if="avatar" @click.stop="handleToAvatar" :src="avatar" class="flex0 limg" mode="aspectFill"></image>
+			<image v-else @click.stop="handleToAvatar" :src="avatarimg" class="flex0 limg" mode="aspectFill"></image>
+			<view class="flex1 hcen">
+				<view class="f17 fw c16 mb8 flexc">{{name}}
+				<!-- <text v-if="choseroles=='teacher'">老师</text>
+				<text v-if="choseroles=='school'">学校管理员</text>
+				<text v-if="choseroles=='parents'">家长</text> -->
+				</view>
+				<!-- <view class="f15 co6" v-if="choseroles=='teacher'">{{schoolName}}/{{discipline}}</view>
+				<view class="f15 co6" v-else-if="choseroles!='parents'" >{{schoolName}}</view> -->
+			</view>
+			<image :src="rimg" class="flex0 rimg"></image>
+		</view>
+		<view class="mnbox">
+			<view class="mn_tit">账号设置</view>
+			<view class="mn_list">
+				<view class="mlist flexc"  @click="handleUpassword">
+					<view class="mlistl"><image :src="miconj" class="imgh"></image></view>
+					<view class="mlistc">修改密码</view>
+				</view>
+				<view class="mlist flexc"  @click="handlePrivacy">
+					<view class="mlistl"><image :src="miconf" class="imgd"></image></view>
+					<view class="mlistc">用户协议</view>
+				</view>
+				<view class="mlist flexc"  @click="onlineWgt">
+					<view class="mlistl"><image :src="micong" class="imgg"></image></view>
+					<view class="mlistc">版本更新</view>
+				</view>
+				<view class="mlist flexc"  @click="handleLogout">
+					<view class="mlistl"><image :src="miconl" class="imgc"></image></view>
+					<view class="mlistc">退出登录</view>
+				</view>
+			</view>
+		</view>
+	</view>
+	<footers v-if="isfootflag" :footlist="footlist" :footerindex="footerindex" :color_checked="color_checked" :color_nochecked="color_nochecked" :isHomeIndex="true"></footers>
+ </view>
 </template>
 
 <script>
+	import footers from '@/components/footer/footer.vue'
+  import config from '@/config'
+  const baseUrl = config.baseUrl
   import storage from '@/utils/storage'
+  import {findVersion} from "@/api/system/user.js"
+  import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+  import {getInfo } from '@/api/login'
   
   export default {
+	components:{footers},
     data() {
       return {
+		  footlist:[
+		  	{module:'home',title:'首页',icon_checked:require('@/static/images/tabbar/home_.png'),icon_nochecked:require('@/static/images/tabbar/home.png')},
+		  	{module:'mine',title:'我的',icon_checked:require('@/static/images/tabbar/mine_.png'),icon_nochecked:require('@/static/images/tabbar/mine.png')},
+		  	],
+		  footerindex:'mine',
+		  isfootflag:true,
+		  color_checked :'161616',
+		  color_nochecked :'666666',
+		  abg:require('@/static/images/mine/habg.png'),
+		  noticimg:require('@/static/images/mine/mnotic.png'),
+		  rimg:require('@/static/images/mine/rimg.png'),
+		  wrimg:require('@/static/images/mine/wrimg.png'),	 
+		  miconf:require('@/static/images/mine/miconf.png'),
+		  miconj:require('@/static/images/mine/miconj.png'),
+		  miconl:require('@/static/images/mine/miconl.png'),
+		  micong:require('@/static/images/mine/micong.png'),
+		
+		type:0,
+		confdat:{tit:'系统提示',txt:"确定注销并退出系统吗?",closetxt:'取消',suretxt:'确认'},
+		  backgroundColor:"transparent",
+		  navborder:false,
+		  timetit:'',
+		  timelist:[],
+		  timetype:'',
+		  discipline:'',
+		  schoolName:'',
+		  schoolId:'',
+		  classId:'',
+		  
+		  teacherClass:[],
+		  roles:'',
+		  baseUrl:'',
         name: this.$store.state.user.name,
-        version: getApp().globalData.config.appInfo.version
+		avatarimg:require("@/static/images/mine/profile.png"),
+		platform:'Android',  
+        // version: getApp().globalData.config.appInfo.version
       }
     },
     computed: {
       avatar() {
         return this.$store.state.user.avatar
       },
+	  choseroles() {
+	    return this.$store.state.user.choseroles
+	  },
       windowHeight() {
         return uni.getSystemInfoSync().windowHeight - 50
       }
     },
+	onShow() {
+	},
+	onLoad() {
+		this.baseUrl=baseUrl;
+	},
+	onPageScroll(e) {
+		var scrollTop=Number(e.scrollTop);
+		if(scrollTop>0){
+			this.backgroundColor='#c4defb'
+		}else{
+			this.backgroundColor='transparent'
+		}
+	},
     methods: {
-      handleToInfo() {
+		checkPermi, checkRole,
+		onlineWgt() {
+			let that = this;
+			plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) {
+				that.$store.dispatch('SetwgtFn',widgetInfo.version).then(()=>{
+				})
+				that.comparisonVersionNo(widgetInfo.versionCode);
+			});
+			// that.comparisonVersionNo()
+		},
+		comparisonVersionNo(versionCode) {
+			
+			let that = this;
+			// console.log("aaaaaaa===versionCode", versionCode);
+			const parmas = {
+				model: that.platform
+			}
+			console.log(parmas)
+			findVersion(parmas).then(res => {
+				console.log(res,2)
+				if (res.code == "200") {
+					let versionNos = res.data.code;
+					console.log(versionNos,'versionNos')
+					// console.log(res.data.path);
+					let filePath = res.data.path;
+					if (versionNos != versionCode) { //服务器返回1更新,0则不更新
+						uni.showModal({
+							title: '提示',
+							content: '发现新版本,是否升级',
+							success: function(res) {
+								// console.log(widgetInfo.version);
+								if (res.confirm) {
+									console.log('用户点击确定');
+									that.getProperty(filePath);
+								} else if (res.cancel) {
+									console.log('用户点击取消');
+								}
+							}
+						});
+					}else{
+						this.$toast('该版本已是最新版')
+					}
+				}
+			}).catch(error=>{
+				uni.hideLoading()
+				console.log(error)
+			})
+		},
+		getProperty(getProperty) {
+			// console.log("bbbbbbbbb----------->", getProperty)
+			let that = this;
+			// 在线升级app/热更新
+			that.showwri = true;
+			const downloadTask = uni.downloadFile({ //下载文件
+				url: baseUrl + getProperty,
+				success: (downloadResult) => {
+					// console.log(downloadResult);
+					if (downloadResult.statusCode == 200) {
+						// 更新升级
+						plus.runtime.install(downloadResult.tempFilePath, {
+							force: true
+						}, function() {
+							// console.log('install success...');
+							that.showwri = false;
+							plus.nativeUI.alert("应用资源更新完成!", function() {
+								plus.runtime.restart();
+							});
+						}, function(e) {
+							that.showwri = false;
+							plus.nativeUI.alert("更新失败,请稍后再试");
+						});
+					}
+				}
+			});
+			downloadTask.onProgressUpdate((res) => { //下载文件的进度
+				that.totalBytesWritten = res.totalBytesWritten; //当前下载大小
+				that.progress = res.progress; //当前下载比例
+				that.totalBytesExpectedToWrite = res.totalBytesExpectedToWrite; //
+			});
+		},
+		getConfirm(){
+			this.$store.dispatch('LogOut').then(() => {
+			  this.$tab.reLaunch('/pages/index/index')
+			})
+		},
+		handlePrivacy(){
+			this.$tab.navigateTo(`/pages/agreement`)  
+		},
+		handleUpassword(){
+			this.$tab.navigateTo(`/pages/mine/pwd/index`)  
+		},
+	
+		
+		handleToAvatar() {
+		  this.$tab.navigateTo('/pages/mine/avatar/index')
+		},
+      handleToinfo() {
         this.$tab.navigateTo('/pages/mine/info/index')
       },
-      handleToEditInfo() {
-        this.$tab.navigateTo('/pages/mine/info/edit')
-      },
-      handleToSetting() {
-        this.$tab.navigateTo('/pages/mine/setting/index')
-      },
-      handleToLogin() {
-        this.$tab.reLaunch('/pages/login')
-      },
-      handleToAvatar() {
-        this.$tab.navigateTo('/pages/mine/avatar/index')
-      },
+      
       handleLogout() {
         this.$modal.confirm('确定注销并退出系统吗?').then(() => {
           this.$store.dispatch('LogOut').then(() => {
-            this.$tab.reLaunch('/pages/index')
+            this.$tab.reLaunch('/pages/index/index')
           })
         })
       },
-      handleHelp() {
-        this.$tab.navigateTo('/pages/mine/help/index')
-      },
-      handleAbout() {
-        this.$tab.navigateTo('/pages/mine/about/index')
-      },
-      handleJiaoLiuQun() {
-        this.$modal.showToast('QQ群:①133713780、②146013835')
-      },
-      handleBuilding() {
-        this.$modal.showToast('模块建设中~')
-      }
     }
   }
 </script>
@@ -137,6 +246,63 @@
   page {
     background-color: #f5f6f7;
   }
+  .home_top /deep/ .uni-navbar__placeholder{height: 0 !important;}
+.abg{width: 100%;height: 622rpx;}
+.min_top{position: relative;width: 40rpx;height: 40rpx;display: flex;align-items: center;justify-content: center;
+	image{width: 32rpx;height: 32rpx;}
+	.circ{width: 12rpx;height: 12rpx;background: #EB5663;border-radius: 50%;position: absolute;right: 4rpx;top: 4rpx;}
+}
+.header_top{padding: 34rpx 26rpx;
+	.limg{width: 120rpx;height: 120rpx;border-radius: 50%;margin-right: 26rpx;}
+	.rimg{width: 14rpx;height: 24rpx;margin-left: 26rpx;}
+	.hcen{
+		text{height: 34rpx;background: #89A8F6;border-radius: 16rpx;line-height: 34rpx;font-weight: normal;font-size: 24rpx;color: #ffffff;display: inline-block;min-width: 78rpx;padding: 0 10rpx;box-sizing: border-box;margin-left: 24rpx;}
+	}
+}
+.bgf{
+	.mlist{padding:30rpx 34rpx;
+		.mlistl{width: 40rpx;height: 40rpx;display: flex;align-items: center;justify-content: center;margin-right: 16rpx;
+			.imga{width: 38rpx;height: 38rpx;}
+			.imgb{width: 32rpx;height: 32rpx;}
+			.imgc{width: 30rpx;height: 30rpx;}
+			.imgd{width: 32rpx;height: 34rpx;}
+			.imge{width: 32rpx;height: 26rpx;}
+			.imgf{width: 32rpx;height: 30rpx;}
+			.imgg{width: 34rpx;height: 34rpx;}
+			.imgi{width: 34rpx;height: 34rpx;}
+			.imgk{width: 32rpx;height: 30rpx;}
+		}
+		.mlistc{flex: 1;font-size: 32rpx;font-weight: 500;
+	color: #161616;}
+		.mlistr{width: 14rpx;height: 24rpx;marign-left:16rpx}
+	}
+}
+
+.mnbox{
+	background: #FFFFFF;border-radius: 18rpx;margin-bottom: 24rpx;padding: 40rpx 0 16rpx;
+	.mn_tit{font-size: 32rpx;font-weight: bold;
+color: #161616;padding-left: 68rpx;position: relative;margin-bottom: 12rpx;
+		&::before{width: 6rpx;background: $com-cd3;border-radius: 4rpx;position: absolute;left: 36rpx;top: 4rpx;content: '';bottom: 4rpx;}
+	}
+	.mn_list{display: flex;flex-wrap: wrap;
+		.mlist{width: 25%;box-sizing: border-box;display: flex;flex-direction: column;align-items: center;padding: 26rpx 0;
+			.mlistl{width: 50rpx;height: 50rpx;display: flex;align-items: center;justify-content: center;margin-bottom: 16rpx;
+				.imga{width: 42rpx;height: 44rpx;}
+				.imgb{width: 44rpx;height: 44rpx;}
+				.imgc{width: 44rpx;height: 42rpx;}
+				.imgd{width: 42rpx;height: 44rpx;}
+				.imge{width: 44rpx;height: 42rpx;}
+				.imgf{width: 32rpx;height: 30rpx;}
+				.imgg{width: 44rpx;height: 44rpx;}
+				.imgh{width: 40rpx;height: 44rpx;}
+				.imgk{width: 40rpx;height: 42rpx;}
+			}
+			.mlistc{flex: 1;font-size: 30rpx;font-weight: 500;color: #666666;}
+		}
+	}
+	
+}
+
 
   .mine-container {
     width: 100%;
@@ -145,7 +311,6 @@
 
     .header-section {
       padding: 15px 15px 45px 15px;
-      background-color: #3c96f3;
       color: white;
 
       .login-tip {

+ 121 - 0
pages/mine/pwd/forgetpwd.vue

@@ -0,0 +1,121 @@
+<template>
+  <view class="pwd-retrieve-container pwd">
+    <uni-forms ref="form" :value="user" >
+      <uni-forms-item name="phonenumber" label="手机号码">
+        <uni-easyinput :inputBorder="false" type="number"  v-model="phonenumber" placeholder="请输入您的手机号码" />
+      </uni-forms-item>
+      <uni-forms-item name="code" label="验证码">
+        <uni-easyinput :inputBorder="false" v-model="code" placeholder="请输入验证码" />
+		<view class="line flex0"></view>
+		<view v-if="timefalg" class="code act">{{time}}秒</view>
+		<view v-else @click="getCode" class="code">发送验证码</view>
+	  </uni-forms-item>
+      <view class="rbtn" @click="submit">下一步</view>
+    </uni-forms>
+  </view>
+</template>
+
+<script>
+  import { getappForgetPW } from "@/api/system/user"
+
+  export default {
+    data() {
+      return {
+		timefalg:false,
+		time:'',
+		phonenumber:'',
+		code:'',
+		newcode:'',//验证码
+		user:{},
+      }
+    },
+    onReady() {
+    },
+    methods: {
+		getCode(){
+			var that=this;
+			if (!this.phonenumber ) {
+				that.$toast("请输入手机号")
+				return
+			}
+			let regphone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
+			if (this.phonenumber && !regphone.test(this.phonenumber)) {
+				that.$toast("请输入正确的手机号")
+				return
+			}
+			getappForgetPW(this.phonenumber).then(res=>{
+				if (res.code == 200) {
+					// 发送验证码
+					that.$toast("发送成功")
+					that.newcode=res.msg
+					that.time=60;
+					that.timefalg=true;
+					that.setTimein()
+				} else {
+					that.$toast(res.msg)
+				}
+				// 判断是不是对等的
+				// that.getCodesend(that.phonenumber)
+			})
+		},
+		// 验证码倒计时
+		setTimein(){
+			var that=this;
+			clearInterval(that.timer)
+			that.timer=setInterval(()=>{
+				if(that.time<=1){
+					that.timefalg=false;
+					that.time=60;
+					clearInterval(that.timer)
+				}
+				that.time=that.time-1;
+			},1000)
+		},
+      submit() {
+		var that = this;
+		if (!this.phonenumber ) {
+			that.$toast("请输入手机号")
+			return
+		}
+		if (!this.code ) {
+			that.$toast("请输入验证码")
+			return
+		}
+		if(this.code!=this.newcode){
+			that.$toast("验证码错误,请重新输入")
+			return
+		}
+		let regphone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/
+		if (this.phonenumber && !regphone.test(this.phonenumber)) {
+			that.$toast("请输入正确的手机号")
+			return
+		}
+		this.$tab.navigateTo(`/pages/mine/pwd/resetpwd?phone=`+this.phonenumber+'&code='+this.code)
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+  page {
+    background-color: #f5f5f5;
+  }
+  .line{width: 2rpx;height: 24rpx;background: #CDCDCD;margin: 0 24rpx;}
+	.code{font-size: 30rpx;color: $com-cd3;
+		&.act{color: #666666;}
+	}
+  .pwd-retrieve-container {
+    padding: 10rpx 36rpx;
+  }
+  .pwd .rbtn{width: 100%;height: 98rpx;background: $com-cd3;border-radius: 49rpx;text-align: center;line-height: 98rpx;font-size: 32rpx;font-weight: bold;color: #FFFEFE;margin-top: 68rpx;}
+  .pwd /deep/ .uni-forms-item{height: 126rpx;background: #FFFFFF;border-radius: 18rpx;margin-top: 30rpx;padding: 0 40rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;}
+  .pwd /deep/ .uni-forms-item__label{font-size: 32rpx;font-weight: 500;
+color: #161616;flex: 0 0 auto;width: auto !important;}
+  .pwd /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 32rpx;color: #161616;}
+  .pwd /deep/ .uni-forms-item__content{display: flex;align-items: center;flex-direction: row;}
+  .pwd /deep/ .uni-easyinput__placeholder-class{font-size: 30rpx;}
+  .pwd /deep/ .uni-easyinput__content-input{font-size: 30rpx;}
+   .pwd /deep/ .uni-forms-item__error{margin-top:20rpx;left: auto;right: 0;}
+  
+
+</style>

+ 24 - 10
pages/mine/pwd/index.vue

@@ -1,16 +1,16 @@
 <template>
-  <view class="pwd-retrieve-container">
-    <uni-forms ref="form" :value="user" labelWidth="80px">
+  <view class="pwd-retrieve-container pwd">
+    <uni-forms ref="form" :value="user" >
       <uni-forms-item name="oldPassword" label="旧密码">
-        <uni-easyinput type="password" v-model="user.oldPassword" placeholder="请输入旧密码" />
+        <uni-easyinput :inputBorder="false" type="password" v-model="user.oldPassword" placeholder="请输入旧密码" />
       </uni-forms-item>
       <uni-forms-item name="newPassword" label="新密码">
-        <uni-easyinput type="password" v-model="user.newPassword" placeholder="请输入新密码" />
+        <uni-easyinput :inputBorder="false" type="password" v-model="user.newPassword" placeholder="请输入新密码" />
       </uni-forms-item>
       <uni-forms-item name="confirmPassword" label="确认密码">
-        <uni-easyinput type="password" v-model="user.confirmPassword" placeholder="请确认新密码" />
+        <uni-easyinput :inputBorder="false" type="password" v-model="user.confirmPassword" placeholder="请确认新密码" />
       </uni-forms-item>
-      <button type="primary" @click="submit">提交</button>
+      <view class="rbtn" @click="submit">提交</view>
     </uni-forms>
   </view>
 </template>
@@ -63,9 +63,13 @@
     },
     methods: {
       submit() {
+		var that = this;
         this.$refs.form.validate().then(res => {
           updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
-            this.$modal.msgSuccess("修改成功")
+            that.$toast("修改成功")
+            setTimeout(function(){
+            	that.$tab.reLaunch('/pages/mine/index')
+            },1500)
           })
         })
       }
@@ -75,11 +79,21 @@
 
 <style lang="scss">
   page {
-    background-color: #ffffff;
+    background-color: #f5f5f5;
   }
 
   .pwd-retrieve-container {
-    padding-top: 36rpx;
-    padding: 15px;
+    padding: 10rpx 36rpx;
   }
+  .pwd .rbtn{width: 100%;height: 98rpx;background: $com-cd3;border-radius: 49rpx;text-align: center;line-height: 98rpx;font-size: 32rpx;font-weight: bold;color: #FFFEFE;margin-top: 68rpx;}
+  .pwd /deep/ .uni-forms-item{height: 126rpx;background: #FFFFFF;border-radius: 18rpx;margin-top: 30rpx;padding: 0 40rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;}
+  .pwd /deep/ .uni-forms-item__label{font-size: 32rpx;font-weight: 500;
+color: #161616;flex: 0 0 auto;width: auto !important;}
+  .pwd /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 32rpx;color: #161616;}
+  .pwd /deep/ .uni-forms-item__content{display: flex;align-items: center;flex-direction: row;}
+  .pwd /deep/ .uni-easyinput__placeholder-class{font-size: 30rpx;}
+  .pwd /deep/ .uni-easyinput__content-input{font-size: 30rpx;}
+   .pwd /deep/ .uni-forms-item__error{margin-top:20rpx;left: auto;right: 0;z-index: 1;}
+  
+
 </style>

+ 100 - 0
pages/mine/pwd/resetpwd.vue

@@ -0,0 +1,100 @@
+<template>
+  <view class="pwd-retrieve-container pwd">
+    <uni-forms ref="form" :value="user" >
+      <uni-forms-item name="newPassword" label="新密码">
+        <uni-easyinput :inputBorder="false" type="password" v-model="user.newPassword" placeholder="请输入新密码" />
+      </uni-forms-item>
+      <uni-forms-item name="confirmPassword" label="确认密码">
+        <uni-easyinput :inputBorder="false" type="password" v-model="user.confirmPassword" placeholder="请确认新密码" />
+      </uni-forms-item>
+      <view class="rbtn" @click="submit">提交</view>
+    </uni-forms>
+  </view>
+</template>
+
+<script>
+  import { getappCheck } from "@/api/system/user"
+
+  export default {
+    data() {
+      return {
+		  phone:'',
+		  code:'',
+        user: {
+          newPassword: undefined,
+          confirmPassword: undefined
+        },
+        rules: {
+          newPassword: {
+            rules: [{
+                required: true,
+                errorMessage: '新密码不能为空',
+              },
+              {
+                minLength: 6,
+                maxLength: 20,
+                errorMessage: '长度在 6 到 20 个字符'
+              }
+            ]
+          },
+          confirmPassword: {
+            rules: [{
+                required: true,
+                errorMessage: '确认密码不能为空'
+              }, {
+                validateFunction: (rule, value, data) => data.newPassword === value,
+                errorMessage: '两次输入的密码不一致'
+              }
+            ]
+          }
+        }
+      }
+    },
+    onReady() {
+      this.$refs.form.setRules(this.rules)
+    },
+	onLoad(e) {
+		this.phone=e.phone;
+		this.code=e.code;
+	},
+    methods: {
+      submit() {
+		var that = this;
+        this.$refs.form.validate().then(res => {
+			var params={
+				phone:this.phone,
+				code:this.code,
+				password:this.user.newPassword
+			}
+          getappCheck(params).then(response => {
+            that.$toast("重置成功")
+            setTimeout(function(){
+            	that.$tab.reLaunch('/pages/login') 
+            },1500)
+          })
+        })
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+  page {
+    background-color: #f5f5f5;
+  }
+
+  .pwd-retrieve-container {
+    padding: 10rpx 36rpx;
+  }
+  .pwd .rbtn{width: 100%;height: 98rpx;background: $com-cd3;border-radius: 49rpx;text-align: center;line-height: 98rpx;font-size: 32rpx;font-weight: bold;color: #FFFEFE;margin-top: 68rpx;}
+  .pwd /deep/ .uni-forms-item{height: 126rpx;background: #FFFFFF;border-radius: 18rpx;margin-top: 30rpx;padding: 0 40rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;}
+  .pwd /deep/ .uni-forms-item__label{font-size: 32rpx;font-weight: 500;
+color: #161616;flex: 0 0 auto;width: auto !important;}
+  .pwd /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 32rpx;color: #161616;}
+  .pwd /deep/ .uni-forms-item__content{display: flex;align-items: center;flex-direction: row;}
+  .pwd /deep/ .uni-easyinput__placeholder-class{font-size: 30rpx;}
+  .pwd /deep/ .uni-easyinput__content-input{font-size: 30rpx;}
+   .pwd /deep/ .uni-forms-item__error{margin-top:20rpx;left: auto;right: 0;}
+  
+
+</style>

+ 1 - 1
pages/mine/setting/index.vue

@@ -50,7 +50,7 @@
       handleLogout() {
         this.$modal.confirm('确定注销并退出系统吗?').then(() => {
           this.$store.dispatch('LogOut').then(() => {
-            this.$tab.reLaunch('/pages/index')
+            this.$tab.reLaunch('/pages/index/index')
           })
         })
       }

+ 1 - 1
pages/register.vue

@@ -111,7 +111,7 @@
       registerSuccess(result) {
         // 设置用户信息
         this.$store.dispatch('GetInfo').then(res => {
-          this.$tab.reLaunch('/pages/index')
+          this.$tab.reLaunch('/pages/index/index')
         })
       }
     }

+ 31 - 177
pages/work/index.vue

@@ -1,183 +1,37 @@
 <template>
-  <view class="work-container">
-    <!-- 轮播图 -->
-    <uni-swiper-dot class="uni-swiper-dot-box" :info="data" :current="current" field="content">
-      <swiper class="swiper-box" :current="swiperDotIndex" @change="changeSwiper">
-        <swiper-item v-for="(item, index) in data" :key="index">
-          <view class="swiper-item" @click="clickBannerItem(item)">
-            <image :src="item.image" mode="aspectFill" :draggable="false" />
-          </view>
-        </swiper-item>
-      </swiper>
-    </uni-swiper-dot>
-
-    <!-- 宫格组件 -->
-    <uni-section title="系统管理" type="line"></uni-section>
-    <view class="grid-body">
-      <uni-grid :column="4" :showBorder="false" @change="changeGrid">
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="person-filled" size="30"></uni-icons>
-            <text class="text">用户管理</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="staff-filled" size="30"></uni-icons>
-            <text class="text">角色管理</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="color" size="30"></uni-icons>
-            <text class="text">菜单管理</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="settings-filled" size="30"></uni-icons>
-            <text class="text">部门管理</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="heart-filled" size="30"></uni-icons>
-            <text class="text">岗位管理</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="bars" size="30"></uni-icons>
-            <text class="text">字典管理</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="gear-filled" size="30"></uni-icons>
-            <text class="text">参数设置</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="chat-filled" size="30"></uni-icons>
-            <text class="text">通知公告</text>
-          </view>
-        </uni-grid-item>
-        <uni-grid-item>
-          <view class="grid-item-box">
-            <uni-icons type="wallet-filled" size="30"></uni-icons>
-            <text class="text">日志管理</text>
-          </view>
-        </uni-grid-item>
-      </uni-grid>
-    </view>
-  </view>
+	<view class="zan">
+		<!-- <view @click="geta">保安</view>
+		<view @click="getb">被访者</view> -->
+		<view @click="getc">来访者</view>
+	</view>
 </template>
 
 <script>
-  export default {
-    data() {
-      return {
-        current: 0,
-        swiperDotIndex: 0,
-        data: [{
-            image: '/static/images/banner/banner01.jpg'
-          },
-          {
-            image: '/static/images/banner/banner02.jpg'
-          },
-          {
-            image: '/static/images/banner/banner03.jpg'
-          }
-        ]
-      }
-    },
-    methods: {
-      clickBannerItem(item) {
-        console.info(item)
-      },
-      changeSwiper(e) {
-        this.current = e.detail.current
-      },
-      changeGrid(e) {
-        this.$modal.showToast('模块建设中~')
-      }
-    }
-  }
+	export default{
+		data(){
+			return{
+				
+			}
+		},
+		methods:{
+			geta(){
+				this.$tab.navigateTo('/pages/order/staff')
+			},
+			getb(){
+				this.$tab.navigateTo('/pages/order/notice')
+			},
+			getc(){
+				this.$tab.navigateTo('/pages/order/come')
+			},
+		}
+	}
 </script>
 
-<style lang="scss">
-  /* #ifndef APP-NVUE */
-  page {
-    display: flex;
-    flex-direction: column;
-    box-sizing: border-box;
-    background-color: #fff;
-    min-height: 100%;
-    height: auto;
-  }
-
-  view {
-    font-size: 14px;
-    line-height: inherit;
-  }
-
-  /* #endif */
-
-  .text {
-    text-align: center;
-    font-size: 26rpx;
-    margin-top: 10rpx;
-  }
-
-  .grid-item-box {
-    flex: 1;
-    /* #ifndef APP-NVUE */
-    display: flex;
-    /* #endif */
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-    padding: 15px 0;
-  }
-
-  .uni-margin-wrap {
-    width: 690rpx;
-    width: 100%;
-    ;
-  }
-
-  .swiper {
-    height: 300rpx;
-  }
-
-  .swiper-box {
-    height: 150px;
-  }
-
-  .swiper-item {
-    /* #ifndef APP-NVUE */
-    display: flex;
-    /* #endif */
-    flex-direction: column;
-    justify-content: center;
-    align-items: center;
-    color: #fff;
-    height: 300rpx;
-    line-height: 300rpx;
-  }
-
-  @media screen and (min-width: 500px) {
-    .uni-swiper-dot-box {
-      width: 400px;
-      /* #ifndef APP-NVUE */
-      margin: 0 auto;
-      /* #endif */
-      margin-top: 8px;
-    }
-
-    .image {
-      width: 100%;
-    }
-  }
-</style>
+<style lang="scss" scoped>
+.zan{
+	display: flex;align-items: center;
+	view{
+		font-size: 32rpx;padding: 0 20rpx;flex: 1;
+	}
+}
+</style>

+ 2 - 2
permission.js

@@ -4,8 +4,8 @@ import { getToken } from '@/utils/auth'
 const loginPage = "/pages/login"
   
 // 页面白名单
-const whiteList = [
-  '/pages/login', '/pages/register', '/pages/common/webview/index'
+const whiteList = ['/pages/mine/pwd/resetpwd','/pages/mine/pwd/forgetpwd','/pages/order/notice','/pages/order/search','/a/code',
+  '/pages/login', '/pages/register', '/pages/common/webview/index','/pages/agreement','/pages/order/come','/pages/order/comedetail',
 ]
 
 // 检查地址白名单

+ 31 - 0
plugins/amap-wx.130.js

@@ -0,0 +1,31 @@
+function AMapWX(a){this.key=a.key;this.requestConfig={key:a.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};this.MeRequestConfig={key:a.key,serviceName:"https://restapi.amap.com/rest/me"}}
+AMapWX.prototype.getWxLocation=function(a,b){wx.getLocation({type:"gcj02",success:function(c){c=c.longitude+","+c.latitude;wx.setStorage({key:"userLocation",data:c});b(c)},fail:function(c){wx.getStorage({key:"userLocation",success:function(d){d.data&&b(d.data)}});a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getMEKeywordsSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.city&&(d.city=b.city);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&(d.pageSize=b.pageSize);b.sig&&(d.sig=
+b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/local",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEIdSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.id&&(d.id=b.id);b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/id",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&
+0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEPolygonSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.polygon&&(d.polygon=b.polygon);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&(d.pageSize=b.pageSize);
+b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/polygon",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getMEaroundSearch=function(a){if(!a.options)return a.fail({errCode:"0",errMsg:"\u7f3a\u5c11\u5fc5\u8981\u53c2\u6570"});var b=a.options,c=this.MeRequestConfig,d={key:c.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"};b.layerId&&(d.layerId=b.layerId);b.keywords&&(d.keywords=b.keywords);b.center&&(d.center=b.center);b.radius&&(d.radius=b.radius);b.filter&&(d.filter=b.filter);b.sortrule&&(d.sortrule=b.sortrule);b.pageNum&&(d.pageNum=b.pageNum);b.pageSize&&
+(d.pageSize=b.pageSize);b.sig&&(d.sig=b.sig);wx.request({url:c.serviceName+"/cpoint/datasearch/around",data:d,method:"GET",header:{"content-type":"application/json"},success:function(e){(e=e.data)&&e.status&&"1"===e.status&&0===e.code?a.success(e.data):a.fail({errCode:"0",errMsg:e})},fail:function(e){a.fail({errCode:"0",errMsg:e.errMsg||""})}})};
+AMapWX.prototype.getGeo=function(a){var b=this.requestConfig,c=a.options;b={key:this.key,extensions:"all",s:b.s,platform:b.platform,appname:this.key,sdkversion:b.sdkversion,logversion:b.logversion};c.address&&(b.address=c.address);c.city&&(b.city=c.city);c.batch&&(b.batch=c.batch);c.sig&&(b.sig=c.sig);wx.request({url:"https://restapi.amap.com/v3/geocode/geo",data:b,method:"GET",header:{"content-type":"application/json"},success:function(d){(d=d.data)&&d.status&&"1"===d.status?a.success(d):a.fail({errCode:"0",
+errMsg:d})},fail:function(d){a.fail({errCode:"0",errMsg:d.errMsg||""})}})};
+AMapWX.prototype.getRegeo=function(a){function b(d){var e=c.requestConfig;wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:c.key,location:d,extensions:"all",s:e.s,platform:e.platform,appname:c.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(g){if(g.data.status&&"1"==g.data.status){g=g.data.regeocode;var h=g.addressComponent,f=[],k=g.roads[0].name+"\u9644\u8fd1",m=d.split(",")[0],n=d.split(",")[1];if(g.pois&&
+g.pois[0]){k=g.pois[0].name+"\u9644\u8fd1";var l=g.pois[0].location;l&&(m=parseFloat(l.split(",")[0]),n=parseFloat(l.split(",")[1]))}h.provice&&f.push(h.provice);h.city&&f.push(h.city);h.district&&f.push(h.district);h.streetNumber&&h.streetNumber.street&&h.streetNumber.number?(f.push(h.streetNumber.street),f.push(h.streetNumber.number)):f.push(g.roads[0].name);f=f.join("");a.success([{iconPath:a.iconPath,width:a.iconWidth,height:a.iconHeight,name:f,desc:k,longitude:m,latitude:n,id:0,regeocodeData:g}])}else a.fail({errCode:g.data.infocode,
+errMsg:g.data.info})},fail:function(g){a.fail({errCode:"0",errMsg:g.errMsg||""})}})}var c=this;a.location?b(a.location):c.getWxLocation(a,function(d){b(d)})};
+AMapWX.prototype.getWeather=function(a){function b(g){var h="base";a.type&&"forecast"==a.type&&(h="all");wx.request({url:"https://restapi.amap.com/v3/weather/weatherInfo",data:{key:d.key,city:g,extensions:h,s:e.s,platform:e.platform,appname:d.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(f){if(f.data.status&&"1"==f.data.status)if(f.data.lives){if((f=f.data.lives)&&0<f.length){f=f[0];var k={city:{text:"\u57ce\u5e02",data:f.city},
+weather:{text:"\u5929\u6c14",data:f.weather},temperature:{text:"\u6e29\u5ea6",data:f.temperature},winddirection:{text:"\u98ce\u5411",data:f.winddirection+"\u98ce"},windpower:{text:"\u98ce\u529b",data:f.windpower+"\u7ea7"},humidity:{text:"\u6e7f\u5ea6",data:f.humidity+"%"}};k.liveData=f;a.success(k)}}else f.data.forecasts&&f.data.forecasts[0]&&a.success({forecast:f.data.forecasts[0]});else a.fail({errCode:f.data.infocode,errMsg:f.data.info})},fail:function(f){a.fail({errCode:"0",errMsg:f.errMsg||""})}})}
+function c(g){wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:d.key,location:g,extensions:"all",s:e.s,platform:e.platform,appname:d.key,sdkversion:e.sdkversion,logversion:e.logversion},method:"GET",header:{"content-type":"application/json"},success:function(h){if(h.data.status&&"1"==h.data.status){h=h.data.regeocode;if(h.addressComponent)var f=h.addressComponent.adcode;else h.aois&&0<h.aois.length&&(f=h.aois[0].adcode);b(f)}else a.fail({errCode:h.data.infocode,errMsg:h.data.info})},
+fail:function(h){a.fail({errCode:"0",errMsg:h.errMsg||""})}})}var d=this,e=d.requestConfig;a.city?b(a.city):d.getWxLocation(a,function(g){c(g)})};
+AMapWX.prototype.getPoiAround=function(a){function b(e){e={key:c.key,location:e,s:d.s,platform:d.platform,appname:c.key,sdkversion:d.sdkversion,logversion:d.logversion};a.querytypes&&(e.types=a.querytypes);a.querykeywords&&(e.keywords=a.querykeywords);wx.request({url:"https://restapi.amap.com/v3/place/around",data:e,method:"GET",header:{"content-type":"application/json"},success:function(g){if(g.data.status&&"1"==g.data.status){if((g=g.data)&&g.pois){for(var h=[],f=0;f<g.pois.length;f++){var k=0==
+f?a.iconPathSelected:a.iconPath;h.push({latitude:parseFloat(g.pois[f].location.split(",")[1]),longitude:parseFloat(g.pois[f].location.split(",")[0]),iconPath:k,width:22,height:32,id:f,name:g.pois[f].name,address:g.pois[f].address})}a.success({markers:h,poisData:g.pois})}}else a.fail({errCode:g.data.infocode,errMsg:g.data.info})},fail:function(g){a.fail({errCode:"0",errMsg:g.errMsg||""})}})}var c=this,d=c.requestConfig;a.location?b(a.location):c.getWxLocation(a,function(e){b(e)})};
+AMapWX.prototype.getStaticmap=function(a){function b(e){c.push("location="+e);a.zoom&&c.push("zoom="+a.zoom);a.size&&c.push("size="+a.size);a.scale&&c.push("scale="+a.scale);a.markers&&c.push("markers="+a.markers);a.labels&&c.push("labels="+a.labels);a.paths&&c.push("paths="+a.paths);a.traffic&&c.push("traffic="+a.traffic);e="https://restapi.amap.com/v3/staticmap?"+c.join("&");a.success({url:e})}var c=[];c.push("key="+this.key);var d=this.requestConfig;c.push("s="+d.s);c.push("platform="+d.platform);
+c.push("appname="+d.appname);c.push("sdkversion="+d.sdkversion);c.push("logversion="+d.logversion);a.location?b(a.location):this.getWxLocation(a,function(e){b(e)})};
+AMapWX.prototype.getInputtips=function(a){var b=Object.assign({},this.requestConfig);a.location&&(b.location=a.location);a.keywords&&(b.keywords=a.keywords);a.type&&(b.type=a.type);a.city&&(b.city=a.city);a.citylimit&&(b.citylimit=a.citylimit);wx.request({url:"https://restapi.amap.com/v3/assistant/inputtips",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.tips&&a.success({tips:c.data.tips})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||
+""})}})};
+AMapWX.prototype.getDrivingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);a.strategy&&(b.strategy=a.strategy);a.waypoints&&(b.waypoints=a.waypoints);a.avoidpolygons&&(b.avoidpolygons=a.avoidpolygons);a.avoidroad&&(b.avoidroad=a.avoidroad);wx.request({url:"https://restapi.amap.com/v3/direction/driving",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths,
+taxi_cost:c.data.route.taxi_cost||""})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getWalkingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);wx.request({url:"https://restapi.amap.com/v3/direction/walking",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getTransitRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);a.strategy&&(b.strategy=a.strategy);a.city&&(b.city=a.city);a.cityd&&(b.cityd=a.cityd);wx.request({url:"https://restapi.amap.com/v3/direction/transit/integrated",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&(c=c.data.route,a.success({distance:c.distance||"",taxi_cost:c.taxi_cost||
+"",transits:c.transits}))},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};
+AMapWX.prototype.getRidingRoute=function(a){var b=Object.assign({},this.requestConfig);a.origin&&(b.origin=a.origin);a.destination&&(b.destination=a.destination);wx.request({url:"https://restapi.amap.com/v3/direction/riding",data:b,method:"GET",header:{"content-type":"application/json"},success:function(c){c&&c.data&&c.data.route&&a.success({paths:c.data.route.paths})},fail:function(c){a.fail({errCode:"0",errMsg:c.errMsg||""})}})};module.exports.AMapWX=AMapWX;

二進制
static/images/banner/banner01.jpg


二進制
static/images/banner/banner02.jpg


二進制
static/images/banner/banner03.jpg


二進制
static/images/mine/habg.png


二進制
static/images/mine/lcicon.png


二進制
static/images/mine/ldicon.png


二進制
static/images/mine/lnicon.png


二進制
static/images/mine/miconc.png


二進制
static/images/mine/miconf.png


二進制
static/images/mine/micong.png


二進制
static/images/mine/miconj.png


二進制
static/images/mine/miconl.png


二進制
static/images/mine/mnotic.png


二進制
static/images/mine/pcicon.png


二進制
static/images/mine/pnicon.png


二進制
static/images/mine/profile.png


二進制
static/images/mine/rimg.png


二進制
static/images/mine/success.png


二進制
static/images/mine/wrimg.png


二進制
static/images/navbg.png


二進制
static/images/noiconp.png


二進制
static/images/order/come/fillf.png


二進制
static/images/order/come/fillin.png


二進制
static/images/order/come/filln.png


二進制
static/images/order/come/line.png


二進制
static/images/order/come/up.png


二進制
static/images/order/come/ytbg.png


二進制
static/images/order/staff/head.png


二進制
static/images/order/staff/listline.png


二進制
static/images/tabbar/home.png


二進制
static/images/tabbar/home_.png


二進制
static/images/tabbar/mine.png


二進制
static/images/tabbar/mine_.png


二進制
static/images/tabbar/road.png


二進制
static/images/tabbar/road_.png


二進制
static/images/tabbar/trends.png


二進制
static/images/tabbar/trends_.png


二進制
static/images/tabbar/work.png


二進制
static/images/tabbar/work_.png


二進制
static/images/weather/weaion.png


二進制
static/images/weather/weaiona.png


二進制
static/images/weather/weaionb.png


二進制
static/images/weather/weaionc.png


二進制
static/images/weather/weaiond.png


二進制
static/images/weather/weaione.png


二進制
static/images/weather/weaionf.png


二進制
static/images/weather/weaiong.png


二進制
static/images/weather/weaionh.png


二進制
static/images/weather/weaioni.png


二進制
static/images/weather/weaionj.png


+ 1 - 1
static/index.html

@@ -14,7 +14,7 @@
 	</head>
 	<body>
 		<noscript>
-			<strong>本站点必须要开启JavaScript才能运行.</strong>
+			<strong>Please enable JavaScript to continue.</strong>
 		</noscript>
 		<div id="app"></div>
 </html>

二進制
static/logo.png


+ 153 - 0
static/style.css

@@ -0,0 +1,153 @@
+.flex{display: flex;}
+.flexc{display: flex;align-items: center;}
+.flex1{flex: 1;}
+.flex0{flex: 0 0 auto;}
+.flex01{flex: 0 1 auto;}
+.flexjc{justify-content: center;}
+.flexcj{display: flex;align-items: center;justify-content: space-between;}
+.flexcja{display: flex;align-items: center !important;justify-content: space-between;}
+.flextj{display: flex;align-items: flex-start;justify-content: space-between;}
+.flexcc{display: flex;align-items: center;justify-content: center;}
+.flext{display: flex;align-items: flex-start;}
+.flexdc{display: flex;flex-direction: column;}
+.flexcdc{display: flex;align-items: center;flex-direction: column;}
+.flexccc{display: flex;align-items: center;flex-direction: column;justify-content: center;}
+
+.clearf::after {
+  content: "";
+  display: block;
+  clear: both;
+}
+.flexjs{justify-content: space-between;}
+.wordb{word-break: break-all;}
+.fsi{font-style: italic;}
+.w50{width: 50%;}
+
+.txr{text-align: right;}
+.txc{text-align: center;}
+.txl{text-align: left;}
+.pfixed{position: fixed;z-index: 5;left: 0;top: 0;right: 0;background: #ffffff;}
+.pfixedb{position: fixed;z-index: 5;left: 0;bottom: 0;right: 0;background: #FFFFFF;
+box-shadow: 0px 0px 16rpx 0px rgba(87,87,87,0.41);}
+.pr{position: relative;}
+image{display: block;}
+.bgf{background-color: #ffffff;border-radius: 14rpx;}
+.overa{overflow: auto;}
+.over{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
+.overtwo{word-break: break-all;text-overflow: ellipsis;overflow: hidden;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;white-space: normal;}
+.bgbox{background-color: rgba(0, 0, 0, 0.5);position: fixed;left: 0;right: 0;top: 0;bottom: 0;z-index: 2;}
+.regbox{width: 100%;min-height: 100vh;background-color: #ffffff;box-sizing: border-box;}
+.regbox .rbtn{width: 100%;height: 98rpx;background: #D32C26;border-radius: 49rpx;text-align: center;line-height: 98rpx;font-size: 32rpx;font-weight: bold;color: #FFFEFE;}
+.regbox .rimg{flex: 0 0 auto;margin-left: 12rpx;display: flex;align-items: center;justify-content: center;width: 40rpx;height: 40rpx;}
+.regbox .rimg image{width: 18rpx;height: 30rpx;}
+.regbox .apllytxt{font-size: 30rpx;font-weight: 500;color: #DF0024;margin-top: 26rpx;color: #AAAAAA;text-align: center;}
+.regbox .apllytxt	text{color: #DF0024;padding-right: 16rpx;font-size: 30rpx;}
+
+.pregbox{padding: 160rpx 56rpx 96rpx;}
+.shax {font-size: 30rpx;color: #666;text-align: center;padding: 20rpx 0;}
+
+.rebtn{height: 98rpx;background: #D32C26;border-radius: 48rpx;font-size: 34rpx;font-weight: 500;
+color: #FFFFFF;flex: 1;display: flex;align-items: center;justify-content: center;}
+.rebtn.btn1{background-color:#C6C6C6;}
+.rebtndel{height: 98rpx;border-radius: 48rpx;font-size: 34rpx;font-weight: 500;
+color: #DF0024;flex: 1;display: flex;align-items: center;justify-content: center;border: 2rpx solid #DF0024;box-sizing: border-box;}
+
+.fbtns{display: flex;align-items: center;position: fixed;left: 0;right: 0;bottom: 0;background-color: #f1f1f1;padding: 36rpx;z-index: 2;}
+
+.delboxs{font-size: 30rpx;color: #FE5A0E;padding:0 20rpx;}
+.zhaddbtn{width:100%;height: 100rpx;background: #D32C26;position: fixed;left: 0;right: 0;bottom: 0;z-index: 1;font-size: 34rpx;font-weight: 500;
+color: #FFFFFF;display: flex;align-items: center;justify-content: center;}
+
+.w13{width: 26rpx;}
+
+.cof{color: #ffffff;}
+.cod{color: #dddddd;}
+.coa{color: #AAAAAA;}
+.co47{color: #D32C26;}
+.co16{color: #161616;}
+.co6{color: #666666;}
+.co33{color: #336AD5;}
+.coed{color: #ED7B4C;}
+.co5c{color: #5CC37D;}
+.coeb{color: #EB5663;}
+.co8e{color: #8E8E8E;}
+.c37{color: #374C82;}
+.cfe{color: #FE6A7F;}
+.c6b{color: #6B7390;}
+.cff2{color: #FF2D4F;}
+
+
+.f13{font-size: 26rpx;}
+.f14{font-size: 28rpx;}
+.f15{font-size: 30rpx;}
+.f16{font-size: 32rpx;}
+.f17{font-size: 34rpx;}
+.f18{font-size: 36rpx;}
+.f19{font-size: 38rpx;}
+.f25{font-size: 50rpx;}
+.f30{font-size: 60rpx;}
+.ml2{margin-left: 4rpx;}
+.ml6{margin-left: 12rpx;}
+.ml10{margin-left: 20rpx;}
+.mr10{margin-right: 20rpx;}
+.mt12{margin-top: 24rpx;}
+.mt15{margin-top: 30rpx;}
+.mt20{margin-top: 40rpx;}
+.mt26{margin-top: 52rpx;}
+.mt30{margin-top: 60rpx;}
+.mt40{margin-top: 80rpx;}
+.mt50{margin-top: 100rpx;}
+.mb4{margin-bottom: 8rpx;}
+.mb5{margin-bottom: 10rpx;}
+.mb6{margin-bottom: 12rpx;}
+.mb8{margin-bottom: 16rpx;}
+.mb10{margin-bottom: 20rpx;}
+.mb12{margin-bottom: 24rpx;}
+.mb15{margin-bottom: 30rpx;}
+.mb16{margin-bottom: 32rpx;}
+.mb18{margin-bottom: 36rpx;}
+.mb20{margin-bottom: 40rpx;}
+.mb24{margin-bottom: 48rpx;}
+.mb28{margin-bottom: 56rpx !important;}
+.mb30{margin-bottom: 60rpx;}
+.mlr12{margin: 0 24rpx;}
+
+.lh18{line-height: 36rpx;}
+.lh20{line-height: 40rpx;}
+.lh24{line-height: 48rpx;}
+
+
+.pl8{padding-left: 16rpx;}
+.pl16{padding-left: 32rpx;}
+.pr8{padding-right: 16rpx;}
+.pt5{padding-top: 10rpx;}
+.pt12{padding-top: 24rpx;}
+.pt20{padding-top: 40rpx;}
+.pt80{padding-top: 160rpx;}
+.pb15{padding-bottom: 30rpx;}
+.pb18{padding-bottom: 36rpx;}
+.plr12{padding: 0 24rpx;}
+.plr13{padding: 0 26rpx;}
+.plr18{padding: 0 36rpx;}
+.plr28{padding: 0 56rpx;}
+.ptb4{padding: 8rpx 0;}
+.ptb6{padding: 12rpx 0;}
+.ptb10{padding: 20rpx 0;}
+.fw{font-weight: bold;}
+.fw5{font-weight: 500;}
+.fwn{font-weight: normal;}
+
+
+/* 新写的 */
+.f12{font-size: 24rpx;}
+.cof1{color: #F1F1F1;}
+.w50{width: 50% !important;}
+.lh18{line-height: 36rpx;}
+.pt8{padding-top: 16rpx;}
+.plr15{padding:0 30rpx;}
+.mt16{margin-top: 32rpx;}
+
+
+.yybox{width: 100%;height: 100vh;box-sizing: border-box;display: flex;flex-direction: column;background-color: #F5F5F5;}
+.yydet{flex: 1;overflow: auto;z-index: 2;position: relative;display: flex;flex-direction: column;}
+/* 新写的end */

+ 2 - 1
store/getters.js

@@ -3,6 +3,7 @@ const getters = {
   avatar: state => state.user.avatar,
   name: state => state.user.name,
   roles: state => state.user.roles,
-  permissions: state => state.user.permissions
+  permissions: state => state.user.permissions,
+  wgtcode:state => state.user.wgtcode
 }
 export default getters

+ 11 - 2
store/modules/user.js

@@ -12,7 +12,8 @@ const user = {
     name: storage.get(constant.name),
     avatar: storage.get(constant.avatar),
     roles: storage.get(constant.roles),
-    permissions: storage.get(constant.permissions)
+    permissions: storage.get(constant.permissions),
+	wgtcode:storage.get(constant.wgtcode)
   },
 
   mutations: {
@@ -34,10 +35,18 @@ const user = {
     SET_PERMISSIONS: (state, permissions) => {
       state.permissions = permissions
       storage.set(constant.permissions, permissions)
-    }
+    },
+	SET_WGTCODE: (state, wgtcode) => {
+	  state.wgtcode = wgtcode
+	  storage.set(constant.wgtcode, wgtcode)
+	},
   },
 
   actions: {
+	// 版本号
+	SetwgtFn({ commit}, code ){
+		commit('SET_WGTCODE',code)
+	},
     // 登录
     Login({ commit }, userInfo) {
       const username = userInfo.username.trim()

+ 2 - 1
uni.scss

@@ -1,7 +1,8 @@
 /**
  * uni-app内置的常用样式变量
  */
-
+//公共的颜色
+$com-cd3: #0391FD;
 /* 行为相关颜色 */
 $uni-color-primary: #007aff;
 $uni-color-success: #4cd964;

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

@@ -1,5 +1,3 @@
-## 1.2.2(2023-01-28)
-- 修复 运行/打包 控制台警告问题
 ## 1.2.1(2022-09-05)
 - 修复 当 text 超过 max-num 时,badge 的宽度计算是根据 text 的长度计算,更改为 css 计算实际展示宽度,详见:[https://ask.dcloud.net.cn/question/150473](https://ask.dcloud.net.cn/question/150473)
 ## 1.2.0(2021-11-19)

+ 3 - 3
uni_modules/uni-badge/components/uni-badge/uni-badge.vue

@@ -21,7 +21,7 @@
 	 * 	@value error 红色
 	 * @property {String} inverted = [true|false] 是否无需背景颜色
 	 * @property {Number} maxNum 展示封顶的数字值,超过 99 显示 99+
-	 * @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 开启绝对定位, 角标将定位到其包裹的标签的四角上
+	 * @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 开启绝对定位, 角标将定位到其包裹的标签的四角上		
 	 * 	@value rightTop 右上
 	 * 	@value rightBottom 右下
 	 * 	@value leftTop 左上
@@ -192,12 +192,11 @@
 		display: flex;
 		overflow: hidden;
 		box-sizing: border-box;
-		font-feature-settings: "tnum";
-		min-width: 20px;
 		/* #endif */
 		justify-content: center;
 		flex-direction: row;
 		height: 20px;
+		min-width: 20px;
 		padding: 0 4px;
 		line-height: 18px;
 		color: #fff;
@@ -207,6 +206,7 @@
 		border: 1px solid #fff;
 		text-align: center;
 		font-family: 'Helvetica Neue', Helvetica, sans-serif;
+		font-feature-settings: "tnum";
 		font-size: $bage-size;
 		/* #ifdef H5 */
 		z-index: 999;

部分文件因文件數量過多而無法顯示