haveyou 1 год назад
Родитель
Сommit
07d008b33c
100 измененных файлов с 7948 добавлено и 1368 удалено
  1. 135 0
      components/pageScroll/index.vue
  2. 9 19
      pages-home/components/BookItem.vue
  3. 144 134
      pages-home/components/BookListItem.vue
  4. 193 192
      pages-home/components/PickupTimePicker.vue
  5. 67 56
      pages-home/pages/book-order.vue
  6. 174 241
      pages-home/pages/scaned-book.vue
  7. 146 0
      pages-mine/components/address-card.vue
  8. 216 215
      pages-mine/components/city-picker.vue
  9. 49 59
      pages-mine/pages/address/add-or-update.vue
  10. 107 120
      pages-mine/pages/address/list.vue
  11. BIN
      pages-mine/static/1.png
  12. BIN
      pages-mine/static/2.png
  13. BIN
      pages-mine/static/3.png
  14. BIN
      pages-mine/static/4.png
  15. BIN
      pages-mine/static/5.png
  16. BIN
      pages-mine/static/adderss.png
  17. BIN
      pages-mine/static/t1.png
  18. BIN
      pages-mine/static/t10.png
  19. BIN
      pages-mine/static/t11.png
  20. BIN
      pages-mine/static/t12.png
  21. BIN
      pages-mine/static/t13.png
  22. BIN
      pages-mine/static/t2.png
  23. BIN
      pages-mine/static/t3.png
  24. BIN
      pages-mine/static/t4.png
  25. BIN
      pages-mine/static/t5.png
  26. BIN
      pages-mine/static/t6.png
  27. BIN
      pages-mine/static/t7.png
  28. BIN
      pages-mine/static/t8.png
  29. BIN
      pages-mine/static/t9.png
  30. 33 13
      pages/home/components/BookItem.vue
  31. 5 6
      pages/home/components/ScanBookList.vue
  32. 1 1
      pages/home/components/notScanned.vue
  33. 75 63
      pages/home/index.vue
  34. 4 4
      pages/mine/components/address-card.vue
  35. 328 243
      static/css/common.scss
  36. 2 2
      theme.scss
  37. 79 0
      uni_modules/uni-data-picker/changelog.md
  38. 45 0
      uni_modules/uni-data-picker/components/uni-data-picker/keypress.js
  39. 381 0
      uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.uvue
  40. 550 0
      uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue
  41. 622 0
      uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-picker.js
  42. 692 0
      uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-picker.uts
  43. 76 0
      uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.css
  44. 69 0
      uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.uvue
  45. 322 0
      uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue
  46. 91 0
      uni_modules/uni-data-picker/package.json
  47. 22 0
      uni_modules/uni-data-picker/readme.md
  48. 42 0
      uni_modules/uni-icons/changelog.md
  49. 91 0
      uni_modules/uni-icons/components/uni-icons/uni-icons.uvue
  50. 110 0
      uni_modules/uni-icons/components/uni-icons/uni-icons.vue
  51. 664 0
      uni_modules/uni-icons/components/uni-icons/uniicons.css
  52. BIN
      uni_modules/uni-icons/components/uni-icons/uniicons.ttf
  53. 664 0
      uni_modules/uni-icons/components/uni-icons/uniicons_file.ts
  54. 649 0
      uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js
  55. 89 0
      uni_modules/uni-icons/package.json
  56. 8 0
      uni_modules/uni-icons/readme.md
  57. 25 0
      uni_modules/uni-load-more/changelog.md
  58. 5 0
      uni_modules/uni-load-more/components/uni-load-more/i18n/en.json
  59. 8 0
      uni_modules/uni-load-more/components/uni-load-more/i18n/index.js
  60. 5 0
      uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json
  61. 5 0
      uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json
  62. 117 0
      uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue
  63. 84 0
      uni_modules/uni-load-more/package.json
  64. 14 0
      uni_modules/uni-load-more/readme.md
  65. 8 0
      uni_modules/uni-scss/changelog.md
  66. 1 0
      uni_modules/uni-scss/index.scss
  67. 82 0
      uni_modules/uni-scss/package.json
  68. 4 0
      uni_modules/uni-scss/readme.md
  69. 7 0
      uni_modules/uni-scss/styles/index.scss
  70. 3 0
      uni_modules/uni-scss/styles/setting/_border.scss
  71. 66 0
      uni_modules/uni-scss/styles/setting/_color.scss
  72. 55 0
      uni_modules/uni-scss/styles/setting/_radius.scss
  73. 56 0
      uni_modules/uni-scss/styles/setting/_space.scss
  74. 167 0
      uni_modules/uni-scss/styles/setting/_styles.scss
  75. 24 0
      uni_modules/uni-scss/styles/setting/_text.scss
  76. 146 0
      uni_modules/uni-scss/styles/setting/_variables.scss
  77. 19 0
      uni_modules/uni-scss/styles/tools/functions.scss
  78. 31 0
      uni_modules/uni-scss/theme.scss
  79. 62 0
      uni_modules/uni-scss/variables.scss
  80. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  81. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map
  82. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  83. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/common-dialog.js.map
  84. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/img-swiper.js.map
  85. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/loadmore.js.map
  86. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/nav/dial-nav.js.map
  87. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/nav/label-count.js.map
  88. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/navbar/navbar-search.js.map
  89. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/navbar/navbar-top-search.js.map
  90. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/no-data.js.map
  91. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/pageScroll/index.js.map
  92. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/search/search.js.map
  93. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/select-reason.js.map
  94. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/tag.js.map
  95. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/title-operate.js.map
  96. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/BookItem.js.map
  97. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/BookListItem.js.map
  98. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/PickupTimePicker.js.map
  99. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/book-order.js.map
  100. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/order-success.js.map

+ 135 - 0
components/pageScroll/index.vue

@@ -0,0 +1,135 @@
+<template>
+	<!-- 列表 -->
+	<scroll-view class="scroll-view" scroll-y refresher-enabled :refresher-triggered="isRefreshing"
+		@refresherrefresh="onRefresh" @scrolltolower="onLoadMore">
+		<!-- 空状态 -->
+		<view v-if="!loading && !dataList.length" class="empty-state">
+			<slot v-if="slotEmpty" name="empty"></slot>
+			<u-empty v-else mode="list" text="暂无扫描记录" margin-top="200"></u-empty>
+		</view>
+
+		<slot></slot>
+
+		<!-- 加载更多 -->
+		<view class="load-more" v-if="dataList.length > 0">
+			<u-divider bg-color="#f8f8f8">{{ hasMore ? '加载中...' : '我是有底线的' }}</u-divider>
+		</view>
+	</scroll-view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				isRefreshing: false,
+				loading: false,
+				page: 1,
+				hasMore: true,
+				dataList: [],
+			}
+		},
+		props: {
+			url: {
+				type: String,
+				required: true,
+				default: '/token/order/scanLogs'
+			},
+			pageSize: {
+				type: Number,
+				default: 10
+			},
+			slotEmpty: {
+				type: Boolean,
+				default: false
+			}
+		},
+		onLoad() {
+			this.loadData()
+		},
+		methods: {
+			// 加载数据
+			async loadData(isRefresh = false) {
+				if (isRefresh) {
+					this.page = 1
+					this.hasMore = true
+				}
+				console.log(this.dataList, this.hasMore, this.loading, 'xxxxx')
+				if (!this.hasMore || this.loading) return
+
+				this.loading = true
+
+				try {
+					const res = await this.fetchBookList()
+
+					if (isRefresh) {
+						this.dataList = res.list
+					} else {
+						this.dataList = [...this.dataList, ...res.list]
+					}
+					this.$emit('updateList', this.dataList)
+
+					this.hasMore = res.hasMore
+					this.page++
+				} catch (error) {
+					uni.showToast({
+						title: '加载失败',
+						icon: 'none'
+					})
+				} finally {
+					this.loading = false
+					if (isRefresh) {
+						this.isRefreshing = false
+					}
+				}
+			},
+
+			// 模拟获取数据
+			fetchBookList() {
+				return new Promise((resolve) => {
+					uni.$u.http.get(this.url, {
+						pageSize: this.pageSize,
+						pageNum: this.page
+					}).then(res => {
+						resolve({
+							list: res.rows,
+							hasMore: res.rows.length < res.total - this.dataList.length
+						})
+					})
+				})
+			},
+
+			reloadData() {
+				this.page = 1
+				this.fetchBookList()
+			},
+
+			// 下拉刷新
+			async onRefresh() {
+				if (this.loading) return
+				this.isRefreshing = true
+				await this.loadData(true)
+			},
+
+			// 上拉加载更多
+			async onLoadMore() {
+				if (this.loading || !this.hasMore) return
+				await this.loadData()
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.scroll-view {
+		height: calc(100vh - 88rpx);
+	}
+
+	.load-more {
+		width: 100%;
+		display: flex;
+		color: #999999;
+		font-size: 24rpx;
+		padding: 30rpx 0;
+		justify-content: center;
+	}
+</style>

+ 9 - 19
pages-home/components/BookItem.vue

@@ -1,22 +1,22 @@
 <template>
 	<view class="book-item">
 		<view class="book-info">
-			<image class="book-cover" :src="book.coverUrl || '/static/img/default-cover.png'" mode="aspectFill" />
+			<image class="book-cover" :src="book.cover" mode="aspectFill" />
 			<view class="book-detail">
 				<view class="top-info">
-					<view class="book-title">{{ book.title }}</view>
+					<view class="book-title">{{ book.bookName }}</view>
 					<view class="book-tags">
-						<text class="tzs tag-text">套装书</text>
-						<text class="kmdb tag-text">可卖多本</text>
+						<text class="tzs tag-text" v-if="book.suit==1">套装书</text>
+						<text class="kmdb tag-text" v-if="book.maxNum>1">可卖多本</text>
 					</view>
 				</view>
 
 				<view class="flex flex-j-b flex-a-c">
-					<view class="book-price">预估价: ¥{{ book.price }}</view>
+					<view class="book-price">预估价: ¥{{ book.recycleMoney }}</view>
 				</view>
 			</view>
-			<view class="delete-btn" @tap="onDelete">
-				<text>×{{book.quantity}}</text>
+			<view class="delete-btn">
+				<text>×{{book.num}}</text>
 			</view>
 		</view>
 
@@ -39,20 +39,10 @@
 			}
 		},
 		data() {
-			return {
-				quantity: this.book.quantity || 1
-			}
+			return {}
 		},
 		methods: {
-			onDelete() {
-				this.$refs.deleteDialog.openPopup()
-			},
-			confirmDelete() {
-				this.$emit('delete', this.book.id)
-			},
-			onQuantityChange(value) {
-				this.$emit('quantity-change', this.book)
-			}
+
 		}
 	}
 </script>

+ 144 - 134
pages-home/components/BookListItem.vue

@@ -1,154 +1,164 @@
 <template>
-	<view class="book-item">
-		<!-- 书籍封面 -->
-		<image class="book-cover" :src="book.coverUrl" mode="aspectFill" />
-		<!-- 书籍详情 -->
-		<view class="book-info">
-			<view class="book-title">{{ book.title }}</view>
-			<view class="book-price">
-				<text>回收价:</text>
-				<text class="price">¥{{ book.price }}</text>
-			</view>
-			<view class="action-btn" :class="book.status">
-				<u-icon name="plus" size="16" v-if="book.status==='pending'"></u-icon>
-				<text style="margin-left:6rpx">{{ getStatusText(book.status) }}</text>
-			</view>
-		</view>
-		<!-- 选择框 -->
-		<view class="checkbox-wrapper" v-if="isEditMode" >
-			<u-checkbox class="checkbox-item" v-model="book.selected" :label-size="0" :name="book.id" shape="circle" active-color="#38C148"></u-checkbox>
-		</view>
-	</view>
+    <view class="book-item">
+        <!-- 书籍封面 -->
+        <image class="book-cover" :src="book.cover" mode="aspectFill" />
+        <!-- 书籍详情 -->
+        <view class="book-info">
+            <view class="book-title">{{ book.bookName }}</view>
+            <view class="book-price">
+                <text>回收价:</text>
+                <text class="price">¥{{ book.recycleMoney }}</text>
+            </view>
+            <view class="action-btn" :class="statusMap[book.status]">
+                <u-icon name="plus" size="16" v-if="book.status == 2"></u-icon>
+                <text style="margin-left:6rpx">{{ getStatusText(book.status) }}</text>
+            </view>
+        </view>
+        <!-- 选择框 -->
+        <u-checkbox v-show="isEditMode" class="checkbox-item" v-model="book.selected" :name="book.isbn" shape="circle"
+            active-color="#38C148" @change="updateCheckbox"></u-checkbox>
+    </view>
 </template>
 
 <script>
-	export default {
-		name: 'BookListItem',
-		props: {
-			book: {
-				type: Object,
-				required: true
-			},
-			isEditMode: {
-				type: Boolean,
-				default: false
-			}
-		},
-		methods: {
-			onSelect() {
-				this.$emit('select', this.book)
-			},
-			getStatusText(status) {
-				const statusMap = {
-					pending: '加入卖书清单',
-					added: '已加入卖书清单',
-					disabled: '暂不回收'
-				}
-				return statusMap[status] || status
-			}
-		}
-	}
+export default {
+    name: 'BookListItem',
+    props: {
+        book: {
+            type: Object,
+            required: true
+        },
+        isEditMode: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            statusMap: {
+                1: "added",
+                2: 'pending',
+                3: 'disabled'
+            }
+        }
+    },
+    methods: {
+        getStatusText(status) {
+            //  1-已加入卖书清单 2-未加入 3-暂不回收
+            let key = this.statusMap[status]
+            const statusKey = {
+                pending: '加入卖书清单',
+                added: '已加入卖书清单',
+                disabled: '暂不回收'
+            }
+            return statusKey[key] || key
+        },
+        updateCheckbox(value) {
+            this.$set(this.book, 'selected', value)
+            this.$emit('checked', this.book)
+        }
+    }
+}
 </script>
 
 <style lang="scss" scoped>
-	.book-item {
-		position: relative;
-		width: calc((100vw - 80rpx) / 3);
-		background-color: #ffffff;
-		box-sizing: border-box;
-		padding: 20rpx;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		border-radius: 10rpx;
+.book-item {
+    position: relative;
+    width: calc((100vw - 80rpx) / 3);
+    background-color: #ffffff;
+    box-sizing: border-box;
+    padding: 20rpx;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    border-radius: 10rpx;
 
-		.check-icon {
-			position: absolute;
-			left: 6rpx;
-			top: 6rpx;
-			z-index: 1;
-			width: 32rpx;
-			height: 32rpx;
-			background: #38C148;
-			border-radius: 50%;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-		}
+    .check-icon {
+        position: absolute;
+        left: 6rpx;
+        top: 6rpx;
+        z-index: 1;
+        width: 32rpx;
+        height: 32rpx;
+        background: #38C148;
+        border-radius: 50%;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+    }
 
-		.book-cover {
-			width: 140rpx;
-			height: 197rpx;
-			border-radius: 8rpx;
-			margin-bottom: 8rpx;
-		}
+    .book-cover {
+        width: 140rpx;
+        height: 197rpx;
+        border-radius: 8rpx;
+        margin-bottom: 8rpx;
+    }
 
-		.book-info {
-			width: 100%;
+    .book-info {
+        width: 100%;
 
-			.book-title {
-				font-size: 24rpx;
-				color: #333333;
-				margin-bottom: 8rpx;
-				display: -webkit-box;
-				-webkit-box-orient: vertical;
-				-webkit-line-clamp: 1;
-				overflow: hidden;
-			}
+        .book-title {
+            font-size: 24rpx;
+            color: #333333;
+            margin-bottom: 8rpx;
+            display: -webkit-box;
+            -webkit-box-orient: vertical;
+            -webkit-line-clamp: 1;
+            overflow: hidden;
+        }
 
-			.book-price {
-				font-size: 22rpx;
-				margin-bottom: 12rpx;
-				font-family: Source Han Sans CN;
-				font-weight: 400;
-				font-size: 22rpx;
-				color: #999999;
+        .book-price {
+            font-size: 22rpx;
+            margin-bottom: 12rpx;
+            font-family: Source Han Sans CN;
+            font-weight: 400;
+            font-size: 22rpx;
+            color: #999999;
 
-				text {
-					color: #999999;
+            text {
+                color: #999999;
 
-					&.price {
-						color: #FF5B5B;
-					}
-				}
-			}
+                &.price {
+                    color: #FF5B5B;
+                }
+            }
+        }
 
-			.action-btn {
-				width: 100%;
-				padding: 8rpx 0;
-				font-size: 22rpx;
-				border-radius: 8rpx;
-				text-align: center;
-				gap: 4rpx;
+        .action-btn {
+            width: 100%;
+            padding: 8rpx 0;
+            font-size: 22rpx;
+            border-radius: 8rpx;
+            text-align: center;
+            gap: 4rpx;
 
-				&.pending {
-					background: #38C148;
-					color: #FFFFFF;
-				}
+            &.pending {
+                background: #38C148;
+                color: #FFFFFF;
+            }
 
-				&.added {
-					background: #ffffff;
-					color: #38C148;
-					border: 1px solid #38C148;
-				}
+            &.added {
+                background: #ffffff;
+                color: #38C148;
+                border: 1px solid #38C148;
+            }
 
-				&.disabled {
-					background: #F5F5F5;
-					color: #999999;
-				}
-			}
-		}
+            &.disabled {
+                background: #F5F5F5;
+                color: #999999;
+            }
+        }
+    }
 
-		.checkbox-wrapper {
-			position: absolute;
-			right: 6rpx;
-			top: 0;
-			
-		}
-		::v-deep .checkbox-item {
-			.u-checkbox__label{
-				margin: 0 !important;
-			}
-		}
-	}
+    ::v-deep .checkbox-item {
+        position: absolute;
+        right: 6rpx;
+        top: 0;
+        z-index: 9;
+
+        .u-checkbox__label {
+            margin: 0 !important;
+        }
+    }
+}
 </style>

+ 193 - 192
pages-home/components/PickupTimePicker.vue

@@ -1,203 +1,204 @@
 <template>
-	<u-popup mode="bottom" v-model="show" @close="close" border-radius="40">
-		<view class="pickup-time-picker">
-			<view class="picker-header">
-				<text class="title">期望快递上门时间</text>
-				<view class="close-icon" @click="close">
-					<u-icon name="close" size="24"></u-icon>
-				</view>
-			</view>
-
-			<view class="picker-content">
-				<!-- 左侧日期列表 -->
-				<view class="date-list">
-					<view v-for="(day, index) in weekDays" :key="index" class="date-item" :class="{ 
-                            'active': selectedDayIndex === index,
-                        }" @click="selectDay(index)">
-						<text>{{ day.text }}</text>
-					</view>
-				</view>
-
-				<!-- 右侧时间列表 -->
-				<view class="time-list">
-					<view v-for="(time, index) in availableTimes" :key="index" class="time-item" :class="{
+    <u-popup mode="bottom" v-model="show" @close="close" border-radius="40">
+        <view class="pickup-time-picker">
+            <view class="picker-header">
+                <text class="title">期望快递上门时间</text>
+                <view class="close-icon" @click="close">
+                    <u-icon name="close" size="24"></u-icon>
+                </view>
+            </view>
+
+            <view class="picker-content">
+                <!-- 左侧日期列表 -->
+                <view class="date-list">
+                    <view v-for="(day, index) in weekDays" :key="index" class="date-item" :class="{
+                        'active': selectedDayIndex === index,
+                    }" @click="selectDay(index)">
+                        <text>{{ day.text }}</text>
+                    </view>
+                </view>
+
+                <!-- 右侧时间列表 -->
+                <view class="time-list">
+                    <view v-for="(time, index) in availableTimes" :key="index" class="time-item" :class="{
                         'disabled': isTimeDisabled(time),
                         'selected': selectedTimeIndex === index
                     }" @click="selectTime(index, time)">
-						<text>{{ time }}</text>
-						<u-icon name="checkbox-mark" v-if="selectedTimeIndex === index" color="#07c160"></u-icon>
-					</view>
-				</view>
-			</view>
-		</view>
-	</u-popup>
+                        <text>{{ time }}</text>
+                        <u-icon name="checkbox-mark" v-if="selectedTimeIndex === index" color="#07c160"></u-icon>
+                    </view>
+                </view>
+            </view>
+        </view>
+    </u-popup>
 </template>
 
 <script>
-	export default {
-		props: {
-			show: {
-				type: Boolean,
-				default: false
-			}
-		},
-		data() {
-			return {
-				selectedDayIndex: 0,
-				selectedTimeIndex: -1,
-				currentDayIndex: 0,
-				weekDays: [],
-				availableTimes: [
-					'09:00-10:00',
-					'10:00-11:00',
-					'11:00-12:00',
-					'12:00-13:00',
-					'13:00-14:00',
-					'14:00-15:00',
-					'15:00-16:00',
-					'16:00-17:00',
-					'17:00-18:00'
-				]
-			}
-		},
-		created() {
-			this.initializeWeekDays()
-		},
-		methods: {
-			initializeWeekDays() {
-				const today = new Date()
-				const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
-
-				for (let i = 0; i < 5; i++) {
-					const date = new Date(today)
-					date.setDate(today.getDate() + i)
-
-					let text = ''
-					if (i === 0) {
-						text = '今天'
-					} else if (i === 1) {
-						text = '明天'
-					} else {
-						text = weekdays[date.getDay()]
-					}
-
-					text += `(${date.getMonth() + 1}月${date.getDate()}日)`
-
-					this.weekDays.push({
-						text,
-						date,
-						isWeekend: date.getDay() === 0 || date.getDay() === 6
-					})
-				}
-			},
-
-			selectDay(index) {
-				this.selectedDayIndex = index
-				this.selectedTimeIndex = -1 // 切换日期时重置时间选择
-			},
-
-			selectTime(index, time) {
-				if (this.isTimeDisabled(time)) return
-
-				this.selectedTimeIndex = index
-				const selectedDay = this.weekDays[this.selectedDayIndex]
-
-				this.$emit('confirm', {
-					day: selectedDay.text,
-					time: time
-				})
-				this.close()
-			},
-
-			isTimeDisabled(time) {
-				if (this.selectedDayIndex !== 0) return false
-
-				const now = new Date()
-				const [startTime] = time.split('-')
-				const [hours, minutes] = startTime.split(':').map(Number)
-
-				const timeDate = new Date()
-				timeDate.setHours(hours, minutes, 0)
-
-				return timeDate <= now
-			},
-
-			close() {
-				this.$emit('update:show', false)
-			}
-		}
-	}
+export default {
+    props: {
+        show: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {
+            selectedDayIndex: 0,
+            selectedTimeIndex: -1,
+            currentDayIndex: 0,
+            weekDays: [],
+            availableTimes: [
+                '09:00-10:00',
+                '10:00-11:00',
+                '11:00-12:00',
+                '12:00-13:00',
+                '13:00-14:00',
+                '14:00-15:00',
+                '15:00-16:00',
+                '16:00-17:00',
+                '17:00-18:00'
+            ]
+        }
+    },
+    created() {
+        this.initializeWeekDays()
+    },
+    methods: {
+        initializeWeekDays() {
+            const today = new Date()
+            const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
+
+            for (let i = 0; i < 5; i++) {
+                const date = new Date(today)
+                date.setDate(today.getDate() + i)
+
+                let text = ''
+                if (i === 0) {
+                    text = '今天'
+                } else if (i === 1) {
+                    text = '明天'
+                } else {
+                    text = weekdays[date.getDay()]
+                }
+
+                text += `(${date.getMonth() + 1}月${date.getDate()}日)`
+
+                this.weekDays.push({
+                    text,
+                    date,
+                    isWeekend: date.getDay() === 0 || date.getDay() === 6
+                })
+            }
+        },
+
+        selectDay(index) {
+            this.selectedDayIndex = index
+            this.selectedTimeIndex = -1 // 切换日期时重置时间选择
+        },
+
+        selectTime(index, time) {
+            if (this.isTimeDisabled(time)) return
+
+            this.selectedTimeIndex = index
+            const selectedDay = this.weekDays[this.selectedDayIndex]
+
+            this.$emit('confirm', {
+                date: selectedDay.date,
+                day: selectedDay.text,
+                time: time
+            })
+            this.close()
+        },
+
+        isTimeDisabled(time) {
+            if (this.selectedDayIndex !== 0) return false
+
+            const now = new Date()
+            const [startTime] = time.split('-')
+            const [hours, minutes] = startTime.split(':').map(Number)
+
+            const timeDate = new Date()
+            timeDate.setHours(hours, minutes, 0)
+
+            return timeDate <= now
+        },
+
+        close() {
+            this.$emit('update:show', false)
+        }
+    }
+}
 </script>
 
 <style lang="scss" scoped>
-	.pickup-time-picker {
-		background-color: #fff;
-		border-radius: 16rpx 16rpx 0 0;
-
-		.picker-header {
-			padding: 30rpx;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			border-bottom: 1px solid #eee;
-
-			.title {
-				font-size: 32rpx;
-				font-weight: 500;
-				color: #333;
-			}
-		}
-
-		.picker-content {
-			display: flex;
-			height: 760rpx;
-
-			.date-list {
-				width: 45%;
-				background-color: #f8f8f8;
-
-				.date-item {
-					padding: 30rpx 20rpx;
-					text-align: center;
-					font-size: 28rpx;
-					color: #333;
-
-					&.active {
-						background-color: #FFFFFF;
-						color: #07c160;
-					}
-
-					&.weekend {
-						color: #4099ef;
-					}
-				}
-			}
-
-			.time-list {
-				flex: 1;
-				padding: 0 20rpx;
-
-				.time-item {
-					padding: 20rpx 60rpx;
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					font-size: 28rpx;
-					color: #333;
-
-					&.disabled {
-						color: #999;
-					}
-
-					&.selected {
-						color: #07c160;
-					}
-
-					.check-icon {
-						color: #07c160;
-					}
-				}
-			}
-		}
-	}
+.pickup-time-picker {
+    background-color: #fff;
+    border-radius: 16rpx 16rpx 0 0;
+
+    .picker-header {
+        padding: 30rpx;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        border-bottom: 1px solid #eee;
+
+        .title {
+            font-size: 32rpx;
+            font-weight: 500;
+            color: #333;
+        }
+    }
+
+    .picker-content {
+        display: flex;
+        height: 760rpx;
+
+        .date-list {
+            width: 45%;
+            background-color: #f8f8f8;
+
+            .date-item {
+                padding: 30rpx 20rpx;
+                text-align: center;
+                font-size: 28rpx;
+                color: #333;
+
+                &.active {
+                    background-color: #FFFFFF;
+                    color: #07c160;
+                }
+
+                &.weekend {
+                    color: #4099ef;
+                }
+            }
+        }
+
+        .time-list {
+            flex: 1;
+            padding: 0 20rpx;
+
+            .time-item {
+                padding: 20rpx 60rpx;
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                font-size: 28rpx;
+                color: #333;
+
+                &.disabled {
+                    color: #999;
+                }
+
+                &.selected {
+                    color: #07c160;
+                }
+
+                .check-icon {
+                    color: #07c160;
+                }
+            }
+        }
+    }
+}
 </style>

+ 67 - 56
pages-home/pages/book-order.vue

@@ -2,20 +2,19 @@
 	<view class="book-order">
 		<!-- 取货地址部分 -->
 		<view class="section-card">
-			<view class="flex-a flex-j-b mb-20" @click="handleAddress">
+			<view class="flex-a flex-j-b mb-20" @click="handleAddress" v-if="defaultAddr.id">
 				<image src="../static/adderss.png" style="width:40rpx;height: 40rpx;"></image>
 				<view class="flex-d flex-1 ml-24" style="margin-right: 90rpx;">
 					<view class="flex-a flex-j-b  mb-10">
-						<view :style="titleStyle">发货人:三七八</view>
-						<view :style="titleStyle">15138796546</view>
+						<view :style="titleStyle">发货人:{{defaultAddr.name}}</view>
+						<view :style="titleStyle">{{defaultAddr.mobile}}</view>
 					</view>
-					<view :style="titleStyle">地址:河南省郑州市金水区科技市场数
-						码港1501室</view>
+					<view :style="titleStyle">地址:{{defaultAddr.detailAddress}}</view>
 				</view>
 				<u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
 			</view>
 
-			<view class="flex-a flex-j-b" @click="handleAddress">
+			<view class="flex-a flex-j-b" @click="handleAddress" v-else>
 				<view class="flex-a">
 					<u-icon name="plus-circle-fill" :size="48" color="#38C148" top="2"></u-icon>
 					<view :style="titleStyle" class="ml-10 font-30">取货地址</view>
@@ -57,7 +56,7 @@
 				</view>
 
 				<view class="flex-a">
-					<view :style="titleStyle" class="ml-10">{{ selectedExpress || '请选择' }}</view>
+					<view :style="titleStyle" class="ml-10">{{ submitData.expressDelivery || '请选择' }}</view>
 					<u-icon name="arrow-right" :size="28" color="#666" top="3"></u-icon>
 				</view>
 			</view>
@@ -111,63 +110,48 @@
 					color: '#333333',
 				},
 				agreed: false,
-				books: [{
-						id: 1,
-						title: '这里是书本名称不换行',
-						coverUrl: '/static/img/default-cover.png',
-						price: 32.20,
-						quantity: 2,
-						tags: ['套装书', '可买多本']
-					},
-					{
-						id: 2,
-						title: '这里是书本名称换行文字过长这里是书本名称换行文...',
-						coverUrl: '/static/img/default-cover.png',
-						price: 32.20,
-						quantity: 19,
-						tags: ['可买多本']
-					},
-					{
-						id: 3,
-						title: '三国演义珍藏版',
-						coverUrl: '/static/img/default-cover.png',
-						price: 45.50,
-						quantity: 1,
-						tags: ['套装书']
-					},
-					{
-						id: 4,
-						title: '红楼梦典藏版全集',
-						coverUrl: '/static/img/default-cover.png',
-						price: 58.80,
-						quantity: 3,
-						tags: ['套装书', '可买多本']
-					}
-				],
+				books: [],
 
 				showPicker: false,
-				selectedExpress: '',
 				expressList: [{
 					name: '顺丰'
 				}, {
 					name: '京东'
 				}],
 				showTimePicker: false,
