@dongkboy 1 год назад
Родитель
Сommit
07eb3c90d3
48 измененных файлов с 247 добавлено и 4000 удалено
  1. 8 7
      components/modules/index/index-nav.vue
  2. 0 151
      components/uni-badge/uni-badge.vue
  3. 0 401
      components/uni-card/uni-card.vue
  4. 0 316
      components/uni-data-checkbox/clientdb.js
  5. 0 821
      components/uni-data-checkbox/uni-data-checkbox.vue
  6. 0 56
      components/uni-easyinput/common.js
  7. 0 409
      components/uni-easyinput/uni-easyinput.vue
  8. 0 32
      components/uni-status-bar/uni-status-bar.vue
  9. 0 292
      components/uni-swipe-action-item/bindingx.js
  10. 0 318
      components/uni-swipe-action-item/index.wxs
  11. 0 12
      components/uni-swipe-action-item/isPC.js
  12. 0 207
      components/uni-swipe-action-item/mpalipay.js
  13. 0 252
      components/uni-swipe-action-item/mpother.js
  14. 0 135
      components/uni-swipe-action-item/mpwxs.js
  15. 0 271
      components/uni-swipe-action-item/uni-swipe-action-item.vue
  16. 0 42
      components/uni-swipe-action/uni-swipe-action.vue
  17. 239 278
      pages/index/index.vue
  18. BIN
      static/image/index/ad-img/ad.jpg
  19. BIN
      static/image/index/ad-img/ad.png
  20. BIN
      static/image/index/category-img/0.png
  21. BIN
      static/image/index/category-img/1.png
  22. BIN
      static/image/index/category-img/10.png
  23. BIN
      static/image/index/category-img/2.png
  24. BIN
      static/image/index/category-img/3.png
  25. BIN
      static/image/index/category-img/4.png
  26. BIN
      static/image/index/category-img/5.png
  27. BIN
      static/image/index/category-img/6.png
  28. BIN
      static/image/index/category-img/7.png
  29. BIN
      static/image/index/category-img/8.png
  30. BIN
      static/image/index/category-img/9.png
  31. BIN
      static/image/index/img/Scan.png
  32. BIN
      static/image/index/img/cityicon.png
  33. BIN
      static/image/index/img/jiantou.png
  34. BIN
      static/image/index/img/p1.jpg
  35. BIN
      static/image/index/img/p10.jpg
  36. BIN
      static/image/index/img/p2.jpg
  37. BIN
      static/image/index/img/p3.jpg
  38. BIN
      static/image/index/img/p4.jpg
  39. BIN
      static/image/index/img/p5.jpg
  40. BIN
      static/image/index/img/p6.jpg
  41. BIN
      static/image/index/img/p7.jpg
  42. BIN
      static/image/index/img/p8.jpg
  43. BIN
      static/image/index/img/p9.jpg
  44. BIN
      static/image/index/pick-img/1.png
  45. BIN
      static/image/index/pick-img/2.png
  46. BIN
      static/image/index/pick-img/p1.jpg
  47. BIN
      static/image/index/pick-img/p2.jpg
  48. BIN
      static/image/index/pick-img/p3.jpg

+ 8 - 7
components/modules/index/index-nav.vue

@@ -5,7 +5,7 @@
 			<swiper-item v-for="(page, pageindex) in categoryList" :key="pageindex">
 				<view class="category-list">
 					<view class="icon" v-for="category in page" :key="category.cat_id" @tap="tapEvent(category)">
-						<image :src="category.img" style="width: 50px;height: 50px;"></image>
+						<image :src="category.img" style="width: 32px;height: 32px;"></image>
 						<view class="category-title">{{ category.title }}</view>
 					</view>
 				</view>
