cmy 2 роки тому
батько
коміт
709af94c1b

+ 5 - 1
libs/i18n/lang/cn.json

@@ -99,7 +99,11 @@
 		"u17": "已完成",
 		"u18": "详情",
 		"u19": "秒",
-		"u20": "5分线"
+		"u20": "5分线",
+		"a9": "请输入数量",
+		"b3": "请输入6位交易密码",
+		"c4": "温馨提示",
+		"b5": "您未登录!是否马上登录?"
 	},
 	"userinfo": {
 		"u1": "收款地址",

+ 5 - 1
libs/i18n/lang/en.json

@@ -100,7 +100,11 @@
 		"u17": "Finished",
 		"u18": "Details",
 		"u19": "S",
-		"u20": "Quincle"
+		"u20": "Quincle",
+		"a9": "Please enter the amount",
+		"b3": "Please enter a transaction password",
+		"c4": "Note",
+		"b5": "Please log in"
 	},
 	"money": {
 		"a1": "wallet",

+ 5 - 1
libs/i18n/lang/tw.json

@@ -99,7 +99,11 @@
 		"u17": "已完成",
 		"u18": "詳情",
 		"u19": "秒",
-		"u20": "5分線"
+		"u20": "5分線",
+		"a9": "請輸入數量",
+		"b3": "請輸入6位交易密碼",
+		"c4": "溫馨提示",
+		"b5": "您未登錄,是否立即登錄?"
 	},
 	"userinfo": {
 		"u1": "收款地址",

+ 0 - 986
pages/index/entertainment - 副本.vue

@@ -1,986 +0,0 @@
-<template>
-	<view class="all">
-		<template v-if="!upOnBtnData.show">
-			<view class="padding-t-30"></view>
-			<view class="tab">
-				<view class="flex">
-					<view class="tab-item " @click="changeTab(item,ind)" :class="{action:actionIndex==ind}"
-						v-for="(item,ind) in gameList">
-						{{item.name}}
-					</view>
-				</view>
-				<l-echart class="top" ref="chart"></l-echart>
-			</view>
-
-			<view class="center flex">
-				<!-- 左 -->
-				<view class="le">
-					<view class="tit flex-start">
-						<view class="ti1">{{$t('enter.u1')}}</view>
-						<view class="ti2">({{$t('enter.u2')}})</view>
-					</view>
-					<view class="he">
-						<view class="numbox flex-start">
-							<view class="he1 flex" @click="gameMoneyValue=it" v-for="it in arMoneyList">
-								<view class="wen">{{it}}</view>
-							</view>
-						</view>
-					</view>
-					<view class="yi flex-start">
-						<image class="img" src="../../static/icon/le.png" mode=""></image>
-						<view class="wz padding-l-10">{{history.base.token}}</view>
-						<view class="qx padding-l-10" v-if="history.next.id">{{history.next.no}}</view>
-					</view>
-					<view class="shu">
-						0.064489
-					</view>
-				</view>
-				<!--右 -->
-				<view class="ri">
-					<view class="ti flex-center">
-						<view class="t1">{{$t('enter.u3')}}</view>
-						<view class="t2 padding-l-10">{{history.base.timebar}}</view>
-					</view>
-
-					<view class="dh">
-						<input class="input" type="number" v-model="gameMoneyValue">
-					</view>
-					<view class="btn">
-						<view class="bt flex">
-							<view class="btnItem btnle" @click="onbet(2)">
-								<image class="imag" src="../../static/icon/xia.png" mode=""></image>
-								<text class="xia">{{$t('enter.u4')}}</text>
-							</view>
-							<view class="btnItem btnri" @click="onbet(1)">
-								<image class="imag" src="../../static/icon/shang.png" mode=""></image>
-								<text class="xia">{{$t('enter.u6')}}</text>
-							</view>
-						</view>
-						<view class="bt flex">
-							<view class="btnItem btnle" @click="onbet(3)">
-								<view class="xia">{{$t('enter.u5')}}</view>
-							</view>
-							<view class="btnItem btnri" @click="onbet(4)">
-								<view class="xia">{{$t('enter.u7')}}</view>
-							</view>
-						</view>
-					</view>
-
-					<view class="db flex">
-						<view class="jl">{{$t('enter.u8')}}</view>
-						<view class="sj">
-							<text v-if="time.H<10">0</text>
-							{{time.H}}
-						</view>
-						<view class="sj">
-							<text v-if="time.M<10">0</text>
-							{{time.M}}
-						</view>
-						<view class="sj">
-							<text v-if="time.S<10">0</text>
-							{{time.S}}
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="kb"></view>
-
-			<view class="last">
-				<view class="flex">
-					<text>{{$t('enter.u9')}}</text>
-					<view class="flex" @click="nav">
-						<text>{{$t('enter.u10')}}</text>
-						<image class="lb" src="../../static/icon/jt.png" mode=""></image>
-					</view>
-				</view>
-			</view>
-
-			<view class="bg">
-				<view class="biaotou flex">
-					<view class="biwe">{{$t('enter.u11')}}</view>
-					<view class="biwe">{{$t('enter.u12')}}</view>
-					<view class="biwe">{{$t('enter.u13')}}</view>
-					<view class="biwe">{{$t('enter.u14')}}</view>
-				</view>
-				<view class="list flex" v-for="(item,ind) in betList.list" :key="ind">
-					<view class="biwe flex-start">
-						<view class="tr">{{history.base.token}}</view>
-						<view class="nametip">{{history.base.timebar}}</view>
-						<image class="zz" src="../../static/icon/shang.png" mode=""></image>
-					</view>
-					<view class="biwe">23.5000</view>
-					<view class="biwe">23.5000</view>
-					<view class="biwe flex">
-						<view class="list-buttom success margin-r-10">
-							{{$t('enter.u17')}}
-						</view>
-						<view class="list-buttom primary">
-							{{$t('enter.u18')}}
-						</view>
-					</view>
-				</view>
-			</view>
-
-
-			<view class="chz flex">
-				<view>
-					<view class="yue padding-b-10">{{$t('enter.u15')}}</view>
-					<view class="yes">{{userWallet}}U</view>
-				</view>
-				<view class="flex-start" @click="navC">
-					<view class="quc">{{$t('enter.u16')}}</view>
-					<image class="choz" src="../../static/icon/jt.png" mode=""></image>
-				</view>
-			</view>
-			<taber tab='entertainment'></taber>
-		</template>
-		<template v-if="upOnBtnData.show">
-			<view class="page">
-
-				<view>
-					<view class="pay-title">
-						<text v-show="AffirmStatus === 1">请输入6位支付密码</text>
-						<text v-show="AffirmStatus === 2">请设置6位支付密码</text>
-						<text v-show="AffirmStatus === 3">请确认6位支付密码</text>
-					</view>
-					<view class="pay-password" @click="onPayUp">
-						<view class="list">
-							<text v-show="passwordArr.length >= 1">●</text>
-						</view>
-						<view class="list">
-							<text v-show="passwordArr.length >= 2">●</text>
-						</view>
-						<view class="list">
-							<text v-show="passwordArr.length >= 3">●</text>
-						</view>
-						<view class="list">
-							<text v-show="passwordArr.length >= 4">●</text>
-						</view>
-						<view class="list">
-							<text v-show="passwordArr.length >= 5">●</text>
-						</view>
-						<view class="list">
-							<text v-show="passwordArr.length >= 6">●</text>
-						</view>
-					</view>
-					<view class="hint">
-						<text>忘记支付密码?</text>
-					</view>
-				</view>
-				<cc-defineKeyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo"></cc-defineKeyboard>
-			</view>
-		</template>
-	</view>
-</template>
-
-<script>
-	import LEchart from '@/uni_modules/lime-echart/components/l-echart/l-echart.vue';
-	import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'
-	import {
-		getGame,
-		gameKline,
-		getGameList,
-		test,
-		gameWallet,
-		gameBetList,
-		gameBetIn
-	} from "@/api/game.js";
-	import {
-		qianBao,
-	} from "@/api/wallet.js";
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	import {
-		saveUrl,
-		interceptor
-	} from '@/utils/loginUtils.js';
-	import taber from "@/components/footer/footer.vue";
-
-	export default {
-		components: {
-			taber,
-			LEchart
-		},
-		computed: {
-			...mapState("user", ["hasLogin"])
-		},
-		data() {
-			return {
-				arMoneyList: [
-					1, 5, 10, 20, 50, 100
-				],
-				gameMoneyValue: 0,
-				actionIndex: 0,
-				// 当前游戏列表
-				gameList: [],
-				// 游戏信息
-				history: {
-					list: [], //游戏进行记录
-					page: 1,
-					limit: 10,
-					// 基础数据
-					base: {},
-					next: {},
-					now: {}
-				},
-				time: {
-					H: 0,
-					M: 0,
-					S: 0,
-					// 保存倒计时对象
-					t: ''
-				},
-				// 游戏押注记录
-				betList: {
-					list: [], //游戏进行记录
-					page: 1,
-					limit: 10,
-				},
-				userWallet: 0,
-				upOnBtnData: {
-					show: false,
-					type: ''
-				},
-				AffirmStatus: 1,
-				passwordArr: [],
-				oldPasswordArr: [],
-				newPasswordArr: [],
-				afPasswordArr: [],
-			};
-		},
-		onLoad() {
-
-		},
-		onShow() {
-			if (!this.hasLogin) {
-				uni.showModal({
-					title: "登陆",
-					content: '您未登录!是否马上登录?',
-					success: (e) => {
-						// 判断是否点击确认按钮
-						if (e.confirm) {
-							// 保存当前页面地址
-							saveUrl()
-							// 跳转页面
-							interceptor()
-						}
-					}
-				})
-				return
-			}
-			this.getUserWallet();
-
-		},
-		// 关闭循环
-		onHide() {
-			clearInterval(this.time.t)
-		},
-		methods: {
-			onbet(type) {
-				this.upOnBtnData.type = type;
-				this.upOnBtnData.show = true;
-				this.$refs.CodeKeyboard.show();
-			},
-
-			KeyInfo(val) {
-				if (val.index >= 6) {
-					return;
-				}
-				// 判断是否输入的是删除键
-				if (val.keyCode === 8) {
-					// 删除最后一位
-					this.passwordArr.splice(val.index + 1, 1)
-				}
-				// 判断是否输入的是.
-				else if (val.keyCode == 190) {
-					// 输入.无效
-				} else {
-					this.passwordArr.push(val.key);
-				}
-
-				uni.showModal({
-					title: '温馨提示',
-					content: '输入密码是 = ' + JSON.stringify(this.passwordArr)
-				})
-			},
-			// 参与压住
-			gameBetIn(type) {
-
-			},
-			// 获取用户余额信息
-			getUserWallet() {
-				gameWallet().then((res) => {
-					this.userWallet = res.data.back.USDT.money.money
-				})
-				if (this.history.next.id) {
-					this.opTiem();
-				} else {
-					this.gameInit();
-				}
-			},
-			// 开始倒计时
-			async opTiem() {
-				const that = this;
-				try {
-					// 关闭循环
-					clearInterval(that.time.t);
-					if (that.history.base.id) {
-						that.time.t = setInterval(() => {
-							const da = (new Date()).getTime();
-							const timenum = that.history.next.open_time * 1000 - da;
-							that.time.H = Math.floor(timenum / 1000 / 60 / 60);
-							that.time.S = Math.floor(timenum / 1000 % 60)
-							that.time.M = Math.floor(timenum / 1000 / 60 % 60);
-							if (that.time.H == 0 && that.time.M == 0 && that.time.S == 0) {
-								clearInterval(that.time.t);
-								setTimeout(() => {
-									test();
-									setTimeout(() => {
-										this.gameDataInit(that.gameList[that.actionIndex].id)
-									}, 1000)
-								}, 3000)
-
-							}
-						}, 1000)
-					}
-				} catch (e) {
-					console.log(e, '定时');
-				}
-
-			},
-			changeTab(item, ind) {
-				if (ind != this.actionIndex) {
-					this.actionIndex = ind;
-					this.gameDataInit(item.id);
-				}
-			},
-			async gameInit() {
-				try {
-					await test();
-					// 获取游戏列表
-					await this.getGameList();
-					// 加载游戏数据
-					this.gameDataInit(this.history.next.id || this.gameList[0].id)
-
-				} catch (e) {
-					console.log(e, 'cuowu');
-				}
-			},
-			// 加载游戏列表
-			getGameList() {
-				return getGameList().then((res) => {
-					this.gameList = res.data.list;
-				})
-			},
-			// 加载基础游戏信息
-			async gameDataInit(id) {
-				// 获取基础信息
-				await this.getGame(id);
-				//获取K线
-				this.getGameKline();
-				// 获取游戏压住记录
-				this.gameBetList();
-			},
-			// 获取游戏压住记录
-			gameBetList() {
-				gameBetList({
-					page: 1,
-					limit: 10,
-					id: this.history.base.id
-				}).then((res) => {
-					this.betList.list = res.data.bet_log;
-				})
-			},
-			// 获取游戏K线信息
-			getGameKline() {
-				const that = this;
-				gameKline({
-					page: 1,
-					limit: 60
-				}, that.history.base.id).then((res) => {
-					let list = res.data.list.reverse();
-					// x轴记录
-					let xarr = [];
-					// 打点数据
-					let linearr = [];
-					for (let i = 0; i < list.length; i++) {
-						const ll = list[i];
-						const time = new Date(+ll.ts);
-						const addar = [+(+ll.o).toFixed(5), +(+ll.c).toFixed(5), +(+ll.l).toFixed(5), +(+ll.h)
-							.toFixed(5)
-						];
-						xarr.push(`${time.getHours()}:${time.getMinutes()}`)
-						linearr.push(addar)
-					}
-					that.$nextTick(() => {
-						that.initKline({
-							xarr,
-							linearr
-						})
-					})
-				})
-			},
-			// 获取当前项目信息
-			getGame(type) {
-				const that = this;
-				return getGame({
-					page: that.history.page,
-					limit: that.history.limit
-				}, type).then(({
-					data
-				}) => {
-					that.history.list = data.list || [];
-					that.history.base = data.game || {};
-					that.history.next = data.next_game || {};
-					that.history.now = data.now_game || {};
-					if (that.history.next) {
-						that.opTiem();
-					}
-				})
-			},
-			// 均值计算
-			calculateMA(dayCount, data) {
-				var result = [];
-				for (var i = 0, len = data.linearr.length; i < len; i++) {
-					if (i < dayCount) {
-						result.push('-');
-						continue;
-					}
-					var sum = 0;
-					for (var j = 0; j < dayCount; j++) {
-						sum += data.linearr[i - j][1];
-					}
-					result.push(+(sum / dayCount).toFixed(5));
-				}
-				return result;
-			},
-
-			async initKline(data) {
-				const that = this;
-				try {
-					const chart = await this.$refs.chart.init(echarts);
-					const upColor = '#00da3c';
-					const downColor = '#ec0000';
-					chart.setOption(
-						(this.option = {
-							animation: false,
-							legend: {
-								top: 10,
-								left: 10,
-								data: ['MA5', 'MA10', 'MA20'],
-								textStyle: {
-									color: '#999999'
-								}
-							},
-							tooltip: {
-								trigger: 'axis',
-								axisPointer: {
-									type: 'cross'
-								},
-								borderWidth: 1,
-								borderColor: '#ccc',
-								padding: 10,
-								textStyle: {
-									color: '#000'
-								},
-								position: function(pos, params, el, elRect, size) {
-									const obj = {
-										top: 10
-									};
-									obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 40;
-
-									return obj;
-								}
-							},
-							dataZoom: [{
-								type: 'inside',
-								xAxisIndex: 0,
-								start: 50,
-								end: 100
-							}],
-							grid: [{
-								left: 10,
-								right: 55,
-								bottom: 20,
-								top: 45
-							}],
-							xAxis: [{
-								type: 'category',
-								data: data.xarr,
-								axisLine: {
-									onZero: false
-								},
-								splitLine: {
-									show: false
-								},
-								min: 'dataMin',
-								max: 'dataMax',
-								axisPointer: {
-									z: 100
-								}
-							}],
-							yAxis: [{
-								scale: true,
-								splitNumber: 4,
-								position: 'right',
-								axisTick: {
-									show: false
-								},
-								splitLine: {
-									show: false,
-									lineStyle: {
-										color: '#e3e3e3'
-									}
-								},
-								axisLabel: {
-									inside: false,
-									formatter: '{value}\n',
-									color: '#999999'
-								}
-							}],
-							series: [{
-									name: that.history.base.token + '-USDT',
-									type: 'candlestick',
-									data: data.linearr,
-									itemStyle: {
-										color: upColor,
-										color0: downColor,
-										borderColor: undefined,
-										borderColor0: undefined
-									}
-								},
-								{
-									name: "MA5",
-									smooth: true,
-									type: 'line',
-									data: that.calculateMA(5, data),
-									showSymbol: false,
-									lineStyle: {
-										width: 1
-									}
-								},
-								{
-									name: "MA10",
-									smooth: true,
-									type: 'line',
-									data: that.calculateMA(10, data),
-									showSymbol: false,
-									lineStyle: {
-										width: 1
-									}
-								},
-								{
-									name: "MA20",
-									smooth: true,
-									type: 'line',
-									data: that.calculateMA(20, data),
-									showSymbol: false,
-									lineStyle: {
-										width: 1
-									}
-								},
-							]
-						}),
-						true
-					)
-
-				} catch (e) {
-					console.log(e, 'cuowu');
-					//TODO handle the exception
-				}
-
-			},
-
-			// 页面逻辑
-			nav() {
-				uni.navigateTo({
-					url: "/pages/history/history",
-				});
-			},
-			navC() {
-				uni.navigateTo({
-					url: "/pages/recharge/recharge",
-				});
-			},
-		},
-	};
-</script>
-
-<style lang="scss">
-	.all {
-		width: 750rpx;
-		/* height: 2500rpx; */
-		height: 100%;
-		padding-top: var(--status-bar-height);
-		padding-bottom: 30rpx;
-	}
-
-	$base: orangered; // 基础颜色
-
-	.page {
-		position: absolute;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		background-color: #FFFFFF;
-
-		.pay-title {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			width: 100%;
-			height: 200rpx;
-
-			text {
-				font-size: 28rpx;
-				color: #555555;
-			}
-		}
-
-		.pay-password {
-			display: flex;
-			align-items: center;
-			width: 90%;
-			height: 80rpx;
-			margin: 20rpx auto;
-			border: 2rpx solid $base;
-
-			.list {
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				width: 16.666%;
-				height: 100%;
-				border-right: 2rpx solid #EEEEEE;
-
-				text {
-					font-size: 32rpx;
-				}
-			}
-
-			.list:nth-child(6) {
-				border-right: none;
-			}
-		}
-
-		.hint {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			width: 100%;
-			height: 100rpx;
-
-			text {
-				font-size: 28rpx;
-				color: $base;
-			}
-		}
-	}
-
-
-	.tab {
-		padding: 30rpx 20rpx;
-		margin: 0 30rpx;
-		background-color: #191A1F;
-		border-radius: 20px;
-
-		.tab-item {
-			color: #FFF;
-			font-size: $font-sm;
-			padding: 0 20rpx;
-			padding-bottom: 10rpx;
-
-			&.action {
-				color: #F5A944;
-				border-bottom: 1px solid #F5A944;
-			}
-		}
-
-		.top {
-			height: 530rpx;
-			width: 100%;
-		}
-	}
-
-	.center {
-		padding: 30rpx;
-		line-height: 1;
-		align-items: flex-start;
-
-		.le,
-		.ri {
-			width: 50%;
-		}
-
-		.le {
-			.tit {
-				font-weight: bold;
-
-				.ti1 {
-					font-size: 26rpx;
-					color: #ffffff;
-				}
-
-				.ti2 {
-					font-size: 22rpx;
-					padding-left: 10rpx;
-					color: #999999;
-				}
-			}
-
-			.he {
-				padding-top: 40rpx;
-
-				.numbox {
-					flex-wrap: wrap;
-
-					.he1 {
-						background: #fdaf41;
-						border-radius: 10rpx;
-						margin-bottom: 40rpx;
-						margin-right: 20rpx;
-						width: 84rpx;
-						height: 84rpx;
-						justify-content: center;
-
-						.wen {
-							font-size: 30rpx;
-							font-weight: bold;
-							color: #000000;
-						}
-					}
-				}
-			}
-
-			.yi {
-				color: #ffffff;
-				font-size: $font-base;
-
-				.img {
-					width: 41rpx;
-					height: 42rpx;
-				}
-
-				.wz {
-					font-weight: bold;
-				}
-			}
-
-			.shu {
-				padding-top: 10rpx;
-				font-size: 51rpx;
-				font-weight: bold;
-				color: #fdb242;
-			}
-
-		}
-
-		.ri {
-			.ti {
-				font-size: 26rpx;
-				font-weight: bold;
-
-				.t1 {
-					color: #ffffff;
-				}
-
-				.t2 {
-					color: #fdaf41;
-				}
-			}
-
-			.dh {
-				width: 100%;
-				padding: 20rpx 30rpx;
-				margin-top: 30rpx;
-				background: #efefef;
-				border-radius: 10rpx;
-
-				.te {
-					font-size: 44rpx;
-					font-weight: 800;
-					color: #000000;
-				}
-			}
-
-			.btn {
-				padding-top: 30rpx;
-
-				.bt {
-					padding-bottom: 10rpx;
-
-					.btnItem {
-						width: 49%;
-						height: 70rpx;
-						line-height: 70rpx;
-						text-align: center;
-
-						.imag {
-							width: 32rpx;
-							height: 20rpx;
-						}
-
-						.xia {
-							font-size: 28rpx;
-							font-weight: 800;
-							color: #ffffff;
-						}
-
-					}
-
-					.btnle {
-						border-radius: 50rpx 0 0 50rpx;
-						background-color: #df5660;
-
-					}
-
-					.btnri {
-						border-radius: 0 50rpx 50rpx 0;
-						background-color: #5bb786;
-					}
-				}
-			}
-
-			.db {
-				justify-content: flex-end;
-				padding-top: 30rpx;
-
-				.jl {
-					font-size: 24rpx;
-					font-weight: 400;
-					color: #999999;
-				}
-
-				.sj {
-					width: 40rpx;
-					height: 40rpx;
-					background: #bfbfbf;
-					border-radius: 3rpx;
-					text-align: center;
-					line-height: 40rpx;
-					margin-left: 10rpx;
-				}
-
-			}
-		}
-	}
-
-	.kb {
-		width: 750rpx;
-		height: 20rpx;
-		background-color: #191a1f;
-	}
-
-	.last {
-		padding: 30rpx;
-		line-height: 1;
-		font-size: 24rpx;
-		font-weight: 800;
-		color: #fff;
-
-		.lb {
-			width: 14rpx;
-			height: 20rpx;
-			margin-left: 10rpx;
-		}
-
-	}
-
-
-
-
-
-	.bg {
-		padding: 0 30rpx;
-		background-color: #000000;
-		color: #fff;
-		text-align: center;
-		font-size: 28rpx;
-		padding-bottom: 30rpx;
-
-		.biaotou {
-			font-weight: 800;
-			padding-bottom: 10rpx;
-		}
-
-		.biwe {
-			width: 25%;
-
-			.zz {
-				width: 22rpx;
-				height: 14rpx;
-				margin-left: 8rpx;
-			}
-
-			.nametip {
-				font-size: 18rpx;
-				color: #999999;
-				padding-left: 8rpx;
-			}
-		}
-
-		.biwe:nth-child(1) {
-			flex-shrink: 0;
-			text-align: left;
-			align-items: flex-end;
-		}
-
-		.biwe:nth-child(4) {
-			flex-shrink: 0;
-			width: 200rpx;
-		}
-
-		.list {
-			font-weight: bold;
-			padding: 20rpx 0;
-			border-bottom: 1px solid rgba(43, 42, 38, 0.52);
-		}
-
-		.list-buttom {
-			width: 100rpx;
-			border-radius: 30rpx;
-			font-size: 16rpx;
-			padding: 10rpx 0;
-
-			&.success {
-				background: #25b287;
-			}
-
-			&.primary {
-				background: #01ebf6;
-				color: #000000;
-			}
-		}
-	}
-
-	.chz {
-		background: #191a1f;
-		border-radius: 20rpx;
-		margin: 0 30rpx;
-		color: #ffffff;
-		font-weight: bold;
-		padding: 20rpx 30rpx;
-
-		.yue {
-			font-size: 28rpx;
-		}
-
-		.yes {
-			color: #fdaf41;
-		}
-
-		.quc {
-			font-size: 26rpx;
-			font-weight: 500;
-			color: #ffffff;
-		}
-
-		.choz {
-			width: 22rpx;
-			height: 14rpx;
-		}
-	}
-</style>

+ 308 - 270
pages/index/entertainment.vue

@@ -1,175 +1,156 @@
 <template>
 	<view class="all">
-		<template v-if="!upOnBtnData.show">
-			<view class="padding-t-30"></view>
-			<view class="tab">
-				<view class="flex">
-					<view class="tab-item " @click="changeTab(item,ind)" :class="{action:actionIndex==ind}"
-						v-for="(item,ind) in gameList">
-						{{item.name}}
-					</view>
+		<view class="padding-t-30"></view>
+		<view class="tab">
+			<view class="flex-start">
+				<view class="tab-item " @click="changeTab(item,ind)" :class="{action:actionIndex==ind}"
+					v-for="(item,ind) in gameList">
+					{{item.name}}
 				</view>
-				<l-echart class="top" ref="chart"></l-echart>
 			</view>
-
-			<view class="center flex">
-				<!-- 左 -->
-				<view class="le">
-					<view class="tit flex-start">
-						<view class="ti1">{{$t('enter.u1')}}</view>
-						<view class="ti2">({{$t('enter.u2')}})</view>
-					</view>
-					<view class="he">
-						<view class="numbox flex-start">
-							<view class="he1 flex" @click="gameMoneyValue=it" v-for="it in arMoneyList">
-								<view class="wen">{{it}}</view>
-							</view>
+			<l-echart class="top" ref="chart"></l-echart>
+		</view>
+
+		<view class="center flex">
+			<!-- 左 -->
+			<view class="le">
+				<view class="tit flex-start">
+					<view class="ti1">{{$t('enter.u1')}}</view>
+					<view class="ti2">({{$t('enter.u2')}})</view>
+				</view>
+				<view class="he">
+					<view class="numbox flex-start">
+						<view class="he1 flex" @click="upOnBtnData.value=it" v-for="it in arMoneyList">
+							<view class="wen">{{it}}</view>
 						</view>
 					</view>
-					<view class="yi flex-start">
-						<image class="img" src="../../static/icon/le.png" mode=""></image>
-						<view class="wz padding-l-10">{{history.base.token}}</view>
-						<view class="qx padding-l-10" v-if="history.next.id">{{history.next.no}}</view>
-					</view>
-					<view class="shu">
-						0.064489
-					</view>
 				</view>
-				<!--右 -->
-				<view class="ri">
-					<view class="ti flex-center">
-						<view class="t1">{{$t('enter.u3')}}</view>
-						<view class="t2 padding-l-10">{{history.base.timebar}}</view>
-					</view>
+				<view class="yi flex-start">
+					<image class="img" src="../../static/icon/le.png" mode=""></image>
+					<view class="wz padding-l-10">{{history.base.token}}</view>
+					<view class="qx padding-l-10" v-if="history.next.id">{{history.next.no}}</view>
+				</view>
+				<view class="shu">
+					0.064489
+				</view>
+			</view>
+			<!--右 -->
+			<view class="ri">
+				<view class="ti flex-center">
+					<view class="t1">{{$t('enter.u3')}}</view>
+					<view class="t2 padding-l-10">{{history.base.timebar}}</view>
+				</view>
 
-					<view class="dh">
-						<input class="input" type="number" v-model="gameMoneyValue">
-					</view>
-					<view class="btn">
-						<view class="bt flex">
-							<view class="btnItem btnle" @click="onbet(2)">
-								<image class="imag" src="../../static/icon/xia.png" mode=""></image>
-								<text class="xia">{{$t('enter.u4')}}</text>
-							</view>
-							<view class="btnItem btnri" @click="onbet(1)">
-								<image class="imag" src="../../static/icon/shang.png" mode=""></image>
-								<text class="xia">{{$t('enter.u6')}}</text>
-							</view>
+				<view class="dh">
+					<input class="input" :placeholder="$t('enter.a9')" type="number" v-model="upOnBtnData.value">
+				</view>
+				<view class="btn">
+					<view class="bt flex">
+						<view class="btnItem btnle" @click="onPayBet(2)">
+							<image class="imag" src="../../static/icon/xia.png" mode=""></image>
+							<text class="xia">{{$t('enter.u4')}}</text>
 						</view>
-						<view class="bt flex">
-							<view class="btnItem btnle" @click="onbet(3)">
-								<view class="xia">{{$t('enter.u5')}}</view>
-							</view>
-							<view class="btnItem btnri" @click="onbet(4)">
-								<view class="xia">{{$t('enter.u7')}}</view>
-							</view>
+						<view class="btnItem btnri" @click="onPayBet(1)">
+							<image class="imag" src="../../static/icon/shang.png" mode=""></image>
+							<text class="xia">{{$t('enter.u6')}}</text>
 						</view>
 					</view>
-
-					<view class="db flex">
-						<view class="jl">{{$t('enter.u8')}}</view>
-						<view class="sj">
-							<text v-if="time.H<10">0</text>
-							{{time.H}}
+					<view class="bt flex">
+						<view class="btnItem btnle" @click="onPayBet(3)">
+							<view class="xia">{{$t('enter.u5')}}</view>
 						</view>
-						<view class="sj">
-							<text v-if="time.M<10">0</text>
-							{{time.M}}
-						</view>
-						<view class="sj">
-							<text v-if="time.S<10">0</text>
-							{{time.S}}
+						<view class="btnItem btnri" @click="onPayBet(4)">
+							<view class="xia">{{$t('enter.u7')}}</view>
 						</view>
 					</view>
 				</view>
-			</view>
-			<view class="kb"></view>
-
-			<view class="last">
-				<view class="flex">
-					<text>{{$t('enter.u9')}}</text>
-					<view class="flex" @click="nav">
-						<text>{{$t('enter.u10')}}</text>
-						<image class="lb" src="../../static/icon/jt.png" mode=""></image>
+
+				<view class="db flex">
+					<view class="jl">{{$t('enter.u8')}}</view>
+					<view class="sj">
+						<text v-if="time.H<10">0</text>
+						{{time.H}}
+					</view>
+					<view class="sj">
+						<text v-if="time.M<10">0</text>
+						{{time.M}}
+					</view>
+					<view class="sj">
+						<text v-if="time.S<10">0</text>
+						{{time.S}}
 					</view>
 				</view>
 			</view>
-
-			<view class="bg">
-				<view class="biaotou flex">
-					<view class="biwe">{{$t('enter.u11')}}</view>
-					<view class="biwe">{{$t('enter.u12')}}</view>
-					<view class="biwe">{{$t('enter.u13')}}</view>
-					<view class="biwe">{{$t('enter.u14')}}</view>
+		</view>
+		<view class="kb"></view>
+
+		<view class="last">
+			<view class="flex">
+				<text>{{$t('enter.u9')}}</text>
+				<view class="flex" @click="nav">
+					<text>{{$t('enter.u10')}}</text>
+					<image class="lb" src="../../static/icon/jt.png" mode=""></image>
+				</view>
+			</view>
+		</view>
+
+		<view class="bg">
+			<view class="biaotou flex">
+				<view class="biwe">{{$t('enter.u11')}}</view>
+				<view class="biwe">{{$t('enter.u12')}}</view>
+				<view class="biwe">{{$t('enter.u13')}}</view>
+				<view class="biwe">{{$t('enter.u14')}}</view>
+			</view>
+			<view class="list flex" v-for="(item,ind) in betList.list" :key="ind">
+				<view class="biwe flex-start">
+					<view class="tr">{{history.base.token}}</view>
+					<view class="nametip">{{history.base.timebar}}</view>
+					<image class="zz" src="../../static/icon/shang.png" mode=""></image>
 				</view>
-				<view class="list flex" v-for="(item,ind) in betList.list" :key="ind">
-					<view class="biwe flex-start">
-						<view class="tr">{{history.base.token}}</view>
-						<view class="nametip">{{history.base.timebar}}</view>
-						<image class="zz" src="../../static/icon/shang.png" mode=""></image>
+				<view class="biwe">23.5000</view>
+				<view class="biwe">23.5000</view>
+				<view class="biwe flex">
+					<view class="list-buttom success margin-r-10">
+						{{$t('enter.u17')}}
 					</view>
-					<view class="biwe">23.5000</view>
-					<view class="biwe">23.5000</view>
-					<view class="biwe flex">
-						<view class="list-buttom success margin-r-10">
-							{{$t('enter.u17')}}
-						</view>
-						<view class="list-buttom primary">
-							{{$t('enter.u18')}}
-						</view>
+					<view class="list-buttom primary">
+						{{$t('enter.u18')}}
 					</view>
 				</view>
 			</view>
+		</view>
 
 
-			<view class="chz flex">
-				<view>
-					<view class="yue padding-b-10">{{$t('enter.u15')}}</view>
-					<view class="yes">{{userWallet}}U</view>
-				</view>
-				<view class="flex-start" @click="navC">
-					<view class="quc">{{$t('enter.u16')}}</view>
-					<image class="choz" src="../../static/icon/jt.png" mode=""></image>
-				</view>
+		<view class="chz flex">
+			<view>
+				<view class="yue padding-b-10">{{$t('enter.u15')}}</view>
+				<view class="yes">{{userWallet}}U</view>
+			</view>
+			<view class="flex-start" @click="navC">
+				<view class="quc">{{$t('enter.u16')}}</view>
+				<image class="choz" src="../../static/icon/jt.png" mode=""></image>
 			</view>
-			<taber tab='entertainment'></taber>
-		</template>
-		<template v-if="upOnBtnData.show">
+		</view>
+		<uni-popup type="bottom" ref="popup" :mask-click="false" @maskClick='colsePayPassword'>
 			<view class="page">
-
 				<view>
 					<view class="pay-title">
-						<text v-show="AffirmStatus === 1">请输入6位支付密码</text>
-						<text v-show="AffirmStatus === 2">请设置6位支付密码</text>
-						<text v-show="AffirmStatus === 3">请确认6位支付密码</text>
+						<text>{{$t('enter.b3')}}</text>
 					</view>
 					<view class="pay-password" @click="onPayUp">
-						<view class="list">
-							<text v-show="passwordArr.length >= 1">●</text>
-						</view>
-						<view class="list">
-							<text v-show="passwordArr.length >= 2">●</text>
-						</view>
-						<view class="list">
-							<text v-show="passwordArr.length >= 3">●</text>
-						</view>
-						<view class="list">
-							<text v-show="passwordArr.length >= 4">●</text>
-						</view>
-						<view class="list">
-							<text v-show="passwordArr.length >= 5">●</text>
-						</view>
-						<view class="list">
-							<text v-show="passwordArr.length >= 6">●</text>
+						<view class="list" v-for="item in 6">
+							<text v-show="upOnBtnData.passwordArr.length >= item">●</text>
 						</view>
 					</view>
 					<view class="hint">
 						<text>忘记支付密码?</text>
 					</view>
 				</view>
-				<cc-defineKeyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo"></cc-defineKeyboard>
+				<cc-defineKeyboard ref="CodeKeyboard" passwrdType="pay" @KeyInfo="KeyInfo"
+					:viewShow="true"></cc-defineKeyboard>
 			</view>
-		</template>
+		</uni-popup>
+		<taber tab='entertainment' v-if="!upOnBtnData.show"></taber>
 	</view>
 </template>
 
@@ -211,7 +192,6 @@
 				arMoneyList: [
 					1, 5, 10, 20, 50, 100
 				],
-				gameMoneyValue: 0,
 				actionIndex: 0,
 				// 当前游戏列表
 				gameList: [],
@@ -240,24 +220,21 @@
 				},
 				userWallet: 0,
 				upOnBtnData: {
+					// 是否显示底部导航栏
 					show: false,
-					type: ''
+					type: '',
+					// 当前输入的密码
+					passwordArr: [],
+					value: '',
 				},
