Преглед на файлове

Merge branch 'master' of http://139.9.50.163:3000/Project2024/menber-center

LinWuTai преди 2 месеца
родител
ревизия
483d18a18e

+ 18 - 5
components/lgSwiper.vue

@@ -1,14 +1,14 @@
 <template>
 	<view class="container">
 		<swiper class="swiper" :circular="true" :autoplay="false" :duration="500" :previous-margin="'200rpx'"
-			:next-margin="'200rpx'" :style="{ height: '300rpx' }" :current="currentIndex" 
+			:next-margin="'200rpx'" :style="{ height: '300rpx' }" :current="currentIndex"
 			:easing-function="easeInOutCubic"
 			@change="changeCurrent">
 			<swiper-item v-for="(slide, index) in processedSildeItems" :key="index" style="overflow: initial;"
-				:class="index==currentIndex? 'swiper-item-active':'swiper-item-normal'">
+				:class="index==currentIndex? 'swiper-item-active':'swiper-item-normal'" @click="swiperClick(slide)">
 				<view :class="index==currentIndex? 'swiper-item active':'swiper-item'">
-					<image style="width: 100%;height: 90%;" mode="aspectFill" :src="slide.tupian"></image>
-					<text class="swiper-text">{{ slide.biaoti }}</text>
+					<image style="width: 100%;height: 90%;" mode="aspectFill" :src="slide[image]"></image>
+					<text class="swiper-text">{{ slide[title] }}</text>
 				</view>
 			</swiper-item>
 		</swiper>
@@ -25,12 +25,25 @@
 		methods: {
 			changeCurrent(e) {
 				this.currentIndex = e.detail.current
+			},
+			swiperClick(data){
+				this.$emit('swiperClick', data);
 			}
 		},
 		props: {
 			sildeItems: {
 				type: Array,
 				required: true
+			},
+			image: {
+				type: String,
+				required: false,
+				default: "image"
+			},
+			title: {
+				type: String,
+				required: false,
+				default: "title"
 			}
 		},
 		computed: {
@@ -100,4 +113,4 @@
 			text-overflow: ellipsis;
 		}
 	}
-</style>
+</style>

+ 4 - 4
pages.json

