zhang 1 year ago
parent
commit
bca8030474

+ 237 - 237
App.vue

@@ -1,265 +1,265 @@
 <script>
-/**
- * vuex管理登陆状态,具体可以参考官方登陆模板示例
- */
-import { mapMutations } from 'vuex';
-// #ifdef H5
-import { weixindata, setRouter } from './utils/wxAuthorized';
-// #endif
-// #ifdef APP-PLUS
-import { getUpApp } from './utils/upApp.js';
-// #endif
-export default {
-	data() {
-		return {
-			/* 保存微信信息 */
-			appData: {}
-		};
-	},
-	methods: {
-		...mapMutations('user', ['setUserInfo', 'login', 'hasLogin'])
-	},
-	onLaunch: function(urlObj) {
-		let obj = this;
-		// 加载缓存中的用户信息
-		let userInfo = uni.getStorageSync('userInfo') || '';
-		// 判断是否拥有用户信息
-		if (userInfo.uid) {
-			//更新登陆状态
-			uni.getStorage({
-				key: 'userInfo',
-				success: res => {
-					obj.setUserInfo(res.data);
-					obj.login(res.data);
-				}
-			});
-		}
-		// #ifdef H5
-		// 保存路由对象
-		setRouter(this.$router);
-		//判断是否已经缓存浏览器
-		let bool = uni.getStorageSync('weichatBrowser') || '';
-		if (bool === '') {
-			//判断是否为微信浏览
-			bool = navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger';
-			// 保存当前是否为微信内核浏览器
-			uni.setStorageSync('weichatBrowser', bool);
-		}
-		if (bool) {
-			// 加载微信信息
-			weixindata();
-		}
-		// #endif
-		// #ifdef APP-PLUS
-		// 判断是否升级
-		getUpApp();
-		// 获取当前运行系统
-		let system = uni.getStorageSync('platform') || '';
-		if (!system) {
-			uni.setStorage({
-				key: 'platform',
-				data: uni.getSystemInfoSync().platform
-			});
-		}
-		// #endif
-	},
-	onShow: function() {
-		// 加载拦截
-		// console.log('App Show');
-	},
-	onHide: function() {
-		// console.log('App Hide');
-	}
-};
+	/**
+	 * vuex管理登陆状态,具体可以参考官方登陆模板示例
+	 */
+	import { mapMutations } from "vuex";
+	// #ifdef H5
+	import { weixindata, setRouter } from "./utils/wxAuthorized";
+	// #endif
+	// #ifdef APP-PLUS
+	import { getUpApp } from "./utils/upApp.js";
+	// #endif
+	export default {
+		data() {
+			return {
+				/* 保存微信信息 */
+				appData: {},
+			};
+		},
+		methods: {
+			...mapMutations("user", ["setUserInfo", "login", "hasLogin"]),
+		},
+		onLaunch: function (urlObj) {
+			let obj = this;
+			// 加载缓存中的用户信息
+			let userInfo = uni.getStorageSync("userInfo") || "";
+			// 判断是否拥有用户信息
+			if (userInfo.uid) {
+				//更新登陆状态
+				uni.getStorage({
+					key: "userInfo",
+					success: res => {
+						obj.setUserInfo(res.data);
+						obj.login(res.data);
+					},
+				});
+			}
+			// #ifdef H5
+			// 保存路由对象
+			setRouter(this.$router);
+			//判断是否已经缓存浏览器
+			let bool = uni.getStorageSync("weichatBrowser") || "";
+			if (bool === "") {
+				//判断是否为微信浏览
+				bool =
+					navigator.userAgent
+						.toLowerCase()
+						.match(/MicroMessenger/i) == "micromessenger";
+				// 保存当前是否为微信内核浏览器
+				uni.setStorageSync("weichatBrowser", bool);
+			}
+			if (bool) {
+				// 加载微信信息
+				weixindata();
+			}
+			// #endif
+			// #ifdef APP-PLUS
+			// 判断是否升级
+			getUpApp();
+			// 获取当前运行系统
+			let system = uni.getStorageSync("platform") || "";
+			if (!system) {
+				uni.setStorage({
+					key: "platform",
+					data: uni.getSystemInfoSync().platform,
+				});
+			}
+			// #endif
+		},
+		onShow: function () {
+			// 加载拦截
+			// console.log('App Show');
+		},
+		onHide: function () {
+			// console.log('App Hide');
+		},
+	};
 </script>
 
 <style lang="scss">
-/*全局公共样式和字体图标*/
-@import '/static/css/cmy.css';
-view,
-scroll-view,
-swiper,
-swiper-item,
-cover-view,
-cover-image,
-icon,
-text,
-rich-text,
-progress,
-button,
-checkbox,
-form,
-input,
-label,
-radio,
-slider,
-switch,
-textarea,
-navigator,
-audio,
-camera,
-image,
-video {
-	box-sizing: border-box;
-}
-/* 骨架屏替代方案 */
-.Skeleton {
-	background: #f3f3f3;
-	padding: 20rpx 0;
-	border-radius: 8rpx;
-}
+	/*全局公共样式和字体图标*/
+	@import "/static/css/cmy.css";
+	view,
+	scroll-view,
+	swiper,
+	swiper-item,
+	cover-view,
+	cover-image,
+	icon,
+	text,
+	rich-text,
+	progress,
+	button,
+	checkbox,
+	form,
+	input,
+	label,
+	radio,
+	slider,
+	switch,
+	textarea,
+	navigator,
+	audio,
+	camera,
+	image,
+	video {
+		box-sizing: border-box;
+	}
+	/* 骨架屏替代方案 */
+	.Skeleton {
+		background: #f3f3f3;
+		padding: 20rpx 0;
+		border-radius: 8rpx;
+	}
 