-				AffirmStatus: 1,
-				passwordArr: [],
-				oldPasswordArr: [],
-				newPasswordArr: [],
-				afPasswordArr: [],
 			};
 		},
-		onLoad() {
-
-		},
+		onLoad() {},
 		onShow() {
 			if (!this.hasLogin) {
 				uni.showModal({
-					title: "登陆",
-					content: '您未登录!是否马上登录?',
+					title: this.$t('enter.c4'),
+					content: this.$t('enter.b5'),
 					success: (e) => {
 						// 判断是否点击确认按钮
 						if (e.confirm) {
@@ -278,41 +255,77 @@
 			clearInterval(this.time.t)
 		},
 		methods: {
-			onbet(type) {
+			// 点击触发支付事件
+			onPayBet(type) {
+				if (!this.upOnBtnData.value) {
+					uni.showToast({
+						title: this.$t('enter.a9'),
+						icon: "error"
+
+					})
+					return
+				}
 				this.upOnBtnData.type = type;
+				this.openPayPassword();
+			},
+			// 打开支付弹窗
+			openPayPassword() {
 				this.upOnBtnData.show = true;
-				this.$refs.CodeKeyboard.show();
+				this.$refs.popup.open();
+			},
+			// 关闭支付弹窗
+			colsePayPassword() {
+				this.upOnBtnData.show = false;
+				this.$refs.popup.close();
 			},
 
 			KeyInfo(val) {
+				console.log(val);
+				let arr = this.upOnBtnData.passwordArr;
 				if (val.index >= 6) {
 					return;
 				}
 				// 判断是否输入的是删除键
 				if (val.keyCode === 8) {
 					// 删除最后一位
-					this.passwordArr.splice(val.index + 1, 1)
+					arr.splice(val.index + 1, 1)
 				}
-				// 判断是否输入的是.
+				// 判断是否输入的是取消案件
 				else if (val.keyCode == 190) {
+					this.colsePayPassword();
 					// 输入.无效
 				} else {
-					this.passwordArr.push(val.key);
+					arr.push(val.key);
+				}
+				// 开始交易
+				if (arr.length == 6) {
+					this.colsePayPassword();
+					this.gameBetIn();
 				}
-
-				uni.showModal({
-					title: '温馨提示',
-					content: '输入密码是 = ' + JSON.stringify(this.passwordArr)
-				})
 			},
 			// 参与压住
 			gameBetIn(type) {
-
+				const that = this;
+				const upData = {
+					id: that.history.next.id,
+					bet: that.upOnBtnData.type,
+					num: that.upOnBtnData.value,
+					trade_password: that.upOnBtnData.passwordArr.join("")
+				};
+				uni.showLoading({
+					mask: true
+				})
+				gameBetIn(upData).then((res) => {
+					uni.hideLoading()
+				}).catch((res) => {
+					uni.hideLoading();
+					console.log(res)
+				})
 			},
 			// 获取用户余额信息
 			getUserWallet() {
 				gameWallet().then((res) => {
-					this.userWallet = res.data.back.USDT.money.money
+					this.userWallet = +res.data.back.USDT.money.money
 				})
 				if (this.history.next.id) {
 					this.opTiem();
@@ -353,6 +366,7 @@
 			changeTab(item, ind) {
 				if (ind != this.actionIndex) {
 					this.actionIndex = ind;
+					clearInterval(this.time.t)
 					this.gameDataInit(item.id);
 				}
 			},
@@ -374,12 +388,12 @@
 					this.gameList = res.data.list;
 				})
 			},
-			// 加载基础游戏信息
-			async gameDataInit(id) {
+			// 重新加载基础游戏信息
+			async gameDataInit(id, reload = true) {
 				// 获取基础信息
 				await this.getGame(id);
 				//获取K线
-				this.getGameKline();
+				this.getGameKline(reload);
 				// 获取游戏压住记录
 				this.gameBetList();
 			},
@@ -394,7 +408,7 @@
 				})
 			},
 			// 获取游戏K线信息
-			getGameKline() {
+			getGameKline(reload = true) {
 				const that = this;
 				gameKline({
 					page: 1,
@@ -415,10 +429,11 @@
 						linearr.push(addar)
 					}
 					that.$nextTick(() => {
+						// 判断是否要重载数据
 						that.initKline({
 							xarr,
 							linearr
-						})
+						}, reload)
 					})
 				})
 			},
@@ -456,135 +471,162 @@
 				}
 				return result;
 			},
