Browse Source

2023-6-19

cmy 2 years ago
parent
commit
8de3be92b1
83 changed files with 3774 additions and 4451 deletions
  1. 26 0
      api/game.js
  2. 0 421
      components/newlist/nowList.vue
  3. 0 68
      components/returnButton.vue
  4. 0 246
      components/seckill/seckill.vue
  5. 0 196
      components/share.vue
  6. 0 218
      components/ss-calendar/ss-calendar.vue
  7. 0 1201
      components/tki-qrcode/qrcode.js
  8. 0 210
      components/tki-qrcode/tki-qrcode.vue
  9. 0 122
      components/uni-badge/uni-badge.vue
  10. 0 124
      components/uni-fav/uni-fav.vue
  11. 0 96
      components/uni-icons/icons.js
  12. 0 10
      components/uni-icons/uni-icons.vue
  13. 0 230
      components/uni-list-item/uni-list-item.vue
  14. 0 68
      components/uni-list/uni-list.vue
  15. 0 65
      components/uni-list/uni-refresh.vue
  16. 0 87
      components/uni-list/uni-refresh.wxs
  17. 0 396
      components/uni-notice-bar/uni-notice-bar.vue
  18. 0 141
      components/uni-rate/uni-rate.vue
  19. 0 244
      components/uni-steps/uni-steps.vue
  20. 0 226
      components/upload-images.vue
  21. 1 1
      manifest.json
  22. 1 3
      pages.json
  23. 292 0
      pages/index/compon/paopao-countdown.vue
  24. 126 0
      pages/index/compon/paopao-ljt.vue
  25. 117 0
      pages/index/compon/paopao-popup.vue
  26. 571 77
      pages/index/index.vue
  27. BIN
      static/img/ganme01/gamebg.png
  28. BIN
      static/img/ganme01/pp.png
  29. BIN
      static/img/ganme01/win.png
  30. BIN
      static/img/ganme01/xdw01.png
  31. BIN
      static/img/ganme01/xdw02.png
  32. BIN
      static/img/ganme01/xdw03.png
  33. BIN
      static/img/ganme01/xdw04.png
  34. BIN
      static/img/ganme01/xdw05.png
  35. BIN
      static/img/ganme01/xdw06.png
  36. BIN
      static/img/ganme01/xdwP01.png
  37. BIN
      static/img/ganme01/xdwP02.png
  38. BIN
      static/img/ganme01/xdwP03.png
  39. BIN
      static/img/ganme01/xdwP04.png
  40. BIN
      static/img/ganme01/xdwP05.png
  41. BIN
      static/img/ganme01/xdwP06.png
  42. BIN
      static/img/ganme01/新建文件夹/xdw01.png
  43. BIN
      static/img/ganme01/新建文件夹/xdw02.png
  44. BIN
      static/img/ganme01/新建文件夹/xdw03.png
  45. BIN
      static/img/ganme01/新建文件夹/xdw04.png
  46. BIN
      static/img/ganme01/新建文件夹/xdw05.png
  47. 0 0
      static/img/ganme01/新建文件夹/xdw06.png
  48. BIN
      static/yticon.ttf
  49. 56 0
      uni_modules/uni-popup/changelog.md
  50. 45 0
      uni_modules/uni-popup/components/uni-popup-dialog/keypress.js
  51. 271 0
      uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue
  52. 143 0
      uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue
  53. 187 0
      uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue
  54. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/en.json
  55. 8 0
      uni_modules/uni-popup/components/uni-popup/i18n/index.js
  56. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json
  57. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json
  58. 45 0
      uni_modules/uni-popup/components/uni-popup/keypress.js
  59. 26 0
      uni_modules/uni-popup/components/uni-popup/popup.js
  60. 475 0
      uni_modules/uni-popup/components/uni-popup/uni-popup.vue
  61. 90 0
      uni_modules/uni-popup/package.json
  62. 17 0
      uni_modules/uni-popup/readme.md
  63. 8 0
      uni_modules/uni-scss/changelog.md
  64. 1 0
      uni_modules/uni-scss/index.scss
  65. 82 0
      uni_modules/uni-scss/package.json
  66. 4 0
      uni_modules/uni-scss/readme.md
  67. 7 0
      uni_modules/uni-scss/styles/index.scss
  68. 3 0
      uni_modules/uni-scss/styles/setting/_border.scss
  69. 66 0
      uni_modules/uni-scss/styles/setting/_color.scss
  70. 55 0
      uni_modules/uni-scss/styles/setting/_radius.scss
  71. 56 0
      uni_modules/uni-scss/styles/setting/_space.scss
  72. 167 0
      uni_modules/uni-scss/styles/setting/_styles.scss
  73. 24 0
      uni_modules/uni-scss/styles/setting/_text.scss
  74. 146 0
      uni_modules/uni-scss/styles/setting/_variables.scss
  75. 19 0
      uni_modules/uni-scss/styles/tools/functions.scss
  76. 31 0
      uni_modules/uni-scss/theme.scss
  77. 62 0
      uni_modules/uni-scss/variables.scss
  78. 20 0
      uni_modules/uni-transition/changelog.md
  79. 128 0
      uni_modules/uni-transition/components/uni-transition/createAnimation.js
  80. 277 0
      uni_modules/uni-transition/components/uni-transition/uni-transition.vue
  81. 87 0
      uni_modules/uni-transition/package.json
  82. 11 0
      uni_modules/uni-transition/readme.md
  83. 2 1
      utils/request.js

+ 26 - 0
api/game.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+
+// 登录
+export function gameDetail(data) {
+	return request({
+		url: '/api/game',
+		method: 'get',
+		data
+	});
+}
+// 投票
+export function gameSetCu(data) {
+	return request({
+		url: '/api/game/join',
+		method: 'post',
+		data
+	});
+}
+// 获取结果
+export function gameGameLast(data) {
+	return request({
+		url: '/api/game/last',
+		method: 'get',
+		data
+	});
+}

+ 0 - 421
components/newlist/nowList.vue

@@ -1,421 +0,0 @@
-<template>
-	<view class="other">
-		<view class="other-1">大家还在拼</view>
-		
-		<view class="preferred_item" v-for="item in recommendedlist" @click.stop="ToKaiTuan(item)">
-			<view class="flex_item" style="overflow: hidden;">
-				<view class="tlist-img">
-					<view class="leftImgIcon">AA团</view>
-					<!-- <view class="leftImgIcon" v-if="sid == 129">达人团</view> -->
-					<view class="img"><image :src="item.image" mode="scaleToFill"></image></view>
-				</view>
-				<view class="tlist-img " v-for="imgItem in item.images">
-					<view class="img"><image :src="imgItem" mode="scaleToFill"></image></view>
-				</view>
-			</view>
-			<view class="goods_name">
-				<view class="goods_title flex_item">
-					<view class="text">{{ item.min_people }}人团</view>
-					<view class="title">{{ item.title }}</view>
-				</view>
-				<view class="goods-height">
-					<!-- <view class="goods_num clamp">{{ item.info }}</view> -->
-					<view class="flex goods-peplo">
-						<view class="goods-tip flex_item">
-							<view class="peplo">库存剩{{ item.percent | parseIntTo }}%</view>
-							<view class="make">{{ item.mark }}</view>
-						</view>
-						<view class="right flex_item">
-							<image src="/static/icon/hot.png" mode="aspectFill"></image>
-							<text>已拼{{ item.sales }}份</text>
-						</view>
-					</view>
-				</view>
-				<view class="price flex">
-					<view class="price_list">
-						<view class="price-red">
-							<text>单人仅付:</text>
-							<text class="moneyIcon">¥</text>
-							<text class="money">{{ item.price }}</text>
-							<text class="moneyType">/{{ item.unit_name }}</text>
-							<!-- <text class="outMoney">¥{{ item.product_price }}</text> -->
-						</view>
-					</view>
-					<view class="img position-relative" @click.stop="ToKaiTuan(item)">去开团</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	props: {
-		recommendedlist: {
-			type: Array,
-			default: function() {
-				return {
-				};
-			}
-		}
-	},
-	data() {
-		return {};
-	},
-	filters: {
-		parseIntTo(percent) {
-			percent = +percent * 100;
-			if (percent % 1 === 0) {
-				return percent;
-			} else {
-				percent = percent.toFixed(1);
-				return percent;
-			}
-		}
-	},
-	methods: {
-		// 去开团
-		ToKaiTuan(item) {
-			console.log(8754847)
-			let id = item.id;
-			uni.navigateTo({
-				url: '/pages/product/productGroup?id=' + id
-			});
-		},
-	}
-};
-</script>
-
-<style lang="scss">
-.other{
-		.other-1{
-			font-size:27rpx;
-			color:#333333;
-			line-height: 55rpx;
-		}
-		
-		.preferred_item {
-			width: 100%;
-			height: 100%;
-			padding: 25rpx 25rpx;
-			position: relative;
-			background-color: #FFFFFF;
-			border-radius: 15rpx;
-			margin-bottom: 15rpx;
-			.tlist-img {
-				width: 225rpx;
-				position: relative;
-				margin-right: 15rpx;
-				.leftImgIcon {
-					position: absolute;
-					top: 0;
-					left: 0;
-					font-size: 22rpx;
-					font-family: PingFangSC;
-					color: rgba(148, 71, 34, 1);
-					background: rgba(254, 242, 111, 1);
-					z-index: 99;
-					border-radius: 5rpx;
-					padding: 5rpx 10rpx;
-				}
-				.img {
-					width: 210rpx;
-					height: 210rpx;
-					image {
-						width: 100%;
-						height: 100%;
-						border-radius: 20rpx;
-					}
-				}
-				.stock {
-					margin-top: 13rpx;
-					font-size: 26rpx;
-					background: #fff1ee;
-					width: 100%;
-					color: #fb4912;
-					padding: 6rpx 0;
-					border-radius: 5rpx;
-					justify-content: center;
-					align-items: center;
-					position: absolute;
-					left: 0;
-					bottom: 0;
-					.img {
-						width: 20rpx;
-						height: 20rpx;
-						flex-shrink: 0;
-					}
-					.stock-num {
-						padding-left: 7rpx;
-						font-size: 22rpx;
-						border-radius: 5rpx;
-						height: 32rpx;
-						line-height: 32rpx;
-					}
-				}
-			}
-			.goods_name {
-				.goods_title {
-					padding-top: 15rpx;
-					color:rgba(0,0,0,1);
-					// white-space: nowrap;
-					// overflow: hidden;
-					// text-overflow: ellipsis;
-					font-size:32rpx;
-					color: $font-color-dark;
-					// height: 70rpx;
-					align-items: baseline;
-					.text{
-						border-radius: 8rpx;
-						border: 2rpx solid #FF1A27;
-						color: #FF1A27;
-						padding:0rpx 10rpx;
-						font-size: 26rpx !important;
-						margin-right: 15rpx;
-						
-					}
-					.title {
-						width: 80%;
-						overflow : hidden;
-						text-overflow: ellipsis;
-						display: -webkit-box;
-						-webkit-line-clamp: 2;
-						-webkit-box-orient: vertical;
-					}
-				}
-				.goods-height {
-					min-height: 60rpx;
-				}
-				.goods_num {
-					font-size: 26rpx;
-					color: #8f8f97;
-					padding-bottom: 15rpx;
-				}
-				.goods-peplo {
-					height: 45rpx;
-					margin-top: 15rpx;
-					.right {
-						color:#8e8e8e;
-						font-size: 24rpx;
-						width:195rpx;
-						image {
-							width: 30rpx;
-							height: 33rpx;
-							margin-right: 15rpx;
-						}
-					}
-					.goods-tip {
-						.peplo {
-							background:linear-gradient(14deg,rgba(255,116,37,1),rgba(255,30,41,1));
-							padding: 5rpx 10rpx;
-							color: #ffffff;
-							border-top-left-radius:8rpx;
-							border-bottom-left-radius: 8rpx;
-						}
-						.make {
-							background-color: #fef26f;
-							color: #944722;
-							border-top-right-radius: 8rpx;
-							border-bottom-right-radius: 8rpx;
-						}
-						.make,
-						.peplo {
-							font-size: $font-sm;
-							padding: 5rpx 10rpx;
-						}
-					}
-				}
-				.price {
-					font-size: 28rpx;
-					position: relative;
-					padding-top: 15rpx;
-					.price_list {
-						.price-red {
-							font-size: 30rpx !important;
-							font-family: Source Han Sans CN;
-							color: rgba(253, 27, 42, 1);
-							font-size: $font-base;
-							font-weight: bold;
-							.moneyIcon {
-								font-weight: normal !important; 
-							}
-							.money {
-								font-size: 58rpx;
-							}
-							.moneyType {
-								font-weight: 400;
-							}
-							.outMoney {
-								font-weight: 400;
-								text-decoration: line-through;
-								color: rgba(142, 142, 142, 1);
-							}
-						}
-						.price-green {
-							color: #2dbd59;
-							font-size: 26rpx !important;
-							font-weight: bold;
-							text {
-								background: linear-gradient(45deg, rgba(21, 197, 52, 1), rgba(21, 197, 52, 1));
-								color: #ffffff;
-								padding: 0rpx 10rpx;
-								border-radius: 7rpx;
-								font-size: 24rpx !important;
-								margin-left: 15rpx;
-							}
-						}
-					}
-					.img {
-						width: 265rpx;
-						height: 74rpx;
-						line-height: 74rpx;
-						// background:linear-gradient(14deg,rgba(255,116,37,1),rgba(255,30,41,1));
-						background: linear-gradient(270deg, rgba(181,116,242, 1) 0%, rgba(139,86,254, 1) 100%);
-						border-radius: 99rpx;
-						color: #ffffff;
-						font-size: $font-lg;
-						text-align: center;
-					}
-					.img1{
-						background-color: #D3D3D3;
-						width: 265rpx;
-						height: 74rpx;
-						line-height: 74rpx;
-						border-radius: 99rpx;
-						color: #ffffff;
-						font-size: $font-lg;
-						text-align: center;
-					}
-					.tomorrow {
-						background: #29a66e;
-						color: #ffffff;
-						border-radius: 25rpx;
-						padding: 10rpx 25rpx;
-					}
-				}
-			}
-		}
-		
-		
-		.other-2{
-			width: 100%;
-			background:#ffffff;
-			padding: 10rpx 15rpx ;
-			border-radius: 20rpx;
-			.content-row{
-				padding: 10rpx 0;
-				.row-1{
-					width: 210rpx;
-					position: relative;
-					margin-right: 20rpx;
-					text-align: center;
-					.row-1-1{
-						text-align: center;
-						height:40rpx;
-						background:#fff1ee;
-						border-radius:6rpx;
-						font-size:22rpx;
-						font-weight:500;
-						color:#fb4912;
-						line-height:40rpx;
-						image{
-							width: 23rpx;
-							height: 23rpx;
-							margin-right: 5rpx;
-						}
-					}
-					.img1{
-						width:170rpx;
-						height:170rpx;
-						border-radius:10rpx;
-					}
-					.img2{
-						position: absolute;
-						top: 0;
-						left: 16rpx;
-						width:80rpx;
-						height:32rpx;
-						border-radius:5px;
-					}
-				}
-				.row-2{
-					padding: 20rpx 0 20rpx 0;
-					width:calc(100% - 210rpx);
-					position: relative;
-					
-					border-bottom: 1px solid #EAEAEA;
-					.word-1{
-						font-size:32rpx;
-						font-weight:bold;
-						color:#141821;
-						margin-left: 10rpx;
-						overflow: hidden;
-						text-overflow: ellipsis;
-						white-space: nowrap;
-					}
-					.word-2{
-						margin-top: 10rpx;
-						font-size:24rpx;
-						color:#979797;
-					}
-					.word-3{
-						margin-top: 10rpx;
-						position: relative;
-						font-size:20rpx;
-						color:#ffffff;
-						image{
-							width: 235rpx;
-							height: 50rpx;
-						}
-						.word-3-1{
-							position: absolute;
-							top:8px;
-							left:2px;
-							width: 230rpx;
-							text-align: center;
-							.word-3-1-1{
-								display: inline-block;
-								color:#FD1B2A;
-								width: 50%;
-							}
-							
-						}
-					}
-					.word-4{
-						margin-top: 15rpx;
-						font-size:23rpx;
-						color:#fd1b2a;
-						margin-left: 10rpx;
-						text{
-							font-size:23rpx;
-							font-weight:bold;
-						}
-						.word-4-1{
-							font-size:36rpx;
-						}
-					}
-					.word-5{
-						margin-top: 15rpx;
-						font-size:21rpx;
-						color:#868686;
-					}
-					.button{
-						width:145rpx;
-						height:60rpx;
-						background:linear-gradient(14deg,#ff7425,#ff1e29);
-						border-radius:30rpx;
-						font-size:27rpx;
-						font-weight:bold;
-						color:#ffffff;
-						line-height:60rpx;
-						text-align: center;
-						
-						position: absolute;
-						bottom: 20rpx;
-						right: 0;
-					}
-				}
-			}
-		}
-	}
-</style>

+ 0 - 68
components/returnButton.vue

@@ -1,68 +0,0 @@
-<template>
-	<view class="content">
-		<view class="retun-Box" @click="navTo('/pages/order/order?state=0')">
-			<image class="return-img" src=".././static/tabBar/dingdan.png"></image>
-			<view class="return-text">订单</view>
-		</view>
-		<view class="retun-Box" @click="GoHome">
-			<image class="return-img" src=".././static/tabBar/home.png" ></image>
-			<view class="return-text">首页</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	props: {
-		
-	},
-	data() {
-		return {
-			
-		}
-	},
-	methods: {
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			})
-		},
-		GoHome() {
-			// uni.navigateTo({
-			// 	url: '/pages/groupBooking/index'
-			// })
-			uni.switchTab({
-				url: '/pages/index/index'
-			})
-		}
-	}
-}
-</script>
-
-<style lang="scss">
-.content {
-	position: fixed;
-	right: 0;
-	bottom: 330rpx;
-	.retun-Box {
-		border-radius: 50%;
-		background: #FFFFFF;
-		width: 100rpx;
-		height: 100rpx;
-		margin-top: 30rpx;
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		box-shadow: 0 6rpx 20rpx #888888;
-		.return-img {
-			width: 40rpx;
-			height: 40rpx;
-		}
-		.return-text {
-			font-size: $font-sm;
-			margin-top: 8rpx;
-		}
-	}
-}
-</style>

+ 0 - 246
components/seckill/seckill.vue