@@ -38,7 +38,7 @@
 			},
 			autoplay: { //自动轮播
 				type: Boolean,
-				default: true,
+				default: false,
 			},
 			duration: { //切换时长
 				type: Number,
@@ -82,7 +82,7 @@
 		},
 		computed: {
 			categoryList() {
-				this.currentPageHeight = 150 * this.row + 10;
+				this.currentPageHeight = 120 * this.row + 10;
 				let totalPages = Math.floor(this.resdata.length / (this.row * 5));
 				if (this.resdata.length % (this.row * 5) != 0) {
 					totalPages += 1;
@@ -290,15 +290,17 @@
 	.dots>view {
 		width: 30upx;
 		height: 5upx;
-		background-color: rgba(0, 0, 0, 0.2);
+
+		background-color: #E5E5E5;
 	}
 
 	.dots>view.active {
-		background-color: #0A98D5;
+		border-radius: 2px;
+		background-color: #0052FF;
 	}
 
 	.swiper {
-		padding: 10upx 0upx;
+		padding-bottom: 8upx;
 	}
 
 	.category-list {
@@ -317,7 +319,6 @@
 		margin-top: 5upx;
 		margin-bottom: 5upx;
 		width: 20%;
-		height: 150upx;
 		display: flex;
 		flex-flow: wrap;
 		justify-content: center;

+ 0 - 151
components/uni-badge/uni-badge.vue

@@ -1,151 +0,0 @@
-<template>
-	<text v-if="text" :class="inverted ? 'uni-badge--' + type + ' uni-badge--' + size + ' uni-badge--' + type + '-inverted' : 'uni-badge--' + type + ' uni-badge--' + size" :style="badgeStyle" class="uni-badge" @click="onClick()">{{ text }}</text>
-</template>
-
-<script>
-	/**
-	 * Badge 数字角标
-	 * @description 数字角标一般和其它控件(列表、9宫格等)配合使用,用于进行数量提示,默认为实心灰色背景
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=21
-	 * @property {String} text 角标内容
-	 * @property {String} type = [default|primary|success|warning|error] 颜色类型
-	 * 	@value default 灰色
-	 * 	@value primary 蓝色
-	 * 	@value success 绿色
-	 * 	@value warning 黄色
-	 * 	@value error 红色
-	 * @property {String} size = [normal|small] Badge 大小
-	 * 	@value normal 一般尺寸
-	 * 	@value small 小尺寸
-	 * @property {String} inverted = [true|false] 是否无需背景颜色
-	 * @event {Function} click 点击 Badge 触发事件
-	 * @example <uni-badge text="1"></uni-badge>
-	 */
-	export default {
-		name: 'UniBadge',
-		props: {
-			type: {
-				type: String,
-				default: 'default'
-			},
-			inverted: {
-				type: Boolean,
-				default: false
-			},
-			text: {
-				type: [String, Number],
-				default: ''
-			},
-			size: {
-				type: String,
-				default: 'normal'
-			}
-		},
-		data() {
-			return {
-				badgeStyle: ''
-			};
-		},
-		watch: {
-			text() {
-				this.setStyle()
-			}
-		},
-		mounted() {
-			this.setStyle()
-		},
-		methods: {
-			setStyle() {
-				this.badgeStyle = `width: ${String(this.text).length * 8 + 12}px`
-			},
-			onClick() {
-				this.$emit('click');
-			}
-		}
-	};
-</script>
-
-<style scoped>
-	.uni-badge {
-		/* #ifndef APP-PLUS */
-		display: flex;
-		box-sizing: border-box;
-		overflow: hidden;
-		/* #endif */
-		justify-content: center;
-		flex-direction: row;
-		height: 20px;
-		line-height: 20px;
-		color: #333;
-		border-radius: 100px;
-		background-color: #f1f1f1;
-		background-color: transparent;
-		text-align: center;
-		font-family: 'Helvetica Neue', Helvetica, sans-serif;
-		font-size: 12px;
-		padding: 0px 6px;
-		/* #ifdef H5 */
-		cursor: pointer;
-		/* #endif */
-	}
-
-	.uni-badge--inverted {
-		padding: 0 5px 0 0;
-		color: #f1f1f1;
-	}
-
-	.uni-badge--default {
-		color: #333;
-		background-color: #f1f1f1;
-	}
-
-	.uni-badge--default-inverted {
-		color: #999;
-		background-color: transparent;
-	}
-
-	.uni-badge--primary {
-		color: #fff;
-		background-color: #007aff;
-	}
-
-	.uni-badge--primary-inverted {
-		color: #007aff;
-		background-color: transparent;
-	}
-
-	.uni-badge--success {
-		color: #fff;
-		background-color: #4cd964;
-	}
-
-	.uni-badge--success-inverted {
-		color: #4cd964;
-		background-color: transparent;
-	}
-
-	.uni-badge--warning {
-		color: #fff;
-		background-color: #f0ad4e;
-	}
-
-	.uni-badge--warning-inverted {
-		color: #f0ad4e;
-		background-color: transparent;
-	}
-
-	.uni-badge--error {
-		color: #fff;
-		background-color: #dd524d;
-	}
-
-	.uni-badge--error-inverted {
-		color: #dd524d;
-		background-color: transparent;
-	}
-
-	.uni-badge--small {
-		transform: scale(0.8);
-		transform-origin: center center;
-	}
-</style>

+ 0 - 401
components/uni-card/uni-card.vue

@@ -1,401 +0,0 @@
-<template>
-	<view class="uni-card uni-border" :class="{ 'uni-card--full': isFull === true || isFull === 'true', 'uni-card--shadow': isShadow === true || isShadow === 'true'}">
-		<!-- 基础 -->
-		<view v-if="mode === 'basic' && title" class="uni-card__header uni-border-bottom" @click.stop="onClick">
-			<view v-if="thumbnail" class="uni-card__header-extra-img-view">
-				<image :src="thumbnail" class="uni-card__header-extra-img" />
-			</view>
-			<text class="uni-card__header-title-text">{{ title }}</text>
-			<text v-if="extra" class="uni-card__header-extra-text">{{ extra }}</text>
-		</view>
-		<!-- 标题 -->
-		<view v-if="mode === 'title'" class="uni-card__title uni-border-bottom" @click.stop="onClick">
-			<view class="uni-card__title-box">
-				<view class="uni-card__title-header">
-					<image class="uni-card__title-header-image" :src="thumbnail" mode="scaleToFill" />
-				</view>
-				<view class="uni-card__title-content">
-					<text class="uni-card__title-content-title uni-ellipsis">{{ title }}</text>
-					<text class="uni-card__title-content-extra uni-ellipsis">{{ subTitle }}</text>
-				</view>
-			</view>
-			<view v-if="extra">
-				<text class="uni-card__header-extra-text">{{ extra }}</text>
-			</view>
-		</view>
-		<!-- 图文 -->
-		<view v-if="mode === 'style'" class="uni-card__thumbnailimage" @click.stop="onClick">
-			<view class="uni-card__thumbnailimage-box">
-				<image class="uni-card__thumbnailimage-image" :src="thumbnail" mode="aspectFill" />
-			</view>
-			<view v-if="title" class="uni-card__thumbnailimage-title"><text class="uni-card__thumbnailimage-title-text">{{ title }}</text></view>
-		</view>
-		<!-- 内容 -->
-		<view class="uni-card__content uni-card__content--pd" @click.stop="onClick">
-			<view v-if="mode === 'style' && extra" class=""><text class="uni-card__content-extra">{{ extra }}</text></view>
-			<slot />
-		</view>
-		<!-- 底部 -->
-		<view v-if="note" class="uni-card__footer uni-border-top">
-			<slot name="footer">
-				<text class="uni-card__footer-text">{{ note }}</text>
-			</slot>
-		</view>
-	</view>
-</template>
-
-<script>
-	/**
-	 * Card 卡片
-	 * @description 卡片视图组件
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=22
-	 * @property {String} title 标题文字
-	 * @property {String} subTitle 副标题(仅仅mode=title下生效)
-	 * @property {String} extra 标题额外信息
-	 * @property {String} note 标题左侧缩略图
-	 * @property {String} thumbnail 底部信息
-	 * @property {String} mode = [basic|style|title] 卡片模式
-	 * 	@value basic 基础卡片
-	 * 	@value style 图文卡片
-	 * 	@value title 标题卡片
-	 * @property {Boolean} isFull = [true | false] 卡片内容是否通栏,为 true 时将去除padding值
-	 * @property {Boolean} isShadow = [true | false] 卡片内容是否开启阴影
-	 * @event {Function} click 点击 Card 触发事件
-	 * @example <uni-card title="标题文字" thumbnail="xxx.jpg" extra="额外信息" note="Tips">内容主体,可自定义内容及样式</uni-card>
-	 */
-	export default {
-		name: 'UniCard',
-		props: {
-			title: {
-				type: String,
-				default: ''
-			},
-			subTitle: {
-				type: String,
-				default: ''
-			},
-			extra: {
-				type: String,
-				default: ''
-			},
-			note: {
-				type: String,
-				default: ''
-			},
-			thumbnail: {
-				type: String,
-				default: ''
-			},
-			mode: {
-				type: String,
-				default: 'basic'
-			},
-			isFull: {
-				// 内容区域是否通栏
-				type: Boolean,
-				default: false
-			},
-			isShadow: {
-				// 是否开启阴影
-				type: [Boolean, String],
-				default: false
-			}
-		},
-		methods: {
-			onClick() {
-				this.$emit('click')
-			}
-		}
-	}
-</script>
-
-<style scoped>
-	.uni-card {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		flex: 1;
-		box-shadow: 0 0 0 rgba(0, 0, 0, 0);
-		/* #endif */
-		margin: 12px 15px;
-		background-color: #ffffff;
-		position: relative;
-		flex-direction: column;
-		border-radius: 5px;
-		overflow: hidden;
-		/* #ifdef H5 */
-		cursor: pointer;
-		/* #endif */
-	}
-
-	.uni-border {
-		position: relative;
-		/* #ifdef APP-NVUE */
-		border-color: #e5e5e5;
-		border-style: solid;
-		border-width: 0.5px;
-		/* #endif */
-		z-index: 1;
-	}
-
-	/* #ifndef APP-NVUE */
-	.uni-border:after {
-		content: '';
-		position: absolute;
-		bottom: 0;
-		left: 0;
-		top: 0;
-		right: 0;
-		border: 1px solid #e5e5e5;
-		border-radius: 10px;
-		box-sizing: border-box;
-		width: 200%;
-		height: 200%;
-		transform: scale(0.5);
-		transform-origin: left top;
-		z-index: -1;
-	}
-
-	/* #endif */
-	.uni-border-bottom {
-		position: relative;
-		/* #ifdef APP-NVUE */
-		border-bottom-color: #e5e5e5;
-		border-bottom-style: solid;
-		border-bottom-width: 0.5px;
-		/* #endif */
-		z-index: 1;
-	}
-
-	/* #ifndef APP-NVUE */
-	.uni-border-bottom:after {
-		content: '';
-		position: absolute;
-		bottom: 0;
-		left: 0;
-		top: 0;
-		right: 0;
-		border-bottom: 1px solid #e5e5e5;
-		box-sizing: border-box;
-		width: 200%;
-		height: 200%;
-		transform: scale(0.5);
-		transform-origin: left top;
-		z-index: -1;
-	}
-
-	/* #endif */
-	.uni-border-top {
-		position: relative;
-		/* #ifdef APP-NVUE */
-		border-top-color: #e5e5e5;
-		border-top-style: solid;
-		border-top-width: 0.5px;
-		/* #endif */
-		z-index: 1;
-	}
-
-	/* #ifndef APP-NVUE */
-	.uni-border-top:after {
-		content: '';
-		position: absolute;
-		bottom: 0;
-		left: 0;
-		top: 0;
-		right: 0;
-		border-top: 1px solid #e5e5e5;
-		box-sizing: border-box;
-		width: 200%;
-		height: 200%;
-		transform: scale(0.5);
-		transform-origin: left top;
-		z-index: -1;
-	}
-
-	/* #endif */
-	.uni-card__thumbnailimage {
-		position: relative;
-		flex-direction: column;
-		justify-content: center;
-		height: 150px;
-		overflow: hidden;
-	}
-
-	.uni-card__thumbnailimage-box {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex: 1;
-		flex-direction: row;
-		overflow: hidden;
-	}
-
-	.uni-card__thumbnailimage-image {
-		flex: 1;
-	}
-
-	.uni-card__thumbnailimage-title {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		position: absolute;
-		bottom: 0;
-		left: 0;
-		right: 0;
-		flex-direction: row;
-		padding: 8px 12px;
-		background-color: rgba(0, 0, 0, 0.4);
-	}
-
-	.uni-card__thumbnailimage-title-text {
-		flex: 1;
-		font-size: 14px;
-		color: #fff;
-	}
-
-	.uni-card__title {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		align-items: center;
-		padding: 10px;
-	}
-
-	.uni-card__title-box {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex: 1;
-		flex-direction: row;
-		align-items: center;
-		overflow: hidden;
-	}
-
-	.uni-card__title-header {
-		width: 40px;
-		height: 40px;
-		overflow: hidden;
-		border-radius: 5px;
-	}
-
-	.uni-card__title-header-image {
-		width: 40px;
-		height: 40px;
-	}
-
-	.uni-card__title-content {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-		justify-content: center;
-		flex: 1;
-		padding-left: 10px;
-		height: 40px;
-		overflow: hidden;
-	}
-
-	.uni-card__title-content-title {
-		font-size: 14px;
-		line-height: 22px;
-	}
-
-	.uni-card__title-content-extra {
-		font-size: 12px;
-		line-height: 27px;
-		color: #999;
-	}
-
-	.uni-card__header {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		position: relative;
-		flex-direction: row;
-		padding: 12px;
-		align-items: center;
-	}
-
-	.uni-card__header-title {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		margin-right: 8px;
-		justify-content: flex-start;
-		align-items: center;
-	}
-
-	.uni-card__header-title-text {
-		font-size: 16px;
-		flex: 1;
-		color: #333;
-	}
-
-	.uni-card__header-extra-img {
-		height: 20px;
-		width: 20px;
-		margin-right: 8px;
-	}
-
-	.uni-card__header-extra-text {
-		flex: 1;
-		margin-left: 8px;
-		font-size: 12px;
-		text-align: right;
-		color: #999;
-	}
-
-	.uni-card__content {
-		color: #333;
-	}
-
-	.uni-card__content--pd {
-		padding: 12px;
-	}
-
-	.uni-card__content-extra {
-		font-size: 14px;
-		padding-bottom: 10px;
-		color: #999;
-	}
-
-	.uni-card__footer {
-		justify-content: space-between;
-		padding: 12px;
-	}
-
-	.uni-card__footer-text {
-		color: #999;
-		font-size: 12px;
-	}
-
-	.uni-card--shadow {
-		position: relative;
-		/* #ifndef APP-NVUE */
-		box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.1);
-		/* #endif */
-	}
-
-	.uni-card--full {
-		margin: 0;
-		border-radius: 0;
-	}
-
-	/* #ifndef APP-NVUE */
-	.uni-card--full:after {
-		border-radius: 0;
-	}
-
-	/* #endif */
-	.uni-ellipsis {
-		/* #ifndef APP-NVUE */
-		overflow: hidden;
-		white-space: nowrap;
-		text-overflow: ellipsis;
-		/* #endif */
-		/* #ifdef APP-NVUE */
-		lines: 1;
-		/* #endif */
-	}
-</style>

+ 0 - 316
components/uni-data-checkbox/clientdb.js

@@ -1,316 +0,0 @@
-
-const events = {
-	load: 'load',
-	error: 'error'
-}
-const pageMode = {
-	add: 'add',
-	replace: 'replace'
-}
-
-const attrs = [
-	'pageCurrent',
-	'pageSize',
-	'collection',
-	'action',
-	'field',
-	'getcount',
-	'orderby',
-	'where'
-]
-
-export default {
-	data() {
-		return {
-			loading: false,
-			listData: this.getone ? {} : [],
-			paginationInternal: {
-				current: this.pageCurrent,
-				size: this.pageSize,
-				count: 0
-			},
-			errorMessage: ''
-		}
-	},
-	created() {
-		let db = null;
-		let dbCmd = null;
-
-		if(this.collection){
-			this.db = uniCloud.database();
-			this.dbCmd = this.db.command;
-		}
-
-		this._isEnded = false
-
-		this.$watch(() => {
-			var al = []
-			attrs.forEach(key => {
-				al.push(this[key])
-			})
-			return al
-		}, (newValue, oldValue) => {
-			this.paginationInternal.pageSize = this.pageSize
-
-			let needReset = false
-			for (let i = 2; i < newValue.length; i++) {
-				if (newValue[i] != oldValue[i]) {
-					needReset = true
-					break
-				}
-			}
-			if (needReset) {
-				this.clear()
-				this.reset()
-			}
-			if (newValue[0] != oldValue[0]) {
-				this.paginationInternal.current = this.pageCurrent
-			}
-
-			this._execLoadData()
-		})
-
-		// #ifdef H5
-		if (process.env.NODE_ENV === 'development') {
-			this._debugDataList = []
-			if (!window.unidev) {
-				window.unidev = {
-					clientDB: {
-						data: []
-					}
-				}
-			}
-			unidev.clientDB.data.push(this._debugDataList)
-		}
-		// #endif
-
-		// #ifdef MP-TOUTIAO
-		let changeName
-		let events = this.$scope.dataset.eventOpts
-		for (var i = 0; i < events.length; i++) {
-			let event = events[i]
-			if (event[0].includes('^load')) {
-				changeName = event[1][0][0]
-			}
-		}
-		if (changeName) {
-			let parent = this.$parent
-			let maxDepth = 16
-			this._changeDataFunction = null
-			while (parent && maxDepth > 0) {
-				let fun = parent[changeName]
-				if (fun && typeof fun === 'function') {
-					this._changeDataFunction = fun
-					maxDepth = 0
-					break
-				}
-				parent = parent.$parent
-				maxDepth--;
-			}
-		}
-		// #endif
-
-		// if (!this.manual) {
-		// 	this.loadData()
-		// }
-	},
-	// #ifdef H5
-	beforeDestroy() {
-		if (process.env.NODE_ENV === 'development' && window.unidev) {
-			var cd = this._debugDataList
-			var dl = unidev.clientDB.data
-			for (var i = dl.length - 1; i >= 0; i--) {
-				if (dl[i] === cd) {
-					dl.splice(i, 1)
-					break
-				}
-			}
-		}
-	},
-	// #endif
-	methods: {
-		loadData(args1, args2) {
-			let callback = null
-			if (typeof args1 === 'object') {
-				if (args1.clear) {
-					this.clear()
-					this.reset()
-				}
-				if (args1.current !== undefined) {
-					this.paginationInternal.current = args1.current
-				}
-				if (typeof args2 === 'function') {
-					callback = args2
-				}
-			} else if (typeof args1 === 'function') {
-				callback = args1
-			}
-
-			this._execLoadData(callback)
-		},
-		loadMore() {
-			if (this._isEnded) {
-				return
-			}
-			this._execLoadData()
-		},
-		refresh() {
-			this.clear()
-			this._execLoadData()
-		},
-		clear() {
-			this._isEnded = false
-			this.listData = []
-		},
-		reset() {
-			this.paginationInternal.current = 1
-		},
-		remove(id, {
-			action,
-			callback,
-			confirmTitle,
-			confirmContent
-		} = {}) {
-			if (!id || !id.length) {
-				return
-			}
-			uni.showModal({
-				title: confirmTitle || '提示',
-				content: confirmContent || '是否删除该数据',
-				showCancel: true,
-				success: (res) => {
-					if (!res.confirm) {
-						return
-					}
-					this._execRemove(id, action, callback)
-				}
-			})
-		},
-		_execLoadData(callback) {
-			if (this.loading) {
-				return
-			}
-			this.loading = true
-			this.errorMessage = ''
-
-			this._getExec().then((res) => {
-				this.loading = false
-				const {
-					data,
-					count
-				} = res.result
-				this._isEnded = data.length < this.pageSize
-
-				callback && callback(data, this._isEnded)
-				this._dispatchEvent(events.load, data)
-
-				if (this.getone) {
-					this.listData = data.length ? data[0] : undefined
-				} else if (this.pageData === pageMode.add) {
-					this.listData.push(...data)
-					if (this.listData.length) {
-						this.paginationInternal.current++
-					}
-				} else if (this.pageData === pageMode.replace) {
-					this.listData = data
-					this.paginationInternal.count = count
-				}
-
-				// #ifdef H5
-				if (process.env.NODE_ENV === 'development') {
-					this._debugDataList.length = 0
-					this._debugDataList.push(...JSON.parse(JSON.stringify(this.listData)))
-				}
-				// #endif
-			}).catch((err) => {
-				this.loading = false
-				this.errorMessage = err
-				callback && callback()
-				this.$emit(events.error, err)
-			})
-		},
-		_getExec() {
-			let exec = this.db
-			if (this.action) {
-				exec = exec.action(this.action)
-			}
-
-			exec = exec.collection(this.collection)
-
-			if (!(!this.where || !Object.keys(this.where).length)) {
-				exec = exec.where(this.where)
-			}
-			if (this.field) {
-				exec = exec.field(this.field)
-			}
-			if (this.orderby) {
-				exec = exec.orderBy(this.orderby)
-			}
-
-			const {
-				current,
-				size
-			} = this.paginationInternal
-			exec = exec.skip(size * (current - 1)).limit(size).get({
-				getCount: this.getcount
-			})
-
-			return exec
-		},
-		_execRemove(id, action, callback) {
-			if (!this.collection || !id) {
-				return
-			}
-
-			const ids = Array.isArray(id) ? id : [id]
-			if (!ids.length) {
-				return
-			}
-
-			uni.showLoading({
-				mask: true
-			})
-
-			let exec = this.db
-			if (action) {
-				exec = exec.action(action)
-			}
-
-			exec.collection(this.collection).where({
-				_id: dbCmd.in(ids)
-			}).remove().then((res) => {
-				callback && callback(res.result)
-				if (this.pageData === pageMode.replace) {
-					this.refresh()
-				} else {
-					this.removeData(ids)
-				}
-			}).catch((err) => {
-				uni.showModal({
-					content: err.message,
-					showCancel: false
-				})
-			}).finally(() => {
-				uni.hideLoading()
-			})
-		},
-		removeData(ids) {
-			let il = ids.slice(0)
-			let dl = this.listData
-			for (let i = dl.length - 1; i >= 0; i--) {
-				let index = il.indexOf(dl[i]._id)
-				if (index >= 0) {
-					dl.splice(i, 1)
-					il.splice(index, 1)
-				}
-			}
-		},
-		_dispatchEvent(type, data) {
-			if (this._changeDataFunction) {
-				this._changeDataFunction(data, this._isEnded)
-			} else {
-				this.$emit(type, data, this._isEnded)
-			}
-		}
-	}
-}

+ 0 - 821
components/uni-data-checkbox/uni-data-checkbox.vue

@@ -1,821 +0,0 @@
-<template>
-	<view class="uni-data-checklist">
-		<template v-if="loading">
-			<view class="uni-data-loading">
-				<uni-load-more status="loading" iconType="snow" :iconSize="18" :content-text="contentText"></uni-load-more>
-			</view>
-		</template>
-		<template v-else>
-			<checkbox-group v-if="multiple" class="checklist-group" :class="{'is-list':mode==='list','is-wrap':wrap}" @change="chagne">
-				<label class="checklist-box" :class="item.labelClass" :style="[item.styleBackgroud]" v-for="(item,index) in dataList" :key="index">
-					<checkbox class="hidden" hidden :disabled="!!item.disabled" :value="item.value+''" :checked="item.selected" />
-					<view v-if="(mode !=='tag' && mode !== 'list') || ( mode === 'list' && icon === 'left')" class="checkbox__inner" :class="item.checkboxBgClass" :style="[item.styleIcon]">
-						<view class="checkbox__inner-icon" :class="item.checkboxClass"></view>
-					</view>
-					<view class="checklist-content" :class="{'list-content':mode === 'list' && icon ==='left'}">
-						<text class="checklist-text" :class="item.textClass" :style="[item.styleIconText]">{{item.text}}</text>
-						<view v-if="mode === 'list' && icon === 'right'" class="checkobx__list" :class="item.listClass" :style="[item.styleBackgroud]"></view>
-					</view>
-				</label>
-			</checkbox-group>
-			<radio-group v-else class="checklist-group" :class="{'is-list':mode==='list','is-wrap':wrap}" @change="chagne">
-				<label class="checklist-box" :class="item.labelClass" :style="[item.styleBackgroud]" v-for="(item,index) in dataList" :key="index">
-					<radio hidden :disabled="item.disabled" :value="item.value+''" :checked="item.selected" />
-					<view v-if="(mode !=='tag' && mode !== 'list') || ( mode === 'list' && icon === 'left')" class="radio__inner" :class="item.checkboxBgClass" :style="[item.styleBackgroud]">
-						<view class="radio__inner-icon" :class="item.checkboxClass" :style="[item.styleIcon]"></view>
-					</view>
-					<view class="checklist-content" :class="{'list-content':mode === 'list' && icon ==='left'}">
-						<text class="checklist-text" :class="item.textClass" :style="[item.styleIconText]">{{item.text}}</text>
-						<view v-if="mode === 'list' && icon === 'right'" class="checkobx__list" :class="item.listClass" :style="[item.styleRightIcon]"></view>
-					</view>
-				</label>
-			</radio-group>
-		</template>
-	</view>
-</template>
-
-<script>
-	/**
-	 * DataChecklist 数据选择器
-	 * @description 通过数据渲染 checkbox 和 radio
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=xxx
-	 * @property {String} mode = [default| list | button | tag] 显示模式
-	 * @value default  	默认横排模式
-	 * @value list		列表模式
-	 * @value button	按钮模式
-	 * @value tag 		标签模式
-	 * @property {Boolean} multiple = [true|false] 是否多选
-	 * @property {Array|String|Number} value 默认值
-	 * @property {Array} localdata 本地数据 ,格式 [{text:'',value:''}]
-	 * @property {Number|String} min 最小选择个数 ,multiple为true时生效
-	 * @property {Number|String} max 最大选择个数 ,multiple为true时生效
-	 * @property {Boolean} wrap 是否换行显示
-	 * @property {String} icon = [left|right]  list 列表模式下icon显示位置
-	 * @property {Boolean} selectedColor 选中颜色
-	 * @property {Boolean} selectedTextColor 选中文本颜色,如不填写则自动显示
-	 * @value left 左侧显示
-	 * @value right 右侧显示
-	 * @event {Function} change  选中发生变化触发
-	 */
-
-	import clientdb from './clientdb.js'
-	export default {
-		name: 'uniDataChecklist',
-		mixins: [clientdb],
-		props: {
-			mode: {
-				type: String,
-				default: 'default'
-			},
-			multiple: {
-				type: Boolean,
-				default: false
-			},
-			value: {
-				type: [Array, String, Number],
-				default () {
-					return ''
-				}
-			},
-			localdata: {
-				type: Array,
-				default () {
-					return []
-				}
-			},
-			min: {
-				type: [Number, String],
-				default: ''
-			},
-			max: {
-				type: [Number, String],
-				default: ''
-			},
-			wrap: {
-				type: Boolean,
-				default: false
-			},
-			icon: {
-				type: String,
-				default: 'left'
-			},
-			selectedColor: {
-				type: String,
-				default: ''
-			},
-			selectedTextColor: {
-				type: String,
-				default: ''
-			},
-			// clientDB 相关
-			options: {
-				type: [Object, Array],
-				default () {
-					return {}
-				}
-			},
-			collection: {
-				type: String,
-				default: ''
-			},
-			action: {
-				type: String,
-				default: ''
-			},
-			field: {
-				type: String,
-				default: ''
-			},
-			pageData: {
-				type: String,
-				default: 'add'
-			},
-			pageCurrent: {
-				type: Number,
-				default: 1
-			},
-			pageSize: {
-				type: Number,
-				default: 20
-			},
-			getcount: {
-				type: [Boolean, String],
-				default: false
-			},
-			orderby: {
-				type: String,
-				default: ''
-			},
-			where: {
-				type: [String, Object],
-				default: ''
-			},
-			getone: {
-				type: [Boolean, String],
-				default: false
-			},
-			manual: {
-				type: Boolean,
-				default: false
-			}
-		},
-		watch: {
-			localdata: {
-				handler(newVal) {
-					this.range = newVal
-					this.dataList = this.getDataList(this.getSelectedValue(newVal))
-				},
-				deep: true
-			},
-
-			listData(newVal) {
-				this.range = newVal
-				this.dataList = this.getDataList(this.getSelectedValue(newVal))
-			},
-			value(newVal) {
-				this.dataList = this.getDataList(newVal)
-				this.formItem && this.formItem.setValue(newVal)
-			}
-		},
-		data() {
-			return {
-				dataList: [],
-				range: [],
-				contentText: {
-					contentdown: '查看更多',
-					contentrefresh: '加载中',
-					contentnomore: '没有更多'
-				},
-				styles: {
-					selectedColor: '#007aff',
-					selectedTextColor: '#333',
-				}
-			};
-		},
-		created() {
-			this.form = this.getForm('uniForms')
-			this.formItem = this.getForm('uniFormsItem')
-			this.formItem && this.formItem.setValue(this.value)
-			this.styles = {
-				selectedColor: this.selectedColor,
-				selectedTextColor: this.selectedTextColor
-			}
-
-			if (this.formItem) {
-				if (this.formItem.name) {
-					this.rename = this.formItem.name
-					this.form.inputChildrens.push(this)
-				}
-			}
-
-			if (this.localdata && this.localdata.length !== 0) {
-				this.range = this.localdata
-				this.dataList = this.getDataList(this.getSelectedValue(this.range))
-			} else {
-				if (this.collection) {
-					this.loadData()
-				}
-			}
-		},
-		methods: {
-			init(range) {},
-			/**
-			 * 获取父元素实例
-			 */
-			getForm(name = 'uniForms') {
-				let parent = this.$parent;
-				let parentName = parent.$options.name;
-				while (parentName !== name) {
-					parent = parent.$parent;
-					if (!parent) return false
-					parentName = parent.$options.name;
-				}
-				return parent;
-			},
-			chagne(e) {
-				const values = e.detail.value
-
-				let detail = {
-					value: [],
-					data: []
-				}
-
-				if (this.multiple) {
-					this.range.forEach(item => {
-						if (values.includes(item.value + '')) {
-							detail.value.push(item.value)
-							detail.data.push(item)
-						}
-					})
-				} else {
-					const range = this.range.find(item => (item.value + '') === values)
-					if (range) {
-						detail = {
-							value: range.value,
-							data: range
-						}
-					}
-				}
-				this.formItem && this.formItem.setValue(detail.value)
-				this.$emit('input', detail.value)
-				this.$emit('change', {
-					detail
-				})
-				if (this.multiple) {
-					// 如果 v-model 没有绑定 ,则走内部逻辑
-					// if (this.value.length === 0) {
-					this.dataList = this.getDataList(detail.value, true)
-					// }
-				} else {
-					this.dataList = this.getDataList(detail.value)
-				}
-			},
-			getLabelClass(item, index) {
-				let classes = []
-				switch (this.mode) {
-					case 'default':
-						item.disabled && classes.push('disabled-cursor')
-						break
-					case 'button':
-						classes.push(...['is-button', ...this.getClasses(item, 'button')])
-						break
-					case 'list':
-						if (this.multiple) {
-							classes.push('is-list-multiple-box')
-						} else {
-							classes.push('is-list-box')
-						}
-						item.disabled && classes.push('is-list-disabled')
-						index !== 0 && classes.push('is-list-border')
-						break
-					case 'tag':
-						classes.push(...['is-tag', ...this.getClasses(item, 'tag')])
-						break
-				}
-				classes = classes.join(' ')
-				return classes
-			},
-			getCheckboxClass(item, type = '') {
-				let classes = []
-				if (this.multiple) {
-					classes.push(...this.getClasses(item, 'default-multiple', type))
-				} else {
-					classes.push(...this.getClasses(item, 'default', type))
-				}
-				classes = classes.join(' ')
-				return classes
-			},
-			getTextClass(item) {
-				let classes = []
-				switch (this.mode) {
-					case 'default':
-						classes.push(...this.getClasses(item, 'list'))
-						break
-					case 'button':
-						classes.push(...this.getClasses(item, 'list'))
-						break
-					case 'list':
-						classes.push(...this.getClasses(item, 'list'))
-						break
-					case 'tag':
-						classes.push(...['is-tag-text', ...this.getClasses(item, 'tag-text')])
-						break
-				}
-				classes = classes.join(' ')
-				return classes
-			},
-
-			/**
-			 * 获取渲染的新数组
-			 * @param {Object} value 选中内容
-			 */
-			getDataList(value) {
-				// 解除引用关系,破坏原引用关系,避免污染源数据
-				let dataList = JSON.parse(JSON.stringify(this.range))
-				let list = []
-				if (this.multiple) {
-					if (!Array.isArray(value)) {
-						value = []
-						// console.error('props 类型错误');
-					}
-				}
-				dataList.forEach((item, index) => {
-					item.disabled = item.disable || item.disabled || false
-					if (this.multiple) {
-						if (value.length > 0) {
-							let have = value.find(val => val === item.value)
-							item.selected = have !== undefined
-						} else {
-							item.selected = false
-						}
-					} else {
-						item.selected = value === item.value
-					}
-
-					list.push(item)
-				})
-				return this.setRange(list)
-			},
-			/**
-			 * 处理最大最小值
-			 * @param {Object} list
-			 */
-			setRange(list) {
-				let selectList = list.filter(item => item.selected)
-				let min = Number(this.min) || 0
-				let max = Number(this.max) || ''
-				list.forEach((item, index) => {
-					if (this.multiple) {
-						if (selectList.length <= min) {
-							let have = selectList.find(val => val.value === item.value)
-							if (have !== undefined) {
-								item.disabled = true
-							}
-						}
-
-						if (selectList.length >= max && max !== '') {
-							let have = selectList.find(val => val.value === item.value)
-							if (have === undefined) {
-								item.disabled = true
-							}
-						}
-					}
-					this.setClass(item, index)
-					list[index] = item
-				})
-				return list
-			},
-			/**
-			 * 设置 class
-			 * @param {Object} item
-			 * @param {Object} index
-			 */
-			setClass(item, index) {
-				// 设置 label 的 class
-				item.labelClass = this.getLabelClass(item, index)
-				// 设置 checkbox外层样式
-				item.checkboxBgClass = this.getCheckboxClass(item, '-bg')
-				// 设置 checkbox 内层样式
-				item.checkboxClass = this.getCheckboxClass(item)
-				// 设置文本样式
-				item.textClass = this.getTextClass(item)
-				// 设置 list 对勾右侧样式
-				item.listClass = this.getCheckboxClass(item, '-list')
-
-				//  设置自定义样式
-				item.styleBackgroud = this.setStyleBackgroud(item)
-				item.styleIcon = this.setStyleIcon(item)
-				item.styleIconText = this.setStyleIconText(item)
-				item.styleRightIcon = this.setStyleRightIcon(item)
-			},
-			/**
-			 * 获取 class
-			 */
-			getClasses(item, name, type = '') {
-				let classes = []
-				item.disabled && classes.push('is-' + name + '-disabled' + type)
-				item.selected && classes.push('is-' + name + '-checked' + type)
-
-				if (this.mode !== 'button' || name === 'button') {
-					item.selected && item.disabled && classes.push('is-' + name + '-disabled-checked' + type)
-				}
-
-				return classes
-			},
-			/**
-			 * 获取选中值
-			 * @param {Object} range
-			 */
-			getSelectedValue(range) {
-				if (!this.multiple) return this.value
-				let selectedArr = []
-				range.forEach((item) => {
-					if (item.selected) {
-						selectedArr.push(item.value)
-					}
-				})
-				return this.value.length > 0 ? this.value : selectedArr
-			},
-
-			/**
-			 * 设置背景样式
-			 */
-			setStyleBackgroud(item) {
-				let styles = {}
-
-				if (item.selected) {
-					if (this.mode !== 'list') {
-						styles.borderColor = this.styles.selectedColor
-					}
-					if (this.mode === 'tag') {
-						styles.backgroundColor = this.styles.selectedColor
-					}
-				}
-				return styles
-			},
-			setStyleIcon(item) {
-				let styles = {}
-
-				if (item.selected) {
-					styles.backgroundColor = this.styles.selectedColor
-					styles.borderColor = this.styles.selectedColor
-				}
-				return styles
-			},
-			setStyleIconText(item) {
-				let styles = {}
-				if (item.selected) {
-					if (this.styles.selectedTextColor) {
-						styles.color = this.styles.selectedTextColor
-					} else {
-						if (this.mode === 'tag') {
-							styles.color = '#fff'
-						} else {
-							styles.color = this.styles.selectedColor
-						}
-					}
-				}
-				return styles
-			},
-			setStyleRightIcon(item) {
-				let styles = {}
-				if (item.selected) {
-					if (this.mode === 'list') {
-						styles.borderColor = this.styles.selectedColor
-					}
-				}
-
-				return styles
-			}
-		}
-	}
-</script>
-
-<style scoped>
-	@charset "UTF-8";
-
-	.uni-data-checklist {
-		position: relative;
-		z-index: 0;
-		/* min-height: 36px; */
-	}
-
-	.uni-data-loading {
-		display: flex;
-		align-items: center;
-		/* justify-content: center; */
-		height: 36px;
-		padding-left: 10px;
-	}
-
-	.checklist-group {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		flex-wrap: wrap;
-	}
-
-	.checklist-box {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		align-items: center;
-		margin: 5px 0;
-		margin-right: 25px;
-	}
-
-	.checklist-text {
-		font-size: 14px;
-		color: #333;
-		margin-left: 5px;
-		transition: color 0.2s;
-	}
-
-	.is-button {
-		margin-right: 10px;
-		padding: 3px 15px;
-		border: 1px #DCDFE6 solid;
-		border-radius: 3px;
-		transition: border-color 0.2s;
-	}
-
-	.is-list {
-		flex-direction: column;
-	}
-
-	.is-list-box {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		padding: 10px 15px;
-		padding-left: 0;
-		margin: 0;
-	}
-
-	.checklist-content {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex: 1;
-		flex-direction: row;
-		align-items: center;
-		justify-content: space-between;
-	}
-
-	.list-content {
-		margin-left: 5px;
-	}
-
-	.is-list-multiple-box {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		padding: 10px 15px;
-		padding-left: 0;
-		margin: 0;
-	}
-
-	.is-list-border {
-		border-top: 1px #eee solid;
-	}
-
-	.is-tag {
-		margin-right: 10px;
-		padding: 3px 10px;
-		border: 1px #eee solid;
-		border-radius: 3px;
-		background-color: #f5f5f5;
-		/* transition: border-color 0.1s; */
-	}
-
-	.is-tag-text {
-		margin: 0;
-		color: #666;
-	}
-
-	.checkbox__inner {
-		flex-shrink: 0;
-		position: relative;
-		border: 1px solid #DCDFE6;
-		border-radius: 2px;
-		box-sizing: border-box;
-		width: 16px;
-		height: 16px;
-		background-color: #fff;
-		z-index: 1;
-		transition: border-color 0.1s;
-	}
-
-	.checkbox__inner-icon {
-		border: 1px solid #fff;
-		border-left: 0;
-		border-top: 0;
-		height: 8px;
-		left: 5px;
-		position: absolute;
-		top: 1px;
-		width: 3px;
-		opacity: 0;
-		transition: transform .2s;
-		transform-origin: center;
-		transform: rotate(40deg) scaleY(0.4);
-	}
-
-	.radio__inner {
-		flex-shrink: 0;
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		justify-content: center;
-		align-items: center;
-		position: relative;
-		border: 1px solid #DCDFE6;
-		border-radius: 2px;
-		box-sizing: border-box;
-		width: 16px;
-		height: 16px;
-		border-radius: 16px;
-		background-color: #fff;
-		z-index: 1;
-		transition: border-color .3s;
-	}
-
-	.radio__inner-icon {
-		width: 8px;
-		height: 8px;
-		border-radius: 10px;
-		opacity: 0;
-		transition: transform .3s;
-	}
-
-	.checkobx__list {
-		border: 1px solid #fff;
-		border-left: 0;
-		border-top: 0;
-		height: 12px;
-		width: 6px;
-		transform-origin: center;
-		opacity: 0;
-		transition: all 0.3s;
-		transform: rotate(45deg);
-	}
-
-	/* 禁用样式 */
-	.is-default-disabled-bg {
-		background-color: #F2F6FC;
-		border-color: #DCDFE6;
-		/* #ifdef H5 */
-		cursor: not-allowed;
-		/* #endif */
-	}
-
-	.is-default-multiple-disabled-bg {
-		background-color: #F2F6FC;
-		border-color: #DCDFE6;
-		/* #ifdef H5 */
-		cursor: not-allowed;
-		/* #endif */
-	}
-
-	.is-default-disabled {
-		border-color: #F2F6FC;
-	}
-
-	.is-default-multiple-disabled {
-		border-color: #F2F6FC;
-	}
-
-	.is-list-disabled {
-		/* #ifdef H5 */
-		cursor: not-allowed;
-		/* #endif */
-		color: #999;
-	}
-
-	.is-list-disabled-checked {
-		color: #a1dcc1;
-	}
-
-	.is-button-disabled {
-		/* #ifdef H5 */
-		cursor: not-allowed;
-		/* #endif */
-		border-color: #EBEEF5;
-	}
-
-	.is-button-text-disabled {
-		color: #C0C4CC;
-	}
-
-	.is-button-disabled-checked {
-		border-color: #a1dcc1;
-	}
-
-	.is-tag-disabled {
-		/* #ifdef H5 */
-		cursor: not-allowed;
-		/* #endif */
-		border-color: #e9e9eb;
-		background-color: #f4f4f5;
-	}
-
-	.is-tag-text-disabled {
-		color: #bcbec2;
-	}
-
-	/* 选中样式 */
-	.is-default-checked-bg {
-		border-color: #007aff;
-	}
-
-	.is-default-multiple-checked-bg {
-		border-color: #007aff;
-		background-color: #007aff;
-	}
-
-	.is-default-checked {
-		opacity: 1;
-		background-color: #007aff;
-		transform: rotate(45deg) scaleY(1);
-	}
-
-	.is-default-multiple-checked {
-		opacity: 1;
-		transform: rotate(45deg) scaleY(1);
-	}
-
-	.is-default-disabled-checked-bg {
-		opacity: 0.4;
-	}
-
-	.is-default-multiple-disabled-checked-bg {
-		opacity: 0.4;
-	}
-
-	.is-default-checked-list {
-		border-color: #007aff;
-		opacity: 1;
-		transform: rotate(45deg) scaleY(1);
-	}
-
-	.is-default-multiple-checked-list {
-		border-color: #007aff;
-		opacity: 1;
-		transform: rotate(45deg) scaleY(1);
-	}
-
-	.is-list-disabled-checked {
-		opacity: 0.4;
-	}
-
-	.is-default-disabled-checked-list {
-		opacity: 0.4;
-	}
-
-	.is-default-multiple-disabled-checked-list {
-		opacity: 0.4;
-	}
-
-	.is-button-checked {
-		border-color: #007aff;
-	}
-
-	.is-button-disabled-checked {
-		opacity: 0.4;
-	}
-
-	.is-list-checked {
-		color: #007aff;
-	}
-
-	.is-tag-checked {
-		border-color: #007aff;
-		background-color: #007aff;
-	}
-
-	.is-tag-text-checked {
-		color: #fff;
-	}
-
-	.is-tag-disabled-checked {
-		opacity: 0.4;
-	}
-
-	.disabled-cursor {
-		/* #ifdef H5 */
-		cursor: not-allowed;
-		/* #endif */
-	}
-
-	.is-wrap {
-		flex-direction: column;
-	}
-
-	.hidden {
-		/* #ifdef MP-ALIPAY */
-		display: none;
-		/* #endif */
-	}
-</style>

+ 0 - 56
components/uni-easyinput/common.js

@@ -1,56 +0,0 @@
-/**
- * @desc 函数防抖
- * @param func 目标函数
- * @param wait 延迟执行毫秒数
- * @param immediate true - 立即执行, false - 延迟执行
- */
-export const debounce = function(func, wait = 1000, immediate = true) {
-	let timer;
-	console.log(1);
-	return function() {
-		console.log(123);
-		let context = this,
-			args = arguments;
-		if (timer) clearTimeout(timer);
-		if (immediate) {
-			let callNow = !timer;
-			timer = setTimeout(() => {
-				timer = null;
-			}, wait);
-			if (callNow) func.apply(context, args);
-		} else {
-			timer = setTimeout(() => {
-				func.apply(context, args);
-			}, wait)
-		}
-	}
-}
-/**
- * @desc 函数节流
- * @param func 函数
- * @param wait 延迟执行毫秒数
- * @param type 1 使用表时间戳,在时间段开始的时候触发 2 使用表定时器,在时间段结束的时候触发
- */
-export const throttle = (func, wait = 1000, type = 1) => {
-	let previous = 0;
-	let timeout;
-	return function() {
-		let context = this;
-		let args = arguments;
-		if (type === 1) {
-			let now = Date.now();
-
-			if (now - previous > wait) {
-				func.apply(context, args);
-				previous = now;
-			}
-		} else if (type === 2) {
-			if (!timeout) {
-				timeout = setTimeout(() => {
-					timeout = null;
-					func.apply(context, args)
-				}, wait)
-			}
-		}
-	}
-}

+ 0 - 409
components/uni-easyinput/uni-easyinput.vue

@@ -1,409 +0,0 @@
-<template>
-	<view class="uni-easyinput" :class="{'uni-easyinput-error':msg}" :style="{color:inputBorder && msg?'#dd524d':styles.color}">
-		<view class="uni-easyinput__content" :class="{'is-input-border':inputBorder ,'is-input-error-border':inputBorder && msg,'is-textarea':type==='textarea','is-disabled':disabled}" :style="{'border-color':inputBorder && msg?'#dd524d':styles.borderColor,'background-color':disabled?styles.disableColor:'#fff'}">
-			<uni-icons v-if="prefixIcon" class="content-clear-icon" :type="prefixIcon" color="#c0c4cc" @click="onClickIcon('prefix')"></uni-icons>
-			<textarea v-if="type === 'textarea'" class="uni-easyinput__content-textarea" :class="{'input-padding':inputBorder}" :name="name" :value="val" :placeholder="placeholder" :placeholderStyle="placeholderStyle" :disabled="disabled" :maxlength="inputMaxlength" :focus="focused" :autoHeight="autoHeight" @input="onInput" @blur="onBlur" @focus="onFocus" @confirm="onConfirm"></textarea>
-			<input v-else :type="type === 'password'?'text':type" class="uni-easyinput__content-input" :style="{
-				 'padding-right':type === 'password' ||clearable || prefixIcon?'':'10px',
-				 'padding-left':prefixIcon?'':'10px'
-			 }" :name="name" :value="val" :password="!showPassword && type === 'password'" :placeholder="placeholder" :placeholderStyle="placeholderStyle" :disabled="disabled" :maxlength="inputMaxlength" :focus="focused" @focus="onFocus" @blur="onBlur" @input="onInput" @confirm="onConfirm" />
-			<template v-if="type === 'password'">
-				<uni-icons v-if="val != '' " class="content-clear-icon" :class="{'is-textarea-icon':type==='textarea'}" :type="showPassword?'eye-slash-filled':'eye-filled'" :size="18" color="#c0c4cc" @click="onEyes"></uni-icons>
-			</template>
-			<template v-else-if="suffixIcon">
-				<uni-icons v-if="suffixIcon" class="content-clear-icon" :type="suffixIcon" color="#c0c4cc" @click="onClickIcon('suffix')"></uni-icons>
-			</template>
-			<template v-else>
-				<uni-icons class="content-clear-icon" :class="{'is-textarea-icon':type==='textarea'}" type="clear" :size="clearSize" v-if="clearable && focused && val " color="#c0c4cc" @click="onClear"></uni-icons>
-			</template>
-			<slot name="right"></slot>
-		</view>
-	</view>
-</template>
-
-<script>
-	/**
-	 * Field 输入框
-	 * @description 此组件可以实现表单的输入与校验,包括 "text" 和 "textarea" 类型。
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=21001
-	 * @property {String| Number} 	value 		输入内容
-	 * @property {String } 	type 							输入框的类型(默认text) password/text/textarea/..
-	 * 	@value text				文本输入键盘
-	 * 	@value textarea 	多行文本输入键盘
-	 * 	@value password 	密码输入键盘
-	 * 	@value number			数字输入键盘,注意iOS上app-vue弹出的数字键盘并非9宫格方式
-	 * 	@value idcard			身份证输入键盘,信、支付宝、百度、QQ小程序
-	 * 	@value digit			带小数点的数字键盘	,App的nvue页面、微信、支付宝、百度、头条、QQ小程序支持
-	 * @property {Boolean} 	clearable 				是否显示右侧清空内容的图标控件(输入框有内容,且获得焦点时才显示),点击可清空输入框内容(默认true)
-	 * @property {Boolean} 	autoHeight 				是否自动增高输入区域,type为textarea时有效(默认true)
-	 * @property {String } 	placeholder 			输入框的提示文字
-	 * @property {String } 	placeholderStyle 	placeholder的样式(内联样式,字符串),如"color: #ddd"
-	 * @property {Boolean} 	focus 						是否自动获得焦点(默认false)
-	 * @property {Boolean} 	disabled 					是否不可输入(默认false)
-	 * @property {Number } 	maxlength 				最大输入长度,设置为 -1 的时候不限制最大长度(默认140)
-	 * @property {String } 	confirmType 			设置键盘右下角按钮的文字,仅在type="text"时生效(默认done)
-	 * @property {Number } 	clearSize 				清除图标的大小,单位px(默认15)
-	 * @property {String} 	prefixIcon				输入框头部图标
-	 * @property {String} 	suffixIcon				输入框尾部图标
-	 * @property {Boolean} 	trim 							是否自动去除两端的空格
-	 * @value both	去除两端空格
-	 * @value left	去除左侧空格
-	 * @value right	去除右侧空格
-	 * @value start	去除左侧空格
-	 * @value end		去除右侧空格
-	 * @value all		去除全部空格
-	 * @value none	不去除空格
-	 * @property {Boolean} 	inputBorder 			是否显示input输入框的边框(默认false)
-	 * @property {Object} 	styles 						自定义颜色
-	 * @event {Function} 		input 						输入框内容发生变化时触发
-	 * @event {Function} 		focus 						输入框获得焦点时触发
-	 * @event {Function} 		blur 							输入框失去焦点时触发
-	 * @event {Function} 		confirm 					点击完成按钮时触发
-	 * @event {Function} 		iconClick 				点击图标时触发
-	 * @example <uni-easyinput v-model="mobile"></uni-easyinput>
-	 */
-
-	import {
-		debounce,
-		throttle
-	} from './common.js'
-
-	export default {
-		name: 'uni-easyinput',
-		props: {
-			name: String,
-			value: [Number, String],
-			type: {
-				type: String,
-				default: 'text'
-			},
-			clearable: {
-				type: Boolean,
-				default: true
-			},
-			autoHeight: {
-				type: Boolean,
-				default: false
-			},
-			placeholder: String,
-			placeholderStyle: String,
-			focus: {
-				type: Boolean,
-				default: false
-			},
-			disabled: {
-				type: Boolean,
-				default: false
-			},
-			maxlength: {
-				type: [Number, String],
-				default: 140
-			},
-			confirmType: {
-				type: String,
-				default: 'done'
-			},
-			// 清除按钮的大小
-			clearSize: {
-				type: [Number, String],
-				default: 15
-			},
-			// 是否显示 input 边框
-			inputBorder: {
-				type: Boolean,
-				default: true
-			},
-			prefixIcon: {
-				type: String,
-				default: ''
-			},
-			suffixIcon: {
-				type: String,
-				default: ''
-			},
-			// 是否自动去除两端的空格
-			trim: {
-				type: [Boolean, String],
-				default: true
-			},
-			// 自定义样式
-			styles: {
-				type: Object,
-				default () {
-					return {
-						color: '#333',
-						disableColor: '#eee',
-						borderColor: '#e5e5e5'
-					}
-				}
-			}
-		},
-		data() {
-			return {
-				focused: false,
-				errMsg: '',
-				val: '',
-				showMsg: '',
-				border: false,
-				isFirstBorder: false,
-				showClearIcon: false,
-				showPassword: false
-			};
-		},
-		computed: {
-			msg() {
-				return this.errorMessage || this.errMsg;
-			},
-			// 因为uniapp的input组件的maxlength组件必须要数值,这里转为数值,给用户可以传入字符串数值
-			inputMaxlength() {
-				return Number(this.maxlength);
-			},
-		},
-		watch: {
-			value(newVal) {
-				if (this.errMsg) this.errMsg = ''
-				this.val = newVal
-				if (this.form && this.formItem) {
-					this.formItem.setValue(newVal)
-				}
-			},
-			focus(newVal) {
-				this.$nextTick(() => {
-					this.focused = this.focus
-				})
-			}
-		},
-		created() {
-			this.val = this.value
-			this.form = this.getForm('uniForms')
-			this.formItem = this.getForm('uniFormsItem')
-			if (this.form && this.formItem) {
-				if (this.formItem.name) {
-					this.rename = this.formItem.name
-					this.form.inputChildrens.push(this)
-				}
-			}
-		},
-		mounted() {
-			// this.onInput = throttle(this.input, 500)
-			this.$nextTick(() => {
-				// setTimeout(()=>{
-				// },1000)
-				this.focused = this.focus
-			})
-		},
-		methods: {
-			/**
-			 * 初始化变量值
-			 */
-			init() {
-
-			},
-			onClickIcon(type) {
-				this.$emit('iconClick', type)
-			},
-			/**
-			 * 获取父元素实例
-			 */
-			getForm(name = 'uniForms') {
-				let parent = this.$parent;
-				let parentName = parent.$options.name;
-				while (parentName !== name) {
-					parent = parent.$parent;
-					if (!parent) return false;
-					parentName = parent.$options.name;
-				}
-				return parent;
-			},
-
-			onEyes() {
-				this.showPassword = !this.showPassword
-			},
-			onInput(event) {
-				let value = event.detail.value;
-				// 判断是否去除空格
-				if (this.trim) {
-					if (typeof(this.trim) === 'boolean' && this.trim) {
-						value = this.trimStr(value)
-					}
-					if (typeof(this.trim) === 'string') {
-						value = this.trimStr(value, this.trim)
-					}
-				};
-				if (this.errMsg) this.errMsg = ''
-				this.val = value
-				this.$emit('input', value);
-			},
-
-			onFocus(event) {
-				// this.focused = true;
-				this.$emit('focus', event);
-			},
-			onBlur(event) {
-				let value = event.detail.value;
-				// setTimeout(() => {
-				// this.focused = false;
-				// }, 100);
-				this.$emit('blur', event);
-			},
-			onConfirm(e) {
-				this.$emit('confirm', e.detail.value);
-			},
-			onClear(event) {
-				this.val = '';
-				this.$emit('input', '');
-			},
-			fieldClick() {
-				this.$emit('click');
-			},
-			trimStr(str, pos = 'both') {
-				if (pos === 'both') {
-					return str.trim();
-				} else if (pos === 'left') {
-					return str.trimLeft();
-				} else if (pos === 'right') {
-					return str.trimRight();
-				} else if (pos === 'start') {
-					return str.trimStart()
-				} else if (pos === 'end') {
-					return str.trimEnd()
-				} else if (pos === 'all') {
-					return str.replace(/\s+/g, '');
-				} else if (pos === 'none') {
-					return str;
-				}
-				return str;
-			}
-		}
-	};
-</script>
-
-<style scoped>
-	.uni-easyinput {
-		/* #ifndef APP-NVUE */
-		width: 100%;
-		/* #endif */
-		flex: 1;
-		position: relative;
-		text-align: left;
-		color: #333;
-		font-size: 14px;
-	}
-
-	.uni-easyinput__content {
-		flex: 1;
-		/* #ifndef APP-NVUE */
-		width: 100%;
-		display: flex;
-		box-sizing: border-box;
-		min-height: 36px;
-		/* #endif */
-		flex-direction: row;
-		align-items: center;
-	}
-
-	.uni-easyinput__content-input {
-		/* #ifndef APP-NVUE */
-		width: auto;
-		/* #endif */
-		position: relative;
-		overflow: hidden;
-		flex: 1;
-		line-height: 2;
-		font-size: 14px;
-	}
-
-	.is-textarea {
-		align-items: flex-start;
-	}
-
-	.is-textarea-icon {
-		margin-top: 5px;
-	}
-
-	.uni-easyinput__content-textarea {
-		position: relative;
-		overflow: hidden;
-		flex: 1;
-		line-height: 1.5;
-		font-size: 14px;
-		padding-top: 6px;
-		padding-bottom: 10px;
-		height: 80px;
-		/* #ifndef APP-NVUE */
-		min-height: 80px;
-		width: auto;
-		/* #endif */
-	}
-
-	.input-padding {
-		padding-left: 10px;
-	}
-
-	.content-clear-icon {
-		padding: 0 5px;
-	}
-
-	.label-icon {
-		margin-right: 5px;
-		margin-top: -1px;
-	}
-
-	.is-input-border {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		box-sizing: border-box;
-		/* #endif */
-		flex-direction: row;
-		align-items: center;
-		border: 1px solid #e5e5e5;
-		border-radius: 4px;
-	}
-
-	.is-required {
-		color: #dd524d;
-	}
-
-	.uni-error-message {
-		position: absolute;
-		bottom: -17px;
-		left: 0;
-		line-height: 12px;
-		color: #dd524d;
-		font-size: 12px;
-		text-align: left;
-	}
-
-	.uni-error-msg--boeder {
-		position: relative;
-		bottom: 0;
-		line-height: 22px;
-	}
-
-	.is-input-error-border {
-		border-color: #dd524d;
-	}
-
-	.uni-easyinput--border {
-		margin-bottom: 0;
-		padding: 10px 15px;
-		border-top: 1px #eee solid;
-	}
-
-	.uni-easyinput-error {
-		padding-bottom: 0;
-	}
-
-	.is-first-border {
-		/* #ifndef APP-NVUE */
-		border: none;
-		/* #endif */
-		/* #ifdef APP-NVUE */
-		border-width: 0;
-		/* #endif */
-	}
-
-	.is-disabled {
-		background-color: #eee;
-	}
-</style>

+ 0 - 32
components/uni-status-bar/uni-status-bar.vue

@@ -1,32 +0,0 @@
-<template>
-	<view class="uni-status-bar" :style="{ height: statusBarHeight,background:bgcolor}">
-		<slot></slot>
-	</view>
-</template>
-
-<script>
-	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
-	export default {
-		name: 'uni-status-bar',
-		props:{
-			bgcolor:{
-				type:String,
-				default:''
-			}
-		},
-		data() {
-			return {
-				statusBarHeight: statusBarHeight
-			};
-		}
-	};
-</script>
-
-<style>
-	.uni-status-bar {
-		display: block;
-		width: 100%;
-		height: 20px;
-		height: var(--status-bar-height);
-	}
-</style>

+ 0 - 292
components/uni-swipe-action-item/bindingx.js

@@ -1,292 +0,0 @@
-const BindingX = uni.requireNativePlugin('bindingx');
-const dom = uni.requireNativePlugin('dom');
-const animation = uni.requireNativePlugin('animation');
-
-export default {
-	data() {
-		return {}
-	},
-
-	watch: {
-		show(newVal) {
-			if (this.autoClose) return
-			if (this.stop) return
-			this.stop = true
-			if (newVal) {
-				this.open(newVal)
-			} else {
-				this.close()
-			}
-		},
-		leftOptions() {
-			this.getSelectorQuery()
-			this.init()
-		},
-		rightOptions(newVal) {
-			this.init()
-		}
-	},
-	created() {
-		if (this.swipeaction.children !== undefined) {
-			this.swipeaction.children.push(this)
-		}
-	},
-	mounted() {
-		this.box = this.getEl(this.$refs['selector-box--hock'])
-		this.selector = this.getEl(this.$refs['selector-content--hock']);
-		this.leftButton = this.getEl(this.$refs['selector-left-button--hock']);
-		this.rightButton = this.getEl(this.$refs['selector-right-button--hock']);
-		this.init()
-	},
-	beforeDestroy() {
-		this.swipeaction.children.forEach((item, index) => {
-			if (item === this) {
-				this.swipeaction.children.splice(index, 1)
-			}
-		})
-	},
-	methods: {
-		init() {
-			this.$nextTick(() => {
-				this.x = 0
-				this.button = {
-					show: false
-				}
-				setTimeout(() => {
-					this.getSelectorQuery()
-				}, 200)
-			})
-		},
-		onClick(index, item, position) {
-			this.$emit('click', {
-				content: item,
-				index,
-				position
-			})
-		},
-		touchstart(e) {
-			// 每次只触发一次,避免多次监听造成闪烁
-			if (this.stop) return
-			this.stop = true
-			if (this.autoClose) {
-				this.swipeaction.closeOther(this)
-			}
-				
-			const leftWidth = this.button.left.width
-			const rightWidth = this.button.right.width
-			let expression = this.range(this.x, -rightWidth, leftWidth)
-			let leftExpression = this.range(this.x - leftWidth, -leftWidth, 0)
-			let rightExpression = this.range(this.x + rightWidth, 0, rightWidth)
-
-			this.eventpan = BindingX.bind({
-				anchor: this.box,
-				eventType: 'pan',
-				props: [{
-					element: this.selector,
-					property: 'transform.translateX',
-					expression
-				}, {
-					element: this.leftButton,
-					property: 'transform.translateX',
-					expression: leftExpression
-				}, {
-					element: this.rightButton,
-					property: 'transform.translateX',
-					expression: rightExpression
-				}, ]
-			}, (e) => {
-				// nope
-				if (e.state === 'end') {
-					this.x = e.deltaX + this.x;
-					this.isclick = true
-					this.bindTiming(e.deltaX)
-				}
-			});
-		},
-		touchend(e) {
-			if (this.isopen !== 'none' && !this.isclick) {
-				this.open('none')
-			}
-		},
-		bindTiming(x) {
-			const left = this.x
-			const leftWidth = this.button.left.width
-			const rightWidth = this.button.right.width
-			const threshold = this.threshold
-			if (!this.isopen || this.isopen === 'none') {
-				if (left > threshold) {
-					this.open('left')
-				} else if (left < -threshold) {
-					this.open('right')
-				} else {
-					this.open('none')
-				}
-			} else {
-				if ((x > -leftWidth && x < 0) || x > rightWidth) {
-					if ((x > -threshold && x < 0) || (x - rightWidth > threshold)) {
-						this.open('left')
-					} else {
-						this.open('none')
-					}
-				} else {
-					if ((x < threshold && x > 0) || (x + leftWidth < -threshold)) {
-						this.open('right')
-					} else {
-						this.open('none')
-					}
-				}
-			}
-		},
-
-		/**
-		 * 移动范围
-		 * @param {Object} num
-		 * @param {Object} mix
-		 * @param {Object} max
-		 */
-		range(num, mix, max) {
-			return `min(max(x+${num}, ${mix}), ${max})`
-		},
-
-		/**
-		 * 开启swipe
-		 */
-		open(type) {
-			this.animation(type)
-		},
-
-		/**
-		 * 关闭swipe
-		 */
-		close() {
-			this.animation('none')
-		},
-
-		/**
-		 * 开启关闭动画
-		 * @param {Object} type
-		 */
-		animation(type) {
-			const time = 300
-			const leftWidth = this.button.left.width
-			const rightWidth = this.button.right.width
-			if (this.eventpan && this.eventpan.token) {
-				BindingX.unbind({
-					token: this.eventpan.token,
-					eventType: 'pan'
-				})
-			}
-
-			switch (type) {
-				case 'left':
-					Promise.all([
-						this.move(this.selector, leftWidth),
-						this.move(this.leftButton, 0),
-						this.move(this.rightButton, rightWidth * 2)
-					]).then(() => {
-						this.setEmit(leftWidth, type)
-					})
-					break
-				case 'right':
-					Promise.all([
-						this.move(this.selector, -rightWidth),
-						this.move(this.leftButton, -leftWidth * 2),
-						this.move(this.rightButton, 0)
-					]).then(() => {
-						this.setEmit(-rightWidth, type)
-					})
-					break
-				default:
-					Promise.all([
-						this.move(this.selector, 0),
-						this.move(this.leftButton, -leftWidth),
-						this.move(this.rightButton, rightWidth)
-					]).then(() => {
-						this.setEmit(0, type)
-					})
-
-			}
-		},
-		setEmit(x, type) {
-			const leftWidth = this.button.left.width
-			const rightWidth = this.button.right.width
-			this.isopen = this.isopen || 'none'
-			this.stop = false
-			this.isclick = false
-			// 只有状态不一致才会返回结果
-			if (this.isopen !== type && this.x !== x) {
-				if (type === 'left' && leftWidth > 0) {
-					this.$emit('change', 'left')
-				}
-				if (type === 'right' && rightWidth > 0) {
-					this.$emit('change', 'right')
-				}
-				if (type === 'none') {
-					this.$emit('change', 'none')
-				}
-			}
-			this.x = x
-			this.isopen = type
-		},
-		move(ref, value) {
-			return new Promise((resolve, reject) => {
-				animation.transition(ref, {
-					styles: {
-						transform: `translateX(${value})`,
-					},
-					duration: 150, //ms
-					timingFunction: 'linear',
-					needLayout: false,
-					delay: 0 //ms
-				}, function(res) {
-					resolve(res)
-				})
-			})
-
-		},
-
-		/**
-		 * 获取ref
-		 * @param {Object} el
-		 */
-		getEl(el) {
-			return el.ref
-		},
-		/**
-		 * 获取节点信息
-		 */
-		getSelectorQuery() {
-			Promise.all([
-				this.getDom('left'),
-				this.getDom('right'),
-			]).then((data) => {
-				let show = 'none'
-				if (this.autoClose) {
-					show = 'none'
-				} else {
-					show = this.show
-				}
-
-				if (show === 'none') {
-					// this.close()
-				} else {
-					this.open(show)
-				}
-
-			})
-
-		},
-		getDom(str) {
-			return new Promise((resolve, reject) => {
-				dom.getComponentRect(this.$refs[`selector-${str}-button--hock`], (data) => {
-					if (data) {
-						this.button[str] = data.size
-						resolve(data)
-					} else {
-						reject()
-					}
-				})
-			})
-		}
-	}
-}

+ 0 - 318
components/uni-swipe-action-item/index.wxs

@@ -1,318 +0,0 @@
-var MIN_DISTANCE = 10;
-
-/**
- * 监听页面内值的变化,主要用于动态开关swipe-action
- * @param {Object} newValue
- * @param {Object} oldValue
- * @param {Object} ownerInstance
- * @param {Object} instance
- */
-function sizeReady(newValue, oldValue, ownerInstance, instance) {
-	var state = instance.getState()
-	var buttonPositions = JSON.parse(newValue)
-	if (!buttonPositions || !buttonPositions.data || buttonPositions.data.length === 0) return
-	state.leftWidth = buttonPositions.data[0].width
-	state.rightWidth = buttonPositions.data[1].width
-	state.threshold = instance.getDataset().threshold
-
-	if (buttonPositions.show && buttonPositions.show !== 'none') {
-		openState(buttonPositions.show, instance, ownerInstance)
-		return
-	}
-
-	if (state.left) {
-		openState('none', instance, ownerInstance)
-	}
-	resetTouchStatus(instance)
-}
-
-/**
- * 开始触摸操作
- * @param {Object} e
- * @param {Object} ins
- */
-function touchstart(e, ins) {
-	var instance = e.instance;
-	var disabled = instance.getDataset().disabled
-	var state = instance.getState();
-	// fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复
-	disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false;
-	if (disabled) return
-	// 开始触摸时移除动画类
-	instance.requestAnimationFrame(function() {
-		instance.removeClass('ani');
-		ins.callMethod('closeSwipe');
-	})
-
-	// 记录上次的位置
-	state.x = state.left || 0
-	// 计算滑动开始位置
-	stopTouchStart(e, ins)
-}
-
-/**
- * 开始滑动操作
- * @param {Object} e
- * @param {Object} ownerInstance
- */
-function touchmove(e, ownerInstance) {
-	var instance = e.instance;
-	var disabled = instance.getDataset().disabled
-	var state = instance.getState()
-	// fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复
-	disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false;
-	if (disabled) return
-	// 是否可以滑动页面
-	stopTouchMove(e);
-	if (state.direction !== 'horizontal') {
-		return;
-	}
-
-	if (e.preventDefault) {
-		// 阻止页面滚动
-		e.preventDefault()
-	}
-
-	move(state.x + state.deltaX, instance, ownerInstance)
-}
-
-/**
- * 结束触摸操作
- * @param {Object} e
- * @param {Object} ownerInstance
- */
-function touchend(e, ownerInstance) {
-	var instance = e.instance;
-	var disabled = instance.getDataset().disabled
-	var state = instance.getState()
-	// fix by mehaotian, TODO 兼容 app-vue 获取dataset为字符串 , h5 获取 为 undefined 的问题,待框架修复
-	disabled = (typeof(disabled) === 'string' ? JSON.parse(disabled) : disabled) || false;
-
-	if (disabled) return
-	// 滑动过程中触摸结束,通过阙值判断是开启还是关闭
-	// fixed by mehaotian 定时器解决点击按钮,touchend 触发比 click 事件时机早的问题 ,主要是 ios13
-	moveDirection(state.left, instance, ownerInstance)
-
-}
-
-/**
- * 设置移动距离
- * @param {Object} value
- * @param {Object} instance
- * @param {Object} ownerInstance
- */
-function move(value, instance, ownerInstance) {
-	value = value || 0
-	var state = instance.getState()
-	var leftWidth = state.leftWidth
-	var rightWidth = state.rightWidth
-	// 获取可滑动范围
-	state.left = range(value, -rightWidth, leftWidth);
-	instance.requestAnimationFrame(function() {
-		instance.setStyle({
-			transform: 'translateX(' + state.left + 'px)',
-			'-webkit-transform': 'translateX(' + state.left + 'px)'
-		})
-	})
-
-}
-
-/**
- * 获取范围
- * @param {Object} num
- * @param {Object} min
- * @param {Object} max
- */
-function range(num, min, max) {
-	return Math.min(Math.max(num, min), max);
-}
-
-
-/**
- * 移动方向判断
- * @param {Object} left
- * @param {Object} value
- * @param {Object} ownerInstance
- * @param {Object} ins
- */
-function moveDirection(left, ins, ownerInstance) {
-	var state = ins.getState()
-	var threshold = state.threshold
-	var position = state.position
-	var isopen = state.isopen || 'none'
-	var leftWidth = state.leftWidth
-	var rightWidth = state.rightWidth
-	if (state.deltaX === 0) {
-		openState('none', ins, ownerInstance)
-		return
-	}
-	if ((isopen === 'none' && rightWidth > 0 && -left > threshold) || (isopen !== 'none' && rightWidth > 0 && rightWidth +
-			left < threshold)) {
-		// right
-		openState('right', ins, ownerInstance)
-	} else if ((isopen === 'none' && leftWidth > 0 && left > threshold) || (isopen !== 'none' && leftWidth > 0 &&
-			leftWidth - left < threshold)) {
-		// left
-		openState('left', ins, ownerInstance)
-	} else {
-		// default
-		openState('none', ins, ownerInstance)
-	}
-}
-
-
-/**
- * 开启状态
- * @param {Boolean} type
- * @param {Object} ins
- * @param {Object} ownerInstance
- */
-function openState(type, ins, ownerInstance) {
-	var state = ins.getState()
-	var position = state.position
-	var leftWidth = state.leftWidth
-	var rightWidth = state.rightWidth
-	var left = ''
-	state.isopen = state.isopen ? state.isopen : 'none'
-	switch (type) {
-		case "left":
-			left = leftWidth
-			break
-		case "right":
-			left = -rightWidth
-			break
-		default:
-			left = 0
-	}
-
-	// && !state.throttle
-
-	if (state.isopen !== type) {
-		state.throttle = true
-		ownerInstance.callMethod('change', {
-			open: type
-		})
-
-	}
-
-	state.isopen = type
-	// 添加动画类
-	ins.requestAnimationFrame(function() {
-		ins.addClass('ani');
-		move(left, ins, ownerInstance)
-	})
-	// 设置最终移动位置,理论上只要进入到这个函数,肯定是要打开的
-}
-
-
-function getDirection(x, y) {
-	if (x > y && x > MIN_DISTANCE) {
-		return 'horizontal';
-	}
-	if (y > x && y > MIN_DISTANCE) {
-		return 'vertical';
-	}
-	return '';
-}
-
-/**
- * 重置滑动状态
- * @param {Object} event
- */
-function resetTouchStatus(instance) {
-	var state = instance.getState();
-	state.direction = '';
-	state.deltaX = 0;
-	state.deltaY = 0;
-	state.offsetX = 0;
-	state.offsetY = 0;
-}
-
-/**
- * 设置滑动开始位置
- * @param {Object} event
- */
-function stopTouchStart(event) {
-	var instance = event.instance;
-	var state = instance.getState();
-	resetTouchStatus(instance);
-	var touch = event.touches[0];
-	// #ifdef H5
-	if (isPC()) {
-		touch = event;
-	}
-	// #endif
-	state.startX = touch.clientX;
-	state.startY = touch.clientY;
-}
-
-/**
- * 滑动中,是否禁止打开
- * @param {Object} event
- */
-function stopTouchMove(event) {
-	var instance = event.instance;
-	var state = instance.getState();
-	var touch = event.touches[0];
-	// #ifdef H5
-	if (isPC()) {
-		touch = event;
-	}
-	// #endif
-	state.deltaX = touch.clientX - state.startX;
-	state.deltaY = touch.clientY - state.startY;
-	state.offsetY = Math.abs(state.deltaY);
-	state.offsetX = Math.abs(state.deltaX);
-	state.direction = state.direction || getDirection(state.offsetX, state.offsetY);
-}
-
-// #ifdef H5
-function isPC() {
-	var userAgentInfo = navigator.userAgent;
-	var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
-	var flag = true;
-	for (var v = 0; v < Agents.length - 1; v++) {
-		if (userAgentInfo.indexOf(Agents[v]) > 0) {
-			flag = false;
-			break;
-		}
-	}
-	return flag;
-}
-
-var movable = false
-
-function mousedown(e, ins) {
-	if (!isPC()) return
-	touchstart(e, ins)
-	movable = true
-}
-
-function mousemove(e, ins) {
-	if (!isPC()) return
-	if (!movable) return
-	touchmove(e, ins)
-}
-
-function mouseup(e, ins) {
-	if (!isPC()) return
-	touchend(e, ins)
-	movable = false
-}
-
-function mouseleave(e, ins) {
-	if (!isPC()) return
-	movable = false
-}
-// #endif
-
-module.exports = {
-	sizeReady: sizeReady,
-	touchstart: touchstart,
-	touchmove: touchmove,
-	touchend: touchend,
-	mousedown: mousedown,
-	mousemove: mousemove,
-	mouseup: mouseup,
-	mouseleave: mouseleave
-}

+ 0 - 12
components/uni-swipe-action-item/isPC.js

@@ -1,12 +0,0 @@
-export function isPC() {
-	var userAgentInfo = navigator.userAgent;
-	var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
-	var flag = true;
-	for (let v = 0; v < Agents.length - 1; v++) {
-		if (userAgentInfo.indexOf(Agents[v]) > 0) {
-			flag = false;
-			break;
-		}
-	}
-	return flag;
-}

+ 0 - 207
components/uni-swipe-action-item/mpalipay.js

@@ -1,207 +0,0 @@
-export default {
-	data() {
-		return {
-			x: 0,
-			transition: false,
-			width: 0,
-			viewWidth: 0,
-			swipeShow: 0
-		}
-	},
-	watch: {
-		show(newVal) {
-			if (this.autoClose) return
-			if (newVal && newVal !== 'none' ) {
-				this.transition = true
-				this.open(newVal)
-			} else {
-				this.close()
-			}
-		}
-	},
-	created() {
-		if (this.swipeaction.children !== undefined) {
-			this.swipeaction.children.push(this)
-		}
-	},
-
-	beforeDestroy() {
-		this.swipeaction.children.forEach((item, index) => {
-			if (item === this) {
-				this.swipeaction.children.splice(index, 1)
-			}
-		})
-	},
-	mounted() {
-		this.isopen = false
-		setTimeout(() => {
-			this.getQuerySelect()
-		}, 50)
-	},
-	methods: {
-		appTouchStart(e) {
-			const {
-				clientX
-			} = e.changedTouches[0]
-			this.clientX = clientX
-			this.timestamp = new Date().getTime()
-		},
-		appTouchEnd(e, index, item, position) {
-			const {
-				clientX
-			} = e.changedTouches[0]
-			// fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题
-			let diff = Math.abs(this.clientX - clientX)
-			let time = (new Date().getTime()) - this.timestamp
-			if (diff < 40 && time < 300) {
-				this.$emit('click', {
-					content: item,
-					index,
-					position
-				})
-			}
-		},
-		// onClick(index, item, position) {
-		// 	this.$emit('click', {
-		// 		content: item,
-		// 		index,
-		// 		position
-		// 	})
-		// },
-		/**
-		 * 移动触发
-		 * @param {Object} e
-		 */
-		onChange(e) {
-			this.moveX = e.detail.x
-			this.isclose = false
-		},
-		touchstart(e) {
-			this.transition = false
-			this.isclose = true
-			this.autoClose && this.swipeaction.closeOther(this)
-		},
-		touchmove(e) {},
-		touchend(e) {
-			// 0的位置什么都不执行
-			if (this.isclose && this.isopen === 'none') return
-			if (this.isclose && this.isopen !== 'none') {
-				this.transition = true
-				this.close()
-			} else {
-				this.move(this.moveX + this.leftWidth)
-			}
-		},
-
-		/**
-		 * 移动
-		 * @param {Object} moveX
-		 */
-		move(moveX) {
-			// 打开关闭的处理逻辑不太一样
-			this.transition = true
-			// 未打开状态
-			if (!this.isopen || this.isopen === 'none') {
-				if (moveX > this.threshold) {
-					this.open('left')
-				} else if (moveX < -this.threshold) {
-					this.open('right')
-				} else {
-					this.close()
-				}
-			} else {
-				if (moveX < 0 && moveX < this.rightWidth) {
-					const rightX = this.rightWidth + moveX
-					if (rightX < this.threshold) {
-						this.open('right')
-					} else {
-						this.close()
-					}
-				} else if (moveX > 0 && moveX < this.leftWidth) {
-					const leftX = this.leftWidth - moveX
-					if (leftX < this.threshold) {
-						this.open('left')
-					} else {
-						this.close()
-					}
-				}
-
-			}
-
-		},
-
-		/**
-		 * 打开
-		 */
-		open(type) {
-			this.x = this.moveX
-			this.animation(type)
-		},
-
-		/**
-		 * 关闭
-		 */
-		close() {
-			this.x = this.moveX
-			// TODO 解决 x 值不更新的问题,所以会多触发一次 nextTick ,待优化
-			this.$nextTick(() => {
-				this.x = -this.leftWidth
-				if(this.isopen!=='none'){
-					this.$emit('change', 'none')
-				}
-				this.isopen = 'none'
-			})
-		},
-
-		/**
-		 * 执行结束动画
-		 * @param {Object} type
-		 */
-		animation(type) {
-			this.$nextTick(() => {
-				if (type === 'left') {
-					this.x = 0
-				} else {
-					this.x = -this.rightWidth - this.leftWidth
-				}
-				
-				if(this.isopen!==type){
-					this.$emit('change', type)
-				}
-				this.isopen = type
-			})
-
-		},
-		getSlide(x) {},
-		getQuerySelect() {
-			const query = uni.createSelectorQuery().in(this);
-			query.selectAll('.movable-view--hock').boundingClientRect(data => {
-				this.leftWidth = data[1].width
-				this.rightWidth = data[2].width
-				this.width = data[0].width
-				this.viewWidth = this.width + this.rightWidth + this.leftWidth
-				if (this.leftWidth === 0) {
-					// TODO 疑似bug ,初始化的时候如果x 是0,会导致移动位置错误,所以让元素超出一点
-					this.x = -0.1
-				} else {
-					this.x = -this.leftWidth
-				}
-				this.moveX = this.x
-				this.$nextTick(() => {
-					this.swipeShow = 1
-				})
-
-				if (!this.buttonWidth) {
-					this.disabledView = true
-				}
-
-				if (this.autoClose) return
-				if (this.show !== 'none') {
-					this.transition = true
-					this.open(this.shows)
-				}
-			}).exec();
-
-		}
-	}
-}

+ 0 - 252
components/uni-swipe-action-item/mpother.js

@@ -1,252 +0,0 @@
-const MIN_DISTANCE = 10;
-export default {
-	data() {
-		return {
-			uniShow: false,
-			left: 0,
-			buttonShow: 'none',
-			ani: false,
-			moveLeft:''
-		}
-	},
-	watch: {
-		show(newVal) {
-			if (this.autoClose) return
-			this.openState(newVal)
-		},
-		left(){
-			this.moveLeft = `translateX(${this.left}px)`
-		},
-		buttonShow(newVal){
-			if (this.autoClose) return
-			this.openState(newVal)
-		},
-		leftOptions() {
-			this.init()
-		},
-		rightOptions() {
-			this.init()
-		}
-	},
-	mounted() {
-		// this.position = {}
-		if (this.swipeaction.children !== undefined) {
-			this.swipeaction.children.push(this)
-		}
-		this.init()
-	},
-	beforeDestoy() {
-		this.swipeaction.children.forEach((item, index) => {
-			if (item === this) {
-				this.swipeaction.children.splice(index, 1)
-			}
-		})
-	},
-	methods: {
-		init(){
-			clearTimeout(this.timer)
-			this.timer = setTimeout(() => {
-				this.getSelectorQuery()
-			}, 100)
-			// 移动距离
-			this.left = 0
-			this.x = 0
-		},
-		closeSwipe(e) {
-			if (!this.autoClose) return
-			this.swipeaction.closeOther(this)
-		},
-		appTouchStart(e) {
-			const {
-				clientX
-			} = e.changedTouches[0]
-			this.clientX = clientX
-			this.timestamp = new Date().getTime()
-		},
-		appTouchEnd(e, index, item, position) {
-			const {
-				clientX
-			} = e.changedTouches[0]
-			// fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题
-			let diff = Math.abs(this.clientX - clientX)
-			let time = (new Date().getTime()) - this.timestamp
-			if (diff < 40 && time < 300) {
-				this.$emit('click', {
-					content: item,
-					index,
-					position
-				})
-			}
-		},
-		touchstart(e) {
-			if (this.disabled) return
-			this.ani = false
-			this.x = this.left || 0
-			this.stopTouchStart(e)
-			this.autoClose && this.closeSwipe()
-		},
-		touchmove(e) {
-			if (this.disabled) return
-			// 是否可以滑动页面
-			this.stopTouchMove(e);
-			if (this.direction !== 'horizontal') {
-				return;
-			}
-
-			this.move(this.x + this.deltaX)
-		},
-		touchend() {
-			if (this.disabled) return
-			this.moveDirection(this.left)
-		},
-		/**
-		 * 设置移动距离
-		 * @param {Object} value
-		 */
-		move(value) {
-			value = value || 0
-			const leftWidth = this.leftWidth
-			const rightWidth = this.rightWidth
-			// 获取可滑动范围
-			this.left = this.range(value, -rightWidth, leftWidth);
-		},
-
-		/**
-		 * 获取范围
-		 * @param {Object} num
-		 * @param {Object} min
-		 * @param {Object} max
-		 */
-		range(num, min, max) {
-			return Math.min(Math.max(num, min), max);
-		},
-		/**
-		 * 移动方向判断
-		 * @param {Object} left
-		 * @param {Object} value
-		 */
-		moveDirection(left) {
-			const threshold = this.threshold
-			const isopen = this.isopen || 'none'
-			const leftWidth = this.leftWidth
-			const rightWidth = this.rightWidth
-			if (this.deltaX === 0) {
-				this.openState('none')
-				return
-			}
-			if ((isopen === 'none' && rightWidth > 0 && -left > threshold) || (isopen !== 'none' && rightWidth > 0 && rightWidth +
-					left < threshold)) {
-				// right
-				this.openState('right')
-			} else if ((isopen === 'none' && leftWidth > 0 && left > threshold) || (isopen !== 'none' && leftWidth > 0 &&
-					leftWidth - left < threshold)) {
-				// left
-				this.openState('left')
-			} else {
-				// default
-				this.openState('none')
-			}
-		},
-
-		/**
-		 * 开启状态
-		 * @param {Boolean} type
-		 */
-		openState(type) {
-			const leftWidth = this.leftWidth
-			const rightWidth = this.rightWidth
-			let left = ''
-			this.isopen = this.isopen ? this.isopen : 'none'
-			switch (type) {
-				case "left":
-					left = leftWidth
-					break
-				case "right":
-					left = -rightWidth
-					break
-				default:
-					left = 0
-			}
-
-
-			if (this.isopen !== type) {
-				this.throttle = true
-				this.$emit('change', type)
-			}
-
-			this.isopen = type
-			// 添加动画类
-			this.ani = true
-			this.$nextTick(() => {
-				this.move(left)
-			})
-			// 设置最终移动位置,理论上只要进入到这个函数,肯定是要打开的
-		},
-		close() {
-			this.openState('none')
-		},
-		getDirection(x, y) {
-			if (x > y && x > MIN_DISTANCE) {
-				return 'horizontal';
-			}
-			if (y > x && y > MIN_DISTANCE) {
-				return 'vertical';
-			}
-			return '';
-		},
-
-		/**
-		 * 重置滑动状态
-		 * @param {Object} event
-		 */
-		resetTouchStatus() {
-			this.direction = '';
-			this.deltaX = 0;
-			this.deltaY = 0;
-			this.offsetX = 0;
-			this.offsetY = 0;
-		},
-
-		/**
-		 * 设置滑动开始位置
-		 * @param {Object} event
-		 */
-		stopTouchStart(event) {
-			this.resetTouchStatus();
-			const touch = event.touches[0];
-			this.startX = touch.clientX;
-			this.startY = touch.clientY;
-		},
-
-		/**
-		 * 滑动中,是否禁止打开
-		 * @param {Object} event
-		 */
-		stopTouchMove(event) {
-			const touch = event.touches[0];
-			this.deltaX = touch.clientX - this.startX;
-			this.deltaY = touch.clientY - this.startY;
-			this.offsetX = Math.abs(this.deltaX);
-			this.offsetY = Math.abs(this.deltaY);
-			this.direction = this.direction || this.getDirection(this.offsetX, this.offsetY);
-		},
-
-		getSelectorQuery() {
-			const views = uni.createSelectorQuery().in(this)
-			views
-				.selectAll('.uni-swipe_button-group')
-				.boundingClientRect(data => {
-					let show = 'none'
-					if (this.autoClose) {
-						show = 'none'
-					} else {
-						show = this.show
-					}
-					this.leftWidth = data[0].width || 0
-					this.rightWidth = data[1].width || 0
-					this.buttonShow = show
-				})
-				.exec()
-		}
-	}
-}

+ 0 - 135
components/uni-swipe-action-item/mpwxs.js

@@ -1,135 +0,0 @@
-import { isPC } from "./isPC"
-export default {
-	data() {
-		return {
-			position: [],
-			button: {},
-			btn: "[]"
-		}
-	},
-	// computed: {
-	// 	pos() {
-	// 		return JSON.stringify(this.position)
-	// 	},
-	// 	btn() {
-	// 		return JSON.stringify(this.button)
-	// 	}
-	// },
-	watch: {
-		button: {
-			handler(newVal) {
-				this.btn = JSON.stringify(newVal)
-			},
-			deep: true
-		},
-		show(newVal) {
-			if (this.autoClose) return
-			if (!this.button) {
-				this.init()
-				return
-			}
-			this.button.show = newVal
-		},
-		leftOptions() {
-			this.init()
-		},
-		rightOptions() {
-			this.init()
-		}
-	},
-	created() {
-		if (this.swipeaction.children !== undefined) {
-			this.swipeaction.children.push(this)
-		}
-	},
-	mounted() {
-		this.init()
-	},
-	beforeDestroy() {
-		this.swipeaction.children.forEach((item, index) => {
-			if (item === this) {
-				this.swipeaction.children.splice(index, 1)
-			}
-		})
-	},
-	methods: {
-		init() {
-			clearTimeout(this.swipetimer)
-			this.swipetimer = setTimeout(() => {
-				this.getButtonSize()
-			}, 50)
-		},
-		closeSwipe(e) {
-			if (!this.autoClose) return
-			this.swipeaction.closeOther(this)
-		},
-
-		change(e) {
-			this.$emit('change', e.open)
-			let show = this.button.show
-			if (show !== e.open) {
-				this.button.show = e.open
-			}
-
-		},
-
-		appTouchStart(e) {
-			// #ifdef H5
-			if(isPC()) return
-			// #endif
-			const {
-				clientX
-			} = e.changedTouches[0]
-			this.clientX = clientX
-			this.timestamp = new Date().getTime()
-		},
-		appTouchEnd(e, index, item, position) {
-			// #ifdef H5
-			if(isPC()) return
-			// #endif
-			const {
-				clientX
-			} = e.changedTouches[0]
-			// fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题
-			let diff = Math.abs(this.clientX - clientX)
-			let time = (new Date().getTime()) - this.timestamp
-			if (diff < 40 && time < 300) {
-				this.$emit('click', {
-					content: item,
-					index,
-					position
-				})
-			}
-		},
-		// #ifdef H5
-		onClickForPC(index, item, position) {
-			// #ifdef H5
-			if(!isPC()) return
-			// #endif
-			this.$emit('click', {
-				content: item,
-				index,
-				position
-			})
-		},
-		// #endif
-		getButtonSize() {
-			const views = uni.createSelectorQuery().in(this)
-			views
-				.selectAll('.uni-swipe_button-group')
-				.boundingClientRect(data => {
-					let show = 'none'
-					if (this.autoClose) {
-						show = 'none'
-					} else {
-						show = this.show
-					}
-					this.button = {
-						data,
-						show
-					}
-				})
-				.exec()
-		}
-	}
-}

+ 0 - 271
components/uni-swipe-action-item/uni-swipe-action-item.vue

@@ -1,271 +0,0 @@
-<template>
-	<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->
-	<!-- #ifdef APP-VUE || MP-WEIXIN || H5 -->
-	<view class="uni-swipe">
-		<view class="uni-swipe_box" :data-threshold="threshold" :data-disabled="disabled" :change:prop="swipe.sizeReady" :prop="btn" @touchstart="swipe.touchstart" @touchmove="swipe.touchmove" @touchend="swipe.touchend" @mousedown="swipe.mousedown" @mousemove="swipe.mousemove" @mouseup="swipe.mouseup" @mouseleave="swipe.mouseleave">
-			<!-- 在微信小程序 app vue端 h5 使用wxs 实现-->
-			<view class="uni-swipe_button-group button-group--left">
-				<slot name="left">
-					<view v-for="(item,index) in leftOptions" :data-button="btn" :key="index" :style="{
-					  backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
-					  fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
-					}" class="uni-swipe_button button-hock" @touchstart="appTouchStart" @touchend="appTouchEnd($event,index,item,'left')" @click.stop="onClickForPC(index,item,'left')"><text class="uni-swipe_button-text" :style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}">{{ item.text }}</text></view>
-				</slot>
-			</view>
-			<view class="uni-swipe_text--center">
-				<slot></slot>
-			</view>
-			<view class="uni-swipe_button-group button-group--right">
-				<slot name="right">
-					<view v-for="(item,index) in rightOptions" :data-button="btn" :key="index" :style="{
-					  backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
-					  fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
-					}" class="uni-swipe_button button-hock" @touchstart="appTouchStart" @touchend="appTouchEnd($event,index,item,'right')" @click.stop="onClickForPC(index,item,'right')"><text class="uni-swipe_button-text" :style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}">{{ item.text }}</text></view>
-				</slot>
-			</view>
-		</view>
-	</view>
-	<!-- #endif -->
-	<!-- app nvue端 使用 bindingx -->
-	<!-- #ifdef APP-NVUE -->
-	<view ref="selector-box--hock" class="uni-swipe" @horizontalpan="touchstart" @touchend="touchend">
-		<view ref='selector-left-button--hock' class="uni-swipe_button-group button-group--left">
-			<slot name="left">
-				<view v-for="(item,index) in leftOptions" :data-button="btn" :key="index" :style="{
-				  backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
-				  fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
-				}" class="uni-swipe_button button-hock" @click.stop="onClick(index,item,'left')"><text class="uni-swipe_button-text" :style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}">{{ item.text }}</text></view>
-			</slot>
-		</view>
-		<view ref='selector-right-button--hock' class="uni-swipe_button-group button-group--right">
-			<slot name="right">
-				<view v-for="(item,index) in rightOptions" :data-button="btn" :key="index" :style="{
-				  backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
-				  fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
-				}" class="uni-swipe_button button-hock" @click.stop="onClick(index,item,'right')"><text class="uni-swipe_button-text" :style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}">{{ item.text }}</text></view>
-			</slot>
-		</view>
-		<view ref='selector-content--hock' class="uni-swipe_box">
-			<slot></slot>
-		</view>
-	</view>
-	<!-- #endif -->
-	<!-- 其他平台使用 js ,长列表性能可能会有影响-->
-	<!-- #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO || MP-QQ -->
-	<view class="uni-swipe">
-		<view class="uni-swipe_box" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend" :style="{transform:moveLeft}" :class="{ani:ani}">
-			<view class="uni-swipe_button-group button-group--left">
-				<slot name="left">
-					<view v-for="(item,index) in leftOptions" :data-button="btn" :key="index" :style="{
-					  backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
-					  fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
-					}" class="uni-swipe_button button-hock" @touchstart="appTouchStart" @touchend="appTouchEnd($event,index,item,'left')"><text class="uni-swipe_button-text" :style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}">{{ item.text }}</text></view>
-				</slot>
-			</view>
-			<slot></slot>
-			<view class="uni-swipe_button-group button-group--right">
-				<slot name="right">
-					<view v-for="(item,index) in rightOptions" :data-button="btn" :key="index" :style="{
-					  backgroundColor: item.style && item.style.backgroundColor ? item.style.backgroundColor : '#C7C6CD',
-					  fontSize: item.style && item.style.fontSize ? item.style.fontSize : '16px'
-					}" @touchstart="appTouchStart" @touchend="appTouchEnd($event,index,item,'right')" class="uni-swipe_button button-hock"><text class="uni-swipe_button-text" :style="{color: item.style && item.style.color ? item.style.color : '#FFFFFF',}">{{ item.text }}</text></view>
-				</slot>
-			</view>
-		</view>
-	</view>
-	<!-- #endif -->
-
-</template>
-<script src="./index.wxs" module="swipe" lang="wxs"></script>
-<script>
-	// #ifdef APP-VUE|| MP-WEIXIN || H5
-	import mpwxs from './mpwxs'
-	// #endif
-
-	// #ifdef APP-NVUE
-	import bindingx from './bindingx.js'
-	// #endif
-
-	// #ifndef APP-PLUS|| MP-WEIXIN  ||  H5
-	import mixins from './mpother'
-	// #endif
-
-	/**
-	 * SwipeActionItem 滑动操作子组件
-	 * @description 通过滑动触发选项的容器
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=181
-	 * @property {Boolean} show = [left|right|none] 	开启关闭组件,auto-close = false 时生效
-	 * @property {Boolean} disabled = [true|false] 		是否禁止滑动
-	 * @property {Boolean} autoClose = [true|false] 	滑动打开当前组件,是否关闭其他组件
-	 * @property {Number}  threshold 					滑动缺省值
-	 * @property {Array} leftOptions 					左侧选项内容及样式
-	 * @property {Array} rgihtOptions 					右侧选项内容及样式
-	 * @event {Function} click 							点击选项按钮时触发事件,e = {content,index} ,content(点击内容)、index(下标)
-	 * @event {Function} change 						组件打开或关闭时触发,left\right\none
-	 */
-
-	export default {
-		// #ifdef APP-VUE|| MP-WEIXIN||H5
-		mixins: [mpwxs],
-		// #endif
-
-		// #ifdef APP-NVUE
-		mixins: [bindingx],
-		// #endif
-
-		// #ifndef APP-PLUS|| MP-WEIXIN ||  H5
-		mixins: [mixins],
-		// #endif
-
-		props: {
-			// 控制开关
-			show: {
-				type: String,
-				default: 'none'
-			},
-
-			// 禁用
-			disabled: {
-				type: Boolean,
-				default: false
-			},
-
-			// 是否自动关闭
-			autoClose: {
-				type: Boolean,
-				default: true
-			},
-
-			// 滑动缺省距离
-			threshold: {
-				type: Number,
-				default: 20
-			},
-
-			// 左侧按钮内容
-			leftOptions: {
-				type: Array,
-				default () {
-					return []
-				}
-			},
-
-			// 右侧按钮内容
-			rightOptions: {
-				type: Array,
-				default () {
-					return []
-				}
-			}
-
-		},
-		inject: ['swipeaction']
-	}
-</script>
-<style scoped>
-	.uni-swipe {
-		position: relative;
-		/* #ifndef APP-NVUE */
-		overflow: hidden;
-		/* #endif */
-	}
-
-	.uni-swipe_box {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		flex-shrink: 0;
-		/* #endif */
-		position: relative;
-	}
-
-	.uni-swipe_text--center {
-		width: 100%;
-		/* #ifdef H5 */
-		cursor: grab;
-		/* #endif */
-	}
-
-	.uni-swipe_button-group {
-		/* #ifndef APP-NVUE */
-		box-sizing: border-box;
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		position: absolute;
-		top: 0;
-		bottom: 0;
-		/* #ifdef H5 */
-		cursor: pointer;
-		/* #endif */
-	}
-
-	.button-group--left {
-		left: 0;
-		transform: translateX(-100%);
-	}
-
-	.button-group--right {
-		right: 0;
-		transform: translateX(100%);
-	}
-
-	.uni-swipe_button {
-		/* #ifdef APP-NVUE */
-		flex: 1;
-		/* #endif */
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		justify-content: center;
-		align-items: center;
-		padding: 0 20px;
-	}
-
-	.uni-swipe_button-text {
-		/* #ifndef APP-NVUE */
-		flex-shrink: 0;
-		/* #endif */
-		font-size: 14px;
-	}
-
-	.ani {
-		transition-property: transform;
-		transition-duration: 0.3s;
-		transition-timing-function: cubic-bezier(0.165, 0.84, 0.44, 1);
-	}
-
-	/* #ifdef MP-ALIPAY */
-	.movable-area {
-		/* width: 100%; */
-		height: 45px;
-	}
-
-	.movable-view {
-		display: flex;
-		/* justify-content: center; */
-		position: relative;
-		flex: 1;
-		height: 45px;
-		z-index: 2;
-	}
-
-	.movable-view-button {
-		display: flex;
-		flex-shrink: 0;
-		flex-direction: row;
-		height: 100%;
-		background: #C0C0C0;
-	}
-
-	/* .transition {
-		transition: all 0.3s;
-	} */
-	.movable-view-box {
-		flex-shrink: 0;
-		height: 100%;
-		background-color: #fff;
-	}
-
-	/* #endif */
-</style>