-/* 图片载入替代方案 */
-.image-wrapper {
-	font-size: 0;
-	background: #f3f3f3;
-	border-radius: 4px;
-	image {
-		width: 100%;
-		height: 100%;
-		transition: 0.6s;
-		opacity: 0;
-		&.loaded {
-			opacity: 1;
+	/* 图片载入替代方案 */
+	.image-wrapper {
+		font-size: 0;
+		background: #f3f3f3;
+		border-radius: 4px;
+		image {
+			width: 100%;
+			height: 100%;
+			transition: 0.6s;
+			opacity: 0;
+			&.loaded {
+				opacity: 1;
+			}
 		}
 	}
-}
-
-// 设置富文本中图片最大宽度
-uni-rich-text img {
-	max-width: 100% !important;
-}
-/*边框*/
-.b-b:after,
-.b-t:after {
-	position: absolute;
-	z-index: 3;
-	left: 0;
-	right: 0;
-	height: 0;
-	content: '';
-	transform: scaleY(0.5);
-	border-bottom: 1px solid $border-color-base;
-}
-
-.b-b:after {
-	bottom: 0;
-}
 
-.b-t:after {
-	top: 0;
-}
-
-/* button样式改写 */
-uni-button,
-button {
-	height: 80rpx;
-	line-height: 80rpx;
-	font-size: $font-lg + 2rpx;
-	font-weight: normal;
+	// 设置富文本中图片最大宽度
+	uni-rich-text img {
+		max-width: 100% !important;
+	}
+	/*边框*/
+	.b-b:after,
+	.b-t:after {
+		position: absolute;
+		z-index: 3;
+		left: 0;
+		right: 0;
+		height: 0;
+		content: "";
+		transform: scaleY(0.5);
+		border-bottom: 1px solid $border-color-base;
+	}
 
-	&.no-border:before,
-	&.no-border:after {
-		border: 0;
+	.b-b:after {
+		bottom: 0;
 	}
-}
 
-uni-button[type='default'],
-button[type='default'] {
-	color: $font-color-dark;
-}
+	.b-t:after {
+		top: 0;
+	}
 
-/* input 样式 */
-.input-placeholder {
-	color: #999999;
-}
+	/* button样式改写 */
+	uni-button,
+	button {
+		height: 80rpx;
+		line-height: 80rpx;
+		font-size: $font-lg + 2rpx;
+		font-weight: normal;
 
-.placeholder {
-	color: #999999;
-}
-// 边距样式
-@for $i from 1 to 4 {
-	.margin-l-#{$i * 10} {
-		margin-left: $i * 10rpx !important;
-	}
-	.margin-r-#{$i * 10} {
-		margin-right: $i * 10rpx !important;
-	}
-	.margin-t-#{$i * 10} {
-		margin-top: $i * 10rpx !important;
+		&.no-border:before,
+		&.no-border:after {
+			border: 0;
+		}
 	}
-	.margin-b-#{$i * 10} {
-		margin-bottom: $i * 10rpx !important;
+
+	uni-button[type="default"],
+	button[type="default"] {
+		color: $font-color-dark;
 	}
-	.margin-#{$i * 10} {
-		margin: $i * 10rpx !important;
+
+	/* input 样式 */
+	.input-placeholder {
+		color: #999999;
 	}
-	.margin-v-#{$i * 10} {
-		margin-top: $i * 10rpx !important;
-		margin-bottom: $i * 10rpx !important;
+
+	.placeholder {
+		color: #999999;
 	}
-	.margin-c-#{$i * 10} {
-		margin-left: $i * 10rpx !important;
-		margin-right: $i * 10rpx !important;
+	// 边距样式
+	@for $i from 1 to 4 {
+		.margin-l-#{$i * 10} {
+			margin-left: $i * 10rpx !important;
+		}
+		.margin-r-#{$i * 10} {
+			margin-right: $i * 10rpx !important;
+		}
+		.margin-t-#{$i * 10} {
+			margin-top: $i * 10rpx !important;
+		}
+		.margin-b-#{$i * 10} {
+			margin-bottom: $i * 10rpx !important;
+		}
+		.margin-#{$i * 10} {
+			margin: $i * 10rpx !important;
+		}
+		.margin-v-#{$i * 10} {
+			margin-top: $i * 10rpx !important;
+			margin-bottom: $i * 10rpx !important;
+		}
+		.margin-c-#{$i * 10} {
+			margin-left: $i * 10rpx !important;
+			margin-right: $i * 10rpx !important;
+		}
+		.padding-l-#{$i * 10} {
+			padding-left: $i * 10rpx !important;
+		}
+		.padding-r-#{$i * 10} {
+			padding-right: $i * 10rpx !important;
+		}
+		.padding-t-#{$i * 10} {
+			padding-top: $i * 10rpx !important;
+		}
+		.padding-b-#{$i * 10} {
+			padding-bottom: $i * 10rpx !important;
+		}
+		.padding-#{$i * 10} {
+			padding: $i * 10rpx !important;
+		}
+		.padding-v-#{$i * 10} {
+			padding-top: $i * 10rpx !important;
+			padding-bottom: $i * 10rpx !important;
+		}
+		.padding-c-#{$i * 10} {
+			padding-left: $i * 10rpx !important;
+			padding-right: $i * 10rpx !important;
+		}
 	}
-	.padding-l-#{$i * 10} {
-		padding-left: $i * 10rpx !important;
+	// 字体大小
+	.font-size-sm {
+		font-size: $font-sm;
 	}
