KELECHUAN hace 3 años
padre
commit
b740844be4

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
common/base64.scss


+ 13 - 5
components/analysis-box/analysis-box.vue

@@ -26,13 +26,13 @@
 			</view>
 		</view>
 		
-		<view class="nosub-box" v-if="!subscribe" @click="getSubscribe">
+		<view class="nosub-box" v-if="!subscribe">
 			<view style="display: flex; align-items: center;margin: 30rpx 0 0 15rpx;">
 				<!-- <view class="t-icon t-icon-xtubiao-3" style="width: 50rpx;height: 50rpx;"></view> -->
 				<view class="nosub-text">综合分析模块</view>
 			</view>
 			<view class="nosub-content">孩子成绩综合全面分析</view>
-			<view class="nosub-content">点击订阅</view>
+			<button class="nosub-btn" @click="getSubscribe">点击订阅</button>
 		</view>
 
 	</view>
@@ -147,10 +147,10 @@
 		height: 345rpx;
 
 		.nosub-text {
-			font-size: 40rpx;
+			font-size: 35rpx;
 			font-weight: bold;
 			margin-left: 10rpx;
-			background-image: linear-gradient(to right, #a56d58, #e8997d);
+			background-image: linear-gradient(to right, #ba7a63, #e8997d);
 			background-clip: text;//裁剪成文字的前景色
 			color: transparent;//文字颜色变成透明
 		}
@@ -159,9 +159,17 @@
 			margin: 25rpx 65rpx 0 25rpx;
 			font-size: 45rpx;
 			font-weight: bold;
-			background-image: linear-gradient(to right, #a56d58, #e8997d);
+			background-image: linear-gradient(to right, #ba7a63, #e8997d);
 			background-clip: text;//裁剪成文字的前景色
 			color: transparent;//文字颜色变成透明
 		}
+		.nosub-btn{
+			margin-top: 30rpx;
+			line-height: 65rpx;
+			border-radius: 30rpx;
+			font-size: 35rpx;
+			font-weight: bold;
+			background-image: linear-gradient(to right, #ba7a63, #ffa789);
+		}
 	}
 </style>

+ 1 - 1
components/top-box/top-box.vue

@@ -163,7 +163,7 @@
 	
 
 	.list-box {
-		margin: -130rpx 40rpx 120rpx 33rpx;
+		margin: -100rpx 40rpx 120rpx 33rpx;
 		display: flex;
 		flex-wrap: wrap;
 

+ 10 - 1
gradepkg/area-chart/area-chart.vue

@@ -19,7 +19,7 @@
 				<text class="chart-name-text">{{semester}} 单科与平均对比</text>
 
 				<view class="search-box" @click="show = true">
-					<u-button>{{gradeData.subjectAreaChart.areaComparison.series[0].name}}</u-button>
+					<button class="subject-btn">{{gradeData.subjectAreaChart.areaComparison.series[0].name}}</button>
 				</view>
 			</view>
 			<!-- 图表 -->
@@ -182,4 +182,13 @@
 			}
 		}
 	}
+	.subject-btn{
+		margin-left: 2rpx;
+		line-height: 65rpx;
+		border-radius: 30rpx;
+		color: #FFFFFF;
+		font-size: 28rpx;
+		font-weight: bold;
+		background-image: linear-gradient(to right, #de5f89, #f7b997);
+	}
 </style>

+ 2 - 21
information/parent.js

@@ -12,26 +12,7 @@ export default {
 
 		parentinfo: JSON.parse(uni.getStorageSync('parentinfo') || '{}'),
 
-		parentdetail: {
-			phoneNumber: '17882237075',
-			name: '家长姓名',
-			childrenList: [{
-				avatar: '/static/default-icons/boy.png',
-				name: '张三',
-				classid: '0301',
-				class: '三年级一班',
-				tmdid: 'tmdid01',
-				schoolname: '研发学校'
-			}, {
-				avatar: '/static/default-icons/girl.png',
-				name: '张梅',
-				classid: '0504',
-				class: '五年级四班',
-				tmdid: 'tmdid03',
-				schoolname: '研发学校'
-			},
-			]
-		},
+		parentdetail: JSON.parse(uni.getStorageSync('parentdetail') || '{}'),
 		myData: {
 			msgList: ['通知一','121313123123123','bnawuidgawikdasjdhauwk']
 		}
@@ -55,7 +36,7 @@ export default {
 		},
 		//持久化存储
 		saveParentDetailToStorage(state){
-			uni.setStorageSync('parentinfo', JSON.stringify(state.parentdetail))
+			uni.setStorageSync('parentdetail', JSON.stringify(state.parentdetail))
 		},
 
 		//更新token字符串

+ 1 - 1
main.js

@@ -39,7 +39,7 @@ $http.afterRequest = function() {
 }
 
 //封装的展示消息提示方法
-uni.$showMsg = function(title = '请求失败', duration = 500){
+uni.$showMsg = function(title = '请求失败', duration = 1500){
 	uni.showToast({
 		title,
 		duration,

+ 1 - 1
pages/home/home.vue

@@ -4,7 +4,7 @@
 		<top-box v-bind:timeStamp="timeStamp"></top-box>
 		<!-- 滚动条 -->
 		<view class="notice">
-			<u-notice-bar :text="myData.msgList[0]" mode="closable" bgColor="#6495ED" color="#FFFFFF"></u-notice-bar>
+			<u-notice-bar :text="myData.msgList[0]" mode="closable" bgColor="rgba(91, 126, 220, 0.5)" color="#FFFFFF"></u-notice-bar>
 		</view>
 		<!-- 卡片区域 -->
 		<view class="card-box">

+ 4 - 1
pages/my/my.vue

@@ -123,7 +123,7 @@
 				{
 					this.updateChildrenInfo()
 					this.updateChildrenSemester(this.semesterList[0][0])
-					// this.updateParentDetail()
+					this.updateParentDetail()
 					this.updateParentInfo()
 					this.updateToken()
 					
@@ -136,6 +136,9 @@
 			chooseChildren(){
 				// if(parentdetail.childrenList.length == 1)
 				// return uni.showMsg('您只有一个孩子,不能切换')
+				// if(uni.getStorageSync('parentdetail')){
+				// 	uni.setStorageSync('parentdetail',)
+				// }
 				uni.navigateTo({
 					url: '/subpkg/guide/guide'
 				})

+ 30 - 0
pages/subscribe/subscribe.vue

@@ -2,6 +2,14 @@
 	<view class="container">
 		<!-- 头部区域 -->
 		<top-box v-bind:timeStamp="timeStamp"></top-box>
+		<!-- 列表区域 -->
+		<view class="card-box">
+			<view class="card-item"></view>
+			<view class="card-item"></view>
+			<view class="card-item"></view>
+			<view class="card-item"></view>
+			<view class="card-item"></view>
+		</view>
 
 	</view>
 </template>
@@ -45,8 +53,30 @@
 
 <style lang="scss">
 	.container {
+		width: 100%;
+		height: 100%;
+		overflow-x: hidden; //隐藏多余的页面
+		
 		.home-topinfo {
 			background: linear-gradient(#ffd200, #f1f3f5);
 		}
+		.card-box {
+			display: flex;
+			flex-direction: row;
+			flex-wrap: wrap;
+			margin: -50rpx 20rpx 0 20rpx;
+			justify-content: space-between;
+			.card-item{
+				margin: 10rpx 0;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				background-color: #FFFFFF;
+				box-shadow: 0 4rpx 8rpx rgba(0, 0, 0, 0.05);
+				border-radius: 16rpx;
+				width: 100%;
+				height: 300rpx;
+			}
+			}
 	}
 </style>

+ 145 - 94
subpkg/guide/guide.vue

@@ -2,14 +2,21 @@
 	<view class="children-container">
 		<!-- 标题 -->
 		<view class="tips">
-			<view class="title">选择您的孩子</view>
-			<button class="detail" plain="true" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="!show">获取您的孩子信息</button>
+			<view class="title" v-show="!show">欢迎您的使用</view>
+			<view style="font-weight: bold;font-size: 45rpx;color: #4169E1;margin-left: 40rpx;margin-top: 10rpx;"
+				v-show="!show">醍摩豆家长助您孩子成长</view>
+			<view class="title-sim" v-show="show">选择您的孩子</view>
+
+			<view class="detail-image" v-show="!show"></view>
+			<button class="detail-button" plain="true" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber"
+				v-show="!show">获取您的孩子信息</button>
 		</view>
-		
+
 		<!-- 孩子选择界面 -->
-		<view class="children-item" v-if="show">
+		<view class="children-item" v-show="show">
 			<view class="com-box">
-				<view class="item" v-for="(item,index) in parentdetail.childrenList" :key="index" @click="chooseChildren(item)">
+				<view class="item" v-for="(item,index) in parentdetail.childrenList" :key="index"
+					@click="chooseChildren(item)">
 					<view class="item-text">{{item.name}}</view>
 					<view class="avatar-box">
 						<u-avatar size="120" class="item-avatar" :src="item.avatar" mode="aspectFill"></u-avatar>
@@ -23,44 +30,50 @@
 </template>
 
 <script>
-	import {mapState,mapMutations} from 'vuex'
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex'
 	//引入解密工具
 	import WXBizDataCrypt from "@/utils/WXBizDataCrypt.js";
-	
+
 	export default {
 		data() {
 			return {
 				show: false,
 			};
 		},
-		computed:{
-			...mapState('m_parent',['parentdetail','token'])
+		computed: {
+			...mapState('m_parent', ['parentdetail', 'token']),
+			...mapState('m_children',['semesterList'])
 		},
-		onLoad(){
+		onLoad() {
 			//判断用户信息
 			this.hasParentDetail()
 		},
-		methods:{
-			...mapMutations('m_children',['updateChildrenInfo']),
-			...mapMutations('m_parent',['updateParentInfo']),
-			
+		methods: {
+			...mapMutations('m_children', ['updateChildrenInfo','updateChildrenSemester']),
+			...mapMutations('m_parent', ['updateParentInfo','updateParentDetail']),
+
 			//选择孩子并跳转首页传入id查询显示孩子信息
-			chooseChildren(item){
+			chooseChildren(item) {
 				console.log(item.tmdid);
 				this.updateChildrenInfo(item)
+				//默认学期
+				this.updateChildrenSemester(this.semesterList[0][0])
 				uni.switchTab({
-					url:'/pages/home/home'
+					url: '/pages/home/home'
 				})
 			},
-			
+
 			//判断用户基本信息是否存在
-			hasParentDetail(){
-				if(uni.getStorageSync('parentdetail'))
+			hasParentDetail() {
+				if (uni.getStorageSync('parentdetail'))
 					this.show = true
 				else
 					this.show = false
 			},
-			
+
 			//获取用户手机号
 			async getPhoneNumber(e) {
 				if (e.detail.errMsg !== "getPhoneNumber:ok") {
@@ -72,89 +85,123 @@
 						let numData = await proof.decryptData(e.detail.encryptedData, e.detail.iv)
 						console.log(numData.phoneNumber)
 						// const parentDetailData = await uni.$http.post('',numData.phoneNumber)
-						// this.updateParentDetail(parentDetailData)
+						this.updateParentDetail({
+							phoneNumber: '17882237075',
+							name: '家长姓名',
+							childrenList: [{
+								avatar: '/static/default-icons/boy.png',
+								name: '张三',
+								classid: '0301',
+								class: '三年级一班',
+								tmdid: 'tmdid01',
+								schoolname: '研发学校'
+							}, {
+								avatar: '/static/default-icons/girl.png',
+								name: '张梅',
+								classid: '0504',
+								class: '五年级四班',
+								tmdid: 'tmdid03',
+								schoolname: '研发学校'
+							}, ]
+						})
 						this.show = true
 					}
 				}
 			},
-			
-			
+
+
 		}
 	}
 </script>
 
 <style lang="scss">
-	.children-container{
+	.children-container {
 		display: flex;
 		flex-direction: column;
 		justify-content: center;
 		align-items: center;
-		
+
 		.tips {
 			width: 100%;
 			display: flex;
 			flex-direction: column;
 			z-index: 99;
-		
+
 			.title {
-				padding-top: 180rpx;
+				padding-top: 200rpx;
 				padding-left: 40rpx;
 				line-height: 70rpx;
-				margin-bottom: 60rpx;
 				font-weight: bold;
-				font-size: 60rpx;
+				font-size: 50rpx;
 				color: #4169E1;
-				background-image: linear-gradient(to right, #506AE7, #87CEFA);
-				background-clip: text;//裁剪成文字的前景色
-				color: transparent;//文字颜色变成透明
-				text-shadow: 0 6rpx 12rpx rgba(0, 0, 0, 0.05);
+				// background-clip: text; //裁剪成文字的前景色
+				// color: transparent; //文字颜色变成透明
 			}
-			.detail{
-				line-height: 70rpx;
+
+			.title-sim {
+				padding-top: 200rpx;
+				padding-left: 40rpx;
+				margin-bottom: 50rpx;
+				font-weight: bold;
+				font-size: 45rpx;
+				color: #4169E1;
+			}
+
+			.detail-image {
+				margin-top: 50rpx;
+				width: 100%;
+				height: 500rpx;
+				background: $guide-back-base64;
+				background-size: cover; //背景图片自适应
+			}
+
+			.detail-button {
+				line-height: 100rpx;
 				font-weight: bold;
 				font-size: 40rpx;
-				border-radius: 200rpx;
+				border-radius: 100rpx;
 				position: relative;
-				margin: 180rpx auto;//relative相对定位居中
+				margin: 100rpx auto; //relative相对定位居中
 				border: none;
 				color: #FFFFFF;
 				background: linear-gradient(to right, #506AE7, #87CEFA);
-				box-shadow: 0 6rpx 12rpx rgba(0, 0, 0, 0.2);
+
 			}
 		}
-		.children-item{
-			.com-box{
+
+		.children-item {
+			.com-box {
 				display: flex;
 				flex-direction: row;
 				justify-content: center;
 				align-items: center;
-				flex-wrap: wrap;//元素换行
+				flex-wrap: wrap; //元素换行
 
-				
-				.item{
+				.item {
 					margin: 10rpx 20rpx 20rpx 20rpx;
 					padding: 20rpx;
 					display: flex;
 					flex-direction: column;
 					justify-content: center;
 					align-items: center;
-					background-color: #FFFFFF;
+					background-color: #f1f3f5;
 					border-radius: 20rpx;
 					width: 280rpx;
 					height: 320rpx;
 					z-index: 99;
-					
-					.item-text{
+
+					.item-text {
 						margin: -7rpx 0 20rpx 20rpx;
 						width: 100%;
 						line-height: 40rpx;
 						font-weight: bold;
 						font-size: 35rpx;
 						color: #696969;
-						
+
 					}
-					.avatar-box{
-						.item-avatar{
+
+					.avatar-box {
+						.item-avatar {
 							width: 220rpx;
 							height: 220rpx;
 						}
@@ -163,54 +210,58 @@
 			}
 		}
 	}
+
 	.ocean {
-	    display: flex;
+		display: flex;
 		margin-top: -600rpx;
-	    width: 1800rpx;
-	    height: 1800rpx;
-	    background-color: #4169E1;
-	    border-radius: 50%;
-	
-	    &::before,
-	    &::after {
-	        content: "";
-	        position: absolute;
-					margin-top: 870rpx;
-	        width: 1600rpx;
-	        height: 1600rpx;
-	        top: 0;
-	        left: 50%;
-					border-radius: 43%;
-	        background-color: #fafafa;
-	        transform: translate(-50%, -70%) rotate(0);
-	        animation: rotate 6s linear infinite;
-	        z-index: 2;
-	    }
-	
-	    &::after {
-					border-radius: 46%;
-	        background-color: #fafafa;
-					opacity: 0.7;
-	        transform: translate(-50%, -70%) rotate(0);
-	        animation: rotate 10s linear -5s infinite;
-	        z-index: 3;
-	    }
-			&::after {
-					border-radius: 40%;
-			    background-color: #fafafa;
-					opacity: 0.5;
-			    transform: translate(-50%, -70%) rotate(0);
-			    animation: rotate 10s linear -5s infinite;
-			    z-index: 3;
-			}
-			
+		width: 1800rpx;
+		height: 1800rpx;
+		background-color: #4169E1;
+		border-radius: 50%;
+
+		&::before,
+		&::after {
+			content: "";
+			position: absolute;
+			margin-top: 870rpx;
+			width: 1600rpx;
+			height: 1600rpx;
+			top: 0;
+			left: 50%;
+			border-radius: 43%;
+			background-color: #FFFFFF;
+			transform: translate(-50%, -70%) rotate(0);
+			animation: rotate 6s linear infinite;
+			z-index: 2;
+		}
+
+		&::after {
+			border-radius: 46%;
+			background-color: #FFFFFF;
+			opacity: 0.7;
+			transform: translate(-50%, -70%) rotate(0);
+			animation: rotate 10s linear -5s infinite;
+			z-index: 3;
+		}
+
+		&::after {
+			border-radius: 40%;
+			background-color: #FFFFFF;
+			opacity: 0.5;
+			transform: translate(-50%, -70%) rotate(0);
+			animation: rotate 10s linear -5s infinite;
+			z-index: 3;
+		}
+
 	}
-	
+
 	@keyframes rotate {
-	    50% {
-	        transform: translate(-50%, -73%) rotate(180deg);
-	    } 100% {
-	        transform: translate(-50%, -70%) rotate(360deg);
-	    }
+		50% {
+			transform: translate(-50%, -73%) rotate(180deg);
+		}
+
+		100% {
+			transform: translate(-50%, -70%) rotate(360deg);
+		}
 	}
 </style>

+ 3 - 3
subpkg/login/login.vue

@@ -238,7 +238,7 @@
 			top: 0;
 			left: 50%;
 			border-radius: 43%;
-			background-color: #fafafa;
+			background-color: #FFFFFF;
 			transform: translate(-50%, -70%) rotate(0);
 			animation: rotate 6s linear infinite;
 			z-index: 2;
@@ -246,7 +246,7 @@
 
 		&::after {
 			border-radius: 46%;
-			background-color: #fafafa;
+			background-color: #FFFFFF;
 			opacity: 0.7;
 			transform: translate(-50%, -70%) rotate(0);
 			animation: rotate 10s linear -5s infinite;
@@ -255,7 +255,7 @@
 
 		&::after {
 			border-radius: 40%;
-			background-color: #fafafa;
+			background-color: #FFFFFF;
 			opacity: 0.5;
 			transform: translate(-50%, -70%) rotate(0);
 			animation: rotate 10s linear -5s infinite;

+ 1 - 0
uni_modules/uview-ui/components/u-notice-bar/u-notice-bar.vue

@@ -97,5 +97,6 @@
 		overflow: hidden;
 		padding: 9px 12px;
 		flex: 1;
+		border-radius: 16rpx;
 	}
 </style>