zhang 1 jaar geleden
bovenliggende
commit
e5093328d4
6 gewijzigde bestanden met toevoegingen van 638 en 640 verwijderingen
  1. 209 210
      pages/public/forget.vue
  2. 408 409
      pages/public/login.vue
  3. 21 21
      pages/public/register.vue
  4. BIN
      static/icon/ze.png
  5. BIN
      static/icon/ze2.png
  6. BIN
      static/icon/注册_slices.zip

+ 209 - 210
pages/public/forget.vue

@@ -1,210 +1,209 @@
-<template>
-	<view class="container">
-		<view class="container_text">
-			<!-- <image class="banner-img" src="/static/img/img01.png" mode=" scaleToFill"></image> -->
-			<image class="banner-img" src="/static/img/shouye1.png" mode="scaleToFill"></image>
-			<view class="banner-img">
-				
-			</view>
-		</view>
-		<view class="loginTitle"><text>{{$t('login.a0')}}</text></view>
-		<view class="login_text">
-			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
-				<view class="login_name"><input class="uni-input" v-model="account" focus :placeholder="$t('login.a1')"/></view>
-			</view>
-			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img06.png"></image></view>
-				<view class="login_name flex">
-					<input class="uni-input width" v-model="captcha" focus :placeholder="$t('password.a7')" />
-					<view class="code" @click="verification">{{ countDown == 0 ? $t('password.a7') : countDown }}</view>
-				</view>
-			</view>
-			<view>
-				<button type="green" @click="register" class="uni-button uni-button-green">{{$t('login.a4')}}</button>
-			</view>
-		</view>
-	</view>
-</template>
-<script>
-import { mapMutations } from 'vuex';
-import { verify, loginMobile, getUserInfo } from '@/api/login.js';
-export default {
-	data() {
-		return {
-			account: '' ,//用户
-			captcha: '', //验证码
-			// phone: '', //用户
-			// code: '', //验证码
-			time: '', //保存倒计时对象
-			countDown: 0 //倒计时
-		};
-	},
-	onLoad() {},
-	watch: {
-		// 监听倒计时
-		countDown(i) {
-			if (i == 0) {
-				clearInterval(this.time);
-			}
-		}
-	},
-	methods: {
-		...mapMutations('user', ['setUserInfo', 'login']),
-		// 手机登录
-		register() {
-			let obj = this;
-			if (obj.account == '') {
-				// obj.$api.msg('请输入电话号码');
-				obj.$api.msg(obj.$t("login.a1"));
-				return;
-			}
-			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
-				obj.$api.msg(obj.$t("safe.b8"));
-				return;
-			}
-			if (obj.captcha == '') {
-				obj.$api.msg(obj.$t("login.b6"));
-				return;
-			}
-
-			loginMobile({
-				account: obj.account, //账号
-				captcha: obj.captcha
-			}).then(function(e) {
-				uni.setStorageSync('token', e.data.token);
-				getUserInfo({}).then(e => {
-					obj.login();
-					// 保存返回用户数据
-					obj.setUserInfo(e.data);
-					//成功跳转首页
-					uni.switchTab({
-						url: '/pages/index/index'
-					});
-				});
-			}).catch((e) => {
-				console.log(e);
-			});
-		},
-		//发送验证码
-		verification() {
-			let obj = this;
-			if (this.account == '') {
-				this.$api.msg(obj.$t("login.a1"));
-				return;
-			}
-			if (this.account.length < 11) {
-				this.$api.msg(obj.$t("safe.b8"));
-				return;
-			}
-			// 判断是否在倒计时
-			if (obj.countDown > 0) {
-				return false;
-			} else {
-				obj.countDown = 60;
-				obj.time = setInterval(() => {
-					obj.countDown--;
-				}, 1000);
-				//调用验证码接口
-				verify({
-					account: obj.account,
-					type: 'login'
-				})
-					.then(({ data }) => {})
-					.catch(err => {
-						console.log(err);
-					});
-			}
-		},
-		login() {
-			//返回登录
-			uni.navigateTo({
-				url: '/pages/public/login'
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	height: 100%;
-}
-.container {
-	width: 100%;
-	height: 100%;
-	background-size: 100%;
-	background-color: #000000;
-}
-.container_text {
-	width: 100%;
-	height: 500rpx;
-	top: 0rpx;
-	.banner-img {
-		width: 144rpx;
-		height: 144rpx;
-		margin-top: 100rpx;
-		margin-left: 302rpx;
-	}
-}
-.login_text {
-	margin: auto 30rpx;
-	position: relative;
-	padding: 100rpx 102rpx;
-	background-color: #000000;
-	margin-top: -180rpx;
-	border-radius: 20rpx;
-	.login_input {
-		border-bottom: 1px solid #f0f0f0;
-		margin-bottom: 65rpx;
-		.login_img image {
-			height: 35rpx;
-			width: 29rpx;
-			margin-right: 20rpx;
-		}
-		.uni-input {
-			text-align: left;
-			width: 470rpx;
-			font-size: 28rpx !important;
-		}
-		.login_name {
-			color: #fff;
-			.width {
-				width: 325rpx !important;
-			}
-			.code {
-				color: #cbb174;
-				font-size: 23rpx;
-				border-left: 1px solid #eeeeee;
-				width: 150rpx;
-				flex-shrink: 0;
-				text-align: center;
-			}
-		}
-	}
-	.uni-button-green {
-		color: #2a2421;
-		background-color: #feb041;
-		margin: 40rpx 10rpx;
-		border-radius: 50rpx;
-	}
-	.uni-button {
-		height: 85rpx;
-		line-height: 85rpx;
-	}
-}
-.loginTitle {
-	position: absolute;
-	top: 250rpx;
-	width: 100%;
-	text-align: center;
-	color: #cbb174;
-	font-size: 40rpx;
-}
-
-uni-button {
-	height: 80rpx !important;
-	line-height: 80rpx !important;
-}
-
-</style>
+<template>
+	<view class="container">
+		<view class="container_text">
+			<!-- <image class="banner-img" src="/static/img/img01.png" mode=" scaleToFill"></image> -->
+			<image class="banner-img" src="/static/img/shouye1.png" mode="scaleToFill"></image>
+			<view class="banner-img">
+				
+			</view>
+		</view>
+		<view class="loginTitle"><text>{{$t('login.a0')}}</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/ze.png"></image></view>
+				<view class="login_name"><input class="uni-input" v-model="account" focus :placeholder="$t('login.a1')"/></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><image src="/static/icon/ze2.png"></image></view>
+				<view class="login_name flex">
+					<input class="uni-input width" v-model="captcha" focus :placeholder="$t('password.a7')" />
+					<view class="code" @click="verification">{{ countDown == 0 ? $t('password.a7') : countDown }}</view>
+				</view>
+			</view>
+			<view>
+				<button type="green" @click="register" class="uni-button uni-button-green">{{$t('login.a4')}}</button>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+import { mapMutations } from 'vuex';
+import { verify, loginMobile, getUserInfo } from '@/api/login.js';
+export default {
+	data() {
+		return {
+			account: '' ,//用户
+			captcha: '', //验证码
+			// phone: '', //用户
+			// code: '', //验证码
+			time: '', //保存倒计时对象
+			countDown: 0 //倒计时
+		};
+	},
+	onLoad() {},
+	watch: {
+		// 监听倒计时
+		countDown(i) {
+			if (i == 0) {
+				clearInterval(this.time);
+			}
+		}
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'login']),
+		// 手机登录
+		register() {
+			let obj = this;
+			if (obj.account == '') {
+				// obj.$api.msg('请输入电话号码');
+				obj.$api.msg(obj.$t("login.a1"));
+				return;
+			}
+			if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
+				obj.$api.msg(obj.$t("safe.b8"));
+				return;
+			}
+			if (obj.captcha == '') {
+				obj.$api.msg(obj.$t("login.b6"));
+				return;
+			}
+
+			loginMobile({
+				account: obj.account, //账号
+				captcha: obj.captcha
+			}).then(function(e) {
+				uni.setStorageSync('token', e.data.token);
+				getUserInfo({}).then(e => {
+					obj.login();
+					// 保存返回用户数据
+					obj.setUserInfo(e.data);
+					//成功跳转首页
+					uni.switchTab({
+						url: '/pages/index/index'
+					});
+				});
+			}).catch((e) => {
+				console.log(e);
+			});
+		},
+		//发送验证码
+		verification() {
+			let obj = this;
+			if (this.account == '') {
+				this.$api.msg(obj.$t("login.a1"));
+				return;
+			}
+			if (this.account.length < 11) {
+				this.$api.msg(obj.$t("safe.b8"));
+				return;
+			}
+			// 判断是否在倒计时
+			if (obj.countDown > 0) {
+				return false;
+			} else {
+				obj.countDown = 60;
+				obj.time = setInterval(() => {
+					obj.countDown--;
+				}, 1000);
+				//调用验证码接口
+				verify({
+					account: obj.account,
+					type: 'login'
+				})
+					.then(({ data }) => {})
+					.catch(err => {
+						console.log(err);
+					});
+			}
+		},
+		login() {
+			//返回登录
+			uni.navigateTo({
+				url: '/pages/public/login'
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+.container {
+	width: 100%;
+	height: 100%;
+	background-size: 100%;
+	background-color: #000000;
+}
+.container_text {
+	width: 100%;
+	height: 500rpx;
+	top: 0rpx;
+	.banner-img {
+		width: 144rpx;
+		height: 144rpx;
+		margin-top: 100rpx;
+		margin-left: 302rpx;
+	}
+}
+.login_text {
+	margin: auto 10rpx;
+	position: relative;
+	padding: 100rpx 102rpx;
+	background-color: #000000;
+	margin-top: -180rpx;
+	border-radius: 20rpx;
+	.login_input {
+		border-bottom: 1px solid #f0f0f0;
+		margin-bottom: 65rpx;
+		.login_img image {
+			height: 35rpx;
+			width: 29rpx;
+		}
+		.uni-input {
+			text-align: left;
+			width: 470rpx;
+			font-size: 28rpx !important;
+		}
+		.login_name {
+			color: #fff;
+			.width {
+				width: 325rpx !important;
+			}
+			.code {
+				color: #cbb174;
+				font-size: 23rpx;
+				border-left: 1px solid #eeeeee;
+				width: 150rpx;
+				flex-shrink: 0;
+				text-align: center;
+			}
+		}
+	}
+	.uni-button-green {
+		color: #2a2421;
+		background-color: #feb041;
+		margin: 40rpx 10rpx;
+		border-radius: 50rpx;
+	}
+	.uni-button {
+		height: 85rpx;
+		line-height: 85rpx;
+	}
+}
+.loginTitle {
+	position: absolute;
+	top: 250rpx;
+	width: 100%;
+	text-align: center;
+	color: #cbb174;
+	font-size: 40rpx;
+}
+
+uni-button {
+	height: 80rpx !important;
+	line-height: 80rpx !important;
+}
+
+</style>

+ 408 - 409
pages/public/login.vue

@@ -1,410 +1,409 @@
-<template>
-	<view class="container">
-		<view class="container_text">
-			<image class="banner-img" src="/static/img/shouye1.png" mode="scaleToFill"></image>
-		</view>
-		<view class="loginTitle"><text>{{$t('login.a0')}}</text></view>
-		<view class="login_text">
-			<view class="login_input flex">
-				<view class="login_img">
-					<image src="/static/icon/img03.png"></image>
-				</view>
-				<view class="login_name"><input class="uni-input" v-model="account" focus :placeholder="$t('login.a1')" />
-				</view>
-			</view>
-			<view class="login_input flex">
-				<view class="login_img">
-					<image src="/static/icon/img04.png"></image>
-				</view>
-				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus
-						:placeholder="$t('login.a3')"  /></view>
-			</view>
-			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">{{$t('login.a4')}}</button></view>
-			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true"
-					hover-class="none" @click="register">{{$t('login.a7')}}</button></view>
-			<navigator url="./forget">
-				<view class="forget">{{$t('login.b2')}}</view>
-			</navigator>
-			
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		mapMutations
-	} from 'vuex';
-	import {
-		login
-	} from '@/api/login.js';
-	import {
-		getUserInfo
-	} from '@/api/user.js';
-	// #ifdef APP-PLUS
-	// applelogin接口需要开发编写,基础项目中可能没有
-	import {
-		applelogin
-	} from '@/api/set.js';
-	// loginWx接口需要开发编写,基础项目中可能没有
-	import {
-		loginWx
-	} from '@/api/login.js';
-	// #endif
-	// #ifdef H5
-	import {
-		loginWinxin
-	} from '@/utils/wxAuthorized';
-	// #endif
-	export default {
-		data() {
-			return {
-				// account: '13245678911' ,// 账号
-				// passward: '132456', //密码
-				account: '',
-				passward: '',
-				// #ifdef APP-PLUS
-				is_ios: false, //判断是否为ios手机
-				is_apple_login: false, //是否有ios授权登录功能
-				// #endif
-			};
-		},
-		onLoad() {
-			let obj = this;
-			// #ifdef APP-PLUS
-			let system = uni.getStorageSync('platform');
-			// 判断是否为ios
-			if (system == 'ios') {
-				obj.is_ios = true;
-			}
-			uni.getSystemInfo({
-				success(e) {
-					if (+e.system.split('.')[0] >= 13) {
-						obj.is_apple_login = true;
-					}
-				}
-			})
-			// #endif
-		},
-		methods: {
-			...mapMutations('user', ['setUserInfo', 'login']),
-			// 微信登录
-			wecahtLogin(type) {
-				let obj = this;
-				// #ifdef H5
-				let weichatBrowser = uni.getStorageSync('weichatBrowser');
-				if (weichatBrowser) {
-					loginWinxin();
-				}
-				// #endif
-				// #ifdef APP-PLUS
-				uni.login({
-					provider: type,
-					success(e) {
-						uni.getUserInfo({
-							provider: type,
-							success(es) {
-								if (type === 'weixin') {
-									loginWx(es.userInfo)
-										.then(e => {
-											uni.setStorageSync('token', e.data.token);
-											getUserInfo({}).then(e => {
-												obj.login();
-												// 保存返回用户数据
-												obj.setUserInfo(e.data);
-												//成功跳转首页
-												uni.switchTab({
-													url: '/pages/index/index'
-												});
-											});
-										})
-										.catch(e => {
-											console.log(e);
-											uni.showModal({
-												content: JSON.stringify(e),
-												success() {},
-												fail() {}
-											});
-										});
-								}
-								if (type === 'apple') {
-									console.log(es.userInfo);
-									applelogin({
-											account: es.userInfo.openId,
-										})
-										.then(function(e) {
-											console.log(e, 'token')
-											uni.setStorageSync('token', e.data.token);
-											getUserInfo({}).then(e => {
-												obj.login();
-												// 保存返回用户数据
-												obj.setUserInfo(e.data);
-												//成功跳转首页
-												uni.switchTab({
-													url: '/pages/index/index'
-												});
-											});
-
-										})
-										.catch(function(e) {
-											console.log(e);
-										});
-								}
-
-							},
-							fail(es) {
-								uni.showModal({
-									content: JSON.stringify(es),
-									success() {
-										// obj.login();
-										// // 保存返回用户数据
-										// obj.setUserInfo(e.data);
-										// //成功跳转首页
-										// uni.switchTab({
-										// 	url: '/pages/index/index'
-										// });
-									}
-								});
-							}
-						});
-					},
-					fail(e) {
-						uni.showModal({
-							title: '提示',
-							content: JSON.stringify(e),
-							showCancel: false
-						});
-					}
-				});
-				// #endif
-			},
-			//登录
-			async toLogin() {
-				let obj = this;
-				obj.logining = true;
-				if (obj.account == '') {
-					obj.$api.msg(obj.$t("login.a1"));
-					// obj.$api.msg('132456789');
-					return;
-				}
-				if (obj.passward == '') {
-					obj.$api.msg(obj.$t("login.a3"));
-					// obj.$api.msg('132456');
-					return;
-				}
-				login({
-						account: obj.account,
-						password: obj.passward
-					})
-					.then(function(e) {
-						uni.setStorageSync('token', e.data.token);
-						getUserInfo({}).then(e => {
-							obj.login();
-							// 保存返回用户数据
-							obj.setUserInfo(e.data);
-							let ur = uni.getStorageSync('present') || '/pages/index/index';
-							//成功跳转首页
-							uni.switchTab({
-								url: ur,
-								fail(e) {
-									uni.navigateTo({
-										url: ur,
-										fail(e) {
-											uni.navigateTo({
-												url: '/pages/index/index',
-											});
-										}
-									});
-								}
-							});
-						});
-					})
-					.catch(function(e) {
-						console.log(e);
-					});
-			},
-			//跳转注册页
-			register() {
-				uni.navigateTo({
-					url: `/pages/public/register`
-				});
-			},
-			// 后退
-			navBack() {
-				uni.navigateBack();
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	/* #ifdef APP-PLUS */
-
-	.ios_login {
-		width: 260rpx;
-		border-radius: 12rpx;
-		justify-content: center;
-		border: 1px solid #212121;
-		margin: 24rpx auto;
-		padding: 10rpx;
-		background-color: #212121;
-		color: #ffffff;
-
-		.loginIcon {
-			width: 50rpx;
-			height: 50rpx;
-		}
-
-		.weixin_text {
-			line-height: 1;
-			margin-left: 20rpx;
-			color: #ffffff !important;
-		}
-	}
-
-	/* #endif */
-	.ios_login {
-		width: 350rpx;
-		border-radius: 12rpx;
-		justify-content: center;
-		border: 1px solid #212121;
-		margin: 24rpx auto;
-		padding: 15rpx;
-		background-color: #212121;
-		color: #ffffff;
-		font-size: 32rpx;
-
-		.loginIcon {
-			font-size: 35rpx;
-			width: 35rpx;
-			height: 35rpx;
-		}
-
-		.weixin_text {
-			line-height: 1;
-			margin-left: 20rpx;
-			color: #ffffff !important;
-		}
-	}
-
-	page {
-		height: 100%;
-	}
-
-	.container {
-		width: 100%;
-		height: 100%;
-		background-size: 100%;
-		background-color: #000000;
-	}
-
-	.container_text {
-		width: 100%;
-		height: 500rpx;
-		top: 0rpx;
-
-		.banner-img {
-			width: 144rpx;
-			height: 144rpx;
-			margin-top: 100rpx;
-			margin-left: 302rpx;
-		}
-	}
-
-	.login_text {
-		margin: auto 30rpx;
-		position: relative;
-		padding: 100rpx 102rpx;
-		background-color: #000000;
-		margin-top: -180rpx;
-		border-radius: 20rpx;
-
-		.login_input {
-			border-bottom: 1px solid #f0f0f0;
-			margin-bottom: 65rpx;
-
-			.login_img image {
-				height: 35rpx;
-				width: 29rpx;
-				margin-right: 20rpx;
-			}
-
-			.uni-input {
-				text-align: left;
-				width: 470rpx;
-				font-size: 28rpx !important;
-			}
-
-			.login_name {
-				color: #fff;
-			}
-		}
-
-		.other {
-			margin-top: 60rpx;
-
-			.fenge {
-				width: 30%;
-				height: 2rpx;
-				background-color: #eeeeee;
-			}
-
-			.qita {
-				font-size: 28rpx;
-				color: #999999;
-			}
-		}
-
-		.weixin {
-			width: 75rpx;
-			height: 75rpx;
-			margin: 25rpx auto;
-		}
-
-		.weixin image {
-			width: 100%;
-			height: 100%;
-		}
-
-		.weixin_text {
-			text-align: center;
-			font-size: 28rpx;
-			color: #999999;
-		}
-
-		.forget {
-			font-size: 28rpx;
-			width: 100%;
-			text-align: right;
-			color: #999999;
-		}
-
-		.uni-button-green {
-			color: #ffffff;
-			background-color: #feb041;
-			margin: 40rpx 10rpx;
-			border-radius: 50rpx;
-		}
-
-		.uni-button-green-plain {
-			border: 1px solid #feb041;
-			margin: 40rpx 10rpx;
-			border-radius: 50rpx;
-			color: #feb041;
-			background-color: #000000;
-		}
-
-		.uni-button {
-			height: 85rpx;
-			line-height: 85rpx;
-		}
-	}
-
-	.loginTitle {
-		position: absolute;
-		top: 250rpx;
-		width: 100%;
-		text-align: center;
-		color: #cbb174;
-		font-size: 40rpx;
-	}
+<template>
+	<view class="container">
+		<view class="container_text">
+			<image class="banner-img" src="/static/img/shouye1.png" mode="scaleToFill"></image>
+		</view>
+		<view class="loginTitle"><text>{{$t('login.a0')}}</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img">
+					<image src="/static/icon/ze.png"></image>
+				</view>
+				<view class="login_name"><input class="uni-input" v-model="account" focus :placeholder="$t('login.a1')" />
+				</view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img">
+					<image src="/static/icon/ze2.png"></image>
+				</view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus
+						:placeholder="$t('login.a3')"  /></view>
+			</view>
+			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">{{$t('login.a4')}}</button></view>
+			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true"
+					hover-class="none" @click="register">{{$t('login.a7')}}</button></view>
+			<navigator url="./forget">
+				<view class="forget">{{$t('login.b2')}}</view>
+			</navigator>
+			
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapMutations
+	} from 'vuex';
+	import {
+		login
+	} from '@/api/login.js';
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	// #ifdef APP-PLUS
+	// applelogin接口需要开发编写,基础项目中可能没有
+	import {
+		applelogin
+	} from '@/api/set.js';
+	// loginWx接口需要开发编写,基础项目中可能没有
+	import {
+		loginWx
+	} from '@/api/login.js';
+	// #endif
+	// #ifdef H5
+	import {
+		loginWinxin
+	} from '@/utils/wxAuthorized';
+	// #endif
+	export default {
+		data() {
+			return {
+				// account: '13245678911' ,// 账号
+				// passward: '132456', //密码
+				account: '',
+				passward: '',
+				// #ifdef APP-PLUS
+				is_ios: false, //判断是否为ios手机
+				is_apple_login: false, //是否有ios授权登录功能
+				// #endif
+			};
+		},
+		onLoad() {
+			let obj = this;
+			// #ifdef APP-PLUS
+			let system = uni.getStorageSync('platform');
+			// 判断是否为ios
+			if (system == 'ios') {
+				obj.is_ios = true;
+			}
+			uni.getSystemInfo({
+				success(e) {
+					if (+e.system.split('.')[0] >= 13) {
+						obj.is_apple_login = true;
+					}
+				}
+			})
+			// #endif
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'login']),
+			// 微信登录
+			wecahtLogin(type) {
+				let obj = this;
+				// #ifdef H5
+				let weichatBrowser = uni.getStorageSync('weichatBrowser');
+				if (weichatBrowser) {
+					loginWinxin();
+				}
+				// #endif
+				// #ifdef APP-PLUS
+				uni.login({
+					provider: type,
+					success(e) {
+						uni.getUserInfo({
+							provider: type,
+							success(es) {
+								if (type === 'weixin') {
+									loginWx(es.userInfo)
+										.then(e => {
+											uni.setStorageSync('token', e.data.token);
+											getUserInfo({}).then(e => {
+												obj.login();
+												// 保存返回用户数据
+												obj.setUserInfo(e.data);
+												//成功跳转首页
+												uni.switchTab({
+													url: '/pages/index/index'
+												});
+											});
+										})
+										.catch(e => {
+											console.log(e);
+											uni.showModal({
+												content: JSON.stringify(e),
+												success() {},
+												fail() {}
+											});
+										});
+								}
+								if (type === 'apple') {
+									console.log(es.userInfo);
+									applelogin({
+											account: es.userInfo.openId,
+										})
+										.then(function(e) {
+											console.log(e, 'token')
+											uni.setStorageSync('token', e.data.token);
+											getUserInfo({}).then(e => {
+												obj.login();
+												// 保存返回用户数据
+												obj.setUserInfo(e.data);
+												//成功跳转首页
+												uni.switchTab({
+													url: '/pages/index/index'
+												});
+											});
+
+										})
+										.catch(function(e) {
+											console.log(e);
+										});
+								}
+
+							},
+							fail(es) {
+								uni.showModal({
+									content: JSON.stringify(es),
+									success() {
+										// obj.login();
+										// // 保存返回用户数据
+										// obj.setUserInfo(e.data);
+										// //成功跳转首页
+										// uni.switchTab({
+										// 	url: '/pages/index/index'
+										// });
+									}
+								});
+							}
+						});
+					},
+					fail(e) {
+						uni.showModal({
+							title: '提示',
+							content: JSON.stringify(e),
+							showCancel: false
+						});
+					}
+				});
+				// #endif
+			},
+			//登录
+			async toLogin() {
+				let obj = this;
+				obj.logining = true;
+				if (obj.account == '') {
+					obj.$api.msg(obj.$t("login.a1"));
+					// obj.$api.msg('132456789');
+					return;
+				}
+				if (obj.passward == '') {
+					obj.$api.msg(obj.$t("login.a3"));
+					// obj.$api.msg('132456');
+					return;
+				}
+				login({
+						account: obj.account,
+						password: obj.passward
+					})
+					.then(function(e) {
+						uni.setStorageSync('token', e.data.token);
+						getUserInfo({}).then(e => {
+							obj.login();
+							// 保存返回用户数据
+							obj.setUserInfo(e.data);
+							let ur = uni.getStorageSync('present') || '/pages/index/index';
+							//成功跳转首页
+							uni.switchTab({
+								url: ur,
+								fail(e) {
+									uni.navigateTo({
+										url: ur,
+										fail(e) {
+											uni.navigateTo({
+												url: '/pages/index/index',
+											});
+										}
+									});
+								}
+							});
+						});
+					})
+					.catch(function(e) {
+						console.log(e);
+					});
+			},
+			//跳转注册页
+			register() {
+				uni.navigateTo({
+					url: `/pages/public/register`
+				});
+			},
+			// 后退
+			navBack() {
+				uni.navigateBack();
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	/* #ifdef APP-PLUS */
+
+	.ios_login {
+		width: 260rpx;
+		border-radius: 12rpx;
+		justify-content: center;
+		border: 1px solid #212121;
+		margin: 24rpx auto;
+		padding: 10rpx;
+		background-color: #212121;
+		color: #ffffff;
+
+		.loginIcon {
+			width: 50rpx;
+			height: 50rpx;
+		}
+
+		.weixin_text {
+			line-height: 1;
+			margin-left: 20rpx;
+			color: #ffffff !important;
+		}
+	}
+
+	/* #endif */
+	.ios_login {
+		width: 350rpx;
+		border-radius: 12rpx;
+		justify-content: center;
+		border: 1px solid #212121;
+		margin: 24rpx auto;
+		padding: 15rpx;
+		background-color: #212121;
+		color: #ffffff;
+		font-size: 32rpx;
+
+		.loginIcon {
+			font-size: 35rpx;
+			width: 35rpx;
+			height: 35rpx;
+		}
+
+		.weixin_text {
+			line-height: 1;
+			margin-left: 20rpx;
+			color: #ffffff !important;
+		}
+	}
+
+	page {
+		height: 100%;
+	}
+
+	.container {
+		width: 100%;
+		height: 100%;
+		background-size: 100%;
+		background-color: #000000;
+	}
+
+	.container_text {
+		width: 100%;
+		height: 500rpx;
+		top: 0rpx;
+
+		.banner-img {
+			width: 144rpx;
+			height: 144rpx;
+			margin-top: 100rpx;
+			margin-left: 302rpx;
+		}
+	}
+
+	.login_text {
+		margin: auto 10rpx;
+		position: relative;
+		padding: 100rpx 102rpx;
+		background-color: #000000;
+		margin-top: -180rpx;
+		border-radius: 20rpx;
+
+		.login_input {
+			border-bottom: 1px solid #f0f0f0;
+			margin-bottom: 65rpx;
+
+			.login_img image {
+				height: 35rpx;
+				width: 29rpx;
+			}
+
+			.uni-input {
+				text-align: left;
+				width: 470rpx;
+				font-size: 28rpx !important;
+			}
+
+			.login_name {
+				color: #fff;
+			}
+		}
+
+		.other {
+			margin-top: 60rpx;
+
+			.fenge {
+				width: 30%;
+				height: 2rpx;
+				background-color: #eeeeee;
+			}
+
+			.qita {
+				font-size: 28rpx;
+				color: #999999;
+			}
+		}
+
+		.weixin {
+			width: 75rpx;
+			height: 75rpx;
+			margin: 25rpx auto;
+		}
+
+		.weixin image {
+			width: 100%;
+			height: 100%;
+		}
+
+		.weixin_text {
+			text-align: center;
+			font-size: 28rpx;
+			color: #999999;
+		}
+
+		.forget {
+			font-size: 28rpx;
+			width: 100%;
+			text-align: right;
+			color: #999999;
+		}
+
+		.uni-button-green {
+			color: #ffffff;
+			background-color: #feb041;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+		}
+
+		.uni-button-green-plain {
+			border: 1px solid #feb041;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			color: #feb041;
+			background-color: #000000;
+		}
+
+		.uni-button {
+			height: 85rpx;
+			line-height: 85rpx;
+		}
+	}
+
+	.loginTitle {
+		position: absolute;
+		top: 250rpx;
+		width: 100%;
+		text-align: center;
+		color: #cbb174;
+		font-size: 40rpx;
+	}
 </style>

+ 21 - 21
pages/public/register.vue

@@ -7,35 +7,35 @@
 		<view class="login_text">
 			<view class="login_input flex">
 				<view class="login_img">
-					<image src="/static/icon/img03.png"></image>
+					<image src="/static/icon/ze.png"></image>
 				</view>
 				<view class="login_name"><input class="uni-input" @input="checkAccount" v-model="account" focus
 						:placeholder="$t('login.a1')" /></view>
 			</view>
 			<view class="login_input flex">
 				<view class="login_img">
-					<image src="/static/icon/img04.png"></image>
+					<image src="/static/icon/ze2.png"></image>
 				</view>
 				<view class="login_name"><input class="uni-input" type="password" v-model="password" focus
 						:placeholder="$t('login.a3')" /></view>
 			</view>
 			<view class="login_input flex">
 				<view class="login_img">
-					<image src="/static/icon/img04.png"></image>
+					<image src="/static/icon/ze2.png"></image>
 				</view>
 				<view class="login_name"><input class="uni-input" type="password" v-model="trade_password" focus
 						:placeholder="$t('login.b3')" /></view>
 			</view>
 			<view class="login_input flex">
 				<view class="login_img">
-					<image src="/static/icon/img07.png"></image>
+					<image src="/static/icon/ze2.png"></image>
 				</view>
 				<view class="login_name"><input class="uni-input" type="text" v-model="spread" focus
 						:placeholder="$t('login.b4')" /></view>
 			</view>
 			<view class="login_input flex">
 				<view class="login_img">
-					<image src="/static/icon/img06.png"></image>
+					<image src="/static/icon/ze.png"></image>
 				</view>
 				<view class="login_name flex">
 					<input class="uni-input width" v-model="captcha" focus :placeholder="$t('login.b6')" />
@@ -225,7 +225,7 @@
 	}
 
 	.login_text {
-		margin: auto 30rpx;
+		margin: auto 10rpx;
 		position: relative;
 		padding: 100rpx 102rpx;
 		background-color: #000000;
@@ -239,7 +239,7 @@
 			.login_img image {
 				height: 35rpx;
 				width: 29rpx;
-				margin-right: 20rpx;
+				// padding-right: 20rpx;
 			}
 
 			.uni-input {
@@ -273,22 +273,22 @@
 			}
 		}
 
-		.weixin {
-			width: 75rpx;
-			height: 75rpx;
-			margin: 25rpx auto;
-		}
+		// .weixin {
+		// 	width: 75rpx;
+		// 	height: 75rpx;
+		// 	margin: 25rpx auto;
+		// }
 
-		.weixin image {
-			width: 100%;
-			height: 100%;
-		}
+		// .weixin image {
+		// 	width: 100%;
+		// 	height: 100%;
+		// }
 
-		.weixin_text {
-			text-align: center;
-			font-size: 28rpx;
-			color: #999999;
-		}
+		// .weixin_text {
+		// 	text-align: center;
+		// 	font-size: 28rpx;
+		// 	color: #999999;
+		// }
 
 		.forget {
 			font-size: 28rpx;

BIN
static/icon/ze.png


BIN
static/icon/ze2.png


BIN
static/icon/注册_slices.zip