-	.padding-r-#{$i * 10} {
-		padding-right: $i * 10rpx !important;
+	.font-size-base {
+		font-size: $font-base;
 	}
-	.padding-t-#{$i * 10} {
-		padding-top: $i * 10rpx !important;
+	.font-size-lg {
+		font-size: $font-lg;
 	}
-	.padding-b-#{$i * 10} {
-		padding-bottom: $i * 10rpx !important;
+	// 字体颜色
+	.font-color-yellow {
+		color: $color-yellow;
 	}
-	.padding-#{$i * 10} {
-		padding: $i * 10rpx !important;
+	.font-color-gray {
+		color: $color-gray;
 	}
-	.padding-v-#{$i * 10} {
-		padding-top: $i * 10rpx !important;
-		padding-bottom: $i * 10rpx !important;
+	.font-color-red {
+		color: $color-red;
 	}
-	.padding-c-#{$i * 10} {
-		padding-left: $i * 10rpx !important;
-		padding-right: $i * 10rpx !important;
+	// 边框颜色
+	.border-color-yellow {
+		border: 1rpx solid $color-yellow;
 	}
-}
-// 字体大小
-.font-size-sm {
-	font-size: $font-sm;
-}
-.font-size-base {
-	font-size: $font-base;
-}
-.font-size-lg {
-	font-size: $font-lg;
-}
-// 字体颜色
-.font-color-yellow {
-	color: $color-yellow;
-}
-.font-color-gray {
-	color: $color-gray;
-}
-.font-color-red {
-	color: $color-red;
-}
-// 边框颜色
-.border-color-yellow {
-	border: 1rpx solid $color-yellow;
-}
 
-// 修改默认背景颜色
-uni-page-wrapper {
-	background-color: $page-color-base;
-}
-page {
-	background-color: $page-color-base;
-	// 设置默认字体
-	font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif, Droid Sans Fallback;
-}
+	page {
+		background-color: $page-color-base;
+		// 设置默认字体
+		font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial,
+			sans-serif, Droid Sans Fallback;
+	}
 	/*边框*/
 	.b-b:after,
 	.b-t:after {
@@ -268,7 +268,7 @@ page {
 		left: 0;
 		right: 0;
 		height: 0;
-		content: '';
+		content: "";
 		transform: scaleY(0.5);
 		border-bottom: 1px solid $border-color-base;
 	}

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

@@ -190,6 +190,12 @@
 		"a5": "流水",
 		"a6": "如V1级別,流水5000U*24期=120000U的流水*0.1=120U流水的收益如V8级別,流水5000U*24期=120000U的流水*0.8=960U流水的收益自由场流水更大"
 	},
+	"set": {
+		"a1": "头像",
+		"a2": "昵称",
+		"a3":"账号",
+		"a4":"修改"
+	},
 	
 	"add": {
 		"kt": "Airdrop",
@@ -688,7 +694,8 @@
 		"c2": "请阅读并同意协议",
 		"c3": "请填写手机号",
 		"c4": "请填写邮箱号",
-		"c5": "注册成功"
+		"c5": "注册成功",
+		"c6": "验证码"
 	},
 	"safe": {
 		"a0": "解绑",

+ 10 - 2
libs/i18n/lang/en.json

@@ -190,6 +190,12 @@
 		"a5": "Flowing water",
 		"a6": "For example, at V1 level, the return on flow of 5000U * 24 periods=120000U flow * 0.1=120U flow, as at V8 level, the return on flow of 5000U * 24 periods=120000U flow * 0.8=960U flow is greater in the free field flow"
 	},
+	"set": {
+		"a1": "Avatar",
+		"a2": "Nickname",
+		"a3":"Login ID",
+		"a4":"Revise"
+	},
 	
 	"add": {
 		"kt": "Airdrop",
@@ -684,11 +690,13 @@
 		"b9": "Register",
 		"c0": "Already have a DWF’s account?",
 		"c1": "Login",
-		"c2": "Please read and agree to the agreement",
+		"c2": "Please read and agreeto the agreement",
 		"c3": "Please fill in the phone number",
 		"c4": "Please fill in the mailbox number",
-		"c5": "Registered successfully"
+		"c5": "Registered successfully",
+		"c6": "Code"
 	},
+	
 	"safe": {
 		"a0": "Remove",
 		"a1": "Bind",

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

@@ -190,6 +190,12 @@
 		"a5": "流水",
 		"a6": "如V1級別,流水5000U*24期=120000U的流水*0.1=120U流水的收益如V8級別,流水5000U*24期=120000U的流水*0.8=960U流水的收益自由場流水更大"
 	},
