whx 1 год назад
Родитель
Сommit
861e37a5d9
1 измененных файлов с 37 добавлено и 13 удалено
  1. 37 13
      virgo.wzfrontend/wx/pages/login/login.vue

+ 37 - 13
virgo.wzfrontend/wx/pages/login/login.vue

@@ -1,13 +1,13 @@
 <template>
 	<view class="login-container">
 		<view class="logo">
-			<img :src="logoImage" alt="" />
+			<image :src="logoImage" mode="aspectFill"></image>
 		</view>
 		<view class="form">
 			<view class="form-item">
 				<view class="form-input-item">
 					<view class="form-input-left">
-						<uni-icons type="person" size="24" color="#93959b"></uni-icons>
+						<uni-icons class="form-input-icons" type="person" size="24"></uni-icons>
 					</view>
 					<view class="form-input-content">
 						<input type="number" class="form-input" placeholder="请输入手机号" maxlength="11"
@@ -19,7 +19,7 @@
 			<view class="form-item">
 				<view class="form-input-item">
 					<view class="form-input-left">
-						<uni-icons type="email" size="24" color="#93959b"></uni-icons>
+						<uni-icons class="form-input-icons" type="email" size="24"></uni-icons>
 					</view>
 					<view class="form-input-content code-input-wrapper">
 						<input type="number" class="form-input" maxlength="6" placeholder="请输入验证码"
@@ -41,14 +41,14 @@
 			</view>
 			<!-- #endif -->
 		</view>
-		<y-modal :show="captchaShow" title="请填写图形验证码" @onConfirm="confirmHandle" @onCancel="captchaShow = false">
+		<model :show="captchaShow" title="请填写图形验证码" @onConfirm="confirmHandle" @onCancel="captchaShow = false">
 			<view class="code-input-container">
 				<input type="text" class="code-input" placeholder="输入图形验证码" maxlength="6" v-model="imgCode" />
 				<view class="code-canvas-wrapper">
 					<img v-if="codeImg" :src="codeImg" alt="图片验证码" class="code-image" @click="imgCodeFunc">
 				</view>
 			</view>
-		</y-modal>
+		</model>
 	</view>
 </template>
 
@@ -61,11 +61,11 @@
 	import {
 		isTel
 	} from '@/uitls/validate'
-	import yModal from "@/components/login/yModal.vue";
+	import model from "@/components/login/model.vue";
 	export default {
 		data() {
-			return {
-				logoImage:require('@/static/image/login/logo.png'),
+			return {
+				logoImage: require('@/static/image/login/logo.png'),
 				loginForm: {
 					phone: '18888888888',
 					phoneCode: '888888'
@@ -78,8 +78,9 @@
 			}
 		},
 		components: {
-			yModal
+			model
 		},
+		onLoad() {},
 		methods: {
 			getImageCode() {
 				if (!isTel(this.loginForm.phone)) return uni.showToast({
@@ -163,9 +164,10 @@
 						title: '登录成功',
 						icon: "none"
 					})
+					console.log(res.data);
 					setTimeout(() => {
 						uni.hideLoading();
-						uni.navigateBack();
+						// uni.navigateBack();
 					}, 400)
 				} else {
 					uni.hideLoading();
@@ -176,7 +178,7 @@
 	}
 </script>
 
-<style scoped lang="scss">
+<style lang="scss">
 	.login-container {
 		width: 100%;
 		height: 100%;
@@ -188,6 +190,11 @@
 			margin-top: 80rpx;
 			width: 150rpx;
 			height: 150rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
 		}
 
 		//弹出输入框
@@ -233,7 +240,7 @@
 				width: 100%;
 				border-radius: 200rpx;
 				height: 100rpx;
-				background-color: #fff;
+				background-color: $uni-white;
 				display: flex;
 				margin-bottom: 50rpx;
 
@@ -257,6 +264,18 @@
 					align-items: center;
 					margin-left: 30rpx;
 
+					.form-input-icons {
+						/* #ifdef H5 */
+						color: $uni-secondary-color !important;
+
+						/* #endif */
+						/* #ifdef MP-WEIXIN */
+						text {
+							color: $uni-secondary-color !important;
+						}
+
+						/* #endif */
+					}
 				}
 
 				// 手机号信息
@@ -336,7 +355,7 @@
 				border-radius: 200rpx;
 				padding: 24rpx 32rpx;
 				line-height: 40rpx;
-				color: #fff;
+				color: $uni-white;
 				background-color: $uni-primary;
 				font-size: 32rpx;
 
@@ -350,8 +369,13 @@
 			}
 
 			.wx-btn {
+				height: 88rpx;
+				padding: 24rpx 32rpx;
 				border-radius: 200rpx;
+				line-height: 40rpx;
 				font-size: 32rpx;
+				color: $uni-white;
+				background-color: $uni-success;
 
 				&::after {
 					display: none;