+ 0 - 42
components/uni-swipe-action/uni-swipe-action.vue

@@ -1,42 +0,0 @@
-<template>
-	<view>
-		<slot></slot>
-	</view>
-</template>
-
-<script>
-	/**
-	 * SwipeAction 滑动操作
-	 * @description 通过滑动触发选项的容器
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=181
-	 */
-	export default {
-		data() {
-			return {};
-		},
-		provide() {
-			return {
-				swipeaction: this
-			};
-		},
-		created() {
-			this.children = [];
-		},
-		methods: {
-			closeOther(vm) {
-				if (this.openItem && this.openItem !== vm) {
-					// #ifdef APP-VUE || H5 || MP-WEIXIN
-					this.openItem.button.show = 'none'
-					// #endif
-
-					// #ifndef APP-VUE || H5 || MP-WEIXIN
-					this.openItem.close()
-					// #endif
-				}
-				this.openItem = vm
-			}
-		}
-	};
-</script>
-
-<style scoped></style>

+ 239 - 278
pages/index/index.vue

@@ -1,81 +1,51 @@
 <template>
-	<view>
-		<!-- <u-notice-bar :autoplay="autoplay" :playState="playState" :speed="speed" :mode="mode" @click="click"
-			:show="show" :type="type" :list="list" :moreIcon="moreIcon" :volumeIcon="volumeIcon" :duration="duration"
-			bgColor="" padding="8rpx 24rpx" :isCircular="isCircular"
-			style="position: absolute;top: 12%;z-index: 9;width: 100%;"></u-notice-bar> -->
+	<view style="background: #F8FAFE;">
+		<public-module></public-module>
 		<service-widget @btnClick="btn_click"></service-widget>