+	"set": {
+		"a1": "頭像",
+		"a2": "昵稱",
+		"a3":"賬號",
+		"a4":"修改"
+	},
 	"add": {
 		"ck": "存款",
 		"kt":"空投",
@@ -686,7 +692,8 @@
 		"c2": "請閱讀並同意協議",
 		"c3": "請填寫手機號",
 		"c4": "請填寫郵箱號",
-		"c5": "註冊成功"
+		"c5": "註冊成功",
+		"c6": "驗證碼"
 	},
 	"safe": {
 		"a0": "解綁",

+ 78 - 57
pages/history/history.vue

@@ -1,78 +1,99 @@
 <template>
 	<view class="all">
-		<view class="list" v-for="item in 25" :key="item">
+		<view
+			class="list"
+			v-for="item in 25"
+			:key="item">
 			<view class="le">
 				<view class="qs">第2022010223期</view>
 				<view class="dy">0.064489</view>
 			</view>
 			<view class="ri">
-				<view class="sx" style="margin-left: 380rpx;">{{$t('enter.u6')}}</view>
-				<view class="sx" style="margin-left: 30rpx;">{{$t('enter.u5')}}</view>
+				<view
+					class="sx"
+					style="margin-left: 380rpx"
+					>{{ $t("enter.u6") }}</view
+				>
+				<view
+					class="sx"
+					style="margin-left: 30rpx"
+					>{{ $t("enter.u5") }}</view
+				>
 			</view>
 			<view class="ri">
-				<view class="sx" style="margin-left: 380rpx;">{{$t('enter.u4')}}</view>
-				<view class="sx" style="margin-left: 30rpx;">{{$t('enter.u7')}}</view>
+				<view
+					class="sx"
+					style="margin-left: 380rpx"
+					>{{ $t("enter.u4") }}</view
+				>
+				<view
+					class="sx"
+					style="margin-left: 30rpx"
+					>{{ $t("enter.u7") }}</view
+				>
 			</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import { gameBetList } from "@/api/game.js";
+
 	export default {
 		data() {
-			return {
-				
-			};
-		}
-	}
+			return {}
+		},
+		onLoad() {},
+		methods: {},
+	};
 </script>
 
 <style lang="scss">
-.all {
-	width: 750rpx;
-	min-height: 100vh;
-	background-color: $page-color-base;
-}
-.list {
-	display: flex;
-	justify-content: start;
-	width: 750rpx;
-	height: 150rpx;
-}
-.qs {
-	height: 19rpx;
-	font-size: 20rpx;
-	font-weight: 500;
-	color: #FFFFFF;
-	margin-top: 27rpx;
-	margin-left: 30rpx;
-}
-.dy {
-	height: 35rpx;
-	font-size: 46rpx;
-	font-weight: bold;
-	color: #FDB242;
-	margin-top: 14rpx;
-	margin-left: 30rpx;
-} 
-.ri {
-	display: flex;
-	justify-content: start;
-	margin-left: -45rpx;
-}
-.sx {
-	height: 28rpx;
-	font-size: 30rpx;
-	font-weight: bold;
-	color: #DF5660;
-	margin-top: 50rpx;
-}
-.xian {
-	width: 696rpx;
-	height: 2rpx;
-	background: #F0F0F0;
-	opacity: 0.35;
-	margin-left: 30rpx;
-	margin-top: 43rpx;
-}
+	.all {
+		width: 750rpx;
+		min-height: 100vh;
+		background-color: $page-color-base;
+	}
+	.list {
+		display: flex;
+		justify-content: start;
+		width: 750rpx;
+		height: 150rpx;
+	}
+	.qs {
+		height: 19rpx;
+		font-size: 20rpx;
+		font-weight: 500;
+		color: #ffffff;
+		margin-top: 27rpx;
+		margin-left: 30rpx;
+	}
+	.dy {
+		height: 35rpx;
+		font-size: 46rpx;
+		font-weight: bold;
+		color: #fdb242;
+		margin-top: 14rpx;
+		margin-left: 30rpx;
+	}
+	.ri {
+		display: flex;
+		justify-content: start;
+		margin-left: -45rpx;
+	}
+	.sx {
+		height: 28rpx;
+		font-size: 30rpx;
+		font-weight: bold;
+		color: #df5660;
+		margin-top: 50rpx;
+	}
+	.xian {
+		width: 696rpx;
+		height: 2rpx;
+		background: #f0f0f0;
+		opacity: 0.35;
+		margin-left: 30rpx;
+		margin-top: 43rpx;
+	}
 </style>

+ 4 - 3
pages/index/entertainment.vue

@@ -120,7 +120,6 @@
 			</view>
 		</view>
 
-
 		<view class="chz flex">
 			<view>
 				<view class="yue padding-b-10">{{$t('enter.u15')}}</view>
@@ -261,7 +260,6 @@
 					uni.showToast({
 						title: this.$t('enter.a9'),
 						icon: "error"
-
 					})
 					return
 				}
@@ -308,6 +306,7 @@
 				const that = this;
 				const upData = {
 					id: that.history.next.id,
+					
 					bet: that.upOnBtnData.type,
 					num: that.upOnBtnData.value,
 					trade_password: that.upOnBtnData.passwordArr.join("")
@@ -386,6 +385,7 @@
 			getGameList() {
 				return getGameList().then((res) => {
 					this.gameList = res.data.list;
+					// console.log('1111111111',this.gameList);
 				})
 			},
 			// 重新加载基础游戏信息
@@ -402,9 +402,10 @@
 				gameBetList({
 					page: 1,
 					limit: 10,
-					id: this.history.base.id
+					id: this.history.base.id,
 				}).then((res) => {
 					this.betList.list = res.data.bet_log;
+					console.log('aaa',this.betList.list );
 				})
 			},
 			// 获取游戏K线信息

+ 6 - 9
pages/index/index.vue

@@ -134,7 +134,7 @@
 			}
 		},
 		onLoad() {
-			this.prices()
+			this.loadData()
 		},
 		
 		methods: {
@@ -170,21 +170,18 @@
 				}
 				// 修改当前对象状态为加载中
 				navItem.loadingType = 'loading';
-				getCertList({
-						page: navItem.page,
-						limit: navItem.limit
-					})
-				// prices({
+				// getCertList({
 				// 		page: navItem.page,
 				// 		limit: navItem.limit
 				// 	})