@@ -1,246 +0,0 @@
-<template>
-	<view class="seckill-section m-t" v-if="show">
-		<view class="s-header">
-			<view class="f-left-icon"></view>
-			<view class="tit-box"><text class="tit">限时秒杀</text></view>
-			<view class="tip-box">
-				<text class="tip" v-if="status == 1">{{ showTime }}点场结束</text>
-				<text class="tip" v-if="status == 2">距离下场开始</text>
-				<text class="tip" v-if="status == 0">当天活动已结束</text>
-				<uni-countdown v-if="status == 1 || status == 2" :show-day="false" :hour="stopTimeH" :minute="stopTimeM" :second="stopTimeS"></uni-countdown>
-			</view>
-			<view class="textNav iconfont iconenter" @click="navTo('/pages/product/seckill')">更多</view>
-		</view>
-		<scroll-view class="floor-list" scroll-x>
-			<view class="scoll-wrapper position-relative" @click="navTo('/pages/product/seckill')">
-				<view v-for="(item, index) in list" :key="index" class="floor-item">
-					<image class="list-image" :src="item.image" mode="aspectFill"></image>
-					<text class="title clamp">{{ item.title }}</text>
-					<text class="price">¥{{ item.price }}</text>
-				</view>
-				<view v-if="list.length == 0" class="floor-item ">
-					<image class="list-image" mode="aspectFill"></image>
-					<text class="title clamp"></text>
-					<text class="price"></text>
-				</view>
-				<view v-if="list.length == 0" class="noGoodsBg"><view>敬请期待</view></view>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-
-<script>
-import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
-import { getSeckillList, getSeckillClass } from '@/api/product.js';
-import { timeComputed } from '@/utils/rocessor.js';
-export default {
-	components: {
-		uniCountdown
-	},
-	data() {
-		return {
-			list: [],
-			page: 1,
-			limit: 10,
-			showTime: '', //显示的时间
-			showTImeId: '', //显示时间id用于查询数据
-			stopTimeH: 0,
-			stopTimeM: 0,
-			stopTimeS: 0,
-			// 判断是否所有活动已经结束
-			stop: false, //活动是否已经结束
-			show: false, //是否显示活动
-			status: 0 //获取状态值1为有活动开始中 2为活动未开始 0为活动已经结束
-		};
-	},
-	created: function(e) {
-		// 载入分类
-		this.getClass();
-	},
-	methods: {
-		navTo(url) {
-			uni.navigateTo({
-				url
-			});
-		},
-		getList() {
-			getSeckillList(
-				{
-					page: this.page,
-					limit: this.limit
-				},
-				this.showTImeId
-			)
-				.then(e => {
-					this.list = e.data;
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		getClass() {
-			let obj = this;
-			getSeckillClass({})
-				.then(({ data }) => {
-					let arr = data.seckillTime;
-					// 用于判断是否有数据
-					let showDate = false;
-					for (var i = 0; i < arr.length; i++) {
-						let ar = arr[i];
-						if (ar.status === 1 || ar.status === 2) {
-							obj.status = ar.status;
-							// 保存要显示的场次时间
-							obj.showTime = ar.time;
-							// 保存要显示活动商品的id
-							obj.showTImeId = ar.id;
-							// 保存当前状态值
-							// 计算倒计时时间
-							if (ar.status === 1) {
-								obj.timeComputed(ar.stop * 1000);
-							} else {
-								// 获取需要开始
-								let arTime = ar.time.split(':');
-								let h = arTime[0];
-								let m = arTime[1];
-								let time = new Date();
-								// 设置时间
-								time.setHours(h, m, 0);
-								obj.timeComputed(time.getTime());
-							}
-							// 获取商品列表
-							obj.getList();
-							// 保存当前有活动在举行
-							showDate = true;
-							// 任务查询结束跳出循环
-							break;
-						}
-					}
-					// 判断是否有活动
-					if (arr.length > 0) {
-						obj.show = true;
-					}
-					// 判断今天活动是否已经全部结束
-					if (!showDate) {
-						// 保存活动结束最后一个小时的活动商品
-						obj.showTImeId = arr[arr.length - 1].id;
-						// 活动已经结束
-						obj.status = 0;
-						// 获取结束时的商品
-						obj.getList();
-						console.log(obj.status);
-					}
-					// 如果所有场次均已经结束
-				})
-				.catch(e => {
-					uni.showModal({
-						title: JSON.stringify(e)
-					});
-				});
-		},
-		// 计算倒计时时间
-		timeComputed(da) {
-			let obj = this;
-			let stopTime = timeComputed(da)
-			obj.stopTimeH =stopTime.hours;
-			obj.stopTimeM = stopTime.minutes;
-			obj.stopTimeS =stopTime.seconds;
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-/* 秒杀专区 */
-.seckill-section {
-	padding: 4rpx 30rpx 24rpx;
-	.s-header {
-		display: flex;
-		align-items: center;
-		height: 92rpx;
-		line-height: 1;
-		.tit-box {
-			flex-shrink: 0;
-		}
-		.tit {
-			@extend %font-title;
-		}
-		.f-left-icon {
-			@extend %f-left-icon;
-		}
-		.textNav {
-			line-height: 1;
-			padding: 15rpx 0;
-			flex-shrink: 0;
-			flex-grow: 1;
-			min-width: 100rpx;
-		}
-		.tip-box {
-			flex-grow: 1;
-			display: flex;
-			justify-content: flex-start;
-			align-items: center;
-		}
-		.tip {
-			font-size: $font-sm;
-			color: $font-color-light;
-			padding-left: 10rpx;
-			padding-right: 10rpx;
-		}
-		.timer {
-			display: inline-block;
-			width: 40rpx;
-			height: 36rpx;
-			text-align: center;
-			line-height: 36rpx;
-			margin-right: 14rpx;
-			font-size: $font-sm + 2rpx;
-			color: #fff;
-			border-radius: 2px;
-			background: rgba(0, 0, 0, 0.8);
-		}
-		.iconenter {
-			font-size: $font-sm;
-			color: $font-color-light;
-			flex: 1;
-			text-align: right;
-		}
-	}
-	.floor-list {
-		white-space: nowrap;
-		background-color: white;
-		padding: 20rpx;
-		border-radius: 5rpx;
-		box-shadow: $box-shadow;
-	}
-	.scoll-wrapper {
-		display: flex;
-		align-items: flex-start;
-		.noGoodsBg {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			height: 100%;
-			position: absolute;
-			top: 0;
-			left: 0;
-			width: 100%;
-			color: $font-color-light;
-		}
-		.floor-item {
-			width: 150rpx;
-			margin-right: 20rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-dark;
-			line-height: 1.8;
-			.list-image {
-				width: 150rpx;
-				height: 150rpx;
-				border-radius: 6rpx;
-			}
-			.price {
-				color: $color-red;
-			}
-		}
-	}
-}
-</style>

+ 0 - 196
components/share.vue

@@ -1,196 +0,0 @@
-<template>
-	<view v-if="show" class="mask" @click="toggleMask" @touchmove.stop.prevent="stopPrevent" :style="{ backgroundColor: backgroundColor }">
-		<view
-			class="mask-content"
-			@click.stop.prevent="stopPrevent"
-			:style="[
-				{
-					height: config.height,
-					transform: transform
-				}
-			]"
-		>
-			<scroll-view class="view-content" scroll-y>
-				<view class="share-header">分享到</view>
-				<view class="share-list">
-					<view v-for="(item, index) in shareList" :key="index" class="share-item" @click="shareToFriend(item.text)">
-						<image class="itemImage" :src="item.icon" mode=""></image>
-						<text class="itemText">{{ item.text }}</text>
-					</view>
-				</view>
-			</scroll-view>
-			<view class="bottomButtom b-t" @click="toggleMask">取消</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			transform: 'translateY(50vh)',
-			timer: 0,
-			backgroundColor: 'rgba(0,0,0,0)',
-			show: false,
-			config: {}
-		};
-	},
-	props: {
-		contentHeight: {
-			type: Number,
-			default: 0
-		},
-		//是否是tabbar页面
-		hasTabbar: {
-			type: Boolean,
-			default: false
-		},
-		shareList: {
-			type: Array,
-			default: function() {
-				return [];
-			}
-		}
-	},
-	created() {
-		const height = uni.upx2px(this.contentHeight) + 'px';
-		this.config = {
-			height: height,
-			transform: `translateY(${height})`,
-			backgroundColor: 'rgba(0,0,0,.4)'
-		};
-		this.transform = this.config.transform;
-	},
-	methods: {
-		toggleMask() {
-			//防止高频点击
-			if (this.timer == 1) {
-				return;
-			}
-			this.timer = 1;
-			setTimeout(() => {
-				this.timer = 0;
-			}, 500);
-
-			if (this.show) {
-				this.transform = this.config.transform;
-				this.backgroundColor = 'rgba(0,0,0,0)';
-				setTimeout(() => {
-					this.show = false;
-					this.hasTabbar && uni.showTabBar();
-				}, 200);
-				return;
-			}
-
-			this.show = true;
-			//等待mask重绘完成执行
-			if (this.hasTabbar) {
-				uni.hideTabBar({
-					success: () => {
-						setTimeout(() => {
-							this.backgroundColor = this.config.backgroundColor;
-							this.transform = 'translateY(0px)';
-						}, 10);
-					}
-				});
-			} else {
-				setTimeout(() => {
-					this.backgroundColor = this.config.backgroundColor;
-					this.transform = 'translateY(0px)';
-				}, 10);
-			}
-		},
-		//防止冒泡和滚动穿透
-		stopPrevent() {},
-		//分享操作
-		shareToFriend(type) {
-			this.$api.msg(`分享给${type}`);
-			this.toggleMask();
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.mask {
-	position: fixed;
-	left: 0;
-	top: 0;
-	right: 0;
-	bottom: 0;
-	display: flex;
-	justify-content: center;
-	align-items: flex-end;
-	z-index: 998;
-	transition: 0.3s;
-	.bottomButtom {
-		position: absolute;
-		left: 0;
-		bottom: 0;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		width: 100%;
-		height: 90rpx;
-		background: #fff;
-		z-index: 9;
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
-	}
-}
-.mask-content {
-	width: 100%;
-	height: 580rpx;
-	transition: 0.3s;
-	background: #fff;
-	&.has-bottom {
-		padding-bottom: 90rpx;
-	}
-	.view-content {
-		height: 100%;
-	}
-}
-.share-header {
-	height: 110rpx;
-	font-size: $font-base + 2rpx;
-	color: font-color-dark;
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	padding-top: 10rpx;
-	&:before,
-	&:after {
-		content: '';
-		width: 240rpx;
-		heighg: 0;
-		border-top: 1px solid $border-color-base;
-		transform: scaleY(0.5);
-		margin-right: 30rpx;
-	}
-	&:after {
-		margin-left: 30rpx;
-		margin-right: 0;
-	}
-}
-.share-list {
-	display: flex;
-	flex-wrap: wrap;
-}
-.share-item {
-	min-width: 33.33%;
-	display: flex;
-	flex-direction: column;
-	justify-content: center;
-	align-items: center;
-	height: 180rpx;
-	.itemImage {
-		width: 80rpx;
-		height: 80rpx;
-		margin-bottom: 16rpx;
-	}
-	.itemText {
-		font-size: $font-base;
-		color: $font-color-base;
-	}
-}
-</style>

+ 0 - 218
components/ss-calendar/ss-calendar.vue

@@ -1,218 +0,0 @@
-<template>
-	<view class="calendar__wrap">
-		<view class="header">
-			<view class="current-date">{{ currentDate }}</view>
-		</view>
-		<view class="body">
-			<view class="weeks">
-				<view class="week__item" v-for="week in weeks" :key="week">{{ week }}</view>
-			</view>
-			<view class="day__list">
-				<view class="day__item" v-for="(item, index) in dateData" :key="index">
-					<view class="checked-box" :class="[checksClass]" v-if="item === 'checked'">
-						<text class="checked iconfont iconfavor" v-if="!checksIcon"></text>
-						<image v-else :src="checksIcon" mode="aspectFit"></image>
-						<view class="check_text" v-if="checkTextShow">{{ dayLoad(index) }}</view>
-					</view>
-					<text class="current-box" :class="[item === day ? (actionClass ? actionClass : 'current') : '']" v-else>{{ item }}</text>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-export default {
-	props: {
-		//选中的日期数据
-		checks: {
-			type: Array,
-			default() {
-				// 例子[1,2,3,4],表示本月1,2,3,4号4天被选中
-				return [];
-			}
-		},
-		// 选中物品的样式类
-		checksClass: {
-			type: String,
-			default: ''
-		},
-		// 选中时图标
-		checksIcon: {
-			type: String
-		},
-		// 选中时是否显示文字
-		checkTextShow: {
-			type: Boolean, 
-			default: false
-		},
-		// 表示当前日期的样式
-		actionClass: {
-			type: String,
-			default: ''
-		}
-	},
-	data() {
-		const { year, month, day } = this.getDate();
-		const dateData = this.getDateData(year, month);
-		const noDay = ( new Date(year,month-1,1)).getDay();
-		return {
-			year,
-			month,
-			day,
-			dateData,
-			noDay,//本月1号是星期几
-			weeks: ['日', '一', '二', '三', '四', '五', '六'],
-		};
-	},
-	computed: {
-		// 获取当前日期
-		currentDate() {
-			return `${this.year}-${this.format(this.month)}`;
-		}
-	},
-	watch: {
-		checks(val) {
-			const { year, month } = this.getDate();
-			const dateData = this.getDateData(year, month);
-			// 保存当前月份信息
-			this.dateData = dateData;
-		},
-	},
-	methods: {
-		// 重新计算时间
-		dayLoad: function(value) {
-			return value + 1 - this.noDay;
-		},
-		// 获取当前日期
-		getDate(current) {
-			const date = current ? new Date(current) : new Date();
-			const year = date.getFullYear();
-			// 月份值默认从0开始
-			const month = date.getMonth() + 1;
-			const day = date.getDate();
-			return {
-				year,
-				month,
-				day
-			};
-		},
-		// 日期处理
-		getDateData(year, month) {
-			// 新增月份时需要减少1个月
-			const date = new Date(year,month-1,1);
-			const firstDayWeek = date.getDay();
-			const data = [...this.getEmptys(firstDayWeek), ...this.getDays(firstDayWeek)];
-			return data;
-		},
-		// 查询日期列表有几个空格
-		getEmptys(count) {
-			let arr = [];
-			if (count) {
-				for (let i = 0; i < count; i++) {
-					arr.push('');
-				}
-			}
-			return arr;
-		},
-		getLastDay() {
-			let { year, month } = this.getDate();
-			month += 1;
-			if (month > 11) {
-				year += 1;
-				month = 1;
-			}
-			let firstDayTimeStamp = new Date(`${year}/${month}/1`).getTime();
-			let oneDayTimeStamp = 24 * 60 * 60 * 1000;
-			let lastDay = new Date(firstDayTimeStamp - oneDayTimeStamp).getDate();
-			return lastDay;
-		},
-		getDays() {
-			const lastDay = this.getLastDay();
-			const days = [];
-			for (let i = 1; i <= lastDay; i++) {
-				days.push(this.checks.includes(i) ? 'checked' : i);
-			}
-			return days;
-		},
-		format(num) {
-			return num < 10 ? `0${num}` : num;
-		}
-	}
-};
-</script>
-
-<style lang="scss" scoped>
-.calendar__wrap {
-	background-color: #fff;
-	color: $uni-text-color;
-	.header {
-		padding: 0 24rpx;
-		.current-date {
-			text-align: center;
-			font-size: $font-lg + 2rpx;
-			// border-bottom: 2rpx solid #eee;
-			padding: 32rpx 0;
-		}
-	}
-	.body {
-		.weeks {
-			display: flex;
-			font-size: $font-lg;
-			padding: 10rpx 0;
-			background-color: #f4f7ff;
-			.week__item {
-				flex: 1;
-				text-align: center;
-			}
-		}
-		.day__list {
-			display: flex;
-			flex-wrap: wrap;
-			.day__item {
-				display: flex;
-				justify-content: center;
-				width: 14.285%;
-				text-align: center;
-				padding: 30rpx 0;
-				font-size: 34rpx;
-				color: $font-color-light;
-				.checked-box,
-				.current-box {
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					border-radius: 100%;
-					box-sizing: border-box;
-					position: relative;
-				}
-				image,
-				.checked-box,
-				.current-box,
-				.check_text {
-					width: 56rpx;
-					height: 56rpx;
-					line-height: 56rpx;
-				}
-				image,
-				.check_text {
-					position: absolute;
-					top: 0;
-					left: 0;
-				}
-				.checked {
-					font-size: 40rpx;
-					background-color: #3f9dff;
-					color: #fff;
-				}
-				.current {
-					padding: 12rpx;
-					background-color: $background-color;
-					color: #fff;
-					font-size: 28rpx;
-				}
-			}
-		}
-	}
-}
-</style>

+ 0 - 1201
components/tki-qrcode/qrcode.js

@@ -1,1201 +0,0 @@
-let QRCode = {};
-(function () {
-    /**
-     * 获取单个字符的utf8编码
-     * unicode BMP平面约65535个字符
-     * @param {num} code
-     * return {array}
-     */
-    function unicodeFormat8(code) {
-        // 1 byte
-        var c0, c1, c2;
-        if (code < 128) {
-            return [code];
-            // 2 bytes
-        } else if (code < 2048) {
-            c0 = 192 + (code >> 6);
-            c1 = 128 + (code & 63);
-            return [c0, c1];
-            // 3 bytes
-        } else {
-            c0 = 224 + (code >> 12);
-            c1 = 128 + (code >> 6 & 63);
-            c2 = 128 + (code & 63);
-            return [c0, c1, c2];
-        }
-    }
-    /**
-     * 获取字符串的utf8编码字节串
-     * @param {string} string
-     * @return {array}
-     */
-    function getUTF8Bytes(string) {
-        var utf8codes = [];
-        for (var i = 0; i < string.length; i++) {
-            var code = string.charCodeAt(i);
-            var utf8 = unicodeFormat8(code);
-            for (var j = 0; j < utf8.length; j++) {
-                utf8codes.push(utf8[j]);
-            }
-        }
-        return utf8codes;
-    }
-    /**
-     * 二维码算法实现
-     * @param {string} data              要编码的信息字符串
-     * @param {num} errorCorrectLevel 纠错等级
-     */
-    function QRCodeAlg(data, errorCorrectLevel) {
-        this.typeNumber = -1; //版本
-        this.errorCorrectLevel = errorCorrectLevel;
-        this.modules = null; //二维矩阵,存放最终结果
-        this.moduleCount = 0; //矩阵大小
-        this.dataCache = null; //数据缓存
-        this.rsBlocks = null; //版本数据信息
-        this.totalDataCount = -1; //可使用的数据量
-        this.data = data;
-        this.utf8bytes = getUTF8Bytes(data);
-        this.make();
-    }
-    QRCodeAlg.prototype = {
-        constructor: QRCodeAlg,
-        /**
-         * 获取二维码矩阵大小
-         * @return {num} 矩阵大小
-         */
-        getModuleCount: function () {
-            return this.moduleCount;
-        },
-        /**
-         * 编码
-         */
-        make: function () {
-            this.getRightType();
-            this.dataCache = this.createData();
-            this.createQrcode();
-        },
-        /**
-         * 设置二位矩阵功能图形
-         * @param  {bool} test 表示是否在寻找最好掩膜阶段
-         * @param  {num} maskPattern 掩膜的版本
-         */
-        makeImpl: function (maskPattern) {
-            this.moduleCount = this.typeNumber * 4 + 17;
-            this.modules = new Array(this.moduleCount);
-            for (var row = 0; row < this.moduleCount; row++) {
-                this.modules[row] = new Array(this.moduleCount);
-            }
-            this.setupPositionProbePattern(0, 0);
-            this.setupPositionProbePattern(this.moduleCount - 7, 0);
-            this.setupPositionProbePattern(0, this.moduleCount - 7);
-            this.setupPositionAdjustPattern();
-            this.setupTimingPattern();
-            this.setupTypeInfo(true, maskPattern);
-            if (this.typeNumber >= 7) {
-                this.setupTypeNumber(true);
-            }
-            this.mapData(this.dataCache, maskPattern);
-        },
-        /**
-         * 设置二维码的位置探测图形
-         * @param  {num} row 探测图形的中心横坐标
-         * @param  {num} col 探测图形的中心纵坐标
-         */
-        setupPositionProbePattern: function (row, col) {
-            for (var r = -1; r <= 7; r++) {
-                if (row + r <= -1 || this.moduleCount <= row + r) continue;
-                for (var c = -1; c <= 7; c++) {
-                    if (col + c <= -1 || this.moduleCount <= col + c) continue;
-                    if ((0 <= r && r <= 6 && (c == 0 || c == 6)) || (0 <= c && c <= 6 && (r == 0 || r == 6)) || (2 <= r && r <= 4 && 2 <= c && c <= 4)) {
-                        this.modules[row + r][col + c] = true;
-                    } else {
-                        this.modules[row + r][col + c] = false;
-                    }
-                }
-            }
-        },
-        /**
-         * 创建二维码
-         * @return {[type]} [description]
-         */
-        createQrcode: function () {
-            var minLostPoint = 0;
-            var pattern = 0;
-            var bestModules = null;
-            for (var i = 0; i < 8; i++) {
-                this.makeImpl(i);
-                var lostPoint = QRUtil.getLostPoint(this);
-                if (i == 0 || minLostPoint > lostPoint) {
-                    minLostPoint = lostPoint;
-                    pattern = i;
-                    bestModules = this.modules;
-                }
-            }
-            this.modules = bestModules;
-            this.setupTypeInfo(false, pattern);
-            if (this.typeNumber >= 7) {
-                this.setupTypeNumber(false);
-            }
-        },
-        /**
-         * 设置定位图形
-         * @return {[type]} [description]
-         */
-        setupTimingPattern: function () {
-            for (var r = 8; r < this.moduleCount - 8; r++) {
-                if (this.modules[r][6] != null) {
-                    continue;
-                }
-                this.modules[r][6] = (r % 2 == 0);
-                if (this.modules[6][r] != null) {
-                    continue;
-                }
-                this.modules[6][r] = (r % 2 == 0);
-            }
-        },
-        /**
-         * 设置矫正图形
-         * @return {[type]} [description]
-         */
-        setupPositionAdjustPattern: function () {
-            var pos = QRUtil.getPatternPosition(this.typeNumber);
-            for (var i = 0; i < pos.length; i++) {
-                for (var j = 0; j < pos.length; j++) {
-                    var row = pos[i];
-                    var col = pos[j];
-                    if (this.modules[row][col] != null) {
-                        continue;
-                    }
-                    for (var r = -2; r <= 2; r++) {
-                        for (var c = -2; c <= 2; c++) {
-                            if (r == -2 || r == 2 || c == -2 || c == 2 || (r == 0 && c == 0)) {
-                                this.modules[row + r][col + c] = true;
-                            } else {
-                                this.modules[row + r][col + c] = false;
-                            }
-                        }
-                    }
-                }
-            }
-        },
-        /**
-         * 设置版本信息(7以上版本才有)
-         * @param  {bool} test 是否处于判断最佳掩膜阶段
-         * @return {[type]}      [description]
-         */
-        setupTypeNumber: function (test) {
-            var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
-            for (var i = 0; i < 18; i++) {
-                var mod = (!test && ((bits >> i) & 1) == 1);
-                this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
-                this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
-            }
-        },
-        /**
-         * 设置格式信息(纠错等级和掩膜版本)
-         * @param  {bool} test
-         * @param  {num} maskPattern 掩膜版本
-         * @return {}
-         */
-        setupTypeInfo: function (test, maskPattern) {
-            var data = (QRErrorCorrectLevel[this.errorCorrectLevel] << 3) | maskPattern;
-            var bits = QRUtil.getBCHTypeInfo(data);
-            // vertical
-            for (var i = 0; i < 15; i++) {
-                var mod = (!test && ((bits >> i) & 1) == 1);
-                if (i < 6) {
-                    this.modules[i][8] = mod;
-                } else if (i < 8) {
-                    this.modules[i + 1][8] = mod;
-                } else {
-                    this.modules[this.moduleCount - 15 + i][8] = mod;
-                }
-                // horizontal
-                var mod = (!test && ((bits >> i) & 1) == 1);
-                if (i < 8) {
-                    this.modules[8][this.moduleCount - i - 1] = mod;
-                } else if (i < 9) {
-                    this.modules[8][15 - i - 1 + 1] = mod;
-                } else {
-                    this.modules[8][15 - i - 1] = mod;
-                }
-            }
-            // fixed module
-            this.modules[this.moduleCount - 8][8] = (!test);
-        },
-        /**
-         * 数据编码
-         * @return {[type]} [description]
-         */
-        createData: function () {
-            var buffer = new QRBitBuffer();
-            var lengthBits = this.typeNumber > 9 ? 16 : 8;
-            buffer.put(4, 4); //添加模式
-            buffer.put(this.utf8bytes.length, lengthBits);
-            for (var i = 0, l = this.utf8bytes.length; i < l; i++) {
-                buffer.put(this.utf8bytes[i], 8);
-            }
-            if (buffer.length + 4 <= this.totalDataCount * 8) {
-                buffer.put(0, 4);
-            }
-            // padding
-            while (buffer.length % 8 != 0) {
-                buffer.putBit(false);
-            }
-            // padding
-            while (true) {
-                if (buffer.length >= this.totalDataCount * 8) {
-                    break;
-                }
-                buffer.put(QRCodeAlg.PAD0, 8);
-                if (buffer.length >= this.totalDataCount * 8) {
-                    break;
-                }
-                buffer.put(QRCodeAlg.PAD1, 8);
-            }
-            return this.createBytes(buffer);
-        },
-        /**
-         * 纠错码编码
-         * @param  {buffer} buffer 数据编码
-         * @return {[type]}
-         */
-        createBytes: function (buffer) {
-            var offset = 0;
-            var maxDcCount = 0;
-            var maxEcCount = 0;
-            var length = this.rsBlock.length / 3;
-            var rsBlocks = new Array();
-            for (var i = 0; i < length; i++) {
-                var count = this.rsBlock[i * 3 + 0];
-                var totalCount = this.rsBlock[i * 3 + 1];
-                var dataCount = this.rsBlock[i * 3 + 2];
-                for (var j = 0; j < count; j++) {
-                    rsBlocks.push([dataCount, totalCount]);
-                }
-            }
-            var dcdata = new Array(rsBlocks.length);
-            var ecdata = new Array(rsBlocks.length);
-            for (var r = 0; r < rsBlocks.length; r++) {
-                var dcCount = rsBlocks[r][0];
-                var ecCount = rsBlocks[r][1] - dcCount;
-                maxDcCount = Math.max(maxDcCount, dcCount);
-                maxEcCount = Math.max(maxEcCount, ecCount);
-                dcdata[r] = new Array(dcCount);
-                for (var i = 0; i < dcdata[r].length; i++) {
-                    dcdata[r][i] = 0xff & buffer.buffer[i + offset];
-                }
-                offset += dcCount;
-                var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
-                var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
-                var modPoly = rawPoly.mod(rsPoly);
-                ecdata[r] = new Array(rsPoly.getLength() - 1);
-                for (var i = 0; i < ecdata[r].length; i++) {
-                    var modIndex = i + modPoly.getLength() - ecdata[r].length;
-                    ecdata[r][i] = (modIndex >= 0) ? modPoly.get(modIndex) : 0;
-                }
-            }
-            var data = new Array(this.totalDataCount);
-            var index = 0;
-            for (var i = 0; i < maxDcCount; i++) {
-                for (var r = 0; r < rsBlocks.length; r++) {
-                    if (i < dcdata[r].length) {
-                        data[index++] = dcdata[r][i];
-                    }
-                }
-            }
-            for (var i = 0; i < maxEcCount; i++) {
-                for (var r = 0; r < rsBlocks.length; r++) {
-                    if (i < ecdata[r].length) {
-                        data[index++] = ecdata[r][i];
-                    }
-                }
-            }
-            return data;
-
-        },
-        /**
-         * 布置模块,构建最终信息
-         * @param  {} data
-         * @param  {} maskPattern
-         * @return {}
-         */
-        mapData: function (data, maskPattern) {
-            var inc = -1;
-            var row = this.moduleCount - 1;
-            var bitIndex = 7;
-            var byteIndex = 0;
-            for (var col = this.moduleCount - 1; col > 0; col -= 2) {
-                if (col == 6) col--;
-                while (true) {
-                    for (var c = 0; c < 2; c++) {
-                        if (this.modules[row][col - c] == null) {
-                            var dark = false;
-                            if (byteIndex < data.length) {
-                                dark = (((data[byteIndex] >>> bitIndex) & 1) == 1);
-                            }
-                            var mask = QRUtil.getMask(maskPattern, row, col - c);
-                            if (mask) {
-                                dark = !dark;
-                            }
-                            this.modules[row][col - c] = dark;
-                            bitIndex--;
-                            if (bitIndex == -1) {
-                                byteIndex++;
-                                bitIndex = 7;
-                            }
-                        }
-                    }
-                    row += inc;
-                    if (row < 0 || this.moduleCount <= row) {
-                        row -= inc;
-                        inc = -inc;
-                        break;
-                    }
-                }
-            }
-        }
-    };
-    /**
-     * 填充字段
-     */
-    QRCodeAlg.PAD0 = 0xEC;
-    QRCodeAlg.PAD1 = 0x11;
-    //---------------------------------------------------------------------
-    // 纠错等级对应的编码
-    //---------------------------------------------------------------------
-    var QRErrorCorrectLevel = [1, 0, 3, 2];
-    //---------------------------------------------------------------------
-    // 掩膜版本
-    //---------------------------------------------------------------------
-    var QRMaskPattern = {
-        PATTERN000: 0,
-        PATTERN001: 1,
-        PATTERN010: 2,
-        PATTERN011: 3,
-        PATTERN100: 4,
-        PATTERN101: 5,
-        PATTERN110: 6,
-        PATTERN111: 7
-    };
-    //---------------------------------------------------------------------
-    // 工具类
-    //---------------------------------------------------------------------
-    var QRUtil = {
-        /*
-        每个版本矫正图形的位置
-         */
-        PATTERN_POSITION_TABLE: [
-            [],
-            [6, 18],
-            [6, 22],
-            [6, 26],
-            [6, 30],
-            [6, 34],
-            [6, 22, 38],
-            [6, 24, 42],
-            [6, 26, 46],
-            [6, 28, 50],
-            [6, 30, 54],
-            [6, 32, 58],
-            [6, 34, 62],
-            [6, 26, 46, 66],
-            [6, 26, 48, 70],
-            [6, 26, 50, 74],
-            [6, 30, 54, 78],
-            [6, 30, 56, 82],
-            [6, 30, 58, 86],
-            [6, 34, 62, 90],
-            [6, 28, 50, 72, 94],
-            [6, 26, 50, 74, 98],
-            [6, 30, 54, 78, 102],
-            [6, 28, 54, 80, 106],
-            [6, 32, 58, 84, 110],
-            [6, 30, 58, 86, 114],
-            [6, 34, 62, 90, 118],
-            [6, 26, 50, 74, 98, 122],
-            [6, 30, 54, 78, 102, 126],
-            [6, 26, 52, 78, 104, 130],
-            [6, 30, 56, 82, 108, 134],
-            [6, 34, 60, 86, 112, 138],
-            [6, 30, 58, 86, 114, 142],
-            [6, 34, 62, 90, 118, 146],
-            [6, 30, 54, 78, 102, 126, 150],
-            [6, 24, 50, 76, 102, 128, 154],
-            [6, 28, 54, 80, 106, 132, 158],
-            [6, 32, 58, 84, 110, 136, 162],
-            [6, 26, 54, 82, 110, 138, 166],
-            [6, 30, 58, 86, 114, 142, 170]
-        ],
-        G15: (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),
-        G18: (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),
-        G15_MASK: (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1),
-        /*
-        BCH编码格式信息
-         */
-        getBCHTypeInfo: function (data) {
-            var d = data << 10;
-            while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
-                d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15)));
-            }
-            return ((data << 10) | d) ^ QRUtil.G15_MASK;
-        },
-        /*
-        BCH编码版本信息
-         */
-        getBCHTypeNumber: function (data) {
-            var d = data << 12;
-            while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
-                d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18)));
-            }
-            return (data << 12) | d;
-        },
-        /*
-        获取BCH位信息
-         */
-        getBCHDigit: function (data) {
-            var digit = 0;
-            while (data != 0) {
-                digit++;
-                data >>>= 1;
-            }
-            return digit;
-        },
-        /*
-        获取版本对应的矫正图形位置
-         */
-        getPatternPosition: function (typeNumber) {
-            return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
-        },
-        /*
-        掩膜算法
-         */
-        getMask: function (maskPattern, i, j) {
-            switch (maskPattern) {
-                case QRMaskPattern.PATTERN000:
-                    return (i + j) % 2 == 0;
-                case QRMaskPattern.PATTERN001:
-                    return i % 2 == 0;
-                case QRMaskPattern.PATTERN010:
-                    return j % 3 == 0;
-                case QRMaskPattern.PATTERN011:
-                    return (i + j) % 3 == 0;
-                case QRMaskPattern.PATTERN100:
-                    return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;
-                case QRMaskPattern.PATTERN101:
-                    return (i * j) % 2 + (i * j) % 3 == 0;
-                case QRMaskPattern.PATTERN110:
-                    return ((i * j) % 2 + (i * j) % 3) % 2 == 0;
-                case QRMaskPattern.PATTERN111:
-                    return ((i * j) % 3 + (i + j) % 2) % 2 == 0;
-                default:
-                    throw new Error("bad maskPattern:" + maskPattern);
-            }
-        },
-        /*
-        获取RS的纠错多项式
-         */
-        getErrorCorrectPolynomial: function (errorCorrectLength) {
-            var a = new QRPolynomial([1], 0);
-            for (var i = 0; i < errorCorrectLength; i++) {
-                a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
-            }
-            return a;
-        },
-        /*
-        获取评价
-         */
-        getLostPoint: function (qrCode) {
-            var moduleCount = qrCode.getModuleCount(),
-                lostPoint = 0,
-                darkCount = 0;
-            for (var row = 0; row < moduleCount; row++) {
-                var sameCount = 0;
-                var head = qrCode.modules[row][0];
-                for (var col = 0; col < moduleCount; col++) {
-                    var current = qrCode.modules[row][col];
-                    //level 3 评价
-                    if (col < moduleCount - 6) {
-                        if (current && !qrCode.modules[row][col + 1] && qrCode.modules[row][col + 2] && qrCode.modules[row][col + 3] && qrCode.modules[row][col + 4] && !qrCode.modules[row][col + 5] && qrCode.modules[row][col + 6]) {
-                            if (col < moduleCount - 10) {
-                                if (qrCode.modules[row][col + 7] && qrCode.modules[row][col + 8] && qrCode.modules[row][col + 9] && qrCode.modules[row][col + 10]) {
-                                    lostPoint += 40;
-                                }
-                            } else if (col > 3) {
-                                if (qrCode.modules[row][col - 1] && qrCode.modules[row][col - 2] && qrCode.modules[row][col - 3] && qrCode.modules[row][col - 4]) {
-                                    lostPoint += 40;
-                                }
-                            }
-                        }
-                    }
-                    //level 2 评价
-                    if ((row < moduleCount - 1) && (col < moduleCount - 1)) {
-                        var count = 0;
-                        if (current) count++;
-                        if (qrCode.modules[row + 1][col]) count++;
-                        if (qrCode.modules[row][col + 1]) count++;
-                        if (qrCode.modules[row + 1][col + 1]) count++;
-                        if (count == 0 || count == 4) {
-                            lostPoint += 3;
-                        }
-                    }
-                    //level 1 评价
-                    if (head ^ current) {
-                        sameCount++;
-                    } else {
-                        head = current;
-                        if (sameCount >= 5) {
-                            lostPoint += (3 + sameCount - 5);
-                        }
-                        sameCount = 1;
-                    }
-                    //level 4 评价
-                    if (current) {
-                        darkCount++;
-                    }
-                }
-            }
-            for (var col = 0; col < moduleCount; col++) {
-                var sameCount = 0;
-                var head = qrCode.modules[0][col];
-                for (var row = 0; row < moduleCount; row++) {
-                    var current = qrCode.modules[row][col];
-                    //level 3 评价
-                    if (row < moduleCount - 6) {
-                        if (current && !qrCode.modules[row + 1][col] && qrCode.modules[row + 2][col] && qrCode.modules[row + 3][col] && qrCode.modules[row + 4][col] && !qrCode.modules[row + 5][col] && qrCode.modules[row + 6][col]) {
-                            if (row < moduleCount - 10) {
-                                if (qrCode.modules[row + 7][col] && qrCode.modules[row + 8][col] && qrCode.modules[row + 9][col] && qrCode.modules[row + 10][col]) {
-                                    lostPoint += 40;
-                                }
-                            } else if (row > 3) {
-                                if (qrCode.modules[row - 1][col] && qrCode.modules[row - 2][col] && qrCode.modules[row - 3][col] && qrCode.modules[row - 4][col]) {
-                                    lostPoint += 40;
-                                }
-                            }
-                        }
-                    }
-                    //level 1 评价
-                    if (head ^ current) {
-                        sameCount++;
-                    } else {
-                        head = current;
-                        if (sameCount >= 5) {
-                            lostPoint += (3 + sameCount - 5);
-                        }
-                        sameCount = 1;
-                    }
-                }
-            }
-            // LEVEL4
-            var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
-            lostPoint += ratio * 10;
-            return lostPoint;
-        }
-
-    };
-    //---------------------------------------------------------------------
-    // QRMath使用的数学工具
-    //---------------------------------------------------------------------
-    var QRMath = {
-        /*
-        将n转化为a^m
-         */
-        glog: function (n) {
-            if (n < 1) {
-                throw new Error("glog(" + n + ")");
-            }
-            return QRMath.LOG_TABLE[n];
-        },
-        /*
-        将a^m转化为n
-         */
-        gexp: function (n) {
-            while (n < 0) {
-                n += 255;
-            }
-            while (n >= 256) {
-                n -= 255;
-            }
-            return QRMath.EXP_TABLE[n];
-        },
-        EXP_TABLE: new Array(256),
-        LOG_TABLE: new Array(256)
-
-    };
-    for (var i = 0; i < 8; i++) {
-        QRMath.EXP_TABLE[i] = 1 << i;
-    }
-    for (var i = 8; i < 256; i++) {
-        QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8];
-    }
-    for (var i = 0; i < 255; i++) {
-        QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;
-    }
-    //---------------------------------------------------------------------
-    // QRPolynomial 多项式
-    //---------------------------------------------------------------------
-    /**
-     * 多项式类
-     * @param {Array} num   系数
-     * @param {num} shift a^shift
-     */
-    function QRPolynomial(num, shift) {
-        if (num.length == undefined) {
-            throw new Error(num.length + "/" + shift);
-        }
-        var offset = 0;
-        while (offset < num.length && num[offset] == 0) {
-            offset++;
-        }
-        this.num = new Array(num.length - offset + shift);
-        for (var i = 0; i < num.length - offset; i++) {
-            this.num[i] = num[i + offset];
-        }
-    }
-    QRPolynomial.prototype = {
-        get: function (index) {
-            return this.num[index];
-        },
-        getLength: function () {
-            return this.num.length;
-        },
-        /**
-         * 多项式乘法
-         * @param  {QRPolynomial} e 被乘多项式
-         * @return {[type]}   [description]
-         */
-        multiply: function (e) {
-            var num = new Array(this.getLength() + e.getLength() - 1);
-            for (var i = 0; i < this.getLength(); i++) {
-                for (var j = 0; j < e.getLength(); j++) {
-                    num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
-                }
-            }
-            return new QRPolynomial(num, 0);
-        },
-        /**
-         * 多项式模运算
-         * @param  {QRPolynomial} e 模多项式
-         * @return {}
-         */
-        mod: function (e) {
-            var tl = this.getLength(),
-                el = e.getLength();
-            if (tl - el < 0) {
-                return this;
-            }
-            var num = new Array(tl);
-            for (var i = 0; i < tl; i++) {
-                num[i] = this.get(i);
-            }
-            while (num.length >= el) {
-                var ratio = QRMath.glog(num[0]) - QRMath.glog(e.get(0));
-
-                for (var i = 0; i < e.getLength(); i++) {
-                    num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
-                }
-                while (num[0] == 0) {
-                    num.shift();
-                }
-            }
-            return new QRPolynomial(num, 0);
-        }
-    };
-
-    //---------------------------------------------------------------------
-    // RS_BLOCK_TABLE
-    //---------------------------------------------------------------------
-    /*
-    二维码各个版本信息[块数, 每块中的数据块数, 每块中的信息块数]
-     */
-    var RS_BLOCK_TABLE = [
-        // L
-        // M
-        // Q
-        // H
-        // 1
-        [1, 26, 19],
-        [1, 26, 16],
-        [1, 26, 13],
-        [1, 26, 9],
-
-        // 2
-        [1, 44, 34],
-        [1, 44, 28],
-        [1, 44, 22],
-        [1, 44, 16],
-
-        // 3
-        [1, 70, 55],
-        [1, 70, 44],
-        [2, 35, 17],
-        [2, 35, 13],
-
-        // 4
-        [1, 100, 80],
-        [2, 50, 32],
-        [2, 50, 24],
-        [4, 25, 9],
-
-        // 5
-        [1, 134, 108],
-        [2, 67, 43],
-        [2, 33, 15, 2, 34, 16],
-        [2, 33, 11, 2, 34, 12],
-
-        // 6
-        [2, 86, 68],
-        [4, 43, 27],
-        [4, 43, 19],
-        [4, 43, 15],
-
-        // 7
-        [2, 98, 78],
-        [4, 49, 31],
-        [2, 32, 14, 4, 33, 15],
-        [4, 39, 13, 1, 40, 14],
-
-        // 8
-        [2, 121, 97],
-        [2, 60, 38, 2, 61, 39],
-        [4, 40, 18, 2, 41, 19],
-        [4, 40, 14, 2, 41, 15],
-
-        // 9
-        [2, 146, 116],
-        [3, 58, 36, 2, 59, 37],
-        [4, 36, 16, 4, 37, 17],
-        [4, 36, 12, 4, 37, 13],
-
-        // 10
-        [2, 86, 68, 2, 87, 69],
-        [4, 69, 43, 1, 70, 44],
-        [6, 43, 19, 2, 44, 20],
-        [6, 43, 15, 2, 44, 16],
-
-        // 11
-        [4, 101, 81],
-        [1, 80, 50, 4, 81, 51],
-        [4, 50, 22, 4, 51, 23],
-        [3, 36, 12, 8, 37, 13],
-
-        // 12
-        [2, 116, 92, 2, 117, 93],
-        [6, 58, 36, 2, 59, 37],
-        [4, 46, 20, 6, 47, 21],
-        [7, 42, 14, 4, 43, 15],
-
-        // 13
-        [4, 133, 107],
-        [8, 59, 37, 1, 60, 38],
-        [8, 44, 20, 4, 45, 21],
-        [12, 33, 11, 4, 34, 12],
-
-        // 14
-        [3, 145, 115, 1, 146, 116],
-        [4, 64, 40, 5, 65, 41],
-        [11, 36, 16, 5, 37, 17],
-        [11, 36, 12, 5, 37, 13],
-
-        // 15
-        [5, 109, 87, 1, 110, 88],
-        [5, 65, 41, 5, 66, 42],
-        [5, 54, 24, 7, 55, 25],
-        [11, 36, 12],
-
-        // 16
-        [5, 122, 98, 1, 123, 99],
-        [7, 73, 45, 3, 74, 46],
-        [15, 43, 19, 2, 44, 20],
-        [3, 45, 15, 13, 46, 16],
-
-        // 17
-        [1, 135, 107, 5, 136, 108],
-        [10, 74, 46, 1, 75, 47],
-        [1, 50, 22, 15, 51, 23],
-        [2, 42, 14, 17, 43, 15],
-
-        // 18
-        [5, 150, 120, 1, 151, 121],
-        [9, 69, 43, 4, 70, 44],
-        [17, 50, 22, 1, 51, 23],
-        [2, 42, 14, 19, 43, 15],
-
-        // 19
-        [3, 141, 113, 4, 142, 114],
-        [3, 70, 44, 11, 71, 45],
-        [17, 47, 21, 4, 48, 22],
-        [9, 39, 13, 16, 40, 14],
-
-        // 20
-        [3, 135, 107, 5, 136, 108],
-        [3, 67, 41, 13, 68, 42],
-        [15, 54, 24, 5, 55, 25],
-        [15, 43, 15, 10, 44, 16],
-
-        // 21
-        [4, 144, 116, 4, 145, 117],
-        [17, 68, 42],
-        [17, 50, 22, 6, 51, 23],
-        [19, 46, 16, 6, 47, 17],
-
-        // 22
-        [2, 139, 111, 7, 140, 112],
-        [17, 74, 46],
-        [7, 54, 24, 16, 55, 25],
-        [34, 37, 13],
-
-        // 23
-        [4, 151, 121, 5, 152, 122],
-        [4, 75, 47, 14, 76, 48],
-        [11, 54, 24, 14, 55, 25],
-        [16, 45, 15, 14, 46, 16],
-
-        // 24
-        [6, 147, 117, 4, 148, 118],
-        [6, 73, 45, 14, 74, 46],
-        [11, 54, 24, 16, 55, 25],
-        [30, 46, 16, 2, 47, 17],
-
-        // 25
-        [8, 132, 106, 4, 133, 107],
-        [8, 75, 47, 13, 76, 48],
-        [7, 54, 24, 22, 55, 25],
-        [22, 45, 15, 13, 46, 16],
-
-        // 26
-        [10, 142, 114, 2, 143, 115],
-        [19, 74, 46, 4, 75, 47],
-        [28, 50, 22, 6, 51, 23],
-        [33, 46, 16, 4, 47, 17],
-
-        // 27
-        [8, 152, 122, 4, 153, 123],
-        [22, 73, 45, 3, 74, 46],
-        [8, 53, 23, 26, 54, 24],
-        [12, 45, 15, 28, 46, 16],
-
-        // 28
-        [3, 147, 117, 10, 148, 118],
-        [3, 73, 45, 23, 74, 46],
-        [4, 54, 24, 31, 55, 25],
-        [11, 45, 15, 31, 46, 16],
-
-        // 29
-        [7, 146, 116, 7, 147, 117],
-        [21, 73, 45, 7, 74, 46],
-        [1, 53, 23, 37, 54, 24],
-        [19, 45, 15, 26, 46, 16],
-
-        // 30
-        [5, 145, 115, 10, 146, 116],
-        [19, 75, 47, 10, 76, 48],
-        [15, 54, 24, 25, 55, 25],
-        [23, 45, 15, 25, 46, 16],
-
-        // 31
-        [13, 145, 115, 3, 146, 116],
-        [2, 74, 46, 29, 75, 47],
-        [42, 54, 24, 1, 55, 25],
-        [23, 45, 15, 28, 46, 16],
-
-        // 32
-        [17, 145, 115],
-        [10, 74, 46, 23, 75, 47],
-        [10, 54, 24, 35, 55, 25],
-        [19, 45, 15, 35, 46, 16],
-
-        // 33
-        [17, 145, 115, 1, 146, 116],
-        [14, 74, 46, 21, 75, 47],
-        [29, 54, 24, 19, 55, 25],
-        [11, 45, 15, 46, 46, 16],
-
-        // 34
-        [13, 145, 115, 6, 146, 116],
-        [14, 74, 46, 23, 75, 47],
-        [44, 54, 24, 7, 55, 25],
-        [59, 46, 16, 1, 47, 17],
-
-        // 35
-        [12, 151, 121, 7, 152, 122],
-        [12, 75, 47, 26, 76, 48],
-        [39, 54, 24, 14, 55, 25],
-        [22, 45, 15, 41, 46, 16],
-
-        // 36
-        [6, 151, 121, 14, 152, 122],
-        [6, 75, 47, 34, 76, 48],
-        [46, 54, 24, 10, 55, 25],
-        [2, 45, 15, 64, 46, 16],
-
-        // 37
-        [17, 152, 122, 4, 153, 123],
-        [29, 74, 46, 14, 75, 47],
-        [49, 54, 24, 10, 55, 25],
-        [24, 45, 15, 46, 46, 16],
-
-        // 38
-        [4, 152, 122, 18, 153, 123],
-        [13, 74, 46, 32, 75, 47],
-        [48, 54, 24, 14, 55, 25],
-        [42, 45, 15, 32, 46, 16],
-
-        // 39
-        [20, 147, 117, 4, 148, 118],
-        [40, 75, 47, 7, 76, 48],
-        [43, 54, 24, 22, 55, 25],
-        [10, 45, 15, 67, 46, 16],
-
-        // 40
-        [19, 148, 118, 6, 149, 119],
-        [18, 75, 47, 31, 76, 48],
-        [34, 54, 24, 34, 55, 25],
-        [20, 45, 15, 61, 46, 16]
-    ];
-
-    /**
-     * 根据数据获取对应版本
-     * @return {[type]} [description]
-     */
-    QRCodeAlg.prototype.getRightType = function () {
-        for (var typeNumber = 1; typeNumber < 41; typeNumber++) {
-            var rsBlock = RS_BLOCK_TABLE[(typeNumber - 1) * 4 + this.errorCorrectLevel];
-            if (rsBlock == undefined) {
-                throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + this.errorCorrectLevel);
-            }
-            var length = rsBlock.length / 3;
-            var totalDataCount = 0;
-            for (var i = 0; i < length; i++) {
-                var count = rsBlock[i * 3 + 0];
-                var dataCount = rsBlock[i * 3 + 2];
-                totalDataCount += dataCount * count;
-            }
-            var lengthBytes = typeNumber > 9 ? 2 : 1;
-            if (this.utf8bytes.length + lengthBytes < totalDataCount || typeNumber == 40) {
-                this.typeNumber = typeNumber;
-                this.rsBlock = rsBlock;
-                this.totalDataCount = totalDataCount;
-                break;
-            }
-        }
-    };
-
-    //---------------------------------------------------------------------
-    // QRBitBuffer
-    //---------------------------------------------------------------------
-    function QRBitBuffer() {
-        this.buffer = new Array();
-        this.length = 0;
-    }
-    QRBitBuffer.prototype = {
-        get: function (index) {
-            var bufIndex = Math.floor(index / 8);
-            return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1);
-        },
-        put: function (num, length) {
-            for (var i = 0; i < length; i++) {
-                this.putBit(((num >>> (length - i - 1)) & 1));
-            }
-        },
-        putBit: function (bit) {
-            var bufIndex = Math.floor(this.length / 8);
-            if (this.buffer.length <= bufIndex) {
-                this.buffer.push(0);
-            }
-            if (bit) {
-                this.buffer[bufIndex] |= (0x80 >>> (this.length % 8));
-            }
-            this.length++;
-        }
-    };
-
-
-
-    // xzedit
-    let qrcodeAlgObjCache = [];
-    /**
-     * 二维码构造函数,主要用于绘制
-     * @param  {参数列表} opt 传递参数
-     * @return {}
-     */
-    QRCode = function (opt) {
-        //设置默认参数
-        this.options = {
-            text: '',
-            size: 256,
-            correctLevel: 3,
-            background: '#ffffff',
-            foreground: '#000000',
-            pdground: '#000000',
-            image: '',
-            imageSize: 30,
-            canvasId: opt.canvasId,
-            context: opt.context,
-            usingComponents: opt.usingComponents,
-            showLoading: opt.showLoading,
-            loadingText: opt.loadingText,
-        };
-        if (typeof opt === 'string') { // 只编码ASCII字符串
-            opt = {
-                text: opt
-            };
-        }
-        if (opt) {
-            for (var i in opt) {
-                this.options[i] = opt[i];
-            }
-        }
-        //使用QRCodeAlg创建二维码结构
-        var qrCodeAlg = null;
-        for (var i = 0, l = qrcodeAlgObjCache.length; i < l; i++) {
-            if (qrcodeAlgObjCache[i].text == this.options.text && qrcodeAlgObjCache[i].text.correctLevel == this.options.correctLevel) {
-                qrCodeAlg = qrcodeAlgObjCache[i].obj;
-                break;
-            }
-        }
-        if (i == l) {
-            qrCodeAlg = new QRCodeAlg(this.options.text, this.options.correctLevel);
-            qrcodeAlgObjCache.push({
-                text: this.options.text,
-                correctLevel: this.options.correctLevel,
-                obj: qrCodeAlg
-            });
-        }
-        /**
-         * 计算矩阵点的前景色
-         * @param {Obj} config
-         * @param {Number} config.row 点x坐标
-         * @param {Number} config.col 点y坐标
-         * @param {Number} config.count 矩阵大小
-         * @param {Number} config.options 组件的options
-         * @return {String}
-         */
-        let getForeGround = function (config) {
-            var options = config.options;
-            if (options.pdground && (
-                (config.row > 1 && config.row < 5 && config.col > 1 && config.col < 5) ||
-                (config.row > (config.count - 6) && config.row < (config.count - 2) && config.col > 1 && config.col < 5) ||
-                (config.row > 1 && config.row < 5 && config.col > (config.count - 6) && config.col < (config.count - 2))
-            )) {
-                return options.pdground;
-            }
-            return options.foreground;
-        }
-        // 创建canvas
-        let createCanvas = function (options) {
-            if (options.showLoading) {
-                uni.showLoading({
-                    title: options.loadingText,
-                    mask: true
-                });
-            }
-            var ctx = uni.createCanvasContext(options.canvasId, options.context);
-            var count = qrCodeAlg.getModuleCount();
-            var ratioSize = options.size;
-            var ratioImgSize = options.imageSize;
-            //计算每个点的长宽
-            var tileW = (ratioSize / count).toPrecision(4);
-            var tileH = (ratioSize / count).toPrecision(4);
-            //绘制
-            for (var row = 0; row < count; row++) {
-                for (var col = 0; col < count; col++) {
-                    var w = (Math.ceil((col + 1) * tileW) - Math.floor(col * tileW));
-                    var h = (Math.ceil((row + 1) * tileW) - Math.floor(row * tileW));
-                    var foreground = getForeGround({
-                        row: row,
-                        col: col,
-                        count: count,
-                        options: options
-                    });
-                    ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options.background);
-                    ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w, h);
-                }
-            }
-            if (options.image) {
-                var x = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
-                var y = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
-                drawRoundedRect(ctx, x, y, ratioImgSize, ratioImgSize, 2, 6, true, true)
-                ctx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
-                // 画圆角矩形
-                function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) {
-                    ctxi.setLineWidth(lineWidth);
-                    ctxi.setFillStyle(options.background);
-                    ctxi.setStrokeStyle(options.background);
-                    ctxi.beginPath(); // draw top and top right corner 
-                    ctxi.moveTo(x + r, y);
-                    ctxi.arcTo(x + width, y, x + width, y + r, r); // draw right side and bottom right corner 
-                    ctxi.arcTo(x + width, y + height, x + width - r, y + height, r); // draw bottom and bottom left corner 
-                    ctxi.arcTo(x, y + height, x, y + height - r, r); // draw left and top left corner 
-                    ctxi.arcTo(x, y, x + r, y, r);
-                    ctxi.closePath();
-                    if (fill) {
-                        ctxi.fill();
-                    }
-                    if (stroke) {
-                        ctxi.stroke();
-                    }
-                }
-            }
-            setTimeout(() => {
-                ctx.draw(true, () => {
-                    // 保存到临时区域
-                    setTimeout(() => {
-                        uni.canvasToTempFilePath({
-                            width: options.width,
-                            height: options.height,
-                            destWidth: options.width,
-                            destHeight: options.height,
-                            canvasId: options.canvasId,
-                            quality: Number(1),
-                            success: function (res) {
-                                if (options.cbResult) {
-                                    options.cbResult(res.tempFilePath)
-                                }
-                            },
-                            fail: function (res) {
-                                if (options.cbResult) {
-                                    options.cbResult(res)
-                                }
-                            },
-                            complete: function () {
-                                if (options.showLoading){
-                                    uni.hideLoading();
-                                }
-                            },
-                        }, options.context);
-                    }, options.text.length + 100);
-                });
-            }, options.usingComponents ? 0 : 150);
-        }
-        createCanvas(this.options);
-        // 空判定
-        let empty = function (v) {
-            let tp = typeof v,
-                rt = false;
-            if (tp == "number" && String(v) == "") {
-                rt = true
-            } else if (tp == "undefined") {
-                rt = true
-            } else if (tp == "object") {
-                if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
-            } else if (tp == "string") {
-                if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
-            } else if (tp == "function") {
-                rt = false
-            }
-            return rt
-        }
-    };
-    QRCode.prototype.clear = function (fn) {
-        var ctx = uni.createCanvasContext(this.options.canvasId, this.options.context)
-        ctx.clearRect(0, 0, this.options.size, this.options.size)
-        ctx.draw(false, () => {
-            if (fn) {
-                fn()
-            }
-        })
-    };
-})()
-
-export default QRCode