-		<!-- 状态栏 -->
-		<view class="status" :style="{position:headerPosition,backgroundColor:bgColor}"></view>
-		<!-- 漂浮头部 -->
-		<view class="header dis a-c j-s" :style="{position:headerPosition,backgroundColor:bgColor}">
+		<view class="header dis a-c j-s">
 			<view class="city dis a-c ">
+				<image src="../../static/image/index/img/cityicon.png" mode=""></image>
 				<text>{{city}}</text>
-				<view class="icon iconfont icon-sanjiao_fill-"></view>
-			</view>
-
-			<view class="input dis a-c">
-				<view class="icon iconfont icon-saoyisao" @tap="scan"></view>
-				<input disabled placeholder="车险" @tap="toSearch()" />
-			</view>
-			<view class="menu">
-				<image mode="aspectFill" :src="avatar"
-					@click='isShow?navigate({url:"/pages/realname/realname"}," ",true):""'></image>
+				<image src="../../static/image/index/img/jiantou.png" mode="" style="width: 12px;height: 12px;"></image>
 			</view>
+			<image src="../../static/image/index/img/Scan.png" mode="" @click="scan"></image>
 		</view>
-		<!-- 公共组件-每个页面必须引入 -->
-		<public-module></public-module>
-
-		<!-- 占位 -->
-		<view class="place" :style="{backgroundColor:'#fff'}"></view>
-		<!-- 实名认证提示 -->
-		<view class="" @click='navigate({url:"/pages/realname/realname"},"navigateTo",true)' v-show="isShow">
-			<u-notice-bar :list="list" type="error" padding="8rpx 24rpx"></u-notice-bar>
-		</view>
-
-		<!-- 轮播图 -->
-		<swiper-image :resdata="swiperList" @changeEvent="swiperChange"></swiper-image>
-		<!-- <view class="" @click="arr">
-			321321
-		</view> -->
-		<!-- 分类轮播 -->
-		<index-nav :resdata="categoryList" :row="2"></index-nav>
-		<!-- 推荐商品 -->
-		<view class="pick" :style="{'background':'#fff'}">
-			<view class="box">
-				<view class="title">
-					<view class="big">推荐商品</view>
-					<view class="small">好货推荐 低价精选</view>
-				</view>
-				<view class="product-list">
-					<view v-for="product in pickList" :key="product.goods_id" @tap="toPick(product)">
-						<image mode="widthFix" :src="product.img"></image>
-						<view class="price">{{product.price}}起</view>
-						<view class="slogan">{{product.slogan}}</view>
-					</view>
+		<view class="page">
+			<!-- 认证提示 -->
+			<view class="dis a-c j-s">
+				<view class="frequentClasses dis f-c " :style="{backgroundImage:`url(${item.img})`}"
+					v-for="(item,index) in frequentClassesList" :key="index" @click="tapEvent(item)">
+					<text>{{item.title}}</text>
+					<text>{{item.description}}</text>
 				</view>
 			</view>