+				prices({
+						page: navItem.page,
+						limit: navItem.limit
+					})
 					.then(({
 						data
 					}) => {
 						console.log(data, '111');
-						
-						
-						// TODO
 						let list = data.list.data;
 						navItem.orderList = navItem.orderList.concat(list);
 						navItem.page++;

+ 36 - 18
pages/index/user.vue

@@ -3,12 +3,14 @@
 		<view class="top">
 			<view class="my">{{$t('home.d4')}}</view>
 			<view class="userinfo flex">
-				<view class="flex">
-					<image class="image margin-r-10" src="../../static/error/missing-face.png" mode="scaleToFill">
+				<view class="flex"  @click="navTo('/pages/user/set')">
+					<image class="image margin-r-10" :src="userInfo.avatar || '/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 class="infor margin-b-20">{{ userInfo.nickname || '游客' }}</view>
+						 <view class="uservip">
+						 	{{userInfo.vip ? userInfo.vip_name: '粉丝'}}
+						 </view>
 					</view>
 				</view>
 				<image @click="showY" class="inf" src="../../static/shouye/userinfo.png" mode="scaleToFill"></image>
@@ -21,7 +23,7 @@
 					{{$t('user.c1')}}
 				</view>
 				<view class="tex">
-					12356.00
+					{{userWallet}}U
 				</view>
 				<view class="btn flex">
 					<button class="btn1" @click="navigator"> <text>{{$t('user.a7')}}</text> </button>
@@ -57,7 +59,6 @@
 			<view class="gj">
 				{{$t('user.b1')}}
 			</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">
@@ -122,6 +123,9 @@
 	</view>
 </template>
 <script>
+	import {
+		gameWallet,
+	} from "@/api/game.js";
 	import taber from "@/components/footer/footer.vue";
 	import {
 		mapState,
@@ -130,8 +134,6 @@
 	import {
 		orderData,
 		getUserInfo,
-		// check,
-		// getLevelList
 	} from '@/api/user.js';
 	import {
 		saveUrl,
@@ -152,7 +154,9 @@
 				achievement: '',
 				code: '',
 				levelList: [],
-				show: true
+				show: true,
+				
+				userWallet: 0, //余额 
 			};
 		},
 		onShow() {
@@ -161,6 +165,7 @@
 			// 	this.loadBaseData();
 			// }
 			this.loadBaseData();
+			this.getUserWallet();
 		},
 		filters: {
 			phone(e) {
@@ -206,6 +211,17 @@
 				})
 			},
 
+			// 获取用户余额信息
+			getUserWallet() {
+				gameWallet().then((res) => {
+					this.userWallet = +res.data.back.USDT.money.money
+				})
+				// if (this.history.next.id) {
+				// 	this.opTiem();
+				// } else {
+				// 	this.gameInit();
+				// }
+			},
 			// 加载初始数据
 			loadBaseData() {
 				const obj = this
@@ -238,15 +254,7 @@
 					});
 				}
 			},
-			close() {
-				this.$refs.popuphx.close();
-				this.code = '';
-			},
-
-			// 打开绑定
-			open() {
-				this.$refs.gspass.open();
-			},
+			
 			cast() {
 				set_waiter({
 						uid: this.id
@@ -300,6 +308,16 @@
 					font-weight: 500;
 					color: #FFFFFF;
 				}
+				.uservip {
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					background: url('../../static/img/vip-bg.png') 100%/contain no-repeat;
+					padding: 6rpx 72rpx;
+					font-size: 20rpx;
+					font-weight: 500;
+					color: #93794B;
+				}
 			}
 		}
 	}

+ 144 - 118
pages/transaction/transaction.vue

@@ -1,141 +1,167 @@
 <template>
-	<view class="all">
-		<view class="top">
-			<view class="one">
-				<view class="xian"></view>
-				<view class="jy">{{$t('password.a1')}}</view>
-			</view>
-			<view class="heng"></view>
-			<view class="one">
-				<view class="pas">{{$t('password.a2')}}</view>
-				<view class="">
-					<input class="npas" type="password" v-model="password" focus :placeholder="$t('password.a3')" />
-				</view>
-			</view>
-			<view class="heng"></view>
-			<view class="one">
-				<view class="pas">{{$t('password.a4')}}</view>
-				<view class="">
-					<input class="nepas" type="password" v-model="password" focus :placeholder="$t('password.a5')" />
-				</view>
-			</view>
-			<view class="heng"></view>
-			<view class="one">
-				<view class="pas">{{$t('password.a6')}}</view>
-				<view class="">
-					<input class="npas" type="password" v-model="password" focus :placeholder="$t('password.a7')" />
-				</view>
-				<view class="yanzheng">{{$t('password.a6')}}</view>
-			</view>
+	<view class="container">
+		<view class="row b-b">
+			<text class="tit">{{$t('reg.a2')}}</text>
+			<input class="input" v-model="account" type="text" :placeholder="$t('reg.a3')" placeholder-class="placeholder" />
 		</view>
-		<view class="last">
-			<view class="an">
-				<view class="qr">{{$t('password.a7')}}</view>
-			</view>
+		<view class="row b-b">
+			<text class="tit">{{$t('reg.a8')}}</text>
+			<input class="input" v-model="password" type="password" :placeholder="$t('reg.a9')" placeholder-class="placeholder" />
 		</view>
