liyongli hace 2 años
commit
d3762ec290
Se han modificado 100 ficheros con 9068 adiciones y 0 borrados
  1. 16 0
      .hbuilderx/launch.json
  2. 5 0
      .idea/.gitignore
  3. 12 0
      .idea/broke_news_wx.iml
  4. 8 0
      .idea/modules.xml
  5. 6 0
      .idea/vcs.xml
  6. 39 0
      App.vue
  7. 1 0
      QeUKti8FcM.txt
  8. BIN
      __MACOSX/components/._.DS_Store
  9. BIN
      __MACOSX/components/saber-textShrink/._.DS_Store
  10. BIN
      __MACOSX/components/saber-textShrink/._textShrink.vue
  11. BIN
      components/.DS_Store
  12. 157 0
      components/localSearch/localSearch.vue
  13. 277 0
      components/my-news-list/my-news-list.vue
  14. 307 0
      components/news-list/news-list.vue
  15. BIN
      components/saber-textShrink/.DS_Store
  16. 113 0
      components/saber-textShrink/textShrink.vue
  17. 258 0
      components/sound-recording/sound-recording.vue
  18. 109 0
      components/tabs-view/tabs-view.vue
  19. 213 0
      components/u-circle-progress/u-circle-progress.vue
  20. 19 0
      index.html
  21. 0 0
      js_sdk/jsencrypt-Rsa/jsencrypt/jsencrypt.min.js
  22. 88 0
      js_sdk/jsencrypt-Rsa/jsencrypt/jsencrypt.vue
  23. 12 0
      main.js
  24. 121 0
      manifest.json
  25. 54 0
      network/api.js
  26. 67 0
      network/http.js
  27. 78 0
      pages.json
  28. 213 0
      pages/Login/Login.vue
  29. 162 0
      pages/choosePlatform/choosePlatform.vue
  30. 35 0
      pages/managePage/managePage.vue
  31. 93 0
      pages/myNews/myNews.vue
  32. 269 0
      pages/newsDetail/newsDetail.vue
  33. 290 0
      pages/newsSquare/newsSquare.vue
  34. 81 0
      pages/privacyPolicy/privacyPolicy.vue
  35. 592 0
      pages/publishNews/publishNews.vue
  36. 62 0
      pages/test/test.vue
  37. 3 0
      pages/userAgreement/userAgreement.vue
  38. 0 0
      static/css/reset.css
  39. BIN
      static/image/addFile.png
  40. BIN
      static/image/addNews.png
  41. BIN
      static/image/checked.png
  42. BIN
      static/image/del.png
  43. BIN
      static/image/delete.png
  44. BIN
      static/image/logo.png
  45. BIN
      static/image/logos.png
  46. BIN
      static/image/moment.png
  47. BIN
      static/image/music.png
  48. BIN
      static/image/playBtn.png
  49. BIN
      static/image/video.png
  50. BIN
      static/jsfun-record/confirm.png
  51. BIN
      static/jsfun-record/play.png
  52. BIN
      static/jsfun-record/recording.png
  53. BIN
      static/jsfun-record/stop.png
  54. BIN
      static/sound-recording/pause.png
  55. BIN
      static/sound-recording/play.png
  56. BIN
      static/sound-recording/voice.png
  57. 18 0
      store/index.js
  58. 22 0
      store/modules/user.js
  59. 76 0
      uni.scss
  60. 29 0
      uni_modules/uni-badge/changelog.md
  61. 268 0
      uni_modules/uni-badge/components/uni-badge/uni-badge.vue
  62. 88 0
      uni_modules/uni-badge/package.json
  63. 10 0
      uni_modules/uni-badge/readme.md
  64. 16 0
      uni_modules/uni-calendar/changelog.md
  65. 546 0
      uni_modules/uni-calendar/components/uni-calendar/calendar.js
  66. 12 0
      uni_modules/uni-calendar/components/uni-calendar/i18n/en.json
  67. 8 0
      uni_modules/uni-calendar/components/uni-calendar/i18n/index.js
  68. 12 0
      uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hans.json
  69. 12 0
      uni_modules/uni-calendar/components/uni-calendar/i18n/zh-Hant.json
  70. 181 0
      uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue
  71. 554 0
      uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue
  72. 354 0
      uni_modules/uni-calendar/components/uni-calendar/util.js
  73. 88 0
      uni_modules/uni-calendar/package.json
  74. 103 0
      uni_modules/uni-calendar/readme.md
  75. 26 0
      uni_modules/uni-card/changelog.md
  76. 270 0
      uni_modules/uni-card/components/uni-card/uni-card.vue
  77. 90 0
      uni_modules/uni-card/package.json
  78. 12 0
      uni_modules/uni-card/readme.md
  79. 36 0
      uni_modules/uni-collapse/changelog.md
  80. 402 0
      uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue
  81. 147 0
      uni_modules/uni-collapse/components/uni-collapse/uni-collapse.vue
  82. 89 0
      uni_modules/uni-collapse/package.json
  83. 12 0
      uni_modules/uni-collapse/readme.md
  84. 15 0
      uni_modules/uni-combox/changelog.md
  85. 275 0
      uni_modules/uni-combox/components/uni-combox/uni-combox.vue
  86. 90 0
      uni_modules/uni-combox/package.json
  87. 11 0
      uni_modules/uni-combox/readme.md
  88. 24 0
      uni_modules/uni-countdown/changelog.md
  89. 6 0
      uni_modules/uni-countdown/components/uni-countdown/i18n/en.json
  90. 8 0
      uni_modules/uni-countdown/components/uni-countdown/i18n/index.js
  91. 6 0
      uni_modules/uni-countdown/components/uni-countdown/i18n/zh-Hans.json
  92. 6 0
      uni_modules/uni-countdown/components/uni-countdown/i18n/zh-Hant.json
  93. 271 0
      uni_modules/uni-countdown/components/uni-countdown/uni-countdown.vue
  94. 86 0
      uni_modules/uni-countdown/package.json
  95. 10 0
      uni_modules/uni-countdown/readme.md
  96. 41 0
      uni_modules/uni-data-checkbox/changelog.md
  97. 817 0
      uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue
  98. 87 0
      uni_modules/uni-data-checkbox/package.json
  99. 18 0
      uni_modules/uni-data-checkbox/readme.md
  100. 56 0
      uni_modules/uni-data-picker/changelog.md

+ 16 - 0
.hbuilderx/launch.json

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

+ 5 - 0
.idea/.gitignore

@@ -0,0 +1,5 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/

+ 12 - 0
.idea/broke_news_wx.iml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/temp" />
+      <excludeFolder url="file://$MODULE_DIR$/.tmp" />
+      <excludeFolder url="file://$MODULE_DIR$/tmp" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/broke_news_wx.iml" filepath="$PROJECT_DIR$/.idea/broke_news_wx.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 39 - 0
App.vue

@@ -0,0 +1,39 @@
+<script>
+	export default {
+		methods: {
+			copmareVersion(version) {
+				let versionArr = version.split('.')
+				if(versionArr[0] < 8) {
+					return false
+				}
+				if(versionArr[2] < 16) {
+					return false
+				}
+				return true
+			}
+		},
+		onLaunch: function() {
+			let res = uni.getSystemInfoSync()
+			console.log('手机信息',res);
+			if(!this.copmareVersion(res.version)) {
+				uni.showToast({
+					title: '请更新到最新的微信版本,否则可能导致无法登录!',
+					icon: 'none',
+					duration: 5000
+				})
+			}
+			uni.hideShareMenu()
+		},
+		onShow: function() {
+			console.log('App Show')
+		},
+		onHide: function() {
+			console.log('App Hide')
+		}
+	}
+</script>
+
+<style>
+	/*每个页面公共css */
+	@import url("static/css/reset.css");
+</style>

+ 1 - 0
QeUKti8FcM.txt

@@ -0,0 +1 @@
+f2fa0c83ebd8815c74a6402742c4000f

BIN
__MACOSX/components/._.DS_Store


BIN
__MACOSX/components/saber-textShrink/._.DS_Store


BIN
__MACOSX/components/saber-textShrink/._textShrink.vue


BIN
components/.DS_Store


+ 157 - 0
components/localSearch/localSearch.vue

@@ -0,0 +1,157 @@
+<template>
+	<view class="localSearchBox" >
+		<view class="header">
+			<!-- <text @click="back()">取消</text> -->
+			<!-- <text>选择位置</text> -->
+			<text></text>
+		</view>
+		<view class="searchBox">
+			<uni-easyinput prefixIcon="search" @confirm="searchAddress" placeholder="请输入地址" ></uni-easyinput>
+		</view>
+		<view class="listBox">
+			<view class="listItem" v-for="(item, index) in list" :key="item.uid" @click="addressClick(index)">
+				<view class="shortAddress">
+					<view class="shortTitle">{{ item.name }}</view>
+					<image
+						src="../../static/image/checked.png"
+						v-if="defaultIndex === index"
+						class="checkedImg"
+					></image>
+				</view>
+				<view class="realAddress">{{ item.address }}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import bmap from '../../utils/bmap-wx.js'
+import { config } from '../../utils/config.js'
+export default {
+	name: 'localSearch',
+	data() {
+		return {
+			defaultIndex: -1,
+			list: [],
+			BMap: null,
+			latlngStr: ''
+		};
+	},
+	methods: {
+		initIndex() {
+			this.defaultIndex = 0
+		},
+		// back() {
+		// 	this.$emit('closeSelectAddress', {});
+		// },
+		submitAddress() {
+			let address = this.list[this.defaultIndex].address
+			this.$emit('changeAddress', address);
+		},
+		addressClick(index) {
+			this.defaultIndex = index;
+			this.submitAddress()
+		},
+		getLocation() {
+			uni.getLocation({
+				type: 'gcj02', //返回可以用于uni.openLocation的经纬度
+				success: res => {
+					console.log(res,'res')
+					this.latlngStr = `${res.latitude},${res.longitude}`
+					this.getLocationInfo()
+				}
+			});
+		},
+		searchAddress(e) {
+			this.getLocationInfo(e)
+		},
+		getLocationInfo(addressKey = '') {
+			if(addressKey == "") {
+				this.BMap.search({
+					"query": addressKey,
+					location: this.latlngStr,
+					page_size: 20,
+					page_index: 1,
+					success: res => {
+						console.log(res);
+						this.list = res.originalData.results
+					},
+					fail: err => {
+						console.log(err);
+					}
+				})
+			}else {
+				this.BMap.suggestion({
+					"query": addressKey,
+					success: res => {
+						console.log(res);
+						this.list = res.result || []
+					},
+					fail: err => {
+						console.log(err);
+					}
+				})
+			}
+		}
+	},
+	created() {
+		this.BMap = new bmap.BMapWX({ 
+				ak: config.BMapKey
+		});
+		this.getLocation()
+	}
+};
+</script>
+
+<style lang="scss">
+.localSearchBox {
+	box-sizing: border-box;
+	padding: 0 32rpx;
+	width: 100%;
+	height: 100%;
+	.header {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		height: 50px;
+	}
+	.searchBox{
+		height: 36px;
+	}
+	.listBox {
+		width: 100%;
+		height: calc(100% - 80px);
+		overflow-x: hidden;
+		overflow-y: scroll;
+		box-sizing: border-box;
+		padding-bottom: 10px;
+		.listItem {
+			margin-top: 25px;
+			.shortAddress {
+				color: #151b26;
+				display: flex;
+				font-size: 16px;
+				font-weight: 400;
+				line-height: 24px;
+				.shortTitle {
+					flex: 1;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+				}
+				.checkedImg {
+					height: 24px;
+					width: 24px;
+				}
+			}
+			.realAddress {
+				color: #5c5f66;
+				font-size: 14px;
+				font-weight: 400;
+				line-height: 20px;
+				margin-top: 12px;
+			}
+		}
+	}
+}
+</style>

+ 277 - 0
components/my-news-list/my-news-list.vue