-		</view>
-		<!-- 广告横幅 -->
-		<view class="banner">
-			<image mode="widthFix" src="/static/image/index/ad-img/ad.jpg"></image>
-		</view>
-		<!-- 商品列表 -->
-		<view class="goods-list">
-			<view class="title">— 猜你喜欢 —</view>
-			<view class="product-list">
-				<view class="product" v-for="product in productList" :key="product.goods_id" @tap="toGoods(product)">
-					<image mode="widthFix" :src="product.img"></image>
-					<view class="name">{{product.name}}</view>
-					<view class="info">
-						<view class="price">¥{{product.price}} 起</view>
-						<view class="slogan">{{product.slogan}}</view>
+			<index-nav :resdata="categoryList" :row="1" style="margin: 14px 0;"></index-nav>
+			<view class="banner">
+				<image mode="widthFix" src="/static/image/index/ad-img/ad.png" @click="back"></image>
+			</view>
+			<view class="topProducts dis  f-c ">
+				<text class="title mt-2 mb-2">精选产品</text>
+				<view class="data dis f-c">
+					<view class="Product dis a-c " v-for="(item,index) in pickList" :key="index">
+						<image :src="item.img" mode=""></image>
+						<view class="dis f-c a-start item">
+							<text
+								style="color: #232832;font-size: 16px;font-weight: bold;letter-spacing: 1px;">{{item.title}}</text>
+							<text style="color: rgba(35, 40, 50, 0.6);font-size: 12px;">{{item.sum}}人购买</text>
+							<view class="dis a-c">
+								<view class="slogan" :style="{backgroundColor:itemslogan.back,color:itemslogan.color}"
+									v-for="(itemslogan,indexslogan) in item.slogan" :key="indexslogan">
+									<text>{{itemslogan.name}}</text>
+								</view>
+							</view>
+							<text style="color: rgba(35, 40, 50, 0.6);font-size: 12px;"><text
+									style="color: #FF6C29;font-size: 16px;margin-right: 3px;">{{item.price}}</text>/年起</text>
+						</view>
 					</view>
 				</view>
 			</view>
-			<view class="loading-text">{{loadingText}}</view>
 		</view>
-		<u-modal v-model="locationshow" content="3213213213213" :show-cancel-button='true'></u-modal>
+
 	</view>
 </template>
 <script>
@@ -124,79 +94,75 @@
 				showTitle: false,
 				asyncClose: false,
 				isShow: false,
-				autoplay: true,
-				type: 'warning',
-				list: ['欢迎登录晋掌柜,请点击此处文字进行实名验证,方可使用所有功能。'],
-				mode: 'horizontal',
-				playState: 'play',
-				speed: 160,
-				duration: 1000,
-				moreIcon: true,
-				volumeIcon: true,
-				isCircular: true,
 				current: 0,
 				banben: {},
 				bgColor: "#4B75EB",
 				//轮播
-				swiperList: [],
 				//分类
-				categoryList: [{
+				frequentClassesList: [{
 						cat_id: 0,
-						img: '/static/image/index/category-img/0.png',
+						img: '../../static/image/index/category-img/1.png',
 						title: '车险',
+						description: "快速比价",
 						src: '/pages/carInsure/entry'
 					},
 					{
 						cat_id: 1,
-						img: '/static/image/index/category-img/1.png',
-						title: '车损测算',
-						// src: '/pages/carInsure2/entry'
-					},
-					{
-						cat_id: 2,
 						img: '/static/image/index/category-img/2.png',
 						title: '道路救援',
+						description: "紧急预警",
 						src: '/pages/roadRescue/index'
 					},
 					{
-						cat_id: 3,
+						cat_id: 2,
 						img: '/static/image/index/category-img/3.png',
-						title: '司法鉴定',
+						title: '审车',
+						description: "用车无烦恼",
 						src: ''
 					},
 					{
-						cat_id: 4,
+						cat_id: 3,
 						img: '/static/image/index/category-img/4.png',
-						title: '掌柜商城',
-						src: ''
+						title: '车检代办',
+						description: "便捷处理",
+						src: '/pages/caragent/index'
 					},
-					{
-						cat_id: 5,
+				],
+				categoryList: [{
+						cat_id: 0,
 						img: '/static/image/index/category-img/5.png',
-						title: '车',
-						src: ''
+						title: '车损测算',
+						// src: '/pages/carInsure2/entry'
 					},
 					{
-						cat_id: 6,
+						cat_id: 1,
 						img: '/static/image/index/category-img/6.png',
-						title: '审车',
+						title: '司法鉴定',
 						src: ''
 					},
 					{
-						cat_id: 7,
+						cat_id: 2,
 						img: '/static/image/index/category-img/7.png',
-						title: '代驾',
+						title: '掌柜商城',
 						src: ''
 					},
 					{
-						cat_id: 8,
+						cat_id: 3,
 						img: '/static/image/index/category-img/8.png',
-						title: '车检代办',
-						src: '/pages/caragent/index'
+						title: '车',
+						src: ''
 					},
+
 					{
-						cat_id: 9,
+						cat_id: 4,
 						img: '/static/image/index/category-img/9.png',
+						title: '代驾',
+						src: ''
+					},
+
+					{
+						cat_id: 5,
+						img: '/static/image/index/category-img/10.png',
 						title: '一键挪车',
 						src: '/pages/ticket/ticket'
 					}
@@ -205,97 +171,77 @@
 				//推荐商品 3个
 				pickList: [{
 						goods_id: 0,
-						img: '/static/image/index/pick-img/p1.jpg',
-						price: '¥5.85',
-						slogan: '限时抢购'
+						img: '../../static/image/index/pick-img/1.png',
+						price: '25.8元',
+						slogan: [{
+								name: "明星产品",
+								back: "rgba(255,153,0,0.1)",
+								color: "#FF9900"
+							},
+							{
+								name: "刚需保障",
+								back: "rgba(255,46,0,0.1)",
+								color: "#FF2E00"
+							},
+							{
+								name: "专家推荐",
+								back: "rgba(0,82,255,0.1)",
+								color: "#0052FF"
+							}
+						],
+						sum: "1235",
+						title: "平安个人意外险"
 					},
 					{
 						goods_id: 1,
-						img: '/static/image/index/pick-img/p2.jpg',
-						price: '¥270',
-						slogan: '精选商品'
+						img: '../../static/image/index/pick-img/2.png',
+						price: '88元',
+						sum: "588",
+						slogan: [{
+							name: "专家推荐",
+							back: "rgba(0,82,255,0.1)",
+							color: "#0052FF"
+						}],
+						title: "儿童综合医疗保险"
 					},
 					{
-						goods_id: 2,
-						img: '/static/image/index/pick-img/p3.jpg',
-						price: '¥281',
-						slogan: '今日疯抢'
-					}
-				],
-				//猜你喜欢列表
-				productList: [{
 						goods_id: 0,
-						img: '/static/image/index/img/p1.jpg',
-						name: '平安个人意外伤害险',
-						price: '25.8',
-						slogan: '1235人购买'
+						img: '../../static/image/index/pick-img/1.png',
+						price: '25.8元',
+						slogan: [{
+								name: "明星产品",
+								back: "rgba(255,153,0,0.1)",
+								color: "#FF9900"
+							},
+							{
+								name: "刚需保障",
+								back: "rgba(255,46,0,0.1)",
+								color: "#FF2E00"
+							},
+							{
+								name: "专家推荐",
+								back: "rgba(0,82,255,0.1)",
+								color: "#0052FF"
+							}
+						],
+						sum: "1235",
+						title: "平安行.国内自助游旅行意..."
 					},
 					{
 						goods_id: 1,
-						img: '/static/image/index/img/p2.jpg',
-						name: '一年期意外险',
-						price: '1.2',
-						slogan: '1235人购买'
-					},
-					{
-						goods_id: 2,
-						img: '/static/image/index/img/p3.jpg',
-						name: '平安行·国内自助游保险',
-						price: '88',
-						slogan: '1235人购买'
-					},
-					{
-						goods_id: 3,
-						img: '/static/image/index/img/p4.jpg',
-						name: '企业团体综合意外险',
-						price: '1.9',
-						slogan: '1235人购买'
-					},
-					{
-						goods_id: 4,
-						img: '/static/image/index/img/p5.jpg',
-						name: '平安行·境内自驾旅游保险',
-						price: '442',
-						slogan: '1235人购买'
-					},
-					{
-						goods_id: 5,
-						img: '/static/image/index/img/p6.jpg',
-						name: '平安行·境内节假日旅游保险',
-						price: '257',
-						slogan: '1235人购买'
+						img: '../../static/image/index/pick-img/2.png',
+						price: '88元',
+						sum: "588",
+						slogan: [{
+							name: "专家推荐",
+							back: "rgba(0,82,255,0.1)",
+							color: "#0052FF"
+						}],
+						title: "平安行.境内节假日出行意..."
 					},
-					{
-						goods_id: 6,
-						img: '/static/image/index/img/p7.jpg',
-						name: '平安行·境内高原旅游保险',
-						price: '0.2',
-						slogan: '1235人购买'
-					},
-					{
-						goods_id: 7,
-						img: '/static/image/index/img/p8.jpg',
-						name: '儿童综合医疗保险',
-						price: '1400',
-						slogan: '1235人购买'
-					},
-					{
-						goods_id: 8,
-						img: '/static/image/index/img/p9.jpg',
-						name: '女性关爱保险',
-						price: '70',
-						slogan: '1235人付款'
-					},
-					{
-						goods_id: 9,
-						img: '/static/image/index/img/p10.jpg',
-						name: '全球交通意外保险',
-						price: '74.5',
-						slogan: '1235人购买'
-					}
 				],
+
 				headerPosition: "fixed",
-				loadingText: "正在加载...",
 				getApplicationStatus: "",
 				socketOpen: false,
 				latitude: "",
@@ -350,9 +296,7 @@
 					this.getApplicationStatus = res.data;
 				}
 			}
-			let banner = await this.$http.get('/apps/getCarousel');
-			this.swiperList = banner.data;
-			this.bgColor = this.swiperList[0].color;
+
 		},
 		async onPullDownRefresh() {
 			let userInfoRes = await this.$http.get('/user/loginUser')
@@ -373,47 +317,27 @@
 			}
 
 		},