+		<view class="row b-b">
+			<text class="tit">{{$t('reg.b0')}}</text>
+			<input class="input" v-model="repeat" type="password" :placeholder="$t('reg.b1')" placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b">
+			<text class="tit">{{$t('reg.a6')}}</text>
+			<input class="input" v-model="captcha" type="text" :placeholder="$t('reg.a7')" placeholder-class="placeholder" />
+			<view class="code" @click="verification">{{ countDown == 0 ? $t('reg.c6') : countDown }}</view>
+		</view>
+		<button class="add-btn" :class="{'bg-gray':loding}" @click="loding?'':confirm()">{{$t('common.submit')}}</button>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				password: '',
-			};
+import { verify } from '@/api/login.js';
+import { mapState } from 'vuex';
+import { registerReset } from '@/api/set.js';
+export default {
+	data() {
+		return {
+			time: '', //保存倒计时对象
+			countDown: 0, //倒计时
+			account: '', //手机号
+			captcha: '', //验证码
+			password: '' ,//新密码
+			repeat: '', //重复密码
+			loding:false,//是否载入中
+		};
+	},
+	computed: {
+		...mapState(['userInfo'])
+	},
+	onLoad() {
+		if(this.userInfo.phone == null){
+			this.account = '';
+		}else{
+			this.account = this.userInfo.phone;
+			this.show = false;
+		}
+	},
+	watch: {
+		// 监听倒计时
+		countDown(i) {
+			if (i == 0) {
+				clearInterval(this.time);
+			}
+		}
+	},
+	methods: {
+		//发送验证码
+		verification() {
+			let obj = this;
+			if (this.account == '') {
+				this.$api.msg('请输入电话号码');
+				return;
+			}
+			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
+				this.$api.msg('请输入正确的手机号');
+				return;
+			}
+			// 判断是否在倒计时
+			if (obj.countDown > 0) {
+				return false;
+			} else {
+				obj.countDown = 60;
+				obj.time = setInterval(() => {
+					obj.countDown--;
+				}, 1000);
+				//调用验证码接口
+				verify({
+					phone: obj.account,
+					type: ''
+				})
+					.then(({ data }) => {})
+					.catch(err => {
+						console.log(err);
+					});
+			}
+		},
+	
+		confirm(e) {
+		    // 检查两次输入的新密码是否一致
+		    if (this.password === this.repeat) {
+		      // 发送请求或执行逻辑来修改密码
+		      // 根据具体需求进行操作
+		      console.log('密码修改成功');
+		      // 更新交易密码
+		      this.password = this.repeat;
+		      // 清空输入框
+		      this.password = '';
+		      this.repeat = '';
+		    } else {
+		      console.log('两次输入的密码不一致');
+		    }
+		  
 		}
 	}
+};
 </script>
 
 <style lang="scss">