+ 0 - 210
components/tki-qrcode/tki-qrcode.vue

@@ -1,210 +0,0 @@
-<template xlang="wxml" minapp="mpvue">
-	<view class="tki-qrcode">
-		<!-- #ifndef MP-ALIPAY -->
-		<canvas class="tki-qrcode-canvas" :canvas-id="cid" :style="{width:cpSize+'px',height:cpSize+'px'}" />
-		<!-- #endif -->
-		<!-- #ifdef MP-ALIPAY -->
-		<canvas :id="cid" :width="cpSize" :height="cpSize" class="tki-qrcode-canvas" />
-		<!-- #endif -->
-		<image v-show="show" :src="result" :style="{width:cpSize+'px',height:cpSize+'px'}" />
-	</view>
-</template>
-
-<script>
-import QRCode from "./qrcode.js"
-let qrcode
-export default {
-	name: "tki-qrcode",
-	props: {
-		cid: {
-			type: String,
-			default: 'tki-qrcode-canvas'
-		},
-		size: {
-			type: Number,
-			default: 200
-		},
-		unit: {
-			type: String,
-			default: 'upx'
-		},
-		show: {
-			type: Boolean,
-			default: true
-		},
-		val: {
-			type: String,
-			default: ''
-		},
-		background: {
-			type: String,
-			default: '#ffffff'
-		},
-		foreground: {
-			type: String,
-			default: '#000000'
-		},
-		pdground: {
-			type: String,
-			default: '#000000'
-		},
-		icon: {
-			type: String,
-			default: ''
-		},
-		iconSize: {
-			type: Number,
-			default: 40
-		},
-		lv: {
-			type: Number,
-			default: 3
-		},
-		onval: {
-			type: Boolean,
-			default: false
-		},
-		loadMake: {
-			type: Boolean,
-			default: false
-		},
-		usingComponents: {
-			type: Boolean,
-			default: true
-		},
-		showLoading: {
-			type: Boolean,
-			default: true
-		},
-		loadingText: {
-			type: String,
-			default: '二维码生成中'
-		},
-	},
-	data() {
-		return {
-			result: '',
-		}
-	},
-	methods: {
-		_makeCode() {
-			let that = this
-			if (!this._empty(this.val)) {
-				qrcode = new QRCode({
-					context: that, // 上下文环境
-					canvasId:that.cid, // canvas-id
-					usingComponents: that.usingComponents, // 是否是自定义组件
-					showLoading: that.showLoading, // 是否显示loading
-					loadingText: that.loadingText, // loading文字
-					text: that.val, // 生成内容
-					size: that.cpSize, // 二维码大小
-					background: that.background, // 背景色
-					foreground: that.foreground, // 前景色
-					pdground: that.pdground, // 定位角点颜色
-					correctLevel: that.lv, // 容错级别
-					image: that.icon, // 二维码图标
-					imageSize: that.iconSize,// 二维码图标大小
-					cbResult: function (res) { // 生成二维码的回调
-						that._result(res)
-					},
-				});
-			} else {
-				uni.showToast({
-					title: '二维码内容不能为空',
-					icon: 'none',
-					duration: 2000
-				});
-			}
-		},
-		_clearCode() {
-			this._result('')
-			qrcode.clear()
-		},
-		_saveCode() {
-			let that = this;
-			if (this.result != "") {
-				uni.saveImageToPhotosAlbum({
-					filePath: that.result,
-					success: function () {
-						uni.showToast({
-							title: '二维码保存成功',
-							icon: 'success',
-							duration: 2000
-						});
-					}
-				});
-			}
-		},
-		_result(res) {
-			this.result = res;
-			this.$emit('result', res)
-		},
-		_empty(v) {
-			let tp = typeof v,
-				rt = false;
-			if (tp == "number" && String(v) == "") {
-				rt = true
-			} else if (tp == "undefined") {
-				rt = true
-			} else if (tp == "object") {
-				if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
-			} else if (tp == "string") {
-				if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
-			} else if (tp == "function") {
-				rt = false
-			}
-			return rt
-		}
-	},
-	watch: {
-		size: function (n, o) {
-			if (n != o && !this._empty(n)) {
-				this.cSize = n
-				if (!this._empty(this.val)) {
-					setTimeout(() => {
-						this._makeCode()
-					}, 100);
-				}
-			}
-		},
-		val: function (n, o) {
-			if (this.onval) {
-				if (n != o && !this._empty(n)) {
-					setTimeout(() => {
-						this._makeCode()
-					}, 0);
-				}
-			}
-		}
-	},
-	computed: {
-		cpSize() {
-			if(this.unit == "upx"){
-				return uni.upx2px(this.size)
-			}else{
-				return this.size
-			}
-		}
-	},
-	mounted: function () {
-		if (this.loadMake) {
-			if (!this._empty(this.val)) {
-				setTimeout(() => {
-					this._makeCode()
-				}, 0);
-			}
-		}
-	},
-}
-</script>
-<style>
-.tki-qrcode {
-  position: relative;
-}
-.tki-qrcode-canvas {
-  position: fixed;
-  top: -99999upx;
-  left: -99999upx;
-  z-index: -99999;
-}
-</style>

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

@@ -1,122 +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"
-	 class="uni-badge" :style="width" @click="onClick()">{{ text }}</text>
-</template>
-
-<script>
-	export default {
-		name: 'UniBadge',
-		props: {
-			type: {
-				type: String,
-				default: 'default'
-			},
-			inverted: {
-				type: Boolean,
-				default: false
-			},
-			text: {
-				type: [String,Number],
-				default: ''
-			},
-			size: {
-				// small.normal
-				type: String,
-				default: 'normal'
-			}
-		},
-		data() {
-			return {
-				width: `display: inline-block;width: ${String(this.text).length * 15 + 25}rpx`
-			};
-		},
-		methods: {
-			onClick() {
-				this.$emit('click');
-			}
-		}
-	};
-</script>
-
-<style lang="scss" scoped>
-	$bage-size: 12px;
-	$bage-small: scale(0.8);
-	$bage-height: 40rpx;
-
-	.uni-badge {
-		/* #ifndef APP-PLUS */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		height: $bage-height;
-		line-height: $bage-height;
-		color: $uni-text-color;
-		border-radius: 100px;
-		background-color: $uni-bg-color-hover;
-		background-color: transparent;
-		text-align: center;
-		font-family: 'Helvetica Neue', Helvetica, sans-serif;
-		font-size: $bage-size;
-		padding: 0;
-	}
-
-	.uni-badge--inverted {
-		padding: 0 5px 0 0;
-		color: $uni-bg-color-hover;
-	}
-
-	.uni-badge--default {
-		color: $uni-text-color;
-		background-color: $uni-bg-color-hover;
-	}
-
-	.uni-badge--default-inverted {
-		color: $uni-text-color-grey;
-		background-color: transparent;
-	}
-
-	.uni-badge--primary {
-		color: $uni-text-color-inverse;
-		background-color: $uni-color-primary;
-	}
-
-	.uni-badge--primary-inverted {
-		color: $uni-color-primary;
-		background-color: transparent;
-	}
-
-	.uni-badge--success {
-		color: $uni-text-color-inverse;
-		background-color: $uni-color-success;
-	}
-
-	.uni-badge--success-inverted {
-		color: $uni-color-success;
-		background-color: transparent;
-	}
-
-	.uni-badge--warning {
-		color: $uni-text-color-inverse;
-		background-color: $uni-color-warning;
-	}
-
-	.uni-badge--warning-inverted {
-		color: $uni-color-warning;
-		background-color: transparent;
-	}
-
-	.uni-badge--error {
-		color: $uni-text-color-inverse;
-		background-color: $uni-color-error;
-	}
-
-	.uni-badge--error-inverted {
-		color: $uni-color-error;
-		background-color: transparent;
-	}
-
-	.uni-badge--small {
-		transform: $bage-small;
-		transform-origin: center center;
-	}
-</style>