-				selectedTime: {}
+				selectedTime: {},
+				defaultAddr: {},
+
+				submitData: {
+					expressDelivery: '',
+					"orderId": "",
+					"addressId": "",
+					"schedulePickupStartTime": "",
+					"schedulePickupEndTime": "",
+					"expressDelivery": "",
+					"remark": ""
+				}
 			}
 		},
 		computed: {
 			totalBooks() {
-				return this.books.reduce((sum, book) => sum + (book.quantity || 1), 0)
+				return this.books.reduce((sum, book) => sum + (book.num || 1), 0)
 			},
 			totalPrice() {
-				return this.books.reduce((sum, book) => sum + book.price * (book.quantity || 1), 0).toFixed(2)
+				return this.books.reduce((sum, book) => sum + book.recycleMoney * (book.num || 1), 0).toFixed(2)
 			}
 		},
 		methods: {
 			//时间选择
 			onTimeConfirm(data) {
 				this.selectedTime = data
+				//格式化提交数据的时间
+				let date = this.$u.timeFormat(data.date, 'yyyy-mm-dd')
+				let times = data.time.split('-')
+
+				this.submitData.schedulePickupStartTime = `${date} ${times[0]}`
+				this.submitData.schedulePickupEndTime = `${date} ${times[1]}`
+				console.log(date, this.submitData, 'data')
 			},
 
 			//打开快递选择器
@@ -178,21 +162,16 @@
 			onExpressConfirm(e) {
 				if (!e.length) return
 				let item = this.expressList[e[0]]
-				this.selectedExpress = item.name
+				this.submitData.expressDelivery = item.name
 				this.showPicker = false
 			},
 			//添加或者选择地址
 			handleAddress() {
 				uni.navigateTo({
-					url: "/pages-mine/pages/address/list"
+					url: "/pages-mine/pages/address/list?id=" + this.defaultAddr.id
 				})
 			},
 
-			handleDeleteBook(bookId) {
-				this.books = this.books.filter(book => book.id !== bookId)
-				// 更新总数和总价
-				this.calculateTotal()
-			},
 			calculateTotal() {
 				this.totalBooks = this.books.reduce((sum, book) => sum + book.quantity, 0)
 				this.totalPrice = this.books
@@ -205,20 +184,52 @@
 					return
 				}
 				// 处理订单提交
-				console.log('提交订单')
-				uni.navigateTo({
-					url: "/pages-home/pages/order-success"
+				uni.$u.http.post('/token/order/submitOrder', this.submitData).then(res => {
+					if (res.code == 200) {
+						uni.navigateTo({
+							url: "/pages-home/pages/order-success"
+						})
+					} else {
+						uni.showToast({
+							title: res.msg,
+							icon: 'none'
+						})
+					}
 				})
 			},
 			//获取默认地址 /api/token/user/address/getDefault
 			getDefaultAddress() {
 				uni.$u.http.get('/token/user/address/getDefault').then(res => {
-					console.log(res, 'getDefaultAddress')
+					if (res.code == 200) {
+						this.defaultAddr = res.data
+						this.submitData.addressId = this.defaultAddr.id
+					}
 				})
-			}
+			},
+			//获取当前用户未提交订单 /api/token/order/lastOrder
+			getLastOrder() {
+				uni.$u.http.get('/token/order/lastOrder').then(res => {
+					if (res.code == 200) {
+						this.books = res.data ? res.data.orderDetailList.map(v => {
+								v.orderId = res.data.orderId
+								return v
+							}) : [],
+
+							this.submitData.orderId = this.books[0].orderId
+					}
+				})
+			},
 		},
 		mounted() {
 			this.getDefaultAddress()
+			this.getLastOrder()
+
+			uni.$on('selectAddr', (item) => {
+				if (item.id) {
+					this.defaultAddr = item
+					this.submitData.addressId = this.defaultAddr.id
+				}
+			})
 		}
 	}
 </script>

+ 174 - 241
pages-home/pages/scaned-book.vue

@@ -1,249 +1,182 @@
 <template>
-	<view class="scan-history">
-		<!-- 顶部操作栏 -->
-		<view class="header" v-if="bookList.length">
-			<view class="left">
-				<u-checkbox v-if="isEditMode" class="checkbox-item" v-model="isAllSelected" @change="toggleSelectAll"
-					shape="circle" active-color="#38C148"></u-checkbox>
-				<text v-if="isEditMode" class="select-text">全选</text>
-			</view>
-			<view class="right">
-				<text v-if="!isEditMode" @tap="toggleEditMode">管理</text>
-				<text v-else class="delete-btn" @tap="handleDelete">删除</text>
-			</view>
-		</view>
-
-		<!-- 书籍列表 -->
-		<scroll-view class="scroll-view" scroll-y refresher-enabled :refresher-triggered="isRefreshing"
-			@refresherrefresh="onRefresh" @scrolltolower="onLoadMore">
-			<!-- 空状态 -->
-			<view v-if="!loading && !bookList.length" class="empty-state">
-				<u-empty mode="list" text="暂无扫描记录" margin-top="200"></u-empty>
-			</view>
-			<u-checkbox-group v-else v-model="checkedIds">
-				<view class="book-list">
-					<BookListItem v-for="book in bookList" :key="book.id" :book="book" :isEditMode="isEditMode" />
-
-					<!-- 加载更多 -->
-					<view class="load-more" v-if="bookList.length > 0">
-						<u-divider bg-color="#f8f8f8">{{ hasMore ? '加载中...' : '我是有底线的' }}</u-divider>
-					</view>
-				</view>
-			</u-checkbox-group>
-		</scroll-view>
-
-		<!-- 删除确认弹窗 -->
-		<common-dialog ref="deleteDialog" title="温馨提示" @confirm="confirmDelete">
-			<text>确定删除这本图书吗?</text>
-		</common-dialog>
-	</view>
+    <view class="scan-history">
+        <!-- 顶部操作栏 -->
+        <view class="header" v-if="bookList.length">
+            <view class="left">
+                <u-checkbox v-if="isEditMode" class="checkbox-item" v-model="isAllSelected" @change="toggleSelectAll"
+                    shape="circle" active-color="#38C148"></u-checkbox>
+                <text v-if="isEditMode" class="select-text">全选</text>
+            </view>
+            <view class="right">
+                <text v-if="!isEditMode" @tap="toggleEditMode">管理</text>
+                <text v-else @tap="handleDelete">移除待售藏书</text>
+            </view>
+        </view>
+
+        <!-- 书籍列表 -->
+        <page-scroll :page-size="12" @updateList="handleUpdateList" ref="pageRef" slotEmpty>
+            <template #empty>
+                <view class="flex-d flex-a-c" style="padding-top: 25vh;">
+                    <image src="../static/no-data.png" style="width:100%;height:260rpx" mode="heightFix"></image>
+                    <view class="common-title" style="padding:33rpx 0 20rpx 0">暂无内容</view>
+                    <view class="common-text">您暂未扫过书籍</view>
+                </view>
+            </template>
+
+            <u-checkbox-group v-model="checkedIds">
+                <view class="book-list">
+                    <BookListItem v-for="book in bookList" :key="book.isbn" :book="book" :isEditMode="isEditMode" />
+                </view>
+            </u-checkbox-group>
+        </page-scroll>
+
+        <!-- 删除确认弹窗 -->
+        <common-dialog ref="deleteDialog" title="温馨提示" @confirm="confirmDelete">
+            <text>确定删除这本图书吗?</text>
+        </common-dialog>
+    </view>
 </template>
 
 <script>
-	import BookListItem from '../components/BookListItem.vue'
-	import commonDialog from '@/components/common-dialog.vue'
-
-	export default {
-		components: {
-			BookListItem,
-			commonDialog
-		},
-		data() {
-			return {
-				isEditMode: false,
-				isRefreshing: false,
-				loading: false,
-				page: 1,
-				pageSize: 10,
-				hasMore: true,
-				bookList: [],
-				checkedIds: []
-			}
-		},
-		computed: {
-			isAllSelected() {
-				return this.bookList.length > 0 && this.bookList.every(book => book.selected)
-			}
-		},
-		onLoad() {
-			this.loadData()
-		},
-		methods: {
-			// 加载数据
-			async loadData(isRefresh = false) {
-				if (isRefresh) {
-					this.page = 1
-					this.hasMore = true
-				}
-
-				if (!this.hasMore || this.loading) return
-
-				this.loading = true
-
-				try {
-					const res = await this.fetchBookList()
-
-					if (isRefresh) {
-						this.bookList = res.list
-					} else {
-						this.bookList = [...this.bookList, ...res.list]
-					}
-
-					this.hasMore = res.hasMore
-					this.page++
-				} catch (error) {
-					uni.showToast({
-						title: '加载失败',
-						icon: 'none'
-					})
-				} finally {
-					this.loading = false
-					if (isRefresh) {
-						this.isRefreshing = false
-					}
-				}
-			},
-
-			// 模拟获取数据
-			fetchBookList() {
-				return new Promise((resolve) => {
-					setTimeout(() => {
-						const list = Array(this.pageSize).fill().map((_, index) => ({
-							id: (this.page - 1) * this.pageSize + index + 1,
-							title: `这里是书本名称${(this.page - 1) * this.pageSize + index + 1}`,
-							price: '32.20',
-							coverUrl: 'https://ts1.cn.mm.bing.net/th/id/R-C.741a4e06ace8ed3a2a47d2a7fc53efa6?rik=OTex%2bIz3NhB3vw&riu=http%3a%2f%2fsdwypress.com%2fuploads%2fimage%2f2106%2f24%2f210624143125esxhc.jpg&ehk=bJB%2f6p6aW7wkHHbCiUTcnRf%2bNLwOktGxYScy28rgjwg%3d&risl=&pid=ImgRaw&r=0',
-							status: Math.random() > 0.5 ? 'pending' : 'added',
-							selected: false
-						}))
-
-						resolve({
-							list,
-							hasMore: this.page < 3 // 模拟只有3页数据
-						})
-					}, 1000)
-				})
-			},
-
-			// 下拉刷新
-			async onRefresh() {
-				if (this.loading) return
-				this.isRefreshing = true
-				await this.loadData(true)
-			},
-
-			// 上拉加载更多
-			async onLoadMore() {
-				if (this.loading || !this.hasMore) return
-				await this.loadData()
-			},
-
-			// 切换编辑模式
-			toggleEditMode() {
-				this.isEditMode = !this.isEditMode
-				if (!this.isEditMode) {
-					this.bookList.forEach(book => book.selected = false)
-				}
-			},
-
-			// 切换全选
-			toggleSelectAll() {
-				const newValue = !this.isAllSelected
-				this.bookList.forEach(book => book.selected = newValue)
-			},
-
-			// 处理删除
-			handleDelete() {
-				if (this.checkedIds.length === 0) {
-					uni.showToast({
-						title: '请选择要删除的记录',
-						icon: 'none'
-					})
-					return
-				}
-				this.$refs.deleteDialog.openPopup()
-			},
-
-			// 确认删除
-			confirmDelete() {
-				this.bookList = this.bookList.filter(book => !book.selected)
-				if (this.bookList.length === 0) {
-					this.isEditMode = false
-				}
-				uni.showToast({
-					title: '删除成功',
-					icon: 'success'
-				})
-			}
-		}
-	}
+import BookListItem from '../components/BookListItem.vue'
+import commonDialog from '@/components/common-dialog.vue'
+import pageScroll from '@/components/pageScroll/index.vue'
+
+export default {
+    components: {
+        BookListItem,
+        commonDialog,
+        pageScroll
+    },
+    data() {
+        return {
+            isEditMode: false,
+            bookList: [],
+            checkedIds: [],
+            isAllSelected: false
+        }
+    },
+    mounted() {
+        this.$refs.pageRef?.loadData(true)
+    },
+    methods: {
+        handleUpdateList(data) {
+            this.bookList = data.map(v => {
+                v.selected = false
+                return v
+            })
+        },
+
+        // 切换编辑模式
+        toggleEditMode() {
+            this.isEditMode = !this.isEditMode
+            if (!this.isEditMode) {
+                this.bookList.forEach(book => book.selected = false)
+            }
+        },
+
+        // 切换全选
+        toggleSelectAll() {
+            const newValue = !this.isAllSelected
+            console.log(newValue, 'newValue')
+            this.bookList.forEach(book => book.selected = newValue)
+        },
+
+        // 处理删除
+        handleDelete() {
+            let deleteIds = this.bookList.filter(book => book.selected)
+            if (deleteIds.length === 0) {
+                uni.showToast({
+                    title: '请选择要删除的记录',
+                    icon: 'none'
+                })
+                return
+            }
+            this.$refs.deleteDialog.openPopup()
+        },
+
+        // 确认删除
+        confirmDelete() {
+            let deleteIds = this.bookList.filter(book => book.selected).map(v => v.isbn)
+            uni.$u.http.post('/token/order/removeScanLogs', deleteIds).then(res => {
+                if (res.code === 200) {
+                    uni.showToast({
+                        title: '删除成功',
+                        icon: 'success'
+                    })
+                    this.$refs.pageRef?.loadData(true)
+                }
+            })
+        }
+    }
+}
 </script>
 
 <style lang="scss">
-	.scan-history {
-		min-height: 100vh;
-
-		::v-deep .checkbox-item {
-			.u-checkbox__label {
-				margin: 0 !important;
-			}
-		}
-
-		.header {
-			position: sticky;
-			top: 0;
-			left: 0;
-			right: 0;
-			z-index: 100;
-			height: 88rpx;
-			background: #FFFFFF;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			padding: 0 30rpx;
-			font-size: 28rpx;
-			border-bottom: 1rpx solid #EEEEEE;
-
-			.left {
-				display: flex;
-				align-items: center;
-
-				.select-text {
-					margin-left: 12rpx;
-					color: #333333;
-				}
-			}
-
-			.right {
-				text {
-					color: #333333;
-
-					&.delete-btn {
-						color: #FF5B5B;
-					}
-				}
-			}
-		}
-
-		.scroll-view {
-			height: calc(100vh - 88rpx);
-		}
-
-		.book-list {
-			padding: 20rpx;
-			display: flex;
-			flex-wrap: wrap;
-			justify-content: flex-start;
-			gap: 20rpx;
-
-			.load-more {
-				width: 100%;
-				display: flex;
-				color: #999999;
-				font-size: 24rpx;
-				padding: 30rpx 0;
-				justify-content: center;
-			}
-		}
-	}
+.scan-history {
+    min-height: 100vh;
+
+    ::v-deep .checkbox-item {
+        .u-checkbox__label {
+            margin: 0 !important;
+        }
+    }
+
+    .header {
+        position: sticky;
+        top: 0;
+        left: 0;
+        right: 0;
+        z-index: 100;
+        height: 88rpx;
+        background: #FFFFFF;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        padding: 0 30rpx;
+        font-size: 28rpx;
+        border-bottom: 1rpx solid #EEEEEE;
+
+        .left {
+            display: flex;
+            align-items: center;
+
+            .select-text {
+                margin-left: 12rpx;
+                color: #333333;
+            }
+        }
+
+        .right {
+            text {
+                color: #333333;
+
+                &.delete-btn {
+                    color: #FF5B5B;
+                }
+            }
+        }
+    }
+
+    .scroll-view {
+        height: calc(100vh - 88rpx);
+    }
+
+    .book-list {
+        padding: 20rpx;
+        display: flex;
+        flex-wrap: wrap;
+        justify-content: flex-start;
+        gap: 20rpx;
+
+        .load-more {
+            width: 100%;
+            display: flex;
+            color: #999999;
+            font-size: 24rpx;
+            padding: 30rpx 0;
+            justify-content: center;
+        }
+    }
+}
 </style>

+ 146 - 0
pages-mine/components/address-card.vue