-.all {
-	width: 750rpx;
-	height: 1334rpx;
-	background-color: #000000;
+page {
+	background: $page-color-base;
 }
-.top {
-	width: 750rpx;
-	height: 430rpx;
-	background: #191A1F;
+.container {
+	padding-top: 30rpx;
 }
-.one {
+.row {
 	display: flex;
-	justify-content: start;
-}
-.xian {
-	width: 2rpx;
-	height: 30rpx;
-	background: #FDB242 ;
-	margin-left: 31rpx;
-	margin-top: 40rpx;
-}
-.jy {
-	height: 29rpx;
-	font-size: 30rpx;
-	font-weight: 500;
-	color: #FFFFFF;
-	line-height: 55rpx;
-	margin-left: 17rpx;
-	margin-top: 27rpx;
-}
-.heng {
-	width: 750rpx;
-	height: 1rpx;
-	background: #F3F3F3;
-	margin-top: 30rpx;
-}
-.pas {
-	height: 25rpx;
-	font-size: 26rpx;
-	font-weight: 500;
-	color: #FFFFFF;
-	line-height: 55rpx;
-	margin-left: 29rpx;
-	margin-top: 34rpx;
-}
-.npas {
-	height: 25rpx;
-	font-size: 26rpx;
-	font-weight: 500;
-	color: #999999;
-	line-height: 55rpx;
-	margin-left: 200rpx;
-	margin-top: 40rpx;
-}
-.nepas {
-	height: 25rpx;
-	font-size: 26rpx;
-	font-weight: 500;
-	color: #999999;
-	line-height: 55rpx;
-	margin-left: 178rpx;
-	margin-top: 40rpx;
-}
-.yanzheng {
-	height: 25rpx;
-	font-size: 26rpx;
-	font-weight: 500;
-	color: #FDB242;
-	line-height: 55rpx;
-	margin-top: 34rpx;
-}
+	align-items: center;
+	position: relative;
+	padding: 0 30rpx;
+	height: 110rpx;
+	background: #191a1f;
 
-.an {
+	.tit {
+		flex-shrink: 0;
+		font-size: 30rpx;
+		color: $font-color-white;
+	}
+	.input {
+		flex: 1;
+		font-size: 30rpx;
+		color: $font-color-light;
+		padding-left: 20rpx;
+	}
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+.add-btn {
+	display: flex;
+	align-items: center;
+	justify-content: center;
 	width: 690rpx;
 	height: 80rpx;
-	background: #FDB242 ;
+	margin: 60rpx auto;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
 	border-radius: 40rpx;
-	margin-left: 30rpx;
-	margin-top: 62rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+
+.bg-gray{
+	background-color: $color-gray;
 }
-.qr {
-	// height: 28rpx;
-	font-size: 30rpx;
-	// font-family: PingFang SC;
+.code {
+	color: #5dbc7c;
+	font-size: 23rpx;
+	border-left: 1px solid #eeeeee;
+	width: 150rpx;
+	flex-shrink: 0;
 	text-align: center;
-	font-weight: 500;
-	color: #0D0A21;
-	line-height: 1;
-	// margin-left: 316rpx;
-	padding-top: 16rpx;
 }
 </style>

+ 167 - 205
pages/user/set.vue

@@ -1,235 +1,197 @@
 <template>
 	<view class="content">
 		<view class="row1">
-			<text class="tit">头像</text>
-			<view class="background-img" @click="upload"><image class="background-img" v-model="avatar" :src="avatar" mode="aspectFill"></image></view>
+			<text class="tit">{{$t('set.a1')}}</text>
+			<view
+				class="background-img"
+				@click="upload"
+				><image
+					class="background-img"
+					v-model="avatar"
+					:src="avatar"
+					mode="aspectFill"></image
+			></view>
 		</view>
 		<view class="row">
-			<text class="tit">昵称</text>
-			<input class="input" type="button" v-model="name" placeholder-class="placeholder" />
+			<text class="tit">{{$t('set.a2')}}</text>
+			<input
+				class="input"
+				type="button"
+				v-model="name"
+				placeholder-class="placeholder" />
 		</view>
 		<view class="row">
-			<text class="tit">修改密码</text>
-			<input class="input" type="text" v-model="password" placeholder-class="placeholder" />
+			<text class="tit">{{$t('set.a3')}}</text>
+			<input
+				class="input"
+				disabled
+				type="text"
+				v-model="phone"
+				placeholder-class="placeholder" />
 		</view>
-		<view class="row">
-			<text class="tit">请输入手机号</text>
-			<input class="input" type="text" v-model="account" placeholder-class="placeholder" />
-		</view>
-		<view class="row">
-			<text class="tit">验证码</text>
-			<input class="input" type="text" v-model="captcha" placeholder-class="placeholder" />
-			<view class="code" @click="verification">{{ countDown == 0 ? $t('password.a7') : countDown }}</view>
-		</view>
-		<view class="row">
-			<text class="tit">账号</text>
-			<input class="input" disabled type="text" v-model="phone" placeholder-class="placeholder" />
-		</view>
-		<button class="add-btn" @click="confirm">修改</button>
+		<button
+			class="add-btn"
+			@click="confirm"
+			>{{$t('set.a4')}}</button
+		>
 	</view>
 </template>
 
 <script>
-import { mapState,mapMutations } from 'vuex';
-import { userEdit,logout } from '@/api/set.js';
-import { upload } from '@/api/order.js'
-export default {
-	data() {
-		return {
-			name: '', // 昵称
-			password:'', //修改密码
-			captcha:'', //验证码
-			account:'', //请输入手机号
-			phone:'',
-			avatar: '',
-		};
-	},
-	computed: {
-		...mapState('user',['userInfo']),
-		startDate() {
-			console.log('start');
+	import { mapState, mapMutations } from "vuex";
+	import { userEdit, logout } from "@/api/set.js";
+	import { upload } from "@/api/order.js";
+	export default {
+		data() {
+			return {
+				name: "", // 昵称
+				phone: "",
+				avatar: "",
+				countDown: 1,
+			};
 		},
-		endDate() {
-			console.log('end');
-		}
-	},
-	onShow(option) {
-		console.log('111',this.userInfo);
-		this.name = this.userInfo.nickname + '';
-		this.password = '',
-		this.captcha = '',
-		this.account = '',
-		this.avatar = this.userInfo.avatar || '';
-		this.phone = this.userInfo.phone || '';
-	},
-	methods: {
-		...mapMutations('user', ['logout']),
-		// 上传头像
-		upload() {
-			console.log("111111")
-			upload({
-				filename: ''
-			}).then(data => {
-				this.avatar = data[0].url;
-				console.log(this.avatar, 'tup')
-				setTimeout(() => {
-					uni.hideLoading()
-				}, 500)
-			});
+		computed: {
+			...mapState("user", ["userInfo"]),
+			startDate() {
+				console.log("start");
+			},
+			endDate() {
+				console.log("end");
+			},
 		},
-		
-		confirm() {
-			userEdit({ 
-			  nickname: this.name,
-			  avatar: this.avatar, 
-			  password: this.password,
-			  captcha: this.captcha,
-			  account: this.account
-			}).then(e => {
-					this.$api.msg('修改成功');
-					// 清空输入框
-					this.password = '',
+		onShow(option) {
+			console.log("111", this.userInfo);
+			this.name = this.userInfo.nickname + "";
+			this.avatar = this.userInfo.avatar || "";
+			this.phone = this.userInfo.phone || "";
+		},
+		methods: {
+			...mapMutations("user", ["logout"]),
+			// 上传头像
+			upload() {
+				console.log("111111");
+				upload({
+					filename: "",
+				}).then(data => {
+					this.avatar = data[0].url;
+					console.log(this.avatar, "tup");
 					setTimeout(() => {
-						uni.switchTab({
-							url: '/pages/user/user'
-						});
-					}, 1000);
-					console.log(e);
-				})
-				.catch(e => {
-					console.log(e);
+						uni.hideLoading();
+					}, 500);
 				});
-		},
-		//发送验证码
-		verification() {
-			let obj = this;
-			if (this.account == '') {
-				this.$api.msg('请输入电话号码');
-				return;
-			}
-			if (this.account.length < 11) {
-				this.$api.msg('请输入正确的手机号');
-				return;
-			}
-			// 判断是否在倒计时
-			if (obj.countDown > 0) {
-				return false;
-			} else {
-				obj.countDown = 60;
-				obj.time = setInterval(() => {
-					obj.countDown--;
-				}, 1000);
-				//调用验证码接口
-				verify({
-					account: obj.account,
-					type: 'login'
+			},
+
+			confirm() {
+				userEdit({
+					nickname: this.name,
+					avatar: this.avatar,
+					// password: this.password,
+					// captcha: this.captcha,
+					// account: this.account,
 				})
-					.then(({ data }) => {})
-					.catch(err => {
-						console.log(err);
+					.then(e => {
+						this.$api.msg("修改成功");
+						// 清空输入框
+						(this.password = ""),
+							setTimeout(() => {
+								uni.switchTab({
+									url: "/pages/user/user",
+								});
+							}, 1000);
+						console.log(e);
+					})
+					.catch(e => {
+						console.log(e);
 					});
-			}
+			},
+			loginout() {
+				uni.navigateTo({
+					url: "/pages/switch/switch",
+				});
+			},
 		},
-		// loginout() {
-		// 	let obj = this;
-		// 	uni.showModal({
-		// 		content: '确定要退出登录么',
-		// 		success: e => {
-		// 			if (e.confirm) {
-		// 				uni.removeStorageSync('canChange')
-		// 				logout({}).then()
-		// 				uni.navigateBack();
-		// 				obj.logout();
-		// 			}
-		// 		}
-		// 	});
-		// }
-		loginout() {
-			uni.navigateTo({
-				url: '/pages/switch/switch'
-			})
-		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-.content {
-	background-color: #fff;
-}
-
-.row1 {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	position: relative;
-	padding: 0 30upx;
-	height: 110upx;
-	background: #fff;
-	.tit {
-		flex-shrink: 0;
-		width: 120upx;
-		font-size: $font-lg;
+	page {
+		background-color: #fff;
 	}
-	.background-img {
-		width: 80rpx;
-		height: 80rpx;
-		border-radius: 50%;
-		background: #f2f2f2;
+	.content {
+		background-color: #fff;
 	}
-}
-.row {
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	position: relative;
-	padding: 0 30upx;
-	height: 110upx;
-	background: #fff;
 
-	.tit {
-		flex-shrink: 0;
-		font-size: $font-lg;
-		color: $font-color-dark;
+	.row1 {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: relative;
+		padding: 0 30upx;
+		height: 110upx;
+		background: #fff;
+		.tit {
+			flex-shrink: 0;
+			width: 120upx;
+			font-size: $font-lg;
+		}
+		.background-img {
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 50%;
+			background: #f2f2f2;
+		}
 	}
-	.tit1 {
-		flex-shrink: 0;
-		width: 150upx;
-		font-size: $font-lg;
-		color: $font-color-dark;
-		
+	.row {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: relative;
+		padding: 0 30upx;
+		height: 110upx;
+		background: #fff;
+
+		.tit {
+			flex-shrink: 0;
+			font-size: $font-lg;
+			color: $font-color-dark;
+		}
+		.tit1 {
+			flex-shrink: 0;
+			width: 150upx;
+			font-size: $font-lg;
+			color: $font-color-dark;
+		}
+		.input {
+			text-align: right;
+			flex: 1;
+			font-size: $font-base;
+			color: $color-gray;
+		}
+		.iconlocation {
+			font-size: 36upx;
+			color: $font-color-light;
+		}
 	}
-	.input {
-		text-align: right;
-		flex: 1;
-		font-size: $font-base;
-		color: $color-gray;
+	.add-btn {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 560upx;
+		height: 80upx;
+		margin: 60upx auto;
+		font-size: $font-lg;
+		color: #fff;
+		background: $base-color;
+		border-radius: 40upx;
 	}
-	.iconlocation {
-		font-size: 36upx;
-		color: $font-color-light;
+	.loginout {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 560upx;
+		height: 80upx;
+		margin: 60upx auto;
+		font-size: $font-lg;
+		color: #fff;
 	}
-}
-.add-btn {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 560upx;
-	height: 80upx;
-	margin: 60upx auto;
-	font-size: $font-lg;
-	color: #fff;
-	background: $base-color;
-	border-radius: 40upx;
-}
-.loginout {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 560upx;
-	height: 80upx;
-	margin: 60upx auto;
-	font-size: $font-lg;
-	color: #fff;
-}
 </style>

+ 2 - 4
pages/withdrawal/withdrawal.vue

@@ -11,15 +11,13 @@
 				{{$t('userinfo.u7')}}
 			</view>
 			<view class="topF">
-				<!-- <input class="FF" v-model="withdrawal" :placeholder="'請輸入提幣地址'" placeholder-class="placeholder" /> -->
-				<input class="FF" placeholder="請輸入提幣地址" placeholder-class="placeholder" />
+				<input class="FF" v-model="withdrawal" :placeholder="placeholder" placeholder-class="placeholder" />
 			</view>
 			<view class="topS">
 				{{$t('userinfo.u8')}}
 			</view>
 			<view class="topF">
-				<!-- <input class="FF" v-model="withdrawal" :placeholder="'請輸入提幣地址'" placeholder-class="placeholder" /> -->
-				<input class="FF" placeholder="請輸入提幣数量" placeholder-class="placeholder" />
+				<input class="FF" v-model="withdrawal" :placeholder="placeholder" placeholder-class="placeholder" />
 			</view>
 		</view>
 		<view class="center">

BIN
static/img/vip-bg.png


+ 1 - 2
uni.scss

@@ -2,10 +2,9 @@
 $page-row-spacing: 30rpx;
 //页面基础颜色
 $page-color-base: #000; //页面背景颜色
-$page-color-base: #fff; //页面背景颜色
 $page-color-light: #f8f6fc;
 // 主题颜色
-$base-color: #fd5b23; //项目颜色
+$base-color: #fdb242; //项目颜色
 $box-shadow-color: #5dbc7c; //阴影颜色
 $font-color: #5dbc7c; //字体颜色
 $font-color-spec: #5dbc7c; //可操作文字颜色