@@ -245,7 +245,7 @@
 		{
 			"path" : "pages/goOnEdu/course/index",
 			"style" : {
-				"navigationBarBackgroundColor": "#FFFFFF",
+				"navigationBarBackgroundColor": "#ffffff",
 				"navigationBarTitleText": "培训课程",
 				"enablePullDownRefresh": false,
 				"app-plus": {
@@ -266,7 +266,7 @@
 		},
 		{
 			"path" : "pages/huiFeiJiaoJiao/huiFeiJiaoJiao",
-			"style" : 
+			"style" :
 			{
 				"navigationBarTitleText" : "会费缴交",
 				"navigationBarBackgroundColor": "#8dccff",
@@ -277,7 +277,7 @@
 		},
 		{
 			"path" : "pages/geRenHuiFeiJiaoJiao/geRenHuiFeiJiaoJiao",
-			"style" : 
+			"style" :
 			{
 				"navigationBarTitleText" : "个人会费缴交",
 				"enablePullDownRefresh": false,
@@ -288,7 +288,7 @@
 		},
 		{
 			"path" : "pages/daiJiaoGeRenHuiFei/daiJiaoGeRenHuiFei",
-			"style" : 
+			"style" :
 			{
 				"navigationBarTitleText" : "代缴个人会费",
 				"enablePullDownRefresh": false,

+ 30 - 30
pages/forget/forget.vue

@@ -2,20 +2,20 @@
 	<view class="container">
 		<u-form :model="forgetForm" ref="forgetForm" label-width="160"
 			:label-style="{ color: '#000', fontSize: '30rpx'}">
-			<u-form-item label="手机号" prop="shoujihao" :border-bottom="false">
-				<u-input height="80" placeholder="请输入手机号" border-color="#d0d0d0" v-model="forgetForm.shoujihao"
+			<u-form-item label="手机号" prop="shouJiHao" :border-bottom="false">
+				<u-input height="80" placeholder="请输入手机号" border-color="#d0d0d0" v-model="forgetForm.shouJiHao"
 					:border="true" class="form-item-input" type="number" />
 			</u-form-item>
-			<u-form-item label="验证码" prop="yanzhengma" :border-bottom="false">
+			<u-form-item label="验证码" prop="yanZhengMa" :border-bottom="false">
 				<view class="code-form-item">
-					<u-input height="80" placeholder="请输入验证码" border-color="#d0d0d0" v-model="forgetForm.yanzhengma"
+					<u-input height="80" placeholder="请输入验证码" border-color="#d0d0d0" v-model="forgetForm.yanZhengMa"
 						:border="true" class="form-item-input code-input">
 					</u-input>
 					<u-button size="mini" type="primary" class="code-button" @click="getCode">{{ tips }}</u-button>
 				</view>
 			</u-form-item>
-			<u-form-item label="新密码" prop="xinmima" :border-bottom="false">
-				<u-input height="80" placeholder="请输入新密码" border-color="#d0d0d0" v-model="forgetForm.xinmima"
+			<u-form-item label="新密码" prop="xinMiMa" :border-bottom="false">
+				<u-input height="80" placeholder="请输入新密码" border-color="#d0d0d0" v-model="forgetForm.xinMiMa"
 					:border="true" class="form-item-input" type="password" />
 			</u-form-item>
 			<view class="form-button" @click="submit">
@@ -28,7 +28,7 @@
 				<text class="popup-title">请输入验证码</text>
 				<view class="popup-content">
 					<u-input height="80" placeholder="请输入验证码" border-color="#d0d0d0"
-						v-model="shuzijiaoduimaForm.shuzijiaoduima" :border="true" class="form-item-input"
+						v-model="shuzijiaoduimaForm.shuZiJiaoDuiMa" :border="true" class="form-item-input"
 						style="flex-grow: 1;" @confirm="submitCode" />
 					<image :src="shuzijiaoduimaSrc" mode="aspectFit"
 						style="height:40px;margin-left:20rpx;width: 180rpx;flex: 0 0 auto;"></image>
@@ -51,8 +51,8 @@
 			return {
 				// ----验证码 start -----
 				shuzijiaoduimaForm: {
-					shuzijiaoduima: '',
-					shuzijiaoduimaUuid: ''
+					shuZiJiaoDuiMa: '',
+					shuZiJiaoDuiMaUuid: ''
 				},
 				shuzijiaoduimaSrc: 'https://imgconvert.csdnimg.cn/aHR0cDovL3RjLnhpYW55dWNvZGVyLmNuL2Jsb2cyMDIwMDEwNDIwMzUwNy5wbmc?x-oss-process=image/format,png',
 				show: false,
@@ -60,23 +60,23 @@
 				seconds: 60,
 				// ----验证码 end -----
 				forgetForm: {
-					shoujihao: '', //手机号
-					yanzhengma: "", //验证码
-					yanzhengmaUuid: "",
-					xinmima: '', // 新密码
+					shouJiHao: '', //手机号
+					yanZhengMa: "", //验证码
+					yanZhengMaUuid: "",
+					xinMiMa: '', // 新密码
 				},
 				rules: {
-					yanzhengma: [{
+					yanZhengMa: [{
 						required: true,
 						message: '请输入验证码',
 						trigger: ['blur']
 					}],
-					xinmima: [{
+					xinMiMa: [{
 						required: true,
 						message: '请输入新密码',
 						trigger: ['blur']
 					}],
-					shoujihao: [{
+					shouJiHao: [{
 						required: true,
 						message: '请输入手机号码',
 						trigger: ['blur']
@@ -111,8 +111,8 @@
 				this.tips = text;
 			},
 			getCode() {
-				let { shoujihao } = this.forgetForm
-				if(!/^1[3-9]\d{9}$/.test(shoujihao)){
+				let { shouJiHao } = this.forgetForm
+				if(!/^1[3-9]\d{9}$/.test(shouJiHao)){
 					msg("请输入正确的手机号");
 					return;
 				}
@@ -146,11 +146,11 @@
 			},
 			closePopup() {
 				this.show = false;
-				this.shuzijiaoduimaForm.shuzijiaoduima = ''; // 清空输入框
+				this.shuzijiaoduimaForm.shuZiJiaoDuiMa = ''; // 清空输入框
 			},
 			async submitCode() {
-				let { shuzijiaoduima } = this.shuzijiaoduimaForm
-				if (!/^\d{4}$/.test(shuzijiaoduima)) {
+				let { shuZiJiaoDuiMa } = this.shuzijiaoduimaForm
+				if (!/^\d{4}$/.test(shuZiJiaoDuiMa)) {
 					uni.showToast({
 						title: '请输入4位验证码',
 						icon: 'none'
@@ -168,12 +168,12 @@
 				// }
 				// // 发送手机验证码
 				// const codeRes = await getCodeApi();
-				// if(codeRes && codeRes.yanzhengmaUuid){
-				// 	this.forgetForm.yanzhengmaUuid = codeRes.yanzhengmaUuid
+				// if(codeRes && codeRes.yanZhengMaUuid){
+				// 	this.forgetForm.yanZhengMaUuid = codeRes.yanZhengMaUuid
 				// 	this.closePopup();
 				// 	this.$refs.uCode1.start()
 				// }
-			
+
 				uni.showLoading({
 					title: '正在校验验证码'
 				})
@@ -188,7 +188,7 @@
 			async loadImage() {
 				// 联调
 				// const img = await loadShuzijiaoduima();
-				// this.shuzijiaoduimaForm.shuzijiaoduimaUuid = img.shuzijiaoduimaUuid
+				// this.shuzijiaoduimaForm.shuZiJiaoDuiMaUuid = img.shuZiJiaoDuiMaUuid
 				// this.shuzijiaoduimaSrc = img.shuzijiaoduimaSrc
 				console.log("加载图片")
 			}
@@ -260,12 +260,12 @@
 			transform: translateY(-50%);
 		}
 	}
-	
+
 	// 数字验证码弹窗
 	.popup {
 		padding: 40rpx;
 		border-radius: 20rpx;
-	
+
 		.popup-title {
 			font-size: 18px;
 			text-align: center;
@@ -273,16 +273,16 @@
 			width: 100%;
 			// margin-bottom: 15px;
 		}
-	
+
 		.popup-content {
 			display: flex;
 			align-items: center;
 			margin: 50rpx 0;
 		}
-	
+
 		.popup-btn {
 			display: flex;
 			justify-content: space-between;
 		}
 	}
-</style>
+</style>

+ 269 - 8
pages/goOnEdu/course/component/courseHome/courseHome.vue

@@ -1,19 +1,280 @@
 <template>
-	<view>
-		shouye
+	<view class="container">
+		<!-- 搜索 -->
+		<u-search @search="search" :show-action="false" shape="round" placeholder="搜索您想要的内容" v-model="searchWord"></u-search>
+		<!-- tabs -->
+		<view style="padding-top: 20rpx;display: flex;">
+			<u-tabs style="flex: 1;"  :list="tabsList" :is-scroll="true" font-size="24" :bold="false"
+				inactive-color="#000000" active-color="#000000" :bar-style="{'background-color': '#2979ff'}"
+				:gutter="30" height="45" v-model="currentTab" @change="changeTab"></u-tabs>
+			<u-icon name="list" style="flex: 0 0 auto;padding-left: 20rpx;"></u-icon>
+		</view>
+		<!-- 列表 -->
+		<view class="course-list">
+			<view v-for="course in filterCourses" :key="course.id">
+				<view class="course-item">
+					<view class="course-item-image">
+						<image class="course-image" :src="course.keChengTuPian" mode="aspectFill"></image>
+					</view>
+					<view class="course-item-content">
+						<view class="course-title">{{ course.keChengMingCheng }}</view>
+						<view class="course-type">{{ course.keChengLeXing }}</view>
+						<view class="course-teacher">
+							<u-icon name="account" size="28"></u-icon>
+							{{ course.shouKeZhe }}
+						</view>
+						<view class="course-date">
+							<u-icon name="clock" size="28"></u-icon>
+							{{ getDateWeek(course.shouKeShiJian) }}
+						</view>
+						<view class="course-price">¥{{ course.jiaGe }}元</view>
+						<button :class="['button', getButtonClass(course)]">{{ getButtonText(course) }}</button>
+					</view>
+				</view>
+				<u-line />
+			</view>
+		</view>
 	</view>
 </template>
 
-<script>
-	export default {
-		data() {
-			return {
+<script setup>
+	import {
+		ref
+	} from 'vue';
+	import { onLoad } from '@dcloudio/uni-app'
+	const searchWord = ref("")
+	const tabsList = ref([{
+		name: '全部'
+	}, {
+		name: '精英训练营'
+	}, {
+		name: '领袖锻造营'
+	}, {
+		name: '合规专训营'
+	}]);
+	const currentTab = ref(0)
+	// 展示的课程
+	const filterCourses = ref([]);
+	const courses = ref([{
+			id: 1,
+			keChengMingCheng: "前端开发基础",
+			keChengLeXing: "精英训练营",
+			shouKeZhe: "张老师",
+			shouKeShiJian: "2023-10-01",
+			keChengTuPian: "https://tse3-mm.cn.bing.net/th/id/OIP-C.YKoZzgmubNBxQ8j-mmoTKAHaEK?rs=1&pid=ImgDetMain",
+			jiaGe: 99.00,
+			isMaiFei: true,
+			isGouMai: false,
+			isJieShu: false,
+			isHuiYuanMianFei: false,
+			isShouCang: false // 新增字段,标识是否收藏
+		},
+		{
+			id: 2,
+			keChengMingCheng: "Vue.js 从入门到精通",
+			keChengLeXing: "领袖锻造营",
+			shouKeZhe: "李老师",
+			shouKeShiJian: "2023-09-15",
+			keChengTuPian: "https://pic3.zhimg.com/v2-e52354ffdbd94a8e0a7649eacd34a788_r.jpg?source=1940ef5c",
+			jiaGe: 199.00,
+			isMaiFei: false,
+			isGouMai: false,
+			isJieShu: false,
+			isHuiYuanMianFei: false,
+			isShouCang: false // 新增字段,标识是否收藏
+		},
+		{
+			id: 3,
+			keChengMingCheng: "React 开发实战",
+			keChengLeXing: "领袖锻造营",
+			shouKeZhe: "王老师",
+			shouKeShiJian: "2023-11-05",
+			keChengTuPian: "https://desk-fd.zol-img.com.cn/t_s960x600c5/g4/M03/00/0C/Cg-4zFS8bC-Ie9zBADCvovJAqiEAATJ8wDX__cAMK-6184.jpg",
+			jiaGe: 149.00,
+			isMaiFei: false,
+			isGouMai: false,
+			isJieShu: false,
+			isHuiYuanMianFei: true,
+			isShouCang: false // 新增字段,标识是否收藏
+		},
+		{
+			id: 4,
+			keChengMingCheng: "Node.js 全栈开发",
+			keChengLeXing: "合规专训营",
+			shouKeZhe: "赵老师",
+			shouKeShiJian: "2023-08-20",
+			keChengTuPian: "https://pic3.zhimg.com/v2-e52354ffdbd94a8e0a7649eacd34a788_r.jpg?source=1940ef5c",
+			jiaGe: 299.00,
+			isMaiFei: false,
+			isGouMai: true,
+			isJieShu: true,
+			isHuiYuanMianFei: false,
+			isShouCang: false // 新增字段,标识是否收藏
+		},
+		{
+			id: 5,
+			keChengMingCheng: "移动端开发技巧移动端开发技巧移动端开发技巧",
+			keChengLeXing: "精英训练营",
+			shouKeZhe: "钱老师",
+			shouKeShiJian: "2023-07-18",
+			keChengTuPian: "https://desk-fd.zol-img.com.cn/t_s960x600c5/g4/M03/00/0C/Cg-4zFS8bC-Ie9zBADCvovJAqiEAATJ8wDX__cAMK-6184.jpg",
+			jiaGe: 89.00,
+			isMaiFei: false,
+			isGouMai: true,
+			isJieShu: false,
+			isHuiYuanMianFei: false,
+			isShouCang: false // 新增字段,标识是否收藏
+		}
+	]);
+	// 按钮的文字
+	function getButtonText(course) {
+		if (course.isMaiFei) return "免费";
+		if (course.isGouMai) return course.isJieShu ? "点击查看回放" : "点击查看";
+		if (course.isHuiYuanMianFei) return "会员免费";
+		return "点击购买";
+	}
+	// 按钮的样式
+	function getButtonClass(course) {
+		if (course.isMaiFei) return 'free';
+		if (course.isGouMai) return course.isJieShu ? 'replay' : 'purchased';
+		if (course.isHuiYuanMianFei) return 'member-free';
+		return 'purchase';
+	}
+	// 日期格式:xxxx年xx月xx日(星期x)
+	function getDateWeek(val) {
+		const date = new Date(val);
+		const daysOfWeek = ['日', '一', '二', '三', '四', '五', '六'];
+		const year = date.getFullYear();
+		const month = date.getMonth() + 1; // 注意:月份从0开始
+		const day = date.getDate();
+		const dayOfWeek = daysOfWeek[date.getUTCDay()];
+		// const result = `${year}年${month}月${day}日(星期${dayOfWeek})`
+		return `${year}年${month}月${day}日(星期${dayOfWeek})`
+	}
 
-			};
+	function changeTab(index) {
+		if(index===0){
+			filterCourses.value = courses.value
+			return
 		}
+		filterCourses.value = courses.value.filter(item=> item.keChengLeXing == tabsList.value[index].name )
 	}
+	// 搜索
+	function search(e){
+		console.log(e,"searchword")
+	}
+	// 初始化
+	function init () {
+		// 初始化页面,获取数据
+		filterCourses.value = courses.value
+		searchWord.value = ""
+	}
+	onLoad(() => {
+		init()
+	})
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
+	.container {
+		// padding: 20px;
+	}
+
+	.title {
+		font-size: 48rpx;
+		margin-bottom: 30rpx;
+	}
+
+	.course-item {
+		margin: 20rpx 0;
+		display: flex;
+		overflow: hidden;
+
+		.course-item-image {
+			width: 200rpx;
+			height: 260rpx;
+			flex: 0 0 auto;
+			margin-right: 20rpx;
+
+			.course-image {
+				width: 100%;
+			}
+
+		}
+
+		.course-item-content {
+			flex: 1;
+			position: relative;
+
+			view {
+				margin-bottom: 15rpx;
+			}
+
+			.course-title {
+				font-weight: bold;
+				margin-right: 10px;
+				font-size: 28rpx;
+				color: #000;
+			}
+
+			.course-type,
+			.course-teacher,
+			.course-date,
+			.course-price {
+				font-size: 24rpx;
+				color: #000;
+			}
+
+			.course-price {
+				color: #fe0000;
+				letter-spacing: 2rpx;
+			}
+			.button::after {
+			  content: none; /* 移除内容 */
+			}
+			.button {
+				position: absolute;
+				right: 0;
+				bottom: 0;
+				min-width: 80px;
+				padding: 0 40rpx;
+				white-space: nowrap;
+				height: 45rpx;
+				line-height: 45rpx;
+				font-size: 22rpx;
+				/* padding: 0; */
+				border-radius: 50rpx;
+				color: white;
+				border: none;
+			}
+			.free {
+				background-color: #006af4;
+			}
+
+			.purchase {
+				background-color: #fe0000;
+			}
+
+			.member-free {
+				background-color: transparent;
+				background-image: url('~@/static/images/bg-label.png');
+				background-size: cover;
+				background-repeat: no-repeat;
+				color: #000;
+				    height: initial;
+				    padding: 6rpx 0 3rpx;
+				    border-radius: 0;
+			}
+
+			.replay {
+				background-color: #006af4;
+			}
+
+			.purchased {
+				background-color: #006af4;
+			}
+		}
+	}
+
+
 
 </style>

+ 34 - 5
pages/goOnEdu/course/component/courseMine/courseMine.vue

@@ -1,6 +1,9 @@
 <template>
-	<view>
-		wode
+	<view class="container">
+		<view class="btn-list-item" v-for="(btn,index) in btnList" :key="index">
+			<text>{{btn.name}}</text>
+			<u-icon name="arrow-right" size="20"></u-icon>
+		</view>
 	</view>
 </template>
 
@@ -8,12 +11,38 @@
 	export default {
 		data() {
 			return {
-
+				btnList: [
+					{
+						id: "1",
+						path: "",
+						name: "观看记录"
+					},
+					{
+						id: "2",
+						path: "",
+						name: "学分明细"
+					},
+					{
+						id: "3",
+						path: "",
+						name: "我的收藏"
+					},
+				]
 			};
 		}
 	}
 </script>
 
-<style lang="scss">
-
+<style lang="scss" scoped>
+	.btn-list-item{
+		background-color: #fff;
+		width: 100%;
+		margin: 20rpx 0;
+		padding: 20rpx 25rpx;
+		display: flex;
+		justify-content: space-between;
+		border-radius: 10rpx;
+		border: 1px solid rgba(211, 211, 211, 0.5);
+		color: #000;
+	}
 </style>

+ 24 - 7
pages/goOnEdu/course/index.vue

@@ -1,10 +1,10 @@
 <template>
 	<view class="container">
-		<view class="content">
+		<view class="content" :class="tabValue">
 			<course-home v-if="tabValue === 'courseHome'"></course-home>
 			<course-mine v-if="tabValue === 'courseMine'"></course-mine>
 		</view>
-
+		<view class="tabbar-block"></view>
 		<view class="tabbar">
 			<view  class="tab-item" :class="{ active: tabValue === 'courseHome' }" @click="selectTab('courseHome')">
 				<image src="/static/tabbar-icon/home-fill.png" v-if="tabValue === 'courseHome'"></image>
@@ -52,31 +52,48 @@
 	.content {
 		flex: 1;
 		/* 内容区填充剩余空间 */
-		padding: 10px;
+		padding: 0 30rpx;
+
 		/* 内边距 */
 	}
-
+	.courseHome {
+		background-color: #fff;
+	}
+	.courseMine {
+		background-color: #f7f7f7;
+	}
+	.tabbar-block {
+		flex: 0 0 auto;
+		height: 180rpx;
+		padding-bottom: env(safe-area-inset-bottom, 0);
+	}
 	.tabbar {
 		-webkit-tap-highlight-color: rgba(0,0,0,0);
+		position: fixed;
+		width: 100vw;
+		// height: 100rpx;
+		bottom: 0;
 		display: flex;
 		justify-content: space-around;
 		/* 平分 TabBar 各项 */
 		background-color: #fff;
 		/* TabBar 背景色 */
-		margin-bottom: env(safe-area-inset-bottom, 0);
+		padding-bottom: env(safe-area-inset-bottom, 0);
 		/* 避免与底部黑条重叠 */
 
 		/* 仅在上方添加阴影 */
 		box-shadow: 5px -1px 0px rgba(0, 0, 0, 0.1);
 		/* 上边阴影效果 */
-
+		height: 180rpx;
+		align-items: center;
 		border-top: none;
 		/* 去掉上边的边框,如果之前有的话 */
 		border-bottom: none;
 		/* 去掉下边的边框 */
 	}
 	.tab-item {
-		padding: 15rpx 0;
+
+		// padding: 15rpx 0;
 		flex: 1;
 		/* 每个 TabBar 项均分 */
 		text-align: center;

+ 71 - 62
pages/index/index.vue

@@ -9,7 +9,7 @@
 			<swiper class="swiper" circular indicator-dots style="border-radius: 20rpx;overflow: hidden;height: 200px">
 				<swiper-item v-for="(data, index) in swiperList" style="width: 100%;height: 100%;" :key="index">
 					<view class="swiper-item" style="width: 100%;height: 100%;">
-						<image :src="data.tupian" mode="aspectFill" style="width: 100%;height: 100%;"></image>
+						<image :src="data.tuPian" mode="aspectFill" style="width: 100%;height: 100%;"></image>
 					</view>
 				</swiper-item>
 			</swiper>
@@ -22,15 +22,17 @@
 					</u-grid-item>
 				</template>
 			</u-grid>
-			<u-card padding="20" margin="0rpx 0rpx 30rpx" border-radius="20" box-shadow="0px 2px 5px rgba(0, 0, 0, 0.1)">
+			<u-card padding="20" margin="0rpx 0rpx 30rpx" border-radius="20"
+				box-shadow="0px 2px 5px rgba(0, 0, 0, 0.1)">
 				<template v-slot:head>
 					<u-section title="课程预告" sub-title="查看更多" sub-color="#000000"></u-section>
 				</template>
 				<template v-slot:body>
-					<lg-swiper :sildeItems="courseList"></lg-swiper>
+					<lg-swiper :sildeItems="courseList" @swiperClick="swiperClick" image="keChengTuPian"  title="keChengMingCheng"></lg-swiper>
 				</template>
 			</u-card>
-			<u-card padding="20" margin="0rpx 0rpx 30rpx" border-radius="20" box-shadow="0px 2px 5px rgba(0, 0, 0, 0.1)">
+			<u-card padding="20" margin="0rpx 0rpx 30rpx" border-radius="20"
+				box-shadow="0px 2px 5px rgba(0, 0, 0, 0.1)">
 				<template v-slot:head>
 					<u-section title="研究报告" sub-title="查看更多" sub-color="#000000"></u-section>
 				</template>
@@ -38,19 +40,19 @@
 					<view>
 						<view v-for="(data,index) in reportList" :key="index" class="u-body-item u-flex u-p-t-0 "
 							style="align-items: inherit;">
-							<image :src="data.tupian" mode="aspectFill"></image>
+							<image :src="data.tuPian" mode="aspectFill"></image>
 							<view class="u-body-item-content">
 								<view class="item-content">
-									<text class="item-content-title text-ellipsis">{{data.biaoti}}</text>
-									<text class="item-content-type">{{data.leixing}}</text>
-									<text class="item-content-price" v-if="!data.huiyuanmianfei">¥{{data.jiage}}元</text>
+									<text class="item-content-title text-ellipsis">{{data.biaoTi}}</text>
+									<text class="item-content-type">{{data.leiXing}}</text>
+									<text class="item-content-price" v-if="!data.huiYuanMianFei">¥{{data.jiaGe}}元</text>
 								</view>
 								<view class="item-button">
-									<view v-if="!data.huiyuanmianfei && data.yigoumai" class="item-button-yigoumai">已购买
+									<view v-if="!data.huiYuanMianFei && data.yiGouMai" class="item-button-yiGouMai">已购买
 									</view>
-									<view v-else-if="!data.huiyuanmianfei && !data.yigoumai" class="item-button-goumai">
+									<view v-else-if="!data.huiYuanMianFei && !data.yiGouMai" class="item-button-goumai">
 										点击购买</view>
-									<view v-else-if="data.huiyuanmianfei" class="item-button-huiyuan">
+									<view v-else-if="data.huiYuanMianFei" class="item-button-huiyuan">
 										会员免费
 									</view>
 								</view>
@@ -89,41 +91,41 @@
 	const navBarHeight = ref(0)
 	// 是否登录
 	const isLogin = ref(true)
-	
+
 	const loginModal = ref(false)
 	// 是否为会员,从缓存里拿取用户信息
 	// const userInfo = uni.getStorageSync("userinfo") || {}
 	// const isMember = userInfo?.isMember || false
-    
+
 	// 首页-轮播图
 	const swiperList = ref([{
-			tupian: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.YKoZzgmubNBxQ8j-mmoTKAHaEK?rs=1&pid=ImgDetMain',
+			tuPian: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.YKoZzgmubNBxQ8j-mmoTKAHaEK?rs=1&pid=ImgDetMain',
 			id: '01'
 		},
 		{
-			tupian: 'https://pic3.zhimg.com/v2-e52354ffdbd94a8e0a7649eacd34a788_r.jpg?source=1940ef5c',
+			tuPian: 'https://pic3.zhimg.com/v2-e52354ffdbd94a8e0a7649eacd34a788_r.jpg?source=1940ef5c',
 			id: '02'
 		},
 		{
-			tupian: 'https://desk-fd.zol-img.com.cn/t_s960x600c5/g4/M03/00/0C/Cg-4zFS8bC-Ie9zBADCvovJAqiEAATJ8wDX__cAMK-6184.jpg',
+			tuPian: 'https://desk-fd.zol-img.com.cn/t_s960x600c5/g4/M03/00/0C/Cg-4zFS8bC-Ie9zBADCvovJAqiEAATJ8wDX__cAMK-6184.jpg',
 			id: '03'
 		},
 	])
-	
+
 	const courseList = ref([{
-			tupian: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.YKoZzgmubNBxQ8j-mmoTKAHaEK?rs=1&pid=ImgDetMain',
+			keChengTuPian: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.YKoZzgmubNBxQ8j-mmoTKAHaEK?rs=1&pid=ImgDetMain',
 			id: '01',
-			biaoti: '挑剔1111111111'
+			keChengMingCheng: '挑剔1111111111'
 		},
 		{
-			tupian: 'https://pic3.zhimg.com/v2-e52354ffdbd94a8e0a7649eacd34a788_r.jpg?source=1940ef5c',
+			keChengTuPian: 'https://pic3.zhimg.com/v2-e52354ffdbd94a8e0a7649eacd34a788_r.jpg?source=1940ef5c',
 			id: '02',
-			biaoti: '挑剔22231331231'
+			keChengMingCheng: '挑剔22231331231'
 		},
 		{
-			tupian: 'https://desk-fd.zol-img.com.cn/t_s960x600c5/g4/M03/00/0C/Cg-4zFS8bC-Ie9zBADCvovJAqiEAATJ8wDX__cAMK-6184.jpg',
+			keChengTuPian: 'https://desk-fd.zol-img.com.cn/t_s960x600c5/g4/M03/00/0C/Cg-4zFS8bC-Ie9zBADCvovJAqiEAATJ8wDX__cAMK-6184.jpg',
 			id: '03',
-			biaoti: '挑剔42341255243'
+			keChengMingCheng: '挑剔42341255243'
 		},
 	])
 	// 首页-导航栏
@@ -195,31 +197,31 @@
 
 	const reportList = ref(
 		[{
-				"biaoti": "2023年7月广州市中介促成二手住宅市场交易简报",
-				"tupian": "https://tse3-mm.cn.bing.net/th/id/OIP-C.YKoZzgmubNBxQ8j-mmoTKAHaEK?rs=1&pid=ImgDetMain",
-				"leixing": "月度成交简报",
-				"jiage": 150.80,
-				"yigoumai": true,
-				"huiyuanmianfei": false
+				"biaoTi": "2023年7月广州市中介促成二手住宅市场交易简报",
+				"tuPian": "https://tse3-mm.cn.bing.net/th/id/OIP-C.YKoZzgmubNBxQ8j-mmoTKAHaEK?rs=1&pid=ImgDetMain",
+				"leiXing": "月度成交简报",
+				"jiaGe": 150.80,
+				"yiGouMai": true,
+				"huiYuanMianFei": false
 			},
 			{
-				"biaoti": "成交有望稳中微升————2023年8月中介协会经理人指数报告经理人指数报告经理人指数报告",
-				"tupian": "https://pic3.zhimg.com/v2-e52354ffdbd94a8e0a7649eacd34a788_r.jpg?source=1940ef5c",
-				"leixing": "经理人指数报告",
-				"jiage": 200.88,
-				"yigoumai": false,
-				"huiyuanmianfei": false
+				"biaoTi": "成交有望稳中微升————2023年8月中介协会经理人指数报告经理人指数报告经理人指数报告",
+				"tuPian": "https://pic3.zhimg.com/v2-e52354ffdbd94a8e0a7649eacd34a788_r.jpg?source=1940ef5c",
+				"leiXing": "经理人指数报告",
+				"jiaGe": 200.88,
+				"yiGouMai": false,
+				"huiYuanMianFei": false
 			},
 			{
-				"biaoti": "2023年6月广州市住宅租金动态监测报告",
-				"tupian": "https://desk-fd.zol-img.com.cn/t_s960x600c5/g4/M03/00/0C/Cg-4zFS8bC-Ie9zBADCvovJAqiEAATJ8wDX__cAMK-6184.jpg",
-				"leixing": "月度租赁简报",
-				"jiage": 300.00,
-				"yigoumai": true,
-				"huiyuanmianfei": true
+				"biaoTi": "2023年6月广州市住宅租金动态监测报告",
+				"tuPian": "https://desk-fd.zol-img.com.cn/t_s960x600c5/g4/M03/00/0C/Cg-4zFS8bC-Ie9zBADCvovJAqiEAATJ8wDX__cAMK-6184.jpg",
+				"leiXing": "月度租赁简报",
+				"jiaGe": 300.00,
+				"yiGouMai": true,
+				"huiYuanMianFei": true
 			}
 		])
-
+	// 跳转页面
 	const jumpToPage = (data) => {
 		if (data.toOtherApp) {
 			// 跳转其他小程序
@@ -228,13 +230,14 @@
 		}
 		if (!authStore.isAuthenticated) {
 			loginModal.value = true
-			
+
 			return
 		}
 		uni.navigateTo({
 			url: data.url
 		})
 	}
+	// 确认跳转至登录
 	const confirmModal = () => {
 		uni.navigateTo({
 			url: "/pages/login/login"
@@ -248,6 +251,9 @@
 			return
 		}
 	}
+	const swiperClick = (data) => {
+		console.log(data, "课程预告数据")
+	}
 	onReady(() => {
 		uni.getSystemInfo({
 			success(e) {
@@ -258,7 +264,7 @@
 		})
 	})
 	onLoad(() => {
-		uni.setTabBarBadge({ //显示数字  
+		uni.setTabBarBadge({ //显示数字
 			index: 1, //tabbar下标
 			text: '999' //数字
 		})
@@ -339,7 +345,7 @@
 					color: #fff;
 				}
 
-				.item-button-yigoumai {
+				.item-button-yiGouMai {
 					text-align: center;
 					width: 150rpx;
 					padding: 5rpx 0;
@@ -400,34 +406,37 @@
 	}
 
 	.swiper-container {
-	  perspective: 1000px;
+		perspective: 1000px;
 	}
-	
+
 	.swiper-item {
-	  transition: transform 0.5s;
-	  transform-style: preserve-3d;
-	  /* 其他样式 */
+		transition: transform 0.5s;
+		transform-style: preserve-3d;
+		/* 其他样式 */
 	}
-	
+
 	.content {
-	  backface-visibility: hidden; /* 确保背面不可见 */
-	  display: flex;
-	  justify-content: center;
-	  align-items: center;
-	  height: 200px; /* 设置高度 */
-	  font-size: 24px;
-	  color: white;
-	  background: linear-gradient(45deg, #ff5858, #f09819); /* 示例背景 */
+		backface-visibility: hidden;
+		/* 确保背面不可见 */
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 200px;
+		/* 设置高度 */
+		font-size: 24px;
+		color: white;
+		background: linear-gradient(45deg, #ff5858, #f09819);
+		/* 示例背景 */
 	}
-	
+
 	// 登录模拟态
 	.modal {
 		.modal-content {
 			padding: 50rpx;
-	
+
 			.content-a {
 				color: #2979ff;
 			}
 		}
 	}
-</style>
+</style>

+ 33 - 33
pages/login/login.vue

@@ -11,16 +11,16 @@
 				<view class="loginType">
 					<text :class="[loginType=='phone'? 'loginType-text-active': 'loginType-text']"
 						@click="loginType = 'phone'">手机登录</text>
-					<text :class="[loginType=='username'? 'loginType-text-active': 'loginType-text']"
-						@click="loginType = 'username'">账号登录</text>
+					<text :class="[loginType=='userName'? 'loginType-text-active': 'loginType-text']"
+						@click="loginType = 'userName'">账号登录</text>
 				</view>
 				<view class="phone-form" v-if="loginType=='phone'">、
 					<view class="form-item">
-						<u-input height="80" placeholder="请输入手机号" border-color="#d0d0d0" v-model="phoneForm.shoujihao"
+						<u-input height="80" placeholder="请输入手机号" border-color="#d0d0d0" v-model="phoneForm.shouJiHao"
 							:border="true" class="form-item-input" type="number" @confirm="phoneLoginHandle" />
 					</view>
 					<view class="form-item">
-						<u-input height="80" placeholder="请输入验证码" border-color="#d0d0d0" v-model="phoneForm.yanzhengma"
+						<u-input height="80" placeholder="请输入验证码" border-color="#d0d0d0" v-model="phoneForm.yanZhengMa"
 							:border="true" class="form-item-input" @confirm="phoneLoginHandle" />
 						<text class="form-item-text" @click="getCode">{{tips}}</text>
 						<!-- <text class="form-item-text" v-if="!isCounting" @click="requestVerificationCode">
@@ -32,16 +32,16 @@
 						立即登录
 					</view>
 				</view>
-				<view class="phone-form" v-if="loginType=='username'">、
+				<view class="phone-form" v-if="loginType=='userName'">、
 					<view class="form-item">
-						<u-input height="80" placeholder="请输入账号" border-color="#d0d0d0" v-model="usernameForm.zhanghao"
-							:border="true" class="form-item-input" @confirm="usenameLoginHandle" />
+						<u-input height="80" placeholder="请输入账号" border-color="#d0d0d0" v-model="userNameForm.zhangHao"
+							:border="true" class="form-item-input" @confirm="userNameLoginHandle" />
 					</view>
 					<view class="form-item">
-						<u-input height="80" placeholder="请输入密码" border-color="#d0d0d0" v-model="usernameForm.mima"
-							:border="true" class="form-item-input" @confirm="usenameLoginHandle" />
+						<u-input height="80" placeholder="请输入密码" border-color="#d0d0d0" v-model="userNameForm.miMa"
+							:border="true" class="form-item-input" @confirm="userNameLoginHandle" />
 					</view>
-					<view class="form-button" @click="usenameLoginHandle">
+					<view class="form-button" @click="userNameLoginHandle">
 						立即登录
 					</view>
 				</view>
@@ -125,13 +125,13 @@
 				// ----验证码 end -----
 				loginType: "phone",
 				phoneForm: {
-					shoujihao: '15312341234',
-					yanzhengma: '123456',
-					yanzhengmaUuid: ''
+					shouJiHao: '15312341234',
+					yanZhengMa: '123456',
+					yanZhengMaUuid: ''
 				},
-				usernameForm: {
-					zhanghao: 'zhangsan',
-					mima: "12345678"
+				userNameForm: {
+					zhangHao: 'zhangsan',
+					miMa: "12345678"
 				},
 				userBook: false,
 			}
@@ -150,7 +150,7 @@
 				this.userBook = true;
 				const loginTypeHandler = {
 					phone: this.phoneLoginHandle,
-					username: this.usenameLoginHandle
+					userName: this.userNameLoginHandle
 				};
 				// 调用相应的登录处理函数
 				(loginTypeHandler[this.loginType] || (() => {})).call(this);
@@ -158,17 +158,17 @@
 			// 手机登录
 			async phoneLoginHandle() {
 				const {
-					shoujihao,
-					yanzhengma
+					shouJiHao,
+					yanZhengMa
 				} = this.phoneForm;
 
 				// 手机号正则验证
-				if (!/^1[3-9]\d{9}$/.test(shoujihao)) {
+				if (!/^1[3-9]\d{9}$/.test(shouJiHao)) {
 					msg("请输入正确的手机号");
 					return;
 				}
 				// 验证码存在性检查
-				if (!yanzhengma) {
+				if (!yanZhengMa) {
 					msg("请输入验证码");
 					return;
 				}
@@ -192,21 +192,21 @@
 
 			},
 			// 账号登录
-			async usenameLoginHandle() {
-				if (!this.usernameForm.zhanghao) {
+			async userNameLoginHandle() {
+				if (!this.userNameForm.zhangHao) {
 					msg("请输入账号")
 					return;
 				}
-				if (!this.usernameForm.mima) {
+				if (!this.userNameForm.miMa) {
 					msg("请输入密码")
 					return;
 				}
-				// usernameLogin(this.usernameForm).then(res=>{
+				// usernameLogin(this.userNameForm).then(res=>{
 				// 	console.log(res,45699)
 				// })
 				let checkUserBook = await this.checkUserBook()
 				if (!this.checkUserBook()) return;
-				console.log(this.usernameForm)
+				console.log(this.userNameForm)
 				// 联调
 				// 1.登录 发送请求
 				// 2.保存 token
@@ -234,9 +234,9 @@
 			},
 			getCode() {
 				let {
-					shoujihao
+					shouJiHao
 				} = this.phoneForm
-				if (!/^1[3-9]\d{9}$/.test(shoujihao)) {
+				if (!/^1[3-9]\d{9}$/.test(shouJiHao)) {
 					msg("请输入正确的手机号");
 					return;
 				}
@@ -274,9 +274,9 @@
 				this.shuzijiaoduimaForm.shuzijiaoduima = ''; // 清空输入框
 			},
 			async submitCode() {
-				if (this.shuzijiaoduimaForm.shuzijiaoduima.length !== 6) {
+				if (this.shuzijiaoduimaForm.shuzijiaoduima.length !== 4) {
 					uni.showToast({
-						title: '请输入6位验证码',
+						title: '请输入4位验证码',
 						icon: 'none'
 					});
 					return;
@@ -292,8 +292,8 @@
 				// }
 				// // 发送手机验证码
 				// const codeRes = await getCodeApi();
-				// if(codeRes && codeRes.yanzhengmaUuid){
-				// 	this.phoneForm.yanzhengmaUuid = codeRes.yanzhengmaUuid
+				// if(codeRes && codeRes.yanZhengMaUuid){
+				// 	this.phoneForm.yanZhengMaUuid = codeRes.yanZhengMaUuid
 				// 	this.closePopup();
 				// 	this.$refs.uCode1.start()
 				// }
@@ -518,4 +518,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 27 - 27
pages/register/register.vue

@@ -2,28 +2,28 @@
 	<view class="container">
 		<u-form :model="registerForm" ref="registerForm" label-width="160"
 			:label-style="{ color: '#000', fontSize: '30rpx'}">
-			<u-form-item label="账号" prop="zhanghao" required :border-bottom="false">
-				<u-input height="80" placeholder="请输入账号" border-color="#d0d0d0" v-model="registerForm.zhanghao"
+			<u-form-item label="账号" prop="zhangHao" required :border-bottom="false">
+				<u-input height="80" placeholder="请输入账号" border-color="#d0d0d0" v-model="registerForm.zhangHao"
 					:border="true" class="form-item-input" />
 			</u-form-item>
-			<u-form-item label="密码" prop="mima" required :border-bottom="false">
-				<u-input height="80" placeholder="请输入密码" border-color="#d0d0d0" v-model="registerForm.mima"
+			<u-form-item label="密码" prop="miMa" required :border-bottom="false">
+				<u-input height="80" placeholder="请输入密码" border-color="#d0d0d0" v-model="registerForm.miMa"
 					:border="true" class="form-item-input" type="password" />
 			</u-form-item>
-			<u-form-item label="确认密码" prop="querenmima" required :border-bottom="false">
-				<u-input height="80" placeholder="请确认密码" border-color="#d0d0d0" v-model="registerForm.querenmima"
+			<u-form-item label="确认密码" prop="queRenMiMa" required :border-bottom="false">
+				<u-input height="80" placeholder="请确认密码" border-color="#d0d0d0" v-model="registerForm.queRenMiMa"
 					:border="true" class="form-item-input" type="password" />
 			</u-form-item>
-			<u-form-item label="手机号码" prop="shoujihaoma" required :border-bottom="false">
-				<u-input height="80" placeholder="请输入手机号" border-color="#d0d0d0" v-model="registerForm.shoujihaoma"
+			<u-form-item label="手机号码" prop="shouJiHaoMa" required :border-bottom="false">
+				<u-input height="80" placeholder="请输入手机号" border-color="#d0d0d0" v-model="registerForm.shouJiHaoMa"
 					:border="true" class="form-item-input" type="number" />
 			</u-form-item>
-			<u-form-item label="身份证" prop="shenfenzheng" :border-bottom="false">
-				<u-input height="80" placeholder="请输入身份证" border-color="#d0d0d0" v-model="registerForm.shenfenzheng"
+			<u-form-item label="身份证" prop="shenFenZheng" :border-bottom="false">
+				<u-input height="80" placeholder="请输入身份证" border-color="#d0d0d0" v-model="registerForm.shenFenZheng"
 					:border="true" class="form-item-input" />
 			</u-form-item>
-			<u-form-item label="性别" prop="xingbie" required :border-bottom="false">
-				<u-radio-group v-model="registerForm.xingbie">
+			<u-form-item label="性别" prop="xingBie" required :border-bottom="false">
+				<u-radio-group v-model="registerForm.xingBie">
 					<u-radio v-for="(item, index) in radioList1" :key="index" :name="item.name"
 						:disabled="item.disabled">
 						{{ item.text }}
@@ -46,12 +46,12 @@
 		data() {
 			return {
 				registerForm: {
-					zhanghao: '', //账号
-					mima: "", //密码
-					querenmima: '', // 确认密码
-					shoujihaoma: '', // 手机号码
-					shenfenzheng: '', // 身份证
-					xingbie: '' // 性别
+					zhangHao: '', //账号
+					miMa: "", //密码
+					queRenMiMa: '', // 确认密码
+					shouJiHaoMa: '', // 手机号码
+					shenFenZheng: '', // 身份证
+					xingBie: '' // 性别
 				},
 				radioList1: [{
 						name: '男',
@@ -65,17 +65,17 @@
 					}
 				],
 				rules: {
-					zhanghao: [{
+					zhangHao: [{
 						required: true,
 						message: '请输入账号',
 						trigger: ['blur']
 					}],
-					mima: [{
+					miMa: [{
 						required: true,
 						message: '请输入密码',
 						trigger: ['blur']
 					}],
-					querenmima: [{
+					queRenMiMa: [{
 						required: true,
 						message: '请确认密码',
 						trigger: ['blur']
@@ -85,7 +85,7 @@
 						trigger: ['blur'],
 						validator: this.validateConfirmPassword
 					}],
-					shoujihaoma: [{
+					shouJiHaoMa: [{
 						required: true,
 						message: '请输入手机号码',
 						trigger: ['blur']
@@ -94,7 +94,7 @@
 						message: '请输入正确的手机号',
 						trigger: ['blur']
 					}],
-					shenfenzheng: [{
+					shenFenZheng: [{
 						pattern: /^(?:\d{15}|\d{17}[\dXx])$/,
 						transform(value) {
 							return String(value);
@@ -102,7 +102,7 @@
 						message: '请输入正确的手机号',
 						trigger: ['blur']
 					}],
-					xingbie: [{
+					xingBie: [{
 						required: true,
 						message: '请选择性别',
 						trigger: ['change']
@@ -112,7 +112,7 @@
 		},
 		methods: {
 			validateConfirmPassword(rule, value, callback) {
-				if (value !== this.registerForm.mima) {
+				if (value !== this.registerForm.miMa) {
 					callback(new Error('密码与确认密码不一致'));
 				} else {
 					callback(); // 校验通过
@@ -121,7 +121,7 @@
 			submit() {
 				const that = this;
 				that.$refs.registerForm.validate((valid) => {
-					console.log(valid, that.registerForm.xingbie, 456);
+					console.log(valid, that.registerForm.xingBie, 456);
 					if (valid) {
 						msg("数据验证成功")
 					}
@@ -193,4 +193,4 @@
 		text-align: center;
 		color: #000000;
 	}
-</style>
+</style>