tanxue 7 mesiacov pred
rodič
commit
cfe164c5f0

+ 78 - 0
pages/login/index.vue

@@ -0,0 +1,78 @@
+<template>
+  <view class="ezy-login-page">
+	  <view class="ezy-login-wrap" >
+			<!-- 手机号 -->
+				<view class="login-body-box">
+					<view class="login-title-img"></view>
+				    <view class="phone-input-box">
+						<view class="phone-prefix">+86</view>
+						<input class="phone-input" type="text" v-model="data.phoneNumber" placeholder="请输入手机号" 
+						maxlength="11" :value="data.phoneNumber" @input="clearTelInput" />
+						<view class="close-btn" v-if="data.clearTelIcon" @click="clearTel"></view>
+				    </view>
+					<!-- 协议勾选框和按钮 -->
+					<view class="agreement-checkbox-box">
+						<checkbox class="agreement-checkbox" color="#FFFFFF" :checked="data.isAgreed" @change="handleAgreementChange">
+						  我已阅读并同意<view class="agreement-text">《用户协议》</view>和<view class="agreement-text">《隐私政策》</view>
+						</checkbox>
+					</view>
+					<view class="yzm-btn-disabled" @click="getYzmBtn" :class="data.telStatus"></view>
+				</view>
+				<view class="wx-btn-img"></view>
+		</view>
+		  
+  </view>
+</template>
+
+<script setup>
+	import {
+		ref,
+		reactive
+	} from "vue"
+	
+	const data = reactive({
+		phoneNumber: null,
+		clearTelIcon: false,
+		telStatus:'',
+		isAgreed: false,
+	})
+	
+	const getYzmBtn = () => {
+		console.log('123');
+		uni.navigateTo({
+			url: `/pages/login/login?telNum=${data.phoneNumber}`
+		})
+	}
+	
+	// 手机号校验规则
+	const validatePhoneNumber = (value) => {
+	  const phoneRegex = /^1[3-9]\d{9}$/;
+	  if (phoneRegex.test(value)) {
+		console.log('手机号格式正确');
+		data.telStatus = 'yzm-btn-normal';
+	  } else {
+	    console.log('手机号格式不正确');
+	  }
+	}
+	
+	const clearTelInput = (event) => {
+	    if (event.detail.value.length > 0) {
+	        data.clearTelIcon = true;
+			validatePhoneNumber(event.detail.value);
+	    } else {
+	        data.clearTelIcon = false;
+	    }
+	}
+			
+	const clearTel = () => {
+		data.phoneNumber = '';
+		data.clearTelIcon = false;
+	}
+	
+	const handleAgreementChange= () => {
+		console.log(data.isAgreed,'data.isAgreed');
+		if(data.isAgreed){
+			data.isAgreed = !data.isAgreed;
+		}
+	}
+</script>

+ 56 - 0
pages/login/login.vue

@@ -0,0 +1,56 @@
+<template>
+  <view class="ezy-login-page">
+	  <view class="ezy-login-wrap" >
+			<view class="login-body-box">
+				<view class="login-title-img"></view>
+				<view class="phone-prefix">验证码已发送至:{{data.phoneNumber}}</view>
+				<view class="phone-input-box">
+					<input class="phone-input" type="text" v-model="data.yzmNumber" placeholder="请输入验证码" 
+					maxlength="6" :value="data.yzmNumber" @input="clearYzmInput" />
+					<view class="close-btn" v-if="data.clearYzmIcon" @click="clearYzm"></view>
+				</view>
+				<view class="yzm-btn-disabled" @click="loginBtn" :class="data.yzmStatus"></view>
+			</view>
+		</view>
+		  
+  </view>
+</template>
+
+<script setup>
+	import {
+		ref,
+		reactive
+	} from "vue"
+	
+	const data = reactive({
+		phoneNumber: null,
+		yzmNumber: null,
+		clearYzmIcon: false,
+		yzmStatus:'',
+	})
+	
+	/********* 验证码 *********/
+	const loginBtn = () => {
+		uni.switchTab({
+			url: '/pages/study/index'
+		});
+		/* uni.navigateTo({
+			url: `/pages/study/index?gradeId=${options.grade}&termId=${options.term}&text=${text1}${text2}`
+		}) */
+	}
+	
+	const clearYzmInput = (event) => {
+		if (event.detail.value.length > 0) {
+		    data.clearYzmIcon = true;
+		} else {
+		    data.clearYzmIcon = false;
+		}
+	}
+	
+	const clearYzm = () => {
+		data.yzmNumber = '';
+		data.clearYzmIcon = false;
+	}
+	
+	
+</script>

+ 70 - 0
pages/my/index.vue

@@ -0,0 +1,70 @@
+<template>
+	<view class="lli-develop-expect-page">
+			<button class="lli-btn" @click="quit">退出登录</button>
+	</view>
+</template>
+
+<script setup>
+	import {
+		logout
+	} from '@/api/login.js'
+	
+	
+	const quitClick = ()=>{
+		uni.showModal({
+		        title: '提示',
+		        content: '你确定要执行这个操作吗?',
+		        success: (res) => {
+		          if (res.confirm) {
+		            // 用户点击了确定按钮,执行你的操作
+		            console.log('用户点击了确定');
+		           quit()
+		          } else if (res.cancel) {
+		            // 用户点击了取消按钮
+		            console.log('用户点击了取消');
+		          }
+		        }
+		      });
+		
+		 }
+	const quit = ()=>{
+			uni.navigateTo({
+				url: '/pages/login/index'
+			});
+		
+		 }
+		 
+	// import { ref, onMounted } from 'vue';
+	//
+	// const listData = ref([]);
+	// const page = ref(1);
+	// const pageSize = ref(10);
+	// const isLoading = ref(false);
+	// const noMoreData = ref(false);
+	//
+	// // 加载
+	// const loadData = async () => {
+	// 	if (isLoading.value || noMoreData.value) return;
+	// 	isLoading.value = true;
+	// 	const newData = await fetchData(page.value, pageSize.value); // 假设 fetchData 是你的请求函数
+	// 	if (newData.length > 0) {
+	// 		listData.value = listData.value.concat(newData);
+	// 		page.value++;
+	// 	} else {
+	// 		noMoreData.value = true;
+	// 	}
+	// 	isLoading.value = false;
+	// };
+	// onMounted(() => {
+	// 	loadData();
+	// });
+	//
+	// // 下拉加载更多
+	// const loadMore = () => {
+	// 	loadData();
+	// };
+</script>
+
+<style>
+
+</style>

BIN
static/images/tabbar/select/develop-sj.png


BIN
static/images/tabbar/select/partner-sj.png


BIN
static/images/tabbar/select/plan-sj.png


BIN
static/images/tabbar/tabbar-bg.png


BIN
static/images/tabbar/unselect/develop-sj.png


BIN
static/images/tabbar/unselect/partner-sj.png


BIN
static/images/tabbar/unselect/plan-sj.png