@@ -0,0 +1,277 @@
+<!-- 在这个文件对每个tab对应的列表进行渲染 -->
+<template>
+	<view class="content">
+		<!-- 这里设置了z-paging加载时禁止自动调用reload方法,自行控制何时reload(懒加载)-->
+		<z-paging
+			ref="paging"
+			v-model="dataList"
+			@query="queryList"
+			use-page-scroll
+			:hide-empty-view="hideEmptyView"
+			:refresher-enabled="false"
+			@contentHeightChanged="contentHeightChanged"
+			:loading-full-fixed="true"
+			:auto="false"
+			:auto-clean-list-when-reload="false"
+		>
+			<!-- 如果希望其他view跟着页面滚动,可以放在z-paging标签内 -->
+			<view class="item" v-for="(item, index) in dataList" :key="index" @click="toDetail(item.id)">
+				<view class="itemTitle">
+					{{ formatTitle(item.title) }}
+					<text v-if="item.title.length > 90" class="allContent">全文</text>
+				</view>
+				<view class="resources" v-if="item.clueInfoList.length <= 1">
+					<view
+						class="resourcesItem resourcesItemOne"
+						v-for="items in item.clueInfoList"
+						:key="items.id"
+					>
+						<image v-if="items.type == '1'" class="logo" :src="items.localUrl"></image>
+						<image v-if="items.type == '2'" class="logo" src="../../static/image/video.png"></image>
+						<image v-if="items.type == '3'" class="logo" src="../../static/image/music.png"></image>
+						<image
+							v-if="items.type == 2 || items.type == 3"
+							src="../../static/image/playBtn.png"
+							class="playBtn"
+						></image>
+					</view>
+				</view>
+				<view class="resources" v-else>
+					<view
+						class="resourcesItem resourcesItems"
+						v-for="items in item.clueInfoList"
+						:key="items.id"
+					>
+						<image v-if="items.type == '1'" class="logo" :src="items.localUrl"></image>
+						<image v-if="items.type == '2'" class="logo" src="../../static/image/video.png"></image>
+						<image v-if="items.type == '3'" class="logo" src="../../static/image/music.png"></image>
+						<image
+							v-if="items.type == 2 || items.type == 3"
+							src="../../static/image/playBtn.png"
+							class="playBtn"
+						></image>
+					</view>
+					<view
+						class="resourcesItem resourcesItems"
+						v-if="item.clueInfoList.length % 3 == 2"
+					></view>
+				</view>
+				<view class="bottomBox">
+					<view class="timeBox">{{ item.modifyTime }}</view>
+				</view>
+				<view class="seat"></view>
+			</view>
+		</z-paging>
+	</view>
+</template>
+
+<script>
+import { findPage } from '../../network/api.js';
+export default {
+	data() {
+		return {
+			//v-model绑定的这个变量不要在分页请求结束中自己赋值!!!
+			dataList: [],
+			height: 0,
+			hideEmptyView: true,
+			completeFunc: null
+		};
+	},
+	props: {
+		//当前组件的index,也就是当前组件是swiper中的第几个
+		tabIndex: {
+			type: Number,
+			default: function() {
+				return 0;
+			}
+		},
+		//当前swiper切换到第几个index
+		currentIndex: {
+			type: Number,
+			default: function() {
+				return 0;
+			}
+		},
+		phone: {
+			type: String,
+			default: function() {
+				return '';
+			}
+		}
+	},
+	watch: {
+		currentIndex: {
+			handler(newVal) {
+				if (newVal === this.tabIndex) {
+					//懒加载,当滑动到当前的item时,才去加载
+					setTimeout(() => {
+						this.$refs.paging.reload();
+					}, 100);
+				}
+			},
+			immediate: true
+		}
+	},
+	methods: {
+		toDetail(id) {
+			uni.navigateTo({
+				url: `../../pages/newsDetail/newsDetail?id=${id}`
+			});
+		},
+		formatTitle(title) {
+			return title.length > 105 ? title.substring(0, 104) + '...' : title;
+		},
+		queryList(pageNo, pageSize) {
+			//组件加载时会自动触发此方法,因此默认页面加载时会自动触发,无需手动调用
+			//这里的pageNo和pageSize会自动计算好,直接传给服务器即可
+			//模拟请求服务器获取分页数据,请替换成自己的网络请求
+			let statusType = [1, 0];
+			const params = {
+				pageNumber: pageNo,
+				pageSize: pageSize,
+				ascription: 1,
+				status: statusType[this.tabIndex],
+				phone: this.phone
+			};
+			findPage(params).then(
+				res => {
+					if (res.data.state == 200) {
+						let data = res.data.data.pageRecords.map(item => {
+							item.clueInfoList = item.clueInfoList.filter(i => {
+								return i.type !== 0;
+							});
+							return item;
+						});
+						console.log(data);
+						this.$refs.paging.complete(data);
+					} else {
+						this.$refs.paging.complete([]);
+					}
+					this.hideEmptyView = false;
+					//请求结束,调用父组件的下拉刷新结束回调函数,使得父组件中的z-paging下拉刷新结束
+					if (this.completeFunc) {
+						this.completeFunc();
+					}
+				},
+				error => {
+					this.$refs.paging.complete(false);
+					if (this.completeFunc) {
+						this.completeFunc();
+					}
+				}
+			);
+		},
+		//页面通知当前子组件刷新列表
+		reload(completeFunc) {
+			//先把父组件下拉刷新的回调函数存起来
+			this.completeFunc = completeFunc;
+			//调用z-paging的reload方法
+			this.$refs.paging.reload();
+		},
+		//当列表高度改变时,通知页面的swiper同步更改高度
+		contentHeightChanged(height) {
+			const finalHeight = this.dataList.length ? height : 0;
+			this.$emit('heightChanged', finalHeight);
+		},
+		//页面通知当前子组件加载更多数据
+		doLoadMore() {
+			this.$refs.paging.doLoadMore();
+		},
+		//页面通知当前子组件清除数据
+		clear() {
+			this.$refs.paging.clear();
+			this.hideEmptyView = true;
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+/* 注意,1、父节点需要固定高度,z-paging的height:100%才会生效 */
+/* 注意,2、请确保z-paging与同级的其他view的总高度不得超过屏幕宽度,以避免超出屏幕高度时页面的滚动与z-paging内部的滚动冲突 */
+.content {
+	height: 100%;
+}
+
+.item {
+	.seat {
+		height: 8px;
+		width: 100%;
+		background-color: #f7f7f9;
+	}
+	position: relative;
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+	padding: 0rpx 30rpx;
+	margin-top: 16px;
+	.itemTitle {
+		font-size: 14px;
+		position: relative;
+		.allContent {
+			position: absolute;
+			bottom: 0;
+			right: 0;
+			color: #2468f2;
+			z-index: 10;
+			background-color: #ffffff;
+		}
+	}
+	.resources {
+		display: flex;
+		flex-wrap: wrap;
+		margin-top: 8px;
+		justify-content: space-between;
+		.resourcesItem {
+			border-radius: 5px;
+			overflow: hidden;
+			position: relative;
+			margin-bottom: 5px;
+			.logo {
+				width: 100%;
+				height: 100%;
+			}
+			.playBtn {
+				width: 26rpx;
+				height: 26rpx;
+				position: absolute;
+				left: 50%;
+				top: 50%;
+				transform: translate(-50%, -50%);
+			}
+		}
+		.resourcesItemOne {
+			width: 686rpx;
+			height: 386rpx;
+		}
+		.resourcesItems {
+			width: 218rpx;
+			height: 218rpx;
+		}
+	}
+	.bottomBox {
+		margin: 16px 0;
+		display: flex;
+		align-items: center;
+		font-size: 12px;
+		color: #5c5f66;
+	}
+}
+
+.item-detail {
+	padding: 5rpx 15rpx;
+	border-radius: 10rpx;
+	font-size: 28rpx;
+	color: white;
+	background-color: #007aff;
+}
+
+.item-line {
+	position: absolute;
+	bottom: 0rpx;
+	left: 0rpx;
+	height: 1px;
+	width: 100%;
+	background-color: #eeeeee;
+}
+</style>

+ 307 - 0
components/news-list/news-list.vue

@@ -0,0 +1,307 @@
+<!-- 在这个文件对每个tab对应的列表进行渲染 -->
+<template>
+	<view class="content">
+		<!-- 这里设置了z-paging加载时禁止自动调用reload方法,自行控制何时reload(懒加载)-->
+		<z-paging
+			ref="paging"
+			v-model="dataList"
+			@query="queryList"
+			use-page-scroll
+			:hide-empty-view="hideEmptyView"
+			:refresher-enabled="false"
+			@contentHeightChanged="contentHeightChanged"
+			:auto="false"
+		>
+			<!-- 如果希望其他view跟着页面滚动,可以放在z-paging标签内 -->
+			<view class="item" v-for="(item, index) in dataList" :key="index" @click="toDetail(item.id)">
+				<view class="itemTitle">
+					{{ formatTitle(item.title) }}
+					<text v-if="item.title.length > 90" class="allContent">全文</text>
+				</view>
+				<view class="resources" v-if="item.clueInfoList.length <= 1">
+					<view
+						class="resourcesItem resourcesItemOne"
+						v-for="items in item.clueInfoList"
+						:key="items.id"
+					>
+						<image v-if="items.type == '1'" mode="aspectFill" class="logo" :src="items.localUrl"></image>
+						<image v-if="items.type == '2'" class="logo" src="../../static/image/video.png"></image>
+						<image v-if="items.type == '3'" class="logo" src="../../static/image/music.png"></image>
+						<image
+							v-if="items.type == 2 || items.type == 3"
+							src="../../static/image/playBtn.png"
+							class="playBtn"
+						></image>
+					</view>
+				</view>
+				<view class="resources" v-else>
+					<view
+						class="resourcesItem resourcesItems"
+						v-for="items in item.clueInfoList"
+						:key="items.id"
+					>
+						<image v-if="items.type == '1'" class="logo" mode="aspectFill" :src="items.localUrl"></image>
+						<image v-if="items.type == '2'" class="logo" src="../../static/image/video.png"></image>
+						<image v-if="items.type == '3'" class="logo" src="../../static/image/music.png"></image>
+						<image
+							v-if="items.type == 2 || items.type == 3"
+							src="../../static/image/playBtn.png"
+							class="playBtn"
+						></image>
+					</view>
+					<view
+						class="resourcesItem resourcesItems"
+						v-if="item.clueInfoList.length % 3 == 2"
+					></view>
+				</view>
+				<view class="bottomBox">
+					<view class="momentBox">
+						<view class="author" v-if="tabIndex == 3">{{ formatName(item.author) }}</view>
+						<image src="../../static/image/moment.png" class="momentImg"></image>
+						<text>{{ item.replyCount }}</text>
+					</view>
+					<view class="timeBox">{{ item.modifyTime }}</view>
+				</view>
+				<view class="seat"></view>
+			</view>
+		</z-paging>
+	</view>
+</template>
+
+<script>
+import { findPage } from '../../network/api.js';
+export default {
+	data() {
+		return {
+			//v-model绑定的这个变量不要在分页请求结束中自己赋值!!!
+			dataList: [],
+			height: 0,
+			hideEmptyView: true,
+			completeFunc: null
+		};
+	},
+	props: {
+		//当前组件的index,也就是当前组件是swiper中的第几个
+		tabIndex: {
+			type: Number,
+			default: function() {
+				return 0;
+			}
+		},
+		//当前swiper切换到第几个index
+		currentIndex: {
+			type: Number,
+			default: function() {
+				return 0;
+			}
+		},
+		title: {
+			type: String,
+			default: function() {
+				return '';
+			}
+		}
+	},
+	watch: {
+		currentIndex: {
+			handler(newVal) {
+				if (newVal === this.tabIndex) {
+					//懒加载,当滑动到当前的item时,才去加载
+					setTimeout(() => {
+						this.$refs.paging.reload();
+					}, 100);
+				}
+			},
+			immediate: true
+		}
+	},
+	methods: {
+		formatName(name, index = 7) {
+			return name.length > index ? name.substring(0, index - 1) + '...' : name;
+		},
+		toDetail(id) {
+			uni.navigateTo({
+				url: `../../pages/newsDetail/newsDetail?id=${id}`
+			});
+		},
+		formatTitle(title) {
+			// let phoneArr = title.match(/(0|86|17951)?(13[0-9]|15[0-9]|166|17[3678]|18[0-9]|14[57]|19[0-9])[0-9]{8}/g)
+			// if(Array.isArray(phoneArr)) {
+			// 	phoneArr.map(item => {
+			// 		let index = title.indexOf(item)
+			// 		let hide_phone = item.replace(item.substring(3,7), "****")
+			// 		title = `${title.substr(0, index)}${hide_phone}${title.substr(index + 11)}`
+			// 	})
+			// }
+			const reg = /1(\d{2})\d{4}(\d{4})/g;
+			title = title.replace(reg,"1$1****$2");
+			return title.length > 105 ? title.substring(0, 104) + '...' : title;
+		},
+		queryList(pageNo, pageSize) {
+			//组件加载时会自动触发此方法,因此默认页面加载时会自动触发,无需手动调用
+			//这里的pageNo和pageSize会自动计算好,直接传给服务器即可
+			//模拟请求服务器获取分页数据,请替换成自己的网络请求
+			//let multiSourceType = [2, 4, 1, 3];
+			let multiSourceType = [2, 1, 4];
+			const params = {
+				pageNumber: pageNo,
+				pageSize: pageSize,
+				ascription: 1,
+				multiSource: multiSourceType[this.tabIndex],
+				title: this.title,
+				status: 1
+			};
+			findPage(params).then(
+				res => {
+					if (res.data.state == 200) {
+						let data = res.data.data.pageRecords.map(item => {
+							item.clueInfoList = item.clueInfoList.filter(i => {
+								return i.type !== 0;
+							});
+							return item;
+						});
+						console.log(data);
+						this.$refs.paging.complete(data);
+					} else {
+						this.$refs.paging.complete([]);
+					}
+					this.hideEmptyView = false;
+					//请求结束,调用父组件的下拉刷新结束回调函数,使得父组件中的z-paging下拉刷新结束
+					if (this.completeFunc) {
+						this.completeFunc();
+					}
+				},
+				error => {
+					this.$refs.paging.complete(false);
+					if (this.completeFunc) {
+						this.completeFunc();
+					}
+				}
+			);
+		},
+		//页面通知当前子组件刷新列表
+		reload(completeFunc) {
+			//先把父组件下拉刷新的回调函数存起来
+			this.completeFunc = completeFunc;
+			//调用z-paging的reload方法
+			this.$refs.paging.reload();
+		},
+		//当列表高度改变时,通知页面的swiper同步更改高度
+		contentHeightChanged(height) {
+			const finalHeight = this.dataList.length ? height : 0;
+			this.$emit('heightChanged', finalHeight);
+		},
+		//页面通知当前子组件加载更多数据
+		doLoadMore() {
+			this.$refs.paging.doLoadMore();
+		},
+		//页面通知当前子组件清除数据
+		clear() {
+			this.$refs.paging.clear();
+			this.hideEmptyView = true;
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+/* 注意,1、父节点需要固定高度,z-paging的height:100%才会生效 */
+/* 注意,2、请确保z-paging与同级的其他view的总高度不得超过屏幕宽度,以避免超出屏幕高度时页面的滚动与z-paging内部的滚动冲突 */
+.content {
+	height: 100%;
+}
+.item {
+	.seat {
+		height: 8px;
+		width: 100%;
+		background-color: #f7f7f9;
+	}
+	position: relative;
+	display: flex;
+	flex-direction: column;
+	justify-content: space-between;
+	padding: 0rpx 30rpx;
+	margin-top: 16px;
+	.itemTitle {
+		font-size: 14px;
+		position: relative;
+		.allContent {
+			position: absolute;
+			bottom: 0;
+			right: 0;
+			color: #2468f2;
+			z-index: 10;
+			background-color: #ffffff;
+		}
+	}
+	.resources {
+		display: flex;
+		flex-wrap: wrap;
+		margin-top: 8px;
+		justify-content: space-between;
+		.resourcesItem {
+			border-radius: 5px;
+			overflow: hidden;
+			position: relative;
+			margin-bottom: 5px;
+			.logo {
+				width: 100%;
+				height: 100%;
+			}
+			.playBtn {
+				width: 26rpx;
+				height: 26rpx;
+				position: absolute;
+				left: 50%;
+				top: 50%;
+				transform: translate(-50%, -50%);
+			}
+		}
+		.resourcesItemOne {
+			width: 686rpx;
+			height: 386rpx;
+		}
+		.resourcesItems {
+			width: 218rpx;
+			height: 218rpx;
+		}
+	}
+	.bottomBox {
+		margin: 16px 0;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		font-size: 12px;
+		color: #5c5f66;
+		.momentBox {
+			display: flex;
+			align-items: center;
+			.momentImg {
+				width: 16px;
+				height: 16px;
+				margin-right: 4px;
+			}
+			.author {
+				margin-right: 32rpx;
+			}
+		}
+	}
+}
+
+.item-detail {
+	padding: 5rpx 15rpx;
+	border-radius: 10rpx;
+	font-size: 28rpx;
+	color: white;
+	background-color: #007aff;
+}
+
+.item-line {
+	position: absolute;
+	bottom: 0rpx;
+	left: 0rpx;
+	height: 1px;
+	width: 100%;
+	background-color: #eeeeee;
+}
+</style>

BIN
components/saber-textShrink/.DS_Store


+ 113 - 0
components/saber-textShrink/textShrink.vue

@@ -0,0 +1,113 @@
+<template>
+	<view class="font-shrink-box" >
+		<view class="content-borderbox" :style="openStauts?'height:auto;':'max-height:'+(line*(size+16))+'rpx;overflow: hidden;'" >
+			<view class="content-text" :style="'line-height:'+(size+16)+'rpx;font-size:'+size+'rpx'">
+				{{text}}
+			</view>
+			<view v-if="isShowBtn&&!openStauts&&!hideEllips" class="ellipsis" :style="'line-height:'+(size+16)+'rpx;font-size:'+size+'rpx;height:'+(size+16)+'rpx;background-color:'+ellipsisBack">
+				.....
+			</view>
+		</view>
+		<view v-if="isShowBtn" class="open-close-btn" :style="'font-size:'+btnSize+'rpx'" @click="showAll">
+			{{openStauts?'收起':'展开'}}
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props:{
+			line:{ //行数
+				type:Number,
+				default:2
+			},
+			text:{ // 文字
+				type:String,
+				default:''
+			},
+			size:{ //字体大小,单位rpx
+				type:Number,
+				default:28
+			},
+			btnSize:{
+				type:Number,
+				default:28
+			},
+			ellipsisBack:{ //省略号背景色
+				type:String,
+				default:'#fff'
+			},
+			hideEllips:{ //是否隐藏省略号
+				type:Boolean,
+				default:false
+			}
+			
+		},
+		data() {
+			return {
+				oldText:this.text,//旧的text
+				borderHeight:0, //外层盒子的高度
+				contentHeight:0, //放文字的盒子高度
+				isShowBtn:false,//是否显示 展开/收起按钮
+				openStauts:false,//展开状态,false-展开,true-收起
+			};
+		},
+		updated() {
+			// 使用oldText存放上一次的值,根据判断来减少一次方法调用
+			if(this.oldText != this.text){
+				this.oldText = this.text;
+				this.initBtnShowStauts();
+			}
+		},
+		mounted(){
+			this.oldText = this.text;
+			this.initBtnShowStauts();
+		},
+		methods:{
+			initBtnShowStauts(){
+				const query = uni.createSelectorQuery().in(this);
+				let p1 = new Promise((resolve)=>{
+					this.$nextTick(()=>{ 
+						query.select('.content-borderbox').fields({ size: true, scrollOffset: true },
+						data => { resolve(data.height) }).exec(); 
+					}) 
+				})
+				let p2 = new Promise((resolve)=>{ 
+					this.$nextTick(()=>{ 
+						query.select('.content-text').fields({ size: true, scrollOffset: true }, 
+						data => { resolve(data.height) }).exec(); 
+					}) 
+				}) 
+				Promise.all([p1,p2]).then((res)=>{ 
+					this.borderHeight = res[0]; 
+					this.contentHeight = res[1]; 
+					this.isShowBtn = this.borderHeight<this.contentHeight;
+				});
+			},
+			showAll(){
+				this.openStauts = !this.openStauts;
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.font-shrink-box{
+		width: 100%;
+		.content-borderbox{
+			position: relative;
+			.ellipsis{
+				position: absolute;
+				right: 0;
+				bottom:0;
+			}
+		}
+		
+		.open-close-btn{
+			width: 100%;
+			color:#2250FF;
+			text-align: center;
+			padding:10rpx 0;
+		}
+	}
+</style>

+ 258 - 0
components/sound-recording/sound-recording.vue

@@ -0,0 +1,258 @@
+<template>
+  <view class="recorder">
+    <view class="re-top" v-if="showTop">
+      <view class="re-cancel" @click="cancel">取消</view>
+      <view class="re-confirm" :style="{color: theme}" @click="confirm">{{ confirmText }}</view>
+    </view>
+    <text class="title">{{ finish ? '点击播放' : '长按录制语音' }}</text>
+    <view class="recorder-box" 
+      v-if="!finish"
+      @click="handle"
+      @longpress="onStartRecoder" 
+      @touchend="onEndRecoder">
+      <u-circle-progress :active-color="theme" :duration="0" :percent="calcProgress">
+        <view class="u-progress-content">
+          <image src="/static/sound-recording/voice.png" mode="aspectFit" :style="{
+            width: width,
+            height: height
+          }"></image>
+        </view>
+      </u-circle-progress>
+    </view>
+    <view class="recorder-box" 
+      v-else
+      @click="playVoice">
+      <u-circle-progress :active-color="theme" :duration="0" :percent="playProgress">
+        <view class="u-progress-content">
+          <image src="/static/sound-recording/play.png" mode="aspectFit" :style="{
+            width: width,
+            height: height
+          }" v-if="!playStatus"></image>
+          <image src="/static/sound-recording/pause.png" mode="aspectFit" :style="{
+            width: width,
+            height: height
+          }" v-else></image>
+        </view>
+      </u-circle-progress>
+    </view>
+    <text class="now-date">{{ reDate }}</text>
+    <view @click="reset">重新录制</view>
+  </view>
+</template>
+
+<script>
+  import uCircleProgress from '../u-circle-progress/u-circle-progress.vue'
+  const recorderManager = uni.getRecorderManager();
+  const innerAudioContext = uni.createInnerAudioContext();
+	export default {
+    components: {
+      uCircleProgress
+    },
+    props: {
+      width: {
+        type: String,
+        default: '60rpx'
+      },
+      height: {
+        type: String,
+        default: '60rpx'
+      },
+      showTop: {
+        type: Boolean,
+        default: true
+      },
+      maximum: {
+        type: [Number, String],
+        default: 15
+      },
+      duration: {
+        type: Number,
+        default: 20
+      },
+      theme: {
+        type: String,
+        default: '#32b99d'
+      },
+      confirmText: {
+        type: String,
+        default: '完成'
+      }
+    },
+		data() {
+			return {
+				reDate: '00:00',
+        sec: 0,
+        min: 0,
+        finish: false,
+        voicePath: '',
+        playProgress: 100,
+        playTimer: null,
+        timer: null,
+        playStatus: false
+			};
+		},
+    created () {
+      // 监听
+      this.onMonitorEvents()
+    },
+    computed: {
+      // 录制时间计算
+      calcProgress () {
+        return (this.sec + (this.min * 60)) / this.maximum * 100
+      }
+    },
+    methods: {
+      // 完成事件
+      confirm () {
+        if (!innerAudioContext.paused) {
+          innerAudioContext.stop()
+        }
+        this.$emit('confirm', this.voicePath)
+      },
+      // 取消事件
+      cancel () {
+        if (!innerAudioContext.paused) {
+          innerAudioContext.stop()
+        }
+        this.$emit('cancel')
+      },
+      // 点击事件
+      handle () {
+        this.$emit('click')
+      },
+      // 重新录制
+      reset () {
+        this.voicePath = ''
+        this.min = 0
+        this.sec = 0
+        this.reDate = '00:00'
+        this.playProgress = 100
+        this.finish = false
+        this.$emit('reset')
+      },
+      // 播放暂停录音
+      playVoice() {
+        innerAudioContext.src = this.voicePath;
+        
+        if (innerAudioContext.paused) {
+          innerAudioContext.play()
+          this.playStatus = true
+        } else {
+          innerAudioContext.stop();
+        }
+        this.$emit('playVoice', innerAudioContext.paused)
+      },
+      // 录制结束
+      onEndRecoder () {
+        recorderManager.stop()
+      },
+      // 开始录制
+      onStartRecoder () {
+        recorderManager.start({
+          duration: this.maximum * 1000
+        })
+      },
+      // 监听
+      onMonitorEvents () {
+        // 录制开始
+        recorderManager.onStart(() => {
+          uni.showLoading({
+            title: '录制中...'
+          })
+          this.startDate()
+          this.$emit('start')
+        })
+        // 录制结束
+        recorderManager.onStop(({ tempFilePath }) => {
+          this.voicePath = tempFilePath
+          clearInterval(this.timer)
+          uni.hideLoading()
+          this.finish = true
+          this.$emit('end')
+        })
+        // 播放进度
+        innerAudioContext.onTimeUpdate(() => {
+          let totalDate = innerAudioContext.duration
+          let nowTime = innerAudioContext.currentTime
+          let surplus = totalDate - nowTime
+          this.playProgress = surplus / totalDate * 100
+          
+          let _min = Math.floor(surplus / 60)
+          if (_min < 10) _min = '0' + _min;
+          let _sec = Math.floor(surplus%60)
+          if (_sec < 10) _sec = '0' + _sec;
+          this.reDate = _min + ':' + _sec
+        })
+        // 播放暂停
+        innerAudioContext.onPause(() => {
+          this.resetDate()
+          this.playProgress = 100
+          this.playStatus = false
+          console.log('播放暂停')
+          this.$emit('stop')
+        })
+        // 播放停止
+        innerAudioContext.onStop(() => {
+          this.resetDate()
+          this.playProgress = 100
+          this.playStatus = false
+          console.log('播放停止')
+          this.$emit('stop')
+        })
+      },
+      // 录音计时
+      startDate () {
+        clearInterval(this.timer)
+        this.sec = 0
+        this.min = 0
+        this.timer = setInterval(() => {
+          this.sec += this.duration / 1000
+          if (this.sec >= 60) {
+            this.min ++
+            this.sec = 0
+          }
+          this.resetDate()
+        }, this.duration)
+      },
+      // 播放时间
+      resetDate () {
+        let _s = this.sec < 10 ? '0' + parseInt(this.sec) : parseInt(this.sec)
+        let _m = this.min < 10 ? '0' + this.min : this.min
+        this.reDate = _m + ':' + _s
+      }
+    }
+	}
+</script>
+
+<style lang="scss">
+.recorder {
+  position: relative;
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+  background-color: #fff;
+  font-size: 24rpx;
+  width: 100%;
+  .re-top {
+    display: flex;
+    justify-content: space-between;
+    padding: 10rpx 20rpx;
+    width: 100%;
+    font-size: 28rpx;
+    box-sizing: border-box;
+  }
+  .title {
+    font-size: 36rpx;
+    color: #333;
+    padding: 20rpx 0 30rpx;
+  }
+  .recorder-box {
+    position: relative;
+  }
+  .now-date {
+    font-size: 28rpx;
+    color: #666;
+    padding: 20rpx 0;
+  }
+}
+</style>

+ 109 - 0
components/tabs-view/tabs-view.vue

@@ -0,0 +1,109 @@
+<!-- 注意:此tab-view仅为z-paging的demo演示之用,未作兼容与细节处理,不建议直接使用,建议使用第三方成熟的tab-view -->
+<template name="tabs-view">
+	<view class="segment">
+		<view class="segment-item" v-for="(title,index) in items" :key="index" :style="{width:itemWidth}" @click="itemClick(index)">
+			<view class="title-container">
+				<text class="title" :style="{color:currentIndex===index?'#007AFF':'darkgray'}">{{title}}</text>
+			</view>
+			<view class="line" v-if="currentIndex===index"></view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'tabs-view',
+		data() {
+			return {
+				currentIndex: 0
+			};
+		},
+		props: {
+			items: {
+				type: Array,
+				default: function() {
+					return [];
+				}
+			},
+			current: {
+				type: Number,
+				default: function() {
+					return 0;
+				}
+			}
+		},
+		watch: {
+			current(newVal){
+				this.currentIndex = newVal;
+			}
+		},
+		computed: {
+			itemWidth() {
+				// #ifdef APP-NVUE
+				return (750 /  this.items.length) + 'rpx';
+				// #endif
+				// #ifndef APP-NVUE
+				return ((1.0 / this.items.length) * 100) + '%';
+				// #endif
+			}
+		},
+		methods: {
+			itemClick(index) {
+				if (this.currentIndex != index) {
+					this.$emit('change', index);
+				}
+				this.currentIndex = index;
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.segment-control {}
+
+	.segment {
+		background-color: white;
+		height: 80rpx;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		font-size: 30rpx;
+		color: darkgray;
+		border-bottom: #eeeeee solid 1px;
+		z-index: 1000;
+	}
+
+	.segment-item {
+		height: 80rpx;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.title-container {
+		width: 100%;
+		height: 76rpx;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		justify-content: center;
+		align-items: center;
+		text-align: center;
+	}
+
+	.title {
+		width: 100%;
+		font-size: 30rpx;
+		text-align: center;
+	}
+
+	.line {
+		height: 2px;
+		width: 70%;
+		background-color: #007AFF;
+	}
+</style>

+ 213 - 0
components/u-circle-progress/u-circle-progress.vue

@@ -0,0 +1,213 @@
+<template>
+	<view
+		class="u-circle-progress"
+		:style="{
+			width: widthPx + 'px',
+			height: widthPx + 'px',
+			backgroundColor: bgColor
+		}"
+	>
+		<!-- 支付宝小程序不支持canvas-id属性,必须用id属性 -->
+		<canvas
+			class="u-canvas-bg"
+			:canvas-id="elBgId"
+			:id="elBgId"
+			:style="{
+				width: widthPx + 'px',
+				height: widthPx + 'px'
+			}"
+		></canvas>
+		<canvas
+			class="u-canvas"
+			:canvas-id="elId"
+			:id="elId"
+			:style="{
+				width: widthPx + 'px',
+				height: widthPx + 'px'
+			}"
+		></canvas>
+		<slot></slot>
+	</view>
+</template>
+
+<script>
+/**
+ * circleProgress 环形进度条
+ * @description 展示操作或任务的当前进度,比如上传文件,是一个圆形的进度条。注意:此组件的percent值只能动态增加,不能动态减少。
+ * @tutorial https://www.uviewui.com/components/circleProgress.html
+ * @property {String Number} percent 圆环进度百分比值,为数值类型,0-100
+ * @property {String} inactive-color 圆环的底色,默认为灰色(该值无法动态变更)(默认#ececec)
+ * @property {String} active-color 圆环激活部分的颜色(该值无法动态变更)(默认#19be6b)
+ * @property {String Number} width 整个圆环组件的宽度,高度默认等于宽度值,单位rpx(默认200)
+ * @property {String Number} border-width 圆环的边框宽度,单位rpx(默认14)
+ * @property {String Number} duration 整个圆环执行一圈的时间,单位ms(默认呢1500)
+ * @property {String} type 如设置,active-color值将会失效
+ * @property {String} bg-color 整个组件背景颜色,默认为白色
+ * @example <u-circle-progress active-color="#2979ff" :percent="80"></u-circle-progress>
+ */
+export default {
+	name: 'u-circle-progress',
+	props: {
+		// 圆环进度百分比值
+		percent: {
+			type: Number,
+			default: 0,
+			// 限制值在0到100之间
+			validator: val => {
+				return val >= 0 && val <= 100;
+			}
+		},
+		// 底部圆环的颜色(灰色的圆环)
+		inactiveColor: {
+			type: String,
+			default: '#ececec'
+		},
+		// 圆环激活部分的颜色
+		activeColor: {
+			type: String,
+			default: '#19be6b'
+		},
+		// 圆环线条的宽度,单位rpx
+		borderWidth: {
+			type: [Number, String],
+			default: 14
+		},
+		// 整个圆形的宽度,单位rpx
+		width: {
+			type: [Number, String],
+			default: 200
+		},
+		// 整个圆环执行一圈的时间,单位ms
+		duration: {
+			type: [Number, String],
+			default: 0
+		},
+		// 主题类型
+		type: {
+			type: String,
+			default: ''
+		},
+		// 整个圆环进度区域的背景色
+		bgColor: {
+			type: String,
+			default: '#ffffff'
+		}
+	},
+	data() {
+		return {
+			elBgId: 'uCircleProgressBgId',
+			elId: 'uCircleProgressElId',
+			widthPx: uni.upx2px(this.width), // 转成px后的整个组件的背景宽度
+			borderWidthPx: uni.upx2px(this.borderWidth), // 转成px后的圆环的宽度
+			startAngle: -Math.PI / 2, // canvas画圆的起始角度,默认为3点钟方向,定位到12点钟方向
+			progressContext: null, // 活动圆的canvas上下文
+			newPercent: 0, // 当动态修改进度值的时候,保存进度值的变化前后值,用于比较用
+			oldPercent: 0 // 当动态修改进度值的时候,保存进度值的变化前后值,用于比较用
+		};
+	},
+	watch: {
+		percent(nVal, oVal = 0) {
+			if (nVal > 100) nVal = 100;
+			if (nVal < 0) oVal = 0;
+			// 此值其实等于this.percent,命名一个新
+			this.newPercent = nVal;
+			this.oldPercent = oVal;
+			setTimeout(() => {
+				// 无论是百分比值增加还是减少,需要操作还是原来的旧的百分比值
+				// 将此值减少或者新增到新的百分比值
+				this.drawCircleByProgress(oVal);
+			}, 0);
+		}
+	},
+	created() {
+		// 赋值,用于加载后第一个画圆使用
+		this.newPercent = this.percent;
+		this.oldPercent = 0;
+	},
+	computed: {
+		// 有type主题时,优先起作用
+		circleColor() {
+			return this.activeColor
+		}
+	},
+	mounted() {
+		// 在h5端,必须要做一点延时才起作用,this.$nextTick()无效(HX2.4.7)
+		setTimeout(() => {
+			this.drawProgressBg();
+			this.drawCircleByProgress(this.oldPercent);
+		}, 50);
+	},
+	methods: {
+		drawProgressBg() {
+			let ctx = uni.createCanvasContext(this.elBgId, this);
+			ctx.setLineWidth(this.borderWidthPx); // 设置圆环宽度
+			ctx.setStrokeStyle(this.inactiveColor); // 线条颜色
+			ctx.beginPath(); // 开始描绘路径
+			// 设置一个原点(110,110),半径为100的圆的路径到当前路径
+			let radius = this.widthPx / 2;
+			ctx.arc(radius, radius, radius - this.borderWidthPx, 0, 2 * Math.PI, false);
+			ctx.stroke(); // 对路径进行描绘
+			ctx.draw();
+		},
+		drawCircleByProgress(progress) {
+			// 第一次操作进度环时将上下文保存到了this.data中,直接使用即可
+			let ctx = this.progressContext;
+			if (!ctx) {
+				ctx = uni.createCanvasContext(this.elId, this);
+				this.progressContext = ctx;
+			}
+			// 表示进度的两端为圆形
+			ctx.setLineCap('round');
+			// 设置线条的宽度和颜色
+			ctx.setLineWidth(this.borderWidthPx);
+			ctx.setStrokeStyle(this.circleColor);
+			// 将总过渡时间除以100,得出每修改百分之一进度所需的时间
+			let time = Math.floor(this.duration / 100);
+			// 结束角的计算依据为:将2π分为100份,乘以当前的进度值,得出终止点的弧度值,加起始角,为整个圆从默认的
+			// 3点钟方向开始画图,转为更好理解的12点钟方向开始作图,这需要起始角和终止角同时加上this.startAngle值
+			let endAngle = ((2 * Math.PI) / 100) * progress + this.startAngle;
+			ctx.beginPath();
+			// 半径为整个canvas宽度的一半
+			let radius = this.widthPx / 2;
+			ctx.arc(radius, radius, radius - this.borderWidthPx, this.startAngle, endAngle, false);
+			ctx.stroke();
+			ctx.draw();
+			// 如果变更后新值大于旧值,意味着增大了百分比
+			if (this.newPercent > this.oldPercent) {
+				// 每次递增百分之一
+				progress++;
+				// 如果新增后的值,大于需要设置的值百分比值,停止继续增加
+				if (progress > this.newPercent) return;
+			} else {
+				// 同理于上面
+				progress--;
+				if (progress < this.newPercent) return;
+			}
+			setTimeout(() => {
+				// 定时器,每次操作间隔为time值,为了让进度条有动画效果
+				this.drawCircleByProgress(progress);
+			}, time);
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+// @import "../../libs/css/style.components.scss";
+.u-circle-progress {
+	position: relative;
+	/* #ifndef APP-NVUE */
+	display: inline-flex;		
+	/* #endif */
+	align-items: center;
+	justify-content: center;
+}
+
+.u-canvas-bg {
+	position: absolute;
+}
+
+.u-canvas {
+	position: absolute;
+}
+</style>

+ 19 - 0
index.html

@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="UTF-8" />
+      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
+        CSS.supports('top: constant(a)'))
+      document.write(
+        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
+        (coverSupport ? ', viewport-fit=cover' : '') + '" />')
+    </script>
+    <title></title>
+    <!--preload-links-->
+    <!--app-context-->
+  </head>
+  <body>
+    <div id="app"><!--app-html--></div>
+    <script type="module" src="/main.js"></script>
+  </body>
+</html>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 0 - 0
js_sdk/jsencrypt-Rsa/jsencrypt/jsencrypt.min.js


+ 88 - 0
js_sdk/jsencrypt-Rsa/jsencrypt/jsencrypt.vue

@@ -0,0 +1,88 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	import JSEncrypt from './jsencrypt.min.js';
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		},
+		getRealLen:function(str) {
+		    return str.replace(/[^\x00-\xff]/g, '__').length;
+			
+		},
+		setEncryptList:function(publicKey,str,max) {
+			var arr=[]
+		    
+		    var s=str,reg=/.{40}/g,ppstr=s.match(reg);
+		    ppstr.push(s.substring(ppstr.join('').length));
+			
+		    for (var nux=0;nux<ppstr.length;nux++) {
+		    	var Nax=this.getRealLen(ppstr[nux]);
+				if(Nax>116){
+					var list=this.setEncryptList(publicKey,ppstr[nux],Nax)
+					 for (var nu=0;nu<list.length;nu++) {
+						 arr.push(list[nu]);
+					 }
+				}else{
+				
+					arr.push(this.setEncrypt(publicKey,ppstr[nux]));
+				}
+		    
+		    }
+			return arr;
+		},		
+		setEncrypt:function(publicKey,data){
+				const encrypt =new JSEncrypt();
+				encrypt.setPublicKey(publicKey);
+		
+				return encrypt.encrypt(data);
+		},
+		setLongEncrypt:function(publicKey,data){
+			var s=data,reg=/.{116}/g,rs=s.match(reg);
+			rs.push(s.substring(rs.join('').length));
+			var arr=[];
+			for (var n=0;n<rs.length;n++) {
+				var max=this.getRealLen(rs[n]);
+				
+				if(max>116){
+				
+					var list=this.setEncryptList(publicKey,rs[n],max)
+					 for (var nu=0;nu<list.length;nu++) {
+						 arr.push(list[nu]);
+					 }
+				}else{
+					
+					arr.push(this.setEncrypt(publicKey,rs[n]));
+				}
+				
+			}
+			return arr;
+		},
+		setDecryptArray:function(PrivateKey,ArrayData){
+			var Decrypt="";
+			for (var n=0;n<ArrayData.length;n++) {
+				Decrypt=Decrypt+this.setDecrypt(PrivateKey,ArrayData[n]);	
+			}
+			return Decrypt;
+		},
+		setDecrypt:function(PrivateKey,data){
+				const encrypt =new JSEncrypt();
+				encrypt.setPrivateKey(PrivateKey);
+				
+				return encrypt.decrypt(data);
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 12 - 0
main.js

@@ -0,0 +1,12 @@
+import App from './App'
+import Vue from 'vue'
+import store from '@/store'
+Vue.prototype.$store = store;
+
+Vue.config.productionTip = false
+App.mpType = 'app'
+const app = new Vue({
+	store,
+	...App
+})
+app.$mount()

+ 121 - 0
manifest.json

@@ -0,0 +1,121 @@
+{
+    "name" : "broke_news_wx",
+    "appid" : "__UNI__524F1F7",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueStyleCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {
+            "Maps" : {}
+        },
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {},
+            /* SDK配置 */
+            "sdkConfigs" : {
+                "maps" : {
+                    "baidu" : {
+                        "appkey_ios" : "tIRoQn8nup0e5zCKgcy4MGditGy9xu3K",
+                        "appkey_android" : "tIRoQn8nup0e5zCKgcy4MGditGy9xu3K"
+                    }
+                },
+                "oauth" : {
+                    "weixin" : {
+                        "appid" : "",
+                        "appsecret" : "",
+                        "UniversalLinks" : ""
+                    }
+                }
+            }
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "wxf774b5ea964736eb",
+        "setting" : {
+            "urlCheck" : false,
+            "es6" : true,
+            "minified" : true,
+            "postcss" : true
+        },
+        "usingComponents" : true,
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "你的位置信息将用于小程序位置接口的效果展示"
+            }
+        }
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "vueVersion" : "2",
+    "h5" : {
+        "devServer" : {
+            "port" : 8888,
+            "disableHostCheck" : true,
+            "https" : true,
+            "proxy" : {
+                "/cmsback" : {
+                    "target" : "https://console.sx.chinamcloud.com/cmsback",
+                    "changeOrigin" : true,
+                    "pathRewrite" : {
+                        "^/cmsback" : ""
+                    }
+                }
+            }
+        },
+        "router" : {
+            "mode" : "history"
+        },
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "你的位置信息将用于小程序位置接口的效果展示"
+            }
+        }
+    }
+}

+ 54 - 0
network/api.js

@@ -0,0 +1,54 @@
+import { myRequest, uploadFile } from './http.js'
+
+
+//上传素材
+export const uploadMediaFile = (data) => {
+	return uploadFile({
+		url: '/cmsback/api/clue/uploadMediaFile',
+		...data
+	})
+}
+
+//发布报料
+export const saveClue = (data) => {
+	return myRequest({
+		url: '/cmsback/api/clue/save',
+		method: 'POST',
+		data
+	})
+}
+
+//报料广场
+export const findPage = (data) => {
+	return myRequest({
+		url: '/cmsback/api/clue/findPage',
+		method: 'POST',
+		data
+	})
+}
+
+//查看线索详情
+export const getClueById = (id) => {
+	return myRequest({
+		url: `/cmsback/api/clue/getClueById/${id}`,
+		method: 'GET',
+	})
+}
+
+//获取手机号码
+export const getMobile = data => {
+	return myRequest({
+		url: '/cmsback/api/clue/findMobile',
+		method: "POST",
+		data
+	})
+}
+
+//获取用户权限
+export const findUserAuth = data => {
+	return myRequest({
+		url: '/cmsback/api/clue/checkAuth',
+		method: 'GET',
+		data
+	})
+}

+ 67 - 0
network/http.js

@@ -0,0 +1,67 @@
+const baseURL = 'https://console.sxtvs.com.cn'
+
+import { config } from '../utils/config.js'
+
+export const myRequest = options => {
+	uni.showLoading({
+		title: '加载中...'
+	})
+	return new Promise((resolve, reject) => {
+		uni.request({
+			url: `${baseURL}${options.url}`, //接口地址:前缀+方法中传入的地址
+			method: options.method || 'GET', //请求方法:传入的方法或者默认是“GET”
+			data: options.data || {}, //传递参数:传入的参数或者默认传递空集合
+			header: {
+			    'tenantId': config.tenantId
+			},
+			success: (res) => {
+				//返回的数据(不固定,看后端接口,这里是做了一个判断,如果不为true,用uni.showToast方法提示获取数据失败)
+				// if (res.data.success != true) {
+				// 	return uni.showToast({
+				// 		title: '获取数据失败',
+				// 		icon: 'none'
+				// 	})
+				// }
+				// 如果不满足上述判断就输出数据
+				uni.hideLoading()
+				resolve(res)
+			},
+			// 这里的接口请求,如果出现问题就输出接口请求失败
+			fail: (err) => {
+				uni.hideLoading()
+				console.log(err)
+				reject(err)
+			}
+		})
+	})
+}
+
+//上传文件
+export const uploadFile = options => {
+	uni.showLoading({
+		title: '加载中...'
+	})
+	return new Promise((resolve, reject) => {
+		console.log(options);
+		uni.uploadFile({
+			url: `${baseURL}${options.url}`,
+			name: 'file',
+			fileType: options.fileType,
+			filePath: options.filePath, // 文件
+			formData: options.formData, // 除文件外其他所有数据,传对象,会默认转换为 FormData
+			header: {
+				'tenantId': config.tenantId
+			},
+			success: res => {
+				uni.hideLoading()
+				resolve(JSON.parse(res.data))
+			},
+			// 这里的接口请求,如果出现问题就输出接口请求失败
+			fail: (err) => {
+				uni.hideLoading()
+				console.log(err)
+				reject(err)
+			}
+		})
+	})
+}

+ 78 - 0
pages.json

@@ -0,0 +1,78 @@
+{
+	"pages": [{
+		"path": "pages/choosePlatform/choosePlatform",
+		"style": {
+			"navigationBarTitleText": "选择平台",
+			"enablePullDownRefresh": false
+		}
+
+	}, {
+		"path": "pages/Login/Login",
+		"style": {
+			"navigationBarTitleText": "登录",
+			"enablePullDownRefresh": false
+		}
+
+	}, {
+		"path": "pages/test/test",
+		"style": {
+			"navigationBarTitleText": "",
+			"enablePullDownRefresh": false
+		}
+	}, {
+		"path": "pages/newsSquare/newsSquare",
+		"style": {
+			"navigationBarTitleText": "快报帮",
+			"enablePullDownRefresh": false
+		}
+
+	}, {
+		"path": "pages/publishNews/publishNews",
+		"style": {
+			"navigationBarTitleText": "我要求助",
+			"enablePullDownRefresh": false
+		}
+
+	},{
+		"path": "pages/managePage/managePage",
+		"style": {
+			"navigationBarTitleText": "",
+			"enablePullDownRefresh": false
+		}
+
+	}, {
+		"path": "pages/myNews/myNews",
+		"style": {
+			"navigationBarTitleText": "我的求助",
+			"enablePullDownRefresh": false
+		}
+
+	}, {
+		"path": "pages/newsDetail/newsDetail",
+		"style": {
+			"navigationBarTitleText": "详情",
+			"enablePullDownRefresh": false
+		}
+
+	}, {
+		"path": "pages/userAgreement/userAgreement",
+		"style": {
+			"navigationBarTitleText": "用户协议",
+			"enablePullDownRefresh": false
+		}
+
+	}, {
+		"path": "pages/privacyPolicy/privacyPolicy",
+		"style": {
+			"navigationBarTitleText": "隐私政策",
+			"enablePullDownRefresh": false
+		}
+
+	}],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "uni-app",
+		"navigationBarBackgroundColor": "#F8F8F8",
+		"backgroundColor": "#F8F8F8"
+	}
+}

+ 213 - 0
pages/Login/Login.vue

@@ -0,0 +1,213 @@
+<template>
+	<view class="loginBox">
+		<image src="../../static/image/logo.png" class="logo"></image>
+		<view class="logoText">
+			快报嗨享平台
+		</view>
+		<view class="btnBox">
+			<view class="isShowGetPhone" v-if="!isAgree" @click="valiAgree">一键授权登录</view>
+			<button class="loginBtn" v-else open-type="getPhoneNumber" @getphonenumber="login">
+				一键授权登录
+			</button>
+		</view>
+		<view class="tips">
+			<checkbox :value="isAgree" @click="agreeChange()" :checked="isAgree" />
+			<view>
+				我已阅读并同意
+				<text class="primaryText" @click="toUserArgeement()">《服务协议》</text>
+				与
+				<text class="primaryText" @click="toPrivacyPolicy()">《隐私政策》</text>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapMutations
+	} from 'vuex';
+	import {
+		getMobile
+	} from '../../network/api.js';
+	export default {
+		data() {
+			return {
+				isAgree: false
+			};
+		},
+		methods: {
+			...mapMutations(['setUserInfo']),
+			agreeChange() {
+				this.isAgree = !this.isAgree;
+			},
+			toUserArgeement() {
+				uni.navigateTo({
+					url: '/pages/userAgreement/userAgreement'
+				});
+			},
+			toPrivacyPolicy() {
+				uni.navigateTo({
+					url: '/pages/privacyPolicy/privacyPolicy'
+				});
+			},
+			valiAgree() {
+				if (!this.isAgree) {
+					uni.showToast({
+						title: '请先同意《服务协议》与《隐私政策》',
+						duration: 2000,
+						icon: 'none'
+					});
+					return;
+				}
+			},
+			async login(e) {
+				if (e.detail.errMsg !== 'getPhoneNumber:ok') return
+				if (e.detail.iv) {
+					let data = {
+						departmentId: 1,
+						code: e.detail.code
+					};
+					console.log(data);
+					let res = await getMobile(data);
+					let result = res.data;
+					if (result.state == 200) {
+						let userInfo = {
+							phone: result.data.phoneNumber,
+						};
+						uni.setStorageSync('userInfo', JSON.stringify(userInfo));
+						this.setUserInfo(userInfo);
+						uni.showToast({
+							title: '登录成功',
+							icon: 'none'
+						});
+						setTimeout(() => {
+							uni.navigateBack();
+						}, 300);
+					} else {
+						console.log(result)
+						uni.showToast({
+							title: result.message,
+							icon: 'none'
+						});
+					}
+				} else {
+					uni.showToast({
+						title: '授权失败',
+						icon: 'none'
+					});
+				}
+			},
+			onAuthError(e) {
+				uni.showToast({
+					title: '您已拒绝授权~',
+					icon: 'none'
+				});
+			}
+		}
+	};
+</script>
+<style>
+	/* #ifdef H5 */
+	uni-checkbox .uni-checkbox-input {
+		border: none !important;
+	}
+
+	uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
+		color: #ff6903;
+	}
+
+	.uni-checkbox-input.uni-checkbox-input-checked {
+		border: none !important;
+	}
+
+	/* #endif */
+
+	/* 微信中样式 */
+	/* #ifdef APP-PLUS ||MP-WEIXIN */
+	checkbox .wx-checkbox-input {
+		border-radius: 50% !important;
+	}
+
+	checkbox .wx-checkbox-input-disabled {
+		background: #fff !important;
+		border-radius: 50% !important;
+	}
+
+	checkbox .wx-checkbox-input.wx-checkbox-input-checked {
+		background-color: #2468f2;
+		color: #ffffff;
+	}
+
+	.wx-checkbox-input.wx-checkbox-input-checked {
+		border-radius: 50% !important;
+	}
+
+	/* #endif */
+</style>
+
+<style lang="scss" scoped>
+	.loginBox {
+		width: 100%;
+		height: 100vh;
+		box-sizing: border-box;
+		padding: 100px 0 63px 0;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+
+		.logo {
+			width: 150px;
+			height: 150px;
+		}
+
+		.logoText {
+			margin-top: 30px;
+			font-size: 18px;
+		}
+
+		.btnBox {
+			position: relative;
+			width: 526rpx;
+			height: 44px;
+			display: flex;
+			margin-top: auto;
+			margin-bottom: 50px;
+
+			.loginBtn {
+				width: 526rpx;
+				height: 44px;
+				text-align: center;
+				line-height: 44px;
+				color: #ffffff;
+				border-radius: 50px;
+				background-color: #2468f2;
+				font-size: 16px;
+			}
+
+			.isShowGetPhone {
+				position: absolute;
+				top: 0;
+				right: 0;
+				bottom: 0;
+				left: 0;
+				width: 526rpx;
+				height: 44px;
+				line-height: 44px;
+				text-align: center;
+				color: #ffffff;
+				border-radius: 50px;
+				background-color: #2468f2;
+				z-index: 100;
+				font-size: 16px;
+			}
+		}
+
+		.tips {
+			display: flex;
+		}
+
+		.primaryText {
+			color: #2468f2;
+		}
+	}
+</style>