-		//上拉加载,需要自己在page.json文件中配置"onReachBottomDistance"
-		onReachBottom() {
-			uni.showLoading({
-				mask: true,
-				title: "Loading..."
-			})
-			let len = this.productList.length;
-			if (len >= 40) {
-				uni.hideLoading()
-				this.loadingText = "到底了";
-				return false;
-			}
-			let end_goods_id = this.productList[len - 1].goods_id;
-			for (let i = 1; i <= 10; i++) {
-				let goods_id = end_goods_id + i;
-				let goods_name = this.productList[i - 1].name;
-				let goods_price = this.productList[i - 1].price;
-				let p = {
-					goods_id: goods_id,
-					img: '/static/image/index/img/p' + (goods_id % 10 == 0 ? 10 : goods_id % 10) + '.jpg',
-					name: goods_name,
-					price: goods_price,
-					slogan: '1235人购买'
-				};
-				this.productList.push(p);
-			}
-			setTimeout(() => {
-				uni.hideLoading()
-			}, 1000)
-		},
-
-		//  async onShow() {
-		// 	if (this.userInfo.sysUser.status == '2') {
-		// 		this.show = true;
-		// 	} else {
-		// 		this.show = false;
-		// 	}
-		// },
 		methods: {
-			getLocation() {
-
+			tapEvent(item) {
+				if (this.userInfo.sysUser.status == '2') {
+					uni.showToast({
+						icon: "none",
+						title: '请先通过实名认证',
+						duration: 1500
+					})
+				} else if (this.userInfo.sysUser.status == '1') {
+					if (!item.src || item.src == '#' || item.src == '') {
+						uni.showToast({
+							icon: "none",
+							title: '正在开发中...',
+							duration: 1500
+						})
+					} else {
+						this.navigate({
+							url: item.src
+						}, "navigateTo", true)
+					}
+				}
 			},
 			btn_click() {
 				uni.navigateTo({
@@ -502,9 +426,9 @@
 					})
 				}
 			},
-			arr() {
+			back() {
 				uni.navigateTo({
-					url: '/pages/ad/ad?userId=' + this.userInfo.sysUser.id,
+					url: '/pages/carInsure/entry',
 				})
 			},
 			nameClick() {
@@ -589,10 +513,6 @@
 				}
 
 			},
-			// 改变头部颜色
-			swiperChange(event) {
-				this.bgColor = this.swiperList[event.detail.current].color;
-			},
 			//扫一扫
 			scan() {
 				uni.scanCode({
@@ -628,6 +548,12 @@
 	};
 </script>
 <style lang="scss" scoped>
+	page {
+		background: #F8FAFE;
+	}
+
+
+
 	.status {
 		width: 100%;
 		height: 0;
@@ -641,65 +567,100 @@
 
 	.header {
 		width: 100%;
-		height: 100upx;
 		display: flex;
 		position: fixed;
-		top: 0;
-		/* #ifdef  APP-PLUS */
-		top: var(--status-bar-height);
-		/*  #endif  */
+		left: 0;
+		right: 0;
 		z-index: 996;
-		padding: 0 10px;
-	}
+		padding: 60px 16px 16px;
+		background-color: #fff;
 
-	.header .city {
-		color: #fff;
-		font-size: 15px;
+		.city {
+			color: #fff;
+			font-size: 15px;
 
-		.icon {
-			font-size: 10px;
-			margin-left: 5px;
+			image {
+				width: 22px;
+				height: 22px;
+			}
+
+			text {
+				color: #333;
+				font-size: 13px;
+				margin: 0 5px;
+			}
+
+			.icon {
+				font-size: 10px;
+				margin-left: 5px;
+			}
 		}
-	}
 
-	.header .input {
-		width: 70%;
-		background-color: #fff;
-		border-radius: 30px;
-		height: 30px;
-		padding: 10px;
-		box-sizing: border-box;
+		image {
+			width: 22px;
+			height: 22px;
+		}
 	}
 
-	.header .input input {
-		// width: calc(100% - 150px);
-		// height: 60upx;
-		// background-color: #ffffff;
-		// border-radius: 60upx;
-		// padding-left: 60upx;
-		// font-size: 30upx;
-	}
+	.page {
+		padding: 115px 16px 16px 16px;
 
-	.header .input .icon {
-		color: #a18090;
-		font-size: 18px;
-		margin-right: 10px;
-	}
+		.frequentClasses {
+			width: 148rpx;
+			height: 148rpx;
+			padding: 5px;
+			background-size: cover;
 
-	.header .menu {
-		background-color: #FFFFFF;
-		border-radius: 50%;
-		box-sizing: border-box;
-		width: 30px;
-		height: 30px;
-		padding: 3px;
-		box-sizing: border-box;
-	}
+			text:nth-child(1) {
+				color: #fff;
+				font-size: 28rpx;
+				line-height: 1;
+			}
 
-	.header .menu image {
-		width: 100%;
-		height: 100%;
-		border-radius: 50%;
+			text:nth-child(2) {
+				color: #fff;
+				font-size: 22rpx;
+			}
+		}
+
+		.topProducts {
+			.title {
+				color: #232832;
+				font-size: 32rpx;
+				font-weight: bold;
+			}
+
+			.data {
+				background: #FFFFFF;
+				box-shadow: 0px 2px 5px 0px #DAE3F4;
+				border-radius: 6px;
+				padding: 16px;
+			}
+
+			.Product {
+				margin-bottom: 14px;
+
+				image {
+					width: 85px;
+					height: 85px;
+					margin-right: 14px;
+				}
+
+				.item {
+					line-height: 1.5;
+
+					.slogan {
+						padding: 1px 3px;
+						border-radius: 2px;
+						font-size: 22rpx;
+						margin-right: 5px;
+					}
+				}
+
+
+
+			}
+		}
 	}
 
 	/* 占位 */
@@ -707,7 +668,7 @@
 		/*  #ifdef  APP-PLUS  */
 		margin-top: var(--status-bar-height);
 		/*  #endif  */
-		height: 100upx;
+		height: 106upx;
 	}
 
 	.pick {

BIN
static/image/index/ad-img/ad.jpg


BIN
static/image/index/ad-img/ad.png


BIN
static/image/index/category-img/0.png


BIN
static/image/index/category-img/1.png


BIN
static/image/index/category-img/10.png


BIN
static/image/index/category-img/2.png


BIN
static/image/index/category-img/3.png


BIN
static/image/index/category-img/4.png


BIN
static/image/index/category-img/5.png


BIN
static/image/index/category-img/6.png


BIN
static/image/index/category-img/7.png


BIN
static/image/index/category-img/8.png


BIN
static/image/index/category-img/9.png


BIN
static/image/index/img/Scan.png


BIN
static/image/index/img/cityicon.png


BIN
static/image/index/img/jiantou.png


BIN
static/image/index/img/p1.jpg


BIN
static/image/index/img/p10.jpg


BIN
static/image/index/img/p2.jpg


BIN
static/image/index/img/p3.jpg


BIN
static/image/index/img/p4.jpg


BIN
static/image/index/img/p5.jpg


BIN
static/image/index/img/p6.jpg


BIN
static/image/index/img/p7.jpg


BIN
static/image/index/img/p8.jpg


BIN
static/image/index/img/p9.jpg


BIN
static/image/index/pick-img/1.png


BIN
static/image/index/pick-img/2.png


BIN
static/image/index/pick-img/p1.jpg


BIN
static/image/index/pick-img/p2.jpg


BIN
static/image/index/pick-img/p3.jpg