-
-			async initKline(data) {
+			// 重载K线
+			async initKline(data, reload = true) {
 				const that = this;
 				try {
 					const chart = await this.$refs.chart.init(echarts);
-					const upColor = '#00da3c';
-					const downColor = '#ec0000';
-					chart.setOption(
-						(this.option = {
-							animation: false,
-							legend: {
-								top: 10,
-								left: 10,
-								data: ['MA5', 'MA10', 'MA20'],
-								textStyle: {
-									color: '#999999'
-								}
-							},
-							tooltip: {
-								trigger: 'axis',
-								axisPointer: {
-									type: 'cross'
+					if (reload) {
+						const upColor = '#00da3c';
+						const downColor = '#ec0000';
+						chart.setOption(
+							(this.option = {
+								animation: false,
+								legend: {
+									top: 10,
+									left: 10,
+									data: ['MA5', 'MA10', 'MA20'],
+									textStyle: {
+										color: '#999999'
+									}
 								},
-								borderWidth: 1,
-								borderColor: '#ccc',
-								padding: 10,
-								textStyle: {
-									color: '#000'
+								tooltip: {
+									trigger: 'axis',
+									axisPointer: {
+										type: 'cross'
+									},
+									borderWidth: 1,
+									borderColor: '#ccc',
+									padding: 10,
+									textStyle: {
+										color: '#000'
+									},
+									position: function(pos, params, el, elRect, size) {
+										const obj = {
+											top: 10
+										};
+										obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 40;
+
+										return obj;
+									}
 								},
-								position: function(pos, params, el, elRect, size) {
-									const obj = {
-										top: 10
-									};
-									obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 40;
-
-									return obj;
-								}
-							},
-							dataZoom: [{
-								type: 'inside',
-								xAxisIndex: 0,
-								start: 50,
-								end: 100
-							}],
-							grid: [{
-								left: 10,
-								right: 55,
-								bottom: 20,
-								top: 45
-							}],
+								dataZoom: [{
+									type: 'inside',
+									xAxisIndex: 0,
+									start: 50,
+									end: 100
+								}],
+								grid: [{
+									left: 10,
+									right: 55,
+									bottom: 20,
+									top: 45
+								}],
+								xAxis: [{
+									type: 'category',
+									data: data.xarr,
+									axisLine: {
+										onZero: false
+									},
+									splitLine: {
+										show: false
+									},
+									min: 'dataMin',
+									max: 'dataMax',
+									axisPointer: {
+										z: 100
+									}
+								}],
+								yAxis: [{
+									scale: true,
+									splitNumber: 4,
+									position: 'right',
+									axisTick: {
+										show: false
+									},
+									splitLine: {
+										show: false,
+										lineStyle: {
+											color: '#e3e3e3'
+										}
+									},
+									axisLabel: {
+										inside: false,
+										formatter: '{value}\n',
+										color: '#999999'
+									}
+								}],
+								series: [{
+										name: that.history.base.token + '-USDT',
+										type: 'candlestick',
+										data: data.linearr,
+										itemStyle: {
+											color: upColor,
+											color0: downColor,
+											borderColor: undefined,
+											borderColor0: undefined
+										}
+									},
+									{
+										name: "MA5",
+										smooth: true,
+										type: 'line',
+										data: that.calculateMA(5, data),
+										showSymbol: false,
+										lineStyle: {
+											width: 1
+										}
+									},
+									{
+										name: "MA10",
+										smooth: true,
+										type: 'line',
+										data: that.calculateMA(10, data),
+										showSymbol: false,
+										lineStyle: {
+											width: 1
+										}
+									},
+									{
+										name: "MA20",
+										smooth: true,
+										type: 'line',
+										data: that.calculateMA(20, data),
+										showSymbol: false,
+										lineStyle: {
+											width: 1
+										}
+									},
+								]
+							}),
+							true
+						)
+					} else {
+						chart.setOption({
 							xAxis: [{
 								type: 'category',
 								data: data.xarr,
-								axisLine: {
-									onZero: false
-								},
-								splitLine: {
-									show: false
-								},
-								min: 'dataMin',
-								max: 'dataMax',
-								axisPointer: {
-									z: 100
-								}
-							}],
-							yAxis: [{
-								scale: true,
-								splitNumber: 4,
-								position: 'right',
-								axisTick: {
-									show: false
-								},
-								splitLine: {
-									show: false,
-									lineStyle: {
-										color: '#e3e3e3'
-									}
-								},
-								axisLabel: {
-									inside: false,
-									formatter: '{value}\n',
-									color: '#999999'
-								}
 							}],
 							series: [{
 									name: that.history.base.token + '-USDT',
-									type: 'candlestick',
 									data: data.linearr,
-									itemStyle: {
-										color: upColor,
-										color0: downColor,
-										borderColor: undefined,
-										borderColor0: undefined
-									}
 								},
 								{
 									name: "MA5",
-									smooth: true,
-									type: 'line',
 									data: that.calculateMA(5, data),
-									showSymbol: false,
-									lineStyle: {
-										width: 1
-									}
 								},
 								{
 									name: "MA10",
-									smooth: true,
-									type: 'line',
 									data: that.calculateMA(10, data),
-									showSymbol: false,
-									lineStyle: {
-										width: 1
-									}
 								},
 								{
 									name: "MA20",
-									smooth: true,
-									type: 'line',
 									data: that.calculateMA(20, data),
-									showSymbol: false,
-									lineStyle: {
-										width: 1
-									}
 								},
 							]
-						}),
-						true
-					)
+						})
+					}
+
 
 				} catch (e) {
 					console.log(e, 'cuowu');
@@ -620,11 +662,7 @@
 	$base: orangered; // 基础颜色
 
 	.page {
-		position: absolute;
-		left: 0;
-		top: 0;
 		width: 100%;
-		height: 100%;
 		background-color: #FFFFFF;
 
 		.pay-title {

+ 0 - 340
pages/index/index - 副本.vue

@@ -1,340 +0,0 @@
-<template>
-	<view class="container">
-		<view class="top flex">
-			<view class="icon1 flex">
-				<image class="img margin-r-10" src="../../static/shouye/shouye1.png" mode="scaleToFill"></image>
-				<text class="tet">互娛共享</text>
-			</view>
-			<view class="flex">
-				<view class="icon2 text margin-r-10">
-					oxs***23b
-				</view>
-				<view class="icon1  margin-r-10">
-					<image class="langTip" src="../../static/shouye/shouye2.png" mode="scaleToFill"></image>
-				</view>
-				<view class="text1  margin-r-10">
-					<picker :range="langList" range-key='label' @change="selectLang">
-						<view>{{label}}</view>
-					</picker>
-				</view>
-				<view class="icon1">
-					<image class="langTipDom" src="../../static/shouye/shouye3.png" mode="scaleToFill"></image>
-				</view>
-			</view>
-		</view>
-
-		<!-- 轮播图 -->
-		<view class="uni-margin-wrap margin-b-10">
-			<swiper indicator-color='rgba(255,255,255,0.69)' indicator-active-color='#FFF' class="swiper" circular
-				:indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
-				<swiper-item class="swiper-box">
-					<image class="swiper-item" src="../../static/shouye/shouye4.png" mode="scaleToFill"></image>
-				</swiper-item>
-				<swiper-item class="swiper-box">
-					<image class="swiper-item" src="../../static/shouye/shouye4.png" mode="scaleToFill"></image>
-				</swiper-item>
-			</swiper>
-		</view>
-		<!-- 底部 -->
-		<view class="tra flex margin-b-10">
-			<view class="tra-item">
-				{{$t('home.b8')}}
-			</view>
-			<view class="tra-item">
-				{{$t('home.k1')}}
-			</view>
-			<view class="tra-item">
-				{{$t('home.b0')}}
-			</view>
-		</view>
-		<!-- 每一项 -->
-		<view class="list flex" v-for="(item,ind) in navList.orderList">
-			<view class="list-item flex-start">
-				<image class="img margin-r-10" :src="item.img" mode="scaleToFill"> </image>
-				<text class="tli">TRX</text>
-			</view>
-			<view class="list-item">
-				29385.97
-			</view>
-			<view class="list-item ">
-				<text class="button" :class="{up:item.fl==1,dom:item.fl==0}">
-					{{item.fl==1?'+':'-'}} {{item.bfb}}%
-				</text>
-			</view>
-		</view>
-		<taber tab='index'></taber>
-	</view>
-</template>
-<script>
-	import {
-		mapState,
-		mapActions
-	} from "vuex";
-	import taber from "@/components/footer/footer.vue";
-	export default {
-		components: {
-			taber
-		},
-		data() {
-			return {
-				indicatorDots: true,
-				autoplay: true,
-				interval: 5000,
-				duration: 500,
-				navList: {
-					loadingType: 'more',
-					orderList: [{
-						type: 'TRX',
-						img: '../../static/shouye/shouye5.png',
-						money: 2222,
-						fl: 1,
-						bfb: 0.25,
-					}, {
-						type: 'TRX',
-						img: '../../static/shouye/shouye6.png',
-						money: 2222,
-						fl: 0,
-						bfb: 9.25,
-					}, {
-						type: 'TRX',
-						img: '../../static/shouye/shouye7.png',
-						money: 2222,
-						fl: 1,
-						bfb: 0.25,
-					}, {
-						type: 'TRX',
-						img: '../../static/shouye/shouye8.png',
-						money: 2222,
-						fl: 1,
-						bfb: 0.25,
-					}, {
-						type: 'TRX',
-						img: '../../static/shouye/shouye9.png',
-						money: 2222,
-						fl: 0,
-						bfb: 0.25,
-					}],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数 
-				},
-			}
-		},
-		computed: {
-			...mapState({
-				langList: "langList",
-				lang: "lang",
-			}),
-			label() {
-				const label = this.langList.find((item) => {
-					console.log(this.lang, item.value);
-					return item.value == this.lang
-				}).label;
-				return label
-			}
-		},
-		methods: {
-			...mapActions({
-				setLang: "setLang",
-			}),
-			getCurrent() {
-				let pages = getCurrentPages();
-				let curPage = pages[pages.length - 1];
-				return curPage
-			},
-			selectLang(value) {
-				this.setLang(this.langList[value.detail.value].value);
-				let path = '/' + this.getCurrent().route
-			},
-
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let navItem = this.navList;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-				getCertList({
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let list = data.list.data;
-						navItem.orderList = navItem.orderList.concat(list);
-						navItem.page++;
-						if (navItem.limit == list.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-							if (navItem.orderList.length == 0) {
-								uni.showModal({
-									title: '提示',
-									content: '您未申请证书是否立即申请',
-									success: res => {
-										if (res.confirm) {
-											uni.navigateTo({
-												url: '/pages/certificate/apply'
-											})
-										}
-									},
-									fail: () => {},
-									complete: () => {}
-								});
-							}
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-		},
-	}
-</script>
-
-<style lang="scss">
-	.container {
-		width: 100%;
-		height: 1600rpx;
-		background-color: #000000;
-	}
-
-	.top {
-		font-family: PingFang SC;
-		font-weight: 500;
-		padding: 40rpx 30rpx 24rpx 30rpx;
-		line-height: 1;
-
-		.icon1 {
-			line-height: 0;
-
-			.img {
-				width: 47rpx;
-				height: 47rpx;
-			}
-
-			.tet {
-				font-size: 28rpx;
-				color: #C3A76C;
-			}
-		}
-
-		.icon2 {
-			background: #292C3D;
-			border: 2px solid #414243;
-			border-radius: 21rpx;
-		}
-
-		.langTip {
-			width: 34rpx;
-			height: 34rpx;
-		}
-
-		.langTipDom {
-			width: 23rpx;
-			height: 15rpx;
-		}
-
-		.text {
-			font-size: 24rpx;
-			color: #FFFFFF;
-			padding: 10rpx 20rpx;
-		}
-
-		.text1 {
-			font-size: 24rpx;
-			color: #FFFFFF;
-		}
-	}
-
-	.uni-margin-wrap {
-		height: 394rpx;
-
-		.swiper {
-			height: 100%;
-
-			.swiper-box {
-				height: 100%;
-				text-align: center;
-
-				.swiper-item {
-					width: 100%;
-					height: 100%;
-				}
-			}
-		}
-	}
-
-	.tra {
-		height: 93rpx;
-		background: #2B2A26;
-		padding: 0 30rpx;
-		font-size: 24rpx;
-		color: #999999;
-
-		.tra-item {
-			width: 33.3%;
-		}
-
-		.tra-item:nth-child(2) {
-			text-align: center;
-		}
-
-		.tra-item:nth-child(3) {
-			text-align: right;
-		}
-	}
-
-	.list {
-		font-weight: bold;
-		font-size: 30rpx;
-		color: #FFFFFF;
-		padding: 20rpx 30rpx 20rpx 30rpx;
-		line-height: 1;
-		border-bottom: 1px solid #2B2A26;
-
-		.list-item:nth-child(2) {
-			text-align: center;
-		}
-
-		.list-item:nth-child(3) {
-			text-align: right;
-		}
-
-		.list-item {
-			width: 33.3%;
-
-			.img {
-				width: 60rpx;
-				height: 60rpx;
-			}
-
-			.button {
-				padding: 10rpx 20rpx;
-				border-radius: 10rpx;
-				min-width: 150rpx;
-				text-align: center;
-				display: inline-block;
-
-				&.up {
-					background: #FB5E57;
-				}
-
-				&.dom {
-					background: #77DA90;
-				}
-			}
-		}
-	}
-</style>

+ 0 - 258
pages/index/pledge - 副本.vue

@@ -1,258 +0,0 @@
-<template>
-	<view class="all">
-		<view class="top">
-			<text>互娛共享</text>
-		</view>
-		<image class="img" src="../../static/img/zhiya2.png" mode="scaleToFill" style=""></image>
-		<view @click="navigator" class="my flex">
-			<view class="flex">
-				<image class="titleTip margin-r-10" src="../../static/img/zhiya3.png" mode=""></image>
-				<view>我的質押</view>
-			</view>
-			<image class="right" src="../../static/img/zhiya1.png" style="" mode=""></image>
-		</view>
-		<view class="buttom flex" v-for="item in navList.orderList">
-			<view class="le" @click="nav">
-				<view class="le1 title ">
-					質押投資一
-				</view>
-				<view class="le1 ">
-					20U起投 | 1天
-				</view>
-				<view class="le1 ">
-					總額:1234534.3456U
-				</view>
-				<view class="le2 flex font-color-gray">
-					<view class="line margin-r-10">
-						<view class="line-action" :style="{'margin-left': (-100+42.94)+'%'}">
-						</view>
-					</view>
-					<view>42.94%</view>
-				</view>
-			</view>
-			<view class="ri">
-				<view class="r1 margin-b-20"> 1.00% </view>
-				<view class="r2 margin-b-30 font-color-gray"> 日均收益率 </view>
-				<view class="add-buttom">
-					立即加入
-				</view>
-			</view>
-		</view>
-		<taber tab='pledge'></taber>
-	</view>
-</template>
-
-<script>
-	import taber from "@/components/footer/footer.vue";
-	export default {
-		components: {
-			taber
-		},
-		data() {
-			return {
-				navList: {
-					loadingType: 'more',
-					orderList: [{
-						type: 'TRX',
-						img: '../../static/shouye/shouye5.png',
-						money: 2222,
-						fl: 1,
-						bfb: 0.25,
-					}, {
-						type: 'TRX',
-						img: '../../static/shouye/shouye6.png',
-						money: 2222,
-						fl: 0,
-						bfb: 9.25,
-					}, {
-						type: 'TRX',
-						img: '../../static/shouye/shouye7.png',
-						money: 2222,
-						fl: 1,
-						bfb: 0.25,
-					}, {
-						type: 'TRX',
-						img: '../../static/shouye/shouye8.png',
-						money: 2222,
-						fl: 1,
-						bfb: 0.25,
-					}, {
-						type: 'TRX',
-						img: '../../static/shouye/shouye9.png',
-						money: 2222,
-						fl: 0,
-						bfb: 0.25,
-					}],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-			};
-		},
-		methods: {
-			navigator() {
-				uni.navigateTo({
-					url: '/pages/myPledge/myPledge'
-				})
-			},
-			nav() {
-				uni.navigateTo({
-					url: '/pages/zyXingqing/zyXingqing'
-				})
-			},
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let navItem = this.navList;
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-				getCertList({
-						page: navItem.page,
-						limit: navItem.limit
-					})
-					.then(({
-						data
-					}) => {
-						let list = data.list.data;
-						navItem.orderList = navItem.orderList.concat(list);
-						navItem.page++;
-						if (navItem.limit == list.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'noMore';
-							if (navItem.orderList.length == 0) {
-								uni.showModal({
-									title: '提示',
-									content: '您未申请证书是否立即申请',
-									success: res => {
-										if (res.confirm) {
-											uni.navigateTo({
-												url: '/pages/certificate/apply'
-											})
-										}
-									},
-									fail: () => {},
-									complete: () => {}
-								});
-							}
-						}
-						uni.hideLoading();
-						this.$set(navItem, 'loaded', true);
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-		}
-	};
-</script>
-
-<style lang="scss">
-	.all {
-		width: 750rpx;
-		height: 100%;
-		background-color: #000000;
-	}
-
-	.top {
-		padding-top: 40rpx;
-		font-size: 36rpx;
-		font-weight: bold;
-		color: #ffffff;
-		text-align: center;
-	}
-
-	.img {
-		width: 690rpx;
-		height: 250rpx;
-		margin: 20rpx 30rpx;
-	}
-
-	.my {
-		background-color: #191a1f;
-		margin: 0 30rpx;
-		display: flex;
-		color: #FFF;
-		padding: 20rpx 30rpx;
-		border-radius: 18rpx;
-
-		.titleTip {
-			width: 40rpx;
-			height: 40rpx;
-		}
-
-		.right {
-			width: 16rpx;
-			height: 26rpx;
-		}
-	}
-
-	.buttom {
-		background-color: #191a1f;
-		border-radius: 18rpx;
-		margin: 30rpx;
-		padding: 30rpx;
-		line-height: 1;
-
-		.le {
-			font-size: 20rpx;
-
-			.le1 {
-				font-weight: 800;
-				color: #feb041;
-				margin-bottom: 20rpx;
-
-				&.title {
-					font-size: 33rpx;
-					color: #ffffff;
-				}
-			}
-
-			.le2 {
-				.line {
-					width: 308rpx;
-					height: 16rpx;
-					background-color: rgba(235, 235, 235, 0.38);
-					border-radius: 99rpx;
-					overflow: hidden;
-					.line-action{
-						height: 100%;
-						width: 100%;
-						border-radius: 99rpx;
-						background-color:#FEB041 ;
-					}
-				}
-			}
-		}
-
-		.r1 {
-			font-size: 47rpx;
-			font-weight: 800;
-			color: #FF0102;
-		}
-
-		.r2 {
-			font-size: 21rpx;
-			font-weight: 500;
-			color: #999999;
-		}
-
-		.add-buttom {
-			background: #feb041;
-			border-radius: 6rpx;
-			font-size: 21rpx;
-			font-weight: 800;
-			color: #191a1f;
-			padding:10rpx 20rpx ;
-		}
-	}
-</style>

+ 0 - 399
pages/index/user - 副本.vue

@@ -1,399 +0,0 @@
-<template>
-	<view class="container">
-		<view class="top">
-			<view class="my">我的</view>
-			<view class="userinfo flex">
-				<view class="flex">
-					<image class="image margin-r-10" src="../../static/error/missing-face.png" mode="scaleToFill">
-					</image>
-					<view class="info">
-						<view class="infor margin-b-20">v790d7v...v469874561</view>
-						<image class="in" src="../../static/shouye/huiyuan.png" mode="scaleToFill"></image>
-					</view>
-				</view>
-				<image @click="showY" class="inf" src="../../static/shouye/userinfo.png" mode="scaleToFill"></image>
-			</view>
-		</view>
-		<!-- 余额 -->
-		<view class="body">
-			<view v-if="show" class="yue">
-				<view class="te">
-					餘額
-				</view>
-				<view class="tex">
-					12356.00
-				</view>
-				<view class="btn flex">
-					<button class="btn1" @click="navigator"> <text>充值</text> </button>
-					<button class="btn1" @click="navigatorT"> <text>提現</text> </button>
-				</view>
-			</view>
-
-			<view v-else class="yue1">
-				<view class="tj">統計表</view>
-				<view class="tj-item flex ">
-					<view class="lj">累計充值</view>
-					<view class="ljsu">0.000</view>
-				</view>
-				<view class="tj-item flex">
-					<view class="lj">累計提現</view>
-					<view class="ljsu">0.000</view>
-				</view>
-				<view class="tj-item flex">
-					<view class="lj">累計收益</view>
-					<view class="ljsu">0.000</view>
-				</view>
-				<view class="tj-item flex">
-					<view class="lj">個人交易總量</view>
-					<view class="ljsu">0.000</view>
-				</view>
-				<view class="tj-item flex">
-					<view class="lj">團隊交易總量</view>
-					<view class="ljsu">0.000</view>
-				</view>
-			</view>
-
-			<!-- 列表 -->
-			<view class="gj">
-				我的工具
-			</view>
-
-			<view class="user-list flex" @click="navTo('/pages/user/team')">
-				<image src="../../static/shouye/yue.png" mode="scaleToFill" class="left-img"></image>
-				<view class="item-name">
-					餘額明細
-				</view>
-				<image src="../../static/icon/back.png" mode="scaleToFill" class="right-img"></image>
-			</view>
-			<!-- 额外添加 -->
-			<view class="user-list flex" @click="navTo('/pages/user/shareQrCode')">
-				<image src="../../static/shouye/money.png" mode="scaleToFill" class="left-img"></image>
-				<view class="item-name">
-					互娛記錄
-				</view>
-				<image src="../../static/icon/back.png" mode="scaleToFill" class="right-img"></image>
-			</view>
-			<!-- 额外添加 -->
-			<view class="user-list flex" @click="navTo('/pages/tabulation/tabulation')">
-				<image src="../../static/shouye/liebiao.png" mode="scaleToFill" class="left-img"></image>
-				<view class="item-name">
-					會員列表
-				</view>
-				<image src="../../static/icon/back.png" mode="scaleToFill" class="right-img"></image>
-			</view>
-			<view class="user-list flex" @click="navTo('/pages/user/favorites')">
-				<image src="../../static/shouye/liebiao.png" mode="scaleToFill" class="left-img"></image>
-				<view class="item-name">
-					分享鏈接
-				</view>
-				<image src="../../static/icon/back.png" mode="scaleToFill" class="right-img"></image>
-			</view>
-			<view class="user-list flex" @click="openKf()">
-				<image src="../../static/shouye/liuyan.png" mode="scaleToFill" class="left-img"></image>
-				<view class="item-name">
-					在線留言
-				</view>
-				<image src="../../static/icon/back.png" mode="scaleToFill" class="right-img"></image>
-			</view>
-			<view class="user-list flex" @click="navTo('/pages/transaction/transaction')">
-				<image src="../../static/shouye/jiaoyi.png" mode="scaleToFill" class="left-img"></image>
-				<view class="item-name">
-					交易密碼
-				</view>
-				<image src="../../static/icon/back.png" mode="scaleToFill" class="right-img"></image>
-			</view>
-			<view class="user-list flex" @click="navTo('/pages/public/login')">
-				<image src="../../static/shouye/tuichu.png" mode="scaleToFill" class="left-img"></image>
-				<view class="item-name">
-					退出登錄
-				</view>
-				<image src="../../static/icon/back.png" mode="scaleToFill" class="right-img"></image>
-			</view>
-		</view>
-		<taber tab='user'></taber>
-	</view>
-</template>
-<script>
-	import taber from "@/components/footer/footer.vue";
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	import uniList from '@/components/uni-list/uni-list.vue';
-	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-	import {
-		orderData,
-		getUserInfo,
-		// check,
-		// getLevelList
-	} from '@/api/user.js';
-	import {
-		saveUrl,
-		interceptor
-	} from '@/utils/loginUtils.js';
-	let startY = 0,
-		moveY = 0,
-		pageAtTop = true;
-	export default {
-
-		components: {
-			// uniList,
-			// uniListItem,
-			taber
-		},
-		data() {
-			return {
-				current: 2,
-				store_name: '',
-				achievement: '',
-				code: '',
-				levelList: [],
-				show: true
-			};
-		},
-		onShow() {
-			// 判断是否已经登录
-			// if (this.hasLogin) {
-			// 	this.loadBaseData();
-			// }
-			this.loadBaseData();
-		},
-		filters: {
-			phone(e) {
-				var subStr1 = e.substr(0, 3);
-				var subStr2 = e.substr(e.length - 4, 4);
-				var subStr = subStr1 + '...' + subStr2;
-				e = subStr;
-				return e;
-			}
-		},
-		onReady() {
-			// 初始化获取页面宽度
-			uni.createSelectorQuery()
-				.select('.container')
-				.fields({
-						size: true
-					},
-					data => {
-						// 计算最多下拉的高度
-						this.userDowm = Math.floor((data.width / 750) * 185);
-						// 计算最大触发修改高度事件
-						this.userMaxDowm = Math.floor((data.width / 750) * 250);
-					}
-				)
-				.exec();
-		},
-		computed: {
-			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-		},
-		methods: {
-			showY() {
-				this.show = !this.show
-			},
-			navigatorT() {
-				uni.navigateTo({
-					url: '/pages/withdrawal/withdrawal'
-				})
-			},
-			navigator() {
-				uni.navigateTo({
-					url: '/pages/recharge/recharge'
-				})
-			},
-
-			// 加载初始数据
-			loadBaseData() {
-				const obj = this
-				getUserInfo({})
-					.then(({
-						data
-					}) => {
-						obj.setUserInfo(data);
-
-					})
-					.catch(e => {
-						console.log(e);
-					});
-
-			},
-			/**
-			 * 统一跳转接口,拦截未登录路由
-			 * navigator标签现在默认没有转场动画,所以用view
-			 */
-			navTo(url) {
-				console.log(url);
-				if (!this.hasLogin) {
-					// 保存地址
-					saveUrl();
-					// 登录拦截
-					interceptor();
-				} else {
-					uni.navigateTo({
-						url
-					});
-				}
-			},
-			close() {
-				this.$refs.popuphx.close();
-				this.code = '';
-			},
-
-			// 打开绑定
-			open() {
-				this.$refs.gspass.open();
-			},
-			cast() {
-				set_waiter({
-						uid: this.id
-					})
-					.then(e => {
-						this.$api.msg('绑定成功');
-						this.$refs.gspass.close();
-						this.id = '';
-					})
-					.catch(err => {
-						this.$refs.gspass.close();
-						this.id = '';
-					});
-			},
-			// cancelpass() {
-			// 	this.$refs.gspass.close();
-			// 	this.id = '';
-			// }
-		}
-	};
-</script>
-<style lang="scss">
-	.container {
-		height: 100%;
-		line-height: 1;
-	}
-
-	.top {
-		height: 327rpx;
-		background-color: #000000;
-		padding: 0 45rpx;
-
-		.my {
-			padding-top: 40rpx;
-			font-size: 48rpx;
-			font-weight: 500;
-			color: #FFFFFF;
-		}
-
-		.userinfo {
-			padding-top: 40rpx;
-
-			.image {
-				width: 125rpx;
-				height: 125rpx;
-			}
-
-			.info {
-				.infor {
-					font-size: 30rpx;
-					font-weight: 500;
-					color: #FFFFFF;
-				}
-			}
-		}
-	}
-
-	.in {
-		width: 128rpx;
-		height: 45rpx;
-	}
-
-	.inf {
-		margin-top: 25rpx;
-		width: 48rpx;
-		height: 48rpx;
-	}
-
-	//  body
-	.body {
-		background-color: #191a1f;
-		padding: 30rpx;
-		border-top-right-radius: 60rpx;
-		border-top-left-radius: 60rpx;
-		color: #FFFFFF;
-		.yue {
-			border-radius: 60rpx;
-			background-color: #000000;
-			text-align: center;
-			padding-top: 40rpx;
-			padding-bottom: 35rpx;
-			.te {
-				font-size: 26rpx;
-				font-weight: 500;
-				padding-bottom: 30rpx;
-			}
-			
-			.tex {
-				font-size: 48rpx;
-				font-weight: bold;
-				padding-bottom: 50rpx;
-			}
-			
-			.btn1 {
-				min-width: 270rpx;
-				background: #FDB242;
-				border-radius: 10rpx;
-				font-size: $font-base;
-			}
-		}
-		
-		.yue1 {
-			background-color: #000000;
-			padding: 30rpx;
-			color: #FFFFFF;
-			border-radius: 60rpx;
-			.tj {
-				font-size: 30rpx;
-				font-weight: bold;
-				text-align: center;
-			}
-			.tj-item{
-				padding-top: 26rpx;
-				font-size: 24rpx;
-				opacity: 0.65;
-			}
-		}
-	}
-
-	.gj {
-		margin-top: 50rpx;
-		margin-left: 20rpx;
-		font-size: 36rpx;
-		font-weight: bold;
-		color: #FFFFFF;
-		padding-bottom: 10rpx;
-	}
-
-	.user-list {
-		background: #191a1f;
-		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
-		margin: 0 auto;
-		padding: 30rpx 25rpx;
-		border-bottom: 1px solid rgba(240, 240, 240, 0.2);
-		
-		.left-img {
-			width: 40rpx;
-			height: 40rpx;
-			margin-right: 20rpx;
-		}
-
-		.item-name {
-			flex-grow: 1;
-			font-size: 29rpx;
-			font-weight: bold;
-			color: #FFF;
-		}
-
-		.right-img {
-			width: 18rpx;
-			height: 27rpx;
-		}
-	}
-
-</style>

+ 3 - 3
uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.scss

@@ -1,7 +1,7 @@
 .page-total{
-	position: fixed;
-	left: 0;
-	bottom: 0;
+	// position: fixed;
+	// left: 0;
+	// bottom: 0;
 	width: 100%;
 	background-color: #f6f6f6;
 	z-index: 99;

+ 3 - 3
uni_modules/cc-defineKeyboard/components/cc-defineKeyboard/cc-defineKeyboard.vue

@@ -15,7 +15,7 @@
 	export default {
 		data() {
 			return {
-				isShow: false,
+				isShow: true,
 				keyList: [
 					{
 						key: 1,
@@ -54,7 +54,7 @@
 						en: 'ABC',
 						keyCode: 57,
 					},{
-						key: '.',
+						key: '关闭',
 						en: 'ABC',
 						keyCode: 190,
 					},{
@@ -62,7 +62,7 @@
 						en: 'ABC',
 						keyCode: 48,
 					},{
-						key: 'del',
+						key: 'X',
 						en: 'DEL',
 						keyCode: 8,
 					},

+ 13 - 0
uni_modules/uni-drawer/changelog.md

@@ -0,0 +1,13 @@
+## 1.2.1(2021-11-22)
+- 修复 vue3中个别scss变量无法找到的问题
+## 1.2.0(2021-11-19)
+- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-drawer](https://uniapp.dcloud.io/component/uniui/uni-drawer)
+## 1.1.1(2021-07-30)
+- 优化 vue3下事件警告的问题
+## 1.1.0(2021-07-13)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.0.7(2021-05-12)
+- 新增 组件示例地址
+## 1.0.6(2021-02-04)
+- 调整为uni_modules目录规范

+ 45 - 0
uni_modules/uni-drawer/components/uni-drawer/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

+ 183 - 0
uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue

@@ -0,0 +1,183 @@
+<template>
+	<view v-if="visibleSync" :class="{ 'uni-drawer--visible': showDrawer }" class="uni-drawer" @touchmove.stop.prevent="clear">
+		<view class="uni-drawer__mask" :class="{ 'uni-drawer__mask--visible': showDrawer && mask }" @tap="close('mask')" />
+		<view class="uni-drawer__content" :class="{'uni-drawer--right': rightMode,'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer}" :style="{width:drawerWidth+'px'}">
+			<slot />
+		</view>
+		<!-- #ifdef H5 -->
+		<keypress @esc="close('mask')" />
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	// #ifdef H5
+	import keypress from './keypress.js'
+	// #endif
+	/**
+	 * Drawer 抽屉
+	 * @description 抽屉侧滑菜单
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=26
+	 * @property {Boolean} mask = [true | false] 是否显示遮罩
+	 * @property {Boolean} maskClick = [true | false] 点击遮罩是否关闭
+	 * @property {Boolean} mode = [left | right] Drawer 滑出位置
+	 * 	@value left 从左侧滑出
+	 * 	@value right 从右侧侧滑出
+	 * @property {Number} width 抽屉的宽度 ,仅 vue 页面生效
+	 * @event {Function} close 组件关闭时触发事件
+	 */
+	export default {
+		name: 'UniDrawer',
+		components: {
+			// #ifdef H5
+			keypress
+			// #endif
+		},
+		emits:['change'],
+		props: {
+			/**
+			 * 显示模式(左、右),只在初始化生效
+			 */
+			mode: {
+				type: String,
+				default: ''
+			},
+			/**
+			 * 蒙层显示状态
+			 */
+			mask: {
+				type: Boolean,
+				default: true
+			},
+			/**
+			 * 遮罩是否可点击关闭
+			 */
+			maskClick:{
+				type: Boolean,
+				default: true
+			},
+			/**
+			 * 抽屉宽度
+			 */
+			width: {
+				type: Number,
+				default: 220
+			}
+		},
+		data() {
+			return {
+				visibleSync: false,
+				showDrawer: false,
+				rightMode: false,
+				watchTimer: null,
+				drawerWidth: 220
+			}
+		},
+		created() {
+			// #ifndef APP-NVUE
+			this.drawerWidth = this.width
+			// #endif
+			this.rightMode = this.mode === 'right'
+		},
+		methods: {
+			clear(){},
+			close(type) {
+				// fixed by mehaotian 抽屉尚未完全关闭或遮罩禁止点击时不触发以下逻辑
+				if((type === 'mask' && !this.maskClick) || !this.visibleSync) return
+				this._change('showDrawer', 'visibleSync', false)
+			},
+			open() {
+				// fixed by mehaotian 处理重复点击打开的事件
+				if(this.visibleSync) return
+				this._change('visibleSync', 'showDrawer', true)
+			},
+			_change(param1, param2, status) {
+				this[param1] = status
+				if (this.watchTimer) {
+					clearTimeout(this.watchTimer)
+				}
+				this.watchTimer = setTimeout(() => {
+					this[param2] = status
+					this.$emit('change',status)
+				}, status ? 50 : 300)
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	$uni-mask: rgba($color: #000000, $alpha: 0.4) ;
+	// 抽屉宽度
+	$drawer-width: 220px;
+
+	.uni-drawer {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		overflow: hidden;
+		z-index: 999;
+	}
+
+	.uni-drawer__content {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		position: absolute;
+		top: 0;
+		width: $drawer-width;
+		bottom: 0;
+		background-color: $uni-bg-color;
+		transition: transform 0.3s ease;
+	}
+
+	.uni-drawer--left {
+		left: 0;
+		/* #ifdef APP-NVUE */
+		transform: translateX(-$drawer-width);
+		/* #endif */
+		/* #ifndef APP-NVUE */
+		transform: translateX(-100%);
+		/* #endif */
+	}
+
+	.uni-drawer--right {
+		right: 0;
+		/* #ifdef APP-NVUE */
+		transform: translateX($drawer-width);
+		/* #endif */
+		/* #ifndef APP-NVUE */
+		transform: translateX(100%);
+		/* #endif */
+	}
+
+	.uni-drawer__content--visible {
+		transform: translateX(0px);
+	}
+
+
+	.uni-drawer__mask {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		opacity: 0;
+		position: absolute;
+		top: 0;
+		left: 0;
+		bottom: 0;
+		right: 0;
+		background-color: $uni-mask;
+		transition: opacity 0.3s;
+	}
+
+	.uni-drawer__mask--visible {
+		/* #ifndef APP-NVUE */
+		display: block;
+		/* #endif */
+		opacity: 1;
+	}
+</style>

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

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

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

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

+ 4 - 2
utils/request.js

@@ -1,5 +1,6 @@
 import service from './newRequest.js'
 import store from '../store';
+
 import {
 	saveUrl,
 	interceptor
@@ -8,6 +9,7 @@ import {
 service.interceptors.response(
 	response => {
 		try {
+			const lang = getApp();
 			let res = response.data;
 			// 解析字符串为数字
 			if (res.status !== 200) {
@@ -17,8 +19,8 @@ service.interceptors.response(
 					store.commit('user/logout');
 					// 判断是否开启强制登录
 					uni.showModal({
-						title: "登陆",
-						content: '您未登录!是否马上登录?',
+						title: lang.$t('enter.c4'),
+						content: lang.$t('enter.b5'),
 						success: (e) => {
 							// 判断是否点击确认按钮
 							if (e.confirm) {