+ 162 - 0
pages/choosePlatform/choosePlatform.vue

@@ -0,0 +1,162 @@
+<template>
+	<view class="mainBox">
+		<view class="contentBox">
+			<image src="../../static/image/logo.png" class="logo"></image>
+			<view class="logoText">
+				快报嗨享平台
+			</view>
+			<view class="logoTextNext">
+				一个好看有用的平台
+			</view>
+			<view class="btnBox">
+				<view class="btn" v-if="isAuth" @click="toManage()">后台管理</view>
+				<view class="btn" @click="toSquare()">快报帮</view>
+				<view class="btn" v-if="isLive" @click="tolive()">打开直播</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapMutations,
+		mapState
+	} from 'vuex';
+	import {
+		findUserAuth
+	} from '../../network/api'
+	export default {
+		data() {
+			return {
+				isAuth: false,
+				isLogin: false,
+				isLive: false,
+				liveId: "sph2Kn7SwRTPGaO"
+			};
+		},
+		mounted() {
+			uni.getChannelsLiveInfo({
+				finderUserName: this.liveId,
+				success: e => {
+					console.log(e.status)
+					this.setDate({
+						isLive: e.status === 2
+					})
+				}
+			})
+		},
+		computed: {
+			...mapState(['userInfo'])
+		},
+		onShow() {
+			let user = null;
+			try {
+				user = JSON.parse(uni.getStorageSync('userInfo'));
+			} catch (e) {
+				//TODO handle the exception
+			}
+			if (user) {
+				this.isLogin = true
+				this.setUserInfo(user);
+				this.findAuth()
+			}
+		},
+		methods: {
+			...mapMutations(['setUserInfo']),
+			async findAuth() {
+				let params = {
+					'mobile': this.userInfo.phone,
+					'departmentId': 1
+				}
+				let res = await findUserAuth(params)
+				console.log(res);
+				if (res.data === true) {
+					this.isAuth = true
+				}
+				// if(res.state == 200) {
+				// 	this.isAuth = res.data
+				// }
+			},
+			toManage() {
+				uni.navigateTo({
+					url: `/pages/managePage/managePage?phone=${this.userInfo.phone}`
+				});
+			},
+			tolive() {
+				uni.openChannelsLive({
+					finderUserName:this.liveId,
+					success(){
+						console.log("success")
+					},
+					fail() {
+						uni.showToast({
+							title: '已取消跳转视频号',
+							duration: 2000,
+							icon: 'none'
+						})
+					}
+				})
+			},
+			toSquare() {
+				if (this.isLogin) {
+					uni.navigateTo({
+						url: '/pages/newsSquare/newsSquare'
+					});
+				} else {
+					uni.navigateTo({
+						url: '/pages/Login/Login?choose=1'
+					});
+				}
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.mainBox {
+		box-sizing: border-box;
+		width: 100%;
+		height: 100vh;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+
+		.contentBox {
+			width: 526rpx;
+			// height: 770rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+
+			.logo {
+				width: 150px;
+				height: 150px;
+			}
+
+			.logoText {
+				margin-top: 30px;
+				font-size: 18px;
+			}
+
+			.logoTextNext {
+				margin-top: 15px;
+				font-size: 14px;
+			}
+
+			.btnBox {
+				margin-top: auto;
+
+				.btn {
+					width: 526rpx;
+					height: 44px;
+					line-height: 40px;
+					background-color: #007aff;
+					color: #ffffff;
+					text-align: center;
+					margin-top: 72rpx;
+					border-radius: 30px;
+				}
+			}
+		}
+	}
+</style>

+ 35 - 0
pages/managePage/managePage.vue

@@ -0,0 +1,35 @@
+<template>
+	<view class="testMain">
+		<web-view :src="webviewSrc"></web-view>
+	</view>
+</template>
+
+<script>
+	import { rsaEncrypt } from '../../utils/rsa.js'
+export default {
+	data() {
+		return {
+			webviewSrc: ''
+		};
+	},
+	onLoad({phone}) {
+		let rsa = rsaEncrypt(phone)
+		let path = `https://brokennews.sxtvs.com.cn/#/clue?phone=${this.urlencode(rsa)}`
+		console.log(path);
+		this.webviewSrc = path
+	},
+	methods: {
+		urlencode (str) {  
+		    str = (str + '').toString();   
+		
+		    return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').  
+		    replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');  
+		}
+	}
+	
+};
+</script>
+
+<style scoped lang="scss">
+	
+</style>

+ 93 - 0
pages/myNews/myNews.vue

@@ -0,0 +1,93 @@
+<!-- 滑动切换选项卡+吸顶演示(上一个tab数据不保留,滚动流畅) -->
+<template>
+	<view class="content">
+		<z-paging ref="paging" refresher-only @onRefresh="onRefresh" :refresher-status.sync="refresherStatus" @scrolltolower="scrolltolower">
+			<view>
+				<!-- 小程序中直接修改组件style为position: sticky;无效,需要在组件外层套一层view -->
+				<view style="z-index: 100;position: sticky;top :0;">
+					<tabs-view @change="tabsChange" :current="current" :items="tabList"></tabs-view>
+				</view>
+				<swiper class="swiper" :style="[{height:swiperHeight+'px'}]" :current="current" @animationfinish="animationfinish">
+					<swiper-item class="swiper-item" v-for="(item, index) in tabList" :key="index">
+						<my-news-list ref="swiperList" :phone="userInfo.phone" :tabIndex="index" :currentIndex="current" @heightChanged="heightChanged">
+						</my-news-list>
+					</swiper-item>
+				</swiper>
+			</view>
+		</z-paging>
+	</view>
+</template>
+
+<script>
+	import { mapState } from 'vuex'
+	export default {
+		data() {
+			return {
+				refresherStatus: 0,
+				swiperHeight: 0,
+				tabList: ['已发布', '待审核'],
+				current: 0, // tabs组件的current值,表示当前活动的tab选项
+			}
+		},
+		computed: {
+			...mapState(['userInfo'])
+		},
+		methods: {
+			//tabs通知swiper切换
+			tabsChange(index) {
+				this._setCurrent(index);
+			},
+			//下拉刷新时,通知当前显示的列表进行reload操作
+			onRefresh(){
+				this.$refs.swiperList[this.current].reload(() => {
+					this.$refs.paging.complete([]);
+				});
+			},
+			//当滚动到底部时,通知当前显示的列表加载更多
+			scrolltolower(){
+				this.$refs.swiperList[this.current].doLoadMore();
+			},
+			// swiper滑动结束
+			animationfinish(e) {
+				let current = e.detail.current;
+				this._setCurrent(current);
+			},
+			//设置swiper的高度
+			heightChanged(height){
+				if(height === 0){
+					//默认swiper高度为屏幕可用高度-tabsView高度-slot="top"内view的高度
+					height = uni.getSystemInfoSync().windowHeight - uni.upx2px(80);
+				}
+				this.swiperHeight = height;
+			},
+			_setCurrent(current){
+				if (current !== this.current){
+					//切换tab时,将上一个tab的数据清空
+					this.$refs.swiperList[this.current].clear();
+				}
+				this.current = current;
+			}
+		}
+	}
+</script>
+
+<style>
+	.banner-view {
+		background-color: #007AFF;
+		color: white;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.paging-content {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+	}
+
+	.swiper {
+		height: 1000px;
+	}
+</style>

+ 269 - 0
pages/newsDetail/newsDetail.vue

@@ -0,0 +1,269 @@
+<template>
+	<view class="main">
+		<view class="popupBottom" v-if="previewModal" @touchmove.stop.prevent="moveStop">
+			<view class="popupSwiperBg" @click="previewModal = false"></view>
+			<view class="swiperDotBox">
+				<swiper class="swiperBox" @change="swiperChange" :current="previewIndex - 1">
+					<swiper-item v-for="(item, index) in detail.clueInfoList" :key="index">
+						<image
+							:src="item.localUrl"
+							class="swiperFileItem"
+							v-if="item.type == '1'"
+							mode="aspectFit"
+							@click="previewModal = false"
+						></image>
+						<video
+							:src="item.localUrl"
+							class="swiperFileItem"
+							:show-fullscreen-btn="false"
+							controls
+						></video>
+						<video
+					</swiper-item>
+				</swiper>
+				<view class="swiperPage">{{ `${previewIndex} / ${detail.clueInfoList.length}` }}</view>
+			</view>
+		</view>
+		<view class="content">
+			<view class="title">{{ formatTitle(detail.title) }}</view>
+			<view class="fileBox">
+				<view class="fileItem" v-for="(item, index) in detail.clueInfoList" :key="index">
+					<image
+						:src="item.localUrl"
+						class="thumbnail"
+						v-if="item.type == '1'"
+						@click="previewFile(index)"
+						mode="aspectFill"
+					></image>
+					<view
+						class="defaultFileItem"
+						v-else-if="item.type == '2'"
+						@click="previewFile(index)"
+					>
+						<image src="../../static/image/video.png" class="thumbnail"></image>
+						<image src="../../static/image/playBtn.png" class="playBtn"></image>
+					</view>
+					<view class="defaultFileItem" v-else @click="previewFile(index)">
+						<image src="../../static/image/music.png" class="thumbnail"></image>
+						<image src="../../static/image/playBtn.png" class="playBtn"></image>
+					</view>
+				</view>
+			</view>
+			<view class="newsTips">
+				<view class="author">{{ formatName(detail.author) }}</view>
+				<view class="time">{{ detail.modifyTime }}</view>
+			</view>
+		</view>
+		<view class="seat"></view>
+		<view class="commentBox" v-if="detail.replies.length > 0">
+			<view class="header">回复信息</view>
+			<view class="commentItem" v-for="item in detail.replies" :key="item.id">
+				<view class="commentTitle">{{ item.content }}</view>
+				<view class="commentTime">{{ item.replyTime }}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { getClueById } from '../../network/api.js';
+export default {
+	data() {
+		return {
+			detail: {
+				title: '',
+				clueInfoList: [],
+				author: '',
+				modifyTime: '',
+				replies: []
+			},
+			previewIndex: 0,
+			previewModal: false
+		};
+	},
+	onLoad: function({ id }) {
+		this.init(id);
+	},
+	methods: {
+		formatName(name, index = 7) {
+			return name.length > index ? name.substring(0, index -1) + '...' : name
+		},
+		formatTitle(title) {
+			const reg = /1(\d{2})\d{4}(\d{4})/g;
+			title = title.replace(reg,"1$1****$2");
+			return title.length > 105 ? title.substring(0, 104) + '...' : title;
+		},
+		async init(id) {
+			let res = await getClueById(id);
+			if (res.data.state == 200) {
+				let data = res.data.data;
+				data.clueInfoList = data.clueInfoList.filter(item => item.type != 0);
+				this.detail = data;
+			}
+		},
+		previewFile(index) {
+			this.previewIndex = index + 1;
+			this.previewModal = true;
+		},
+		moveStop() {},
+		swiperChange(e) {
+			this.previewIndex = e.detail.current + 1;
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.main {
+	.content {
+		box-sizing: border-box;
+		width: 100vw;
+		padding: 0 15px;
+		background-color: #ffffff;
+		.title {
+			margin: 16px 0;
+		}
+		.fileBox {
+			display: flex;
+			flex-wrap: wrap;
+			margin-top: 10px;
+			.fileItem {
+				width: 218rpx;
+				height: 218rpx;
+				background-color: #a5a5a5;
+				position: relative;
+				margin-right: 16rpx;
+				&:nth-child(3n) {
+					margin-right: 0;
+				}
+				&:nth-child(n + 4) {
+					margin-top: 16rpx;
+				}
+				.thumbnail {
+					width: 100%;
+					height: 100%;
+				}
+				.defaultFileItem {
+					position: relative;
+					width: 100%;
+					height: 100%;
+					.playBtn {
+						position: absolute;
+						top: 50%;
+						left: 50%;
+						transform: translate(-50%, -50%);
+						width: 48rpx;
+						height: 48rpx;
+					}
+				}
+			}
+		}
+		.newsTips {
+			margin: 16px 0;
+			font-size: 12px;
+			color: #5c5f66;
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+		}
+	}
+	.seat {
+		height: 8px;
+		width: 100%;
+		background-color: #f7f7f9;
+	}
+	.commentBox {
+		margin-top: 16px;
+		box-sizing: border-box;
+		width: 100vw;
+		padding: 0 15px;
+		background-color: #ffffff;
+		.commentItem {
+			margin-bottom: 10px;
+			border-bottom: 1px solid #e8e9eb;
+			padding: 8px 0;
+			.commentTitle {
+				font-size: 14px;
+				color: #151b26;
+			}
+			.commentTime {
+				font-size: 12px;
+				color: #5c5f66;
+				margin-top: 10px;
+			}
+		}
+	}
+}
+.popupBottom {
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	width: 100vw;
+	height: 100vh;
+	z-index: 100;
+	display: flex;
+	flex-direction: column;
+	.popupBg {
+		position: fixed;
+		left: 0;
+		top: 0;
+		width: 100%;
+		height: 100%;
+		background: rgba(0, 0, 0, 0.5);
+	}
+	.popupContent {
+		height: 40%;
+		margin-top: auto;
+		background-color: #fff;
+		position: relative;
+		z-index: 11;
+	}
+	.popupSwiperBg {
+		position: fixed;
+		left: 0;
+		top: 0;
+		width: 100%;
+		height: 100%;
+		background: rgba(0, 0, 0, 0.5);
+		display: flex;
+		align-items: center;
+	}
+	.swiperDotBox {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		width: 100%;
+		flex-direction: column;
+		.swiperBox {
+			height: 85vh;
+			width: 100%;
+		}
+		.swiperFileItem {
+			width: 100%;
+			height: 100%;
+		}
+		.swiperAudioBox {
+			width: 100%;
+			height: 100%;
+			position: relative;
+		}
+		.swiperAudioItem {
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			transform: translate(-50%, -50%);
+			z-index: 111;
+		}
+		.swiperPage {
+			position: absolute;
+			bottom: 20rpx;
+			width: 100%;
+			height: 30px;
+			text-align: center;
+			line-height: 30px;
+			color: #ffffff;
+		}
+	}
+}
+</style>

+ 290 - 0
pages/newsSquare/newsSquare.vue

@@ -0,0 +1,290 @@
+<template>
+	<view class="content">
+		<view class="addNewsBtn" @click="toPublishPage()">
+			<view class="addIcon">
+				+
+			</view>
+			<view class="addText">
+				帮忙
+			</view>
+		</view>
+		<view class="searchModal" v-show="searchModal">
+			<div class="textTips">
+				<text>搜索历史</text>
+				<image src="../../static/image/del.png" class="del" @click="clearHistory()"></image>
+			</div>
+			<div class="serachBox">
+				<div class="serachItem" @click="searchKey(item)" v-for="(item,index) in historySearch" :key="index">
+					{{ item }}
+				</div>
+			</div>
+		</view>
+		<z-paging
+			ref="paging"
+			refresher-only
+			@onRefresh="onRefresh"
+			:refresher-status.sync="refresherStatus"
+			@scrolltolower="scrolltolower"
+			:auto-hide-loading-after-first-loaded="false"
+			:loading-full-fixed="true"
+			:auto-clean-list-when-reload="false"
+		>
+		<view slot="loading">
+			
+		</view>
+			<!-- 自定义下拉刷新view -->
+			<!-- <custom-refresher slot="refresher" :status="refresherStatus"></custom-refresher> -->
+			<view class="header">
+				<uni-easyinput
+					class="input"
+					prefixIcon="search"
+					placeholder="请输入关键字查询"
+					@focus="inputFocus()"
+					@confirm="inputConfirm()"
+					v-model="keyword"
+					:clearable="false"
+				></uni-easyinput>
+				<view class="myNews" @click="toMyNews">我的求助</view>
+				<view class="closeModalBox" @click="closeSearchModal" v-show="searchModal">
+					取消
+				</view>
+			</view>
+			<view>
+				<view style="z-index: 100;position: sticky;top :44px;">
+					<tabs-view @change="tabsChange" :current="current" :items="tabList"></tabs-view>
+				</view>
+				<swiper
+					class="swiper"
+					:style="[{ height: swiperHeight + 'px' }]"
+					:current="current"
+					@animationfinish="animationfinish"
+				>
+					<swiper-item class="swiper-item" v-for="(item, index) in tabList" :key="index">
+						<news-list
+							ref="swiperList"
+							:tabIndex="index"
+							:currentIndex="current"
+							:title="title"
+							@heightChanged="heightChanged"
+						></news-list>
+					</swiper-item>
+				</swiper>
+			</view>
+		</z-paging>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			refresherStatus: 0,
+			swiperHeight: 0,
+			tabList: ['发布', '热线电话', '嗨享'],
+			current: 0 ,// tabs组件的current值,表示当前活动的tab选项
+			searchModal: false,
+			historySearch: [],
+			title: '',
+			keyword: ''
+		};
+	},
+	methods: {
+		toPublishPage() {
+			uni.navigateTo({
+				url: '../publishNews/publishNews'
+			})
+		},
+		toMyNews() {
+			uni.navigateTo({
+				url: '/pages/myNews/myNews'
+			})
+		},
+		clearHistory() {
+			uni.removeStorageSync('historySearch');
+			this.historySearch = []
+		},
+		inputConfirm(e) {
+			this.title = e
+			let historyArr = JSON.parse(JSON.stringify(this.historySearch))
+			if(historyArr.length >= 8) {
+				historyArr.pop(1)
+			}
+			historyArr.unshift(e)
+			historyArr = [...new Set(historyArr)]
+			this.historySearch = historyArr
+			this.$nextTick(() => {
+				this.onRefresh()
+			})
+			uni.setStorageSync('historySearch', JSON.stringify(this.historySearch));
+			this.closeSearchModal()
+		},
+		searchKey(e) {
+			this.title = e
+			this.keyword = e
+			this.$nextTick(() => {
+				this.onRefresh()
+			})
+			this.closeSearchModal()
+		},
+		inputFocus() {
+			try{
+				let searchStr = uni.getStorageSync('historySearch')
+				this.historySearch = searchStr ? JSON.parse(searchStr) : []
+			}catch(e){
+				this.historySearch = []
+			}
+			this.searchModal = true
+		},
+		closeSearchModal() {
+			this.searchModal = false
+		},
+		//tabs通知swiper切换
+		tabsChange(index) {
+			this._setCurrent(index);
+		},
+		//下拉刷新时,通知当前显示的列表进行reload操作
+		onRefresh() {
+			this.$refs.swiperList[this.current].reload(() => {
+				this.$refs.paging.complete([]);
+			});
+		},
+		//当滚动到底部时,通知当前显示的列表加载更多
+		scrolltolower() {
+			this.$refs.swiperList[this.current].doLoadMore();
+		},
+		// swiper滑动结束
+		animationfinish(e) {
+			let current = e.detail.current;
+			this._setCurrent(current);
+		},
+		//设置swiper的高度
+		heightChanged(height) {
+			if (height === 0) {
+				//默认swiper高度为屏幕可用高度-tabsView高度-slot="top"内view的高度
+				height = uni.getSystemInfoSync().windowHeight - uni.upx2px(80);
+			}
+			this.swiperHeight = height;
+		},
+		_setCurrent(current) {
+			if (current !== this.current) {
+				//切换tab时,将上一个tab的数据清空
+				this.$refs.swiperList[this.current].clear();
+			}
+			this.current = current;
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.loadingBox{
+	width: 100%;
+	height: 100%;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	background-color: red;
+}
+	.addNewsBtn{
+		position: fixed;
+		width: 56px;
+		height: 56px;
+		right: 15px;
+		border-radius: 50%;
+		background-color: #3466EB;
+		color: #FFFFFF;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		bottom: 150px;
+		// background-image: url('../../static/image/addNews.png');
+		// background-position: center;
+		// background-repeat: no-repeat;
+		// background-size: 120%;
+		z-index: 150;
+		.addIcon{
+			font-size: 30px;
+			line-height: 30px;
+		}
+		.addText{
+			font-size: 12px;
+		}
+	}
+	.searchModal{
+		position: absolute;
+		top: 44px;
+		right: 0;
+		bottom: 0;
+		left: 0;
+		z-index: 200;
+		background-color: #fff;
+		box-sizing: border-box;
+		padding: 0 15px;
+		.textTips{
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			margin-top: 15px;
+			.del{
+				width: 32rpx;
+				height: 32rpx;
+			}
+		}
+		.serachBox{
+			display: flex;
+			flex-wrap: wrap;
+			.serachItem{
+				margin-top: 20px;
+				padding: 8rpx 16rpx;
+				max-width: 100%;
+				overflow: hidden;
+				text-overflow: ellipsis;
+			}
+		}
+	}
+.header {
+	width: 100%;
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	box-sizing: border-box;
+	padding: 0 15px;
+	height: 44px;
+	position: sticky;
+	z-index: 100;
+	background-color: #FFFFFF;
+	top: 0;
+	.myNews {
+	}
+	.closeModalBox{
+		position: absolute;
+		right: 15px;
+		width: 150rpx;
+		background-color: #fff;
+		height: 44px;
+		line-height: 44px;
+		text-align: right;
+	}
+	.input{
+		width: 526rpx;
+	}
+}
+.banner-view {
+	background-color: #007aff;
+	color: white;
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+}
+
+.paging-content {
+	flex: 1;
+	display: flex;
+	flex-direction: column;
+}
+
+.swiper {
+	height: 1000px;
+}
+</style>

+ 81 - 0
pages/privacyPolicy/privacyPolicy.vue

@@ -0,0 +1,81 @@
+<template>
+	<view class="main">
+		<view class="content">
+本应用非常重视用户隐私政策并严格遵守相关的法律规定。请您仔细阅读《隐私政策》后再继续使用。如果您继续使用我们的服务,表示您已经充分阅读和理解我们协议的全部内容。
+
+本小程序尊重并保护所有使用服务用户的个人隐私权。为了给您提供更准确、更优质的服务,本应用会按照本隐私权政策的规定使用和披露您的个人信息。除本隐私权政策另有规定外,在未征得您事先许可的情况下,本应用不会将这些信息对外披露或向第三方提供。本应用会不时更新本隐私权政策。 您在同意本应用服务使用协议之时,即视为您已经同意本隐私权政策全部内容。
+
+1. 适用范围
+
+(a) 在您注册本应用小程序帐号时,您根据小程序要求提供的个人注册信息;
+
+(b) 在您使用本应用网络服务,或访问本应用平台网页时,本应用自动接收并记录的您的浏览器和计算机上的信息,包括但不限于您的IP地址、浏览器的类型、使用的语言、访问日期和时间、软硬件特征信息及您需求的网页记录等数据;
+
+(c) 本应用通过合法途径从商业伙伴处取得的用户个人数据。
+
+(d)本应用严禁用户发布不良信息,如裸露、色情和亵渎内容,发布的内容我们会进行审核,一经发现不良信息,会禁用该用户的所有权限,予以封号处理。
+
+2. 信息使用
+
+(a)本应用不会向任何无关第三方提供、出售、出租、分享或交易您的个人登录信息。如果我们存储发生维修或升级,我们会事先发出推送消息来通知您,请您提前允许本应用消息通知。
+
+(b) 本应用亦不允许任何第三方以任何手段收集、编辑、出售或者无偿传播您的个人信息。任何本应用平台用户如从事上述活动,一经发现,本应用有权立即终止与该用户的服务协议。
+
+(c) 为服务用户的目的,本应用可能通过使用您的个人信息,向您提供您感兴趣的信息,包括但不限于向您发出产品和服务信息,或者与本应用合作伙伴共享信息以便他们向您发送有关其产品和服务的信息(后者需要您的事先同意)
+
+3. 信息披露
+
+在如下情况下,本应用将依据您的个人意愿或法律的规定全部或部分的披露您的个人信息:
+
+(a) 未经您事先同意,我们不会向第三方披露;
+
+(b)为提供您所要求的产品和服务,而必须和第三方分享您的个人信息;
+
+(c) 根据法律的有关规定,或者行政或司法机构的要求,向第三方或者行政、司法机构披露;
+
+(d) 如您出现违反中国有关法律、法规或者本应用服务协议或相关规则的情况,需要向第三方披露;
+
+(e) 如您是适格的知识产权投诉人并已提起投诉,应被投诉人要求,向被投诉人披露,以便双方处理可能的权利纠纷;
+
+4. 信息存储和交换
+
+本应用收集的有关您的信息和资料将保存在本应用及(或)其关联公司的服务器上,这些信息和资料可能传送至您所在国家、地区或本应用收集信息和资料所在地的境外并在境外被访问、存储和展示。
+
+5. Cookie的使用
+
+(a) 在您未拒绝接受cookies的情况下,本应用会在您的计算机上设定或取用cookies,以便您能登录或使用依赖于cookies的本应用平台服务或功能。本应用使用cookies可为您提供更加周到的个性化服务,包括推广服务。
+
+(b) 您有权选择接受或拒绝接受cookies。您可以通过修改浏览器设置的方式拒绝接受cookies。但如果您选择拒绝接受cookies,则您可能无法登录或使用依赖于cookies的本应用网络服务或功能。
+
+(c) 通过本应用所设cookies所取得的有关信息,将适用本政策。
+
+6.本隐私政策的更改
+
+(a)如果决定更改隐私政策,我们会在本政策中、本公司网站中以及我们认为适当的位置发布这些更改,以便您了解我们如何收集、使用您的个人信息,哪些人可以访问这些信息,以及在什么情况下我们会透露这些信息。
+
+(b)本公司保留随时修改本政策的权利,因此请经常查看。如对本政策作出重大更改,本公司会通过网站通知的形式告知。
+
+方披露自己的个人信息,如联络方式或者邮政地址。请您妥善保护自己的个人信息,仅在必要的情形下向他人提供。如您发现自己的个人信息泄密,尤其是本应用用户名及密码发生泄露,请您立即联络本应用客服,以便本应用采取相应措施。
+
+感谢您花时间了解我们的隐私政策!我们将尽全力保护您的个人信息和合法权益,再次感谢您的信任!
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {};
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+	.main{
+		box-sizing: border-box;
+		padding: 15px;
+		.content {
+			white-space: pre-wrap;
+		}
+	}
+</style>

+ 592 - 0
pages/publishNews/publishNews.vue

@@ -0,0 +1,592 @@
+<template>
+	<view class="publishMain" :style="{ paddingTop: barHeight + 'px' }">
+<!-- 		<uni-popup ref="addressPopup" background-color="#fff">
+			<view class="popup-content">
+				<LocalSearch
+					@changeAddress="changeAddress"
+					@closeSelectAddress="closeSelectAddress"
+					ref="localRef"
+				></LocalSearch>
+			</view>
+		</uni-popup> -->
+		<page-container :show='pageContainerShow' :overlay="pageContainerOverlay" position='right' @beforeleave='afterenter' ref="addressPopup" background-color="#fff">
+			<view class="popup-content">
+				<LocalSearch
+					@changeAddress="changeAddress"
+					@closeSelectAddress="closeSelectAddress"
+					ref="localRef"
+				></LocalSearch>
+			</view>
+		</page-container>
+		<view class="content">
+			<uni-easyinput type="textarea" v-model="formDatas.title" placeholder="来点内容吧..." />
+			<view class="fileBox">
+				<view class="fileItem" v-for="(item, index) in fileList" :key="index">
+					<image
+						src="../../static/image/delete.png"
+						@click="deleteFiles(index)"
+						class="deleteFile"
+					></image>
+					<image
+						:src="item.materialUrl"
+						class="thumbnail"
+						v-if="item.fileType === 'image'"
+						@click="previewFile(index)"
+						mode="aspectFill"
+					></image>
+					<view
+						class="defaultFileItem"
+						v-else-if="item.fileType === 'video'"
+						@click="previewFile(index)"
+					>
+						<image src="../../static/image/video.png" class="thumbnail"></image>
+						<image src="../../static/image/playBtn.png" class="playBtn"></image>
+					</view>
+					<view class="defaultFileItem" v-else @click="previewFile(index)">
+						<image src="../../static/image/music.png" class="thumbnail"></image>
+						<image src="../../static/image/playBtn.png" class="playBtn"></image>
+					</view>
+				</view>
+				<view class="fileItem addFileBtn" v-if="fileList.length < 9" @click="addFile"></view>
+			</view>
+			<view class="formBox">
+				<view class="phoneBox">
+					<view class="label">
+						手机号
+					</view>
+					<view class="textRight">
+						{{ phone }}
+					</view>
+				</view>
+				<uni-forms id="publishForm" ref="valiForm" :rules="rules" :modelValue="formDatas">
+					<uni-forms-item label="地点" required name="tipAddress">
+						<view class="selectInputBox" @click="openSelectAddress">
+							<text :class="formDatas.tipAddress == '' ? 'addressNoText' : ''">
+								{{ formatAddress(formDatas.tipAddress) || '请选择' }}
+							</text>
+							<text class="rightIcon">{{ '>' }}</text>
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="昵称" required name="tipUsername">
+						<uni-easyinput  type="nickname" v-model="formDatas.tipUsername" placeholder="请输入" class="textRight" />
+					</uni-forms-item>
+					<!-- <uni-forms-item label="发布部门" required name="ascriptionName">
+						<view class="selectInputBox" @click="openAscriptionAction">
+							<text>{{ formDatas.ascriptionName }}</text>
+							<text class="rightIcon">{{ '>' }}</text>
+						</view>
+					</uni-forms-item> -->
+				</uni-forms>
+			</view>
+		</view>
+		<view class="publishBtn" @click="publishNews()">发布</view>
+		<view class="popupBottom" v-if="isshowAudio" @touchmove.stop.prevent="moveStop">
+			<view class="popupBg" @click="isshowAudio = false"></view>
+			<view class="popupContent">
+				<sound-recording
+					:maximum="15"
+					:duration="100"
+					@cancel="isshowAudio = false"
+					@confirm="uploadFile"
+				></sound-recording>
+			</view>
+		</view>
+
+		<view class="popupBottom" v-if="previewModal" @touchmove.stop.prevent="moveStop">
+			<view class="popupSwiperBg" @click="previewModal = false"></view>
+			<view class="swiperDotBox">
+				<swiper class="swiperBox" @change="swiperChange" :current="previewIndex - 1">
+					<swiper-item v-for="(item, index) in fileList" :key="index">
+						<image
+							:src="item.materialUrl"
+							class="swiperFileItem"
+							v-if="item.fileType === 'image'"
+							mode="aspectFit"
+							@click="previewModal = false"
+						></image>
+						<video
+							:src="item.materialUrl"
+							class="swiperFileItem"
+							:show-fullscreen-btn="false"
+							controls
+						></video>
+						<video
+					</swiper-item>
+				</swiper>
+				<view class="swiperPage">{{ `${previewIndex} / ${fileList.length}` }}</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { saveClue, uploadMediaFile } from '../../network/api.js';
+import { LocalSearch } from '../../components/localSearch/localSearch.vue';
+import { mapState, mapMutations } from 'vuex';
+export default {
+	components: {
+		LocalSearch
+	},
+	computed: {
+		...mapState(['userInfo'])
+	},
+	data() {
+		return {
+			phone: '',
+			previewIndex: 0,
+			previewModal: false,
+			isSubmitForm: true,
+			isshowAudio: false,
+			fileList: [],
+			formDatas: {
+				title: '', //标题
+				tipAddress: '', //地址
+				tipUsername: '', //昵称
+				// ascription: 1,
+				// ascriptionName: '都市快报'
+			},
+			barHeight: uni.getSystemInfoSync().statusBarHeight,
+			rules: {
+				tipAddress: {
+					rules: [
+						{
+							required: true,
+							errorMessage: '请选择地点'
+						}
+					]
+				},
+				tipUsername: {
+					rules: [
+						{
+							required: true,
+							errorMessage: '昵称不能为空'
+						}
+					]
+				}
+			},
+			pageContainerShow:false,
+			pageContainerOverlay:false
+		};
+	},
+	mounted() {
+		this.phone = this.userInfo.phone
+		this.formDatas.tipUsername = this.userInfo.name
+		this.$refs.valiForm.setValue('tipUsername', this.userInfo.name)
+	},
+	methods: {
+		...mapMutations(['setUserInfo']),
+		deleteFiles(index) {
+			this.fileList.splice(index, 1);
+		},
+		swiperChange(e) {
+			this.previewIndex = e.detail.current + 1;
+		},
+		previewFile(index) {
+			this.previewIndex = index + 1;
+			this.previewModal = true;
+		},
+		moveStop() {},
+		openAscriptionAction() {
+			let action = ['都市快报', '第一新闻热线', '管理中心'];
+			uni.showActionSheet({
+				itemList: action,
+				success: res => {
+					this.formDatas.ascription = res.tapIndex + 1;
+					this.formDatas.ascriptionName = action[res.tapIndex];
+				}
+			});
+		},
+		addFile() {
+			let action = ['图片', '视频', '音频'];
+			uni.showActionSheet({
+				itemList: action,
+				success: res => {
+					let actionMethods = ['photo', 'video', 'audio'];
+					this[actionMethods[res.tapIndex]]();
+				}
+			});
+		},
+		photo() {
+			uni.chooseImage({
+				success: res => {
+					console.log(res);
+					this.uploadFiles(res.tempFilePaths, 'image');
+				}
+			});
+		},
+		video() {
+			uni.chooseMedia({
+				count: 9,
+				mediaType: ['image', 'video'],
+				maxDuration: 60,
+				camera: 'back',
+				success: res => {
+					console.log(res);
+					this.uploadFiles(res.tempFiles, 'video');
+				}
+			});
+		},
+		videoCompress(tempFilePath) {
+			return new Promise((resolve, reject) => {
+				uni.compressVideo({
+					src: tempFilePath,
+					quality: 'medium', //'low':低,'medium':中,'high':高
+					success: res => {
+						console.log('压缩后', res);
+						resolve(res.tempFilePath);
+					},
+					fail: err => {
+						reject(err);
+					}
+				});
+			});
+		},
+		async uploadFiles(file, type) {
+			console.log(file);
+			for (let i = 0; i < file.length; i++) {
+				if (this.fileList.length >= 9) {
+					uni.showToast({
+						title: '已上传九个素材,无法再上传!',
+						duration: 1000,
+						icon: 'none'
+					});
+					break;
+				}
+				let path = file[i];
+				if (type == 'video') {
+					path = await this.videoCompress(path.tempFilePath).catch(err => {
+						console.log(err);
+						uni.showToast({
+							title: err,
+							duration: 1000
+						});
+					});
+				}
+				if (!path) continue;
+				let mediaType = {
+					image: {
+						type: 1,
+						fileType: 'image'
+					},
+					video: {
+						type: 2,
+						fileType: 'video'
+					},
+					audio: {
+						type: 3,
+						fileType: 'voice'
+					},
+				};
+				let params = {
+					filePath: path,
+					formData: {
+						mediaType: mediaType[type].fileType
+					},
+					fileType: type
+				};
+				let result = await uploadMediaFile(params);
+				if (result.state === 200) {
+					this.fileList.push({
+						materialUrl: result.data,
+						fileType: type,
+						type: mediaType[type].type
+					});
+				} else {
+					uni.showToast({
+						title: '上传失败!',
+						duration: 1000,
+						icon: 'error'
+					});
+				}
+			}
+		},
+		audio() {
+			this.isshowAudio = true;
+		},
+		uploadFile(tempFilePath) {
+			this.uploadFiles([tempFilePath], 'audio');
+			this.isshowAudio = false;
+		},
+		afterenter(){
+			this.pageContainerShow = false
+			this.pageContainerOverlay = false
+		},
+		openSelectAddress() {
+			// this.$refs.addressPopup.open('bottom');
+			this.pageContainerShow = true
+			this.pageContainerOverlay = true
+		},
+		closeSelectAddress() {
+			// this.$refs.addressPopup.close();
+			this.pageContainerShow = false
+			this.pageContainerOverlay = false
+		},
+		changeAddress(text) {
+			this.formDatas.tipAddress = text;
+			this.$refs.valiForm.setValue('tipAddress', text);
+			this.closeSelectAddress();
+		},
+		back() {
+			uni.navigateBack();
+		},
+		publishNews() {
+			if (!this.isSubmitForm) return;
+			this.$refs.valiForm
+				.validate(async (err, formData) => {
+					if (!err) {
+						console.log('success', formData);
+						this.formDatas.title = this.formDatas.title.trim();
+						if (this.formDatas.title.length === 0) {
+							uni.showToast({
+								title: '内容不能为空',
+								duration: 2000,
+								icon: 'none'
+							});
+							return;
+						}
+						this.isSubmitForm = false;
+						let params = {
+							ascription: 1,
+							source: 4,
+							title: this.formDatas.title,
+							phone: this.userInfo.phone,
+							address: formData.tipAddress,
+							author: formData.tipUsername,
+							clueInfoList: this.fileList
+						};
+						let res = await saveClue(params);
+						if (res.data.state === 200) {
+							uni.showToast({
+								duration: 2000,
+								title: '发布成功!',
+								icon: 'success'
+							});
+							
+							let userInfos = Object.assign({}, this.userInfo)
+							userInfos.name = formData.tipUsername
+							this.setUserInfo(userInfos)
+							uni.setStorageSync('userInfo', JSON.stringify(userInfos))
+							
+							this.formDatas = this.$options.data().formDatas;
+							this.fileList = [];
+							this.$refs.localRef.initIndex()
+							this.$refs.valiForm.resetFields();
+							this.formDatas.tipUsername = this.userInfo.name
+							this.$refs.valiForm.setValue('tipUsername', this.userInfo.name)
+						} else {
+							uni.showToast({
+								duration: 2000,
+								title: res.data.message,
+								icon: 'none'
+							});
+						}
+						this.isSubmitForm = true;
+					}
+				})
+				.then(res => {
+					// res 返回 null
+					uni.showToast({
+						title: res,
+						icon: 'none'
+					})
+				});
+		},
+		formatAddress(item) {
+			return item.length > 8 ? item.substring(0, 7) + '...' : item;
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.publishMain {
+	box-sizing: border-box;
+	padding: 0 32rpx 32rpx 32rpx;
+	width: 100%;
+	.header {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		height: 49px;
+	}
+	.content {
+		.fileBox {
+			display: flex;
+			flex-wrap: wrap;
+			margin-top: 10px;
+			.fileItem {
+				width: 218rpx;
+				height: 218rpx;
+				background-color: #a5a5a5;
+				position: relative;
+				margin-right: 16rpx;
+				&:nth-child(3n) {
+					margin-right: 0;
+				}
+				&:nth-child(n + 4) {
+					margin-top: 16rpx;
+				}
+				.thumbnail {
+					width: 100%;
+					height: 100%;
+				}
+				.defaultFileItem {
+					position: relative;
+					width: 100%;
+					height: 100%;
+					.playBtn {
+						position: absolute;
+						top: 50%;
+						left: 50%;
+						transform: translate(-50%, -50%);
+						width: 48rpx;
+						height: 48rpx;
+					}
+				}
+				.deleteFile {
+					width: 20px;
+					height: 20px;
+					position: absolute;
+					top: 0;
+					right: 0;
+					z-index: 10;
+				}
+			}
+			.addFileBtn {
+				background-image: url(../../static/image/addFile.png);
+				background-position: center center;
+				background-repeat: no-repeat;
+				background-color: #ffffff;
+				background-size: 100%;
+			}
+		}
+		.formBox {
+			margin-top: 56rpx;
+			.phoneBox{
+				display: flex;
+				padding-bottom: 22px;
+				justify-content: space-between;
+				.label{
+					font-size: 13px;
+					color: #666666;
+					padding-left: 5px;
+					position: relative;
+					&::before{
+						content: '*';
+						position: absolute;
+						left: -1px;
+						top: 0;
+						color: red;
+					}
+				}
+			}
+			.textRight {
+				/deep/.is-input-border {
+					border: none;
+					text-align: right;
+				}
+				/deep/.is-disabled {
+					background-color: #ffffff !important;
+				}
+			}
+			.selectInputBox {
+				height: 100%;
+				display: flex;
+				justify-content: flex-end;
+				align-items: center;
+				.rightIcon {
+					margin-left: 16rpx;
+				}
+				.addressNoText {
+					color: #d5d5d5;
+				}
+			}
+		}
+	}
+	.popup-content {
+		height: 100vh;
+	}
+	.publishBtn {
+		width: 686rpx;
+		height: 44px;
+		line-height: 44px;
+		text-align: center;
+		margin: 15px auto 0 auto;
+		background-color: #007aff;
+		border-radius: 8px;
+		color: #ffffff;
+	}
+	.popupBottom {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		height: 100%;
+		z-index: 100;
+		display: flex;
+		flex-direction: column;
+		.popupBg {
+			position: fixed;
+			left: 0;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			background: rgba(0, 0, 0, 0.5);
+		}
+		.popupContent {
+			height: 40%;
+			margin-top: auto;
+			background-color: #fff;
+			position: relative;
+			z-index: 11;
+		}
+		.popupSwiperBg {
+			position: fixed;
+			left: 0;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			background: rgba(0, 0, 0, 0.5);
+			display: flex;
+			align-items: center;
+		}
+		.swiperDotBox {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			width: 100%;
+			flex-direction: column;
+			.swiperBox {
+				height: 85vh;
+				width: 100%;
+			}
+			.swiperFileItem {
+				width: 100%;
+				height: 100%;
+			}
+			.swiperAudioBox {
+				width: 100%;
+				height: 100%;
+				position: relative;
+			}
+			.swiperAudioItem {
+				position: absolute;
+				top: 50%;
+				left: 50%;
+				transform: translate(-50%, -50%);
+				z-index: 111;
+			}
+			.swiperPage {
+				position: absolute;
+				bottom: 20rpx;
+				width: 100%;
+				height: 30px;
+				text-align: center;
+				line-height: 30px;
+				color: #ffffff;
+			}
+		}
+	}
+}
+</style>

+ 62 - 0
pages/test/test.vue

@@ -0,0 +1,62 @@
+<template>
+	<view class="squareBox">
+		 <z-paging ref="paging" v-model="dataList" @query="queryList">
+			<view class="header">
+				<uni-easyinput
+					prefixIcon="search"
+					placeholder="请输入关键字查询"
+					@focus="inputFocus()"
+				></uni-easyinput>
+				<view class="myNews">
+					我的报料
+				</view>
+			</view>
+				<view class="item" v-for="(item,index) in dataList">
+						<view class="item-title">{{item.title}}</view>
+				</view>
+		</z-paging>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			keyWord: '',
+			dataList: []
+		};
+	},
+	methods: {
+		queryList() {
+			
+		},
+		inputFocus() {
+			
+		},
+		initData() {
+			
+		}
+	},
+	mounted() {
+		this.dataList = new Array(10).fill({
+			title: '123455'
+		})
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+	.squareBox{
+		.header{
+			width: 100%;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;	
+			box-sizing: border-box;
+			padding: 0 15px;
+			.myNews{
+				
+			}
+		}
+	}
+</style>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 3 - 0
pages/userAgreement/userAgreement.vue


+ 0 - 0
static/css/reset.css


BIN
static/image/addFile.png


BIN
static/image/addNews.png


BIN
static/image/checked.png


BIN
static/image/del.png


BIN
static/image/delete.png


BIN
static/image/logo.png


BIN
static/image/logos.png


BIN
static/image/moment.png


BIN
static/image/music.png


BIN
static/image/playBtn.png


BIN
static/image/video.png


BIN
static/jsfun-record/confirm.png


BIN
static/jsfun-record/play.png


BIN
static/jsfun-record/recording.png


BIN
static/jsfun-record/stop.png


BIN
static/sound-recording/pause.png


BIN
static/sound-recording/play.png


BIN
static/sound-recording/voice.png


+ 18 - 0
store/index.js

@@ -0,0 +1,18 @@
+import Vue from "vue";
+import Vuex from "vuex";
+
+Vue.use(Vuex);
+const files = require.context("./modules", false, /\.js$/);
+let modules = {
+	state: {},
+	mutations: {},
+	actions: {}
+};
+
+files.keys().forEach((key) => {
+  Object.assign(modules.state, files(key)["state"]);
+  Object.assign(modules.mutations, files(key)["mutations"]);
+  Object.assign(modules.actions, files(key)["actions"]);
+});
+const store = new Vuex.Store(modules);
+export default store;

+ 22 - 0
store/modules/user.js

@@ -0,0 +1,22 @@
+export const state = {
+    //用户数据
+    userInfo: {
+			phone: '',
+			name: ''
+		},
+};
+export const mutations = {
+    //储存用户信息
+    setUserInfo(state, data) {
+        if (data) {
+            state.userInfo =  Object.assign({}, state.userInfo,data);
+        }
+    },
+    emptyUserInfo(state) {
+        state.userInfo = {};
+    },
+    // 退出A
+};
+export const actions = {
+
+};

+ 76 - 0
uni.scss

@@ -0,0 +1,76 @@
+/**
+ * 这里是uni-app内置的常用样式变量
+ *
+ * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
+ * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
+ *
+ */
+
+/**
+ * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
+ *
+ * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
+ */
+
+/* 颜色变量 */
+
+/* 行为相关颜色 */
+$uni-color-primary: #007aff;
+$uni-color-success: #4cd964;
+$uni-color-warning: #f0ad4e;
+$uni-color-error: #dd524d;
+
+/* 文字基本颜色 */
+$uni-text-color:#333;//基本色
+$uni-text-color-inverse:#fff;//反色
+$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
+$uni-text-color-placeholder: #808080;
+$uni-text-color-disable:#c0c0c0;
+
+/* 背景颜色 */
+$uni-bg-color:#ffffff;
+$uni-bg-color-grey:#f8f8f8;
+$uni-bg-color-hover:#f1f1f1;//点击状态颜色
+$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
+
+/* 边框颜色 */
+$uni-border-color:#c8c7cc;
+
+/* 尺寸变量 */
+
+/* 文字尺寸 */
+$uni-font-size-sm:12px;
+$uni-font-size-base:14px;
+$uni-font-size-lg:16;
+
+/* 图片尺寸 */
+$uni-img-size-sm:20px;
+$uni-img-size-base:26px;
+$uni-img-size-lg:40px;
+
+/* Border Radius */
+$uni-border-radius-sm: 2px;
+$uni-border-radius-base: 3px;
+$uni-border-radius-lg: 6px;
+$uni-border-radius-circle: 50%;
+
+/* 水平间距 */
+$uni-spacing-row-sm: 5px;
+$uni-spacing-row-base: 10px;
+$uni-spacing-row-lg: 15px;
+
+/* 垂直间距 */
+$uni-spacing-col-sm: 4px;
+$uni-spacing-col-base: 8px;
+$uni-spacing-col-lg: 12px;
+
+/* 透明度 */
+$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
+
+/* 文章场景相关 */
+$uni-color-title: #2C405A; // 文章标题颜色
+$uni-font-size-title:20px;
+$uni-color-subtitle: #555555; // 二级标题颜色
+$uni-font-size-subtitle:26px;
+$uni-color-paragraph: #3F536E; // 文章段落颜色
+$uni-font-size-paragraph:15px;

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

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

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

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

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

@@ -0,0 +1,88 @@
+{
+  "id": "uni-badge",
+  "displayName": "uni-badge 数字角标",
+  "version": "1.2.0",
+  "description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。",
+  "keywords": [
+    "",
+    "badge",
+    "uni-ui",
+    "uniui",
+    "数字角标",
+    "徽章"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "y",
+          "联盟": "y"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@@ -0,0 +1,88 @@
+{
+  "id": "uni-calendar",
+  "displayName": "uni-calendar 日历",
+  "version": "1.4.5",
+  "description": "日历组件",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "日历",
+    "",
+    "打卡",
+    "日历选择"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

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

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

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

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

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

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

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

@@ -0,0 +1,90 @@
+{
+  "id": "uni-card",
+  "displayName": "uni-card 卡片",
+  "version": "1.3.1",
+  "description": "Card 组件,提供常见的卡片样式。",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "card",
+    "",
+    "卡片"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [
+			"uni-icons",
+			"uni-scss"
+		],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

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

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

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

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

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

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

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

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

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

@@ -0,0 +1,89 @@
+{
+  "id": "uni-collapse",
+  "displayName": "uni-collapse 折叠面板",
+  "version": "1.4.3",
+  "description": "Collapse 组件,可以折叠 / 展开的内容区域。",
+  "keywords": [
+    "uni-ui",
+    "折叠",
+    "折叠面板",
+    "手风琴"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [
+			"uni-scss",
+      "uni-icons"
+    ],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

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

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

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

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

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

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

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

@@ -0,0 +1,90 @@
+{
+  "id": "uni-combox",
+  "displayName": "uni-combox 组合框",
+  "version": "1.0.1",
+  "description": "可以选择也可以输入的表单项 ",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "combox",
+    "组合框",
+    "select"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [
+			"uni-scss",
+			"uni-icons"
+		],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "n"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

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

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

+ 24 - 0
uni_modules/uni-countdown/changelog.md

@@ -0,0 +1,24 @@
+## 1.2.2(2022-01-19)
+- 修复 在微信小程序中样式不生效的bug
+## 1.2.1(2022-01-18)
+- 新增 update 方法 ,在动态更新时间后,刷新组件
+## 1.2.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-countdown](https://uniapp.dcloud.io/component/uniui/uni-countdown)
+## 1.1.3(2021-10-18)
+- 重构
+- 新增 font-size 支持自定义字体大小
+## 1.1.2(2021-08-24)
+- 新增 支持国际化
+## 1.1.1(2021-07-30)
+- 优化 vue3下小程序事件警告的问题
+## 1.1.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.0.5(2021-06-18)
+- 修复 uni-countdown 重复赋值跳两秒的 bug
+## 1.0.4(2021-05-12)
+- 新增 组件示例地址
+## 1.0.3(2021-05-08)
+- 修复 uni-countdown 不能控制倒计时的 bug
+## 1.0.2(2021-02-04)
+- 调整为uni_modules目录规范

+ 6 - 0
uni_modules/uni-countdown/components/uni-countdown/i18n/en.json

@@ -0,0 +1,6 @@
+{
+	"uni-countdown.day": "day",
+	"uni-countdown.h": "h",
+	"uni-countdown.m": "m",
+	"uni-countdown.s": "s"
+}

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

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

+ 6 - 0
uni_modules/uni-countdown/components/uni-countdown/i18n/zh-Hans.json

@@ -0,0 +1,6 @@
+{
+	"uni-countdown.day": "天",
+	"uni-countdown.h": "时",
+	"uni-countdown.m": "分",
+	"uni-countdown.s": "秒"
+}

+ 6 - 0
uni_modules/uni-countdown/components/uni-countdown/i18n/zh-Hant.json

@@ -0,0 +1,6 @@
+{
+	"uni-countdown.day": "天",
+	"uni-countdown.h": "時",
+	"uni-countdown.m": "分",
+	"uni-countdown.s": "秒"
+}

+ 271 - 0
uni_modules/uni-countdown/components/uni-countdown/uni-countdown.vue

@@ -0,0 +1,271 @@
+<template>
+	<view class="uni-countdown">
+		<text v-if="showDay" :style="[timeStyle]" class="uni-countdown__number">{{ d }}</text>
+		<text v-if="showDay" :style="[splitorStyle]" class="uni-countdown__splitor">{{dayText}}</text>
+		<text :style="[timeStyle]" class="uni-countdown__number">{{ h }}</text>
+		<text :style="[splitorStyle]" class="uni-countdown__splitor">{{ showColon ? ':' : hourText }}</text>
+		<text :style="[timeStyle]" class="uni-countdown__number">{{ i }}</text>
+		<text :style="[splitorStyle]" class="uni-countdown__splitor">{{ showColon ? ':' : minuteText }}</text>
+		<text :style="[timeStyle]" class="uni-countdown__number">{{ s }}</text>
+		<text v-if="!showColon" :style="[splitorStyle]" class="uni-countdown__splitor">{{secondText}}</text>
+	</view>
+</template>
+<script>
+	import {
+		initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from './i18n/index.js'
+	const {
+		t
+	} = initVueI18n(messages)
+	/**
+	 * Countdown 倒计时
+	 * @description 倒计时组件
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=25
+	 * @property {String} backgroundColor 背景色
+	 * @property {String} color 文字颜色
+	 * @property {Number} day 天数
+	 * @property {Number} hour 小时
+	 * @property {Number} minute 分钟
+	 * @property {Number} second 秒
+	 * @property {Number} timestamp 时间戳
+	 * @property {Boolean} showDay = [true|false] 是否显示天数
+	 * @property {Boolean} show-colon = [true|false] 是否以冒号为分隔符
+	 * @property {String} splitorColor 分割符号颜色
+	 * @event {Function} timeup 倒计时时间到触发事件
+	 * @example <uni-countdown :day="1" :hour="1" :minute="12" :second="40"></uni-countdown>
+	 */
+	export default {
+		name: 'UniCountdown',
+		emits: ['timeup'],
+		props: {
+			showDay: {
+				type: Boolean,
+				default: true
+			},
+			showColon: {
+				type: Boolean,
+				default: true
+			},
+			start: {
+				type: Boolean,
+				default: true
+			},
+			backgroundColor: {
+				type: String,
+				default: ''
+			},
+			color: {
+				type: String,
+				default: '#333'
+			},
+			fontSize: {
+				type: Number,
+				default: 14
+			},
+			splitorColor: {
+				type: String,
+				default: '#333'
+			},
+			day: {
+				type: Number,
+				default: 0
+			},
+			hour: {
+				type: Number,
+				default: 0
+			},
+			minute: {
+				type: Number,
+				default: 0
+			},
+			second: {
+				type: Number,
+				default: 0
+			},
+			timestamp: {
+				type: Number,
+				default: 0
+			}
+		},
+		data() {
+			return {
+				timer: null,
+				syncFlag: false,
+				d: '00',
+				h: '00',
+				i: '00',
+				s: '00',
+				leftTime: 0,
+				seconds: 0
+			}
+		},
+		computed: {
+			dayText() {
+				return t("uni-countdown.day")
+			},
+			hourText(val) {
+				return t("uni-countdown.h")
+			},
+			minuteText(val) {
+				return t("uni-countdown.m")
+			},
+			secondText(val) {
+				return t("uni-countdown.s")
+			},
+			timeStyle() {
+				const {
+					color,
+					backgroundColor,
+					fontSize
+				} = this
+				return {
+					color,
+					backgroundColor,
+					fontSize: `${fontSize}px`,
+					width: `${fontSize * 22 / 14}px`, // 按字体大小为 14px 时的比例缩放
+ 					lineHeight: `${fontSize * 20 / 14}px`,
+					borderRadius: `${fontSize * 3 / 14}px`,
+				}
+			},
+			splitorStyle() {
+				const { splitorColor, fontSize, backgroundColor } = this
+				return {
+					color: splitorColor,
+					fontSize: `${fontSize * 12 / 14}px`,
+					margin: backgroundColor ? `${fontSize * 4 / 14}px` : ''
+				}
+			}
+		},
+		watch: {
+			day(val) {
+				this.changeFlag()
+			},
+			hour(val) {
+				this.changeFlag()
+			},
+			minute(val) {
+				this.changeFlag()
+			},
+			second(val) {
+				this.changeFlag()
+			},
+			start: {
+				immediate: true,
+				handler(newVal, oldVal) {
+					if (newVal) {
+						this.startData();
+					} else {
+						if (!oldVal) return
+						clearInterval(this.timer)
+					}
+				}
+
+			}
+		},
+		created: function(e) {
+			this.seconds = this.toSeconds(this.timestamp, this.day, this.hour, this.minute, this.second)
+			this.countDown()
+		},
+		// #ifndef VUE3
+		destroyed() {
+			clearInterval(this.timer)
+		},
+		// #endif
+		// #ifdef VUE3
+		unmounted() {
+			clearInterval(this.timer)
+		},
+		// #endif
+		methods: {
+			toSeconds(timestamp, day, hours, minutes, seconds) {
+				if (timestamp) {
+					return timestamp - parseInt(new Date().getTime() / 1000, 10)
+				}
+				return day * 60 * 60 * 24 + hours * 60 * 60 + minutes * 60 + seconds
+			},
+			timeUp() {
+				clearInterval(this.timer)
+				this.$emit('timeup')
+			},
+			countDown() {
+				let seconds = this.seconds
+				let [day, hour, minute, second] = [0, 0, 0, 0]
+				if (seconds > 0) {
+					day = Math.floor(seconds / (60 * 60 * 24))
+					hour = Math.floor(seconds / (60 * 60)) - (day * 24)
+					minute = Math.floor(seconds / 60) - (day * 24 * 60) - (hour * 60)
+					second = Math.floor(seconds) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60)
+				} else {
+					this.timeUp()
+				}
+				if (day < 10) {
+					day = '0' + day
+				}
+				if (hour < 10) {
+					hour = '0' + hour
+				}
+				if (minute < 10) {
+					minute = '0' + minute
+				}
+				if (second < 10) {
+					second = '0' + second
+				}
+				this.d = day
+				this.h = hour
+				this.i = minute
+				this.s = second
+			},
+			startData() {
+				this.seconds = this.toSeconds(this.timestamp, this.day, this.hour, this.minute, this.second)
+				if (this.seconds <= 0) {
+					this.seconds = this.toSeconds(0, 0, 0, 0, 0)
+					this.countDown()
+					return
+				}
+				clearInterval(this.timer)
+				this.countDown()
+				this.timer = setInterval(() => {
+					this.seconds--
+					if (this.seconds < 0) {
+						this.timeUp()
+						return
+					}
+					this.countDown()
+				}, 1000)
+			},
+			update(){
+				this.startData();
+			},
+			changeFlag() {
+				if (!this.syncFlag) {
+					this.seconds = this.toSeconds(this.timestamp, this.day, this.hour, this.minute, this.second)
+					this.startData();
+					this.syncFlag = true;
+				}
+			}
+		}
+	}
+</script>
+<style lang="scss" scoped>
+	$font-size: 14px;
+
+	.uni-countdown {
+		display: flex;
+		flex-direction: row;
+		justify-content: flex-start;
+		align-items: center;
+
+		&__splitor {
+			margin: 0 2px;
+			font-size: $font-size;
+			color: #333;
+		}
+
+		&__number {
+			border-radius: 3px;
+			text-align: center;
+			font-size: $font-size;
+		}
+	}
+</style>

+ 86 - 0
uni_modules/uni-countdown/package.json

@@ -0,0 +1,86 @@
+{
+  "id": "uni-countdown",
+  "displayName": "uni-countdown 倒计时",
+  "version": "1.2.2",
+  "description": "CountDown 倒计时组件",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "countdown",
+    "倒计时"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": ["uni-scss"],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

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

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

+ 41 - 0
uni_modules/uni-data-checkbox/changelog.md

@@ -0,0 +1,41 @@
+## 1.0.1(2022-02-07)
+- 修复 multiple 为 true 时,v-model 的值为 null 报错的 bug
+## 1.0.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-data-checkbox](https://uniapp.dcloud.io/component/uniui/uni-data-checkbox)
+## 0.2.5(2021-08-23)
+- 修复 在uni-forms中 modelValue 中不存在当前字段,当前字段必填写也不参与校验的问题
+## 0.2.4(2021-08-17)
+- 修复 单选 list 模式下 ,icon 为 left 时,选中图标不显示的问题
+## 0.2.3(2021-08-11)
+- 修复 在 uni-forms 中重置表单,错误信息无法清除的问题
+## 0.2.2(2021-07-30)
+- 优化 在uni-forms组件,与label不对齐的问题
+## 0.2.1(2021-07-27)
+- 修复 单选默认值为0不能选中的Bug
+## 0.2.0(2021-07-13)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 0.1.11(2021-07-06)
+- 优化 删除无用日志
+## 0.1.10(2021-07-05)
+- 修复 由 0.1.9 引起的非 nvue 端图标不显示的问题
+## 0.1.9(2021-07-05)
+- 修复 nvue 黑框样式问题
+## 0.1.8(2021-06-28)
+- 修复 selectedTextColor 属性不生效的Bug
+## 0.1.7(2021-06-02)
+- 新增 map 属性,可以方便映射text/value属性
+## 0.1.6(2021-05-26)
+- 修复 不关联服务空间的情况下组件报错的Bug
+## 0.1.5(2021-05-12)
+- 新增 组件示例地址
+## 0.1.4(2021-04-09)
+- 修复 nvue 下无法选中的问题
+## 0.1.3(2021-03-22)
+- 新增 disabled属性
+## 0.1.2(2021-02-24)
+- 优化 默认颜色显示
+## 0.1.1(2021-02-24)
+- 新增 支持nvue
+## 0.1.0(2021-02-18)
+- “暂无数据”显示居中

+ 817 - 0
uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox.vue

@@ -0,0 +1,817 @@
+<template>
+	<view class="uni-data-checklist" :style="{'margin-top':isTop+'px'}">
+		<template v-if="!isLocal">
+			<view class="uni-data-loading">
+				<uni-load-more v-if="!mixinDatacomErrorMessage" status="loading" iconType="snow" :iconSize="18" :content-text="contentText"></uni-load-more>
+				<text v-else>{{mixinDatacomErrorMessage}}</text>
+			</view>
+		</template>
+		<template v-else>
+			<checkbox-group v-if="multiple" class="checklist-group" :class="{'is-list':mode==='list' || wrap}" @change="chagne">
+				<label class="checklist-box" :class="['is--'+mode,item.selected?'is-checked':'',(disabled || !!item.disabled)?'is-disable':'',index!==0&&mode==='list'?'is-list-border':'']"
+				 :style="item.styleBackgroud" v-for="(item,index) in dataList" :key="index">
+					<checkbox class="hidden" hidden :disabled="disabled || !!item.disabled" :value="item[map.value]+''" :checked="item.selected" />
+					<view v-if="(mode !=='tag' && mode !== 'list') || ( mode === 'list' && icon === 'left')" class="checkbox__inner"  :style="item.styleIcon">
+						<view class="checkbox__inner-icon"></view>
+					</view>
+					<view class="checklist-content" :class="{'list-content':mode === 'list' && icon ==='left'}">
+						<text class="checklist-text" :style="item.styleIconText">{{item[map.text]}}</text>
+						<view v-if="mode === 'list' && icon === 'right'" class="checkobx__list" :style="item.styleBackgroud"></view>
+					</view>
+				</label>
+			</checkbox-group>
+			<radio-group v-else class="checklist-group" :class="{'is-list':mode==='list','is-wrap':wrap}" @change="chagne">
+				<!-- -->
+				<label class="checklist-box" :class="['is--'+mode,item.selected?'is-checked':'',(disabled || !!item.disabled)?'is-disable':'',index!==0&&mode==='list'?'is-list-border':'']"
+				 :style="item.styleBackgroud" v-for="(item,index) in dataList" :key="index">
+					<radio class="hidden" hidden :disabled="disabled || item.disabled" :value="item[map.value]+''" :checked="item.selected" />
+					<view v-if="(mode !=='tag' && mode !== 'list') || ( mode === 'list' && icon === 'left')" class="radio__inner"
+					 :style="item.styleBackgroud">
+						<view class="radio__inner-icon" :style="item.styleIcon"></view>
+					</view>
+					<view class="checklist-content" :class="{'list-content':mode === 'list' && icon ==='left'}">
+						<text class="checklist-text" :style="item.styleIconText">{{item[map.text]}}</text>
+						<view v-if="mode === 'list' && icon === 'right'" :style="item.styleRightIcon" class="checkobx__list"></view>
+					</view>
+				</label>
+			</radio-group>
+		</template>
+	</view>
+</template>
+
+<script>
+	/**
+	 * DataChecklist 数据选择器
+	 * @description 通过数据渲染 checkbox 和 radio
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=xxx
+	 * @property {String} mode = [default| list | button | tag] 显示模式
+	 * @value default  	默认横排模式
+	 * @value list		列表模式
+	 * @value button	按钮模式
+	 * @value tag 		标签模式
+	 * @property {Boolean} multiple = [true|false] 是否多选
+	 * @property {Array|String|Number} value 默认值
+	 * @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
+	 * @property {Number|String} min 最小选择个数 ,multiple为true时生效
+	 * @property {Number|String} max 最大选择个数 ,multiple为true时生效
+	 * @property {Boolean} wrap 是否换行显示
+	 * @property {String} icon = [left|right]  list 列表模式下icon显示位置
+	 * @property {Boolean} selectedColor 选中颜色
+	 * @property {Boolean} emptyText 没有数据时显示的文字 ,本地数据无效
+	 * @property {Boolean} selectedTextColor 选中文本颜色,如不填写则自动显示
+	 * @property {Object} map 字段映射, 默认 map={text:'text',value:'value'}
+	 * @value left 左侧显示
+	 * @value right 右侧显示
+	 * @event {Function} change  选中发生变化触发
+	 */
+
+	export default {
+		name: 'uniDataChecklist',
+		mixins: [uniCloud.mixinDatacom || {}],
+		emits:['input','update:modelValue','change'],
+		props: {
+			mode: {
+				type: String,
+				default: 'default'
+			},
+
+			multiple: {
+				type: Boolean,
+				default: false
+			},
+			value: {
+				type: [Array, String, Number],
+				default () {
+					return ''
+				}
+			},
+			// TODO vue3
+			modelValue: {
+				type: [Array, String, Number],
+				default() {
+					return '';
+				}
+			},
+			localdata: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			min: {
+				type: [Number, String],
+				default: ''
+			},
+			max: {
+				type: [Number, String],
+				default: ''
+			},
+			wrap: {
+				type: Boolean,
+				default: false
+			},
+			icon: {
+				type: String,
+				default: 'left'
+			},
+			selectedColor: {
+				type: String,
+				default: ''
+			},
+			selectedTextColor: {
+				type: String,
+				default: ''
+			},
+			emptyText:{
+				type: String,
+				default: '暂无数据'
+			},
+			disabled:{
+				type: Boolean,
+				default: false
+			},
+			map:{
+				type: Object,
+				default(){
+					return {
+						text:'text',
+						value:'value'
+					}
+				}
+			}
+		},
+		watch: {
+			localdata: {
+				handler(newVal) {
+					this.range = newVal
+					this.dataList = this.getDataList(this.getSelectedValue(newVal))
+				},
+				deep: true
+			},
+			mixinDatacomResData(newVal) {
+				this.range = newVal
+				this.dataList = this.getDataList(this.getSelectedValue(newVal))
+			},
+			value(newVal) {
+				this.dataList = this.getDataList(newVal)
+				// fix by mehaotian is_reset 在 uni-forms 中定义
+				if(!this.is_reset){
+					this.is_reset = false
+					this.formItem && this.formItem.setValue(newVal)
+				}
+			},
+			modelValue(newVal) {
+				this.dataList = this.getDataList(newVal);
+				if(!this.is_reset){
+					this.is_reset = false
+					this.formItem && this.formItem.setValue(newVal)
+				}
+			}
+		},
+		data() {
+			return {
+				dataList: [],
+				range: [],
+				contentText: {
+					contentdown: '查看更多',
+					contentrefresh: '加载中',
+					contentnomore: '没有更多'
+				},
+				isLocal:true,
+				styles: {
+					selectedColor: '#2979ff',
+					selectedTextColor: '#666',
+				},
+				isTop:0
+			};
+		},
+		computed:{
+			dataValue(){
+				if(this.value === '')return this.modelValue
+				if(this.modelValue === '') return this.value
+				return this.value
+			}
+		},
+		created() {
+			this.form = this.getForm('uniForms')
+			this.formItem = this.getForm('uniFormsItem')
+			// this.formItem && this.formItem.setValue(this.value)
+
+			if (this.formItem) {
+				this.isTop = 6
+				if (this.formItem.name) {
+					// 如果存在name添加默认值,否则formData 中不存在这个字段不校验
+					if(!this.is_reset){
+						this.is_reset = false
+						this.formItem.setValue(this.dataValue)
+					}
+					this.rename = this.formItem.name
+					this.form.inputChildrens.push(this)
+				}
+			}
+
+			if (this.localdata && this.localdata.length !== 0) {
+				this.isLocal = true
+				this.range = this.localdata
+				this.dataList = this.getDataList(this.getSelectedValue(this.range))
+			} else {
+				if (this.collection) {
+					this.isLocal = false
+					this.loadData()
+				}
+			}
+		},
+		methods: {
+			loadData() {
+				this.mixinDatacomGet().then(res=>{
+					this.mixinDatacomResData = res.result.data
+					if(this.mixinDatacomResData.length === 0){
+						this.isLocal = false
+						this.mixinDatacomErrorMessage = this.emptyText
+					}else{
+						this.isLocal = true
+					}
+				}).catch(err=>{
+					this.mixinDatacomErrorMessage = err.message
+				})
+			},
+			/**
+			 * 获取父元素实例
+			 */
+			getForm(name = 'uniForms') {
+				let parent = this.$parent;
+				let parentName = parent.$options.name;
+				while (parentName !== name) {
+					parent = parent.$parent;
+					if (!parent) return false
+					parentName = parent.$options.name;
+				}
+				return parent;
+			},
+			chagne(e) {
+				const values = e.detail.value
+
+				let detail = {
+					value: [],
+					data: []
+				}
+
+				if (this.multiple) {
+					this.range.forEach(item => {
+
+						if (values.includes(item[this.map.value] + '')) {
+							detail.value.push(item[this.map.value])
+							detail.data.push(item)
+						}
+					})
+				} else {
+					const range = this.range.find(item => (item[this.map.value] + '') === values)
+					if (range) {
+						detail = {
+							value: range[this.map.value],
+							data: range
+						}
+					}
+				}
+				this.formItem && this.formItem.setValue(detail.value)
+				// TODO 兼容 vue2
+				this.$emit('input', detail.value);
+				// // TOTO 兼容 vue3
+				this.$emit('update:modelValue', detail.value);
+				this.$emit('change', {
+					detail
+				})
+				if (this.multiple) {
+					// 如果 v-model 没有绑定 ,则走内部逻辑
+					// if (this.value.length === 0) {
+					this.dataList = this.getDataList(detail.value, true)
+					// }
+				} else {
+					this.dataList = this.getDataList(detail.value)
+				}
+			},
+
+			/**
+			 * 获取渲染的新数组
+			 * @param {Object} value 选中内容
+			 */
+			getDataList(value) {
+				// 解除引用关系,破坏原引用关系,避免污染源数据
+				let dataList = JSON.parse(JSON.stringify(this.range))
+				let list = []
+				if (this.multiple) {
+					if (!Array.isArray(value)) {
+						value = []
+					}
+				}
+				dataList.forEach((item, index) => {
+					item.disabled = item.disable || item.disabled || false
+					if (this.multiple) {
+						if (value.length > 0) {
+							let have = value.find(val => val === item[this.map.value])
+							item.selected = have !== undefined
+						} else {
+							item.selected = false
+						}
+					} else {
+						item.selected = value === item[this.map.value]
+					}
+
+					list.push(item)
+				})
+				return this.setRange(list)
+			},
+			/**
+			 * 处理最大最小值
+			 * @param {Object} list
+			 */
+			setRange(list) {
+				let selectList = list.filter(item => item.selected)
+				let min = Number(this.min) || 0
+				let max = Number(this.max) || ''
+				list.forEach((item, index) => {
+					if (this.multiple) {
+						if (selectList.length <= min) {
+							let have = selectList.find(val => val[this.map.value] === item[this.map.value])
+							if (have !== undefined) {
+								item.disabled = true
+							}
+						}
+
+						if (selectList.length >= max && max !== '') {
+							let have = selectList.find(val => val[this.map.value] === item[this.map.value])
+							if (have === undefined) {
+								item.disabled = true
+							}
+						}
+					}
+					this.setStyles(item, index)
+					list[index] = item
+				})
+				return list
+			},
+			/**
+			 * 设置 class
+			 * @param {Object} item
+			 * @param {Object} index
+			 */
+			setStyles(item, index) {
+				//  设置自定义样式
+				item.styleBackgroud = this.setStyleBackgroud(item)
+				item.styleIcon = this.setStyleIcon(item)
+				item.styleIconText = this.setStyleIconText(item)
+				item.styleRightIcon = this.setStyleRightIcon(item)
+			},
+
+			/**
+			 * 获取选中值
+			 * @param {Object} range
+			 */
+			getSelectedValue(range) {
+				if (!this.multiple) return this.dataValue
+				let selectedArr = []
+				range.forEach((item) => {
+					if (item.selected) {
+						selectedArr.push(item[this.map.value])
+					}
+				})
+				return this.dataValue && this.dataValue.length > 0 ? this.dataValue : selectedArr
+			},
+
+			/**
+			 * 设置背景样式
+			 */
+			setStyleBackgroud(item) {
+				let styles = {}
+				let selectedColor = this.selectedColor?this.selectedColor:'#2979ff'
+				if (this.mode !== 'list') {
+					styles['border-color'] = item.selected?selectedColor:'#DCDFE6'
+				}
+				if (this.mode === 'tag') {
+					styles['background-color'] = item.selected? selectedColor:'#f5f5f5'
+				}
+				let classles = ''
+				for (let i in styles) {
+					classles += `${i}:${styles[i]};`
+				}
+				return classles
+			},
+			setStyleIcon(item) {
+				let styles = {}
+				let classles = ''
+				let selectedColor = this.selectedColor?this.selectedColor:'#2979ff'
+				styles['background-color'] = item.selected?selectedColor:'#fff'
+				styles['border-color'] = item.selected?selectedColor:'#DCDFE6'
+
+				if(!item.selected && item.disabled){
+					styles['background-color'] = '#F2F6FC'
+					styles['border-color'] = item.selected?selectedColor:'#DCDFE6'
+				}
+
+				for (let i in styles) {
+					classles += `${i}:${styles[i]};`
+				}
+				return classles
+			},
+			setStyleIconText(item) {
+				let styles = {}
+				let classles = ''
+				let selectedColor = this.selectedColor?this.selectedColor:'#2979ff'
+				if (this.mode === 'tag') {
+					styles.color = item.selected?(this.selectedTextColor?this.selectedTextColor:'#fff'):'#666'
+				} else {
+					styles.color = item.selected?(this.selectedTextColor?this.selectedTextColor:selectedColor):'#666'
+				}
+				if(!item.selected && item.disabled){
+					styles.color = '#999'
+				}
+
+				for (let i in styles) {
+					classles += `${i}:${styles[i]};`
+				}
+				return classles
+			},
+			setStyleRightIcon(item) {
+				let styles = {}
+				let classles = ''
+				if (this.mode === 'list') {
+					styles['border-color'] = item.selected?this.styles.selectedColor:'#DCDFE6'
+				}
+				for (let i in styles) {
+					classles += `${i}:${styles[i]};`
+				}
+
+				return classles
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	$checked-color: #2979ff;
+	$border-color: #DCDFE6;
+	$disable:0.4;
+
+	@mixin flex {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+	}
+
+	.uni-data-loading {
+		@include flex;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		height: 36px;
+		padding-left: 10px;
+		color: #999;
+	}
+
+	.uni-data-checklist {
+		position: relative;
+		z-index: 0;
+		flex: 1;
+		// 多选样式
+		.checklist-group {
+			@include flex;
+			flex-direction: row;
+			flex-wrap: wrap;
+
+			&.is-list {
+				flex-direction: column;
+			}
+
+			.checklist-box {
+				@include flex;
+				flex-direction: row;
+				align-items: center;
+				position: relative;
+				margin: 5px 0;
+				margin-right: 25px;
+
+				.hidden {
+					position: absolute;
+					opacity: 0;
+				}
+
+				// 文字样式
+				.checklist-content {
+					@include flex;
+					flex: 1;
+					flex-direction: row;
+					align-items: center;
+					justify-content: space-between;
+					.checklist-text {
+						font-size: 14px;
+						color: #666;
+						margin-left: 5px;
+						line-height: 14px;
+					}
+
+					.checkobx__list {
+						border-right-width: 1px;
+						border-right-color: #007aff;
+						border-right-style: solid;
+						border-bottom-width:1px;
+						border-bottom-color: #007aff;
+						border-bottom-style: solid;
+						height: 12px;
+						width: 6px;
+						left: -5px;
+						transform-origin: center;
+						transform: rotate(45deg);
+						opacity: 0;
+					}
+				}
+
+				// 多选样式
+				.checkbox__inner {
+					/* #ifndef APP-NVUE */
+					flex-shrink: 0;
+					box-sizing: border-box;
+					/* #endif */
+					position: relative;
+					width: 16px;
+					height: 16px;
+					border: 1px solid $border-color;
+					border-radius: 4px;
+					background-color: #fff;
+					z-index: 1;
+					.checkbox__inner-icon {
+						position: absolute;
+						/* #ifdef APP-NVUE */
+						top: 2px;
+						/* #endif */
+						/* #ifndef APP-NVUE */
+						top: 1px;
+						/* #endif */
+						left: 5px;
+						height: 8px;
+						width: 4px;
+						border-right-width: 1px;
+						border-right-color: #fff;
+						border-right-style: solid;
+						border-bottom-width:1px ;
+						border-bottom-color: #fff;
+						border-bottom-style: solid;
+						opacity: 0;
+						transform-origin: center;
+						transform: rotate(40deg);
+					}
+				}
+
+				// 单选样式
+				.radio__inner {
+					@include flex;
+					/* #ifndef APP-NVUE */
+					flex-shrink: 0;
+					box-sizing: border-box;
+					/* #endif */
+					justify-content: center;
+					align-items: center;
+					position: relative;
+					width: 16px;
+					height: 16px;
+					border: 1px solid $border-color;
+					border-radius: 16px;
+					background-color: #fff;
+					z-index: 1;
+
+					.radio__inner-icon {
+						width: 8px;
+						height: 8px;
+						border-radius: 10px;
+						opacity: 0;
+					}
+				}
+
+				// 默认样式
+				&.is--default {
+
+					// 禁用
+					&.is-disable {
+						/* #ifdef H5 */
+						cursor: not-allowed;
+						/* #endif */
+						.checkbox__inner {
+							background-color: #F2F6FC;
+							border-color: $border-color;
+							/* #ifdef H5 */
+							cursor: not-allowed;
+							/* #endif */
+						}
+
+						.radio__inner {
+							background-color: #F2F6FC;
+							border-color: $border-color;
+						}
+						.checklist-text {
+							color: #999;
+						}
+					}
+
+					// 选中
+					&.is-checked {
+						.checkbox__inner {
+							border-color: $checked-color;
+							background-color: $checked-color;
+
+							.checkbox__inner-icon {
+								opacity: 1;
+								transform: rotate(45deg);
+							}
+						}
+						.radio__inner {
+							border-color: $checked-color;
+							.radio__inner-icon {
+								opacity: 1;
+								background-color: $checked-color;
+							}
+						}
+						.checklist-text {
+							color: $checked-color;
+						}
+						// 选中禁用
+						&.is-disable {
+							.checkbox__inner {
+								opacity: $disable;
+							}
+
+							.checklist-text {
+								opacity: $disable;
+							}
+							.radio__inner {
+								opacity: $disable;
+							}
+						}
+					}
+				}
+
+				// 按钮样式
+				&.is--button {
+					margin-right: 10px;
+					padding: 5px 10px;
+					border: 1px $border-color solid;
+					border-radius: 3px;
+					transition: border-color 0.2s;
+
+					// 禁用
+					&.is-disable {
+						/* #ifdef H5 */
+						cursor: not-allowed;
+						/* #endif */
+						border: 1px #eee solid;
+						opacity: $disable;
+						.checkbox__inner {
+							background-color: #F2F6FC;
+							border-color: $border-color;
+							/* #ifdef H5 */
+							cursor: not-allowed;
+							/* #endif */
+						}
+						.radio__inner {
+							background-color: #F2F6FC;
+							border-color: $border-color;
+							/* #ifdef H5 */
+							cursor: not-allowed;
+							/* #endif */
+						}
+						.checklist-text {
+							color: #999;
+						}
+					}
+
+					&.is-checked {
+						border-color: $checked-color;
+						.checkbox__inner {
+							border-color: $checked-color;
+							background-color: $checked-color;
+							.checkbox__inner-icon {
+								opacity: 1;
+								transform: rotate(45deg);
+							}
+						}
+
+						.radio__inner {
+							border-color: $checked-color;
+
+							.radio__inner-icon {
+								opacity: 1;
+								background-color: $checked-color;
+							}
+						}
+
+						.checklist-text {
+							color: $checked-color;
+						}
+
+						// 选中禁用
+						&.is-disable {
+							opacity: $disable;
+						}
+					}
+				}
+
+				// 标签样式
+				&.is--tag {
+					margin-right: 10px;
+					padding: 5px 10px;
+					border: 1px $border-color solid;
+					border-radius: 3px;
+					background-color: #f5f5f5;
+
+					.checklist-text {
+						margin: 0;
+						color: #666;
+					}
+
+					// 禁用
+					&.is-disable {
+						/* #ifdef H5 */
+						cursor: not-allowed;
+						/* #endif */
+						opacity: $disable;
+					}
+
+					&.is-checked {
+						background-color: $checked-color;
+						border-color: $checked-color;
+
+						.checklist-text {
+							color: #fff;
+						}
+					}
+				}
+				// 列表样式
+				&.is--list {
+					/* #ifndef APP-NVUE */
+					display: flex;
+					/* #endif */
+					padding: 10px 15px;
+					padding-left: 0;
+					margin: 0;
+
+					&.is-list-border {
+						border-top: 1px #eee solid;
+					}
+
+					// 禁用
+					&.is-disable {
+						/* #ifdef H5 */
+						cursor: not-allowed;
+						/* #endif */
+						.checkbox__inner {
+							background-color: #F2F6FC;
+							border-color: $border-color;
+							/* #ifdef H5 */
+							cursor: not-allowed;
+							/* #endif */
+						}
+						.checklist-text {
+							color: #999;
+						}
+					}
+
+					&.is-checked {
+						.checkbox__inner {
+							border-color: $checked-color;
+							background-color: $checked-color;
+
+							.checkbox__inner-icon {
+								opacity: 1;
+								transform: rotate(45deg);
+							}
+						}
+						.radio__inner {
+							.radio__inner-icon {
+								opacity: 1;
+							}
+						}
+						.checklist-text {
+							color: $checked-color;
+						}
+
+						.checklist-content {
+							.checkobx__list {
+								opacity: 1;
+								border-color: $checked-color;
+							}
+						}
+
+						// 选中禁用
+						&.is-disable {
+							.checkbox__inner {
+								opacity: $disable;
+							}
+
+							.checklist-text {
+								opacity: $disable;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 87 - 0
uni_modules/uni-data-checkbox/package.json

@@ -0,0 +1,87 @@
+{
+  "id": "uni-data-checkbox",
+  "displayName": "uni-data-checkbox 数据选择器",
+  "version": "1.0.1",
+  "description": "通过数据驱动的单选框和复选框",
+  "keywords": [
+    "uni-ui",
+    "checkbox",
+    "单选",
+    "多选",
+    "单选多选"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": "^3.1.1"
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+  "dcloudext": {
+    "category": [
+      "前端组件",
+      "通用组件"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": ["uni-load-more","uni-scss"],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "u",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 18 - 0
uni_modules/uni-data-checkbox/readme.md

@@ -0,0 +1,18 @@
+
+
+## DataCheckbox 数据驱动的单选复选框
+> **组件名:uni-data-checkbox**
+> 代码块: `uDataCheckbox`
+
+
+本组件是基于uni-app基础组件checkbox的封装。本组件要解决问题包括:
+
+1. 数据绑定型组件:给本组件绑定一个data,会自动渲染一组候选内容。再以往,开发者需要编写不少代码实现类似功能
+2. 自动的表单校验:组件绑定了data,且符合[uni-forms](https://ext.dcloud.net.cn/plugin?id=2773)组件的表单校验规范,搭配使用会自动实现表单校验
+3. 本组件合并了单选多选
+4. 本组件有若干风格选择,如普通的单选多选框、并列button风格、tag风格。开发者可以快速选择需要的风格。但作为一个封装组件,样式代码虽然不用自己写了,却会牺牲一定的样式自定义性
+
+在uniCloud开发中,`DB Schema`中配置了enum枚举等类型后,在web控制台的[自动生成表单](https://uniapp.dcloud.io/uniCloud/schema?id=autocode)功能中,会自动生成``uni-data-checkbox``组件并绑定好data
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-checkbox)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 56 - 0
uni_modules/uni-data-picker/changelog.md

@@ -0,0 +1,56 @@
+## 1.0.3(2022-02-25)
+- 修复 nvue 不支持的 v-show 的 bug
+## 1.0.2(2022-02-25)
+- 修复 条件编译 nvue 不支持的 css 样式
+## 1.0.1(2021-11-23)
+- 修复 由上个版本引发的map、v-model等属性不生效的bug
+## 1.0.0(2021-11-19)
+- 优化 组件 UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-data-picker](https://uniapp.dcloud.io/component/uniui/uni-data-picker)
+## 0.4.9(2021-10-28)
+- 修复 VUE2 v-model 概率无效的 bug
+## 0.4.8(2021-10-27)
+- 修复 v-model 概率无效的 bug
+## 0.4.7(2021-10-25)
+- 新增 属性 spaceInfo 服务空间配置 HBuilderX 3.2.11+
+- 修复 树型 uniCloud 数据类型为 int 时报错的 bug
+## 0.4.6(2021-10-19)
+- 修复 非 VUE3 v-model 为 0 时无法选中的 bug
+## 0.4.5(2021-09-26)
+- 新增 清除已选项的功能(通过 clearIcon 属性配置是否显示按钮),同时提供 clear 方法以供调用,二者等效
+- 修复 readonly 为 true 时报错的 bug
+## 0.4.4(2021-09-26)
+- 修复 上一版本造成的 map 属性失效的 bug
+- 新增 ellipsis 属性,支持配置 tab 选项长度过长时是否自动省略
+## 0.4.3(2021-09-24)
+- 修复 某些情况下级联未触发的 bug
+## 0.4.2(2021-09-23)
+- 新增 提供 show 和 hide 方法,开发者可以通过 ref 调用
+- 新增 选项内容过长自动添加省略号
+## 0.4.1(2021-09-15)
+- 新增 map 属性 字段映射,将 text/value 映射到数据中的其他字段
+## 0.4.0(2021-07-13)
+- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 0.3.5(2021-06-04)
+- 修复 无法加载云端数据的问题
+## 0.3.4(2021-05-28)
+- 修复 v-model 无效问题
+- 修复 loaddata 为空数据组时加载时间过长问题
+- 修复 上个版本引出的本地数据无法选择带有 children 的 2 级节点
+## 0.3.3(2021-05-12)
+- 新增 组件示例地址
+## 0.3.2(2021-04-22)
+- 修复 非树形数据有 where 属性查询报错的问题
+## 0.3.1(2021-04-15)
+- 修复 本地数据概率无法回显时问题
+## 0.3.0(2021-04-07)
+- 新增 支持云端非树形表结构数据
+- 修复 根节点 parent_field 字段等于 null 时选择界面错乱问题
+## 0.2.0(2021-03-15)
+- 修复 nodeclick、popupopened、popupclosed 事件无法触发的问题
+## 0.1.9(2021-03-09)
+- 修复 微信小程序某些情况下无法选择的问题
+## 0.1.8(2021-02-05)
+- 优化 部分样式在 nvue 上的兼容表现
+## 0.1.7(2021-02-05)
+- 调整为 uni_modules 目录规范

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio