Browse Source

新增暂无数据

xuqiaoying 2 years ago
parent
commit
db7a9d210d

+ 1 - 1
pages/learn/index.scss

@@ -383,7 +383,7 @@
 	.choose {
 		width: 280rpx;
 		height: 64rpx;
-		line-height: 64rpx;
+		line-height: 62rpx;
 		border-radius: 32rpx;
 		background-color: #007AFF;
 		color: #fff;

+ 21 - 10
pages/questionBank/index.scss

@@ -273,19 +273,30 @@
 	display: flex;
     flex-direction: column;
     align-items: center;
-	.courses {
-		width: 360rpx;
-		height: 349rpx;
-	}
-	.no_learns {
-		font-size: 32rpx;
-		color: #999;
-		margin: 46rpx 0rpx 56rpx;
-	}
+	// .courses {
+	// 	width: 360rpx;
+	// 	height: 349rpx;
+	// }
+	// .no_learns {
+	// 	font-size: 32rpx;
+	// 	color: #999;
+	// 	margin: 46rpx 0rpx 56rpx;
+	// }
+	.empty_status {
+        width: 160rpx;
+        height: 160rpx;
+        margin-bottom: 14rpx;
+        margin-top: 300rpx;
+    }
+    .word_tip {
+        font-size: 30rpx;
+        color: #888691;
+		margin-bottom: 56rpx;
+    }
 	.choose {
 		width: 280rpx;
 		height: 64rpx;
-		line-height: 64rpx;
+		line-height: 62rpx;
 		border-radius: 32rpx;
 		background-color: #007AFF;
 		color: #fff;

+ 4 - 2
pages/questionBank/index.vue

@@ -79,8 +79,10 @@
 		</view>
 		<!-- 没有学习的课程 -->
 		<view v-if="!allLoading && !questionLists.length" class="no_datas">
-			<image class="courses" src="/static/learn/no_course.png" mode=""></image>
-			<view class="no_learns">您目前没有可学习的题库</view>
+			<!-- <image class="courses" src="/static/learn/no_course.png" mode=""></image>
+			<view class="no_learns">您目前没有可学习的题库</view> -->
+			<image src="/static/learn/empty_status.png" class="empty_status"></image>
+			<text class="word_tip">暂无题库</text>
 			<view class="choose" @click="toChoose()">立即去选购</view>
 		</view>
     </view>

+ 75 - 51
pages2/dailyPractice/index.vue

@@ -1,65 +1,72 @@
 <template>
     <view class="daily_practice">
         <nav-bar title="每日一练"></nav-bar>
-        <view class="content_up">
-            <view class="reminds">
-                <view class="remind_lefts">
-                    <image src="/pages2/static/daily/logo_icon.png" class="logo_icon"></image>
-                    <view class="left_infos">
-                        <text class="one">订阅消息</text>
-                        <text class="two">开启订阅通知,每天打卡不错过</text>
+        <template v-if="Object.keys(dayExamDetail).length">
+            <view class="content_up">
+                <view class="reminds">
+                    <view class="remind_lefts">
+                        <image src="/pages2/static/daily/logo_icon.png" class="logo_icon"></image>
+                        <view class="left_infos">
+                            <text class="one">订阅消息</text>
+                            <text class="two">开启订阅通知,每天打卡不错过</text>
+                        </view>
+                    </view>
+                    <view class="remind_rights">
+                        <!-- 1已订阅 0未订阅 -->
+                        <view class="subscription" @click="getSubscription()">{{ dayExamDetail.subscription == 1 ? '已订阅' : '订阅'}}</view>
                     </view>
                 </view>
-                <view class="remind_rights">
-                    <!-- 1已订阅 0未订阅 -->
-                    <view class="subscription" @click="getSubscription()">{{ dayExamDetail.subscription == 1 ? '已订阅' : '订阅'}}</view>
-                </view>
-            </view>
-            <view class="punch_days">
-                <view class="print_day">
-                    <view class="print_left">
-                        <text class="one">打卡天数</text>
-                        <text class="two" v-if=" dayExamDetail.examRecord == 1">恭喜你,今天的打卡已完成</text>
-                        <text class="two" v-else>打卡进度超过了{{ dayExamDetail.recordPercentage || '0%' }}的学员</text>
+                <view class="punch_days">
+                    <view class="print_day">
+                        <view class="print_left">
+                            <text class="one">打卡天数</text>
+                            <text class="two" v-if=" dayExamDetail.examRecord == 1">恭喜你,今天的打卡已完成</text>
+                            <text class="two" v-else>打卡进度超过了{{ dayExamDetail.recordPercentage || '0%' }}的学员</text>
+                        </view>
+                        <view class="print_right">
+                            <text class="nums">{{ dayExamDetail.recordCount || 0 }}</text>天
+                        </view>
                     </view>
-                    <view class="print_right">
-                        <text class="nums">{{ dayExamDetail.recordCount || 0 }}</text>天
+                    <view class="middle_line">
+                        <view class="half_cir_left"></view>
+                        <view class="half_cir_rig"></view>
+                    </view>
+                    <view class="examNames">
+                        <view class="exam_name">{{ dayExamDetail.examName || '' }}</view>
+                        <image src="/pages2/static/daily/daily_one.png" class="daily_one"></image>
+                    </view>
+                    <view class="learn_btns">
+                        <view class="toLearn" @click="goPractice()">{{ dayExamDetail.examRecord == 1 ? '今日已完成' : '快来做题' }}</view>
                     </view>
-                </view>
-                <view class="middle_line">
-                    <view class="half_cir_left"></view>
-                    <view class="half_cir_rig"></view>
-                </view>
-                <view class="examNames">
-                    <view class="exam_name">{{ dayExamDetail.examName || '' }}</view>
-                    <image src="/pages2/static/daily/daily_one.png" class="daily_one"></image>
-                </view>
-                <view class="learn_btns">
-                    <view class="toLearn" @click="goPractice()">{{ dayExamDetail.examRecord == 1 ? '今日已完成' : '快来做题' }}</view>
                 </view>
             </view>
-        </view>
-        <view class="contents">
-            <view class="c_title">打卡记录</view>
-            <view class="punch_calendar">
-                <view class="card_box">
-                    {{ curYear + '年' + curMonth + '月'}}
-                </view>
-                <!-- <u-line color="#EEEEEE" /> -->
-                <view class="weeks">
-                    <view v-for="(item, index) in weekLists" :key="index" class="card_date">{{ item }}</view>
-                </view>
-                <view class="day_dailys">
-                    <view v-for="(item, index) in date_num" :key="index" class="date_nums">
-                        <view class="date_items">
-                            <image v-if="item.sign" src="/pages2/static/daily/punch.png" class="pun_icon"></image>
-                            <text v-else>{{ item.date }}</text>
+            <view class="contents">
+                <view class="c_title">打卡记录</view>
+                <view class="punch_calendar">
+                    <view class="card_box">
+                        {{ curYear + '年' + curMonth + '月'}}
+                    </view>
+                    <!-- <u-line color="#EEEEEE" /> -->
+                    <view class="weeks">
+                        <view v-for="(item, index) in weekLists" :key="index" class="card_date">{{ item }}</view>
+                    </view>
+                    <view class="day_dailys">
+                        <view v-for="(item, index) in date_num" :key="index" class="date_nums">
+                            <view class="date_items">
+                                <image v-if="item.sign" src="/pages2/static/daily/punch.png" class="pun_icon"></image>
+                                <text v-else>{{ item.date }}</text>
+                            </view>
                         </view>
                     </view>
                 </view>
             </view>
-        </view>
-
+        </template>
+        <template v-else>
+            <view class="no_datas">
+                <image src="/static/learn/empty_status.png" class="empty_status"></image>
+                <text class="word_tip">暂无每日一练</text>
+            </view>
+        </template>
         <!-- 订阅消息弹窗 -->
         <!-- :mask-close-able="false" -->
         <u-popup class="modal" v-model="meassgeModal" mode="bottom" border-radius="24" >
@@ -168,7 +175,6 @@ export default {
                     if (this.dayRecordList.length) {
                         this.date_num.forEach((item, index) => {
                             let findV = this.dayRecordList.find(e => e.day == item.date)
-                            console.log('findV', findV);
                             if (findV) {
                                 this.$set(this.date_num[index], 'sign', true)
                             } else {
@@ -177,7 +183,6 @@ export default {
                             
                         })
                     }
-                    console.log('this.dayRecordList', this.dayRecordList, this.date_num);
                 }
             })
         },
@@ -504,4 +509,23 @@ export default {
         }
     }
 }
+.no_datas {
+    width: 100%;
+    height: 100vh;
+    background-color: #FFFFFF;
+    display: flex;
+    align-items: center;
+    // justify-content: center;
+    flex-direction: column;
+    .empty_status {
+        width: 160rpx;
+        height: 160rpx;
+        margin-bottom: 14rpx;
+        margin-top: 300rpx;
+    }
+    .word_tip {
+        font-size: 30rpx;
+        color: #888691;
+    }
+}
 </style>

BIN
static/learn/empty_status.png