+ 0 - 124
components/uni-fav/uni-fav.vue

@@ -1,124 +0,0 @@
-<template>
-	<view :class="[circle === true || circle === 'true' ? 'uni-fav--circle' : '']" :style="[{ backgroundColor: checked ? bgColorChecked : bgColor }]"
-	 @click="onClick" class="uni-fav">
-		<!-- #ifdef MP-ALIPAY -->
-		<view class="uni-fav-star" v-if="!checked && (star === true || star === 'true')">
-			<uni-icons :color="fgColor" :style="{color: checked ? fgColorChecked : fgColor}" size="14" type="star-filled" />
-		</view>
-		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
-		<uni-icons :color="fgColor" :style="{color: checked ? fgColorChecked : fgColor}" class="uni-fav-star" size="14" type="star-filled"
-		 v-if="!checked && (star === true || star === 'true')" />
-		<!-- #endif -->
-		<text :style="{color: checked ? fgColorChecked : fgColor}" class="uni-fav-text">{{ checked ? contentText.contentFav : contentText.contentDefault }}</text>
-	</view>
-</template>
-
-<script>
-	import uniIcons from "../uni-icons/uni-icons.vue";
-	export default {
-		name: "UniFav",
-		components: {
-			uniIcons
-		},
-		props: {
-			star: {
-				type: [Boolean, String],
-				default: true
-			},
-			bgColor: {
-				type: String,
-				default: "#eeeeee"
-			},
-			fgColor: {
-				type: String,
-				default: "#666666"
-			},
-			bgColorChecked: {
-				type: String,
-				default: "#007aff"
-			},
-			fgColorChecked: {
-				type: String,
-				default: "#FFFFFF"
-			},
-			circle: {
-				type: [Boolean, String],
-				default: false
-			},
-			checked: {
-				type: Boolean,
-				default: false
-			},
-			contentText: {
-				type: Object,
-				default () {
-					return {
-						contentDefault: "收藏",
-						contentFav: "已收藏"
-					};
-				}
-			}
-		},
-		watch: {
-			checked() {
-				if (uni.report) {
-					if (this.checked) {
-						uni.report("收藏", "收藏");
-					} else {
-						uni.report("取消收藏", "取消收藏");
-					}
-				}
-			}
-		},
-		methods: {
-			onClick() {
-				this.$emit("click");
-			}
-		}
-	};
-</script>
-
-<style lang="scss" scoped>
-	$fav-height: 25px;
-
-	.uni-fav {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		align-items: center;
-		justify-content: center;
-		width: 60px;
-		height: $fav-height;
-		line-height: $fav-height;
-		text-align: center;
-		border-radius: 3px;
-	}
-
-	.uni-fav--circle {
-		border-radius: 30px;
-	}
-
-	.uni-fav-star {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		height: $fav-height;
-		line-height: 24px;
-		margin-right: 3px;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.uni-fav-text {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		height: $fav-height;
-		line-height: $fav-height;
-		align-items: center;
-		justify-content: center;
-		font-size: $uni-font-size-base;
-	}
-</style>

+ 0 - 96
components/uni-icons/icons.js

@@ -1,96 +0,0 @@
-export default {
-	'contact': '\ue100',
-	'person': '\ue101',
-	'personadd': '\ue102',
-	'contact-filled': '\ue130',
-	'person-filled': '\ue131',
-	'personadd-filled': '\ue132',
-	'phone': '\ue200',
-	'email': '\ue201',
-	'chatbubble': '\ue202',
-	'chatboxes': '\ue203',
-	'phone-filled': '\ue230',
-	'email-filled': '\ue231',
-	'chatbubble-filled': '\ue232',
-	'chatboxes-filled': '\ue233',
-	'weibo': '\ue260',
-	'weixin': '\ue261',
-	'pengyouquan': '\ue262',
-	'chat': '\ue263',
-	'qq': '\ue264',
-	'videocam': '\ue300',
-	'camera': '\ue301',
-	'mic': '\ue302',
-	'location': '\ue303',
-	'mic-filled': '\ue332',
-	'speech': '\ue332',
-	'location-filled': '\ue333',
-	'micoff': '\ue360',
-	'image': '\ue363',
-	'map': '\ue364',
-	'compose': '\ue400',
-	'trash': '\ue401',
-	'upload': '\ue402',
-	'download': '\ue403',
-	'close': '\ue404',
-	'redo': '\ue405',
-	'undo': '\ue406',
-	'refresh': '\ue407',
-	'star': '\ue408',
-	'plus': '\ue409',
-	'minus': '\ue410',
-	'circle': '\ue411',
-	'checkbox': '\ue411',
-	'close-filled': '\ue434',
-	'clear': '\ue434',
-	'refresh-filled': '\ue437',
-	'star-filled': '\ue438',
-	'plus-filled': '\ue439',
-	'minus-filled': '\ue440',
-	'circle-filled': '\ue441',
-	'checkbox-filled': '\ue442',
-	'closeempty': '\ue460',
-	'refreshempty': '\ue461',
-	'reload': '\ue462',
-	'starhalf': '\ue463',
-	'spinner': '\ue464',
-	'spinner-cycle': '\ue465',
-	'search': '\ue466',
-	'plusempty': '\ue468',
-	'forward': '\ue470',
-	'back': '\ue471',
-	'left-nav': '\ue471',
-	'checkmarkempty': '\ue472',
-	'home': '\ue500',
-	'navigate': '\ue501',
-	'gear': '\ue502',
-	'paperplane': '\ue503',
-	'info': '\ue504',
-	'help': '\ue505',
-	'locked': '\ue506',
-	'more': '\ue507',
-	'flag': '\ue508',
-	'home-filled': '\ue530',
-	'gear-filled': '\ue532',
-	'info-filled': '\ue534',
-	'help-filled': '\ue535',
-	'more-filled': '\ue537',
-	'settings': '\ue560',
-	'list': '\ue562',
-	'bars': '\ue563',
-	'loop': '\ue565',
-	'paperclip': '\ue567',
-	'eye': '\ue568',
-	'arrowup': '\ue580',
-	'arrowdown': '\ue581',
-	'arrowleft': '\ue582',
-	'arrowright': '\ue583',
-	'arrowthinup': '\ue584',
-	'arrowthindown': '\ue585',
-	'arrowthinleft': '\ue586',
-	'arrowthinright': '\ue587',
-	'pulldown': '\ue588',
-	'closefill': '\ue589',
-	'sound': '\ue590',
-	'scan': '\ue612'
-}

File diff suppressed because it is too large
+ 0 - 10
components/uni-icons/uni-icons.vue


+ 0 - 230
components/uni-list-item/uni-list-item.vue

@@ -1,230 +0,0 @@
-<template>
-	<!-- #ifdef APP-NVUE -->
-	<cell>
-	<!-- #endif -->
-	<view :class="disabled ? 'uni-list-item--disabled' : ''" :hover-class="disabled || showSwitch ? '' : 'uni-list-item--hover'"
-	 class="uni-list-item" @click="onClick">
-		<view class="uni-list-item__container" :class="{'uni-list-item--first':isFirstChild}">
-			<view v-if="thumb" class="uni-list-item__icon">
-				<image :src="thumb" mode="aspectFit" class="uni-list-item__icon-img" />
-			</view>
-			<view v-else-if="showExtraIcon" class="uni-list-item__icon">
-				<uni-icons :color="extraIcon.color" :size="extraIcon.size" :type="extraIcon.type" class="uni-icon-wrapper" />
-			</view>
-			<view class="uni-list-item__content">
-				<slot></slot>
-				<text class="uni-list-item__content-title">{{ title }}</text>
-				<text v-if="note" class="uni-list-item__content-note">{{ note }}</text>
-			</view>
-			<view class="uni-list-item__slot">
-				<slot name="right" ></slot>
-			</view>
-			<view v-if="showBadge || showArrow || showSwitch" class="uni-list-item__extra">
-				<uni-badge v-if="showBadge" :type="badgeType" :text="badgeText" />
-				<switch class="itemSwitch" v-if="showSwitch" :color="switchColor" :disabled="disabled" :checked="switchChecked" @change="onSwitchChange" />
-				<uni-icons v-if="showArrow" :size="20" class="uni-icon-wrapper" color="#bbb" type="arrowright" />
-			</view>
-		</view>
-	</view>
-	<!-- #ifdef APP-NVUE -->
-	</cell>
-	<!-- #endif -->
-</template>
-
-<script>
-	import uniIcons from '../uni-icons/uni-icons.vue'
-	import uniBadge from '../uni-badge/uni-badge.vue'
-	export default {
-		name: 'UniListItem',
-		components: {
-			uniIcons,
-			uniBadge
-		},
-		props: {
-			title: {
-				type: String,
-				default: ''
-			}, // 列表标题
-			note: {
-				type: String,
-				default: ''
-			}, // 列表描述
-			disabled: {
-				// 是否禁用
-				type: [Boolean, String],
-				default: false
-			},
-			showArrow: {
-				// 是否显示箭头
-				type: [Boolean, String],
-				default: true
-			},
-			showBadge: {
-				// 是否显示数字角标
-				type: [Boolean, String],
-				default: false
-			},
-			showSwitch: {
-				// 是否显示Switch
-				type: [Boolean, String],
-				default: false
-			},
-			switchChecked: {
-				// Switch是否被选中
-				type: [Boolean, String],
-				default: false
-			},
-			switchColor:{
-				type:String,
-				default:''
-			},
-			badgeText: {
-				// badge内容
-				type: String,
-				default: ''
-			},
-			badgeType: {
-				// badge类型
-				type: String,
-				default: 'success'
-			},
-			thumb: {
-				// 缩略图
-				type: String,
-				default: ''
-			},
-			showExtraIcon: {
-				// 是否显示扩展图标
-				type: [Boolean, String],
-				default: false
-			},
-			extraIcon: {
-				type: Object,
-				default () {
-					return {
-						type: 'contact',
-						color: '#000000',
-						size: 20
-					}
-				}
-			}
-		},
-		inject: ['list'],
-		data() {
-			return {
-				isFirstChild: false
-			}
-		},
-		mounted() {
-			if (!this.list.firstChildAppend) {
-				this.list.firstChildAppend = true
-				this.isFirstChild = true
-			}
-		},
-		methods: {
-			onClick() {
-				this.$emit('click')
-			},
-			onSwitchChange(e) {
-				this.$emit('switchChange', e.detail)
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	@import '~@/uni.scss';
-
-	$list-item-pd: $uni-spacing-col-lg $uni-spacing-row-lg;
-
-	.uni-list-item {
-		font-size: $uni-font-size-lg;
-		position: relative;
-		flex-direction: column;
-		justify-content: space-between;
-		padding-left: $uni-spacing-row-lg;
-	}
-
-	.uni-list-item--disabled {
-		opacity: 0.3;
-	}
-
-	.uni-list-item--hover {
-		background-color: $uni-bg-color-hover;
-	}
-
-	.uni-list-item__container {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		padding: $list-item-pd;
-		padding-left: 0;
-		flex: 1;
-		position: relative;
-		justify-content: space-between;
-		align-items: center;
-		border-top-color: $uni-border-color;
-		border-top-style: solid;
-		border-top-width: 1px;
-	}
-
-	.uni-list-item--first {
-		border-top-width: 0px;
-	}
-
-	.uni-list-item__content {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex: 1;
-		overflow: hidden;
-		flex-direction: column;
-		color: #3b4144;
-
-	}
-
-	.uni-list-item__content-title {
-		font-size: $uni-font-size-base;
-		color: #3b4144;
-		overflow: hidden;
-	}
-
-	.uni-list-item__content-note {
-		margin-top: 6rpx;
-		color: $uni-text-color-grey;
-		font-size: $uni-font-size-sm;
-		overflow: hidden;
-	}
-
-	.uni-list-item__extra {
-		// width: 25%;
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		justify-content: flex-end;
-		align-items: center;
-	}
-
-	.uni-list-item__icon {
-		margin-right: 18rpx;
-		flex-direction: row;
-		justify-content: center;
-		align-items: center;
-		display: flex;
-	}
-
-	.uni-list-item__icon-img {
-		height: $uni-img-size-base;
-		width: $uni-img-size-base;
-	}
-	// 修改switch默认大小
-	.itemSwitch{
-		transform: translateX(16rpx) scale(.84);
-	}
-	.uni-list-item__slot{
-		color: #909399;
-		font-size: 28rpx;
-	}
-</style>

+ 0 - 68
components/uni-list/uni-list.vue

@@ -1,68 +0,0 @@
-<template>
-	<!-- #ifndef APP-NVUE -->
-	<view class="uni-list">
-		<slot />
-	</view>
-	<!-- #endif -->
-	<!-- #ifdef APP-NVUE -->
-	<list class="uni-list" :enableBackToTop="enableBackToTop" loadmoreoffset="15" :scroll-y="scrollY" @loadmore="loadMore">
-		<slot />
-	</list>
-	<!-- #endif -->
-</template>
-
-<script>
-	export default {
-		name: 'UniList',
-		'mp-weixin': {
-			options: {
-				multipleSlots: false
-			}
-		},
-		props: {
-			enableBackToTop: {
-				type: [Boolean, String],
-				default: false
-			},
-			scrollY: {
-				type: [Boolean, String],
-				default: false
-			}
-		},
-		provide() {
-			return {
-				list: this
-			}
-		},
-		created() {
-			this.firstChildAppend = false
-		},
-		methods: {
-			loadMore(e) {
-				this.$emit("scrolltolower");
-			}
-		}
-	}
-</script>
-<style lang="scss" scoped>
-	.uni-list {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		background-color: $uni-bg-color;
-		position: relative;
-		flex-direction: column;
-		// border-bottom-color: $uni-border-color;
-		// border-bottom-style: solid;
-		// border-bottom-width: 1px;
-	}
-	/* #ifndef APP-NVUE */
-	.uni-list:before {
-		height: 0;
-	}
-	.uni-list:after {
-		height: 0;
-	}
-	/* #endif */
-
-</style>

+ 0 - 65
components/uni-list/uni-refresh.vue

@@ -1,65 +0,0 @@
-<template>
-    <!-- #ifdef APP-NVUE -->
-    <refresh :display="display" @refresh="onrefresh" @pullingdown="onpullingdown">
-        <slot />
-    </refresh>
-    <!-- #endif -->
-    <!-- #ifndef APP-NVUE -->
-    <view ref="uni-refresh" class="uni-refresh" v-show="isShow">
-        <slot />
-    </view>
-    <!-- #endif -->
-</template>
-
-<script>
-    export default {
-        name: 'UniRefresh',
-        props: {
-            display: {
-                type: [String],
-                default: "hide"
-            }
-        },
-        data() {
-            return {
-                pulling: false
-            }
-        },
-        computed: {
-            isShow() {
-                if (this.display === "show" || this.pulling === true) {
-                    return true;
-                }
-                return false;
-            }
-        },
-        created() {},
-        methods: {
-            onchange(value) {
-                this.pulling = value;
-            },
-            onrefresh(e) {
-                this.$emit("refresh", e);
-            },
-            onpullingdown(e) {
-                // #ifdef APP-NVUE
-                this.$emit("pullingdown", e);
-                // #endif
-                // #ifndef APP-NVUE
-                var detail = {
-                    viewHeight: 90,
-                    pullingDistance: e.height
-                }
-                this.$emit("pullingdown", detail);
-                // #endif
-            }
-        }
-    }
-</script>
-
-<style>
-    .uni-refresh {
-        height: 0;
-        overflow: hidden;
-    }
-</style>

+ 0 - 87
components/uni-list/uni-refresh.wxs

@@ -1,87 +0,0 @@
-var pullDown = {
-    threshold: 95,
-    maxHeight: 200,
-    callRefresh: 'onrefresh',
-    callPullingDown: 'onpullingdown',
-    refreshSelector: '.uni-refresh'
-};
-
-function ready(newValue, oldValue, ownerInstance, instance) {
-    var state = instance.getState()
-    state.canPullDown = newValue;
-    console.log(newValue);
-}
-
-function touchStart(e, instance) {
-    var state = instance.getState();
-    state.refreshInstance = instance.selectComponent(pullDown.refreshSelector);
-    state.canPullDown = (state.refreshInstance != null && state.refreshInstance != undefined);
-    if (!state.canPullDown) {
-        return
-    }
-
-    console.log("touchStart");
-
-    state.height = 0;
-    state.touchStartY = e.touches[0].pageY || e.changedTouches[0].pageY;
-    state.refreshInstance.setStyle({
-        'height': 0
-    });
-    state.refreshInstance.callMethod("onchange", true);
-}
-
-function touchMove(e, ownerInstance) {
-    var instance = e.instance;
-    var state = instance.getState();
-    if (!state.canPullDown) {
-        return
-    }
-
-    var oldHeight = state.height;
-    var endY = e.touches[0].pageY || e.changedTouches[0].pageY;
-    var height = endY - state.touchStartY;
-    if (height > pullDown.maxHeight) {
-        return;
-    }
-
-    var refreshInstance = state.refreshInstance;
-    refreshInstance.setStyle({
-        'height': height + 'px'
-    });
-
-    height = height < pullDown.maxHeight ? height : pullDown.maxHeight;
-    state.height = height;
-    refreshInstance.callMethod(pullDown.callPullingDown, {
-        height: height
-    });
-}
-
-function touchEnd(e, ownerInstance) {
-    var state = e.instance.getState();
-    if (!state.canPullDown) {
-        return
-    }
-
-    state.refreshInstance.callMethod("onchange", false);
-
-    var refreshInstance = state.refreshInstance;
-    if (state.height > pullDown.threshold) {
-        refreshInstance.callMethod(pullDown.callRefresh);
-        return;
-    }
-
-    refreshInstance.setStyle({
-        'height': 0
-    });
-}
-
-function propObserver(newValue, oldValue, instance) {
-    pullDown = newValue;
-}
-
-module.exports = {
-    touchmove: touchMove,
-    touchstart: touchStart,
-    touchend: touchEnd,
-    propObserver: propObserver
-}

+ 0 - 396
components/uni-notice-bar/uni-notice-bar.vue

@@ -1,396 +0,0 @@
-<template>
-	<view v-if="show" class="uni-noticebar" :style="{ backgroundColor: backgroundColor }" @click="onClick">
-		<!-- #ifdef MP-ALIPAY -->
-		<view v-if="showClose === true || showClose === 'true'" class="uni-noticebar-close" @click="close">
-			<uni-icons type="closefill" :color="color" size="12" />
-		</view>
-		<view v-if="showIcon === true || showIcon === 'true'" class="uni-noticebar-icon">
-			<uni-icons type="sound" :color="color" size="14" />
-		</view>
-		<!-- #endif -->
-		<!-- #ifndef MP-ALIPAY -->
-		<uni-icons v-if="showClose === true || showClose === 'true'" class="uni-noticebar-close" type="closefill" :color="color"
-		 size="12" @click="close" />
-		<uni-icons v-if="showIcon === true || showIcon === 'true'" class="uni-noticebar-icon" type="sound" :color="color"
-		 size="14" />
-		<!-- #endif -->
-		<view ref="textBox" class="uni-noticebar__content-wrapper" :class="{'uni-noticebar__content-wrapper--scrollable':scrollable, 'uni-noticebar__content-wrapper--single':!scrollable && (single || moreText)}">
-			<view :id="elIdBox" class="uni-noticebar__content" :class="{'uni-noticebar__content--scrollable':scrollable, 'uni-noticebar__content--single':!scrollable && (single || moreText)}">
-				<text :id="elId" ref="animationEle" class="uni-noticebar__content-text" :class="{'uni-noticebar__content-text--scrollable':scrollable,'uni-noticebar__content-text--single':!scrollable && (single || moreText)}"
-				 :style="{color:color, width:wrapWidth+'px', 'animationDuration': animationDuration, '-webkit-animationDuration': animationDuration ,animationPlayState: webviewHide?'paused':animationPlayState,'-webkit-animationPlayState':webviewHide?'paused':animationPlayState, animationDelay: animationDelay, '-webkit-animationDelay':animationDelay}">{{text}}</text>
-			</view>
-		</view>
-		<view v-if="showGetMore === true || showGetMore === 'true'" class="uni-noticebar__more" @click="clickMore">
-			<text v-if="moreText" :style="{ color: moreColor }" class="uni-noticebar__more-text">{{ moreText }}</text>
-			<uni-icons type="arrowright" :color="moreColor" size="14" />
-		</view>
-	</view>
-</template>
-
-<script>
-	import uniIcons from '../uni-icons/uni-icons.vue'
-	// #ifdef APP-NVUE
-	const dom = weex.requireModule('dom');
-	const animation = weex.requireModule('animation');
-	// #endif
-
-	/**
-	 * NoticeBar 自定义导航栏
-	 * @description 通告栏组件
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=30
-	 * @property {Number} speed 文字滚动的速度,默认100px/秒
-	 * @property {String} text 显示文字
-	 * @property {String} backgroundColor 背景颜色
-	 * @property {String} color 文字颜色
-	 * @property {String} moreColor 查看更多文字的颜色
-	 * @property {String} moreText 设置“查看更多”的文本
-	 * @property {Boolean} single = [true|false] 是否单行
-	 * @property {Boolean} scrollable = [true|false] 是否滚动,为true时,NoticeBar为单行
-	 * @property {Boolean} showIcon = [true|false] 是否显示左侧喇叭图标
-	 * @property {Boolean} showClose = [true|false] 是否显示左侧关闭按钮
-	 * @property {Boolean} showGetMore = [true|false] 是否显示右侧查看更多图标,为true时,NoticeBar为单行
-	 * @event {Function} click 点击 NoticeBar 触发事件
-	 * @event {Function} close 关闭 NoticeBar 触发事件
-	 * @event {Function} getmore 点击”查看更多“时触发事件
-	 */
-
-	export default {
-		name: 'UniNoticeBar',
-		components: {
-			uniIcons
-		},
-		props: {
-			text: {
-				type: String,
-				default: ''
-			},
-			moreText: {
-				type: String,
-				default: ''
-			},
-			backgroundColor: {
-				type: String,
-				default: '#fffbe8'
-			},
-			speed: {
-				// 默认1s滚动100px
-				type: Number,
-				default: 100
-			},
-			color: {
-				type: String,
-				default: '#de8c17'
-			},
-			moreColor: {
-				type: String,
-				default: '#999999'
-			},
-			single: {
-				// 是否单行
-				type: [Boolean, String],
-				default: false
-			},
-			scrollable: {
-				// 是否滚动,添加后控制单行效果取消
-				type: [Boolean, String],
-				default: false
-			},
-			showIcon: {
-				// 是否显示左侧icon
-				type: [Boolean, String],
-				default: false
-			},
-			showGetMore: {
-				// 是否显示右侧查看更多
-				type: [Boolean, String],
-				default: false
-			},
-			showClose: {
-				// 是否显示左侧关闭按钮
-				type: [Boolean, String],
-				default: false
-			}
-		},
-		data() {
-			const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
-			const elIdBox = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
-			return {
-				textWidth: 0,
-				boxWidth: 0,
-				wrapWidth: '',
-				webviewHide: false,
-				// #ifdef APP-NVUE
-				stopAnimation: false,
-				// #endif
-				elId: elId,
-				elIdBox: elIdBox,
-				show: true,
-				animationDuration: 'none',
-				animationPlayState: 'paused',
-				animationDelay: '0s'
-			}
-		},
-		mounted() {
-			// #ifdef APP-PLUS
-			var pages = getCurrentPages();
-			var page = pages[pages.length - 1];
-			var currentWebview = page.$getAppWebview();
-			currentWebview.addEventListener('hide',()=>{
-				this.webviewHide = true
-			})
-			currentWebview.addEventListener('show',()=>{
-				this.webviewHide = false
-			})
-			// #endif
-			this.$nextTick(() => {
-				this.initSize()
-			})
-		},
-		// #ifdef APP-NVUE
-		beforeDestroy() {
-			this.stopAnimation = true
-		},
-		// #endif
-		methods: {
-			initSize() {
-				if (this.scrollable) {
-					// #ifndef APP-NVUE
-					let query = [],
-						boxWidth = 0,
-						textWidth = 0;
-					let textQuery = new Promise((resolve, reject) => {
-						uni.createSelectorQuery()
-							// #ifndef MP-ALIPAY
-							.in(this)
-							// #endif
-							.select(`#${this.elId}`)
-							.boundingClientRect()
-							.exec(ret => {
-								this.textWidth = ret[0].width
-								resolve()
-							})
-					})
-					let boxQuery = new Promise((resolve, reject) => {
-						uni.createSelectorQuery()
-							// #ifndef MP-ALIPAY
-							.in(this)
-							// #endif
-							.select(`#${this.elIdBox}`)
-							.boundingClientRect()
-							.exec(ret => {
-								this.boxWidth = ret[0].width
-								resolve()
-							})
-					})
-					query.push(textQuery)
-					query.push(boxQuery)
-					Promise.all(query).then(() => {
-						this.animationDuration = `${this.textWidth / this.speed}s`
-						this.animationDelay = `-${this.boxWidth / this.speed}s`
-						setTimeout(() => {
-							this.animationPlayState = 'running'
-						}, 1000)
-					})
-					// #endif
-					// #ifdef APP-NVUE
-					dom.getComponentRect(this.$refs['animationEle'], (res) => {
-						let winWidth = uni.getSystemInfoSync().windowWidth
-						this.textWidth = res.size.width
-						animation.transition(this.$refs['animationEle'], {
-							styles: {
-								transform: `translateX(-${winWidth}px)`
-							},
-							duration: 0,
-							timingFunction: 'linear',
-							delay: 0
-						}, () => {
-							if (!this.stopAnimation) {
-								animation.transition(this.$refs['animationEle'], {
-									styles: {
-										transform: `translateX(-${this.textWidth}px)`
-									},
-									timingFunction: 'linear',
-									duration: (this.textWidth - winWidth) / this.speed * 1000,
-									delay: 1000
-								}, () => {
-									if (!this.stopAnimation) {
-										this.loopAnimation()
-									}
-								});
-							}
-						});
-					})
-					// #endif
-				}
-				// #ifdef APP-NVUE
-				if (!this.scrollable && (this.single || this.moreText)) {
-					dom.getComponentRect(this.$refs['textBox'], (res) => {
-						this.wrapWidth = res.size.width
-					})
-				}
-				// #endif
-			},
-			loopAnimation() {
-				// #ifdef APP-NVUE
-				animation.transition(this.$refs['animationEle'], {
-					styles: {
-						transform: `translateX(0px)`
-					},
-					duration: 0
-				}, () => {
-					if (!this.stopAnimation) {
-						animation.transition(this.$refs['animationEle'], {
-							styles: {
-								transform: `translateX(-${this.textWidth}px)`
-							},
-							duration: this.textWidth / this.speed * 1000,
-							timingFunction: 'linear',
-							delay: 0
-						}, () => {
-							if (!this.stopAnimation) {
-								this.loopAnimation()
-							}
-						});
-					}
-				});
-				// #endif
-			},
-			clickMore() {
-				this.$emit('getmore')
-			},
-			close() {
-				this.show = false;
-				this.$emit('close')
-			},
-			onClick() {
-				this.$emit('click')
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	@import '@/uni.scss';
-
-	.uni-noticebar {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		width: 100%;
-		box-sizing: border-box;
-		/* #endif */
-		flex-direction: row;
-		align-items: center;
-		padding: 6px 12px;
-		margin-bottom: 10px;
-	}
-
-	.uni-noticebar-close {
-		margin-right: 5px;
-	}
-
-	.uni-noticebar-icon {
-		margin-right: 5px;
-	}
-
-	.uni-noticebar__content-wrapper {
-		flex: 1;
-		flex-direction: column;
-		overflow: hidden;
-	}
-
-	.uni-noticebar__content-wrapper--single {
-		/* #ifndef APP-NVUE */
-		line-height: 18px;
-		/* #endif */
-	}
-
-	.uni-noticebar__content-wrapper--single,
-	.uni-noticebar__content-wrapper--scrollable {
-		flex-direction: row;
-	}
-
-	/* #ifndef APP-NVUE */
-	.uni-noticebar__content-wrapper--scrollable {
-		position: relative;
-		height: 18px;
-	}
-	/* #endif */
-
-	.uni-noticebar__content--scrollable {
-		/* #ifdef APP-NVUE */
-		flex: 0;
-		/* #endif */
-		/* #ifndef APP-NVUE */
-		flex: 1;
-		display: block;
-		overflow: hidden;
-		/* #endif */
-	}
-
-	.uni-noticebar__content--single {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		flex: none;
-		width: 100%;
-		justify-content: center;
-		/* #endif */
-	}
-
-	.uni-noticebar__content-text {
-		font-size: 14px;
-		line-height: 18px;
-		/* #ifndef APP-NVUE */
-		word-break: break-all;
-		/* #endif */
-	}
-
-	.uni-noticebar__content-text--single {
-		/* #ifdef APP-NVUE */
-		lines: 1;
-		/* #endif */
-		/* #ifndef APP-NVUE */
-		display: block;
-		width: 100%;
-		white-space: nowrap;
-		/* #endif */
-		overflow: hidden;
-		text-overflow: ellipsis;
-	}
-
-	.uni-noticebar__content-text--scrollable {
-		/* #ifdef APP-NVUE */
-		lines: 1;
-		padding-left: 750rpx;
-		/* #endif */
-		/* #ifndef APP-NVUE */
-		position: absolute;
-		display: block;
-		height: 18px;
-		line-height: 18px;
-		white-space: nowrap;
-		padding-left: 100%;
-		animation: notice 10s 0s linear infinite both;
-		animation-play-state: paused;
-		/* #endif */
-	}
-
-	.uni-noticebar__more {
-		/* #ifndef APP-NVUE */
-		display: inline-flex;
-		/* #endif */
-		flex-direction: row;
-		flex-wrap: nowrap;
-		align-items: center;
-		padding-left: 5px;
-	}
-
-	.uni-noticebar__more-text {
-		font-size: 14px;
-	}
-
-	@keyframes notice {
-		100% {
-			transform: translate3d(-100%, 0, 0);
-		}
-	}
-</style>

+ 0 - 141
components/uni-rate/uni-rate.vue

@@ -1,141 +0,0 @@
-<template>
-	<view class="uni-rate">
-		<view :key="index" :style="{ marginLeft: margin + 'px' }" @click="_onClick(index)" class="uni-rate__icon" v-for="(star, index) in stars">
-			<uni-icons :color="color" :size="size" :type="isFill ? 'star-filled' : 'star'" />
-			<!-- #ifdef APP-NVUE -->
-			<view :style="{ width: star.activeWitch.replace('%','')*size/100+'px'}" class="uni-rate__icon-on">
-				<uni-icons style="text-align: left;" :color="activeColor" :size="size" type="star-filled" />
-			</view>
-			<!-- #endif -->
-			<!-- #ifndef APP-NVUE -->
-			<view :style="{ width: star.activeWitch,top:-size/2+'px' }" class="uni-rate__icon-on">
-				<uni-icons :color="activeColor" :size="size" type="star-filled" />
-			</view>
-			<!-- #endif -->
-		</view>
-	</view>
-</template>
-
-<script>
-	import uniIcons from "../uni-icons/uni-icons.vue";
-	export default {
-		name: "UniRate",
-		components: {
-			uniIcons
-		},
-		props: {
-			isFill: {
-				// 星星的类型,是否镂空
-				type: [Boolean, String],
-				default: true
-			},
-			color: {
-				// 星星的颜色
-				type: String,
-				default: "#ececec"
-			},
-			activeColor: {
-				// 星星选中状态颜色
-				type: String,
-				default: "#ffca3e"
-			},
-			size: {
-				// 星星的大小
-				type: [Number, String],
-				default: 24
-			},
-			value: {
-				// 当前评分
-				type: [Number, String],
-				default: 0
-			},
-			max: {
-				// 最大评分
-				type: [Number, String],
-				default: 5
-			},
-			margin: {
-				// 星星的间距
-				type: [Number, String],
-				default: 0
-			},
-			disabled: {
-				// 是否可点击
-				type: [Boolean, String],
-				default: false
-			}
-		},
-		data() {
-			return {
-				valueSync: ""
-			};
-		},
-		computed: {
-			stars() {
-				const value = this.valueSync ? this.valueSync : 0;
-				const starList = [];
-				const floorValue = Math.floor(value);
-				const ceilValue = Math.ceil(value);
-				// console.log("ceilValue: " + ceilValue);
-				// console.log("floorValue: " + floorValue);
-				for (let i = 0; i < this.max; i++) {
-					if (floorValue > i) {
-						starList.push({
-							activeWitch: "100%"
-						});
-					} else if (ceilValue - 1 === i) {
-						starList.push({
-							activeWitch: (value - floorValue) * 100 + "%"
-						});
-					} else {
-						starList.push({
-							activeWitch: "0"
-						});
-					}
-				}
-				console.log("starList[4]: " + starList[4].activeWitch);
-				return starList;
-			}
-		},
-		created() {
-			this.valueSync = Number(this.value);
-		},
-		methods: {
-			_onClick(index) {
-				if (this.disabled) {
-					return;
-				}
-				this.valueSync = index + 1;
-				this.$emit("change", {
-					value: this.valueSync
-				});
-			}
-		}
-	};
-</script>
-
-<style lang="scss" scoped>
-	.uni-rate {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		line-height: 0;
-		font-size: 0;
-		flex-direction: row;
-	}
-
-	.uni-rate__icon {
-		position: relative;
-		line-height: 0;
-		font-size: 0;
-	}
-
-	.uni-rate__icon-on {
-		overflow: hidden;
-		position: absolute;
-		top: 0;
-		left: 0;
-		line-height: 1;
-		text-align: left;
-	}
-</style>

+ 0 - 244
components/uni-steps/uni-steps.vue

@@ -1,244 +0,0 @@
-<template>
-	<view class="uni-steps">
-		<view :class="[direction==='column'?'uni-steps__column':'uni-steps__row']">
-			<view :class="[direction==='column'?'uni-steps__column-text-container':'uni-steps__row-text-container']">
-				<view v-for="(item,index) in options" :key="index" :class="[direction==='column'?'uni-steps__column-text':'uni-steps__row-text']">
-					<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-title':'uni-steps__row-title']">{{item.status}}</text>
-					<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-desc':'uni-steps__row-desc']">{{item.context}}</text>
-					<text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-desc':'uni-steps__row-desc']">{{item.time}}</text>
-				</view>
-			</view>
-			<view :class="[direction==='column'?'uni-steps__column-container':'uni-steps__row-container']">
-				<view :class="[direction==='column'?'uni-steps__column-line-item':'uni-steps__row-line-item']" v-for="(item,index) in options"
-				 :key="index">
-					<view :class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--before':'uni-steps__row-line--before']"
-					 :style="{backgroundColor:index<=active&&index!==0?activeColor:index===0?'transparent':deactiveColor}"></view>
-					<view :class="[direction==='column'?'uni-steps__column-check':'uni-steps__row-check']" v-if="index === active">
-						<uni-icons :color="activeColor" type="checkbox-filled" size="14"></uni-icons>
-					</view>
-					<view :class="[direction==='column'?'uni-steps__column-circle':'uni-steps__row-circle']" v-else :style="{backgroundColor:index<active?activeColor:deactiveColor}"></view>
-					<view :class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--after':'uni-steps__row-line--after']"
-					 :style="{backgroundColor:index<active&&index!==options.length-1?activeColor:index===options.length-1?'transparent':deactiveColor}"></view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import uniIcons from '../uni-icons/uni-icons.vue'
-	export default {
-		name: 'UniSteps',
-		components: {
-			uniIcons
-		},
-		props: {
-			direction: {
-				// 排列方向 row column
-				type: String,
-				default: 'row'
-			},
-			activeColor: {
-				// 激活状态颜色
-				type: String,
-				default: '#1aad19'
-			},
-			deactiveColor: {
-				// 未激活状态颜色
-				type: String,
-				default: '#999999'
-			},
-			active: {
-				// 当前步骤
-				type: Number,
-				default: 0
-			},
-			options: {
-				type: Array,
-				default () {
-					return []
-				}
-			} // 数据
-		},
-		data() {
-			return {}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.uni-steps {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		width: 100%;
-		/* #endif */
-		/* #ifdef APP-NVUE */
-		flex: 1;
-		/* #endif */
-		flex-direction: column;
-	}
-
-	.uni-steps__row {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-	}
-
-	.uni-steps__column {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row-reverse;
-	}
-
-	.uni-steps__row-text-container {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-	}
-
-	.uni-steps__column-text-container {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-		flex: 1;
-	}
-
-	.uni-steps__row-text {
-		/* #ifndef APP-NVUE */
-		display: inline-flex;
-		/* #endif */
-		flex: 1;
-		flex-direction: column;
-	}
-
-	.uni-steps__column-text {
-		padding: 6px 0px;
-		border-bottom-style: solid;
-		border-bottom-width: 1px;
-		border-bottom-color: $uni-border-color;
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-	}
-
-	.uni-steps__row-title {
-		font-size: $uni-font-size-base;
-		line-height: 16px;
-		text-align: center;
-	}
-
-	.uni-steps__column-title {
-		font-size: $uni-font-size-base;
-		text-align: left;
-		line-height: 18px;
-	}
-
-	.uni-steps__row-desc {
-		font-size: 12px;
-		line-height: 14px;
-		text-align: center;
-	}
-
-	.uni-steps__column-desc {
-		font-size: $uni-font-size-sm;
-		text-align: left;
-		line-height: 18px;
-	}
-
-	.uni-steps__row-container {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-	}
-
-	.uni-steps__column-container {
-		/* #ifndef APP-NVUE */
-		display: inline-flex;
-		/* #endif */
-		width: 30px;
-		flex-direction: column;
-	}
-
-	.uni-steps__row-line-item {
-		/* #ifndef APP-NVUE */
-		display: inline-flex;
-		/* #endif */
-		flex-direction: row;
-		flex: 1;
-		height: 14px;
-		line-height: 14px;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.uni-steps__column-line-item {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-		flex: 1;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.uni-steps__row-line {
-		flex: 1;
-		height: 1px;
-		background-color: $uni-text-color-grey;
-	}
-
-	.uni-steps__column-line {
-		width: 1px;
-		background-color: $uni-text-color-grey;
-	}
-
-	.uni-steps__row-line--after {
-		transform: translateX(1px);
-	}
-
-	.uni-steps__column-line--after {
-		flex: 1;
-		transform: translate(0px, 1px);
-	}
-
-	.uni-steps__row-line--before {
-		transform: translateX(-1px);
-	}
-
-	.uni-steps__column-line--before {
-		height: 6px;
-		transform: translate(0px, -1px);
-	}
-
-	.uni-steps__row-circle {
-		width: 5px;
-		height: 5px;
-		border-radius: 100px;
-		background-color: $uni-text-color-grey;
-		margin: 0px 3px;
-	}
-
-	.uni-steps__column-circle {
-		width: 5px;
-		height: 5px;
-		border-radius: 100px;
-		background-color: $uni-text-color-grey;
-		margin: 4px 0px 5px 0px;
-	}
-
-	.uni-steps__row-check {
-		margin: 0px 6px;
-	}
-
-	.uni-steps__column-check {
-		height: 14px;
-		line-height: 14px;
-		margin: 2px 0px;
-	}
-</style>

+ 0 - 226
components/upload-images.vue

@@ -1,226 +0,0 @@
-<template>
-	<view class="upload-content">
-		<block v-for="(item, index) in imageList" :key="index">
-			<view class="upload-item">
-				<image class="upload-img" :src="item.filePath" mode="aspectFill" @click="previewImage(index)"></image>
-				<image class="upload-del-btn" 
-					@click="delImage(index)" 
-					src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjNBODgzQjUwNDM5MTFFOUJDMjlGN0UwRTJGMjVCNjQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjNBODgzQjYwNDM5MTFFOUJDMjlGN0UwRTJGMjVCNjQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGM0E4ODNCMzA0MzkxMUU5QkMyOUY3RTBFMkYyNUI2NCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGM0E4ODNCNDA0MzkxMUU5QkMyOUY3RTBFMkYyNUI2NCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PuYQTIAAAAHNSURBVHjazJgxasMwFIbjnsD4BDmCLxDQDZrNQ5bcILlBvXvpDRLIWmiHFkyH2t0LyVbwEkPpbE/eYlUCGYQax096UuIffkIgij7ryU/vyZuYy2e+Z56K70R8lsJcOfPn5AriMCvmZ2YKdMW8EQ/hRA9iEorwXlpZtObMRySQ6kysvrFWloHUEIcmUBuHUDLccmxQskErt7wyVLdy00tQ4Q2g5De2V9kNwWjffiNDA33f/42i6E13Qj5uNptlwJD+SyODuaqqqi/KVBTFOxSKA7VtW/NxSZI8AcbE2nuraZpvKgSBk6G4drsdBOwogz1CwAghH/JEl+BUKJ1VltPHHjoIAoeE4l53YFqb+RKcBSgqyqXhtxEKZwkKB3YOThYCqjPuCDoHZwGK3mGLtdPp5LmqTI1Dqe4p26EkNqA4iE6eg2z+iQ0okyQMATvYgLIIt9Y6knTyFBIudHqIq3BpmkL60VJ9O0sXZY8MBwSLtdNGEAQ/i8XiVXcz83EcEPDbuq/fzMdYWt+6GTmMsX2rh9q3TtsxNrzXhKt1rwg6rR1Dhdjqo7QMlWOvoWTF4imxQMRF7eaL8L5ohmwrLgDB8pCQc8DlcG7y538CDABJNGPqfaJgfgAAAABJRU5ErkJggg==" 
-					mode="scaleToFill">
-				</image>
-				<view class="upload-progress" v-if="item.progress < 100">{{item.progress}}%</view>
-			</view>
-		</block>
-		<view class="upload-add-btn" v-if="rduLength > 0" @click="chooseImage"></view>
-	</view>
-</template>
-
-<script>
-export default {
-	data() {
-		return {
-			imageList: []
-		};
-	},
-	props: {
-		url: {
-			type: String,
-			value: '' //上传接口地址
-		},
-		count: {
-			type: Number,
-			value: 4 //单次可选择的图片数量
-		},
-		length: {
-			type: Number,
-			value: 50 //可上传总数量
-		}
-	},
-	computed: {
-		rduLength(){
-			return this.length - this.imageList.length;
-		}
-	},
-	methods: {
-		//选择图片
-		chooseImage: function(){
-			uni.chooseImage({
-				count: this.rduLength < this.count ? this.rduLength : this.count, //最多可以选择的图片张数,默认9
-				sizeType: ['original', 'compressed'], //original 原图,compressed 压缩图,默认二者都有
-				sourceType: ['album'], //album 从相册选图,camera 使用相机,默认二者都有
-				success: (res)=> {
-					const images = res.tempFilePaths;
-					this.uploadFiles(images);
-				}
-			});
-		},
-		//上传图片
-		async uploadFiles(images){
-			this.imageList.push({
-				filePath: images[0],
-				progress: 0
-			});
-			uni.showLoading({
-				title: '请稍后..',
-				mask: true,
-			})
-			try{
-				const uploadUrl = await this.uploadImage(images[0]);
-			}catch(err){
-				console.log(err);
-				return;
-			}
-			
-			if(uploadUrl !== false){
-				images.splice(0, 1);
-				this.imageList[this.imageList.length - 1].src = uploadUrl;
-
-				//判断是否需要继续上传
-				if(images.length > 0 && this.rduLength > 0){
-					this.uploadFiles(images);
-				}else{
-					uni.hideLoading();
-				}
-			}else{
-				//上传失败处理
-				this.imageList.pop();
-				uni.hideLoading();
-				uni.showToast({
-					title: '上传中出现问题,已终止上传',
-					icon: 'none',
-					mask: true,
-					duration: 2000
-				});
-			}
-		},
-		uploadImage: function(file){
-			return new Promise((resolve, reject)=> {
-				//发送给后端的附加参数
-				const formData = {
-					thumb_mode: 1,  
-				};
-				this.uploadTask = uni.uploadFile({
-					url: this.url, 
-					filePath: file,
-					name: 'file',
-					formData: formData,
-					success(uploadFileResult){
-						const uploadFileRes = JSON.parse(uploadFileResult.data) || {};
-						if(uploadFileRes.status === 1 && uploadFileRes.data){
-							resolve(uploadFileRes.data);
-						}else{
-							reject('接口返回错误');
-						}
-					}, 
-					fail(){
-						reject('网络链接错误');
-					}
-				});
-				//上传进度
-				this.uploadTask.onProgressUpdate((progressRes)=> {
-					this.imageList[this.imageList.length - 1].progress = progressRes.progress;
-				});
-			});
-		},
-		//删除图片
-		delImage: function(index){
-			uni.showModal({
-				content: '确定要放弃这张图片么?',
-				success: (confirmRes)=> {
-					if (confirmRes.confirm) {
-						this.imageList.splice(index, 1);
-					} 
-				}
-			});
-		},
-		//预览图片
-		previewImage: function(index){
-			const urls = [];
-			this.imageList.forEach((item)=> {
-				urls.push(item.filePath);
-			})
-			uni.previewImage({
-				current: urls[index],
-				urls: urls,
-				indicator: "number"
-			})
-		}
-	}
-}
-</script>
-
-<style lang="scss">
-	.upload-content{
-		padding:24upx 0 0 28upx;
-		background-color: #fff;
-		overflow:hidden;
-	}
-	.upload-item{
-		position: relative;
-		float:left;
-		width:150upx;
-		height:150upx;
-		margin-right:30upx;
-		margin-bottom:30upx;
-		&:nth-child(4n){
-			margin-right:0;
-		}
-		.upload-img{
-			width:100%;
-			height:100%;
-			border-radius:8upx;
-		}
-		.upload-del-btn{
-			position: absolute;
-			right:-16upx;
-			top:-14upx;
-			width:36upx;
-			height:36upx;
-			border: 4upx solid #fff;
-			border-radius: 100px;
-		}
-		.upload-progress{
-			position: absolute;
-			left:0;
-			top:0;
-			display:flex;
-			align-items:center;
-			justify-content: center;
-			width:100%;
-			height:100%;
-			background-color: rgba(0,0,0,.4);
-			color:#fff;
-			font-size:24upx;
-			border-radius:8upx;
-		}
-	}
-	.upload-add-btn {
-		position: relative;
-		float:left;
-		width: 150upx;
-		height: 150upx;
-		z-index: 99;
-		border-radius:8upx;
-		background:#f9f9f9;
-		&:before,
-		&:after {
-			content: " ";
-			position: absolute;
-			top: 50%;
-			left: 50%;
-			-webkit-transform: translate(-50%, -50%);
-			transform: translate(-50%, -50%);
-			width: 4upx;
-			height: 60upx;
-			background-color: #d6d6d6;
-		}
-		&:after {
-			width: 60upx;
-			height: 4upx;
-		}
-		&:active {
-			background-color: #f7f7f7;
-		}
-	}
-
-</style>

+ 1 - 1
manifest.json

@@ -73,7 +73,7 @@
         "devServer" : {
         "devServer" : {
             "proxy" : {
             "proxy" : {
                 "/api" : {
                 "/api" : {
-                    "target" : "http://192.168.0.101/api",
+                    "target" : "https://xl.liuniu946.com/api",
                     // "changeOrigin": true,
                     // "changeOrigin": true,
                     "pathRewrite" : {
                     "pathRewrite" : {
                         "/api" : "" // rewrite path
                         "/api" : "" // rewrite path

+ 1 - 3
pages.json

@@ -10,9 +10,7 @@
 				// #endif
 				// #endif
 				"navigationBarTitleText": "游戏首页",
 				"navigationBarTitleText": "游戏首页",
 				"app-plus": {
 				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
+					"titleNView": false
 				}
 				}
 			}
 			}
 		},
 		},

+ 292 - 0
pages/index/compon/paopao-countdown.vue

@@ -0,0 +1,292 @@
+<template>
+	<!-- 倒计时和排名统计 -->
+	<view class="djs-pm" v-show="isClose==false">
+		<view class="djs flex">
+			<view class="djs-tit">
+				有奖竞猜即将开始
+			</view>
+			<view class="djs-time ">
+				<view class="djs-time1" :class="{'xxx':isActive}">
+					{{countdown_time}}
+				</view>
+				<!-- v-if="second>3||second==0" -->
+				<!-- <view class="djs-time1 xxx" v-else>
+					lalalalal
+				</view> -->
+			</view>
+		</view>
+		<view class="pm flex">
+			<view class="pm-ear ear-left"></view>
+			<view class="pm-ear ear-right"></view>
+			<view class="pm-tit">
+				近100期冠军数据统计
+			</view>
+			<view class="pm-list flex">
+				<view class="pm-item" v-for="(pmItem, pmIndex) in list" :key="pmIndex">
+					<view class="item-logo flex">
+						<image :src="`../../static/img/ganme01/xdw0${pmIndex+1}.png`" mode="widthFix"></image>
+					</view>
+					<view class="item-num flex">
+						<image src="../../../static/img/ganme01/win.png" mode="widthFix"></image>
+						<text>
+						{{pmItem.winNum}}
+						</text>
+					</view>
+				</view>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	export default {
+		name: "paopao-countdown",
+		props: {
+			// 小动物列表
+			list: {
+				type: Array,
+				default: []
+			},
+			// 是否倒计时已经结束
+			isClose: {
+				type: Boolean,
+				default: false
+
+			},
+			// 倒计时结束时间
+			downTime: {
+				type: Number,
+				default: '10086',
+			},
+		},
+		data() {
+			return {
+				isActive: false, //倒计时动画
+				countdown_time: '00:00',
+			};
+		},
+		watch: {
+			downTime(newValue, oldValue) {
+				this.isActive = false;
+				this.counTime();
+			}
+		},
+		methods: {
+			counTime() {
+				//获取当前时间
+				let data = new Date()
+				let newTime = data.getTime()
+				//获取结束时间
+				// let end = this.downTime
+				let end = this.downTime
+				
+				//时间差
+				let leftTime = end - newTime
+				if (leftTime <= 0) {
+					return
+				}
+				//定义保存倒计时时间
+				let m, s;
+				if (leftTime >= 0) {
+					// 分钟
+					m = Math.floor(leftTime / 1000 / 60 % 60)
+					// 秒数
+					s = Math.floor(leftTime / 1000 % 60)
+					// 当前秒数
+					this.second = s
+					this.la = m + s
+					//倒计时赋值view
+					this.countdown_time = `${m}:${s}`
+					let timers = setTimeout(this.counTime, 1000)
+					// 获取当前剩余时间
+					const timeOut = Math.floor( leftTime/1000);
+					if ( timeOut<= 3) {
+						this.isActive = true;
+						if(timeOut==0){
+							setTimeout(() => {
+								this.$emit('timeOut',true)
+							}, 1000);
+						}
+						return this.countdown_time = `${s}`
+						let timers = setTimeout(this.counTime, 1000)
+					}
+					//显示动态时间效果 
+					if (s < 10) {
+						return this.countdown_time = `${m}:0${s}`
+						let timers = setTimeout(this.counTime, 1000)
+
+					}
+					if (m < 10) {
+						return this.countdown_time = `0${m}:${s}`
+						let timers = setTimeout(this.counTime, 1000)
+					}
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.djs-pm {
+		pointer-events: none;
+		position: fixed;
+		z-index: 99999;
+		top: 0;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		padding-top: 300rpx;
+
+		.djs {
+			width: 297rpx;
+			padding: 20rpx;
+			background: #FFFCFF;
+			border-radius: 30rpx;
+			flex-direction: column;
+			justify-content: center;
+			margin: auto;
+
+			.djs-tit {
+				font-size: 19rpx;
+				font-weight: bold;
+				color: #FF2553;
+				padding-bottom: 10rpx;
+				padding-top: 0;
+
+			}
+
+			.djs-time {
+				width: 257rpx;
+				line-height: 78rpx;
+				background: #F0486B;
+				border-radius: 20rpx;
+				font-size: 58rpx;
+				font-weight: 400;
+				color: #FFFFFF;
+				text-align: center;
+			}
+
+			.djs-time1 {}
+
+			.xxx {
+
+
+				position: relative;
+				animation: mymove 1.2s;
+				animation-iteration-count: infinite;
+
+				/* Safari and Chrome */
+				-webkit-animation: mymove 1s;
+				-webkit-animation-iteration-count: infinite;
+			}
+
+			@keyframes mymove {
+				from {
+					font-size: 77rpx;
+				}
+
+				to {
+					font-size: 0rpx;
+				}
+			}
+
+			@-webkit-keyframes mymove
+
+			/* Safari and Chrome */
+				{
+				from {
+					font-size: 58rpx;
+				}
+
+				to {
+					font-size: 0rpx;
+				}
+			}
+
+			// .xxx:hover {
+
+			// 	font-size: 30rpx;
+			// 	-webkit-transform: rotate(180deg);
+			// 	/* Chrome, Safari, Opera */
+			// 	transform: rotate(180deg);
+			// }
+		}
+
+		.pm {
+			margin: 0 auto;
+			width: 601rpx;
+			height: 285rpx;
+			background: linear-gradient(0deg, #FFD5DE, #FFFFFF);
+			box-shadow: 0px 12rpx 15rpx 3rpx rgba(240, 72, 107, 0.29);
+			border-radius: 20rpx;
+			margin-top: 18rpx;
+			position: relative;
+			padding-top: 29rpx;
+			flex-direction: column;
+			justify-content: space-between;
+			.pm-ear {
+				width: 18rpx;
+				height: 18rpx;
+				background: #FFFCFF;
+				border-radius: 8rpx 8rpx 0px 0px;
+				position: absolute;
+				top: -18rpx;
+			}
+
+			.ear-left {
+				left: 232rpx;
+			}
+
+			.ear-right {
+				right: 232rpx;
+			}
+
+			.pm-tit {
+				flex-grow: 0;
+				min-width: 300rpx;
+				padding: 0 37rpx;
+				line-height: 42rpx;
+				background: #FFB310;
+				box-shadow: 0px 7rpx 16rpx 0px rgba(255, 179, 16, 0.35);
+				border-radius: 21rpx;
+				font-size: 23rpx;
+				font-weight: bold;
+				color: #FFFFFF;
+				margin: auto;
+			}
+
+			.pm-list {
+				padding: 22rpx 17rpx 50rpx;
+				width: 100%;
+				.pm-item {
+					width: 85rpx;
+					.item-logo {
+						width: 85rpx;
+						height: 85rpx;
+						background: #FFC1CE;
+						border-radius: 50%;
+						justify-content: center;
+						image {
+							width: 70rpx;
+						}
+					}
+
+					.item-num {
+						text-align: center;
+						font-size: 23rpx;
+						font-weight: bold;
+						color: #7B3C0E;
+						padding-top: 7rpx;
+						justify-content: center;
+						image {
+							margin-right: 4rpx;
+							width: 20rpx;
+							height: 24rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 126 - 0
pages/index/compon/paopao-ljt.vue

@@ -0,0 +1,126 @@
+<template>
+	<uni-popup ref='popup' type='center' @change='out'>
+		<view class="popup-box">
+			<view class="img">
+				<image src="../../../static/img/ganme01/lv.png" mode=""></image>
+			</view>
+			<view class="img-box">
+				<view class="img1">
+					<image v-if="phang.length>1" :src="`/static/img/ganme01/xdw0${phang[1].key}.png`" mode="widthFix"></image>
+				</view>
+				<view class="img2">
+					<image v-if="phang.length>0" :src="`/static/img/ganme01/xdw0${phang[0].key}.png`" mode="widthFix"></image>
+				</view>
+				<view class="img3">
+					<image v-if="phang.length>2" :src="`/static/img/ganme01/xdw0${phang[2].key}.png`" mode="widthFix"></image>
+				</view>
+			</view>
+		</view>
+	</uni-popup>
+</template>
+
+<script>
+	import uniPopup from '@/components/uni-popup/uni-popup.vue'
+	export default {
+		components: {
+			uniPopup
+		},
+		props: {
+			show: {
+				type: Boolean,
+				default: false
+			},
+			list: {
+				type: Array,
+				default: []
+			}
+		},
+		name: "paopao-ljt",
+		data() {
+			return {
+				image: '../../static/img/ganme01/xdw01.png',
+			};
+		},
+		methods: {
+			// 遮罩层触发
+			out(e) {
+				console.log(e,'遮罩层');
+				this.$emit('change',e)
+			}
+		},
+		computed: {
+			phang() {
+				let ar = this.list.map((e) => {
+					return e
+				})
+				ar.sort(function(a, b) {
+					return a.pm - b.pm
+				})
+				return ar
+			}
+		},
+		watch: {
+			show(newValue, oldValue) {
+				if (newValue) {
+					this.$refs.popup.open()
+				} else {
+					this.$refs.popup.close()
+				}
+			},
+		},
+	}
+</script>
+
+<style lang="scss">
+	image {
+		width: 100%;
+		height: 100%;
+	}
+
+
+	.popup-box {
+		margin: 0 auto;
+
+		.img {
+			position: relative;
+			width: 654rpx;
+			height: 332rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.img-box {
+			position: relative;
+
+		}
+
+		.img1 {
+			border-radius: 50%;
+			position: absolute;
+			width: 63rpx;
+			z-index: 99999;
+			top: -250rpx;
+			left: 78rpx;
+		}
+
+		.img2 {
+			border-radius: 50%;
+			position: absolute;
+			width: 70rpx;
+			top: -300rpx;
+			left: 295rpx;
+			z-index: 99999;
+		}
+		.img3 {
+			border-radius: 50%;
+			position: absolute;
+			width: 65rpx;
+			z-index: 999;
+			top: -242rpx;
+			left: 517rpx;
+		}
+	}
+</style>

+ 117 - 0
pages/index/compon/paopao-popup.vue

@@ -0,0 +1,117 @@
+<template>
+	<view>
+		<uni-popup ref='popup' type="center">
+			<view class="popup-box" v-if="status==1">
+				<view class="image">
+					<image src="/static/img/ganme01/newget.png" mode=""></image>
+					<view class="popup-title">
+						{{money}}积分
+					</view>
+				</view>
+				<view class="button" @click="close()">
+					<image src="/static/img/ganme01/buttomOk.png" mode="widthFix"></image>
+				</view>
+			</view>
+			<view class="popup-box" v-else>
+				<view class="image">
+					<image src="/static/img/ganme01/oldOut.png" mode="widthFix"></image>
+				</view>
+				<view class="button" @click="close()">
+					<image src="/static/img/ganme01/buttomOk.png" mode="widthFix"></image>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import uniPopup from '../../../components/uni-popup/uni-popup.vue'
+	export default {
+		name: "paopao-popup",
+		components: {
+			uniPopup
+		},
+		props: {
+			// 当前显示状态0不显示1获奖2未获奖
+			status: {
+				type: Number,
+				default: 0
+			},
+			money: {
+				type: Number,
+				default: 0
+			}
+		},
+		methods: {
+			server() {
+				this.$refs.popup.open();
+			},
+			// 关闭弹窗
+			close() {
+				this.$emit('close',true)
+				this.$refs.popup.close();
+			},
+		},
+		watch: {
+			status(newValue, oldValue) {
+				console.log(newValue,'修改值');
+				if (newValue > 0) {
+					this.$refs.popup.open();
+				} else {
+					this.$refs.popup.close();
+				}
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.popup-box {
+
+		top: -60rpx;
+
+		.image {
+			position: relative;
+			width: 760rpx;
+			height: 1060rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+
+			.popup-title {
+
+				align-items: center;
+				position: absolute;
+				margin-top: -490rpx;
+				margin-left: 255rpx;
+
+				text-align: center;
+				z-index: 1;
+				width: 144px;
+
+				font-size: 45rpx;
+				font-family: Source Han Sans CN;
+				font-weight: 800;
+				color: #FFFFFF;
+				line-height: 41rpx;
+			}
+		}
+
+
+
+		.button {
+			position: absolute;
+			margin-top: -360rpx;
+			margin-left: 235rpx;
+			width: 320rpx;
+			height: 120rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
+</style>

+ 571 - 77
pages/index/index.vue

@@ -1,64 +1,86 @@
 <template>
 <template>
-	<view class="container">
+	<view class="container" :style="{paddingBottom:heightMath.bottomHeight+'px'}">
+		<countdown-time :downTime='initPaopao.timeStart' :list='list' :isClose='initPaopao.isClose'
+			@timeOut='startGame'></countdown-time>
 		<!-- 头部banner -->
 		<!-- 头部banner -->
 		<view class="topBox">
 		<view class="topBox">
 			<image class="topImgBg" src="../../static/img/ganme01/gamebg.png" mode="widthFix"></image>
 			<image class="topImgBg" src="../../static/img/ganme01/gamebg.png" mode="widthFix"></image>
-			<view class="leftGz">
+			<!-- <view class="leftGz">
 				规则
 				规则
-			</view>
+			</view> -->
 			<view class="moneyIcon flex">
 			<view class="moneyIcon flex">
 				<image class="icon" src="../../static/img/ganme01/icontb.png" mode="scaleToFill"></image>
 				<image class="icon" src="../../static/img/ganme01/icontb.png" mode="scaleToFill"></image>
-				<text>55555</text>
+				<text>{{userinfo.integral}}</text>
 			</view>
 			</view>
-			<view class="jlBox flex">
+			<!-- <view class="jlBox flex">
 				<image class="icon" src="../../static/img/ganme01/iconjlu.png" mode="scaleToFill"></image>
 				<image class="icon" src="../../static/img/ganme01/iconjlu.png" mode="scaleToFill"></image>
 				<text>
 				<text>
 					记录>
 					记录>
 				</text>
 				</text>
-			</view>
+			</view> -->
+		</view>
+		<view class="userBg" :style="{animationPlayState:initPaopao.gameState==1?'running':'paused'}">
 		</view>
 		</view>
 		<!-- 头部bannerEnd -->
 		<!-- 头部bannerEnd -->
-		<view class="content" :style="{height:contentHeight+'px'}">
+		<!-- 跑道 -->
+		<view class="content">
 			<view class="listItem" v-for="(item,index) in list">
 			<view class="listItem" v-for="(item,index) in list">
 				<view class="line" v-if="index>0"></view>
 				<view class="line" v-if="index>0"></view>
 				<view class="itemBox">
 				<view class="itemBox">
+					<!-- 当前跑道数 -->
+					<view class="indexItem flex" :style="{left:initPaopao.gameState>0?'-200rpx':'150rpx'}">
+						<view class="leftI"></view>
+						<view class="LeftInd">
+							{{index+1}}
+						</view>
+					</view>
+					<!-- 当前跑道数 -->
 					<!-- 名次排行 -->
 					<!-- 名次排行 -->
 					<!-- 右侧头像 -->
 					<!-- 右侧头像 -->
-					<view class="rightImgAv flex">
-						<image class="imgAv" :src="`../../static/img/ganme01/xdw0${index+1}.png`" mode="widthFix">
-						</image>
+					<view class="rightImgAv flex"
+						:style="{marginRight:item.margin+'rpx',transitionDuration: item.time+'s'}">
+
+						<view class="amdImg" :style="{
+								animationDuration:item.speed +'s', 
+								animationPlayState:item.paopao?'running':'paused',
+								backgroundImage:`url(${urlFile}/static/img/ganme01/xdwP0${index+1}.png)`
+								}">
+						</view>
+
 					</view>
 					</view>
 					<!-- 右侧头像END -->
 					<!-- 右侧头像END -->
 					<!-- 左侧详情 -->
 					<!-- 左侧详情 -->
-					<view class="levelBox flex" :class="{noWin:index!=winIndex,win:index==winIndex}" :style="{marginRight:item.onEnd?0:''}">
+					<view class="levelBox flex" :class="{noWin:item.pm!=1,win:item.pm==1}"
+						:style="{marginRight:item.onEnd?0:'',transitionDuration: item.time+'s'}">
 						<view class="levelLeft flex">
 						<view class="levelLeft flex">
-							<view class="imgAvBox flex" :class="{noWin:index!=winIndex,win:index==winIndex}">
+							<view class="imgAvBox flex" :class="{noWin:item.pm!=1,win:item.pm==1}">
 								<image class="imgAv" :src="`../../static/img/ganme01/xdw0${index+1}.png`"
 								<image class="imgAv" :src="`../../static/img/ganme01/xdw0${index+1}.png`"
 									mode="widthFix">
 									mode="widthFix">
 								</image>
 								</image>
 							</view>
 							</view>
 							<view class="levelContent">
 							<view class="levelContent">
-								<view class="levelItemName" :class="{noWin:index!=winIndex,win:index==winIndex}">
+								<view class="levelItemName" :class="{noWin:item.pm!=1,win:item.pm==1}">
 									{{item.name}}
 									{{item.name}}
 								</view>
 								</view>
 								<view class="levelItemEnName">
 								<view class="levelItemEnName">
 									{{item.enName}}
 									{{item.enName}}
 								</view>
 								</view>
 							</view>
 							</view>
-							<view class="rightTIp">
-
-							</view>
+							<view class="rightTIp"></view>
 						</view>
 						</view>
 						<view class="levelRight">
 						<view class="levelRight">
-							{{index}}
+							{{item.pm}}
 						</view>
 						</view>
 					</view>
 					</view>
 					<!-- 左侧详情END -->
 					<!-- 左侧详情END -->
 					<!-- 名次排行END -->
 					<!-- 名次排行END -->
 				</view>
 				</view>
 			</view>
 			</view>
-			<image class="saidao" v-if="gameStart" src="../../static/img/ganme01/saidao.png" mode="widthFix"></image>
+			<image class="saidao" :style="{marginRight:(initPaopao.gameState==2)?'170rpx':'-30rpx'}"
+				src="../../static/img/ganme01/saidao.png" mode="widthFix"></image>
 		</view>
 		</view>
+		<!-- 跑道END -->
+		<!-- 底部投票 -->
 		<view class="bottomBox">
 		<view class="bottomBox">
 			<!-- 底部标题 -->
 			<!-- 底部标题 -->
 			<view class="bottomTitle flex">
 			<view class="bottomTitle flex">
@@ -68,13 +90,13 @@
 						猜冠军
 						猜冠军
 					</view>
 					</view>
 					<view class="tip">
 					<view class="tip">
-						猜对得5倍积分
+						猜对得1分红积分
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="titleRight flex">
 				<view class="titleRight flex">
 					<image class="rightIcon" src="../../static/img/ganme01/iconrw.png" mode="widthFix"></image>
 					<image class="rightIcon" src="../../static/img/ganme01/iconrw.png" mode="widthFix"></image>
 					<view class="rightNum">
 					<view class="rightNum">
-						12
+						{{initPaopao.userNum}}
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -82,7 +104,7 @@
 			<!-- 动物列表 -->
 			<!-- 动物列表 -->
 			<view class="bottoItemList flex">
 			<view class="bottoItemList flex">
 				<view v-for="(item,index) in list" class="item flex" @click="checkedItem(item.key)"
 				<view v-for="(item,index) in list" class="item flex" @click="checkedItem(item.key)"
-					:class="{itemchecked:checked==item.key}">
+					:class="{itemchecked:initPaopao.checked==item.key}">
 					<image class="itemIcon" :src="`../../static/img/ganme01/xdw0${index+1}.png`" mode="widthFix">
 					<image class="itemIcon" :src="`../../static/img/ganme01/xdw0${index+1}.png`" mode="widthFix">
 					</image>
 					</image>
 					<view class="nameBox">
 					<view class="nameBox">
@@ -93,6 +115,13 @@
 							{{item.enName}}
 							{{item.enName}}
 						</view>
 						</view>
 					</view>
 					</view>
+					<view class="topMoneyTip flex" v-if="item.money>0">
+						<image class="topMoneyTipIcon" src="../../static/img/ganme01/icontb.png" mode="widthFix">
+						</image>
+						<text class="itemMoney">
+							{{item.money}}
+						</text>
+					</view>
 				</view>
 				</view>
 			</view>
 			</view>
 			<!-- 动物列表END -->
 			<!-- 动物列表END -->
@@ -105,20 +134,19 @@
 								积分
 								积分
 							</view>
 							</view>
 							<view class="num">
 							<view class="num">
-								10
+								100
 							</view>
 							</view>
 						</view>
 						</view>
 					</view>
 					</view>
 					<view class="buttomRight flex">
 					<view class="buttomRight flex">
 						<view class="left">
 						<view class="left">
 							<view class="tip">
 							<view class="tip">
-								消耗10积分
+								消耗100积分
 							</view>
 							</view>
 							<view class="tip">
 							<view class="tip">
-								才对可得50积分
+								中奖后获得1分红积分
 							</view>
 							</view>
 						</view>
 						</view>
-
 						<view class="right flex" @click="onStart">
 						<view class="right flex" @click="onStart">
 							<view class="cont">
 							<view class="cont">
 							</view>
 							</view>
@@ -129,122 +157,488 @@
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
+			<view class="backMask" v-if="initPaopao.isClose==true"></view>
 		</view>
 		</view>
+		<!-- 底部投票END -->
+		<ljt :show="initPaopao.phShow" :list='list' @change='phbMask'></ljt>
+		<popup :status="initPaopao.winStatus" :money='initPaopao.winMoney' @close='initGame'></popup>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
+	import {
+		getUserInfo
+	} from "../../api/login.js"
 	import {
 	import {
 		mapState
 		mapState
-	} from 'vuex';
+	} from "vuex"
+	import {
+		gameDetail,
+		gameSetCu,
+		gameGameLast
+	} from "../../api/game.js"
+	import countdownTime from "./compon/paopao-countdown.vue"
+	import ljt from "./compon/paopao-ljt.vue"
+	import popup from "./compon/paopao-popup.vue"
 	export default {
 	export default {
+		components: {
+			countdownTime,
+			ljt,
+			popup,
+		},
 		computed: {
 		computed: {
-			contentHeight() {
-				return this.heightMath.pageHeight - this.heightMath.bottomHeight - this.heightMath.bannerHeight + this
-					.heightMath.cMathNum / this.pageWidth * 750
-			}
+			...mapState(['urlFile'])
 		},
 		},
 		data() {
 		data() {
 			return {
 			return {
-				gameStart: false, //判断游戏是否结束
-				winIndex: 0, //当前游戏排名第一的人
-				checked: 1, //当前选中的要投票的人物
+				// 游戏基础数据保存对象
+				initPaopao: {
+					onBgAnimation: false, //座位席背景动画
+					checked: 1, //当前选中的要投票的人物
+					game: '', //保存跑步中的游戏对象
+					gameState: 0, //判断游戏状态0未开始,1跑步中,2已结束
+					marginSt: 630, //开始时右侧距离
+					marginEnd: 30, //结束时右侧距离
+					sp: 500, //每秒移动距离
+					time: 5, //跑步计算间隔时间
+					baseTime: 2, //最低移动需要时间
+					isClose: true, //倒计时是否关闭
+					timeStart: 10086, //下次游戏开始时间
+					userNum: 0, //参与当前游戏的用户数
+					money: 0, //投注获取积分
+					getGameData: '', //获取游戏结果数据定时器
+					winXdw: 0, //保存上局胜利的小动物
+					winMoney: 0, //保存胜利后获取的积分数
+					winStatus: 0, //0不显示1获奖2未获奖
+					phShow: false //是否显示排行结果
+				},
 				heightMath: {
 				heightMath: {
 					pageHeight: 0,
 					pageHeight: 0,
 					bannerHeight: 0,
 					bannerHeight: 0,
 					bottomHeight: 0,
 					bottomHeight: 0,
 					cMathNum: 30,
 					cMathNum: 30,
 				},
 				},
-				pageWidth: 0,
+				pageWidth: 0, //页面宽度
 				list: [{
 				list: [{
 						key: 1,
 						key: 1,
-						name: '小老虎',
-						enName: 'Tiger',
-						onEnd:false,
+						name: '猴子',
+						enName: 'Monkey',
+						onEnd: false, //是否已经跑步结束
+						margin: 630, //动物离右侧的距离
+						time: 1, //动物移动时动画效果时间
+						pm: 0, //排名
+						money: 0, //当前所投注的金额
+						speed: 1, //小动物跑步速度
+						paopao: false, //小动物是否开始跑步
 					},
 					},
 					{
 					{
 						key: 2,
 						key: 2,
-						name: '大熊猫',
-						enName: 'Panda',
-						onEnd:false,
+						name: '老虎',
+						enName: 'Tiger',
+						onEnd: false,
+						margin: 630,
+						time: 1,
+						pm: 0,
+						money: 0,
+						speed: 1, //小动物跑步速度
+						paopao: false, //小动物是否开始跑步
 					},
 					},
 					{
 					{
 						key: 3,
 						key: 3,
-						name: '小柴犬',
-						enName: 'Shiba Inu',
-						onEnd:false,
+						name: '老鼠',
+						enName: 'Mouse',
+						onEnd: false,
+						margin: 630,
+						time: 1,
+						pm: 0,
+						money: 0,
+						speed: 1, //小动物跑步速度
+						paopao: false, //小动物是否开始跑步
 					},
 					},
 					{
 					{
 						key: 4,
 						key: 4,
-						name: '小兔子',
-						enName: 'Rabbit',
-						onEnd:false,
+						name: '龙',
+						enName: 'Dragon',
+						onEnd: false,
+						margin: 630,
+						time: 1,
+						pm: 0,
+						money: 0,
+						speed: 1, //小动物跑步速度
+						paopao: false, //小动物是否开始跑步
 					},
 					},
 					{
 					{
 						key: 5,
 						key: 5,
-						name: '小鸭子',
-						enName: 'Duck',
-						onEnd:false,
+						name: '马',
+						enName: 'Horse',
+						onEnd: false,
+						margin: 630,
+						time: 1,
+						pm: 0,
+						money: 0,
+						speed: 1, //小动物跑步速度
+						paopao: false, //小动物是否开始跑步
 					},
 					},
 					{
 					{
 						key: 6,
 						key: 6,
-						name: '大棕熊',
-						enName: 'Bear',
-						onEnd:false,
+						name: '猪',
+						enName: 'Pig',
+						onEnd: false,
+						margin: 630,
+						time: 1,
+						pm: 0,
+						money: 0,
+						speed: 1, //小动物跑步速度
+						paopao: false, //小动物是否开始跑步
 					},
 					},
-				]
+				],
+				userinfo: {
+					integral: 0
+				},
+				loadUserData: false, //是否加载过数据
+				phList: [] //跑步排行
 			};
 			};
 		},
 		},
+		onLoad(option) {
+			if (option.token) {
+				// 保存token;
+				uni.setStorageSync('token', option.token)
+			}
+			// 初始化跑步
+			this.init();
+		},
+		onShow() {
+			console.log(this.urlFile);
+			// 获取用户数据
+			this.getUserInfo();
+		},
 		onReady: function(option) {
 		onReady: function(option) {
-			console.log('渲染完毕');
 			let that = this;
 			let that = this;
 			setTimeout((e) => {
 			setTimeout((e) => {
 				uni.createSelectorQuery().select(".topBox").fields({
 				uni.createSelectorQuery().select(".topBox").fields({
 					size: true,
 					size: true,
 				}, (e) => {
 				}, (e) => {
 					that.heightMath.bannerHeight = e.height;
 					that.heightMath.bannerHeight = e.height;
-					console.log(e, '返回结果')
 				}).exec();
 				}).exec();
 				uni.createSelectorQuery().select(".bottomBox").fields({
 				uni.createSelectorQuery().select(".bottomBox").fields({
 					size: true,
 					size: true,
 				}, (e) => {
 				}, (e) => {
 					that.heightMath.bottomHeight = e.height;
 					that.heightMath.bottomHeight = e.height;
-					console.log(e, '返回结果2')
 				}).exec();
 				}).exec();
 				uni.createSelectorQuery().select(".container").fields({
 				uni.createSelectorQuery().select(".container").fields({
 					size: true,
 					size: true,
 				}, (e) => {
 				}, (e) => {
 					that.heightMath.pageHeight = e.height;
 					that.heightMath.pageHeight = e.height;
 					that.pageWidth = e.width;
 					that.pageWidth = e.width;
-					console.log(e, '返回结果3')
 				}).exec();
 				}).exec();
 			}, 50)
 			}, 50)
 		},
 		},
+		methods: {
+			// 刷新游戏数据
+			gameRefresh() {
+				// 保证只加载一次游戏数据
+				if (this.userinfo.uid && !this.loadUserData) {
+					this.loadUserData = true;
+					// 获取游戏数据
+					this.gameDetail();
+				}
+			},
+			// 测试结束游戏
+			// stopGame() {
+			// 	// 清除倒计时
+			// 	clearInterval(this.initPaopao.getGameData)
+			// 	// 保存第一名数据
+			// 	this.initPaopao.winXdw = 1
+			// 	this.initPaopao.winMoney = 100
+			// 	// 结束游戏
+			// 	this.onEndGame();
+			// },
 
 
-		onShow: function() {
+			// 排行榜遮罩层事件
+			phbMask(e) {
+				console.log();
+				if (e.show == false) {
+					console.log("结果");
+					if (this.initPaopao.winMoney > 0) {
+						this.initPaopao.winStatus = 1
+					} else {
+						this.initPaopao.winStatus = 2
+					}
+					console.log("结果", this.initPaopao.winStatus);
+				}
+			},
+			// 定时获取游戏结果
+			getGameData() {
+				gameGameLast().then((e) => {
+					if (e.data.last_open.length > 0) {
+						// 清除倒计时
+						clearInterval(this.initPaopao.getGameData)
+						// 保存第一名数据
+						this.initPaopao.winXdw = e.data.last_open[0];
+						this.initPaopao.winMoney = e.data.my
+						this.phShow = true; //显示排行
+						// 结束游戏
+						this.onEndGame();
+					}
+				}).catch((e) => {
+					console.log(e);
+				})
+			},
 
 
+			// 获取当前进行中的游戏基础数据
+			gameDetail() {
+				gameDetail().then((e) => {
+					try {
+						// 下一次场游戏预计开始时间
+						this.initPaopao.timeStart = e.data.last_game.time * 1000 + e.data.time_span * 1000 - 1000;
+						for (let i = 0; i < this.list.length; i++) {
+							this.list[i].winNum = e.data.times[i + 1];
+						}
+						const data = (new Date()).getTime();
+						// 判断是否已经倒计时结束开始游戏
+						if (data - this.initPaopao.timeStart < 0) {
+							// 显示倒计时弹窗
+							this.initPaopao.isClose = false;
+						} else {
+							// 关闭倒计时弹窗
+							this.initPaopao.isClose = true;
+							// 游戏开始
+							this.startGame()
+						}
+						// 当前参与游戏的用户数量
+						this.initPaopao.userNum = e.data.join_member
+						// 保存投的积分
+						this.initPaopao.money = +e.data.join_price
 
 
+						// 保存投注信息
+						const join = e.data.join
+						for (let i = 0; i < join.length; i++) {
+							this.list[join[i].num - 1].money = (+join[i].ticket) * this.initPaopao.money
+						}
 
 
-		},
-		methods: {
+					} catch (e) {
+						console.log(e, '错误');
+						//TODO handle the exception
+					}
+
+				}).catch((e) => {
+					console.log(e);
+				})
+			},
+			// 获取用户信息
+			getUserInfo() {
+				getUserInfo().then((e) => {
+					this.userinfo = e.data;
+					this.userinfo.integral = +e.data.integral;
+					this.gameRefresh();
+				}).catch((e) => {
+					console.log(e);
+				})
+			},
+			// 初始化右侧距离
+			init() {
+				// 初始化右侧距离
+				for (let i = 0; i < this.list.length; i++) {
+					this.list[i].margin = this.initPaopao.marginSt
+				}
+			},
+			// 结果展示
+			// 初始化游戏
+			initGame() {
+				clearInterval(this.initPaopao.game);
+				// 初始化游戏进度
+				this.initPaopao.gameState = 0;
+				// 初始化获取积分弹窗
+				this.initPaopao.winStatus = 0;
+				// 初始化获取的资金
+				this.initPaopao.winMoney = 0;
+				// 初始化允许投注
+				this.initPaopao.isClose = false;
+				// 初始化获取游戏信息
+				this.gameDetail();
+				for (var i = 0; i < this.list.length; i++) {
+					let item = this.list[i]
+					item.onEnd = false;
+					item.time = 0;
+					item.margin = this.initPaopao.marginSt;
+					item.money = 0;
+				}
+			},
+			// 游戏开始
+			startGame() {
+				// 设置当前游戏状态为跑步中
+				this.initPaopao.gameState = 1;
+				// 设置背景观众席开始动画
+				this.initPaopao.onBgAnimation = true;
+				// 游戏倒计时显示隐藏
+				this.initPaopao.isClose = true;
+				// 开始调用跑步
+				this.runGame();
+				// 开始调用获取游戏数据
+				this.getGameData()
+				// 清除倒计时
+				clearInterval(this.initPaopao.getGameData)
+				// 定时获取游戏数据
+				this.initPaopao.getGameData = setInterval(() => {
+					this.getGameData()
+				}, 20000)
+			},
+			// 小动物跑步结束后执行方法
+			onEndGame() {
+				this.endGame().then(() => {
+					// 显示排行榜
+					this.initPaopao.phShow = true;
+					// 复制数组
+					const ar = this.list.map((e) => {
+						return e
+					})
+					// 更新列表显示正确的排行榜
+					this.$set(this, 'list', ar)
+				})
+			},
+			// 小动物跑步结束
+			endGame() {
+				return new Promise((ok, erro) => {
+					const that = this;
+					try {
+						clearInterval(that.initPaopao.game);
+						// 保存当前第一名
+						const one = that.initPaopao.winXdw;
+						const Paopao = that.initPaopao;
+						for (let i = 0; i < that.list.length; i++) {
+							const item = that.list[i]
+							// 随机跑步距离
+							if (one == item.key) {
+								item.margin = Paopao.marginEnd;
+								item.time = Paopao.baseTime
+							} else {
+								// 保障除开第一名外其他动物距离终点比第一名远
+								item.margin = Math.floor(Math.random() * 530) + 150;
+								item.time = Math.ceil(Math.random() * 3) + Paopao.baseTime;
+							}
+							// 设置第一名的排名
+							if (item.key == one) {
+								item.pm = 1
+							}
+						}
+						// 用于保存除开第一名外的当前排名位置
+						const arr = that.list.map((e) => {
+							return e;
+						}).sort((e, b) => {
+							return e.margin - b.margin
+						}).filter((item, index, arr) => {
+							return item.key != one;
+						});
+						// 保证第一名已跑到头部
+						setTimeout(() => {
+							// 设置当前游戏已经结束
+							Paopao.gameState = 2;
+							// 保存多少时间后最后一名到达终点
+							let timeEnd = 0
+							for (let i = 0; i < that.list.length; i++) {
+								const item = that.list[i]
+								// 随机跑步距离
+								item.onEnd = true;
+								item.time = item.margin / 300 * 2;
+								// 关闭动物跑步
+								setTimeout((e) => {
+									item.paopao = false;
+								},item.time*1000)
+								// 判断是否为最后一名到达终点
+								if (timeEnd < item.time) {
+									timeEnd = item.time
+								}
+								// 初始化最初距离
+								item.margin = Paopao.marginEnd;
+								// 保存每个动物的当前排名
+								for (let s = 0; s < arr.length; s++) {
+									if (arr[s].key == item.key) {
+										item.pm = s + 2
+									}
+								}
+							}
+							// 判断最后一个小动物是否跑完
+							setTimeout((e) => {
+								ok()
+							}, timeEnd * 1000 + 1000)
+						}, 1500)
+					} catch (e) {
+						erro(e)
+						//TODO handle the exception
+					}
+				})
+			},
+			// 游戏跑动中的距离
+			runGame() {
+				// 计算小动物跑步
+				this.randomObj()
+				clearInterval(this.initPaopao.game)
+				// 循环计算小动物跑步
+				this.initPaopao.game = setInterval((e) => {
+					this.randomObj()
+				}, 5000)
+			},
+			// 随机小动物跑步及动画时间
+			randomObj() {
+				for (var i = 0; i < this.list.length; i++) {
+					// 保存当前距离,用于计算跑步速度
+					const actionMargin = this.list[i].margin;
+
+					// 随机新跑步距离
+					this.list[i].margin = Math.floor(Math.random() * 530) + 100;
+					this.list[i].paopao = true;
+					// 判断是否减速
+					if (this.list[i].margin > actionMargin) {
+						this.list[i].speed = (this.list[i].margin - actionMargin) / this.list[i].margin + 0.5;
+					} else {
+						this.list[i].speed = 0.5 - (actionMargin-this.list[i].margin ) / actionMargin*0.5;
+					}
+					// 随机跑步速度
+					this.list[i].time = Math.ceil(Math.random() * 3) + this.initPaopao.baseTime;
+				}
+			},
 			// 选中的要投票的小动物
 			// 选中的要投票的小动物
 			checkedItem(ind) {
 			checkedItem(ind) {
-				this.checked = ind
+				this.initPaopao.checked = ind
 			},
 			},
-			// 开始竞猜
-			onStart(){
-				this.gameStart = true;
-				const num = Math.floor(Math.random()*6);
-				this.list[num].onEnd = true;
+			// 开始竞猜投票
+			onStart() {
+				if (this.userinfo.integral - this.initPaopao.money < 0) {
+					uni.showModal({
+						title: '错误',
+						content: '您的积分余额不足无法参与竞猜',
+						showCancel: false,
+					});
+					return
+				} else {
+					// 增加投注金额
+					this.list[this.initPaopao.checked - 1].money += this.initPaopao.money;
+					this.userinfo.integral -= this.initPaopao.money;
+
+				}
+				// 游戏
+				gameSetCu({
+					num: this.initPaopao.checked,
+					ticket: 1,
+				}).then((e) => {
+					console.log(e, '返回');
+				}).catch((e) => {
+					console.log(e);
+				})
 			}
 			}
 		}
 		}
 	};
 	};
 </script>
 </script>
 
 
 <style lang="scss">
 <style lang="scss">
-	page {
-		height: 0;
-		min-height: 100%;
+	@keyframes bgA {
+		from {
+			background-position: 0 0;
+		}
+
+		to {
+			background-position: -1316rpx 0;
+		}
 	}
 	}
 
 
 	.flex {
 	.flex {
@@ -275,11 +669,13 @@
 				min-width: 150rpx;
 				min-width: 150rpx;
 
 
 				.name {
 				.name {
+					text-align: center;
 					font-size: 24rpx;
 					font-size: 24rpx;
 				}
 				}
 
 
 				.num {
 				.num {
 					font-size: 48rpx;
 					font-size: 48rpx;
+					text-align: center;
 				}
 				}
 			}
 			}
 
 
@@ -314,12 +710,19 @@
 		background: linear-gradient(0deg, #F2977C, #FFCBBC);
 		background: linear-gradient(0deg, #F2977C, #FFCBBC);
 		padding-top: 10rpx;
 		padding-top: 10rpx;
 		position: relative;
 		position: relative;
+
 		.saidao {
 		.saidao {
-			position: absolute;
-			right: 170rpx;
-			top: 0;
+			transition: margin-right 1s linear;
+			// position: absolute;
+			// right: 170rpx;
+			// top: 0;
 			width: 30rpx;
 			width: 30rpx;
+			z-index: 1;
+			margin-top: -660rpx;
+			float: right;
+			margin-right: 170rpx;
 		}
 		}
+
 		.listItem {
 		.listItem {
 			.line {
 			.line {
 				background: #FFFFFF;
 				background: #FFFFFF;
@@ -331,13 +734,39 @@
 			.itemBox {
 			.itemBox {
 				height: 100rpx;
 				height: 100rpx;
 				overflow: hidden;
 				overflow: hidden;
+				position: relative;
+				z-index: 5;
+
+				.indexItem {
+					position: absolute;
+					left: 150rpx;
+					top: 0;
+					height: 100%;
+					transition: left 1s linear;
+
+					.leftI {
+						width: 4px;
+						height: 60rpx;
+						background-color: #FFFFFF;
+					}
+
+					.LeftInd {
+						line-height: 1;
+						margin: 0 30rpx;
+						color: #FFFFFF;
+						font-size: 60rpx;
+						font-weight: bold;
+					}
+				}
+
 				.levelBox {
 				.levelBox {
 					padding: 5rpx 50rpx;
 					padding: 5rpx 50rpx;
 					width: 400rpx;
 					width: 400rpx;
 					height: 100rpx;
 					height: 100rpx;
 					float: right;
 					float: right;
 					margin-right: 100%;
 					margin-right: 100%;
-					transition:all 1s ease-out;
+					transition: margin-right 0.3s ease-out;
+
 					&.win {
 					&.win {
 						background: linear-gradient(90deg, rgba(255, 113, 143, 0), #F5B231, rgba($color: #F5CA31, $alpha: 0.72), rgba(255, 113, 143, 0));
 						background: linear-gradient(90deg, rgba(255, 113, 143, 0), #F5B231, rgba($color: #F5CA31, $alpha: 0.72), rgba(255, 113, 143, 0));
 					}
 					}
@@ -387,7 +816,6 @@
 							.levelItemName {
 							.levelItemName {
 								padding-left: 45rpx;
 								padding-left: 45rpx;
 								font-size: 28rpx;
 								font-size: 28rpx;
-
 								line-height: 50rpx;
 								line-height: 50rpx;
 
 
 								&.win {
 								&.win {
@@ -416,13 +844,27 @@
 				}
 				}
 
 
 				.rightImgAv {
 				.rightImgAv {
+					transition: margin-right 1s linear;
 					margin-right: 50rpx;
 					margin-right: 50rpx;
 					margin-left: 60rpx;
 					margin-left: 60rpx;
 					float: right;
 					float: right;
 					height: 100%;
 					height: 100%;
+					z-index: 1;
+
 					.imgAv {
 					.imgAv {
 						width: 90rpx;
 						width: 90rpx;
 					}
 					}
+
+					.amdImg {
+						width: 60px;
+						height: 60px;
+						background-size: auto 60px;
+						animation-name: paopao;
+						animation-duration: 1s;
+						animation-timing-function: steps(13);
+						animation-iteration-count: infinite;
+						animation-play-state: paused;
+					}
 				}
 				}
 			}
 			}
 		}
 		}
@@ -444,6 +886,16 @@
 		line-height: 1;
 		line-height: 1;
 		padding: 0 20rpx;
 		padding: 0 20rpx;
 		padding-bottom: 30rpx;
 		padding-bottom: 30rpx;
+		z-index: 99;
+
+		.backMask {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			bottom: 0;
+			background-color: rgba($color: #000000, $alpha: 0.3);
+		}
 
 
 		.bottomTitle {
 		.bottomTitle {
 			padding: 30rpx 5rpx;
 			padding: 30rpx 5rpx;
@@ -486,6 +938,7 @@
 				border-radius: 15rpx;
 				border-radius: 15rpx;
 				padding: 0 10rpx;
 				padding: 0 10rpx;
 				margin-bottom: 20rpx;
 				margin-bottom: 20rpx;
+				position: relative;
 
 
 				&.itemchecked {
 				&.itemchecked {
 					border-color: #FF2553;
 					border-color: #FF2553;
@@ -504,15 +957,47 @@
 						font-size: 20rpx;
 						font-size: 20rpx;
 					}
 					}
 				}
 				}
+
+				.topMoneyTip {
+					padding: 0 15rpx;
+					border-radius: 50rpx;
+					position: absolute;
+					top: -15rpx;
+					height: 35rpx;
+					right: 20rpx;
+					background-color: $color-red;
+
+					.topMoneyTipIcon {
+						width: 24rpx;
+						margin-right: 10rpx;
+					}
+
+					.itemMoney {
+						color: $font-color-white;
+						font-size: 24rpx;
+						line-height: 1;
+					}
+				}
 			}
 			}
 		}
 		}
 	}
 	}
 
 
 	.container {
 	.container {
 		line-height: 1;
 		line-height: 1;
-		height: 100%;
 		background-color: #F2977C;
 		background-color: #F2977C;
 
 
+		.userBg {
+			z-index: 60;
+			position: relative;
+			margin-top: -50rpx;
+			height: 130rpx;
+			background-image: url(../../static/img/ganme01/pp.png);
+			background-size: auto 130rpx;
+			background-repeat: repeat-x;
+			animation: bgA 8s infinite linear;
+			animation-play-state: paused;
+		}
+
 		.topBox {
 		.topBox {
 			position: relative;
 			position: relative;
 			line-height: 0;
 			line-height: 0;
@@ -536,16 +1021,18 @@
 
 
 			.moneyIcon,
 			.moneyIcon,
 			.jlBox {
 			.jlBox {
+				height: 50rpx;
 				line-height: 1;
 				line-height: 1;
-				min-width: 180rpx;
+				// min-width: 180rpx;
 				border-radius: 50rpx 0px 0px 50rpx;
 				border-radius: 50rpx 0px 0px 50rpx;
-				padding: 10rpx 20rpx;
+				padding: 0 20rpx;
 				position: absolute;
 				position: absolute;
 				background-color: #7B3C0E;
 				background-color: #7B3C0E;
 				right: 0;
 				right: 0;
 
 
 				.icon {
 				.icon {
 					width: 30rpx;
 					width: 30rpx;
+					margin-right: 10rpx;
 					height: 30rpx;
 					height: 30rpx;
 				}
 				}
 			}
 			}
@@ -564,4 +1051,11 @@
 		}
 		}
 
 
 	}
 	}
+
+	@keyframes paopao {
+		100% {
+			// background-position: -585px;
+			background-position: -780px;
+		}
+	}
 </style>
 </style>

BIN
static/img/ganme01/gamebg.png


BIN
static/img/ganme01/pp.png


BIN
static/img/ganme01/win.png


BIN
static/img/ganme01/xdw01.png


BIN
static/img/ganme01/xdw02.png


BIN
static/img/ganme01/xdw03.png


BIN
static/img/ganme01/xdw04.png


BIN
static/img/ganme01/xdw05.png


BIN
static/img/ganme01/xdw06.png


BIN
static/img/ganme01/xdwP01.png


BIN
static/img/ganme01/xdwP02.png


BIN
static/img/ganme01/xdwP03.png


BIN
static/img/ganme01/xdwP04.png


BIN
static/img/ganme01/xdwP05.png


BIN
static/img/ganme01/xdwP06.png


BIN
static/img/ganme01/新建文件夹/xdw01.png


BIN
static/img/ganme01/新建文件夹/xdw02.png


BIN
static/img/ganme01/新建文件夹/xdw03.png


BIN
static/img/ganme01/新建文件夹/xdw04.png


BIN
static/img/ganme01/新建文件夹/xdw05.png


+ 0 - 0
static/img/ganme01/xdw06..png → static/img/ganme01/新建文件夹/xdw06.png


BIN
static/yticon.ttf


+ 56 - 0
uni_modules/uni-popup/changelog.md

@@ -0,0 +1,56 @@
+## 1.7.7(2022-03-17)
+- 修复 快速调用open出现问题的Bug
+## 1.7.6(2022-02-14)
+- 修复 safeArea 属性不能设置为false的bug
+## 1.7.5(2022-01-19)
+- 修复 isMaskClick 失效的bug
+## 1.7.4(2022-01-19)
+- 新增 cancelText \ confirmText 属性 ,可自定义文本
+- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
+- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
+## 1.7.3(2022-01-13)
+- 修复 设置 safeArea 属性不生效的bug
+## 1.7.2(2021-11-26)
+- 优化 组件示例
+## 1.7.1(2021-11-26)
+- 修复 vuedoc 文字错误
+## 1.7.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup)
+## 1.6.2(2021-08-24)
+- 新增 支持国际化
+## 1.6.1(2021-07-30)
+- 优化 vue3下事件警告的问题
+## 1.6.0(2021-07-13)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.5.0(2021-06-23)
+- 新增 mask-click 遮罩层点击事件
+## 1.4.5(2021-06-22)
+- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.4(2021-06-18)
+- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.3(2021-06-08)
+- 修复 错误的 watch 字段
+- 修复 safeArea 属性不生效的问题
+- 修复 点击内容,再点击遮罩无法关闭的Bug
+## 1.4.2(2021-05-12)
+- 新增 组件示例地址
+## 1.4.1(2021-04-29)
+- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题
+## 1.4.0 (2021-04-29)
+- 新增 type 属性的 left\right 值,支持左右弹出
+- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗
+- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色
+- 新增 safeArea 属性,是否适配底部安全区
+- 修复 App\h5\微信小程序底部安全区占位不对的Bug
+- 修复 App 端弹出等待的Bug
+- 优化 提升低配设备性能,优化动画卡顿问题
+- 优化 更简单的组件自定义方式
+## 1.2.9(2021-02-05)
+- 优化 组件引用关系,通过uni_modules引用组件
+## 1.2.8(2021-02-05)
+- 调整为uni_modules目录规范
+## 1.2.7(2021-02-05)
+- 调整为uni_modules目录规范
+- 新增 支持 PC 端
+- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端

+ 45 - 0
uni_modules/uni-popup/components/uni-popup-dialog/keypress.js

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

+ 271 - 0
uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue

@@ -0,0 +1,271 @@
+<template>
+	<view class="uni-popup-dialog">
+		<view class="uni-dialog-title">
+			<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{titleText}}</text>
+		</view>
+		<view v-if="mode === 'base'" class="uni-dialog-content">
+			<slot>
+				<text class="uni-dialog-content-text">{{content}}</text>
+			</slot>
+		</view>
+		<view v-else class="uni-dialog-content">
+			<slot>
+				<input class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholderText" :focus="focus" >
+			</slot>
+		</view>
+		<view class="uni-dialog-button-group">
+			<view class="uni-dialog-button" @click="closeDialog">
+				<text class="uni-dialog-button-text">{{closeText}}</text>
+			</view>
+			<view class="uni-dialog-button uni-border-left" @click="onOk">
+				<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	import {
+	initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from '../uni-popup/i18n/index.js'
+	const {	t } = initVueI18n(messages)
+	/**
+	 * PopUp 弹出层-对话框样式
+	 * @description 弹出层-对话框样式
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} value input 模式下的默认值
+	 * @property {String} placeholder input 模式下输入提示
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} mode = [base|input] 模式、
+	 * 	@value base 基础对话框
+	 * 	@value input 可输入对话框
+	 * @property {String} content 对话框内容
+	 * @property {Boolean} beforeClose 是否拦截取消事件
+	 * @event {Function} confirm 点击确认按钮触发
+	 * @event {Function} close 点击取消按钮触发
+	 */
+
+	export default {
+		name: "uniPopupDialog",
+		mixins: [popup],
+		emits:['confirm','close'],
+		props: {
+			value: {
+				type: [String, Number],
+				default: ''
+			},
+			placeholder: {
+				type: [String, Number],
+				default: ''
+			},
+			type: {
+				type: String,
+				default: 'error'
+			},
+			mode: {
+				type: String,
+				default: 'base'
+			},
+			title: {
+				type: String,
+				default: ''
+			},
+			content: {
+				type: String,
+				default: ''
+			},
+			beforeClose: {
+				type: Boolean,
+				default: false
+			},
+			cancelText:{
+				type: String,
+				default: ''
+			},
+			confirmText:{
+				type: String,
+				default: ''
+			}
+		},
+		data() {
+			return {
+				dialogType: 'error',
+				focus: false,
+				val: ""
+			}
+		},
+		computed: {
+			okText() {
+				return this.confirmText || t("uni-popup.ok")
+			},
+			closeText() {
+				return this.cancelText || t("uni-popup.cancel")
+			},
+			placeholderText() {
+				return this.placeholder || t("uni-popup.placeholder")
+			},
+			titleText() {
+				return this.title || t("uni-popup.title")
+			}
+		},
+		watch: {
+			type(val) {
+				this.dialogType = val
+			},
+			mode(val) {
+				if (val === 'input') {
+					this.dialogType = 'info'
+				}
+			},
+			value(val) {
+				this.val = val
+			}
+		},
+		created() {
+			// 对话框遮罩不可点击
+			this.popup.disableMask()
+			// this.popup.closeMask()
+			if (this.mode === 'input') {
+				this.dialogType = 'info'
+				this.val = this.value
+			} else {
+				this.dialogType = this.type
+			}
+		},
+		mounted() {
+			this.focus = true
+		},
+		methods: {
+			/**
+			 * 点击确认按钮
+			 */
+			onOk() {
+				if (this.mode === 'input'){
+					this.$emit('confirm', this.val)
+				}else{
+					this.$emit('confirm')
+				}
+				if(this.beforeClose) return
+				this.popup.close()
+			},
+			/**
+			 * 点击取消按钮
+			 */
+			closeDialog() {
+				this.$emit('close')
+				if(this.beforeClose) return
+				this.popup.close()
+			},
+			close(){
+				this.popup.close()
+			}
+		}
+	}
+</script>
+
+<style lang="scss" >
+	.uni-popup-dialog {
+		width: 300px;
+		border-radius: 11px;
+		background-color: #fff;
+	}
+
+	.uni-dialog-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 25px;
+	}
+
+	.uni-dialog-title-text {
+		font-size: 16px;
+		font-weight: 500;
+	}
+
+	.uni-dialog-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		padding: 20px;
+	}
+
+	.uni-dialog-content-text {
+		font-size: 14px;
+		color: #6C6C6C;
+	}
+
+	.uni-dialog-button-group {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		border-top-color: #f5f5f5;
+		border-top-style: solid;
+		border-top-width: 1px;
+	}
+
+	.uni-dialog-button {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+
+		flex: 1;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		height: 45px;
+	}
+
+	.uni-border-left {
+		border-left-color: #f0f0f0;
+		border-left-style: solid;
+		border-left-width: 1px;
+	}
+
+	.uni-dialog-button-text {
+		font-size: 16px;
+		color: #333;
+	}
+
+	.uni-button-color {
+		color: #007aff;
+	}
+
+	.uni-dialog-input {
+		flex: 1;
+		font-size: 14px;
+		border: 1px #eee solid;
+		height: 40px;
+		padding: 0 10px;
+		border-radius: 5px;
+		color: #555;
+	}
+
+	.uni-popup__success {
+		color: #4cd964;
+	}
+
+	.uni-popup__warn {
+		color: #f0ad4e;
+	}
+
+	.uni-popup__error {
+		color: #dd524d;
+	}
+
+	.uni-popup__info {
+		color: #909399;
+	}
+</style>

+ 143 - 0
uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue

@@ -0,0 +1,143 @@
+<template>
+	<view class="uni-popup-message">
+		<view class="uni-popup-message__box fixforpc-width" :class="'uni-popup__'+type">
+			<slot>
+				<text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'">{{message}}</text>
+			</slot>
+		</view>
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	/**
+	 * PopUp 弹出层-消息提示
+	 * @description 弹出层-消息提示
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} message 消息提示文字
+	 * @property {String} duration 显示时间,设置为 0 则不会自动关闭
+	 */
+
+	export default {
+		name: 'uniPopupMessage',
+		mixins:[popup],
+		props: {
+			/**
+			 * 主题 success/warning/info/error	  默认 success
+			 */
+			type: {
+				type: String,
+				default: 'success'
+			},
+			/**
+			 * 消息文字
+			 */
+			message: {
+				type: String,
+				default: ''
+			},
+			/**
+			 * 显示时间,设置为 0 则不会自动关闭
+			 */
+			duration: {
+				type: Number,
+				default: 3000
+			},
+			maskShow:{
+				type:Boolean,
+				default:false
+			}
+		},
+		data() {
+			return {}
+		},
+		created() {
+			this.popup.maskShow = this.maskShow
+			this.popup.messageChild = this
+		},
+		methods: {
+			timerClose(){
+				if(this.duration === 0) return
+				clearTimeout(this.timer) 
+				this.timer = setTimeout(()=>{
+					this.popup.close()
+				},this.duration)
+			}
+		}
+	}
+</script>
+<style lang="scss" >
+	.uni-popup-message {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+	}
+
+	.uni-popup-message__box {
+		background-color: #e1f3d8;
+		padding: 10px 15px;
+		border-color: #eee;
+		border-style: solid;
+		border-width: 1px;
+		flex: 1;
+	}
+
+	@media screen and (min-width: 500px) {
+		.fixforpc-width {
+			margin-top: 20px;
+			border-radius: 4px;
+			flex: none;
+			min-width: 380px;
+			/* #ifndef APP-NVUE */
+			max-width: 50%;
+			/* #endif */
+			/* #ifdef APP-NVUE */
+			max-width: 500px;
+			/* #endif */
+		}
+	}
+
+	.uni-popup-message-text {
+		font-size: 14px;
+		padding: 0;
+	}
+
+	.uni-popup__success {
+		background-color: #e1f3d8;
+	}
+
+	.uni-popup__success-text {
+		color: #67C23A;
+	}
+
+	.uni-popup__warn {
+		background-color: #faecd8;
+	}
+
+	.uni-popup__warn-text {
+		color: #E6A23C;
+	}
+
+	.uni-popup__error {
+		background-color: #fde2e2;
+	}
+
+	.uni-popup__error-text {
+		color: #F56C6C;
+	}
+
+	.uni-popup__info {
+		background-color: #F2F6FC;
+	}
+
+	.uni-popup__info-text {
+		color: #909399;
+	}
+</style>

+ 187 - 0
uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue

@@ -0,0 +1,187 @@
+<template>
+	<view class="uni-popup-share">
+		<view class="uni-share-title"><text class="uni-share-title-text">{{shareTitleText}}</text></view>
+		<view class="uni-share-content">
+			<view class="uni-share-content-box">
+				<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
+					<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
+					<text class="uni-share-text">{{item.text}}</text>
+				</view>
+
+			</view>
+		</view>
+		<view class="uni-share-button-box">
+			<button class="uni-share-button" @click="close">{{cancelText}}</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	import {
+	initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from '../uni-popup/i18n/index.js'
+	const {	t	} = initVueI18n(messages)
+	export default {
+		name: 'UniPopupShare',
+		mixins:[popup],
+		emits:['select'],
+		props: {
+			title: {
+				type: String,
+				default: ''
+			},
+			beforeClose: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				bottomData: [{
+						text: '微信',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/c2b17470-50be-11eb-b680-7980c8a877b8.png',
+						name: 'wx'
+					},
+					{
+						text: '支付宝',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
+						name: 'wx'
+					},
+					{
+						text: 'QQ',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/e7a79520-50be-11eb-b997-9918a5dda011.png',
+						name: 'qq'
+					},
+					{
+						text: '新浪',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
+						name: 'sina'
+					},
+					// {
+					// 	text: '百度',
+					// 	icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
+					// 	name: 'copy'
+					// },
+					// {
+					// 	text: '其他',
+					// 	icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
+					// 	name: 'more'
+					// }
+				]
+			}
+		},
+		created() {},
+		computed: {
+			cancelText() {
+				return t("uni-popup.cancel")
+			},
+		shareTitleText() {
+				return this.title || t("uni-popup.shareTitle")
+			}
+		},
+		methods: {
+			/**
+			 * 选择内容
+			 */
+			select(item, index) {
+				this.$emit('select', {
+					item,
+					index
+				})
+				this.close()
+
+			},
+			/**
+			 * 关闭窗口
+			 */
+			close() {
+				if(this.beforeClose) return
+				this.popup.close()
+			}
+		}
+	}
+</script>
+<style lang="scss" >
+	.uni-popup-share {
+		background-color: #fff;
+		border-top-left-radius: 11px;
+		border-top-right-radius: 11px;
+	}
+	.uni-share-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		height: 40px;
+	}
+	.uni-share-title-text {
+		font-size: 14px;
+		color: #666;
+	}
+	.uni-share-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 10px;
+	}
+
+	.uni-share-content-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		flex-wrap: wrap;
+		width: 360px;
+	}
+
+	.uni-share-content-item {
+		width: 90px;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		padding: 10px 0;
+		align-items: center;
+	}
+
+	.uni-share-content-item:active {
+		background-color: #f5f5f5;
+	}
+
+	.uni-share-image {
+		width: 30px;
+		height: 30px;
+	}
+
+	.uni-share-text {
+		margin-top: 10px;
+		font-size: 14px;
+		color: #3B4144;
+	}
+
+	.uni-share-button-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		padding: 10px 15px;
+	}
+
+	.uni-share-button {
+		flex: 1;
+		border-radius: 50px;
+		color: #666;
+		font-size: 16px;
+	}
+
+	.uni-share-button::after {
+		border-radius: 50px;
+	}
+</style>

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/en.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "cancel",
+	"uni-popup.ok": "ok",
+	"uni-popup.placeholder": "pleace enter",
+	"uni-popup.title": "Hint",
+	"uni-popup.shareTitle": "Share to"
+}

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

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

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "取消",
+	"uni-popup.ok": "确定",
+	"uni-popup.placeholder": "请输入",
+		"uni-popup.title": "提示",
+		"uni-popup.shareTitle": "分享到"
+}

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "取消",
+	"uni-popup.ok": "確定",
+	"uni-popup.placeholder": "請輸入",
+	"uni-popup.title": "提示",
+	"uni-popup.shareTitle": "分享到"
+}

+ 45 - 0
uni_modules/uni-popup/components/uni-popup/keypress.js

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

+ 26 - 0
uni_modules/uni-popup/components/uni-popup/popup.js

@@ -0,0 +1,26 @@
+
+export default {
+	data() {
+		return {
+			
+		}
+	},
+	created(){
+		this.popup = this.getParent()
+	},
+	methods:{
+		/**
+		 * 获取父元素实例
+		 */
+		getParent(name = 'uniPopup') {
+			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;
+		},
+	}
+}

+ 475 - 0
uni_modules/uni-popup/components/uni-popup/uni-popup.vue

@@ -0,0 +1,475 @@
+<template>
+	<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']"
+		@touchmove.stop.prevent="clear">
+		<view @touchstart="touchstart">
+			<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
+				:duration="duration" :show="showTrans" @click="onTap" />
+			<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
+				:show="showTrans" @click="onTap">
+				<view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear">
+					<slot />
+				</view>
+			</uni-transition>
+		</view>
+		<!-- #ifdef H5 -->
+		<keypress v-if="maskShow" @esc="onTap" />
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	// #ifdef H5
+	import keypress from './keypress.js'
+	// #endif
+
+	/**
+	 * PopUp 弹出层
+	 * @description 弹出层组件,为了解决遮罩弹层的问题
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [top|center|bottom|left|right|message|dialog|share] 弹出方式
+	 * 	@value top 顶部弹出
+	 * 	@value center 中间弹出
+	 * 	@value bottom 底部弹出
+	 * 	@value left		左侧弹出
+	 * 	@value right  右侧弹出
+	 * 	@value message 消息提示
+	 * 	@value dialog 对话框
+	 * 	@value share 底部分享示例
+	 * @property {Boolean} animation = [true|false] 是否开启动画
+	 * @property {Boolean} maskClick = [true|false] 蒙版点击是否关闭弹窗(废弃)
+	 * @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗
+	 * @property {String}  backgroundColor 主窗口背景色
+	 * @property {String}  maskBackgroundColor 蒙版颜色
+	 * @property {Boolean} safeArea		   是否适配底部安全区
+	 * @event {Function} change 打开关闭弹窗触发,e={show: false}
+	 * @event {Function} maskClick 点击遮罩触发
+	 */
+
+	export default {
+		name: 'uniPopup',
+		components: {
+			// #ifdef H5
+			keypress
+			// #endif
+		},
+		emits: ['change', 'maskClick'],
+		props: {
+			// 开启动画
+			animation: {
+				type: Boolean,
+				default: true
+			},
+			// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
+			// message: 消息提示 ; dialog : 对话框
+			type: {
+				type: String,
+				default: 'center'
+			},
+			// maskClick
+			isMaskClick: {
+				type: Boolean,
+				default: null
+			},
+			// TODO 2 个版本后废弃属性 ,使用 isMaskClick
+			maskClick: {
+				type: Boolean,
+				default: null
+			},
+			backgroundColor: {
+				type: String,
+				default: 'none'
+			},
+			safeArea: {
+				type: Boolean,
+				default: true
+			},
+			maskBackgroundColor: {
+				type: String,
+				default: 'rgba(0, 0, 0, 0.4)'
+			},
+		},
+
+		watch: {
+			/**
+			 * 监听type类型
+			 */
+			type: {
+				handler: function(type) {
+					if (!this.config[type]) return
+					this[this.config[type]](true)
+				},
+				immediate: true
+			},
+			isDesktop: {
+				handler: function(newVal) {
+					if (!this.config[newVal]) return
+					this[this.config[this.type]](true)
+				},
+				immediate: true
+			},
+			/**
+			 * 监听遮罩是否可点击
+			 * @param {Object} val
+			 */
+			maskClick: {
+				handler: function(val) {
+					this.mkclick = val
+				},
+				immediate: true
+			},
+			isMaskClick: {
+				handler: function(val) {
+					this.mkclick = val
+				},
+				immediate: true
+			},
+			// H5 下禁止底部滚动
+			showPopup(show) {
+				// #ifdef H5
+				// fix by mehaotian 处理 h5 滚动穿透的问题
+				document.getElementsByTagName('body')[0].style.overflow = show ? 'hidden' : 'visible'
+				// #endif
+			}
+		},
+		data() {
+			return {
+				duration: 300,
+				ani: [],
+				showPopup: false,
+				showTrans: false,
+				popupWidth: 0,
+				popupHeight: 0,
+				config: {
+					top: 'top',
+					bottom: 'bottom',
+					center: 'center',
+					left: 'left',
+					right: 'right',
+					message: 'top',
+					dialog: 'center',
+					share: 'bottom'
+				},
+				maskClass: {
+					position: 'fixed',
+					bottom: 0,
+					top: 0,
+					left: 0,
+					right: 0,
+					backgroundColor: 'rgba(0, 0, 0, 0.4)'
+				},
+				transClass: {
+					position: 'fixed',
+					left: 0,
+					right: 0
+				},
+				maskShow: true,
+				mkclick: true,
+				popupstyle: this.isDesktop ? 'fixforpc-top' : 'top'
+			}
+		},
+		computed: {
+			isDesktop() {
+				return this.popupWidth >= 500 && this.popupHeight >= 500
+			},
+			bg() {
+				if (this.backgroundColor === '' || this.backgroundColor === 'none') {
+					return 'transparent'
+				}
+				return this.backgroundColor
+			}
+		},
+		mounted() {
+			const fixSize = () => {
+				const {
+					windowWidth,
+					windowHeight,
+					windowTop,
+					safeArea,
+					screenHeight,
+					safeAreaInsets
+				} = uni.getSystemInfoSync()
+				this.popupWidth = windowWidth
+				this.popupHeight = windowHeight + windowTop
+				// TODO fix by mehaotian 是否适配底部安全区 ,目前微信ios 、和 app ios 计算有差异,需要框架修复
+				if (safeArea && this.safeArea) {
+					// #ifdef MP-WEIXIN
+					this.safeAreaInsets = screenHeight - safeArea.bottom
+					// #endif
+					// #ifndef MP-WEIXIN
+					this.safeAreaInsets = safeAreaInsets.bottom
+					// #endif
+				} else {
+					this.safeAreaInsets = 0
+				}
+			}
+			fixSize()
+			// #ifdef H5
+			// window.addEventListener('resize', fixSize)
+			// this.$once('hook:beforeDestroy', () => {
+			// 	window.removeEventListener('resize', fixSize)
+			// })
+			// #endif
+		},
+		// #ifndef VUE3
+		// TODO vue2
+		destroyed() {
+			this.setH5Visible()
+		},
+		// #endif
+		// #ifdef VUE3
+		// TODO vue3
+		unmounted() {
+			this.setH5Visible()
+		},
+		// #endif
+		created() {
+			// this.mkclick =  this.isMaskClick || this.maskClick
+			if (this.isMaskClick === null && this.maskClick === null) {
+				this.mkclick = true
+			} else {
+				this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick
+			}
+			if (this.animation) {
+				this.duration = 300
+			} else {
+				this.duration = 0
+			}
+			// TODO 处理 message 组件生命周期异常的问题
+			this.messageChild = null
+			// TODO 解决头条冒泡的问题
+			this.clearPropagation = false
+			this.maskClass.backgroundColor = this.maskBackgroundColor
+		},
+		methods: {
+			setH5Visible() {
+				// #ifdef H5
+				// fix by mehaotian 处理 h5 滚动穿透的问题
+				document.getElementsByTagName('body')[0].style.overflow = 'visible'
+				// #endif
+			},
+			/**
+			 * 公用方法,不显示遮罩层
+			 */
+			closeMask() {
+				this.maskShow = false
+			},
+			/**
+			 * 公用方法,遮罩层禁止点击
+			 */
+			disableMask() {
+				this.mkclick = false
+			},
+			// TODO nvue 取消冒泡
+			clear(e) {
+				// #ifndef APP-NVUE
+				e.stopPropagation()
+				// #endif
+				this.clearPropagation = true
+			},
+
+			open(direction) {
+				// fix by mehaotian 处理快速打开关闭的情况
+				if(this.showPopup){
+					clearTimeout(this.timer)
+					this.showPopup = false
+				}
+				let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
+				if (!(direction && innerType.indexOf(direction) !== -1)) {
+					direction = this.type
+				}
+				if (!this.config[direction]) {
+					console.error('缺少类型:', direction)
+					return
+				}
+				this[this.config[direction]]()
+				this.$emit('change', {
+					show: true,
+					type: direction
+				})
+			},
+			close(type) {
+				this.showTrans = false
+				this.$emit('change', {
+					show: false,
+					type: this.type
+				})
+				clearTimeout(this.timer)
+				// // 自定义关闭事件
+				// this.customOpen && this.customClose()
+				this.timer = setTimeout(() => {
+					this.showPopup = false
+				}, 300)
+			},
+			// TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
+			touchstart() {
+				this.clearPropagation = false
+			},
+
+			onTap() {
+				if (this.clearPropagation) {
+					// fix by mehaotian 兼容 nvue
+					this.clearPropagation = false
+					return
+				}
+				this.$emit('maskClick')
+				if (!this.mkclick) return
+				this.close()
+			},
+			/**
+			 * 顶部弹出样式处理
+			 */
+			top(type) {
+				this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top'
+				this.ani = ['slide-top']
+				this.transClass = {
+					position: 'fixed',
+					left: 0,
+					right: 0,
+					backgroundColor: this.bg
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPopup = true
+				this.showTrans = true
+				this.$nextTick(() => {
+					if (this.messageChild && this.type === 'message') {
+						this.messageChild.timerClose()
+					}
+				})
+			},
+			/**
+			 * 底部弹出样式处理
+			 */
+			bottom(type) {
+				this.popupstyle = 'bottom'
+				this.ani = ['slide-bottom']
+				this.transClass = {
+					position: 'fixed',
+					left: 0,
+					right: 0,
+					bottom: 0,
+					paddingBottom: this.safeAreaInsets + 'px',
+					backgroundColor: this.bg
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPopup = true
+				this.showTrans = true
+			},
+			/**
+			 * 中间弹出样式处理
+			 */
+			center(type) {
+				this.popupstyle = 'center'
+				this.ani = ['zoom-out', 'fade']
+				this.transClass = {
+					position: 'fixed',
+					/* #ifndef APP-NVUE */
+					display: 'flex',
+					flexDirection: 'column',
+					/* #endif */
+					bottom: 0,
+					left: 0,
+					right: 0,
+					top: 0,
+					justifyContent: 'center',
+					alignItems: 'center'
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPopup = true
+				this.showTrans = true
+			},
+			left(type) {
+				this.popupstyle = 'left'
+				this.ani = ['slide-left']
+				this.transClass = {
+					position: 'fixed',
+					left: 0,
+					bottom: 0,
+					top: 0,
+					backgroundColor: this.bg,
+					/* #ifndef APP-NVUE */
+					display: 'flex',
+					flexDirection: 'column'
+					/* #endif */
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPopup = true
+				this.showTrans = true
+			},
+			right(type) {
+				this.popupstyle = 'right'
+				this.ani = ['slide-right']
+				this.transClass = {
+					position: 'fixed',
+					bottom: 0,
+					right: 0,
+					top: 0,
+					backgroundColor: this.bg,
+					/* #ifndef APP-NVUE */
+					display: 'flex',
+					flexDirection: 'column'
+					/* #endif */
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPopup = true
+				this.showTrans = true
+			}
+		}
+	}
+</script>
+<style lang="scss">
+	.uni-popup {
+		position: fixed;
+		/* #ifndef APP-NVUE */
+		z-index: 99;
+
+		/* #endif */
+		&.top,
+		&.left,
+		&.right {
+			/* #ifdef H5 */
+			top: var(--window-top);
+			/* #endif */
+			/* #ifndef H5 */
+			top: 0;
+			/* #endif */
+		}
+
+		.uni-popup__wrapper {
+			/* #ifndef APP-NVUE */
+			display: block;
+			/* #endif */
+			position: relative;
+
+			/* iphonex 等安全区设置,底部安全区适配 */
+			/* #ifndef APP-NVUE */
+			// padding-bottom: constant(safe-area-inset-bottom);
+			// padding-bottom: env(safe-area-inset-bottom);
+			/* #endif */
+			&.left,
+			&.right {
+				/* #ifdef H5 */
+				padding-top: var(--window-top);
+				/* #endif */
+				/* #ifndef H5 */
+				padding-top: 0;
+				/* #endif */
+				flex: 1;
+			}
+		}
+	}
+
+	.fixforpc-z-index {
+		/* #ifndef APP-NVUE */
+		z-index: 999;
+		/* #endif */
+	}
+
+	.fixforpc-top {
+		top: 0;
+	}
+</style>

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

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

+ 17 - 0
uni_modules/uni-popup/readme.md

@@ -0,0 +1,17 @@
+
+
+## Popup 弹出层
+> **组件名:uni-popup**
+> 代码块: `uPopup`
+> 关联组件:`uni-transition`
+
+
+弹出层组件,在应用中弹出一个消息提示窗口、提示框等
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 
+
+
+
+
+

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

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

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

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

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

@@ -0,0 +1,82 @@
+{
+  "id": "uni-scss",
+  "displayName": "uni-scss 辅助样式",
+  "version": "1.0.3",
+  "description": "uni-sass是uni-ui提供的一套全局样式 ,通过一些简单的类名和sass变量,实现简单的页面布局操作,比如颜色、边距、圆角等。",
+  "keywords": [
+    "uni-scss",
+    "uni-ui",
+    "辅助样式"
+],
+  "repository": "https://github.com/dcloudio/uni-ui",
+  "engines": {
+    "HBuilderX": "^3.1.0"
+  },
+  "dcloudext": {
+    "category": [
+        "JS SDK",
+        "通用 SDK"
+    ],
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "无",
+      "permissions": "无"
+    },
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "u"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y"
+        },
+        "快应用": {
+          "华为": "n",
+          "联盟": "n"
+        },
+        "Vue": {
+            "vue2": "y",
+            "vue3": "y"
+        }
+      }
+    }
+  }
+}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 20 - 0
uni_modules/uni-transition/changelog.md

@@ -0,0 +1,20 @@
+## 1.3.1(2021-11-23)
+- 修复 init 方法初始化问题
+## 1.3.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition)
+## 1.2.1(2021-09-27)
+- 修复 init 方法不生效的 Bug
+## 1.2.0(2021-07-30)
+- 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.1.1(2021-05-12)
+- 新增 示例地址
+- 修复 示例项目缺少组件的 Bug
+## 1.1.0(2021-04-22)
+- 新增 通过方法自定义动画
+- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式
+- 优化 动画触发逻辑,使动画更流畅
+- 优化 支持单独的动画类型
+- 优化 文档示例
+## 1.0.2(2021-02-05)
+- 调整为 uni_modules 目录规范

+ 128 - 0
uni_modules/uni-transition/components/uni-transition/createAnimation.js

@@ -0,0 +1,128 @@
+// const defaultOption = {
+// 	duration: 300,
+// 	timingFunction: 'linear',
+// 	delay: 0,
+// 	transformOrigin: '50% 50% 0'
+// }
+// #ifdef APP-NVUE
+const nvueAnimation = uni.requireNativePlugin('animation')
+// #endif
+class MPAnimation {
+	constructor(options, _this) {
+		this.options = options
+		this.animation = uni.createAnimation(options)
+		this.currentStepAnimates = {}
+		this.next = 0
+		this.$ = _this
+
+	}
+
+	_nvuePushAnimates(type, args) {
+		let aniObj = this.currentStepAnimates[this.next]
+		let styles = {}
+		if (!aniObj) {
+			styles = {
+				styles: {},
+				config: {}
+			}
+		} else {
+			styles = aniObj
+		}
+		if (animateTypes1.includes(type)) {
+			if (!styles.styles.transform) {
+				styles.styles.transform = ''
+			}
+			let unit = ''
+			if(type === 'rotate'){
+				unit = 'deg'
+			}
+			styles.styles.transform += `${type}(${args+unit}) `
+		} else {
+			styles.styles[type] = `${args}`
+		}
+		this.currentStepAnimates[this.next] = styles
+	}
+	_animateRun(styles = {}, config = {}) {
+		let ref = this.$.$refs['ani'].ref
+		if (!ref) return
+		return new Promise((resolve, reject) => {
+			nvueAnimation.transition(ref, {
+				styles,
+				...config
+			}, res => {
+				resolve()
+			})
+		})
+	}
+
+	_nvueNextAnimate(animates, step = 0, fn) {
+		let obj = animates[step]
+		if (obj) {
+			let {
+				styles,
+				config
+			} = obj
+			this._animateRun(styles, config).then(() => {
+				step += 1
+				this._nvueNextAnimate(animates, step, fn)
+			})
+		} else {
+			this.currentStepAnimates = {}
+			typeof fn === 'function' && fn()
+			this.isEnd = true
+		}
+	}
+
+	step(config = {}) {
+		// #ifndef APP-NVUE
+		this.animation.step(config)
+		// #endif
+		// #ifdef APP-NVUE
+		this.currentStepAnimates[this.next].config = Object.assign({}, this.options, config)
+		this.currentStepAnimates[this.next].styles.transformOrigin = this.currentStepAnimates[this.next].config.transformOrigin
+		this.next++
+		// #endif
+		return this
+	}
+
+	run(fn) {
+		// #ifndef APP-NVUE
+		this.$.animationData = this.animation.export()
+		this.$.timer = setTimeout(() => {
+			typeof fn === 'function' && fn()
+		}, this.$.durationTime)
+		// #endif
+		// #ifdef APP-NVUE
+		this.isEnd = false
+		let ref = this.$.$refs['ani'] && this.$.$refs['ani'].ref
+		if(!ref) return
+		this._nvueNextAnimate(this.currentStepAnimates, 0, fn)
+		this.next = 0
+		// #endif
+	}
+}
+
+
+const animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d',
+	'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY',
+	'translateZ'
+]
+const animateTypes2 = ['opacity', 'backgroundColor']
+const animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom']
+animateTypes1.concat(animateTypes2, animateTypes3).forEach(type => {
+	MPAnimation.prototype[type] = function(...args) {
+		// #ifndef APP-NVUE
+		this.animation[type](...args)
+		// #endif
+		// #ifdef APP-NVUE
+		this._nvuePushAnimates(type, args)
+		// #endif
+		return this
+	}
+})
+
+export function createAnimation(option, _this) {
+	if(!_this) return
+	clearTimeout(_this.timer)
+	return new MPAnimation(option, _this)
+}

+ 277 - 0
uni_modules/uni-transition/components/uni-transition/uni-transition.vue

@@ -0,0 +1,277 @@
+<template>
+	<view v-if="isShow" ref="ani" :animation="animationData" :class="customClass" :style="transformStyles" @click="onClick"><slot></slot></view>
+</template>
+
+<script>
+import { createAnimation } from './createAnimation'
+
+/**
+ * Transition 过渡动画
+ * @description 简单过渡动画组件
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=985
+ * @property {Boolean} show = [false|true] 控制组件显示或隐藏
+ * @property {Array|String} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
+ *  @value fade 渐隐渐出过渡
+ *  @value slide-top 由上至下过渡
+ *  @value slide-right 由右至左过渡
+ *  @value slide-bottom 由下至上过渡
+ *  @value slide-left 由左至右过渡
+ *  @value zoom-in 由小到大过渡
+ *  @value zoom-out 由大到小过渡
+ * @property {Number} duration 过渡动画持续时间
+ * @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
+ */
+export default {
+	name: 'uniTransition',
+	emits:['click','change'],
+	props: {
+		show: {
+			type: Boolean,
+			default: false
+		},
+		modeClass: {
+			type: [Array, String],
+			default() {
+				return 'fade'
+			}
+		},
+		duration: {
+			type: Number,
+			default: 300
+		},
+		styles: {
+			type: Object,
+			default() {
+				return {}
+			}
+		},
+		customClass:{
+			type: String,
+			default: ''
+		}
+	},
+	data() {
+		return {
+			isShow: false,
+			transform: '',
+			opacity: 1,
+			animationData: {},
+			durationTime: 300,
+			config: {}
+		}
+	},
+	watch: {
+		show: {
+			handler(newVal) {
+				if (newVal) {
+					this.open()
+				} else {
+					// 避免上来就执行 close,导致动画错乱
+					if (this.isShow) {
+						this.close()
+					}
+				}
+			},
+			immediate: true
+		}
+	},
+	computed: {
+		// 生成样式数据
+		stylesObject() {
+			let styles = {
+				...this.styles,
+				'transition-duration': this.duration / 1000 + 's'
+			}
+			let transform = ''
+			for (let i in styles) {
+				let line = this.toLine(i)
+				transform += line + ':' + styles[i] + ';'
+			}
+			return transform
+		},
+		// 初始化动画条件
+		transformStyles() {
+			return 'transform:' + this.transform + ';' + 'opacity:' + this.opacity + ';' + this.stylesObject
+		}
+	},
+	created() {
+		// 动画默认配置
+		this.config = {
+			duration: this.duration,
+			timingFunction: 'ease',
+			transformOrigin: '50% 50%',
+			delay: 0
+		}
+		this.durationTime = this.duration
+	},
+	methods: {
+		/**
+		 *  ref 触发 初始化动画
+		 */
+		init(obj = {}) {
+			if (obj.duration) {
+				this.durationTime = obj.duration
+			}
+			this.animation = createAnimation(Object.assign(this.config, obj),this)
+		},
+		/**
+		 * 点击组件触发回调
+		 */
+		onClick() {
+			this.$emit('click', {
+				detail: this.isShow
+			})
+		},
+		/**
+		 * ref 触发 动画分组
+		 * @param {Object} obj
+		 */
+		step(obj, config = {}) {
+			if (!this.animation) return
+			for (let i in obj) {
+				try {
+					if(typeof obj[i] === 'object'){
+						this.animation[i](...obj[i])
+					}else{
+						this.animation[i](obj[i])
+					}
+				} catch (e) {
+					console.error(`方法 ${i} 不存在`)
+				}
+			}
+			this.animation.step(config)
+			return this
+		},
+		/**
+		 *  ref 触发 执行动画
+		 */
+		run(fn) {
+			if (!this.animation) return
+			this.animation.run(fn)
+		},
+		// 开始过度动画
+		open() {
+			clearTimeout(this.timer)
+			this.transform = ''
+			this.isShow = true
+			let { opacity, transform } = this.styleInit(false)
+			if (typeof opacity !== 'undefined') {
+				this.opacity = opacity
+			}
+			this.transform = transform
+			// 确保动态样式已经生效后,执行动画,如果不加 nextTick ,会导致 wx 动画执行异常
+			this.$nextTick(() => {
+				// TODO 定时器保证动画完全执行,目前有些问题,后面会取消定时器
+				this.timer = setTimeout(() => {
+					this.animation = createAnimation(this.config, this)
+					this.tranfromInit(false).step()
+					this.animation.run()
+					this.$emit('change', {
+						detail: this.isShow
+					})
+				}, 20)
+			})
+		},
+		// 关闭过度动画
+		close(type) {
+			if (!this.animation) return
+			this.tranfromInit(true)
+				.step()
+				.run(() => {
+					this.isShow = false
+					this.animationData = null
+					this.animation = null
+					let { opacity, transform } = this.styleInit(false)
+					this.opacity = opacity || 1
+					this.transform = transform
+					this.$emit('change', {
+						detail: this.isShow
+					})
+				})
+		},
+		// 处理动画开始前的默认样式
+		styleInit(type) {
+			let styles = {
+				transform: ''
+			}
+			let buildStyle = (type, mode) => {
+				if (mode === 'fade') {
+					styles.opacity = this.animationType(type)[mode]
+				} else {
+					styles.transform += this.animationType(type)[mode] + ' '
+				}
+			}
+			if (typeof this.modeClass === 'string') {
+				buildStyle(type, this.modeClass)
+			} else {
+				this.modeClass.forEach(mode => {
+					buildStyle(type, mode)
+				})
+			}
+			return styles
+		},
+		// 处理内置组合动画
+		tranfromInit(type) {
+			let buildTranfrom = (type, mode) => {
+				let aniNum = null
+				if (mode === 'fade') {
+					aniNum = type ? 0 : 1
+				} else {
+					aniNum = type ? '-100%' : '0'
+					if (mode === 'zoom-in') {
+						aniNum = type ? 0.8 : 1
+					}
+					if (mode === 'zoom-out') {
+						aniNum = type ? 1.2 : 1
+					}
+					if (mode === 'slide-right') {
+						aniNum = type ? '100%' : '0'
+					}
+					if (mode === 'slide-bottom') {
+						aniNum = type ? '100%' : '0'
+					}
+				}
+				this.animation[this.animationMode()[mode]](aniNum)
+			}
+			if (typeof this.modeClass === 'string') {
+				buildTranfrom(type, this.modeClass)
+			} else {
+				this.modeClass.forEach(mode => {
+					buildTranfrom(type, mode)
+				})
+			}
+
+			return this.animation
+		},
+		animationType(type) {
+			return {
+				fade: type ? 1 : 0,
+				'slide-top': `translateY(${type ? '0' : '-100%'})`,
+				'slide-right': `translateX(${type ? '0' : '100%'})`,
+				'slide-bottom': `translateY(${type ? '0' : '100%'})`,
+				'slide-left': `translateX(${type ? '0' : '-100%'})`,
+				'zoom-in': `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
+				'zoom-out': `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
+			}
+		},
+		// 内置动画类型与实际动画对应字典
+		animationMode() {
+			return {
+				fade: 'opacity',
+				'slide-top': 'translateY',
+				'slide-right': 'translateX',
+				'slide-bottom': 'translateY',
+				'slide-left': 'translateX',
+				'zoom-in': 'scale',
+				'zoom-out': 'scale'
+			}
+		},
+		// 驼峰转中横线
+		toLine(name) {
+			return name.replace(/([A-Z])/g, '-$1').toLowerCase()
+		}
+	}
+}
+</script>
+
+<style></style>

+ 87 - 0
uni_modules/uni-transition/package.json

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

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

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

+ 2 - 1
utils/request.js

@@ -62,7 +62,8 @@ service.interceptors.response(
 // 请求前拦截器
 // 请求前拦截器
 service.interceptors.request(
 service.interceptors.request(
 	config => {
 	config => {
-		let token = uni.getStorageSync('token') || '';
+		// let token = uni.getStorageSync('token') 
+		let token = uni.getStorageSync('token') || 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJsbnB0LmZycC5saXVuaXU5NDYuY29tIiwiYXVkIjoibG5wdC5mcnAubGl1bml1OTQ2LmNvbSIsImlhdCI6MTY0NjkwMjk5NSwibmJmIjoxNjQ2OTAyOTk1LCJleHAiOjE2NDcxNjIxOTUsImp0aSI6eyJpZCI6MiwidHlwZSI6InVzZXIifX0.xfXMeqomQ9AP2wD9iqw9BrcdWMQY3ZWn4ezmNo8wP1I';
 		// console.log(config);
 		// console.log(config);
 		if (!config.header) {
 		if (!config.header) {
 			config.header = {
 			config.header = {

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