@@ -0,0 +1,146 @@
+<template>
+	<view class="address-card" :class="{ 'address-card--selected': selected }" @tap="handleClick">
+		<!-- 选中状态的勾 -->
+		<view class="selected-icon" v-if="selected">
+			<u-icon name="checkmark" color="#FFFFFF" size="24"></u-icon>
+		</view>
+
+		<!-- 主要内容区 -->
+		<view class="content flex-a">
+			<image src="../static/adderss.png" style="width:40rpx;height: 40rpx;"></image>
+
+			<view class="flex-1 mr-40 ml-24 flex-d">
+				<view class="header flex-a flex-1 mb-24">
+					<view class="name-phone">
+						<text class="common-text-2">{{ address.name }}</text>
+						<text class="common-text-2 ml-20">{{ address.mobile }}</text>
+					</view>
+					<view class="status ml-40" v-if="address.defaultFlag==1">默认</view>
+				</view>
+				<view class="common-text-2">{{ address.fullAddress }}</view>
+			</view>
+
+			<!-- 右侧箭头 -->
+			<u-icon name="arrow-right" size="32" color="#999"></u-icon>
+		</view>
+
+		<!-- 底部操作区 -->
+		<view class="footer flex-a flex-j-b">
+			<view class="common-text-2">
+				<u-checkbox v-model="isDefault" @change="onDefaultChange" shape="circle"
+					active-color="#38C148">默认地址</u-checkbox>
+			</view>
+			<view class="common-text-2" @click.stop="onDelete">删除</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'address-item',
+		props: {
+			address: {
+				type: Object,
+				default: () => ({})
+			},
+			selected: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				isDefault: false
+			}
+		},
+		watch: {
+			address: {
+				handler(value) {
+					this.isDefault = value.defaultFlag == 1
+				},
+				deep: true,
+				immediate: true
+			}
+		},
+		methods: {
+			handleClick() {
+				this.$emit('tapItem', this.address)
+			},
+
+			onDefaultChange(value) {
+				if (this.address.defaultFlag == 1) return this.isDefault = true
+
+				let id = this.address.id
+				uni.$u.http.post(`/token/user/address/setDefault/${id}`).then(res => {
+					if (res.code == 200) {
+						uni.showToast({
+							icon: "none",
+							title: "设置默认地址成功"
+						})
+						this.$emit('success')
+					} else {
+						uni.showToast({
+							icon: "none",
+							title: res.msg
+						})
+						this.isDefault = false
+					}
+				})
+			},
+			onDelete() {
+				this.$emit('delete', this.address.id)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.address-card {
+		position: relative;
+		background-color: #FFFFFF;
+		padding: 20rpx 30rpx;
+		margin-bottom: 20rpx;
+		border-radius: 12rpx;
+		border: 2rpx solid transparent;
+		transition: all 0.3s;
+		margin-bottom: 20rpx;
+
+		// 选中状态样式
+		&--selected {
+			border-color: #38C148;
+			background-color: rgba(56, 193, 72, 0.05);
+		}
+
+		// 选中状态的勾
+		.selected-icon {
+			position: absolute;
+			right: -2rpx;
+			top: -2rpx;
+			width: 40rpx;
+			height: 40rpx;
+			background-color: #38C148;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			border-bottom-left-radius: 12rpx;
+			border-top-right-radius: 12rpx;
+		}
+
+
+
+		.status {
+			font-size: 24rpx;
+			color: #38C148;
+			padding: 4rpx 12rpx;
+			border: 1px solid #38C148;
+			border-radius: 6rpx;
+		}
+
+
+		.footer {
+			margin-top: 20rpx;
+			padding-top: 20rpx;
+			border-top: 1rpx solid #EEEEEE;
+		}
+	}
+</style>

+ 216 - 215
pages-mine/components/city-picker.vue

@@ -1,25 +1,18 @@
 <template>
-	<u-popup
-		v-model="value"
-		mode="bottom"
-		:popup="false"
-		:mask="true"
-		:closeable="true"
-		:safe-area-inset-bottom="true"
-		close-icon-color="#ffffff"
-		:z-index="uZIndex"
-		:maskCloseAble="maskCloseAble"
-		@close="close"
-	>
-		<u-tabs v-if="value" :list="genTabsList" :is-scroll="true" :current="tabsIndex" @change="tabsChange" ref="tabs"></u-tabs>
+	<u-popup v-model="value" mode="bottom" :popup="false" :mask="true" :closeable="true" :safe-area-inset-bottom="true"
+		close-icon-color="#ffffff" :z-index="uZIndex" :maskCloseAble="maskCloseAble" @close="close">
+		<u-tabs v-if="value" :list="genTabsList" :is-scroll="true" :current="tabsIndex" @change="tabsChange"
+			ref="tabs"></u-tabs>
 		<view class="area-box">
 			<view class="u-flex" :class="{ change: isChange }">
 				<view class="area-item">
 					<view class="u-padding-10 u-bg-gray" style="height: 100%;">
 						<scroll-view :scroll-y="true" style="height: 100%">
 							<u-cell-group>
-								<u-cell-item v-for="(item, index) in addressList" :title="item.name" :arrow="false" :index="index" :key="index" @click="provinceChange">
-									<u-icon v-show="isChooseP && province == index" slot="right-icon" size="34" name="checkbox-mark"></u-icon>
+								<u-cell-item v-for="(item, index) in addressList" :title="item.name" :arrow="false"
+									:index="index" :key="index" @click="provinceChange">
+									<u-icon v-show="isChooseP && province == index" slot="right-icon" size="34"
+										name="checkbox-mark"></u-icon>
 								</u-cell-item>
 							</u-cell-group>
 						</scroll-view>
@@ -29,8 +22,10 @@
 					<view class="u-padding-10 u-bg-gray" style="height: 100%;">
 						<scroll-view :scroll-y="true" style="height: 100%">
 							<u-cell-group v-if="isChooseP">
-								<u-cell-item v-for="(item, index) in addressList[province].children" :title="item.name" :arrow="false" :index="index" :key="index" @click="cityChange">
-									<u-icon v-show="isChooseC && city == index" slot="right-icon" size="34" name="checkbox-mark"></u-icon>
+								<u-cell-item v-for="(item, index) in addressList[province].children" :title="item.name"
+									:arrow="false" :index="index" :key="index" @click="cityChange">
+									<u-icon v-show="isChooseC && city == index" slot="right-icon" size="34"
+										name="checkbox-mark"></u-icon>
 								</u-cell-item>
 							</u-cell-group>
 						</scroll-view>
@@ -41,8 +36,10 @@
 					<view class="u-padding-10 u-bg-gray" style="height: 100%;">
 						<scroll-view :scroll-y="true" style="height: 100%">
 							<u-cell-group v-if="isChooseC">
-								<u-cell-item v-for="(item, index) in addressList[province].children[city].children" :title="item.name" :arrow="false" :index="index" :key="index" @click="areaChange">
-									<u-icon v-show="isChooseA && area == index" slot="right-icon" size="34" name="checkbox-mark"></u-icon>
+								<u-cell-item v-for="(item, index) in addressList[province].children[city].children"
+									:title="item.name" :arrow="false" :index="index" :key="index" @click="areaChange">
+									<u-icon v-show="isChooseA && area == index" slot="right-icon" size="34"
+										name="checkbox-mark"></u-icon>
 								</u-cell-item>
 							</u-cell-group>
 						</scroll-view>
@@ -54,218 +51,222 @@
 </template>
 
 <script>
-
-export default {
-	name: 'city-picker',
-	props: {
-		// 通过双向绑定控制组件的弹出与收起
-		value: {
-			type: Boolean,
-			default: false
-		},
-		// 默认显示的地区,可传类似["河北省", "秦皇岛市", "北戴河区"]
-		defaultRegion: {
-			type: Array,
-			default() {
-				return [];
-			}
-		},
-		// 默认显示地区的编码,defaultRegion和areaCode同时存在,areaCode优先,可传类似["13", "1303", "130304"]
-		areaCode: {
-			type: Array,
-			default() {
-				return [];
+	export default {
+		name: 'city-picker',
+		props: {
+			// 通过双向绑定控制组件的弹出与收起
+			value: {
+				type: Boolean,
+				default: false
+			},
+			// 默认显示的地区,可传类似["河北省", "秦皇岛市", "北戴河区"]
+			defaultRegion: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			// 默认显示地区的编码,defaultRegion和areaCode同时存在,areaCode优先,可传类似["13", "1303", "130304"]
+			areaCode: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			// 是否允许通过点击遮罩关闭Picker
+			maskCloseAble: {
+				type: Boolean,
+				default: true
+			},
+			// 弹出的z-index值
+			zIndex: {
+				type: [String, Number],
+				default: 0
 			}
 		},
-		// 是否允许通过点击遮罩关闭Picker
-		maskCloseAble: {
-			type: Boolean,
-			default: true
+		data() {
+			return {
+				// addressList:[],
+
+
+				cityValue: '',
+				isChooseP: false, //是否已经选择了省
+				province: 0, //省级下标
+				provinces: [],
+				isChooseC: false, //是否已经选择了市
+				city: 0, //市级下标
+				citys: [],
+				isChooseA: false, //是否已经选择了区
+				area: 0, //区级下标
+				areas: [],
+				tabsIndex: 0
+			};
 		},
-		// 弹出的z-index值
-		zIndex: {
-			type: [String, Number],
-			default: 0
-		}
-	},
-	data() {
-		return {
-			// addressList:[],
-			
-			
-			cityValue: '',
-			isChooseP: false, //是否已经选择了省
-			province: 0, //省级下标
-			provinces: [],
-			isChooseC: false, //是否已经选择了市
-			city: 0, //市级下标
-			citys: [],
-			isChooseA: false, //是否已经选择了区
-			area: 0, //区级下标
-			areas: [],
-			tabsIndex: 0
-		};
-	},
-	mounted() {
-		if(this.addressList.length<1){
-			this.getRegionList();
-		}else{
-			this.init();
-			
-		}
-		
-	},
-	computed: {
-		isChange() {
-			return this.tabsIndex > 1;
+		mounted() {
+			if (this.addressList.length < 1) {
+				this.getRegionList();
+			} else {
+				this.init();
+
+			}
+
 		},
-		genTabsList() {
-			let tabsList = [
-				{
+		computed: {
+			isChange() {
+				return this.tabsIndex > 1;
+			},
+			genTabsList() {
+				let tabsList = [{
 					name: '请选择'
+				}];
+				if (this.isChooseP) {
+					tabsList[0].name = this.addressList[this.province].name;
+					tabsList[1] = {
+						name: '请选择'
+					};
 				}
-			];
-			if (this.isChooseP) {
-				tabsList[0].name = this.addressList[this.province].name;
-				tabsList[1] = {
-					name: '请选择'
-				};
-			}
-			if (this.isChooseC) {
-				tabsList[1].name = this.addressList[this.province].children[this.city].name;
-				tabsList[2] = {
-					name: '请选择'
-				};
-			}
-			if (this.isChooseA) {
-				tabsList[2].name = this.addressList[this.province].children[this.city].children[this.area].name;
-			}
-			return tabsList;
-		},
-		uZIndex() {
-			// 如果用户有传递z-index值,优先使用
-			return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
-		},
-		// 地址列表
-		addressList() {
-			return this.$store.state.pub.addressList;
-		},
-	},
-	methods: {		
-		getRegionList(){
-			this.$u.api.getRegionListAjax().then(({code,data})=>{
-				if(code==1){
-					this.$store.commit('pub/commitAddressList',data)
-					this.init();
+				if (this.isChooseC) {
+					tabsList[1].name = this.addressList[this.province].children[this.city].name;
+					tabsList[2] = {
+						name: '请选择'
+					};
 				}
-			})
-		},
-		init() {
-			// 这里只会传code形式的,不传文本
-			if(this.areaCode[0]){
-				this.setProvince();
-			}
-		},
-		setProvince() {
-			// 查询省 索引
-			const list = this.addressList;
-			list.map((v, k) => {
-				if (v.code == this.areaCode[0]) {
-					this.provinceChange(k);
-					if(this.areaCode[1]){
-						// 查询城市索引
-						this.setCity(k);
-					}
-					
+				if (this.isChooseA) {
+					tabsList[2].name = this.addressList[this.province].children[this.city].children[this.area].name;
 				}
-			});
+				return tabsList;
+			},
+			uZIndex() {
+				// 如果用户有传递z-index值,优先使用
+				return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
+			},
+			// 地址列表
+			addressList() {
+				return this.$store.state.pub.addressList;
+			},
 		},
-		setCity(pi,ci,ai) {
-			// pi,ci,ai 省市区 索引
-			const list = this.addressList[pi].children;
-			list.map((v, k) => {
-				if (v.code == this.areaCode[1]) {
-					this.cityChange(k);
-					if(this.areaCode[2]){
-						// 查询地区索引
-						this.setArea(pi,k);
+		methods: {
+			getRegionList() {
+				uni.$u.http.get('/token/getAllDistrict').then(res => {
+					console.log(res, 'xxxxxxxxxxx')
+				})
+
+				this.$u.api.getRegionListAjax().then(({
+					code,
+					data
+				}) => {
+					if (code == 1) {
+						this.$store.commit('pub/commitAddressList', data)
+						this.init();
 					}
+				})
+			},
+			init() {
+				// 这里只会传code形式的,不传文本
+				if (this.areaCode[0]) {
+					this.setProvince();
 				}
-			});
-		},
-		setArea(pi,ci,ai) {
-			const list = this.addressList[pi].children[ci].children;
-			list.map((v, k) => {
-				if (v.code == this.areaCode[2]) {
-					this.isChooseA = true;
-					this.area = k;
+			},
+			setProvince() {
+				// 查询省 索引
+				const list = this.addressList;
+				list.map((v, k) => {
+					if (v.code == this.areaCode[0]) {
+						this.provinceChange(k);
+						if (this.areaCode[1]) {
+							// 查询城市索引
+							this.setCity(k);
+						}
+
+					}
+				});
+			},
+			setCity(pi, ci, ai) {
+				// pi,ci,ai 省市区 索引
+				const list = this.addressList[pi].children;
+				list.map((v, k) => {
+					if (v.code == this.areaCode[1]) {
+						this.cityChange(k);
+						if (this.areaCode[2]) {
+							// 查询地区索引
+							this.setArea(pi, k);
+						}
+					}
+				});
+			},
+			setArea(pi, ci, ai) {
+				const list = this.addressList[pi].children[ci].children;
+				list.map((v, k) => {
+					if (v.code == this.areaCode[2]) {
+						this.isChooseA = true;
+						this.area = k;
+					}
+				});
+			},
+			close() {
+				this.$emit('input', false);
+			},
+			tabsChange(index) {
+				this.tabsIndex = index;
+			},
+			provinceChange(index) {
+				this.isChooseP = true;
+				this.isChooseC = false;
+				this.isChooseA = false;
+				this.province = index;
+				this.citys = this.addressList[index].children;
+				this.tabsIndex = 1;
+			},
+			cityChange(index) {
+				this.isChooseC = true;
+				this.isChooseA = false;
+				this.city = index;
+				if (this.citys[index].children[0]) {
+					this.areas = this.citys[index].children;
+					this.tabsIndex = 2;
+					return false;
 				}
-			});
-		},
-		close() {
-			this.$emit('input', false);
-		},
-		tabsChange(index) {
-			this.tabsIndex = index;
-		},
-		provinceChange(index) {
-			this.isChooseP = true;
-			this.isChooseC = false;
-			this.isChooseA = false;
-			this.province = index;
-			this.citys = this.addressList[index].children;
-			this.tabsIndex = 1;
-		},
-		cityChange(index) {
-			this.isChooseC = true;
-			this.isChooseA = false;
-			this.city = index;
-			if(this.citys[index].children[0]){
-				this.areas = this.citys[index].children;
-				this.tabsIndex = 2;
-				return false;
-			}
-			let result = {};
-			
-			result.province = this.addressList[this.province];
-			result.city = this.addressList[this.province].children[this.city];
-			this.$emit('city-change', result);
-			this.close();
-		},
-		areaChange(index) {
-			this.isChooseA = true;
-			this.area = index;
-			let result = {};
-			
-			result.province = this.addressList[this.province];
-			result.city = this.addressList[this.province].children[this.city];
-			result.area = this.addressList[this.province].children[this.city].children[this.area];
-			
-			this.$emit('city-change', result);
-			this.close();
-		},
-	}
-};
+				let result = {};
+
+				result.province = this.addressList[this.province];
+				result.city = this.addressList[this.province].children[this.city];
+				this.$emit('city-change', result);
+				this.close();
+			},
+			areaChange(index) {
+				this.isChooseA = true;
+				this.area = index;
+				let result = {};
+
+				result.province = this.addressList[this.province];
+				result.city = this.addressList[this.province].children[this.city];
+				result.area = this.addressList[this.province].children[this.city].children[this.area];
+
+				this.$emit('city-change', result);
+				this.close();
+			},
+		}
+	};
 </script>
 <style lang="scss" scoped>
-.area-box {
-	width: 100%;
-	overflow: hidden;
-	height: 800rpx;
+	.area-box {
+		width: 100%;
+		overflow: hidden;
+		height: 800rpx;
 
-	> view {
-		width: 150%;
-		transition: transform 0.3s ease-in-out 0s;
-		transform: translateX(0);
+		>view {
+			width: 150%;
+			transition: transform 0.3s ease-in-out 0s;
+			transform: translateX(0);
 
-		&.change {
-			transform: translateX(-33.3333333%);
+			&.change {
+				transform: translateX(-33.3333333%);
+			}
 		}
-	}
 
-	.area-item {
-		width: 33.3333333%;
-		height: 800rpx;
+		.area-item {
+			width: 33.3333333%;
+			height: 800rpx;
+		}
 	}
-}
-</style>
+</style>

+ 49 - 59
pages-mine/pages/address/add-or-update.vue

@@ -3,20 +3,21 @@
 		<view class="form">
 			<u-form :model="form" ref="form" label-width="180rpx">
 				<u-form-item label="收货人">
-					<u-input v-model="form.realname" placeholder="请输入收货人姓名" />
+					<u-input v-model="form.name" placeholder="请输入收货人姓名" />
 				</u-form-item>
 				<u-form-item label="联系方式">
 					<u-input v-model="form.mobile" placeholder="请输入联系方式" />
 				</u-form-item>
 				<u-form-item label="所在地区">
-					<u-input v-model="cityPickerLabel" type="select" placeholder="请选择所在地区"
-						@click="showCityPicker = true" />
+					<uni-data-picker v-model="selAddressCodes" :localdata="dataList" placeholder="请选择所在地区"
+						popup-title="请选择所在地区" @change="cityChange"></uni-data-picker>
 				</u-form-item>
 				<u-form-item label="详细地址">
-					<u-input v-model="form.street" placeholder="请输入详细地址" />
+					<u-input v-model="form.detailAddress" placeholder="请输入详细地址" />
 				</u-form-item>
 				<u-form-item :border-bottom="false" label="设为默认地址">
-					<u-switch slot="right" v-model="form.is_default" :active-value="1" :inactive-value="0" :active-color="appThemeColor"></u-switch>
+					<u-switch slot="right" v-model="form.defaultFlag" :active-value="1" :inactive-value="0"
+						:active-color="appThemeColor"></u-switch>
 				</u-form-item>
 			</u-form>
 		</view>
@@ -26,8 +27,6 @@
 				<text>保存地址</text>
 			</u-button>
 		</view>
-		<!-- 省市区选择器 -->
-		<CityPicker v-model="showCityPicker" :area-code="selAddressCodes" @city-change="cityChange"></CityPicker>
 	</view>
 </template>
 
@@ -45,24 +44,20 @@
 				// 表单
 				form: {
 					id: null,
-					type: 'add',
-					realname: '',
-					mobile: '',
-					province: '',
-					city: '',
-					area: '',
-					street: '',
-					addressCode: '',
-					is_default: 0
+					"provinceId": '',
+					"cityId": '',
+					"districtId": '',
+					"detailAddress": "",
+					"name": "",
+					"mobile": "",
+					"defaultFlag": 0
 				},
 				// 省市区
-				showCityPicker: false,
-				cityPickerLabel: '',
-				selAddressCodes:[],
+				selAddressCodes: [],
+				dataList: [],
 			};
 		},
 		onLoad(ops) {
-			console.log(ops);
 			if (ops.id) {
 				this.form.id = ops.id;
 				this.form.type = 'edit';
@@ -74,66 +69,61 @@
 				this.title = '新建地址';
 			}
 			uni.setNavigationBarTitle({
-				title:this.title
+				title: this.title
+			})
+
+			uni.$u.http.get('/token/getAllDistrict').then(res => {
+				if (res.code == 200) {
+					this.dataList = res.data
+				}
 			})
 		},
 		methods: {
 			// 省市区选择回调
 			cityChange(e) {
-				console.log(e);
-				this.cityPickerLabel = e.province.name + '-' + e.city.name;
-				if(e.area){
-					this.cityPickerLabel += ('-' +e.area.name);
-				}
-				this.form.province = e.province.name;
-				this.form.city = e.city.name;
-				this.selAddressCodes = [e.province.code , e.city.code];
-				if(e.area){
-					this.form.area = e.area.name;
-					this.selAddressCodes.push(e.area.code);
-				}
-				this.form.addressCode = this.selAddressCodes.toString();
+				let {
+					value
+				} = e.detail
+				if (!value.length) return
+				this.form.provinceId = value[0].value;
+				this.form.cityId = value[1].value
+				this.form.districtId = value[2].value || ''
 			},
 
 			// 提交表单
 			submit() {
-				this.$u.api.updateAddressAjax(this.form).then(({
-					code,
-					data
-				}) => {
-					if (code == 1) {
+				uni.$u.http.post('/token/user/address/add', this.form).then(res => {
+					if (res.code == 200) {
 						uni.showToast('保存成功');
 						uni.navigateBack();
 					}
-				}).catch((data)=>{
-					console.log(data);
 				})
 			},
 			// 编辑
 			getAddressDetail(id) {
 				uni.showLoading();
-				this.$u.api.getAddressDetailAjax(id).then(({code,data})=>{
+				this.$u.api.getAddressDetailAjax(id).then(({
+					code,
+					data
+				}) => {
 					uni.hideLoading();
-					if(code==1){
+					if (code == 1) {
 						this.form = {
 							...this.form,
-							id:data.id,
-							realname:data.realname,
-							mobile:data.mobile,
-							province:data.province,
-							city:data.city,
-							area:data.area,
-							street:data.street,
-							addressCode:data.addressCode,
-							is_default:data.is_default,
+							id: data.id,
+							name: data.name,
+							mobile: data.mobile,
+							provinceId: data.provinceId,
+							city: data.city,
+							area: data.area,
+							detailAddress: data.detailAddress,
+							addressCode: data.addressCode,
+							defaultFlag: data.defaultFlag,
 						};
-						this.cityPickerLabel = data.province + '-' + data.city;
-						if(data.area){
-							this.cityPickerLabel += ('-' + data.area);
-						}
-						this.selAddressCodes = data.addressCode.split(',');
 					}
-				}).catch(()=>{uni.hideLoading();})
+				}).catch(() => {
+					uni.hideLoading();
+				})
 			},
 		}
 	};
@@ -148,4 +138,4 @@
 	.btn {
 		padding: 60rpx 30rpx;
 	}
-</style>
+</style>

+ 107 - 120
pages-mine/pages/address/list.vue

@@ -2,139 +2,126 @@
 	<view class="page">
 		<NoData v-if="!loading&&list.length<1"></NoData>
 		<view class="list" v-else>
-			<!-- @open="open" -->
-			<u-swipe-action :show="item.show" :index="index" 
-						v-for="(item, index) in list" :key="item.id" 
-						@click="click" 
-						:options="options"
-						@open="open"
-					>
-					<AddressCard  :isBack="isBack" :data="item" :showEdit="!isSelect" :showBorderBottom="index != list.length - 1"></AddressCard>
-			</u-swipe-action>
-			
+			<AddressCard v-for="item in list" :key="item.id" :address="item" :selected="item.id==selectId"
+				@delete="deletePopup" @success="getAddressList" @tapItem="handleSelectAddr">
+			</AddressCard>
 		</view>
-		<view class="btn">
-			<u-button type="primary" @click="$u.route({ url: '/pages-mine/pages/address/add-or-update' })">
-				<u-icon name="plus"></u-icon>
-				<text>新建收货地址</text>
+		<view class="bottom-fixed-con">
+			<u-button class="flex-1" type="primary"
+				@click="$u.route({ url: '/pages-mine/pages/address/add-or-update' })">
+				<text>添加地址</text>
 			</u-button>
 		</view>
+
+		<common-dialog ref="deleteDialog" title="温馨提示" @confirm="confirmDelete">
+			<text>确定删除此地址信息吗?</text>
+		</common-dialog>
 	</view>
 </template>
 
 <script>
-import AddressCard from '@/pages/mine/components/address-card.vue';
-export default {
-	components: {
-		AddressCard
-	},
-	data() {
-		return {
-			isSelect: false,
-			isBack: false,
-			loading:false,
-			list: [],
-			options: [
-				{
-					text: '设为默认',
-					style: {
-						backgroundColor: '#22ac38'
-					}
-				},
-				{
-					text: '删除',
-					style: {
-						backgroundColor: '#dd524d'
-					}
-				}
-			]
-		};
-	},
-	onLoad(ops) {
-		if (ops.isSelect) {
-			this.isSelect = ops.isSelect;
-			this.isBack = ops.isBack;
-		}
-		// this.getAddressList();
-	},
-	onShow(ops) {
-		this.getAddressList();
-	},
-	methods:{
-		click(index, index1) {
-			if(index1 == 1) {
-				this.delFun(index);
-			} else {
-				this.setDefaultAddress(index);
-			}
+	import AddressCard from '@/pages-mine/components/address-card.vue';
+	import commonDialog from '@/components/common-dialog.vue';
+	export default {
+		components: {
+			AddressCard,
+			commonDialog
 		},
-		// 删除
-		delFun(index) {
-			this.$u.api.delAddressAjax(this.list[index].id).then(({code,data})=>{
-				if(code==1){
-					this.list.splice(index, 1);
-					this.list[index].show = false;
-				}else{
-					this.$u.toast(`删除失败`);
-				}
-			})
+		data() {
+			return {
+				selectId: '',
+				deleteId: '', //要删除的id
+				isBack: false,
+				loading: false,
+				list: [],
+				options: [{
+						text: '设为默认',
+						style: {
+							backgroundColor: '#22ac38'
+						}
+					},
+					{
+						text: '删除',
+						style: {
+							backgroundColor: '#dd524d'
+						}
+					}
+				]
+			};
 		},
-		// 设为默认
-		setDefaultAddress(index) {
-			this.$u.api.setDefaultAddressAjax(this.list[index].id).then(({code,data})=>{
-				uni.hideLoading();
-				if(code==1){
-					this.list.forEach(e=>{
-						e.is_default = 0;
-						e.show = false;
-					})
-					this.list[index].is_default = 1;
-				}
-			})
+		onLoad(ops) {
+			if (ops.id) {
+				this.selectId = ops.id
+			}
 		},
-		open(index) {
-			// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
-			// 原本为'false',再次设置为'false'会无效
-			this.list[index].show = true;
-			this.list.map((val, idx) => {
-				if(index != idx) this.list[idx].show = false;
-			})
+		onShow(ops) {
+			this.getAddressList();
 		},
-		getAddressList(){
-			this.loading = true;
-			this.$u.api.getAddressListAjax().then(({code,data})=>{
-				this.loading = false;
-				if(code==1){
-					data.forEach(e=>{
-						e.show = false;
-					})
-					this.list = data;
-					console.log(this.list);
-				}
-			}).catch(()=>{
-				this.loading = false;
-			})
+		methods: {
+			//选择地址
+			handleSelectAddr(item) {
+				console.log(item,'xxxx')
+				uni.$emit('selectAddr', item)
+				uni.navigateBack({delta:1})
+			},
+			//打开删除弹窗
+			deletePopup(id) {
+				this.deleteId = id
+				this.$refs.deleteDialog?.openPopup()
+			},
+			// 删除
+			confirmDelete() {
+				this.$u.api.delAddressAjax(this.list[index].id).then(({
+					code,
+					data
+				}) => {
+					if (code == 1) {
+						this.list.splice(index, 1);
+						this.list[index].show = false;
+					} else {
+						this.$u.toast(`删除失败`);
+					}
+				})
+			},
+			// 设为默认
+			setDefaultAddress({
+				id
+			}) {
+				uni.$u.http.post(`/token/user/address/setDefault/${id}`).then(res => {
+					if (res.code == 200) {
+						uni.showToast({
+							icon: "none",
+							title: "设置默认地址成功"
+						})
+						this.getAddressList()
+					} else {
+						uni.showToast(res.msg)
+					}
+				})
+			},
+			open(index) {
+				// 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制,
+				// 原本为'false',再次设置为'false'会无效
+				this.list[index].show = true;
+				this.list.map((val, idx) => {
+					if (index != idx) this.list[idx].show = false;
+				})
+			},
+			getAddressList() {
+				this.loading = true;
+				uni.$u.http.get('/token/user/address/list?content=' + '').then(res => {
+					if (res.code == 200) {
+						this.list = res.data;
+					}
+				}).finally(() => this.loading = false)
+			}
 		},
-	},
-};
+	};
 </script>
 
 <style lang="scss" scoped>
-.page {
-	background-color: $app-theme-bg-color;
-}
-.list {
-	padding: 0 30rpx 180rpx;
-	// height: calc(100vh - 200rpx);
-}
-.btn {
-	position: fixed;
-	bottom: 40rpx;
-	left: 0;
-	padding: 30rpx;
-	width: 100%;
-	text {
-		margin-left: 8rpx;
+	.list {
+		padding: 20rpx 30rpx 180rpx;
+		box-sizing: border-box;
 	}
-}
-</style>
+</style>

BIN
pages-mine/static/1.png


BIN
pages-mine/static/2.png


BIN
pages-mine/static/3.png


BIN
pages-mine/static/4.png


BIN
pages-mine/static/5.png


BIN
pages-mine/static/adderss.png


BIN
pages-mine/static/t1.png


BIN
pages-mine/static/t10.png


BIN
pages-mine/static/t11.png


BIN
pages-mine/static/t12.png


BIN
pages-mine/static/t13.png


BIN
pages-mine/static/t2.png


BIN
pages-mine/static/t3.png


BIN
pages-mine/static/t4.png


BIN
pages-mine/static/t5.png


BIN
pages-mine/static/t6.png


BIN
pages-mine/static/t7.png


BIN
pages-mine/static/t8.png


BIN
pages-mine/static/t9.png


+ 33 - 13
pages/home/components/BookItem.vue

@@ -1,20 +1,21 @@
 <template>
 	<view class="book-item">
 		<view class="book-info">
-			<image class="book-cover" :src="book.coverUrl || '/static/img/default-cover.png'" mode="aspectFill" />
+			<image class="book-cover" :src="book.cover" mode="aspectFill" />
 			<view class="book-detail">
 				<view class="top-info">
-					<view class="book-title">{{ book.title }}</view>
+					<view class="book-title">{{ book.bookName }}</view>
 					<view class="book-tags">
-						<text class="tzs tag-text">套装书</text>
-						<text class="kmdb tag-text">可卖多本</text>
+						<text class="tzs tag-text" v-if="book.suit==1">套装书</text>
+						<text class="kmdb tag-text" v-if="book.maxNum>1">可卖多本</text>
 					</view>
 				</view>
 
 				<view class="flex flex-j-b flex-a-c">
-					<view class="book-price">回收价: ¥{{ book.price }}</view>
-					<u-number-box class="number-box" bg-color="#38c148" color="#ffffff" v-model="book.quantity" :min="1"
-						:max="99" @change="onQuantityChange"></u-number-box>
+					<view class="book-price">回收价: ¥{{ book.recycleMoney }}</view>
+					<u-number-box class="number-box" bg-color="#38c148" color="#ffffff" v-model="book.num" :min="1"
+						:max="book.maxNum||40" @blur="onQuantityChange" @minus="addReduceNum(-1)"
+						@plus="addReduceNum(1)"></u-number-box>
 				</view>
 			</view>
 			<view class="delete-btn" @tap="onDelete">
@@ -41,19 +42,38 @@
 			}
 		},
 		data() {
-			return {
-				quantity: this.book.quantity || 1
-			}
+			return {}
 		},
 		methods: {
 			onDelete() {
 				this.$refs.deleteDialog.openPopup()
 			},
 			confirmDelete() {
-				this.$emit('delete', this.book.id)
+				this.$emit('delete', this.book.isbn)
+			},
+			// /api/token/order/addReduceNum
+			addReduceNum(changeNum) {
+				uni.$u.http.post('/token/order/addReduceNum', {
+					orderId: this.book.orderId,
+					isbn: this.book.isbn,
+					changeNum
+				}).then(res => {
+					if (res.data == 1) {
+						this.$emit('quantity-change', this.book)
+					}
+				})
 			},
-			onQuantityChange(value) {
-				this.$emit('quantity-change', this.book)
+			onQuantityChange(data) {
+				console.log(this.book, 'xxxxx')
+				uni.$u.http.post('/token/order/changeNum', {
+					orderId: this.book.orderId,
+					isbn: this.book.isbn,
+					afterNum: data.value
+				}).then(res => {
+					if (res.data == 1) {
+						this.$emit('quantity-change', this.book)
+					}
+				})
 			}
 		}
 	}

+ 5 - 6
pages/home/components/ScanBookList.vue

@@ -7,7 +7,7 @@
 
 		<!-- 书籍列表 -->
 		<view class="book-list">
-			<BookItem v-for="(book,index) in bookList" :key="book.id" :book="book" @delete="handleDeleteBook"
+			<BookItem v-for="(book,index) in bookList" :key="book.isbn" :book="book" @delete="handleDeleteBook"
 				@quantity-change="handleQuantityChange" />
 		</view>
 		
@@ -20,11 +20,10 @@
 
 <script>
 	import BookItem from './BookItem.vue'
-	import BookItemVue from '@/pages-home/components/BookItem.vue'
 
 	export default {
 		components: {
-			BookItem,BookItemVue
+			BookItem
 		},
 		props: {
 			bookList: {
@@ -48,13 +47,13 @@
 		},
 		methods: {
 			handleDeleteBook(bookId) {
-				this.books = this.books.filter(book => book.id !== bookId)
+				this.books = this.books.filter(book => book.isbn !== bookId)
 				this.$emit('updateBooks', this.books)
 			},
 			handleQuantityChange(data) {
-				const book = this.books.find(book => book.id === data.id)
+				const book = this.books.find(book => book.isbn === data.isbn)
 				if (book) {
-					book.quantity = data.quantity
+					book.num = data.num
 				}
 				this.$emit('updateBooks', this.books)
 			},

+ 1 - 1
pages/home/components/notScanned.vue

@@ -97,7 +97,7 @@
 
 			goToScannedBooks() {
 				uni.navigateTo({
-					url: '/pages/scanned/list'
+					url: '/pages-home/pages/scaned-book'
 				})
 			},
 			goToRules() {

+ 75 - 63
pages/home/index.vue

@@ -8,7 +8,7 @@
 		<scan-book-list v-else @updateBooks="updateBooksList" :bookList="bookList"></scan-book-list>
 		<!-- 底部固定按钮 -->
 		<view class="bottom-fixed">
-			<view class="btn-wrap">
+			<view class="btn-wrap mb-20">
 				<button class="scan-btn flex-1" @click="handleScan">
 					<u-icon name="scan" color="#FFFFFF" size="40"></u-icon>
 					<text>扫码卖书</text>
@@ -19,7 +19,7 @@
 				</button>
 			</view>
 
-			<view class="flex-a flex-j-b pad-20" v-if="bookList.length">
+			<view class="flex-a flex-j-b pad-20" style="padding-top:0 ;" v-if="bookList.length">
 				<view class="left-info">
 					<view class="flex-a common-text">
 						共<text class="color-red">{{ totalBooks }}</text>件
@@ -59,6 +59,16 @@
 		<CommonDialog ref="tiredDialog" title="暂不回收" :showCancel="false">
 			<text>扫累了,休息休息吧~</text>
 		</CommonDialog>
+
+		<!-- 该书超出最大回收本数  maxAcceptDialog-->
+		<CommonDialog ref="maxAcceptDialog" title="提示" :showCancel="false">
+			<text>该书超出最大回收本数</text>
+		</CommonDialog>
+
+		<!-- 单个订单最多40本书  orderMaxNumDialog-->
+		<CommonDialog ref="orderMaxNumDialog" title="提示" :showCancel="false">
+			<text>单个订单最多40本书</text>
+		</CommonDialog>
 	</view>
 </template>
 
@@ -81,43 +91,7 @@
 					step3: false
 				},
 				scrollTop: 0,
-				bookList: [{
-					id: 1,
-					title: '三国演义',
-					price: 26.2,
-					quantity: 1,
-					coverUrl: 'https://ts1.cn.mm.bing.net/th/id/R-C.741a4e06ace8ed3a2a47d2a7fc53efa6?rik=OTex%2bIz3NhB3vw&riu=http%3a%2f%2fsdwypress.com%2fuploads%2fimage%2f2106%2f24%2f210624143125esxhc.jpg&ehk=bJB%2f6p6aW7wkHHbCiUTcnRf%2bNLwOktGxYScy28rgjwg%3d&risl=&pid=ImgRaw&r=0'
-				}, {
-					id: 2,
-					title: '三国演义',
-					price: 26.2,
-					quantity: 1,
-					coverUrl: 'https://ts1.cn.mm.bing.net/th/id/R-C.741a4e06ace8ed3a2a47d2a7fc53efa6?rik=OTex%2bIz3NhB3vw&riu=http%3a%2f%2fsdwypress.com%2fuploads%2fimage%2f2106%2f24%2f210624143125esxhc.jpg&ehk=bJB%2f6p6aW7wkHHbCiUTcnRf%2bNLwOktGxYScy28rgjwg%3d&risl=&pid=ImgRaw&r=0'
-				}, {
-					id: 3,
-					title: '三国演义',
-					price: 26.2,
-					quantity: 1,
-					coverUrl: 'https://ts1.cn.mm.bing.net/th/id/R-C.741a4e06ace8ed3a2a47d2a7fc53efa6?rik=OTex%2bIz3NhB3vw&riu=http%3a%2f%2fsdwypress.com%2fuploads%2fimage%2f2106%2f24%2f210624143125esxhc.jpg&ehk=bJB%2f6p6aW7wkHHbCiUTcnRf%2bNLwOktGxYScy28rgjwg%3d&risl=&pid=ImgRaw&r=0'
-				}, {
-					id: 4,
-					title: '三国演义',
-					price: 26.2,
-					quantity: 1,
-					coverUrl: 'https://ts1.cn.mm.bing.net/th/id/R-C.741a4e06ace8ed3a2a47d2a7fc53efa6?rik=OTex%2bIz3NhB3vw&riu=http%3a%2f%2fsdwypress.com%2fuploads%2fimage%2f2106%2f24%2f210624143125esxhc.jpg&ehk=bJB%2f6p6aW7wkHHbCiUTcnRf%2bNLwOktGxYScy28rgjwg%3d&risl=&pid=ImgRaw&r=0'
-				}, {
-					id: 5,
-					title: '三国演义',
-					price: 26.2,
-					quantity: 1,
-					coverUrl: 'https://ts1.cn.mm.bing.net/th/id/R-C.741a4e06ace8ed3a2a47d2a7fc53efa6?rik=OTex%2bIz3NhB3vw&riu=http%3a%2f%2fsdwypress.com%2fuploads%2fimage%2f2106%2f24%2f210624143125esxhc.jpg&ehk=bJB%2f6p6aW7wkHHbCiUTcnRf%2bNLwOktGxYScy28rgjwg%3d&risl=&pid=ImgRaw&r=0'
-				}, {
-					id: 6,
-					title: '三国演义',
-					price: 26.2,
-					quantity: 1,
-					coverUrl: 'https://ts1.cn.mm.bing.net/th/id/R-C.741a4e06ace8ed3a2a47d2a7fc53efa6?rik=OTex%2bIz3NhB3vw&riu=http%3a%2f%2fsdwypress.com%2fuploads%2fimage%2f2106%2f24%2f210624143125esxhc.jpg&ehk=bJB%2f6p6aW7wkHHbCiUTcnRf%2bNLwOktGxYScy28rgjwg%3d&risl=&pid=ImgRaw&r=0'
-				}],
+				bookList: [],
 				serviceItems: [{
 						icon: 'gift',
 						text: '免费退回'
@@ -152,10 +126,10 @@
 				return this.bookList.length > 0 ? '300rpx' : '110rpx'
 			},
 			totalBooks() {
-				return this.bookList.reduce((sum, book) => sum + (book.quantity || 1), 0)
+				return this.bookList.reduce((sum, book) => sum + (book.num || 1), 0)
 			},
 			totalPrice() {
-				return this.bookList.reduce((sum, book) => sum + book.price * (book.quantity || 1), 0).toFixed(2)
+				return this.bookList.reduce((sum, book) => sum + book.recycleMoney * (book.num || 1), 0).toFixed(2)
 			}
 		},
 		onPageScroll(e) {
@@ -173,9 +147,22 @@
 					})
 					return
 				}
-				
-				uni.navigateTo({
-					url:"/pages-home/pages/book-order"
+
+				let orderId = this.bookList[0].orderId
+				//预提交
+				uni.$u.http.get('/token/order/preSubmit?orderId=' + orderId).then(res => {
+					if (res.code == 200) {
+						if (res.data.code == 1 || res.data.code == 2) {
+							uni.navigateTo({
+								url: "/pages-home/pages/book-order"
+							})
+						} else {
+							uni.showToast({
+								icon: 'none',
+								title: res.msg
+							})
+						}
+					}
 				})
 			},
 
@@ -200,26 +187,47 @@
 					}
 				})
 			},
-			async checkBookISBN(isbn) {
-				try {
-					const res = await this.$api.checkBook(isbn)
-					if (res.canBuy) {
-						uni.navigateTo({
-							url: `/pages/book/detail?isbn=${isbn}`
-						})
-					} else {
-						uni.showToast({
-							title: '暂不收购此书',
-							icon: 'none'
-						})
+			checkBookISBN(isbn) {
+				uni.$u.http.get('/token/order/scanIsbn?isbn=' + isbn).then(res => {
+					if (res.code == 200) {
+						let code = res.data.code
+						if (code == 1) {
+							res.data.num = 1
+							this.bookList.push(res.data)
+						} else if (code == 2) {
+							let item = this.bookList.find(v => v.isbn === isbn)
+							item.num = item.num + 1
+						} else {
+							this.handleBookCode(res.data.code)
+						}
 					}
-				} catch (err) {
-					uni.showToast({
-						title: '查询失败',
-						icon: 'none'
-					})
+				})
+			},
+			//处理扫码之后不同的状态 0-扫码频繁 1-成功 2-本单已有该书,数量+1  3-没有该书 4-本书暂不回收 5-超过每单最大可卖数量  6-单个订单最多40本书
+			handleBookCode(code) {
+				if (code == 1) {
+					this.bookList.push()
+				}
+				let tempKeys = ['tiredDialog', '', '', 'noInfoDialog', "notAcceptDialog", 'maxAcceptDialog',
+					'orderMaxNumDialog'
+				]
+				let key = tempKeys[code]
+				if (key) {
+					this.$refs[key].openPopup()
 				}
 			},
+			//获取当前用户未提交订单 /api/token/order/lastOrder
+			getLastOrder() {
+				uni.$u.http.get('/token/order/lastOrder').then(res => {
+					if (res.code == 200) {
+						this.bookList = res.data ? res.data.orderDetailList.map(v => {
+							v.orderId = res.data.orderId
+							return v
+						}) : []
+					}
+				})
+			},
+
 			goToScannedBooks() {
 				uni.navigateTo({
 					url: '/pages-home/pages/scaned-book'
@@ -234,9 +242,13 @@
 				this.$refs.serviceGuarantee.openPopup()
 			},
 			goToInputISBN() {
-				console.log(this.$refs.isbnPopup, 'this.$refs.isbnPopup')
 				this.$refs.isbnPopup.openPopup()
 			}
+		},
+		mounted() {
+			setTimeout(() => {
+				this.getLastOrder()
+			}, 100)
 		}
 	}
 </script>
@@ -258,7 +270,7 @@
 			padding-bottom: 300rpx;
 		}
 
-		padding-bottom: 110rpx;
+		padding-bottom: 130rpx;
 
 
 		.nav-title {

+ 4 - 4
pages/mine/components/address-card.vue

@@ -2,12 +2,12 @@
 	<view class="slot" :style="showBorderBottom ? '' : 'border-bottom:none'" @click="goPage(data)">
 		<view class="info">
 			<view class="item">
-				<text class="tag" v-if="data.is_default==1">默认</text>
-				<text class="label">{{ data.address}}</text>
+				<text class="tag" v-if="data.defaultFlag==1">默认</text>
+				<text class="label">{{ data.fullAddress}}</text>
 			</view>
-			<view class="item">{{ data.detail_address }}</view>
+			<view class="item">{{ data.detailAddress }}</view>
 			<view class="item">
-				<text>{{ data.realname }}</text>
+				<text>{{ data.name }}</text>
 				<text>{{ data.mobile }}</text>
 			</view>
 		</view>

+ 328 - 243
static/css/common.scss

@@ -1,344 +1,429 @@
-$theme-color:#707bce;
-$theme-dark-color:rgba(#e4c491,.8);
-$bg-theme-color:rgba(#e4c491,.1);
-$blue:#03A9F4;
-$yellow:#f9ae3d;
-$yellow-text:#f9ae3d;
-$font-normal:#333333;
-$font-middle:#666666;
-$font-light:#333333;
+$theme-color: #707bce;
+$theme-dark-color: rgba(#e4c491, .8);
+$bg-theme-color: rgba(#e4c491, .1);
+$blue: #03A9F4;
+$yellow: #f9ae3d;
+$yellow-text: #f9ae3d;
+$font-normal: #333333;
+$font-middle: #666666;
+$font-light: #333333;
 
-view{
-	font-size: 28rpx;
-	box-sizing: border-box;
+view {
+    font-size: 28rpx;
+    box-sizing: border-box;
 }
-.page{
-	background-color: #F5F5F5;
-	min-height: 100vh;
+
+.page {
+    background-color: #F5F5F5;
+    min-height: 100vh;
 }
-.page-top{
-	padding-top:30rpx;
+
+.page-top {
+    padding-top: 30rpx;
 }
-.flex,.flex-box,.flex-row{
-	display: flex;
+
+.flex,
+.flex-box,
+.flex-row {
+    display: flex;
 }
-.flex-column{
-	flex-direction: column;
+
+.flex-column {
+    flex-direction: column;
 }
-.flex-end{
-	justify-content:flex-end;
+
+.flex-end {
+    justify-content: flex-end;
 }
-.flex-align{
-	align-items: center;
+
+.flex-align {
+    align-items: center;
 }
-.flex-center{
-	align-items: center;
-	justify-content: center;
+
+.flex-center {
+    align-items: center;
+    justify-content: center;
 }
-.flex-a-c{
-	align-items: center;
+
+.flex-a-c {
+    align-items: center;
 }
-.flex-j-c{
-	justify-content: center;
+
+.flex-j-c {
+    justify-content: center;
 }
-.flex-j-e{
-	justify-content: flex-end;
+
+.flex-j-e {
+    justify-content: flex-end;
 }
-.space-between{
-	justify-content: space-between;
+
+.space-between {
+    justify-content: space-between;
 }
-.flex-wrap{
-	flex-wrap: wrap;
+
+.flex-wrap {
+    flex-wrap: wrap;
 }
-.text-center{
-	text-align: center !important;
+
+.text-center {
+    text-align: center !important;
 }
-.pad{
-	padding-left:30rpx;
-	padding-right:30rpx;
+
+.pad {
+    padding-left: 30rpx;
+    padding-right: 30rpx;
 }
+
 @keyframes circle {
-	0%{transform: rotate(0);}
-	100%{transform: rotate(360deg);}
+    0% {
+        transform: rotate(0);
+    }
+
+    100% {
+        transform: rotate(360deg);
+    }
 }
-.px-15{
-	padding-top:15rpx;
-	padding-bottom:15rpx;
+
+.px-15 {
+    padding-top: 15rpx;
+    padding-bottom: 15rpx;
 }
-.input-placeholder{
-	font-size: 26rpx;
-	color:#999999;
+
+.input-placeholder {
+    font-size: 26rpx;
+    color: #999999;
 }
+
 .mb-20 {
-	margin-bottom: 20rpx;
+    margin-bottom: 20rpx;
 }
-.c-4{
-	color: #ad2305;
+
+.c-4 {
+    color: #ad2305;
 }
-.c-3{
-	color:#333739;
+
+.c-3 {
+    color: #333739;
 }
-.c-5{
-	color:#545657;
+
+.c-5 {
+    color: #545657;
 }
-.c-6{
-	color:#666769;
+
+.c-6 {
+    color: #666769;
 }
-.c-9{
-	color:#999A9A;
+
+.c-9 {
+    color: #999A9A;
 }
-.c-f{
-	color:#FFFFFF;
+
+.c-f {
+    color: #FFFFFF;
 }
-.c-y{
-	color:$yellow;
+
+.c-y {
+    color: $yellow;
 }
-.text-y{
-	color:$yellow-text;
+
+.text-y {
+    color: $yellow-text;
 }
-.px-15{
-	padding-left:15rpx;
-	padding-right:15rpx;
+
+.px-15 {
+    padding-left: 15rpx;
+    padding-right: 15rpx;
 }
-.bg-white{
-	background-color: #FFFFFF;
+
+.bg-white {
+    background-color: #FFFFFF;
 }
-.bg-gray{
-	background-color: #ecf7f3;
+
+.bg-gray {
+    background-color: #ecf7f3;
 }
-.bg-gray-light{
-	background-color: #FAFAFA;
+
+.bg-gray-light {
+    background-color: #FAFAFA;
 }
-.bg-gray-empha{
-	background-color: #F1F2F3;
+
+.bg-gray-empha {
+    background-color: #F1F2F3;
 }
-.border{
-	border:1rpx solid #EFEFEF;
+
+.border {
+    border: 1rpx solid #EFEFEF;
 }
-.border-bottom{
-	border-bottom: 1rpx solid #EFEFEF;
+
+.border-bottom {
+    border-bottom: 1rpx solid #EFEFEF;
 }
-.btn{
-	width:auto;
-	margin-left:0;
-	margin-right:0;
-	padding-left:30rpx;
-	padding-right:30rpx;
-	font-size: 14px;
-	background-color: transparent;
-	&.primary{
-		background-color:$theme-color;
-		color:#FFFFFF;
-	}
-	&.info{
-		border:1rpx solid #DCDCDC;
-	}
+
+.btn {
+    width: auto;
+    margin-left: 0;
+    margin-right: 0;
+    padding-left: 30rpx;
+    padding-right: 30rpx;
+    font-size: 14px;
+    background-color: transparent;
+
+    &.primary {
+        background-color: $theme-color;
+        color: #FFFFFF;
+    }
+
+    &.info {
+        border: 1rpx solid #DCDCDC;
+    }
 }
-.font-bold{
-	font-weight: bold;
+
+.font-bold {
+    font-weight: bold;
 }
-.font-normal{
-	font-weight: normal;
-	font-style: normal;
+
+.font-normal {
+    font-weight: normal;
+    font-style: normal;
 }
 
 @for $i from 0 through 30 {
-	.ml-#{$i*2} {
-		margin-left: #{$i * 2}rpx;
-	}
-	.mr-#{$i * 2} {
-		margin-right: #{$i * 2}rpx;
-	}
-	.mt-#{$i * 2} {
-		margin-top: #{$i * 2}rpx;
-	}
-	.mb-#{$i * 2} {
-		margin-bottom: #{$i * 2}rpx;
-	}
-	.pad-#{$i * 2}{
-		padding: #{$i * 2}rpx;
-		box-sizing: border-box;
-	}
+    .ml-#{$i*2} {
+        margin-left: #{$i * 2}rpx;
+    }
+
+    .mr-#{$i * 2} {
+        margin-right: #{$i * 2}rpx;
+    }
+
+    .mt-#{$i * 2} {
+        margin-top: #{$i * 2}rpx;
+    }
+
+    .mb-#{$i * 2} {
+        margin-bottom: #{$i * 2}rpx;
+    }
+
+    .pad-#{$i * 2} {
+        padding: #{$i * 2}rpx;
+        box-sizing: border-box;
+    }
 }
+
 @for $i from 0 through 20 {
-	.pt-#{$i*2}{
-		padding-top:#{$i * 2}rpx;
-	}
-	.px-#{$i * 2} {
-		padding-left: #{$i* 2}rpx!important;
-		padding-right: #{$i* 2}rpx!important;
-	}
-	.py-#{$i * 2} {
-		padding-top: #{$i * 2}rpx!important;
-		padding-bottom: #{$i * 2}rpx!important;
-	}
-	.pad-#{$i * 2}{
-		padding:#{$i * 2}rpx;
-	}
-	.radius-#{$i * 2}{
-		border-radius: #{$i * 2}rpx;
-	}
-	.font-#{20 + $i * 2}{
-		font-size: #{22 + $i * 2}rpx;
-	}
-}
-@for $i from 1 through 5{
-	.text-line#{$i}{
-		overflow: hidden;
-		display: -webkit-box!important;
-		text-overflow: ellipsis;
-		word-break: break-all;
-		-webkit-line-clamp: #{$i};
-		-webkit-box-orient: vertical!important;
-	}
+    .pt-#{$i*2} {
+        padding-top:#{$i * 2}rpx;
+    }
+
+    .px-#{$i * 2} {
+        padding-left: #{$i* 2}rpx !important;
+        padding-right: #{$i* 2}rpx !important;
+    }
+
+    .py-#{$i * 2} {
+        padding-top: #{$i * 2}rpx !important;
+        padding-bottom: #{$i * 2}rpx !important;
+    }
+
+    .pad-#{$i * 2} {
+        padding:#{$i * 2}rpx;
+    }
+
+    .radius-#{$i * 2} {
+        border-radius: #{$i * 2}rpx;
+    }
+
+    .font-#{20 + $i * 2} {
+        font-size: #{22 + $i * 2}rpx;
+    }
+}
+
+@for $i from 1 through 5 {
+    .text-line#{$i} {
+        overflow: hidden;
+        display: -webkit-box !important;
+        text-overflow: ellipsis;
+        word-break: break-all;
+        -webkit-line-clamp: #{$i};
+        -webkit-box-orient: vertical !important;
+    }
 }
 
 
 .operat-btns {
-	padding: 16px;
-	box-sizing: border-box;
-	width: 100%;
-	position: fixed;
-	bottom: 20px;
-	left: 0;
-	right: 0;
+    padding: 16px;
+    box-sizing: border-box;
+    width: 100%;
+    position: fixed;
+    bottom: 20px;
+    left: 0;
+    right: 0;
 }
 
-.operat-btns .u-button + .u-button {
-	margin-left: 14px;
+.operat-btns .u-button+.u-button {
+    margin-left: 14px;
 }
 
 // 超出省略,最多5行
 @for $i from 12 through 30 {
     .font-#{$i} {
         // vue下,单行和多行显示省略号需要单独处理
-        font-size: #{$i} + 'px' !important;
+        font-size: #{$i}+'px' !important;
     }
 }
+
 .common-title {
-	font-size: 15px;
-	font-family: PingFang SC;
-	font-weight: bold;
-	color: #101010;
-	line-height: 19px;
+    font-size: 15px;
+    font-family: PingFang SC;
+    font-weight: bold;
+    color: #101010;
+    line-height: 19px;
 }
 
 .flex {
-	display: flex;
+    display: flex;
 }
-.flex-j-b{
-	justify-content: space-between;
+
+.flex-j-b {
+    justify-content: space-between;
 }
+
 .flex-1 {
-	flex: 1;
+    flex: 1;
 }
 
 .flex-a {
-	display: flex;
-	align-items: center;
+    display: flex;
+    align-items: center;
 }
 
 .flex-a-s {
-	align-items: flex-start;
+    align-items: flex-start;
 }
 
 .flex-a-c {
-	align-items: center;
+    align-items: center;
 }
 
 .flex-a-e {
-	align-items: flex-end;
+    align-items: flex-end;
 }
 
 .flex-c {
-	display: flex;
-	align-items: center;
-	justify-content: center;
+    display: flex;
+    align-items: center;
+    justify-content: center;
 }
 
 .flex-d {
-	display: flex;
-	flex-direction: column;
+    display: flex;
+    flex-direction: column;
 }
 
-.common-text{
-	font-family: PingFang SC;
-	font-weight: 500;
-	font-size: 13px;
-	color: #666666;
-	line-height: 24px;
-	text-align: left;
+.common-text {
+    font-family: PingFang SC;
+    font-weight: 500;
+    font-size: 13px;
+    color: #666666;
+    line-height: 24px;
+    text-align: left;
 }
 
-.common-num-text{
-	font-family: AlibabaSans102 V2 Num_Alipay;
-	font-weight: normal;
-	font-size: 18px;
-	color: #111111;
-	line-height: 24px;
-	text-align: left;
+.common-num-text {
+    font-family: AlibabaSans102 V2 Num_Alipay;
+    font-weight: normal;
+    font-size: 18px;
+    color: #111111;
+    line-height: 24px;
+    text-align: left;
 }
 
 .common-card {
-	padding: 14px 12px 21px;
-	background: #FFFFFF;
-	border-radius: 10px;
-	opacity: 1;
+    padding: 14px 12px 21px;
+    background: #FFFFFF;
+    border-radius: 10px;
+    opacity: 1;
 }
 
-.white-bg{
-	padding: 0;
-	box-sizing: border-box;
-	background-color: #ffffff;
-	border-radius: 10px;
+.white-bg {
+    padding: 0;
+    box-sizing: border-box;
+    background-color: #ffffff;
+    border-radius: 10px;
 }
 
 .common-tag {
-	padding: 2px 4px;
-	background: linear-gradient(180deg, #DBC4A3 0%, #D2B692 100%);
-	border-radius: 3px 3px 3px 3px;
-	opacity: 1;
-	position: relative;
-	font-size:11px;
-	font-family: PingFang SC;
-	font-weight: 400;
-	color: #FFFFFF;
-	margin-left: 6px;
-}
-
-.common-number-text{
-	font-family: AlibabaSans102 V2 Num_Alipay;
-	font-weight: normal;
-	font-size: 16px;
-	color: #111111;
-	line-height: 28px;
-}
-
-.common-btn{
-	padding: 8rpx 20rpx;
-	box-sizing: border-box;
-	background: #ff6c22;
-	color: #ffffff;
-	font-size: 26rpx;
-	border-radius: 28rpx;
-	border: 2rpx solid #ff6c22;
-	
-	&.plain{
-		border: 2rpx solid #707bce;
-		color: #707bce;
-		background: #ffffff;
-	}
-}
-.color-primary{
-	color: #707bce !important;
+    padding: 2px 4px;
+    background: linear-gradient(180deg, #DBC4A3 0%, #D2B692 100%);
+    border-radius: 3px 3px 3px 3px;
+    opacity: 1;
+    position: relative;
+    font-size: 11px;
+    font-family: PingFang SC;
+    font-weight: 400;
+    color: #FFFFFF;
+    margin-left: 6px;
+}
+
+.common-number-text {
+    font-family: AlibabaSans102 V2 Num_Alipay;
+    font-weight: normal;
+    font-size: 16px;
+    color: #111111;
+    line-height: 28px;
+}
+
+.common-btn {
+    padding: 8rpx 20rpx;
+    box-sizing: border-box;
+    background: #ff6c22;
+    color: #ffffff;
+    font-size: 26rpx;
+    border-radius: 28rpx;
+    border: 2rpx solid #ff6c22;
+
+    &.plain {
+        border: 2rpx solid #707bce;
+        color: #707bce;
+        background: #ffffff;
+    }
+}
+
+.color-primary {
+    color: #707bce !important;
 }
 
 .team-title {
-	font-size: 28rpx;
-	color: #707bce;
+    font-size: 28rpx;
+    color: #707bce;
+}
+
+.common-page {
+    padding: 30rpx;
+    box-sizing: border-box;
+}
+
+.common-text-2 {
+    font-family: PingFang SC;
+    font-weight: 500;
+    font-size: 28rpx;
+    color: #333333;
+    line-height: 1.4;
 }
 
-.common-page{
-	padding: 30rpx;
-	box-sizing: border-box;
+.bottom-fixed-con {
+    padding: 16rpx 30rpx;
+    box-sizing: border-box;
+    background-color: #ffffff;
+    width: 100%;
+    position: fixed;
+    bottom: env(safe-area-inset-bottom);
+    left: 0;
+    right: 0;
+    display: flex;
+    align-items: center;
+
+    .u-button {
+        width: 100%;
+    }
 }

+ 2 - 2
theme.scss

@@ -6,8 +6,8 @@
 
 // 主颜色
 
-$app-theme-color: #22ac38;
-$app-theme-light-color: #2bdf46;
+$app-theme-color: #38C148;
+$app-theme-light-color: #38C148;
 $app-theme-deep-color: #20a333;
 
 $app-theme-blue: #2979ff;

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

@@ -0,0 +1,79 @@
+## 2.0.1(2024-08-22)
+- 修复 uni-app-x v-model 没有更新传入值的 bug
+## 2.0.0(2023-12-11)
+- 新增 支持 uni-app-x
+## 1.1.2(2023-04-11)
+- 修复 更改 modelValue 报错的 bug
+- 修复 v-for 未使用 key 值控制台 warning
+## 1.1.1(2023-02-21)
+- 修复代码合并时引发 value 属性为空时不渲染数据的问题
+## 1.1.0(2023-02-15)
+- 修复 localdata 不支持动态更新的bug
+## 1.0.9(2023-02-15)
+- 修复 localdata 不支持动态更新的bug
+## 1.0.8(2022-09-16)
+- 可以使用 uni-scss 控制主题色
+## 1.0.7(2022-07-06)
+- 优化 pc端图标位置不正确的问题
+## 1.0.6(2022-07-05)
+- 优化 显示样式
+## 1.0.5(2022-07-04)
+- 修复 uni-data-picker 在 uni-forms-item 中宽度不正确的bug
+## 1.0.4(2022-04-19)
+- 修复 字节小程序 本地数据无法选择下一级的Bug
+## 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 目录规范

+ 45 - 0
uni_modules/uni-data-picker/components/uni-data-picker/keypress.js

@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+  name: 'Keypress',
+  props: {
+    disable: {
+      type: Boolean,
+      default: false
+    }
+  },
+  mounted () {
+    const keyNames = {
+      esc: ['Esc', 'Escape'],
+      tab: 'Tab',
+      enter: 'Enter',
+      space: [' ', 'Spacebar'],
+      up: ['Up', 'ArrowUp'],
+      left: ['Left', 'ArrowLeft'],
+      right: ['Right', 'ArrowRight'],
+      down: ['Down', 'ArrowDown'],
+      delete: ['Backspace', 'Delete', 'Del']
+    }
+    const listener = ($event) => {
+      if (this.disable) {
+        return
+      }
+      const keyName = Object.keys(keyNames).find(key => {
+        const keyName = $event.key
+        const value = keyNames[key]
+        return value === keyName || (Array.isArray(value) && value.includes(keyName))
+      })
+      if (keyName) {
+        // 避免和其他按键事件冲突
+        setTimeout(() => {
+          this.$emit(keyName, {})
+        }, 0)
+      }
+    }
+    document.addEventListener('keyup', listener)
+    this.$once('hook:beforeDestroy', () => {
+      document.removeEventListener('keyup', listener)
+    })
+  },
+	render: () => {}
+}
+// #endif

+ 381 - 0
uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.uvue

@@ -0,0 +1,381 @@
+<template>
+  <view class="uni-data-tree">
+    <view class="uni-data-tree-input" @click="handleInput">
+      <slot :data="selectedPaths" :error="error">
+        <view class="input-value" :class="{'input-value-border': border}">
+          <text v-if="error!=null" class="error-text">{{error!.errMsg}}</text>
+          <scroll-view v-if="selectedPaths.length" class="selected-path" scroll-x="true">
+            <view class="selected-list">
+              <template v-for="(item, index) in selectedPaths">
+                <text class="text-color">{{item[mappingTextName]}}</text>
+                <text v-if="index<selectedPaths.length-1" class="input-split-line">{{split}}</text>
+              </template>
+            </view>
+          </scroll-view>
+          <text v-else-if="error==null&&!loading" class="placeholder">{{placeholder}}</text>
+          <view v-if="!readonly" class="arrow-area">
+            <view class="input-arrow"></view>
+          </view>
+        </view>
+      </slot>
+      <view v-if="loading && !isOpened" class="selected-loading">
+        <slot name="picker-loading" :loading="loading"></slot>
+      </view>
+    </view>
+    <view class="uni-data-tree-cover" v-if="isOpened" @click="handleClose"></view>
+    <view class="uni-data-tree-dialog" v-if="isOpened">
+      <view class="uni-popper__arrow"></view>
+      <view class="dialog-caption">
+        <view class="dialog-title-view">
+          <text class="dialog-title">{{popupTitle}}</text>
+        </view>
+        <view class="dialog-close" @click="handleClose">
+          <view class="dialog-close-plus" data-id="close"></view>
+          <view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
+        </view>
+      </view>
+      <view ref="pickerView" class="uni-data-pickerview">
+        <view v-if="error!=null" class="error">
+          <text class="error-text">{{error!.errMsg}}</text>
+        </view>
+        <scroll-view v-if="!isCloudDataList" :scroll-x="true">
+          <view class="selected-node-list">
+            <template v-for="(item, index) in selectedNodes">
+              <text class="selected-node-item" :class="{'selected-node-item-active':index==selectedIndex}"
+                @click="onTabSelect(index)">
+                {{item[mappingTextName]}}
+              </text>
+            </template>
+          </view>
+        </scroll-view>
+        <list-view class="list-view" :scroll-y="true">
+          <list-item class="list-item" v-for="(item, _) in currentDataList" @click="onNodeClick(item)">
+            <text class="item-text" :class="{'item-text-disabled': item['disable']}">{{item[mappingTextName]}}</text>
+            <text class="check" v-if="item[mappingValueName] == selectedNodes[selectedIndex][mappingValueName]"></text>
+          </list-item>
+        </list-view>
+        <view class="loading-cover" v-if="loading">
+          <slot name="pickerview-loading" :loading="loading"></slot>
+        </view>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+  import { dataPicker } from "../uni-data-pickerview/uni-data-picker.uts"
+
+  /**
+   * DataPicker 级联选择
+   * @description 支持单列、和多列级联选择。列数没有限制,如果屏幕显示不全,顶部tab区域会左右滚动。
+   * @tutorial https://ext.dcloud.net.cn/plugin?id=3796
+   * @property {String} popup-title 弹出窗口标题
+   * @property {Array} localdata 本地数据,参考
+   * @property {Boolean} border = [true|false] 是否有边框
+   * @property {Boolean} readonly = [true|false] 是否仅读
+   * @property {Boolean} preload = [true|false] 是否预加载数据
+   * @value true 开启预加载数据,点击弹出窗口后显示已加载数据
+   * @value false 关闭预加载数据,点击弹出窗口后开始加载数据
+   * @property {Boolean} step-searh = [true|false] 是否分布查询
+   * @value true 启用分布查询,仅查询当前选中节点
+   * @value false 关闭分布查询,一次查询出所有数据
+   * @property {String|DBFieldString} self-field 分布查询当前字段名称
+   * @property {String|DBFieldString} parent-field 分布查询父字段名称
+   * @property {String|DBCollectionString} collection 表名
+   * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
+   * @property {String} orderby 排序字段及正序倒叙设置
+   * @property {String|JQLString} where 查询条件
+   * @event {Function} popupshow 弹出的选择窗口打开时触发此事件
+   * @event {Function} popuphide 弹出的选择窗口关闭时触发此事件
+   */
+  export default {
+    name: 'UniDataPicker',
+    emits: ['popupopened', 'popupclosed', 'nodeclick', 'change', 'input', 'update:modelValue', 'inputclick'],
+    mixins: [dataPicker],
+    props: {
+      popupTitle: {
+        type: String,
+        default: '请选择'
+      },
+      placeholder: {
+        type: String,
+        default: '请选择'
+      },
+      heightMobile: {
+        type: String,
+        default: ''
+      },
+      readonly: {
+        type: Boolean,
+        default: false
+      },
+      clearIcon: {
+        type: Boolean,
+        default: true
+      },
+      border: {
+        type: Boolean,
+        default: true
+      },
+      split: {
+        type: String,
+        default: '/'
+      },
+      ellipsis: {
+        type: Boolean,
+        default: true
+      }
+    },
+    data() {
+      return {
+        isOpened: false
+      }
+    },
+    computed: {
+      isShowClearIcon() : boolean {
+        if (this.readonly) {
+          return false
+        }
+
+        if (this.clearIcon && this.selectedPaths.length > 0) {
+          return true
+        }
+
+        return false
+      }
+    },
+    created() {
+      this.load()
+    },
+    methods: {
+      clear() {
+      },
+      load() {
+        if (this.isLocalData) {
+          this.loadLocalData()
+        } else if (this.isCloudDataList || this.isCloudDataTree) {
+          this.loadCloudDataPath()
+        }
+      },
+      show() {
+        this.isOpened = true
+        this.$emit('popupopened')
+        if (!this.hasCloudTreeData) {
+          this.loadData()
+        }
+      },
+      hide() {
+        this.isOpened = false
+        this.$emit('popupclosed')
+      },
+      handleInput() {
+        if (this.readonly) {
+          this.$emit('inputclick')
+        } else {
+          this.show()
+        }
+      },
+      handleClose() {
+        this.hide()
+      },
+      onFinish() {
+        this.selectedPaths = this.getChangeNodes()
+        this.$emit('update:modelValue', this.selectedPaths)
+        this.$emit('change', this.selectedPaths)
+        this.hide()
+      }
+    }
+  }
+</script>
+
+<style>
+  @import url("../uni-data-pickerview/uni-data-pickerview.css");
+
+  .uni-data-tree {
+    position: relative;
+  }
+
+  .uni-data-tree-input {
+    position: relative;
+  }
+
+  .selected-loading {
+    display: flex;
+    justify-content: center;
+    position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+  }
+
+  .error-text {
+    flex: 1;
+    font-size: 12px;
+    color: #DD524D;
+  }
+
+  .input-value {
+    flex-direction: row;
+    align-items: center;
+    flex-wrap: nowrap;
+    padding: 5px 5px;
+    padding-right: 5px;
+    overflow: hidden;
+    min-height: 28px;
+  }
+
+  .input-value-border {
+    border: 1px solid #e5e5e5;
+    border-radius: 5px;
+  }
+
+  .selected-path {
+    flex: 1;
+    flex-direction: row;
+    overflow: hidden;
+  }
+
+  .load-more {
+    width: 40px;
+  }
+
+  .selected-list {
+    flex-direction: row;
+    flex-wrap: nowrap;
+  }
+
+  .selected-item {
+    flex-direction: row;
+    flex-wrap: nowrap;
+  }
+
+  .text-color {
+    font-size: 14px;
+    color: #333;
+  }
+
+  .placeholder {
+    color: grey;
+    font-size: 14px;
+  }
+
+  .input-split-line {
+    opacity: .5;
+    margin-left: 1px;
+    margin-right: 1px;
+  }
+
+  .arrow-area {
+    position: relative;
+    padding: 0 12px;
+    margin-left: auto;
+    justify-content: center;
+    transform: rotate(-45deg);
+    transform-origin: center;
+  }
+
+  .input-arrow {
+    width: 8px;
+    height: 8px;
+    border-left: 2px solid #999;
+    border-bottom: 2px solid #999;
+  }
+
+  .uni-data-tree-cover {
+    position: fixed;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    background-color: rgba(0, 0, 0, .4);
+    flex-direction: column;
+    z-index: 100;
+  }
+
+  .uni-data-tree-dialog {
+    position: fixed;
+    left: 0;
+    top: 20%;
+    right: 0;
+    bottom: 0;
+    background-color: #FFFFFF;
+    border-top-left-radius: 10px;
+    border-top-right-radius: 10px;
+    flex-direction: column;
+    z-index: 102;
+    overflow: hidden;
+  }
+
+  .dialog-caption {
+    position: relative;
+    flex-direction: row;
+  }
+
+  .dialog-title-view {
+    flex: 1;
+  }
+
+  .dialog-title {
+    align-self: center;
+    padding: 0 10px;
+    line-height: 44px;
+  }
+
+  .dialog-close {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    flex-direction: row;
+    align-items: center;
+    padding: 0 15px;
+  }
+
+  .dialog-close-plus {
+    width: 16px;
+    height: 2px;
+    background-color: #666;
+    border-radius: 2px;
+    transform: rotate(45deg);
+  }
+
+  .dialog-close-rotate {
+    position: absolute;
+    transform: rotate(-45deg);
+  }
+
+  .uni-data-pickerview {
+    flex: 1;
+  }
+
+  .icon-clear {
+    display: flex;
+    align-items: center;
+  }
+
+  /* #ifdef H5 */
+  @media all and (min-width: 768px) {
+    .uni-data-tree-cover {
+      background-color: transparent;
+    }
+
+    .uni-data-tree-dialog {
+      position: absolute;
+      top: 55px;
+      height: auto;
+      min-height: 400px;
+      max-height: 50vh;
+      background-color: #fff;
+      border: 1px solid #EBEEF5;
+      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+      border-radius: 4px;
+      overflow: unset;
+    }
+
+    .dialog-caption {
+      display: none;
+    }
+  }
+  /* #endif */
+</style>

+ 550 - 0
uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue

@@ -0,0 +1,550 @@
+<template>
+  <view class="uni-data-tree">
+    <view class="uni-data-tree-input" @click="handleInput">
+      <slot :options="options" :data="inputSelected" :error="errorMessage">
+        <view class="input-value" :class="{'input-value-border': border}">
+          <text v-if="errorMessage" class="selected-area error-text">{{errorMessage}}</text>
+          <view v-else-if="loading && !isOpened" class="selected-area">
+            <uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
+          </view>
+          <scroll-view v-else-if="inputSelected.length" class="selected-area" scroll-x="true">
+            <view class="selected-list">
+              <view class="selected-item" v-for="(item,index) in inputSelected" :key="index">
+                <text class="text-color">{{item.text}}</text><text v-if="index<inputSelected.length-1"
+                  class="input-split-line">{{split}}</text>
+              </view>
+            </view>
+          </scroll-view>
+          <text v-else class="selected-area placeholder">{{placeholder}}</text>
+          <view v-if="clearIcon && !readonly && inputSelected.length" class="icon-clear" @click.stop="clear">
+            <uni-icons type="clear" color="#c0c4cc" size="16"></uni-icons>
+          </view>
+          <view class="arrow-area" v-if="(!clearIcon || !inputSelected.length) && !readonly ">
+            <view class="input-arrow"></view>
+          </view>
+        </view>
+      </slot>
+    </view>
+    <view class="uni-data-tree-cover" v-if="isOpened" @click="handleClose"></view>
+    <view class="uni-data-tree-dialog" v-if="isOpened">
+      <view class="uni-popper__arrow"></view>
+      <view class="dialog-caption">
+        <view class="title-area">
+          <text class="dialog-title">{{popupTitle}}</text>
+        </view>
+        <view class="dialog-close" @click="handleClose">
+          <view class="dialog-close-plus" data-id="close"></view>
+          <view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
+        </view>
+      </view>
+      <data-picker-view class="picker-view" ref="pickerView" v-model="dataValue" :localdata="localdata"
+        :preload="preload" :collection="collection" :field="field" :orderby="orderby" :where="where"
+        :step-searh="stepSearh" :self-field="selfField" :parent-field="parentField" :managed-mode="true" :map="map"
+        :ellipsis="ellipsis" @change="onchange" @datachange="ondatachange" @nodeclick="onnodeclick">
+      </data-picker-view>
+    </view>
+  </view>
+</template>
+
+<script>
+  import dataPicker from "../uni-data-pickerview/uni-data-picker.js"
+  import DataPickerView from "../uni-data-pickerview/uni-data-pickerview.vue"
+
+  /**
+   * DataPicker 级联选择
+   * @description 支持单列、和多列级联选择。列数没有限制,如果屏幕显示不全,顶部tab区域会左右滚动。
+   * @tutorial https://ext.dcloud.net.cn/plugin?id=3796
+   * @property {String} popup-title 弹出窗口标题
+   * @property {Array} localdata 本地数据,参考
+   * @property {Boolean} border = [true|false] 是否有边框
+   * @property {Boolean} readonly = [true|false] 是否仅读
+   * @property {Boolean} preload = [true|false] 是否预加载数据
+   * @value true 开启预加载数据,点击弹出窗口后显示已加载数据
+   * @value false 关闭预加载数据,点击弹出窗口后开始加载数据
+   * @property {Boolean} step-searh = [true|false] 是否分布查询
+   * @value true 启用分布查询,仅查询当前选中节点
+   * @value false 关闭分布查询,一次查询出所有数据
+   * @property {String|DBFieldString} self-field 分布查询当前字段名称
+   * @property {String|DBFieldString} parent-field 分布查询父字段名称
+   * @property {String|DBCollectionString} collection 表名
+   * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
+   * @property {String} orderby 排序字段及正序倒叙设置
+   * @property {String|JQLString} where 查询条件
+   * @event {Function} popupshow 弹出的选择窗口打开时触发此事件
+   * @event {Function} popuphide 弹出的选择窗口关闭时触发此事件
+   */
+  export default {
+    name: 'UniDataPicker',
+    emits: ['popupopened', 'popupclosed', 'nodeclick', 'input', 'change', 'update:modelValue','inputclick'],
+    mixins: [dataPicker],
+    components: {
+      DataPickerView
+    },
+    props: {
+      options: {
+        type: [Object, Array],
+        default () {
+          return {}
+        }
+      },
+      popupTitle: {
+        type: String,
+        default: '请选择'
+      },
+      placeholder: {
+        type: String,
+        default: '请选择'
+      },
+      heightMobile: {
+        type: String,
+        default: ''
+      },
+      readonly: {
+        type: Boolean,
+        default: false
+      },
+      clearIcon: {
+        type: Boolean,
+        default: true
+      },
+      border: {
+        type: Boolean,
+        default: true
+      },
+      split: {
+        type: String,
+        default: '/'
+      },
+      ellipsis: {
+        type: Boolean,
+        default: true
+      }
+    },
+    data() {
+      return {
+        isOpened: false,
+        inputSelected: []
+      }
+    },
+    created() {
+      this.$nextTick(() => {
+        this.load();
+      })
+    },
+    watch: {
+			localdata: {
+				handler() {
+					this.load()
+				},
+        deep: true
+			},
+    },
+    methods: {
+      clear() {
+        this._dispatchEvent([]);
+      },
+      onPropsChange() {
+        this._treeData = [];
+        this.selectedIndex = 0;
+
+        this.load();
+      },
+      load() {
+        if (this.readonly) {
+          this._processReadonly(this.localdata, this.dataValue);
+          return;
+        }
+
+        // 回显本地数据
+        if (this.isLocalData) {
+          this.loadData();
+          this.inputSelected = this.selected.slice(0);
+        } else if (this.isCloudDataList || this.isCloudDataTree) { // 回显 Cloud 数据
+          this.loading = true;
+          this.getCloudDataValue().then((res) => {
+            this.loading = false;
+            this.inputSelected = res;
+          }).catch((err) => {
+            this.loading = false;
+            this.errorMessage = err;
+          })
+        }
+      },
+      show() {
+        this.isOpened = true
+        setTimeout(() => {
+          this.$refs.pickerView.updateData({
+            treeData: this._treeData,
+            selected: this.selected,
+            selectedIndex: this.selectedIndex
+          })
+        }, 200)
+        this.$emit('popupopened')
+      },
+      hide() {
+        this.isOpened = false
+        this.$emit('popupclosed')
+      },
+      handleInput() {
+        if (this.readonly) {
+					this.$emit('inputclick')
+          return
+        }
+        this.show()
+      },
+      handleClose(e) {
+        this.hide()
+      },
+      onnodeclick(e) {
+        this.$emit('nodeclick', e)
+      },
+      ondatachange(e) {
+        this._treeData = this.$refs.pickerView._treeData
+      },
+      onchange(e) {
+        this.hide()
+        this.$nextTick(() => {
+          this.inputSelected = e;
+        })
+        this._dispatchEvent(e)
+      },
+      _processReadonly(dataList, value) {
+        var isTree = dataList.findIndex((item) => {
+          return item.children
+        })
+        if (isTree > -1) {
+          let inputValue
+          if (Array.isArray(value)) {
+            inputValue = value[value.length - 1]
+            if (typeof inputValue === 'object' && inputValue.value) {
+              inputValue = inputValue.value
+            }
+          } else {
+            inputValue = value
+          }
+          this.inputSelected = this._findNodePath(inputValue, this.localdata)
+          return
+        }
+
+        if (!this.hasValue) {
+          this.inputSelected = []
+          return
+        }
+
+        let result = []
+        for (let i = 0; i < value.length; i++) {
+          var val = value[i]
+          var item = dataList.find((v) => {
+            return v.value == val
+          })
+          if (item) {
+            result.push(item)
+          }
+        }
+        if (result.length) {
+          this.inputSelected = result
+        }
+      },
+      _filterForArray(data, valueArray) {
+        var result = []
+        for (let i = 0; i < valueArray.length; i++) {
+          var value = valueArray[i]
+          var found = data.find((item) => {
+            return item.value == value
+          })
+          if (found) {
+            result.push(found)
+          }
+        }
+        return result
+      },
+      _dispatchEvent(selected) {
+        let item = {}
+        if (selected.length) {
+          var value = new Array(selected.length)
+          for (var i = 0; i < selected.length; i++) {
+            value[i] = selected[i].value
+          }
+          item = selected[selected.length - 1]
+        } else {
+          item.value = ''
+        }
+        if (this.formItem) {
+          this.formItem.setValue(item.value)
+        }
+
+        this.$emit('input', item.value)
+        this.$emit('update:modelValue', item.value)
+        this.$emit('change', {
+          detail: {
+            value: selected
+          }
+        })
+      }
+    }
+  }
+</script>
+
+<style>
+  .uni-data-tree {
+    flex: 1;
+    position: relative;
+    font-size: 14px;
+  }
+
+  .error-text {
+    color: #DD524D;
+  }
+
+  .input-value {
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    flex-direction: row;
+    align-items: center;
+    flex-wrap: nowrap;
+    font-size: 14px;
+    /* line-height: 35px; */
+    padding-right: 5px;
+    overflow: hidden;
+    height: 35px;
+    /* #ifndef APP-NVUE */
+    box-sizing: border-box;
+    /* #endif */
+  }
+
+  .input-value-border {
+    /* border: 1px solid #e5e5e5; */
+    border-radius: 5px;
+  }
+
+  .selected-area {
+    flex: 1;
+    overflow: hidden;
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    flex-direction: row;
+  }
+
+  .load-more {
+    /* #ifndef APP-NVUE */
+    margin-right: auto;
+    /* #endif */
+    /* #ifdef APP-NVUE */
+    width: 40px;
+    /* #endif */
+  }
+
+  .selected-list {
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    flex-direction: row;
+    flex-wrap: nowrap;
+    /* padding: 0 5px; */
+  }
+
+  .selected-item {
+    flex-direction: row;
+    /* padding: 0 1px; */
+    /* #ifndef APP-NVUE */
+    white-space: nowrap;
+    /* #endif */
+  }
+
+  .text-color {
+    color: #333;
+  }
+
+  .placeholder {
+    color: rgb(192, 196, 204);
+    font-size: 14px;
+	
+  }
+
+  .input-split-line {
+    opacity: .5;
+  }
+
+  .arrow-area {
+    position: relative;
+    width: 20px;
+    /* #ifndef APP-NVUE */
+    margin-left: auto;
+    display: flex;
+    /* #endif */
+    justify-content: center;
+    transform: rotate(-135deg);
+    transform-origin: center;
+  }
+
+  .input-arrow {
+    width: 10px;
+    height: 10px;
+    border-left: 2px solid #999;
+    border-bottom: 2px solid #999;
+  }
+
+  .uni-data-tree-cover {
+    position: fixed;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    background-color: rgba(0, 0, 0, .4);
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    flex-direction: column;
+    z-index: 100;
+  }
+
+  .uni-data-tree-dialog {
+    position: fixed;
+    left: 0;
+    /* #ifndef APP-NVUE */
+    top: 20%;
+    /* #endif */
+    /* #ifdef APP-NVUE */
+    top: 200px;
+    /* #endif */
+    right: 0;
+    bottom: 0;
+    background-color: #FFFFFF;
+    border-top-left-radius: 10px;
+    border-top-right-radius: 10px;
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    flex-direction: column;
+    z-index: 102;
+    overflow: hidden;
+    /* #ifdef APP-NVUE */
+    width: 750rpx;
+    /* #endif */
+  }
+
+  .dialog-caption {
+    position: relative;
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    flex-direction: row;
+    /* border-bottom: 1px solid #f0f0f0; */
+  }
+
+  .title-area {
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    align-items: center;
+    /* #ifndef APP-NVUE */
+    margin: auto;
+    /* #endif */
+    padding: 0 10px;
+  }
+
+  .dialog-title {
+    /* font-weight: bold; */
+    line-height: 44px;
+  }
+
+  .dialog-close {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    flex-direction: row;
+    align-items: center;
+    padding: 0 15px;
+  }
+
+  .dialog-close-plus {
+    width: 16px;
+    height: 2px;
+    background-color: #666;
+    border-radius: 2px;
+    transform: rotate(45deg);
+  }
+
+  .dialog-close-rotate {
+    position: absolute;
+    transform: rotate(-45deg);
+  }
+
+  .picker-view {
+    flex: 1;
+    overflow: hidden;
+  }
+
+  .icon-clear {
+    display: flex;
+    align-items: center;
+  }
+
+  /* #ifdef H5 */
+  @media all and (min-width: 768px) {
+    .uni-data-tree-cover {
+      background-color: transparent;
+    }
+
+    .uni-data-tree-dialog {
+      position: absolute;
+      top: 55px;
+      height: auto;
+      min-height: 400px;
+      max-height: 50vh;
+      background-color: #fff;
+      border: 1px solid #EBEEF5;
+      box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+      border-radius: 4px;
+      overflow: unset;
+    }
+
+    .dialog-caption {
+      display: none;
+    }
+
+    .icon-clear {
+      /* margin-right: 5px; */
+    }
+  }
+
+  /* #endif */
+
+  /* picker 弹出层通用的指示小三角, todo:扩展至上下左右方向定位 */
+  /* #ifndef APP-NVUE */
+  .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;
+  }
+
+  /* #endif */
+</style>

+ 622 - 0
uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-picker.js

@@ -0,0 +1,622 @@
+export default {
+  props: {
+    localdata: {
+      type: [Array, Object],
+      default () {
+        return []
+      }
+    },
+    spaceInfo: {
+      type: Object,
+      default () {
+        return {}
+      }
+    },
+    collection: {
+      type: String,
+      default: ''
+    },
+    action: {
+      type: String,
+      default: ''
+    },
+    field: {
+      type: String,
+      default: ''
+    },
+    orderby: {
+      type: String,
+      default: ''
+    },
+    where: {
+      type: [String, Object],
+      default: ''
+    },
+    pageData: {
+      type: String,
+      default: 'add'
+    },
+    pageCurrent: {
+      type: Number,
+      default: 1
+    },
+    pageSize: {
+      type: Number,
+      default: 500
+    },
+    getcount: {
+      type: [Boolean, String],
+      default: false
+    },
+    getone: {
+      type: [Boolean, String],
+      default: false
+    },
+    gettree: {
+      type: [Boolean, String],
+      default: false
+    },
+    manual: {
+      type: Boolean,
+      default: false
+    },
+    value: {
+      type: [Array, String, Number],
+      default () {
+        return []
+      }
+    },
+    modelValue: {
+      type: [Array, String, Number],
+      default () {
+        return []
+      }
+    },
+    preload: {
+      type: Boolean,
+      default: false
+    },
+    stepSearh: {
+      type: Boolean,
+      default: true
+    },
+    selfField: {
+      type: String,
+      default: ''
+    },
+    parentField: {
+      type: String,
+      default: ''
+    },
+    multiple: {
+      type: Boolean,
+      default: false
+    },
+    map: {
+      type: Object,
+      default () {
+        return {
+          text: "text",
+          value: "value"
+        }
+      }
+    }
+  },
+  data() {
+    return {
+      loading: false,
+      errorMessage: '',
+      loadMore: {
+        contentdown: '',
+        contentrefresh: '',
+        contentnomore: ''
+      },
+      dataList: [],
+      selected: [],
+      selectedIndex: 0,
+      page: {
+        current: this.pageCurrent,
+        size: this.pageSize,
+        count: 0
+      }
+    }
+  },
+  computed: {
+    isLocalData() {
+      return !this.collection.length;
+    },
+    isCloudData() {
+      return this.collection.length > 0;
+    },
+    isCloudDataList() {
+      return (this.isCloudData && (!this.parentField && !this.selfField));
+    },
+    isCloudDataTree() {
+      return (this.isCloudData && this.parentField && this.selfField);
+    },
+    dataValue() {
+      let isModelValue = Array.isArray(this.modelValue) ? (this.modelValue.length > 0) : (this.modelValue !== null ||
+        this.modelValue !== undefined);
+      return isModelValue ? this.modelValue : this.value;
+    },
+    hasValue() {
+      if (typeof this.dataValue === 'number') {
+        return true
+      }
+      return (this.dataValue != null) && (this.dataValue.length > 0)
+    }
+  },
+  created() {
+    this.$watch(() => {
+      var al = [];
+      ['pageCurrent',
+        'pageSize',
+        'spaceInfo',
+        'value',
+        'modelValue',
+        'localdata',
+        'collection',
+        'action',
+        'field',
+        'orderby',
+        'where',
+        'getont',
+        'getcount',
+        'gettree'
+      ].forEach(key => {
+        al.push(this[key])
+      });
+      return al
+    }, (newValue, oldValue) => {
+      let needReset = false
+      for (let i = 2; i < newValue.length; i++) {
+        if (newValue[i] != oldValue[i]) {
+          needReset = true
+          break
+        }
+      }
+      if (newValue[0] != oldValue[0]) {
+        this.page.current = this.pageCurrent
+      }
+      this.page.size = this.pageSize
+
+      this.onPropsChange()
+    })
+    this._treeData = []
+  },
+  methods: {
+    onPropsChange() {
+      this._treeData = [];
+    },
+
+    // 填充 pickview 数据
+    async loadData() {
+      if (this.isLocalData) {
+        this.loadLocalData();
+      } else if (this.isCloudDataList) {
+        this.loadCloudDataList();
+      } else if (this.isCloudDataTree) {
+        this.loadCloudDataTree();
+      }
+    },
+
+    // 加载本地数据
+    async loadLocalData() {
+      this._treeData = [];
+      this._extractTree(this.localdata, this._treeData);
+
+      let inputValue = this.dataValue;
+      if (inputValue === undefined) {
+        return;
+      }
+
+      if (Array.isArray(inputValue)) {
+        inputValue = inputValue[inputValue.length - 1];
+        if (typeof inputValue === 'object' && inputValue[this.map.value]) {
+          inputValue = inputValue[this.map.value];
+        }
+      }
+
+      this.selected = this._findNodePath(inputValue, this.localdata);
+    },
+
+    // 加载 Cloud 数据 (单列)
+    async loadCloudDataList() {
+      if (this.loading) {
+        return;
+      }
+      this.loading = true;
+
+      try {
+        let response = await this.getCommand();
+        let responseData = response.result.data;
+
+        this._treeData = responseData;
+
+        this._updateBindData();
+        this._updateSelected();
+
+        this.onDataChange();
+      } catch (e) {
+        this.errorMessage = e;
+      } finally {
+        this.loading = false;
+      }
+    },
+
+    // 加载 Cloud 数据 (树形)
+    async loadCloudDataTree() {
+      if (this.loading) {
+        return;
+      }
+      this.loading = true;
+
+      try {
+        let commandOptions = {
+          field: this._cloudDataPostField(),
+          where: this._cloudDataTreeWhere()
+        };
+        if (this.gettree) {
+          commandOptions.startwith = `${this.selfField}=='${this.dataValue}'`;
+        }
+
+        let response = await this.getCommand(commandOptions);
+        let responseData = response.result.data;
+
+        this._treeData = responseData;
+        this._updateBindData();
+        this._updateSelected();
+
+        this.onDataChange();
+      } catch (e) {
+        this.errorMessage = e;
+      } finally {
+        this.loading = false;
+      }
+    },
+
+    // 加载 Cloud 数据 (节点)
+    async loadCloudDataNode(callback) {
+      if (this.loading) {
+        return;
+      }
+      this.loading = true;
+
+      try {
+        let commandOptions = {
+          field: this._cloudDataPostField(),
+          where: this._cloudDataNodeWhere()
+        };
+
+        let response = await this.getCommand(commandOptions);
+        let responseData = response.result.data;
+
+        callback(responseData);
+      } catch (e) {
+        this.errorMessage = e;
+      } finally {
+        this.loading = false;
+      }
+    },
+
+    // 回显 Cloud 数据
+    getCloudDataValue() {
+      if (this.isCloudDataList) {
+        return this.getCloudDataListValue();
+      }
+
+      if (this.isCloudDataTree) {
+        return this.getCloudDataTreeValue();
+      }
+    },
+
+    // 回显 Cloud 数据 (单列)
+    getCloudDataListValue() {
+      // 根据 field's as value标识匹配 where 条件
+      let where = [];
+      let whereField = this._getForeignKeyByField();
+      if (whereField) {
+        where.push(`${whereField} == '${this.dataValue}'`)
+      }
+
+      where = where.join(' || ');
+
+      if (this.where) {
+        where = `(${this.where}) && (${where})`
+      }
+
+      return this.getCommand({
+        field: this._cloudDataPostField(),
+        where
+      }).then((res) => {
+        this.selected = res.result.data;
+        return res.result.data;
+      });
+    },
+
+    // 回显 Cloud 数据 (树形)
+    getCloudDataTreeValue() {
+      return this.getCommand({
+        field: this._cloudDataPostField(),
+        getTreePath: {
+          startWith: `${this.selfField}=='${this.dataValue}'`
+        }
+      }).then((res) => {
+        let treePath = [];
+        this._extractTreePath(res.result.data, treePath);
+        this.selected = treePath;
+        return treePath;
+      });
+    },
+
+    getCommand(options = {}) {
+      /* eslint-disable no-undef */
+      let db = uniCloud.database(this.spaceInfo)
+
+      const action = options.action || this.action
+      if (action) {
+        db = db.action(action)
+      }
+
+      const collection = options.collection || this.collection
+      db = db.collection(collection)
+
+      const where = options.where || this.where
+      if (!(!where || !Object.keys(where).length)) {
+        db = db.where(where)
+      }
+
+      const field = options.field || this.field
+      if (field) {
+        db = db.field(field)
+      }
+
+      const orderby = options.orderby || this.orderby
+      if (orderby) {
+        db = db.orderBy(orderby)
+      }
+
+      const current = options.pageCurrent !== undefined ? options.pageCurrent : this.page.current
+      const size = options.pageSize !== undefined ? options.pageSize : this.page.size
+      const getCount = options.getcount !== undefined ? options.getcount : this.getcount
+      const getTree = options.gettree !== undefined ? options.gettree : this.gettree
+
+      const getOptions = {
+        getCount,
+        getTree
+      }
+      if (options.getTreePath) {
+        getOptions.getTreePath = options.getTreePath
+      }
+
+      db = db.skip(size * (current - 1)).limit(size).get(getOptions)
+
+      return db
+    },
+
+    _cloudDataPostField() {
+      let fields = [this.field];
+      if (this.parentField) {
+        fields.push(`${this.parentField} as parent_value`);
+      }
+      return fields.join(',');
+    },
+
+    _cloudDataTreeWhere() {
+      let result = []
+      let selected = this.selected
+      let parentField = this.parentField
+      if (parentField) {
+        result.push(`${parentField} == null || ${parentField} == ""`)
+      }
+      if (selected.length) {
+        for (var i = 0; i < selected.length - 1; i++) {
+          result.push(`${parentField} == '${selected[i].value}'`)
+        }
+      }
+
+      let where = []
+      if (this.where) {
+        where.push(`(${this.where})`)
+      }
+
+      if (result.length) {
+        where.push(`(${result.join(' || ')})`)
+      }
+
+      return where.join(' && ')
+    },
+
+    _cloudDataNodeWhere() {
+      let where = []
+      let selected = this.selected;
+      if (selected.length) {
+        where.push(`${this.parentField} == '${selected[selected.length - 1].value}'`);
+      }
+
+      where = where.join(' || ');
+
+      if (this.where) {
+        return `(${this.where}) && (${where})`
+      }
+
+      return where
+    },
+
+    _getWhereByForeignKey() {
+      let result = []
+      let whereField = this._getForeignKeyByField();
+      if (whereField) {
+        result.push(`${whereField} == '${this.dataValue}'`)
+      }
+
+      if (this.where) {
+        return `(${this.where}) && (${result.join(' || ')})`
+      }
+
+      return result.join(' || ')
+    },
+
+    _getForeignKeyByField() {
+      let fields = this.field.split(',');
+      let whereField = null;
+      for (let i = 0; i < fields.length; i++) {
+        const items = fields[i].split('as');
+        if (items.length < 2) {
+          continue;
+        }
+        if (items[1].trim() === 'value') {
+          whereField = items[0].trim();
+          break;
+        }
+      }
+      return whereField;
+    },
+
+    _updateBindData(node) {
+      const {
+        dataList,
+        hasNodes
+      } = this._filterData(this._treeData, this.selected)
+
+      let isleaf = this._stepSearh === false && !hasNodes
+
+      if (node) {
+        node.isleaf = isleaf
+      }
+
+      this.dataList = dataList
+      this.selectedIndex = dataList.length - 1
+
+      if (!isleaf && this.selected.length < dataList.length) {
+        this.selected.push({
+          value: null,
+          text: "请选择"
+        })
+      }
+
+      return {
+        isleaf,
+        hasNodes
+      }
+    },
+
+    _updateSelected() {
+      let dl = this.dataList
+      let sl = this.selected
+      let textField = this.map.text
+      let valueField = this.map.value
+      for (let i = 0; i < sl.length; i++) {
+        let value = sl[i].value
+        let dl2 = dl[i]
+        for (let j = 0; j < dl2.length; j++) {
+          let item2 = dl2[j]
+          if (item2[valueField] === value) {
+            sl[i].text = item2[textField]
+            break
+          }
+        }
+      }
+    },
+
+    _filterData(data, paths) {
+      let dataList = []
+      let hasNodes = true
+
+      dataList.push(data.filter((item) => {
+        return (item.parent_value === null || item.parent_value === undefined || item.parent_value === '')
+      }))
+      for (let i = 0; i < paths.length; i++) {
+        let value = paths[i].value
+        let nodes = data.filter((item) => {
+          return item.parent_value === value
+        })
+
+        if (nodes.length) {
+          dataList.push(nodes)
+        } else {
+          hasNodes = false
+        }
+      }
+
+      return {
+        dataList,
+        hasNodes
+      }
+    },
+
+    _extractTree(nodes, result, parent_value) {
+      let list = result || []
+      let valueField = this.map.value
+      for (let i = 0; i < nodes.length; i++) {
+        let node = nodes[i]
+
+        let child = {}
+        for (let key in node) {
+          if (key !== 'children') {
+            child[key] = node[key]
+          }
+        }
+        if (parent_value !== null && parent_value !== undefined && parent_value !== '') {
+          child.parent_value = parent_value
+        }
+        result.push(child)
+
+        let children = node.children
+        if (children) {
+          this._extractTree(children, result, node[valueField])
+        }
+      }
+    },
+
+    _extractTreePath(nodes, result) {
+      let list = result || []
+      for (let i = 0; i < nodes.length; i++) {
+        let node = nodes[i]
+
+        let child = {}
+        for (let key in node) {
+          if (key !== 'children') {
+            child[key] = node[key]
+          }
+        }
+        result.push(child)
+
+        let children = node.children
+        if (children) {
+          this._extractTreePath(children, result)
+        }
+      }
+    },
+
+    _findNodePath(key, nodes, path = []) {
+      let textField = this.map.text
+      let valueField = this.map.value
+      for (let i = 0; i < nodes.length; i++) {
+        let node = nodes[i]
+        let children = node.children
+        let text = node[textField]
+        let value = node[valueField]
+
+        path.push({
+          value,
+          text
+        })
+
+        if (value === key) {
+          return path
+        }
+
+        if (children) {
+          const p = this._findNodePath(key, children, path)
+          if (p.length) {
+            return p
+          }
+        }
+
+        path.pop()
+      }
+      return []
+    }
+  }
+}

+ 692 - 0
uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-picker.uts

@@ -0,0 +1,692 @@
+export type PaginationType = {
+  current : number,
+  size : number,
+  count : number
+}
+
+export type LoadMoreType = {
+  contentdown : string,
+  contentrefresh : string,
+  contentnomore : string
+}
+
+export type SelectedItemType = {
+  name : string,
+  value : string,
+}
+
+export type GetCommandOptions = {
+  collection ?: UTSJSONObject,
+  field ?: string,
+  orderby ?: string,
+  where ?: any,
+  pageData ?: string,
+  pageCurrent ?: number,
+  pageSize ?: number,
+  getCount ?: boolean,
+  getTree ?: any,
+  getTreePath ?: UTSJSONObject,
+  startwith ?: string,
+  limitlevel ?: number,
+  groupby ?: string,
+  groupField ?: string,
+  distinct ?: boolean,
+  pageIndistinct ?: boolean,
+  foreignKey ?: string,
+  loadtime ?: string,
+  manual ?: boolean
+}
+
+const DefaultSelectedNode = {
+  text: '请选择',
+  value: ''
+}
+
+export const dataPicker = defineMixin({
+  props: {
+    localdata: {
+      type: Array as PropType<Array<UTSJSONObject>>,
+      default: [] as Array<UTSJSONObject>
+    },
+    collection: {
+      type: Object,
+      default: ''
+    },
+    field: {
+      type: String,
+      default: ''
+    },
+    orderby: {
+      type: String,
+      default: ''
+    },
+    where: {
+      type: Object,
+      default: ''
+    },
+    pageData: {
+      type: String,
+      default: 'add'
+    },
+    pageCurrent: {
+      type: Number,
+      default: 1
+    },
+    pageSize: {
+      type: Number,
+      default: 20
+    },
+    getcount: {
+      type: Boolean,
+      default: false
+    },
+    gettree: {
+      type: Object,
+      default: ''
+    },
+    gettreepath: {
+      type: Object,
+      default: ''
+    },
+    startwith: {
+      type: String,
+      default: ''
+    },
+    limitlevel: {
+      type: Number,
+      default: 10
+    },
+    groupby: {
+      type: String,
+      default: ''
+    },
+    groupField: {
+      type: String,
+      default: ''
+    },
+    distinct: {
+      type: Boolean,
+      default: false
+    },
+    pageIndistinct: {
+      type: Boolean,
+      default: false
+    },
+    foreignKey: {
+      type: String,
+      default: ''
+    },
+    loadtime: {
+      type: String,
+      default: 'auto'
+    },
+    manual: {
+      type: Boolean,
+      default: false
+    },
+    preload: {
+      type: Boolean,
+      default: false
+    },
+    stepSearh: {
+      type: Boolean,
+      default: true
+    },
+    selfField: {
+      type: String,
+      default: ''
+    },
+    parentField: {
+      type: String,
+      default: ''
+    },
+    multiple: {
+      type: Boolean,
+      default: false
+    },
+    value: {
+      type: Object,
+      default: ''
+    },
+    modelValue: {
+      type: Object,
+      default: ''
+    },
+    defaultProps: {
+      type: Object as PropType<UTSJSONObject>,
+    }
+  },
+  data() {
+    return {
+      loading: false,
+      error: null as UniCloudError | null,
+      treeData: [] as Array<UTSJSONObject>,
+      selectedIndex: 0,
+      selectedNodes: [] as Array<UTSJSONObject>,
+      selectedPages: [] as Array<UTSJSONObject>[],
+      selectedValue: '',
+      selectedPaths: [] as Array<UTSJSONObject>,
+      pagination: {
+        current: 1,
+        size: 20,
+        count: 0
+      } as PaginationType
+    }
+  },
+  computed: {
+    mappingTextName() : string {
+      // TODO
+      return (this.defaultProps != null) ? this.defaultProps!.getString('text', 'text') : 'text'
+    },
+    mappingValueName() : string {
+      // TODO
+      return (this.defaultProps != null) ? this.defaultProps!.getString('value', 'value') : 'value'
+    },
+    currentDataList() : Array<UTSJSONObject> {
+      if (this.selectedIndex > this.selectedPages.length - 1) {
+        return [] as Array<UTSJSONObject>
+      }
+      return this.selectedPages[this.selectedIndex]
+    },
+    isLocalData() : boolean {
+      return this.localdata.length > 0
+    },
+    isCloudData() : boolean {
+      return this._checkIsNotNull(this.collection)
+    },
+    isCloudDataList() : boolean {
+      return (this.isCloudData && (this.parentField.length == 0 && this.selfField.length == 0))
+    },
+    isCloudDataTree() : boolean {
+      return (this.isCloudData && this.parentField.length > 0 && this.selfField.length > 0)
+    },
+    dataValue() : any {
+      return this.hasModelValue ? this.modelValue : this.value
+    },
+    hasCloudTreeData() : boolean {
+      return this.treeData.length > 0
+    },
+    hasModelValue() : boolean {
+      if (typeof this.modelValue == 'string') {
+        const valueString = this.modelValue as string
+        return (valueString.length > 0)
+      } else if (Array.isArray(this.modelValue)) {
+        const valueArray = this.modelValue as Array<string>
+        return (valueArray.length > 0)
+      }
+      return false
+    },
+    hasCloudDataValue() : boolean {
+      if (typeof this.dataValue == 'string') {
+        const valueString = this.dataValue as string
+        return (valueString.length > 0)
+      }
+      return false
+    }
+  },
+  created() {
+    this.pagination.current = this.pageCurrent
+    this.pagination.size = this.pageSize
+
+    this.$watch(
+      () : any => [
+        this.pageCurrent,
+        this.pageSize,
+        this.localdata,
+        this.value,
+        this.collection,
+        this.field,
+        this.getcount,
+        this.orderby,
+        this.where,
+        this.groupby,
+        this.groupField,
+        this.distinct
+      ],
+      (newValue : Array<any>, oldValue : Array<any>) => {
+        this.pagination.size = this.pageSize
+        if (newValue[0] !== oldValue[0]) {
+          this.pagination.current = this.pageCurrent
+        }
+
+        this.onPropsChange()
+      }
+    )
+  },
+  methods: {
+    onPropsChange() {
+      this.selectedIndex = 0
+      this.selectedNodes.length = 0
+      this.selectedPages.length = 0
+      this.selectedPaths.length = 0
+
+      // 加载数据
+      this.$nextTick(() => {
+        this.loadData()
+      })
+    },
+
+    onTabSelect(index : number) {
+      this.selectedIndex = index
+    },
+
+    onNodeClick(nodeData : UTSJSONObject) {
+      if (nodeData.getBoolean('disable', false)) {
+        return
+      }
+
+      const isLeaf = this._checkIsLeafNode(nodeData)
+
+      this._trimSelectedNodes(nodeData)
+
+      this.$emit('nodeclick', nodeData)
+
+      if (this.isLocalData) {
+        if (isLeaf || !this._checkHasChildren(nodeData)) {
+          this.onFinish()
+        }
+      } else if (this.isCloudDataList) {
+        this.onFinish()
+      } else if (this.isCloudDataTree) {
+        if (isLeaf) {
+          this.onFinish()
+        } else if (!this._checkHasChildren(nodeData)) {
+          // 尝试请求一次,如果没有返回数据标记为叶子节点
+          this.loadCloudDataNode(nodeData)
+        }
+      }
+    },
+
+    getChangeNodes(): Array<UTSJSONObject> {
+      const nodes: Array<UTSJSONObject> = []
+      this.selectedNodes.forEach((node : UTSJSONObject) => {
+        const newNode: UTSJSONObject = {}
+        newNode[this.mappingTextName] = node.getString(this.mappingTextName)
+        newNode[this.mappingValueName] = node.getString(this.mappingValueName)
+        nodes.push(newNode)
+      })
+      return nodes
+    },
+
+    onFinish() { },
+
+    // 加载数据(自动判定环境)
+    loadData() {
+      if (this.isLocalData) {
+        this.loadLocalData()
+      } else if (this.isCloudDataList) {
+        this.loadCloudDataList()
+      } else if (this.isCloudDataTree) {
+        this.loadCloudDataTree()
+      }
+    },
+
+    // 加载本地数据
+    loadLocalData() {
+      this.treeData = this.localdata
+      if (Array.isArray(this.dataValue)) {
+        const value = this.dataValue as Array<UTSJSONObject>
+        this.selectedPaths = value.slice(0)
+        this._pushSelectedTreeNodes(value, this.localdata)
+      } else {
+        this._pushSelectedNodes(this.localdata)
+      }
+    },
+
+    // 加载 Cloud 数据 (单列)
+    loadCloudDataList() {
+      this._loadCloudData(null, (data : Array<UTSJSONObject>) => {
+        this.treeData = data
+        this._pushSelectedNodes(data)
+      })
+    },
+
+    // 加载 Cloud 数据 (树形)
+    loadCloudDataTree() {
+      let commandOptions = {
+        field: this._cloudDataPostField(),
+        where: this._cloudDataTreeWhere(),
+        getTree: true
+      } as GetCommandOptions
+      if (this._checkIsNotNull(this.gettree)) {
+        commandOptions.startwith = `${this.selfField}=='${this.dataValue as string}'`
+      }
+      this._loadCloudData(commandOptions, (data : Array<UTSJSONObject>) => {
+        this.treeData = data
+        if (this.selectedPaths.length > 0) {
+          this._pushSelectedTreeNodes(this.selectedPaths, data)
+        } else {
+          this._pushSelectedNodes(data)
+        }
+      })
+    },
+
+    // 加载 Cloud 数据 (节点)
+    loadCloudDataNode(nodeData : UTSJSONObject) {
+      const commandOptions = {
+        field: this._cloudDataPostField(),
+        where: this._cloudDataNodeWhere()
+      } as GetCommandOptions
+      this._loadCloudData(commandOptions, (data : Array<UTSJSONObject>) => {
+        nodeData['children'] = data
+        if (data.length == 0) {
+          nodeData['isleaf'] = true
+          this.onFinish()
+        } else {
+          this._pushSelectedNodes(data)
+        }
+      })
+    },
+
+    // 回显 Cloud Tree Path
+    loadCloudDataPath() {
+      if (!this.hasCloudDataValue) {
+        return
+      }
+
+      const command : GetCommandOptions = {}
+
+      // 单列
+      if (this.isCloudDataList) {
+        // 根据 field's as value标识匹配 where 条件
+        let where : Array<string> = [];
+        let whereField = this._getForeignKeyByField();
+        if (whereField.length > 0) {
+          where.push(`${whereField} == '${this.dataValue as string}'`)
+        }
+
+        let whereString = where.join(' || ')
+        if (this._checkIsNotNull(this.where)) {
+          whereString = `(${this.where}) && (${whereString})`
+        }
+
+        command.field = this._cloudDataPostField()
+        command.where = whereString
+      }
+
+      // 树形
+      if (this.isCloudDataTree) {
+        command.field = this._cloudDataPostField()
+        command.getTreePath = {
+          startWith: `${this.selfField}=='${this.dataValue as string}'`
+        }
+      }
+
+      this._loadCloudData(command, (data : Array<UTSJSONObject>) => {
+        this._extractTreePath(data, this.selectedPaths)
+      })
+    },
+
+    _loadCloudData(options ?: GetCommandOptions, callback ?: ((data : Array<UTSJSONObject>) => void)) {
+      if (this.loading) {
+        return
+      }
+      this.loading = true
+
+      this.error = null
+
+      this._getCommand(options).then((response : UniCloudDBGetResult) => {
+        callback?.(response.data)
+      }).catch((err : any | null) => {
+        this.error = err as UniCloudError
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+
+    _cloudDataPostField() : string {
+      let fields = [this.field];
+      if (this.parentField.length > 0) {
+        fields.push(`${this.parentField} as parent_value`)
+      }
+      return fields.join(',')
+    },
+
+    _cloudDataTreeWhere() : string {
+      let result : Array<string> = []
+      let selectedNodes = this.selectedNodes.length > 0 ? this.selectedNodes : this.selectedPaths
+      let parentField = this.parentField
+      if (parentField.length > 0) {
+        result.push(`${parentField} == null || ${parentField} == ""`)
+      }
+      if (selectedNodes.length > 0) {
+        for (var i = 0; i < selectedNodes.length - 1; i++) {
+          const parentFieldValue = selectedNodes[i].getString('value', '')
+          result.push(`${parentField} == '${parentFieldValue}'`)
+        }
+      }
+
+      let where : Array<string> = []
+      if (this._checkIsNotNull(this.where)) {
+        where.push(`(${this.where as string})`)
+      }
+
+      if (result.length > 0) {
+        where.push(`(${result.join(' || ')})`)
+      }
+
+      return where.join(' && ')
+    },
+
+    _cloudDataNodeWhere() : string {
+      const where : Array<string> = []
+      if (this.selectedNodes.length > 0) {
+        const value = this.selectedNodes[this.selectedNodes.length - 1].getString('value', '')
+        where.push(`${this.parentField} == '${value}'`)
+      }
+
+      let whereString = where.join(' || ')
+      if (this._checkIsNotNull(this.where)) {
+        return `(${this.where as string}) && (${whereString})`
+      }
+
+      return whereString
+    },
+
+    _getWhereByForeignKey() : string {
+      let result : Array<string> = []
+      let whereField = this._getForeignKeyByField();
+      if (whereField.length > 0) {
+        result.push(`${whereField} == '${this.dataValue as string}'`)
+      }
+
+      if (this._checkIsNotNull(this.where)) {
+        return `(${this.where}) && (${result.join(' || ')})`
+      }
+
+      return result.join(' || ')
+    },
+
+    _getForeignKeyByField() : string {
+      const fields = this.field.split(',')
+      let whereField = ''
+      for (let i = 0; i < fields.length; i++) {
+        const items = fields[i].split('as')
+        if (items.length < 2) {
+          continue
+        }
+        if (items[1].trim() === 'value') {
+          whereField = items[0].trim()
+          break
+        }
+      }
+      return whereField
+    },
+
+    _getCommand(options ?: GetCommandOptions) : Promise<UniCloudDBGetResult> {
+      let db = uniCloud.databaseForJQL()
+
+      let collection = Array.isArray(this.collection) ? db.collection(...(this.collection as Array<any>)) : db.collection(this.collection)
+
+      let filter : UniCloudDBFilter | null = null
+      if (this.foreignKey.length > 0) {
+        filter = collection.foreignKey(this.foreignKey)
+      }
+
+      const where : any = options?.where ?? this.where
+      if (typeof where == 'string') {
+        const whereString = where as string
+        if (whereString.length > 0) {
+          filter = (filter != null) ? filter.where(where) : collection.where(where)
+        }
+      } else {
+        filter = (filter != null) ? filter.where(where) : collection.where(where)
+      }
+
+      let query : UniCloudDBQuery | null = null
+      if (this.field.length > 0) {
+        query = (filter != null) ? filter.field(this.field) : collection.field(this.field)
+      }
+      if (this.groupby.length > 0) {
+        if (query != null) {
+          query = query.groupBy(this.groupby)
+        } else if (filter != null) {
+          query = filter.groupBy(this.groupby)
+        }
+      }
+      if (this.groupField.length > 0) {
+        if (query != null) {
+          query = query.groupField(this.groupField)
+        } else if (filter != null) {
+          query = filter.groupField(this.groupField)
+        }
+      }
+      if (this.distinct == true) {
+        if (query != null) {
+          query = query.distinct(this.field)
+        } else if (filter != null) {
+          query = filter.distinct(this.field)
+        }
+      }
+      if (this.orderby.length > 0) {
+        if (query != null) {
+          query = query.orderBy(this.orderby)
+        } else if (filter != null) {
+          query = filter.orderBy(this.orderby)
+        }
+      }
+
+      const size = this.pagination.size
+      const current = this.pagination.current
+      if (query != null) {
+        query = query.skip(size * (current - 1)).limit(size)
+      } else if (filter != null) {
+        query = filter.skip(size * (current - 1)).limit(size)
+      } else {
+        query = collection.skip(size * (current - 1)).limit(size)
+      }
+
+      const getOptions = {}
+      const treeOptions = {
+        limitLevel: this.limitlevel,
+        startWith: this.startwith
+      }
+      if (this.getcount == true) {
+        getOptions['getCount'] = this.getcount
+      }
+
+      const getTree : any = options?.getTree ?? this.gettree
+      if (typeof getTree == 'string') {
+        const getTreeString = getTree as string
+        if (getTreeString.length > 0) {
+          getOptions['getTree'] = treeOptions
+        }
+      } else if (typeof getTree == 'object') {
+        getOptions['getTree'] = treeOptions
+      } else {
+        getOptions['getTree'] = getTree
+      }
+
+      const getTreePath = options?.getTreePath ?? this.gettreepath
+      if (typeof getTreePath == 'string') {
+        const getTreePathString = getTreePath as string
+        if (getTreePathString.length > 0) {
+          getOptions['getTreePath'] = getTreePath
+        }
+      } else {
+        getOptions['getTreePath'] = getTreePath
+      }
+
+      return query.get(getOptions)
+    },
+
+    _checkIsNotNull(value : any) : boolean {
+      if (typeof value == 'string') {
+        const valueString = value as string
+        return (valueString.length > 0)
+      } else if (value instanceof UTSJSONObject) {
+        return true
+      }
+      return false
+    },
+
+    _checkIsLeafNode(nodeData : UTSJSONObject) : boolean {
+      if (this.selectedIndex >= this.limitlevel) {
+        return true
+      }
+
+      if (nodeData.getBoolean('isleaf', false)) {
+        return true
+      }
+
+      return false
+    },
+
+    _checkHasChildren(nodeData : UTSJSONObject) : boolean {
+      const children = nodeData.getArray('children') ?? ([] as Array<any>)
+      return children.length > 0
+    },
+
+    _pushSelectedNodes(nodes : Array<UTSJSONObject>) {
+      this.selectedNodes.push(DefaultSelectedNode)
+      this.selectedPages.push(nodes)
+      this.selectedIndex = this.selectedPages.length - 1
+    },
+
+    _trimSelectedNodes(nodeData : UTSJSONObject) {
+      this.selectedNodes.splice(this.selectedIndex)
+      this.selectedNodes.push(nodeData)
+
+      if (this.selectedPages.length > 0) {
+        this.selectedPages.splice(this.selectedIndex + 1)
+      }
+
+      const children = nodeData.getArray<UTSJSONObject>('children') ?? ([] as Array<UTSJSONObject>)
+      if (children.length > 0) {
+        this.selectedNodes.push(DefaultSelectedNode)
+        this.selectedPages.push(children)
+      }
+
+      this.selectedIndex = this.selectedPages.length - 1
+    },
+
+    _pushSelectedTreeNodes(paths : Array<UTSJSONObject>, nodes : Array<UTSJSONObject>) {
+      let children : Array<UTSJSONObject> = nodes
+      paths.forEach((node : UTSJSONObject) => {
+        const findNode = children.find((item : UTSJSONObject) : boolean => {
+          return (item.getString(this.mappingValueName) == node.getString(this.mappingValueName))
+        })
+        if (findNode != null) {
+          this.selectedPages.push(children)
+          this.selectedNodes.push(node)
+          children = findNode.getArray<UTSJSONObject>('children') ?? ([] as Array<UTSJSONObject>)
+        }
+      })
+      this.selectedIndex = this.selectedPages.length - 1
+    },
+
+    _extractTreePath(nodes : Array<UTSJSONObject>, result : Array<UTSJSONObject>) {
+      if (nodes.length == 0) {
+        return
+      }
+
+      const node = nodes[0]
+      result.push(node)
+
+      const children = node.getArray<UTSJSONObject>('children')
+      if (Array.isArray(children) && children!.length > 0) {
+        this._extractTreePath(children, result)
+      }
+    }
+  }
+})

+ 76 - 0
uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.css

@@ -0,0 +1,76 @@
+.uni-data-pickerview {
+  position: relative;
+  flex-direction: column;
+  overflow: hidden;
+}
+
+.loading-cover {
+  position: absolute;
+  left: 0;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  align-items: center;
+  justify-content: center;
+  background-color: rgba(150, 150, 150, .1);
+}
+
+.error {
+  background-color: #fff;
+  padding: 15px;
+}
+
+.error-text {
+  color: #DD524D;
+}
+
+.selected-node-list {
+  flex-direction: row;
+  flex-wrap: nowrap;
+}
+
+.selected-node-item {
+  margin-left: 10px;
+  margin-right: 10px;
+  padding: 8px 10px 8px 10px;
+  border-bottom: 2px solid transparent;
+}
+
+.selected-node-item-active {
+  color: #007aff;
+  border-bottom-color: #007aff;
+}
+
+.list-view {
+  flex: 1;
+}
+
+.list-item {
+  flex-direction: row;
+  justify-content: space-between;
+  padding: 12px 15px;
+  border-bottom: 1px solid #f0f0f0;
+}
+
+.item-text {
+  color: #333333;
+}
+
+.item-text-disabled {
+  opacity: .5;
+}
+
+.item-text-overflow {
+  overflow: hidden;
+}
+
+.check {
+  margin-right: 5px;
+  border: 2px solid #007aff;
+  border-left: 0;
+  border-top: 0;
+  height: 12px;
+  width: 6px;
+  transform-origin: center;
+  transform: rotate(45deg);
+}

+ 69 - 0
uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.uvue

@@ -0,0 +1,69 @@
+<template>
+  <view class="uni-data-pickerview">
+    <view v-if="error!=null" class="error">
+      <text class="error-text">{{error!.errMsg}}</text>
+    </view>
+    <scroll-view v-if="!isCloudDataList" :scroll-x="true">
+      <view class="selected-node-list">
+        <template v-for="(item, index) in selectedNodes">
+          <text class="selected-node-item" :class="{'selected-node-item-active':index==selectedIndex}"
+            @click="onTabSelect(index)">
+            {{item[mappingTextName]}}
+          </text>
+        </template>
+      </view>
+    </scroll-view>
+    <list-view class="list-view" :scroll-y="true">
+      <list-item class="list-item" v-for="(item, _) in currentDataList" @click="onNodeClick(item)">
+        <text class="item-text" :class="{'item-text-disabled': item['disable']}">{{item[mappingTextName]}}</text>
+        <text class="check" v-if="item[mappingValueName] == selectedNodes[selectedIndex][mappingValueName]"></text>
+      </list-item>
+    </list-view>
+    <view class="loading-cover" v-if="loading">
+      <slot name="pickerview-loading" :loading="loading"></slot>
+    </view>
+  </view>
+</template>
+
+<script>
+  import { dataPicker } from "./uni-data-picker.uts"
+
+  /**
+   * DataPickerview
+   * @description uni-data-pickerview
+   * @tutorial https://ext.dcloud.net.cn/plugin?id=3796
+   * @property {Array} localdata 本地数据,参考
+   * @property {Boolean} step-searh = [true|false] 是否分布查询
+   * @value true 启用分布查询,仅查询当前选中节点
+   * @value false 关闭分布查询,一次查询出所有数据
+   * @property {String|DBFieldString} self-field 分布查询当前字段名称
+   * @property {String|DBFieldString} parent-field 分布查询父字段名称
+   * @property {String|DBCollectionString} collection 表名
+   * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
+   * @property {String} orderby 排序字段及正序倒叙设置
+   * @property {String|JQLString} where 查询条件
+   */
+  export default {
+    name: 'UniDataPickerView',
+    emits: ['nodeclick', 'change', 'update:modelValue'],
+    mixins: [dataPicker],
+    props: {
+      ellipsis: {
+        type: Boolean,
+        default: true
+      }
+    },
+    created() {
+      this.loadData()
+    },
+    methods: {
+      onFinish() {
+        this.$emit('change', this.getChangeNodes())
+      }
+    }
+  }
+</script>
+
+<style>
+  @import url("uni-data-pickerview.css");
+</style>

+ 322 - 0
uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue

@@ -0,0 +1,322 @@
+<template>
+  <view class="uni-data-pickerview">
+    <scroll-view v-if="!isCloudDataList" class="selected-area" scroll-x="true">
+      <view class="selected-list">
+          <view 
+            class="selected-item"
+            v-for="(item,index) in selected"
+            :key="index"
+            :class="{
+              'selected-item-active':index == selectedIndex
+            }"
+            @click="handleSelect(index)"
+          >
+            <text>{{item.text || ''}}</text>
+          </view>
+      </view>
+    </scroll-view>
+    <view class="tab-c">
+      <scroll-view class="list" :scroll-y="true">
+        <view class="item" :class="{'is-disabled': !!item.disable}" v-for="(item, j) in dataList[selectedIndex]" :key="j"
+          @click="handleNodeClick(item, selectedIndex, j)">
+          <text class="item-text">{{item[map.text]}}</text>
+          <view class="check" v-if="selected.length > selectedIndex && item[map.value] == selected[selectedIndex].value"></view>
+        </view>
+      </scroll-view>
+
+      <view class="loading-cover" v-if="loading">
+        <uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
+      </view>
+      <view class="error-message" v-if="errorMessage">
+        <text class="error-text">{{errorMessage}}</text>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+  import dataPicker from "./uni-data-picker.js"
+
+  /**
+   * DataPickerview
+   * @description uni-data-pickerview
+   * @tutorial https://ext.dcloud.net.cn/plugin?id=3796
+   * @property {Array} localdata 本地数据,参考
+   * @property {Boolean} step-searh = [true|false] 是否分布查询
+   * @value true 启用分布查询,仅查询当前选中节点
+   * @value false 关闭分布查询,一次查询出所有数据
+   * @property {String|DBFieldString} self-field 分布查询当前字段名称
+   * @property {String|DBFieldString} parent-field 分布查询父字段名称
+   * @property {String|DBCollectionString} collection 表名
+   * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
+   * @property {String} orderby 排序字段及正序倒叙设置
+   * @property {String|JQLString} where 查询条件
+   */
+  export default {
+    name: 'UniDataPickerView',
+    emits: ['nodeclick', 'change', 'datachange', 'update:modelValue'],
+    mixins: [dataPicker],
+    props: {
+      managedMode: {
+        type: Boolean,
+        default: false
+      },
+      ellipsis: {
+        type: Boolean,
+        default: true
+      }
+    },
+    created() {
+      if (!this.managedMode) {
+        this.$nextTick(() => {
+          this.loadData();
+        })
+      }
+    },
+    methods: {
+      onPropsChange() {
+        this._treeData = [];
+        this.selectedIndex = 0;
+        this.$nextTick(() => {
+          this.loadData();
+        })
+      },
+      handleSelect(index) {
+        this.selectedIndex = index;
+      },
+      handleNodeClick(item, i, j) {
+        if (item.disable) {
+          return;
+        }
+
+        const node = this.dataList[i][j];
+        const text = node[this.map.text];
+        const value = node[this.map.value];
+
+        if (i < this.selected.length - 1) {
+          this.selected.splice(i, this.selected.length - i)
+          this.selected.push({
+            text,
+            value
+          })
+        } else if (i === this.selected.length - 1) {
+          this.selected.splice(i, 1, {
+            text,
+            value
+          })
+        }
+
+        if (node.isleaf) {
+          this.onSelectedChange(node, node.isleaf)
+          return
+        }
+
+        const {
+          isleaf,
+          hasNodes
+        } = this._updateBindData()
+
+        // 本地数据
+        if (this.isLocalData) {
+          this.onSelectedChange(node, (!hasNodes || isleaf))
+        } else if (this.isCloudDataList) { // Cloud 数据 (单列)
+          this.onSelectedChange(node, true)
+        } else if (this.isCloudDataTree) { // Cloud 数据 (树形)
+          if (isleaf) {
+            this.onSelectedChange(node, node.isleaf)
+          } else if (!hasNodes) { // 请求一次服务器以确定是否为叶子节点
+            this.loadCloudDataNode((data) => {
+              if (!data.length) {
+                node.isleaf = true
+              } else {
+                this._treeData.push(...data)
+                this._updateBindData(node)
+              }
+              this.onSelectedChange(node, node.isleaf)
+            })
+          }
+        }
+      },
+      updateData(data) {
+        this._treeData = data.treeData
+        this.selected = data.selected
+        if (!this._treeData.length) {
+          this.loadData()
+        } else {
+          //this.selected = data.selected
+          this._updateBindData()
+        }
+      },
+      onDataChange() {
+        this.$emit('datachange');
+      },
+      onSelectedChange(node, isleaf) {
+        if (isleaf) {
+          this._dispatchEvent()
+        }
+
+        if (node) {
+          this.$emit('nodeclick', node)
+        }
+      },
+      _dispatchEvent() {
+        this.$emit('change', this.selected.slice(0))
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+	$uni-primary: #007aff !default;
+
+	.uni-data-pickerview {
+		flex: 1;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		overflow: hidden;
+		height: 100%;
+	}
+
+  .error-text {
+    color: #DD524D;
+  }
+
+  .loading-cover {
+    position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    background-color: rgba(255, 255, 255, .5);
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    flex-direction: column;
+    align-items: center;
+    z-index: 1001;
+  }
+
+  .load-more {
+    /* #ifndef APP-NVUE */
+    margin: auto;
+    /* #endif */
+  }
+
+  .error-message {
+    background-color: #fff;
+    position: absolute;
+    left: 0;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    padding: 15px;
+    opacity: .9;
+    z-index: 102;
+  }
+
+  /* #ifdef APP-NVUE */
+  .selected-area {
+    width: 750rpx;
+  }
+  /* #endif */
+
+  .selected-list {
+    /* #ifndef APP-NVUE */
+    display: flex;
+    flex-wrap: nowrap;
+    /* #endif */
+    flex-direction: row;
+    padding: 0 5px;
+    border-bottom: 1px solid #f8f8f8;
+  }
+
+  .selected-item {
+    margin-left: 10px;
+    margin-right: 10px;
+    text-align: center;
+    /* #ifndef APP-NVUE */
+    white-space: nowrap;
+    /* #endif */
+  }
+
+  .selected-item-text-overflow {
+    width: 168px;
+    /* fix nvue */
+    overflow: hidden;
+    /* #ifndef APP-NVUE */
+    width: 6em;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
+    /* #endif */
+  }
+
+	.selected-item-active {
+		border-bottom: 2px solid $uni-primary;
+	}
+
+	.selected-item-text {
+		color: $uni-primary;
+	}
+
+  .tab-c {
+    position: relative;
+    flex: 1;
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    flex-direction: row;
+    overflow: hidden;
+  }
+
+  .list {
+    flex: 1;
+  }
+
+  .item {
+    padding: 4px 15px;
+    /* border-bottom: 1px solid #f0f0f0; */
+    /* #ifndef APP-NVUE */
+    display: flex;
+    /* #endif */
+    flex-direction: row;
+    justify-content: space-between;
+  }
+
+  .is-disabled {
+    opacity: .5;
+  }
+
+  .item-text {
+    /* flex: 1; */
+    color: #333333;
+  }
+
+  .item-text-overflow {
+    width: 280px;
+    /* fix nvue */
+    overflow: hidden;
+    /* #ifndef APP-NVUE */
+    width: 20em;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    -o-text-overflow: ellipsis;
+    /* #endif */
+  }
+
+	.check {
+		margin-right: 5px;
+		border: 2px solid $uni-primary;
+		border-left: 0;
+		border-top: 0;
+		height: 12px;
+		width: 6px;
+		transform-origin: center;
+		/* #ifndef APP-NVUE */
+		transition: all 0.3s;
+		/* #endif */
+		transform: rotate(45deg);
+	}
+</style>

+ 91 - 0
uni_modules/uni-data-picker/package.json

@@ -0,0 +1,91 @@
+{
+  "id": "uni-data-picker",
+  "displayName": "uni-data-picker 数据驱动的picker选择器",
+  "version": "2.0.1",
+  "description": "单列、多列级联选择器,常用于省市区城市选择、公司部门选择、多级分类等场景",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "picker",
+    "级联",
+    "省市区",
+    ""
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+"dcloudext": {
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue"
+  },
+  "uni_modules": {
+    "dependencies": [
+      "uni-load-more",
+			"uni-icons",
+			"uni-scss"
+    ],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y",
+        "alipay": "n"
+      },
+      "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",
+          "联盟": "u"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 22 - 0
uni_modules/uni-data-picker/readme.md

@@ -0,0 +1,22 @@
+## DataPicker 级联选择
+> **组件名:uni-data-picker**
+> 代码块: `uDataPicker`
+> 关联组件:`uni-data-pickerview`、`uni-load-more`。
+
+
+`<uni-data-picker>` 是一个选择类[datacom组件](https://uniapp.dcloud.net.cn/component/datacom)。
+
+支持单列、和多列级联选择。列数没有限制,如果屏幕显示不全,顶部tab区域会左右滚动。
+
+候选数据支持一次性加载完毕,也支持懒加载,比如示例图中,选择了“北京”后,动态加载北京的区县数据。
+
+`<uni-data-picker>` 组件尤其适用于地址选择、分类选择等选择类。
+
+`<uni-data-picker>` 支持本地数据、云端静态数据(json),uniCloud云数据库数据。
+
+`<uni-data-picker>` 可以通过JQL直连uniCloud云数据库,配套[DB Schema](https://uniapp.dcloud.net.cn/uniCloud/schema),可在schema2code中自动生成前端页面,还支持服务器端校验。
+
+在uniCloud数据表中新建表“uni-id-address”和“opendb-city-china”,这2个表的schema自带foreignKey关联。在“uni-id-address”表的表结构页面使用schema2code生成前端页面,会自动生成地址管理的维护页面,自动从“opendb-city-china”表包含的中国所有省市区信息里选择地址。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-data-picker)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839

+ 42 - 0
uni_modules/uni-icons/changelog.md

@@ -0,0 +1,42 @@
+## 2.0.10(2024-06-07)
+- 优化 uni-app x 中,size 属性的类型
+## 2.0.9(2024-01-12)
+fix: 修复图标大小默认值错误的问题
+## 2.0.8(2023-12-14)
+- 修复 项目未使用 ts 情况下,打包报错的bug
+## 2.0.7(2023-12-14)
+- 修复 size 属性为 string 时,不加单位导致尺寸异常的bug
+## 2.0.6(2023-12-11)
+- 优化 兼容老版本icon类型,如 top ,bottom 等
+## 2.0.5(2023-12-11)
+- 优化 兼容老版本icon类型,如 top ,bottom 等
+## 2.0.4(2023-12-06)
+- 优化 uni-app x 下示例项目图标排序
+## 2.0.3(2023-12-06)
+- 修复 nvue下引入组件报错的bug
+## 2.0.2(2023-12-05)
+-优化 size 属性支持单位
+## 2.0.1(2023-12-05)
+- 新增 uni-app x 支持定义图标
+## 1.3.5(2022-01-24)
+- 优化 size 属性可以传入不带单位的字符串数值
+## 1.3.4(2022-01-24)
+- 优化 size 支持其他单位
+## 1.3.3(2022-01-17)
+- 修复 nvue 有些图标不显示的bug,兼容老版本图标
+## 1.3.2(2021-12-01)
+- 优化 示例可复制图标名称
+## 1.3.1(2021-11-23)
+- 优化 兼容旧组件 type 值
+## 1.3.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-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
+## 1.1.7(2021-11-08)
+## 1.2.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.5(2021-05-12)
+- 新增 组件示例地址
+## 1.1.4(2021-02-05)
+- 调整为uni_modules目录规范

+ 91 - 0
uni_modules/uni-icons/components/uni-icons/uni-icons.uvue

@@ -0,0 +1,91 @@
+<template>
+  <text class="uni-icons" :style="styleObj">
+    <slot>{{unicode}}</slot>
+  </text>
+</template>
+
+<script>
+  import { fontData, IconsDataItem } from './uniicons_file'
+
+  /**
+   * Icons 图标
+   * @description 用于展示 icon 图标
+   * @tutorial https://ext.dcloud.net.cn/plugin?id=28
+   * @property {Number,String} size 图标大小
+   * @property {String} type 图标图案,参考示例
+   * @property {String} color 图标颜色
+   * @property {String} customPrefix 自定义图标
+   * @event {Function} click 点击 Icon 触发事件
+   */
+  export default {
+    name: "uni-icons",
+    props: {
+      type: {
+        type: String,
+        default: ''
+      },
+      color: {
+        type: String,
+        default: '#333333'
+      },
+      size: {
+        type: [Number, String],
+        default: 16
+      },
+      fontFamily: {
+        type: String,
+        default: ''
+      }
+    },
+    data() {
+      return {};
+    },
+    computed: {
+      unicode() : string {
+        let codes = fontData.find((item : IconsDataItem) : boolean => { return item.font_class == this.type })
+        if (codes !== null) {
+          return codes.unicode
+        }
+        return ''
+      },
+      iconSize() : string {
+        const size = this.size
+        if (typeof size == 'string') {
+          const reg = /^[0-9]*$/g
+          return reg.test(size as string) ? '' + size + 'px' : '' + size;
+          // return '' + this.size
+        }
+        return this.getFontSize(size as number)
+      },
+      styleObj() : UTSJSONObject {
+        if (this.fontFamily !== '') {
+          return { color: this.color, fontSize: this.iconSize, fontFamily: this.fontFamily }
+        }
+        return { color: this.color, fontSize: this.iconSize }
+      }
+    },
+    created() { },
+    methods: {
+      /**
+       * 字体大小
+       */
+      getFontSize(size : number) : string {
+        return size + 'px';
+      },
+    },
+  }
+</script>
+
+<style scoped>
+  @font-face {
+    font-family: UniIconsFontFamily;
+    src: url('./uniicons.ttf');
+  }
+
+  .uni-icons {
+    font-family: UniIconsFontFamily;
+    font-size: 18px;
+    font-style: normal;
+    color: #333;
+  }
+</style>

+ 110 - 0
uni_modules/uni-icons/components/uni-icons/uni-icons.vue

@@ -0,0 +1,110 @@
+<template>
+	<!-- #ifdef APP-NVUE -->
+	<text :style="styleObj" class="uni-icons" @click="_onClick">{{unicode}}</text>
+	<!-- #endif -->
+	<!-- #ifndef APP-NVUE -->
+	<text :style="styleObj" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick">
+		<slot></slot>
+	</text>
+	<!-- #endif -->
+</template>
+
+<script>
+	import { fontData } from './uniicons_file_vue.js';
+
+	const getVal = (val) => {
+		const reg = /^[0-9]*$/g
+		return (typeof val === 'number' || reg.test(val)) ? val + 'px' : val;
+	}
+
+	// #ifdef APP-NVUE
+	var domModule = weex.requireModule('dom');
+	import iconUrl from './uniicons.ttf'
+	domModule.addRule('fontFace', {
+		'fontFamily': "uniicons",
+		'src': "url('" + iconUrl + "')"
+	});
+	// #endif
+
+	/**
+	 * Icons 图标
+	 * @description 用于展示 icons 图标
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=28
+	 * @property {Number} size 图标大小
+	 * @property {String} type 图标图案,参考示例
+	 * @property {String} color 图标颜色
+	 * @property {String} customPrefix 自定义图标
+	 * @event {Function} click 点击 Icon 触发事件
+	 */
+	export default {
+		name: 'UniIcons',
+		emits: ['click'],
+		props: {
+			type: {
+				type: String,
+				default: ''
+			},
+			color: {
+				type: String,
+				default: '#333333'
+			},
+			size: {
+				type: [Number, String],
+				default: 16
+			},
+			customPrefix: {
+				type: String,
+				default: ''
+			},
+			fontFamily: {
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				icons: fontData
+			}
+		},
+		computed: {
+			unicode() {
+				let code = this.icons.find(v => v.font_class === this.type)
+				if (code) {
+					return code.unicode
+				}
+				return ''
+			},
+			iconSize() {
+				return getVal(this.size)
+			},
+			styleObj() {
+				if (this.fontFamily !== '') {
+					return `color: ${this.color}; font-size: ${this.iconSize}; font-family: ${this.fontFamily};`
+				}
+				return `color: ${this.color}; font-size: ${this.iconSize};`
+			}
+		},
+		methods: {
+			_onClick() {
+				this.$emit('click')
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	/* #ifndef APP-NVUE */
+	@import './uniicons.css';
+
+	@font-face {
+		font-family: uniicons;
+		src: url('./uniicons.ttf');
+	}
+
+	/* #endif */
+	.uni-icons {
+		font-family: uniicons;
+		text-decoration: none;
+		text-align: center;
+	}
+</style>

+ 664 - 0
uni_modules/uni-icons/components/uni-icons/uniicons.css

@@ -0,0 +1,664 @@
+
+.uniui-cart-filled:before {
+  content: "\e6d0";
+}
+
+.uniui-gift-filled:before {
+  content: "\e6c4";
+}
+
+.uniui-color:before {
+  content: "\e6cf";
+}
+
+.uniui-wallet:before {
+  content: "\e6b1";
+}
+
+.uniui-settings-filled:before {
+  content: "\e6ce";
+}
+
+.uniui-auth-filled:before {
+  content: "\e6cc";
+}
+
+.uniui-shop-filled:before {
+  content: "\e6cd";
+}
+
+.uniui-staff-filled:before {
+  content: "\e6cb";
+}
+
+.uniui-vip-filled:before {
+  content: "\e6c6";
+}
+
+.uniui-plus-filled:before {
+  content: "\e6c7";
+}
+
+.uniui-folder-add-filled:before {
+  content: "\e6c8";
+}
+
+.uniui-color-filled:before {
+  content: "\e6c9";
+}
+
+.uniui-tune-filled:before {
+  content: "\e6ca";
+}
+
+.uniui-calendar-filled:before {
+  content: "\e6c0";
+}
+
+.uniui-notification-filled:before {
+  content: "\e6c1";
+}
+
+.uniui-wallet-filled:before {
+  content: "\e6c2";
+}
+
+.uniui-medal-filled:before {
+  content: "\e6c3";
+}
+
+.uniui-fire-filled:before {
+  content: "\e6c5";
+}
+
+.uniui-refreshempty:before {
+  content: "\e6bf";
+}
+
+.uniui-location-filled:before {
+  content: "\e6af";
+}
+
+.uniui-person-filled:before {
+  content: "\e69d";
+}
+
+.uniui-personadd-filled:before {
+  content: "\e698";
+}
+
+.uniui-arrowthinleft:before {
+  content: "\e6d2";
+}
+
+.uniui-arrowthinup:before {
+  content: "\e6d3";
+}
+
+.uniui-arrowthindown:before {
+  content: "\e6d4";
+}
+
+.uniui-back:before {
+  content: "\e6b9";
+}
+
+.uniui-forward:before {
+  content: "\e6ba";
+}
+
+.uniui-arrow-right:before {
+  content: "\e6bb";
+}
+
+.uniui-arrow-left:before {
+  content: "\e6bc";
+}
+
+.uniui-arrow-up:before {
+  content: "\e6bd";
+}
+
+.uniui-arrow-down:before {
+  content: "\e6be";
+}
+
+.uniui-arrowthinright:before {
+  content: "\e6d1";
+}
+
+.uniui-down:before {
+  content: "\e6b8";
+}
+
+.uniui-bottom:before {
+  content: "\e6b8";
+}
+
+.uniui-arrowright:before {
+  content: "\e6d5";
+}
+
+.uniui-right:before {
+  content: "\e6b5";
+}
+
+.uniui-up:before {
+  content: "\e6b6";
+}
+
+.uniui-top:before {
+  content: "\e6b6";
+}
+
+.uniui-left:before {
+  content: "\e6b7";
+}
+
+.uniui-arrowup:before {
+  content: "\e6d6";
+}
+
+.uniui-eye:before {
+  content: "\e651";
+}
+
+.uniui-eye-filled:before {
+  content: "\e66a";
+}
+
+.uniui-eye-slash:before {
+  content: "\e6b3";
+}
+
+.uniui-eye-slash-filled:before {
+  content: "\e6b4";
+}
+
+.uniui-info-filled:before {
+  content: "\e649";
+}
+
+.uniui-reload:before {
+  content: "\e6b2";
+}
+
+.uniui-micoff-filled:before {
+  content: "\e6b0";
+}
+
+.uniui-map-pin-ellipse:before {
+  content: "\e6ac";
+}
+
+.uniui-map-pin:before {
+  content: "\e6ad";
+}
+
+.uniui-location:before {
+  content: "\e6ae";
+}
+
+.uniui-starhalf:before {
+  content: "\e683";
+}
+
+.uniui-star:before {
+  content: "\e688";
+}
+
+.uniui-star-filled:before {
+  content: "\e68f";
+}
+
+.uniui-calendar:before {
+  content: "\e6a0";
+}
+
+.uniui-fire:before {
+  content: "\e6a1";
+}
+
+.uniui-medal:before {
+  content: "\e6a2";
+}
+
+.uniui-font:before {
+  content: "\e6a3";
+}
+
+.uniui-gift:before {
+  content: "\e6a4";
+}
+
+.uniui-link:before {
+  content: "\e6a5";
+}
+
+.uniui-notification:before {
+  content: "\e6a6";
+}
+
+.uniui-staff:before {
+  content: "\e6a7";
+}
+
+.uniui-vip:before {
+  content: "\e6a8";
+}
+
+.uniui-folder-add:before {
+  content: "\e6a9";
+}
+
+.uniui-tune:before {
+  content: "\e6aa";
+}
+
+.uniui-auth:before {
+  content: "\e6ab";
+}
+
+.uniui-person:before {
+  content: "\e699";
+}
+
+.uniui-email-filled:before {
+  content: "\e69a";
+}
+
+.uniui-phone-filled:before {
+  content: "\e69b";
+}
+
+.uniui-phone:before {
+  content: "\e69c";
+}
+
+.uniui-email:before {
+  content: "\e69e";
+}
+
+.uniui-personadd:before {
+  content: "\e69f";
+}
+
+.uniui-chatboxes-filled:before {
+  content: "\e692";
+}
+
+.uniui-contact:before {
+  content: "\e693";
+}
+
+.uniui-chatbubble-filled:before {
+  content: "\e694";
+}
+
+.uniui-contact-filled:before {
+  content: "\e695";
+}
+
+.uniui-chatboxes:before {
+  content: "\e696";
+}
+
+.uniui-chatbubble:before {
+  content: "\e697";
+}
+
+.uniui-upload-filled:before {
+  content: "\e68e";
+}
+
+.uniui-upload:before {
+  content: "\e690";
+}
+
+.uniui-weixin:before {
+  content: "\e691";
+}
+
+.uniui-compose:before {
+  content: "\e67f";
+}
+
+.uniui-qq:before {
+  content: "\e680";
+}
+
+.uniui-download-filled:before {
+  content: "\e681";
+}
+
+.uniui-pyq:before {
+  content: "\e682";
+}
+
+.uniui-sound:before {
+  content: "\e684";
+}
+
+.uniui-trash-filled:before {
+  content: "\e685";
+}
+
+.uniui-sound-filled:before {
+  content: "\e686";
+}
+
+.uniui-trash:before {
+  content: "\e687";
+}
+
+.uniui-videocam-filled:before {
+  content: "\e689";
+}
+
+.uniui-spinner-cycle:before {
+  content: "\e68a";
+}
+
+.uniui-weibo:before {
+  content: "\e68b";
+}
+
+.uniui-videocam:before {
+  content: "\e68c";
+}
+
+.uniui-download:before {
+  content: "\e68d";
+}
+
+.uniui-help:before {
+  content: "\e679";
+}
+
+.uniui-navigate-filled:before {
+  content: "\e67a";
+}
+
+.uniui-plusempty:before {
+  content: "\e67b";
+}
+
+.uniui-smallcircle:before {
+  content: "\e67c";
+}
+
+.uniui-minus-filled:before {
+  content: "\e67d";
+}
+
+.uniui-micoff:before {
+  content: "\e67e";
+}
+
+.uniui-closeempty:before {
+  content: "\e66c";
+}
+
+.uniui-clear:before {
+  content: "\e66d";
+}
+
+.uniui-navigate:before {
+  content: "\e66e";
+}
+
+.uniui-minus:before {
+  content: "\e66f";
+}
+
+.uniui-image:before {
+  content: "\e670";
+}
+
+.uniui-mic:before {
+  content: "\e671";
+}
+
+.uniui-paperplane:before {
+  content: "\e672";
+}
+
+.uniui-close:before {
+  content: "\e673";
+}
+
+.uniui-help-filled:before {
+  content: "\e674";
+}
+
+.uniui-paperplane-filled:before {
+  content: "\e675";
+}
+
+.uniui-plus:before {
+  content: "\e676";
+}
+
+.uniui-mic-filled:before {
+  content: "\e677";
+}
+
+.uniui-image-filled:before {
+  content: "\e678";
+}
+
+.uniui-locked-filled:before {
+  content: "\e668";
+}
+
+.uniui-info:before {
+  content: "\e669";
+}
+
+.uniui-locked:before {
+  content: "\e66b";
+}
+
+.uniui-camera-filled:before {
+  content: "\e658";
+}
+
+.uniui-chat-filled:before {
+  content: "\e659";
+}
+
+.uniui-camera:before {
+  content: "\e65a";
+}
+
+.uniui-circle:before {
+  content: "\e65b";
+}
+
+.uniui-checkmarkempty:before {
+  content: "\e65c";
+}
+
+.uniui-chat:before {
+  content: "\e65d";
+}
+
+.uniui-circle-filled:before {
+  content: "\e65e";
+}
+
+.uniui-flag:before {
+  content: "\e65f";
+}
+
+.uniui-flag-filled:before {
+  content: "\e660";
+}
+
+.uniui-gear-filled:before {
+  content: "\e661";
+}
+
+.uniui-home:before {
+  content: "\e662";
+}
+
+.uniui-home-filled:before {
+  content: "\e663";
+}
+
+.uniui-gear:before {
+  content: "\e664";
+}
+
+.uniui-smallcircle-filled:before {
+  content: "\e665";
+}
+
+.uniui-map-filled:before {
+  content: "\e666";
+}
+
+.uniui-map:before {
+  content: "\e667";
+}
+
+.uniui-refresh-filled:before {
+  content: "\e656";
+}
+
+.uniui-refresh:before {
+  content: "\e657";
+}
+
+.uniui-cloud-upload:before {
+  content: "\e645";
+}
+
+.uniui-cloud-download-filled:before {
+  content: "\e646";
+}
+
+.uniui-cloud-download:before {
+  content: "\e647";
+}
+
+.uniui-cloud-upload-filled:before {
+  content: "\e648";
+}
+
+.uniui-redo:before {
+  content: "\e64a";
+}
+
+.uniui-images-filled:before {
+  content: "\e64b";
+}
+
+.uniui-undo-filled:before {
+  content: "\e64c";
+}
+
+.uniui-more:before {
+  content: "\e64d";
+}
+
+.uniui-more-filled:before {
+  content: "\e64e";
+}
+
+.uniui-undo:before {
+  content: "\e64f";
+}
+
+.uniui-images:before {
+  content: "\e650";
+}
+
+.uniui-paperclip:before {
+  content: "\e652";
+}
+
+.uniui-settings:before {
+  content: "\e653";
+}
+
+.uniui-search:before {
+  content: "\e654";
+}
+
+.uniui-redo-filled:before {
+  content: "\e655";
+}
+
+.uniui-list:before {
+  content: "\e644";
+}
+
+.uniui-mail-open-filled:before {
+  content: "\e63a";
+}
+
+.uniui-hand-down-filled:before {
+  content: "\e63c";
+}
+
+.uniui-hand-down:before {
+  content: "\e63d";
+}
+
+.uniui-hand-up-filled:before {
+  content: "\e63e";
+}
+
+.uniui-hand-up:before {
+  content: "\e63f";
+}
+
+.uniui-heart-filled:before {
+  content: "\e641";
+}
+
+.uniui-mail-open:before {
+  content: "\e643";
+}
+
+.uniui-heart:before {
+  content: "\e639";
+}
+
+.uniui-loop:before {
+  content: "\e633";
+}
+
+.uniui-pulldown:before {
+  content: "\e632";
+}
+
+.uniui-scan:before {
+  content: "\e62a";
+}
+
+.uniui-bars:before {
+  content: "\e627";
+}
+
+.uniui-checkbox:before {
+  content: "\e62b";
+}
+
+.uniui-checkbox-filled:before {
+  content: "\e62c";
+}
+
+.uniui-shop:before {
+  content: "\e62f";
+}
+
+.uniui-headphones:before {
+  content: "\e630";
+}
+
+.uniui-cart:before {
+  content: "\e631";
+}

BIN
uni_modules/uni-icons/components/uni-icons/uniicons.ttf


+ 664 - 0
uni_modules/uni-icons/components/uni-icons/uniicons_file.ts

@@ -0,0 +1,664 @@
+
+export type IconsData = {
+	id : string
+	name : string
+	font_family : string
+	css_prefix_text : string
+	description : string
+	glyphs : Array<IconsDataItem>
+}
+
+export type IconsDataItem = {
+	font_class : string
+	unicode : string
+}
+
+
+export const fontData = [
+  {
+    "font_class": "arrow-down",
+    "unicode": "\ue6be"
+  },
+  {
+    "font_class": "arrow-left",
+    "unicode": "\ue6bc"
+  },
+  {
+    "font_class": "arrow-right",
+    "unicode": "\ue6bb"
+  },
+  {
+    "font_class": "arrow-up",
+    "unicode": "\ue6bd"
+  },
+  {
+    "font_class": "auth",
+    "unicode": "\ue6ab"
+  },
+  {
+    "font_class": "auth-filled",
+    "unicode": "\ue6cc"
+  },
+  {
+    "font_class": "back",
+    "unicode": "\ue6b9"
+  },
+  {
+    "font_class": "bars",
+    "unicode": "\ue627"
+  },
+  {
+    "font_class": "calendar",
+    "unicode": "\ue6a0"
+  },
+  {
+    "font_class": "calendar-filled",
+    "unicode": "\ue6c0"
+  },
+  {
+    "font_class": "camera",
+    "unicode": "\ue65a"
+  },
+  {
+    "font_class": "camera-filled",
+    "unicode": "\ue658"
+  },
+  {
+    "font_class": "cart",
+    "unicode": "\ue631"
+  },
+  {
+    "font_class": "cart-filled",
+    "unicode": "\ue6d0"
+  },
+  {
+    "font_class": "chat",
+    "unicode": "\ue65d"
+  },
+  {
+    "font_class": "chat-filled",
+    "unicode": "\ue659"
+  },
+  {
+    "font_class": "chatboxes",
+    "unicode": "\ue696"
+  },
+  {
+    "font_class": "chatboxes-filled",
+    "unicode": "\ue692"
+  },
+  {
+    "font_class": "chatbubble",
+    "unicode": "\ue697"
+  },
+  {
+    "font_class": "chatbubble-filled",
+    "unicode": "\ue694"
+  },
+  {
+    "font_class": "checkbox",
+    "unicode": "\ue62b"
+  },
+  {
+    "font_class": "checkbox-filled",
+    "unicode": "\ue62c"
+  },
+  {
+    "font_class": "checkmarkempty",
+    "unicode": "\ue65c"
+  },
+  {
+    "font_class": "circle",
+    "unicode": "\ue65b"
+  },
+  {
+    "font_class": "circle-filled",
+    "unicode": "\ue65e"
+  },
+  {
+    "font_class": "clear",
+    "unicode": "\ue66d"
+  },
+  {
+    "font_class": "close",
+    "unicode": "\ue673"
+  },
+  {
+    "font_class": "closeempty",
+    "unicode": "\ue66c"
+  },
+  {
+    "font_class": "cloud-download",
+    "unicode": "\ue647"
+  },
+  {
+    "font_class": "cloud-download-filled",
+    "unicode": "\ue646"
+  },
+  {
+    "font_class": "cloud-upload",
+    "unicode": "\ue645"
+  },
+  {
+    "font_class": "cloud-upload-filled",
+    "unicode": "\ue648"
+  },
+  {
+    "font_class": "color",
+    "unicode": "\ue6cf"
+  },
+  {
+    "font_class": "color-filled",
+    "unicode": "\ue6c9"
+  },
+  {
+    "font_class": "compose",
+    "unicode": "\ue67f"
+  },
+  {
+    "font_class": "contact",
+    "unicode": "\ue693"
+  },
+  {
+    "font_class": "contact-filled",
+    "unicode": "\ue695"
+  },
+  {
+    "font_class": "down",
+    "unicode": "\ue6b8"
+  },
+	{
+	  "font_class": "bottom",
+	  "unicode": "\ue6b8"
+	},
+  {
+    "font_class": "download",
+    "unicode": "\ue68d"
+  },
+  {
+    "font_class": "download-filled",
+    "unicode": "\ue681"
+  },
+  {
+    "font_class": "email",
+    "unicode": "\ue69e"
+  },
+  {
+    "font_class": "email-filled",
+    "unicode": "\ue69a"
+  },
+  {
+    "font_class": "eye",
+    "unicode": "\ue651"
+  },
+  {
+    "font_class": "eye-filled",
+    "unicode": "\ue66a"
+  },
+  {
+    "font_class": "eye-slash",
+    "unicode": "\ue6b3"
+  },
+  {
+    "font_class": "eye-slash-filled",
+    "unicode": "\ue6b4"
+  },
+  {
+    "font_class": "fire",
+    "unicode": "\ue6a1"
+  },
+  {
+    "font_class": "fire-filled",
+    "unicode": "\ue6c5"
+  },
+  {
+    "font_class": "flag",
+    "unicode": "\ue65f"
+  },
+  {
+    "font_class": "flag-filled",
+    "unicode": "\ue660"
+  },
+  {
+    "font_class": "folder-add",
+    "unicode": "\ue6a9"
+  },
+  {
+    "font_class": "folder-add-filled",
+    "unicode": "\ue6c8"
+  },
+  {
+    "font_class": "font",
+    "unicode": "\ue6a3"
+  },
+  {
+    "font_class": "forward",
+    "unicode": "\ue6ba"
+  },
+  {
+    "font_class": "gear",
+    "unicode": "\ue664"
+  },
+  {
+    "font_class": "gear-filled",
+    "unicode": "\ue661"
+  },
+  {
+    "font_class": "gift",
+    "unicode": "\ue6a4"
+  },
+  {
+    "font_class": "gift-filled",
+    "unicode": "\ue6c4"
+  },
+  {
+    "font_class": "hand-down",
+    "unicode": "\ue63d"
+  },
+  {
+    "font_class": "hand-down-filled",
+    "unicode": "\ue63c"
+  },
+  {
+    "font_class": "hand-up",
+    "unicode": "\ue63f"
+  },
+  {
+    "font_class": "hand-up-filled",
+    "unicode": "\ue63e"
+  },
+  {
+    "font_class": "headphones",
+    "unicode": "\ue630"
+  },
+  {
+    "font_class": "heart",
+    "unicode": "\ue639"
+  },
+  {
+    "font_class": "heart-filled",
+    "unicode": "\ue641"
+  },
+  {
+    "font_class": "help",
+    "unicode": "\ue679"
+  },
+  {
+    "font_class": "help-filled",
+    "unicode": "\ue674"
+  },
+  {
+    "font_class": "home",
+    "unicode": "\ue662"
+  },
+  {
+    "font_class": "home-filled",
+    "unicode": "\ue663"
+  },
+  {
+    "font_class": "image",
+    "unicode": "\ue670"
+  },
+  {
+    "font_class": "image-filled",
+    "unicode": "\ue678"
+  },
+  {
+    "font_class": "images",
+    "unicode": "\ue650"
+  },
+  {
+    "font_class": "images-filled",
+    "unicode": "\ue64b"
+  },
+  {
+    "font_class": "info",
+    "unicode": "\ue669"
+  },
+  {
+    "font_class": "info-filled",
+    "unicode": "\ue649"
+  },
+  {
+    "font_class": "left",
+    "unicode": "\ue6b7"
+  },
+  {
+    "font_class": "link",
+    "unicode": "\ue6a5"
+  },
+  {
+    "font_class": "list",
+    "unicode": "\ue644"
+  },
+  {
+    "font_class": "location",
+    "unicode": "\ue6ae"
+  },
+  {
+    "font_class": "location-filled",
+    "unicode": "\ue6af"
+  },
+  {
+    "font_class": "locked",
+    "unicode": "\ue66b"
+  },
+  {
+    "font_class": "locked-filled",
+    "unicode": "\ue668"
+  },
+  {
+    "font_class": "loop",
+    "unicode": "\ue633"
+  },
+  {
+    "font_class": "mail-open",
+    "unicode": "\ue643"
+  },
+  {
+    "font_class": "mail-open-filled",
+    "unicode": "\ue63a"
+  },
+  {
+    "font_class": "map",
+    "unicode": "\ue667"
+  },
+  {
+    "font_class": "map-filled",
+    "unicode": "\ue666"
+  },
+  {
+    "font_class": "map-pin",
+    "unicode": "\ue6ad"
+  },
+  {
+    "font_class": "map-pin-ellipse",
+    "unicode": "\ue6ac"
+  },
+  {
+    "font_class": "medal",
+    "unicode": "\ue6a2"
+  },
+  {
+    "font_class": "medal-filled",
+    "unicode": "\ue6c3"
+  },
+  {
+    "font_class": "mic",
+    "unicode": "\ue671"
+  },
+  {
+    "font_class": "mic-filled",
+    "unicode": "\ue677"
+  },
+  {
+    "font_class": "micoff",
+    "unicode": "\ue67e"
+  },
+  {
+    "font_class": "micoff-filled",
+    "unicode": "\ue6b0"
+  },
+  {
+    "font_class": "minus",
+    "unicode": "\ue66f"
+  },
+  {
+    "font_class": "minus-filled",
+    "unicode": "\ue67d"
+  },
+  {
+    "font_class": "more",
+    "unicode": "\ue64d"
+  },
+  {
+    "font_class": "more-filled",
+    "unicode": "\ue64e"
+  },
+  {
+    "font_class": "navigate",
+    "unicode": "\ue66e"
+  },
+  {
+    "font_class": "navigate-filled",
+    "unicode": "\ue67a"
+  },
+  {
+    "font_class": "notification",
+    "unicode": "\ue6a6"
+  },
+  {
+    "font_class": "notification-filled",
+    "unicode": "\ue6c1"
+  },
+  {
+    "font_class": "paperclip",
+    "unicode": "\ue652"
+  },
+  {
+    "font_class": "paperplane",
+    "unicode": "\ue672"
+  },
+  {
+    "font_class": "paperplane-filled",
+    "unicode": "\ue675"
+  },
+  {
+    "font_class": "person",
+    "unicode": "\ue699"
+  },
+  {
+    "font_class": "person-filled",
+    "unicode": "\ue69d"
+  },
+  {
+    "font_class": "personadd",
+    "unicode": "\ue69f"
+  },
+  {
+    "font_class": "personadd-filled",
+    "unicode": "\ue698"
+  },
+  {
+    "font_class": "personadd-filled-copy",
+    "unicode": "\ue6d1"
+  },
+  {
+    "font_class": "phone",
+    "unicode": "\ue69c"
+  },
+  {
+    "font_class": "phone-filled",
+    "unicode": "\ue69b"
+  },
+  {
+    "font_class": "plus",
+    "unicode": "\ue676"
+  },
+  {
+    "font_class": "plus-filled",
+    "unicode": "\ue6c7"
+  },
+  {
+    "font_class": "plusempty",
+    "unicode": "\ue67b"
+  },
+  {
+    "font_class": "pulldown",
+    "unicode": "\ue632"
+  },
+  {
+    "font_class": "pyq",
+    "unicode": "\ue682"
+  },
+  {
+    "font_class": "qq",
+    "unicode": "\ue680"
+  },
+  {
+    "font_class": "redo",
+    "unicode": "\ue64a"
+  },
+  {
+    "font_class": "redo-filled",
+    "unicode": "\ue655"
+  },
+  {
+    "font_class": "refresh",
+    "unicode": "\ue657"
+  },
+  {
+    "font_class": "refresh-filled",
+    "unicode": "\ue656"
+  },
+  {
+    "font_class": "refreshempty",
+    "unicode": "\ue6bf"
+  },
+  {
+    "font_class": "reload",
+    "unicode": "\ue6b2"
+  },
+  {
+    "font_class": "right",
+    "unicode": "\ue6b5"
+  },
+  {
+    "font_class": "scan",
+    "unicode": "\ue62a"
+  },
+  {
+    "font_class": "search",
+    "unicode": "\ue654"
+  },
+  {
+    "font_class": "settings",
+    "unicode": "\ue653"
+  },
+  {
+    "font_class": "settings-filled",
+    "unicode": "\ue6ce"
+  },
+  {
+    "font_class": "shop",
+    "unicode": "\ue62f"
+  },
+  {
+    "font_class": "shop-filled",
+    "unicode": "\ue6cd"
+  },
+  {
+    "font_class": "smallcircle",
+    "unicode": "\ue67c"
+  },
+  {
+    "font_class": "smallcircle-filled",
+    "unicode": "\ue665"
+  },
+  {
+    "font_class": "sound",
+    "unicode": "\ue684"
+  },
+  {
+    "font_class": "sound-filled",
+    "unicode": "\ue686"
+  },
+  {
+    "font_class": "spinner-cycle",
+    "unicode": "\ue68a"
+  },
+  {
+    "font_class": "staff",
+    "unicode": "\ue6a7"
+  },
+  {
+    "font_class": "staff-filled",
+    "unicode": "\ue6cb"
+  },
+  {
+    "font_class": "star",
+    "unicode": "\ue688"
+  },
+  {
+    "font_class": "star-filled",
+    "unicode": "\ue68f"
+  },
+  {
+    "font_class": "starhalf",
+    "unicode": "\ue683"
+  },
+  {
+    "font_class": "trash",
+    "unicode": "\ue687"
+  },
+  {
+    "font_class": "trash-filled",
+    "unicode": "\ue685"
+  },
+  {
+    "font_class": "tune",
+    "unicode": "\ue6aa"
+  },
+  {
+    "font_class": "tune-filled",
+    "unicode": "\ue6ca"
+  },
+  {
+    "font_class": "undo",
+    "unicode": "\ue64f"
+  },
+  {
+    "font_class": "undo-filled",
+    "unicode": "\ue64c"
+  },
+  {
+    "font_class": "up",
+    "unicode": "\ue6b6"
+  },
+	{
+	  "font_class": "top",
+	  "unicode": "\ue6b6"
+	},
+  {
+    "font_class": "upload",
+    "unicode": "\ue690"
+  },
+  {
+    "font_class": "upload-filled",
+    "unicode": "\ue68e"
+  },
+  {
+    "font_class": "videocam",
+    "unicode": "\ue68c"
+  },
+  {
+    "font_class": "videocam-filled",
+    "unicode": "\ue689"
+  },
+  {
+    "font_class": "vip",
+    "unicode": "\ue6a8"
+  },
+  {
+    "font_class": "vip-filled",
+    "unicode": "\ue6c6"
+  },
+  {
+    "font_class": "wallet",
+    "unicode": "\ue6b1"
+  },
+  {
+    "font_class": "wallet-filled",
+    "unicode": "\ue6c2"
+  },
+  {
+    "font_class": "weibo",
+    "unicode": "\ue68b"
+  },
+  {
+    "font_class": "weixin",
+    "unicode": "\ue691"
+  }
+] as IconsDataItem[]
+
+// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)

+ 649 - 0
uni_modules/uni-icons/components/uni-icons/uniicons_file_vue.js

@@ -0,0 +1,649 @@
+
+export const fontData = [
+  {
+    "font_class": "arrow-down",
+    "unicode": "\ue6be"
+  },
+  {
+    "font_class": "arrow-left",
+    "unicode": "\ue6bc"
+  },
+  {
+    "font_class": "arrow-right",
+    "unicode": "\ue6bb"
+  },
+  {
+    "font_class": "arrow-up",
+    "unicode": "\ue6bd"
+  },
+  {
+    "font_class": "auth",
+    "unicode": "\ue6ab"
+  },
+  {
+    "font_class": "auth-filled",
+    "unicode": "\ue6cc"
+  },
+  {
+    "font_class": "back",
+    "unicode": "\ue6b9"
+  },
+  {
+    "font_class": "bars",
+    "unicode": "\ue627"
+  },
+  {
+    "font_class": "calendar",
+    "unicode": "\ue6a0"
+  },
+  {
+    "font_class": "calendar-filled",
+    "unicode": "\ue6c0"
+  },
+  {
+    "font_class": "camera",
+    "unicode": "\ue65a"
+  },
+  {
+    "font_class": "camera-filled",
+    "unicode": "\ue658"
+  },
+  {
+    "font_class": "cart",
+    "unicode": "\ue631"
+  },
+  {
+    "font_class": "cart-filled",
+    "unicode": "\ue6d0"
+  },
+  {
+    "font_class": "chat",
+    "unicode": "\ue65d"
+  },
+  {
+    "font_class": "chat-filled",
+    "unicode": "\ue659"
+  },
+  {
+    "font_class": "chatboxes",
+    "unicode": "\ue696"
+  },
+  {
+    "font_class": "chatboxes-filled",
+    "unicode": "\ue692"
+  },
+  {
+    "font_class": "chatbubble",
+    "unicode": "\ue697"
+  },
+  {
+    "font_class": "chatbubble-filled",
+    "unicode": "\ue694"
+  },
+  {
+    "font_class": "checkbox",
+    "unicode": "\ue62b"
+  },
+  {
+    "font_class": "checkbox-filled",
+    "unicode": "\ue62c"
+  },
+  {
+    "font_class": "checkmarkempty",
+    "unicode": "\ue65c"
+  },
+  {
+    "font_class": "circle",
+    "unicode": "\ue65b"
+  },
+  {
+    "font_class": "circle-filled",
+    "unicode": "\ue65e"
+  },
+  {
+    "font_class": "clear",
+    "unicode": "\ue66d"
+  },
+  {
+    "font_class": "close",
+    "unicode": "\ue673"
+  },
+  {
+    "font_class": "closeempty",
+    "unicode": "\ue66c"
+  },
+  {
+    "font_class": "cloud-download",
+    "unicode": "\ue647"
+  },
+  {
+    "font_class": "cloud-download-filled",
+    "unicode": "\ue646"
+  },
+  {
+    "font_class": "cloud-upload",
+    "unicode": "\ue645"
+  },
+  {
+    "font_class": "cloud-upload-filled",
+    "unicode": "\ue648"
+  },
+  {
+    "font_class": "color",
+    "unicode": "\ue6cf"
+  },
+  {
+    "font_class": "color-filled",
+    "unicode": "\ue6c9"
+  },
+  {
+    "font_class": "compose",
+    "unicode": "\ue67f"
+  },
+  {
+    "font_class": "contact",
+    "unicode": "\ue693"
+  },
+  {
+    "font_class": "contact-filled",
+    "unicode": "\ue695"
+  },
+  {
+    "font_class": "down",
+    "unicode": "\ue6b8"
+  },
+	{
+	  "font_class": "bottom",
+	  "unicode": "\ue6b8"
+	},
+  {
+    "font_class": "download",
+    "unicode": "\ue68d"
+  },
+  {
+    "font_class": "download-filled",
+    "unicode": "\ue681"
+  },
+  {
+    "font_class": "email",
+    "unicode": "\ue69e"
+  },
+  {
+    "font_class": "email-filled",
+    "unicode": "\ue69a"
+  },
+  {
+    "font_class": "eye",
+    "unicode": "\ue651"
+  },
+  {
+    "font_class": "eye-filled",
+    "unicode": "\ue66a"
+  },
+  {
+    "font_class": "eye-slash",
+    "unicode": "\ue6b3"
+  },
+  {
+    "font_class": "eye-slash-filled",
+    "unicode": "\ue6b4"
+  },
+  {
+    "font_class": "fire",
+    "unicode": "\ue6a1"
+  },
+  {
+    "font_class": "fire-filled",
+    "unicode": "\ue6c5"
+  },
+  {
+    "font_class": "flag",
+    "unicode": "\ue65f"
+  },
+  {
+    "font_class": "flag-filled",
+    "unicode": "\ue660"
+  },
+  {
+    "font_class": "folder-add",
+    "unicode": "\ue6a9"
+  },
+  {
+    "font_class": "folder-add-filled",
+    "unicode": "\ue6c8"
+  },
+  {
+    "font_class": "font",
+    "unicode": "\ue6a3"
+  },
+  {
+    "font_class": "forward",
+    "unicode": "\ue6ba"
+  },
+  {
+    "font_class": "gear",
+    "unicode": "\ue664"
+  },
+  {
+    "font_class": "gear-filled",
+    "unicode": "\ue661"
+  },
+  {
+    "font_class": "gift",
+    "unicode": "\ue6a4"
+  },
+  {
+    "font_class": "gift-filled",
+    "unicode": "\ue6c4"
+  },
+  {
+    "font_class": "hand-down",
+    "unicode": "\ue63d"
+  },
+  {
+    "font_class": "hand-down-filled",
+    "unicode": "\ue63c"
+  },
+  {
+    "font_class": "hand-up",
+    "unicode": "\ue63f"
+  },
+  {
+    "font_class": "hand-up-filled",
+    "unicode": "\ue63e"
+  },
+  {
+    "font_class": "headphones",
+    "unicode": "\ue630"
+  },
+  {
+    "font_class": "heart",
+    "unicode": "\ue639"
+  },
+  {
+    "font_class": "heart-filled",
+    "unicode": "\ue641"
+  },
+  {
+    "font_class": "help",
+    "unicode": "\ue679"
+  },
+  {
+    "font_class": "help-filled",
+    "unicode": "\ue674"
+  },
+  {
+    "font_class": "home",
+    "unicode": "\ue662"
+  },
+  {
+    "font_class": "home-filled",
+    "unicode": "\ue663"
+  },
+  {
+    "font_class": "image",
+    "unicode": "\ue670"
+  },
+  {
+    "font_class": "image-filled",
+    "unicode": "\ue678"
+  },
+  {
+    "font_class": "images",
+    "unicode": "\ue650"
+  },
+  {
+    "font_class": "images-filled",
+    "unicode": "\ue64b"
+  },
+  {
+    "font_class": "info",
+    "unicode": "\ue669"
+  },
+  {
+    "font_class": "info-filled",
+    "unicode": "\ue649"
+  },
+  {
+    "font_class": "left",
+    "unicode": "\ue6b7"
+  },
+  {
+    "font_class": "link",
+    "unicode": "\ue6a5"
+  },
+  {
+    "font_class": "list",
+    "unicode": "\ue644"
+  },
+  {
+    "font_class": "location",
+    "unicode": "\ue6ae"
+  },
+  {
+    "font_class": "location-filled",
+    "unicode": "\ue6af"
+  },
+  {
+    "font_class": "locked",
+    "unicode": "\ue66b"
+  },
+  {
+    "font_class": "locked-filled",
+    "unicode": "\ue668"
+  },
+  {
+    "font_class": "loop",
+    "unicode": "\ue633"
+  },
+  {
+    "font_class": "mail-open",
+    "unicode": "\ue643"
+  },
+  {
+    "font_class": "mail-open-filled",
+    "unicode": "\ue63a"
+  },
+  {
+    "font_class": "map",
+    "unicode": "\ue667"
+  },
+  {
+    "font_class": "map-filled",
+    "unicode": "\ue666"
+  },
+  {
+    "font_class": "map-pin",
+    "unicode": "\ue6ad"
+  },
+  {
+    "font_class": "map-pin-ellipse",
+    "unicode": "\ue6ac"
+  },
+  {
+    "font_class": "medal",
+    "unicode": "\ue6a2"
+  },
+  {
+    "font_class": "medal-filled",
+    "unicode": "\ue6c3"
+  },
+  {
+    "font_class": "mic",
+    "unicode": "\ue671"
+  },
+  {
+    "font_class": "mic-filled",
+    "unicode": "\ue677"
+  },
+  {
+    "font_class": "micoff",
+    "unicode": "\ue67e"
+  },
+  {
+    "font_class": "micoff-filled",
+    "unicode": "\ue6b0"
+  },
+  {
+    "font_class": "minus",
+    "unicode": "\ue66f"
+  },
+  {
+    "font_class": "minus-filled",
+    "unicode": "\ue67d"
+  },
+  {
+    "font_class": "more",
+    "unicode": "\ue64d"
+  },
+  {
+    "font_class": "more-filled",
+    "unicode": "\ue64e"
+  },
+  {
+    "font_class": "navigate",
+    "unicode": "\ue66e"
+  },
+  {
+    "font_class": "navigate-filled",
+    "unicode": "\ue67a"
+  },
+  {
+    "font_class": "notification",
+    "unicode": "\ue6a6"
+  },
+  {
+    "font_class": "notification-filled",
+    "unicode": "\ue6c1"
+  },
+  {
+    "font_class": "paperclip",
+    "unicode": "\ue652"
+  },
+  {
+    "font_class": "paperplane",
+    "unicode": "\ue672"
+  },
+  {
+    "font_class": "paperplane-filled",
+    "unicode": "\ue675"
+  },
+  {
+    "font_class": "person",
+    "unicode": "\ue699"
+  },
+  {
+    "font_class": "person-filled",
+    "unicode": "\ue69d"
+  },
+  {
+    "font_class": "personadd",
+    "unicode": "\ue69f"
+  },
+  {
+    "font_class": "personadd-filled",
+    "unicode": "\ue698"
+  },
+  {
+    "font_class": "personadd-filled-copy",
+    "unicode": "\ue6d1"
+  },
+  {
+    "font_class": "phone",
+    "unicode": "\ue69c"
+  },
+  {
+    "font_class": "phone-filled",
+    "unicode": "\ue69b"
+  },
+  {
+    "font_class": "plus",
+    "unicode": "\ue676"
+  },
+  {
+    "font_class": "plus-filled",
+    "unicode": "\ue6c7"
+  },
+  {
+    "font_class": "plusempty",
+    "unicode": "\ue67b"
+  },
+  {
+    "font_class": "pulldown",
+    "unicode": "\ue632"
+  },
+  {
+    "font_class": "pyq",
+    "unicode": "\ue682"
+  },
+  {
+    "font_class": "qq",
+    "unicode": "\ue680"
+  },
+  {
+    "font_class": "redo",
+    "unicode": "\ue64a"
+  },
+  {
+    "font_class": "redo-filled",
+    "unicode": "\ue655"
+  },
+  {
+    "font_class": "refresh",
+    "unicode": "\ue657"
+  },
+  {
+    "font_class": "refresh-filled",
+    "unicode": "\ue656"
+  },
+  {
+    "font_class": "refreshempty",
+    "unicode": "\ue6bf"
+  },
+  {
+    "font_class": "reload",
+    "unicode": "\ue6b2"
+  },
+  {
+    "font_class": "right",
+    "unicode": "\ue6b5"
+  },
+  {
+    "font_class": "scan",
+    "unicode": "\ue62a"
+  },
+  {
+    "font_class": "search",
+    "unicode": "\ue654"
+  },
+  {
+    "font_class": "settings",
+    "unicode": "\ue653"
+  },
+  {
+    "font_class": "settings-filled",
+    "unicode": "\ue6ce"
+  },
+  {
+    "font_class": "shop",
+    "unicode": "\ue62f"
+  },
+  {
+    "font_class": "shop-filled",
+    "unicode": "\ue6cd"
+  },
+  {
+    "font_class": "smallcircle",
+    "unicode": "\ue67c"
+  },
+  {
+    "font_class": "smallcircle-filled",
+    "unicode": "\ue665"
+  },
+  {
+    "font_class": "sound",
+    "unicode": "\ue684"
+  },
+  {
+    "font_class": "sound-filled",
+    "unicode": "\ue686"
+  },
+  {
+    "font_class": "spinner-cycle",
+    "unicode": "\ue68a"
+  },
+  {
+    "font_class": "staff",
+    "unicode": "\ue6a7"
+  },
+  {
+    "font_class": "staff-filled",
+    "unicode": "\ue6cb"
+  },
+  {
+    "font_class": "star",
+    "unicode": "\ue688"
+  },
+  {
+    "font_class": "star-filled",
+    "unicode": "\ue68f"
+  },
+  {
+    "font_class": "starhalf",
+    "unicode": "\ue683"
+  },
+  {
+    "font_class": "trash",
+    "unicode": "\ue687"
+  },
+  {
+    "font_class": "trash-filled",
+    "unicode": "\ue685"
+  },
+  {
+    "font_class": "tune",
+    "unicode": "\ue6aa"
+  },
+  {
+    "font_class": "tune-filled",
+    "unicode": "\ue6ca"
+  },
+  {
+    "font_class": "undo",
+    "unicode": "\ue64f"
+  },
+  {
+    "font_class": "undo-filled",
+    "unicode": "\ue64c"
+  },
+  {
+    "font_class": "up",
+    "unicode": "\ue6b6"
+  },
+	{
+	  "font_class": "top",
+	  "unicode": "\ue6b6"
+	},
+  {
+    "font_class": "upload",
+    "unicode": "\ue690"
+  },
+  {
+    "font_class": "upload-filled",
+    "unicode": "\ue68e"
+  },
+  {
+    "font_class": "videocam",
+    "unicode": "\ue68c"
+  },
+  {
+    "font_class": "videocam-filled",
+    "unicode": "\ue689"
+  },
+  {
+    "font_class": "vip",
+    "unicode": "\ue6a8"
+  },
+  {
+    "font_class": "vip-filled",
+    "unicode": "\ue6c6"
+  },
+  {
+    "font_class": "wallet",
+    "unicode": "\ue6b1"
+  },
+  {
+    "font_class": "wallet-filled",
+    "unicode": "\ue6c2"
+  },
+  {
+    "font_class": "weibo",
+    "unicode": "\ue68b"
+  },
+  {
+    "font_class": "weixin",
+    "unicode": "\ue691"
+  }
+]
+
+// export const fontData = JSON.parse<IconsDataItem>(fontDataJson)

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

@@ -0,0 +1,89 @@
+{
+  "id": "uni-icons",
+  "displayName": "uni-icons 图标",
+  "version": "2.0.10",
+  "description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "icon",
+    "图标"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": "^3.2.14"
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+"dcloudext": {
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue"
+  },
+  "uni_modules": {
+    "dependencies": ["uni-scss"],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y",
+        "alipay": "n"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y",
+          "app-uvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y",
+					"钉钉": "y",
+					"快手": "y",
+					"飞书": "y",
+					"京东": "y"
+        },
+        "快应用": {
+          "华为": "y",
+          "联盟": "y"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 8 - 0
uni_modules/uni-icons/readme.md

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

+ 25 - 0
uni_modules/uni-load-more/changelog.md

@@ -0,0 +1,25 @@
+## 1.3.6(2024-10-15)
+- 修复 微信小程序中的getSystemInfo警告
+## 1.3.5(2024-10-12)
+- 修复 微信小程序中的getSystemInfo警告
+## 1.3.4(2024-10-12)
+- 修复 微信小程序中的getSystemInfo警告
+## 1.3.3(2022-01-20)
+- 新增 showText属性 ,是否显示文本
+## 1.3.2(2022-01-19)
+- 修复 nvue 平台下不显示文本的bug
+## 1.3.1(2022-01-19)
+- 修复 微信小程序平台样式选择器报警告的问题
+## 1.3.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-load-more](https://uniapp.dcloud.io/component/uniui/uni-load-more)
+## 1.2.1(2021-08-24)
+- 新增 支持国际化
+## 1.2.0(2021-07-30)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.8(2021-05-12)
+- 新增 组件示例地址
+## 1.1.7(2021-03-30)
+- 修复 uni-load-more 在首页使用时,h5 平台报 'uni is not defined' 的 bug
+## 1.1.6(2021-02-05)
+- 调整为uni_modules目录规范

+ 5 - 0
uni_modules/uni-load-more/components/uni-load-more/i18n/en.json

@@ -0,0 +1,5 @@
+{
+	"uni-load-more.contentdown": "Pull up to show more",
+	"uni-load-more.contentrefresh": "loading...",
+	"uni-load-more.contentnomore": "No more data"
+}

+ 8 - 0
uni_modules/uni-load-more/components/uni-load-more/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
+}

+ 5 - 0
uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json

@@ -0,0 +1,5 @@
+{
+	"uni-load-more.contentdown": "上拉显示更多",
+	"uni-load-more.contentrefresh": "正在加载...",
+	"uni-load-more.contentnomore": "没有更多数据了"
+}

+ 5 - 0
uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json

@@ -0,0 +1,5 @@
+{
+	"uni-load-more.contentdown": "上拉顯示更多",
+	"uni-load-more.contentrefresh": "正在加載...",
+	"uni-load-more.contentnomore": "沒有更多數據了"
+}

Разница между файлами не показана из-за своего большого размера
+ 117 - 0
uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue


+ 84 - 0
uni_modules/uni-load-more/package.json

@@ -0,0 +1,84 @@
+{
+  "id": "uni-load-more",
+  "displayName": "uni-load-more 加载更多",
+  "version": "1.3.6",
+  "description": "LoadMore 组件,常用在列表里面,做滚动加载使用。",
+  "keywords": [
+    "uni-ui",
+    "uniui",
+    "加载更多",
+    "load-more"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": ""
+  },
+  "directories": {
+    "example": "../../temps/example_temps"
+  },
+"dcloudext": {
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue"
+  },
+  "uni_modules": {
+    "dependencies": ["uni-scss"],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y",
+        "alipay": "n"
+      },
+      "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"
+        }
+      }
+    }
+  }
+}

+ 14 - 0
uni_modules/uni-load-more/readme.md

@@ -0,0 +1,14 @@
+
+
+### LoadMore 加载更多
+> **组件名:uni-load-more**
+> 代码块: `uLoadMore`
+
+
+用于列表中,做滚动加载使用,展示 loading 的各种状态。
+
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-load-more)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 
+
+

+ 8 - 0
uni_modules/uni-scss/changelog.md

@@ -0,0 +1,8 @@
+## 1.0.3(2022-01-21)
+- 优化 组件示例
+## 1.0.2(2021-11-22)
+- 修复 / 符号在 vue 不同版本兼容问题引起的报错问题
+## 1.0.1(2021-11-22)
+- 修复 vue3中scss语法兼容问题
+## 1.0.0(2021-11-18)
+- init

+ 1 - 0
uni_modules/uni-scss/index.scss

@@ -0,0 +1 @@
+@import './styles/index.scss';

+ 82 - 0
uni_modules/uni-scss/package.json

@@ -0,0 +1,82 @@
+{
+  "id": "uni-scss",
+  "displayName": "uni-scss 辅助样式",
+  "version": "1.0.3",
+  "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
+  "keywords": [
+    "uni-scss",
+    "uni-ui",
+    "辅助样式"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+  "dcloudext": {
+    "category": [
+        "JS SDK",
+        "通用 SDK"
+    ],
+    "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": "u"
+        },
+        "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"
+        },
+        "快应用": {
+          "华为": "n",
+          "联盟": "n"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

+ 4 - 0
uni_modules/uni-scss/readme.md

@@ -0,0 +1,4 @@
+`uni-sass` 是 `uni-ui`提供的一套全局样式 ,通过一些简单的类名和`sass`变量,实现简单的页面布局操作,比如颜色、边距、圆角等。
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-sass)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 

+ 7 - 0
uni_modules/uni-scss/styles/index.scss

@@ -0,0 +1,7 @@
+@import './setting/_variables.scss';
+@import './setting/_border.scss';
+@import './setting/_color.scss';
+@import './setting/_space.scss';
+@import './setting/_radius.scss';
+@import './setting/_text.scss';
+@import './setting/_styles.scss';

+ 3 - 0
uni_modules/uni-scss/styles/setting/_border.scss

@@ -0,0 +1,3 @@
+.uni-border {
+	border: 1px $uni-border-1 solid;
+}

+ 66 - 0
uni_modules/uni-scss/styles/setting/_color.scss

@@ -0,0 +1,66 @@
+
+// TODO 暂时不需要 class ,需要用户使用变量实现 ,如果使用类名其实并不推荐
+// @mixin get-styles($k,$c) {
+// 	@if $k == size or $k == weight{
+// 		font-#{$k}:#{$c}
+// 	}@else{
+// 		#{$k}:#{$c}
+// 	}
+// }
+$uni-ui-color:(
+	// 主色
+	primary: $uni-primary,
+	primary-disable: $uni-primary-disable,
+	primary-light: $uni-primary-light,
+	// 辅助色
+	success: $uni-success,
+	success-disable: $uni-success-disable,
+	success-light: $uni-success-light,
+	warning: $uni-warning,
+	warning-disable: $uni-warning-disable,
+	warning-light: $uni-warning-light,
+	error: $uni-error,
+	error-disable: $uni-error-disable,
+	error-light: $uni-error-light,
+	info: $uni-info,
+	info-disable: $uni-info-disable,
+	info-light: $uni-info-light,
+	// 中性色
+	main-color: $uni-main-color,
+	base-color: $uni-base-color,
+	secondary-color: $uni-secondary-color,
+	extra-color: $uni-extra-color,
+	// 背景色
+	bg-color: $uni-bg-color,
+	// 边框颜色
+	border-1: $uni-border-1,
+	border-2: $uni-border-2,
+	border-3: $uni-border-3,
+	border-4: $uni-border-4,
+	// 黑色
+	black:$uni-black,
+	// 白色
+	white:$uni-white,
+	// 透明
+	transparent:$uni-transparent
+) !default;
+@each $key, $child in $uni-ui-color {
+	.uni-#{"" + $key} {
+		color: $child;
+	}
+	.uni-#{"" + $key}-bg {
+		background-color: $child;
+	}
+}
+.uni-shadow-sm {
+	box-shadow: $uni-shadow-sm;
+}
+.uni-shadow-base {
+	box-shadow: $uni-shadow-base;
+}
+.uni-shadow-lg {
+	box-shadow: $uni-shadow-lg;
+}
+.uni-mask {
+	background-color:$uni-mask;
+}

+ 55 - 0
uni_modules/uni-scss/styles/setting/_radius.scss

@@ -0,0 +1,55 @@
+@mixin radius($r,$d:null ,$important: false){
+  $radius-value:map-get($uni-radius, $r) if($important, !important, null);
+  // Key exists within the $uni-radius variable
+  @if (map-has-key($uni-radius, $r) and  $d){
+		@if $d == t {
+				border-top-left-radius:$radius-value;
+				border-top-right-radius:$radius-value;
+		}@else if $d == r {
+				border-top-right-radius:$radius-value;
+				border-bottom-right-radius:$radius-value;
+		}@else if $d == b {
+				border-bottom-left-radius:$radius-value;
+				border-bottom-right-radius:$radius-value;
+		}@else if $d == l {
+				border-top-left-radius:$radius-value;
+				border-bottom-left-radius:$radius-value;
+		}@else if $d == tl {
+				border-top-left-radius:$radius-value;
+		}@else if $d == tr {
+				border-top-right-radius:$radius-value;
+		}@else if $d == br {
+				border-bottom-right-radius:$radius-value;
+		}@else if $d == bl {
+				border-bottom-left-radius:$radius-value;
+		}
+  }@else{
+		border-radius:$radius-value;
+  }
+}
+
+@each $key, $child in $uni-radius {
+	@if($key){
+		.uni-radius-#{"" + $key} {
+				@include radius($key)
+		}
+	}@else{
+		.uni-radius {
+				@include radius($key)
+		}
+	}
+}
+
+@each $direction in t, r, b, l,tl, tr, br, bl {
+	@each $key, $child in $uni-radius {
+		@if($key){
+			.uni-radius-#{"" + $direction}-#{"" + $key} {
+				@include radius($key,$direction,false)
+			}
+		}@else{
+			.uni-radius-#{$direction} {
+				@include radius($key,$direction,false)
+			}
+		}
+	}
+}

+ 56 - 0
uni_modules/uni-scss/styles/setting/_space.scss

@@ -0,0 +1,56 @@
+
+@mixin fn($space,$direction,$size,$n) {
+	@if $n {
+		#{$space}-#{$direction}: #{$size*$uni-space-root}px
+	} @else {
+		 #{$space}-#{$direction}: #{-$size*$uni-space-root}px
+	}
+}
+@mixin get-styles($direction,$i,$space,$n){
+	@if $direction == t {
+		@include fn($space, top,$i,$n);
+	} 
+	@if $direction == r {
+		@include fn($space, right,$i,$n);
+	} 
+	@if $direction == b {
+		@include fn($space, bottom,$i,$n);
+	} 
+	@if $direction == l {
+	 @include fn($space, left,$i,$n);
+	} 
+	@if $direction == x {
+		@include fn($space, left,$i,$n);
+		@include fn($space, right,$i,$n);
+	} 
+	@if $direction == y {
+		@include fn($space, top,$i,$n);
+		@include fn($space, bottom,$i,$n);
+	} 
+	@if $direction == a {
+		@if $n {
+			#{$space}:#{$i*$uni-space-root}px;
+		} @else {
+			#{$space}:#{-$i*$uni-space-root}px;
+		}
+	} 
+}
+
+@each $orientation in m,p {
+	$space: margin;
+	@if $orientation == m {
+		$space: margin;
+	} @else {
+		$space: padding;
+	}
+	@for $i from 0 through 16 {
+		@each $direction in t, r, b, l, x, y, a {
+			.uni-#{$orientation}#{$direction}-#{$i} { 
+				@include  get-styles($direction,$i,$space,true);
+			} 
+			.uni-#{$orientation}#{$direction}-n#{$i} { 
+				@include  get-styles($direction,$i,$space,false);
+			}
+		}
+	}
+}

+ 167 - 0
uni_modules/uni-scss/styles/setting/_styles.scss

@@ -0,0 +1,167 @@
+/* #ifndef APP-NVUE */
+
+$-color-white:#fff;
+$-color-black:#000;
+@mixin base-style($color) {
+	color: #fff;
+	background-color: $color;
+	border-color: mix($-color-black, $color, 8%);
+	&:not([hover-class]):active {
+		background: mix($-color-black, $color, 10%);
+		border-color: mix($-color-black, $color, 20%);
+		color: $-color-white;
+		outline: none;
+	}
+}
+@mixin is-color($color) {
+	@include base-style($color);
+	&[loading] {
+		@include base-style($color);
+		&::before {
+			margin-right:5px;
+		}
+	}
+	&[disabled] {
+	  &,
+		&[loading],
+	  &:not([hover-class]):active {
+	    color: $-color-white;
+			border-color: mix(darken($color,10%), $-color-white);
+	    background-color: mix($color, $-color-white);
+	  }
+	}
+
+}
+@mixin base-plain-style($color) {
+	color:$color;
+	background-color: mix($-color-white, $color, 90%);
+	border-color: mix($-color-white, $color, 70%);
+	&:not([hover-class]):active {
+	  background: mix($-color-white, $color, 80%);
+	  color: $color;
+	  outline: none;
+		border-color: mix($-color-white, $color, 50%);
+	}
+}
+@mixin is-plain($color){
+	&[plain] {
+		@include base-plain-style($color);
+		&[loading] {
+			@include base-plain-style($color);
+			&::before {
+				margin-right:5px;
+			}
+		}
+		&[disabled] {
+		  &,
+		  &:active {
+		    color: mix($-color-white, $color, 40%);
+		    background-color: mix($-color-white, $color, 90%);
+				border-color: mix($-color-white, $color, 80%);
+		  }
+		}
+	}
+}
+
+
+.uni-btn {
+	margin: 5px;
+	color: #393939;
+	border:1px solid #ccc;
+	font-size: 16px;
+	font-weight: 200;
+	background-color: #F9F9F9;
+	// TODO 暂时处理边框隐藏一边的问题
+	overflow: visible;
+	&::after{
+		border: none;
+	}
+
+	&:not([type]),&[type=default] {
+		color: #999;
+		&[loading] {
+			background: none;
+			&::before {
+				margin-right:5px;
+			}
+		}
+
+
+
+		&[disabled]{
+			color: mix($-color-white, #999, 60%);
+		  &,
+			&[loading],
+		  &:active {
+				color: mix($-color-white, #999, 60%);
+		    background-color: mix($-color-white,$-color-black , 98%);
+				border-color: mix($-color-white,  #999, 85%);
+		  }
+		}
+
+		&[plain] {
+			color: #999;
+			background: none;
+			border-color: $uni-border-1;
+			&:not([hover-class]):active {
+				background: none;
+			  color: mix($-color-white, $-color-black, 80%);
+				border-color: mix($-color-white, $-color-black, 90%);
+			  outline: none;
+			}
+			&[disabled]{
+			  &,
+				&[loading],
+			  &:active {
+			    background: none;
+					color: mix($-color-white, #999, 60%);
+					border-color: mix($-color-white,  #999, 85%);
+			  }
+			}
+		}
+	}
+
+	&:not([hover-class]):active {
+	  color: mix($-color-white, $-color-black, 50%);
+	}
+
+	&[size=mini] {
+		font-size: 16px;
+		font-weight: 200;
+		border-radius: 8px;
+	}
+
+
+
+	&.uni-btn-small {
+		font-size: 14px;
+	}
+	&.uni-btn-mini {
+		font-size: 12px;
+	}
+
+	&.uni-btn-radius {
+		border-radius: 999px;
+	}
+	&[type=primary] {
+		@include is-color($uni-primary);
+		@include is-plain($uni-primary)
+	}
+	&[type=success] {
+		@include is-color($uni-success);
+		@include is-plain($uni-success)
+	}
+	&[type=error] {
+		@include is-color($uni-error);
+		@include is-plain($uni-error)
+	}
+	&[type=warning] {
+		@include is-color($uni-warning);
+		@include is-plain($uni-warning)
+	}
+	&[type=info] {
+		@include is-color($uni-info);
+		@include is-plain($uni-info)
+	}
+}
+/* #endif */

+ 24 - 0
uni_modules/uni-scss/styles/setting/_text.scss

@@ -0,0 +1,24 @@
+@mixin get-styles($k,$c) {
+	@if $k == size or $k == weight{
+		font-#{$k}:#{$c}
+	}@else{
+		#{$k}:#{$c}
+	}
+}
+
+@each $key, $child in $uni-headings {
+	/* #ifndef APP-NVUE */
+	.uni-#{$key} {
+		@each $k, $c in $child {
+			@include get-styles($k,$c)
+		}
+	}
+	/* #endif */
+	/* #ifdef APP-NVUE */
+	.container .uni-#{$key} {
+		@each $k, $c in $child {
+			@include get-styles($k,$c)
+		}
+	}
+	/* #endif */
+}

+ 146 - 0
uni_modules/uni-scss/styles/setting/_variables.scss

@@ -0,0 +1,146 @@
+// @use "sass:math";
+@import  '../tools/functions.scss';
+// 间距基础倍数
+$uni-space-root: 2 !default;
+// 边框半径默认值
+$uni-radius-root:5px !default;
+$uni-radius: () !default;
+// 边框半径断点
+$uni-radius: map-deep-merge(
+  (
+    0: 0,
+		// TODO 当前版本暂时不支持 sm 属性
+    // 'sm': math.div($uni-radius-root, 2),
+    null: $uni-radius-root,
+    'lg': $uni-radius-root * 2,
+    'xl': $uni-radius-root * 6,
+    'pill': 9999px,
+    'circle': 50%
+  ),
+  $uni-radius
+);
+// 字体家族
+$body-font-family: 'Roboto', sans-serif !default;
+// 文本
+$heading-font-family: $body-font-family !default;
+$uni-headings: () !default;
+$letterSpacing: -0.01562em;
+$uni-headings: map-deep-merge(
+  (
+    'h1': (
+      size: 32px,
+			weight: 300,
+			line-height: 50px,
+			// letter-spacing:-0.01562em
+    ),
+    'h2': (
+      size: 28px,
+      weight: 300,
+      line-height: 40px,
+      // letter-spacing: -0.00833em
+    ),
+    'h3': (
+      size: 24px,
+      weight: 400,
+      line-height: 32px,
+      // letter-spacing: normal
+    ),
+    'h4': (
+      size: 20px,
+      weight: 400,
+      line-height: 30px,
+      // letter-spacing: 0.00735em
+    ),
+    'h5': (
+      size: 16px,
+      weight: 400,
+      line-height: 24px,
+      // letter-spacing: normal
+    ),
+    'h6': (
+      size: 14px,
+      weight: 500,
+      line-height: 18px,
+      // letter-spacing: 0.0125em
+    ),
+    'subtitle': (
+      size: 12px,
+      weight: 400,
+      line-height: 20px,
+      // letter-spacing: 0.00937em
+    ),
+    'body': (
+      font-size: 14px,
+			font-weight: 400,
+			line-height: 22px,
+			// letter-spacing: 0.03125em
+    ),
+    'caption': (
+      'size': 12px,
+      'weight': 400,
+      'line-height': 20px,
+      // 'letter-spacing': 0.03333em,
+      // 'text-transform': false
+    )
+  ),
+  $uni-headings
+);
+
+
+
+// 主色
+$uni-primary: #2979ff !default;
+$uni-primary-disable:lighten($uni-primary,20%) !default;
+$uni-primary-light: lighten($uni-primary,25%) !default;
+
+// 辅助色
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
+$uni-success: #18bc37 !default;
+$uni-success-disable:lighten($uni-success,20%) !default;
+$uni-success-light: lighten($uni-success,25%) !default;
+
+$uni-warning: #f3a73f !default;
+$uni-warning-disable:lighten($uni-warning,20%) !default;
+$uni-warning-light: lighten($uni-warning,25%) !default;
+
+$uni-error: #e43d33 !default;
+$uni-error-disable:lighten($uni-error,20%) !default;
+$uni-error-light: lighten($uni-error,25%) !default;
+
+$uni-info: #8f939c !default;
+$uni-info-disable:lighten($uni-info,20%) !default;
+$uni-info-light: lighten($uni-info,25%) !default;
+
+// 中性色
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
+$uni-main-color: #3a3a3a !default; 			// 主要文字
+$uni-base-color: #6a6a6a !default;			// 常规文字
+$uni-secondary-color: #909399 !default;	// 次要文字
+$uni-extra-color: #c7c7c7 !default;			// 辅助说明
+
+// 边框颜色
+$uni-border-1: #F0F0F0 !default;
+$uni-border-2: #EDEDED !default;
+$uni-border-3: #DCDCDC !default;
+$uni-border-4: #B9B9B9 !default;
+
+// 常规色
+$uni-black: #000000 !default;
+$uni-white: #ffffff !default;
+$uni-transparent: rgba($color: #000000, $alpha: 0) !default;
+
+// 背景色
+$uni-bg-color: #f7f7f7 !default;
+
+/* 水平间距 */
+$uni-spacing-sm: 8px !default;
+$uni-spacing-base: 15px !default;
+$uni-spacing-lg: 30px !default;
+
+// 阴影
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5) !default;
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2) !default;
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5) !default;
+
+// 蒙版
+$uni-mask: rgba($color: #000000, $alpha: 0.4) !default;

+ 19 - 0
uni_modules/uni-scss/styles/tools/functions.scss

@@ -0,0 +1,19 @@
+// 合并 map
+@function map-deep-merge($parent-map, $child-map){
+	$result: $parent-map;
+	@each $key, $child in $child-map {
+		$parent-has-key: map-has-key($result, $key);
+		$parent-value: map-get($result, $key);
+		$parent-type: type-of($parent-value);
+		$child-type: type-of($child);
+		$parent-is-map: $parent-type == map;
+		$child-is-map: $child-type == map;
+			
+		@if (not $parent-has-key) or ($parent-type != $child-type) or (not ($parent-is-map and $child-is-map)){
+			$result: map-merge($result, ( $key: $child ));
+		}@else {
+			$result: map-merge($result, ( $key: map-deep-merge($parent-value, $child) ));
+		}
+	}
+	@return $result;
+};

+ 31 - 0
uni_modules/uni-scss/theme.scss

@@ -0,0 +1,31 @@
+// 间距基础倍数
+$uni-space-root: 2;
+// 边框半径默认值
+$uni-radius-root:5px;
+// 主色
+$uni-primary: #2979ff;
+// 辅助色
+$uni-success: #4cd964;
+// 警告色
+$uni-warning: #f0ad4e;
+// 错误色
+$uni-error: #dd524d;
+// 描述色
+$uni-info: #909399;
+// 中性色
+$uni-main-color: #303133;
+$uni-base-color: #606266;
+$uni-secondary-color: #909399;
+$uni-extra-color: #C0C4CC;
+// 背景色
+$uni-bg-color: #f5f5f5;
+// 边框颜色
+$uni-border-1: #DCDFE6;
+$uni-border-2: #E4E7ED;
+$uni-border-3: #EBEEF5;
+$uni-border-4: #F2F6FC;
+
+// 常规色
+$uni-black: #000000;
+$uni-white: #ffffff;
+$uni-transparent: rgba($color: #000000, $alpha: 0);

+ 62 - 0
uni_modules/uni-scss/variables.scss

@@ -0,0 +1,62 @@
+@import './styles/setting/_variables.scss';
+// 间距基础倍数
+$uni-space-root: 2;
+// 边框半径默认值
+$uni-radius-root:5px;
+
+// 主色
+$uni-primary: #2979ff;
+$uni-primary-disable:mix(#fff,$uni-primary,50%);
+$uni-primary-light: mix(#fff,$uni-primary,80%);
+
+// 辅助色
+// 除了主色外的场景色,需要在不同的场景中使用(例如危险色表示危险的操作)。
+$uni-success: #18bc37;
+$uni-success-disable:mix(#fff,$uni-success,50%);
+$uni-success-light: mix(#fff,$uni-success,80%);
+
+$uni-warning: #f3a73f;
+$uni-warning-disable:mix(#fff,$uni-warning,50%);
+$uni-warning-light: mix(#fff,$uni-warning,80%);
+
+$uni-error: #e43d33;
+$uni-error-disable:mix(#fff,$uni-error,50%);
+$uni-error-light: mix(#fff,$uni-error,80%);
+
+$uni-info: #8f939c;
+$uni-info-disable:mix(#fff,$uni-info,50%);
+$uni-info-light: mix(#fff,$uni-info,80%);
+
+// 中性色
+// 中性色用于文本、背景和边框颜色。通过运用不同的中性色,来表现层次结构。
+$uni-main-color: #3a3a3a; 			// 主要文字
+$uni-base-color: #6a6a6a;			// 常规文字
+$uni-secondary-color: #909399;	// 次要文字
+$uni-extra-color: #c7c7c7;			// 辅助说明
+
+// 边框颜色
+$uni-border-1: #F0F0F0;
+$uni-border-2: #EDEDED;
+$uni-border-3: #DCDCDC;
+$uni-border-4: #B9B9B9;
+
+// 常规色
+$uni-black: #000000;
+$uni-white: #ffffff;
+$uni-transparent: rgba($color: #000000, $alpha: 0);
+
+// 背景色
+$uni-bg-color: #f7f7f7;
+
+/* 水平间距 */
+$uni-spacing-sm: 8px;
+$uni-spacing-base: 15px;
+$uni-spacing-lg: 30px;
+
+// 阴影
+$uni-shadow-sm:0 0 5px rgba($color: #d8d8d8, $alpha: 0.5);
+$uni-shadow-base:0 1px 8px 1px rgba($color: #a5a5a5, $alpha: 0.2);
+$uni-shadow-lg:0px 1px 10px 2px rgba($color: #a5a4a4, $alpha: 0.5);
+
+// 蒙版
+$uni-mask: rgba($color: #000000, $alpha: 0.4);

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/common-dialog.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/img-swiper.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/loadmore.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/nav/dial-nav.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/nav/label-count.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/navbar/navbar-search.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/navbar/navbar-top-search.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/no-data.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/pageScroll/index.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/search/search.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/select-reason.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/tag.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/title-operate.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/BookItem.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/BookListItem.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/PickupTimePicker.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/book-order.js.map


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/order-success.js.map


Некоторые файлы не были показаны из-за большого количества измененных файлов