lsc 3 years ago
parent
commit
98b5e82f99

BIN
src/assets/a.png


BIN
src/assets/icon/lao.png


+ 531 - 531
src/components/pages/home.vue

@@ -1,543 +1,543 @@
 <template>
-	<div class="pb_content" style="background: rgb(246 246 246)">
-		<div class="pb_head" style="height: 6rem">
-			<div class="top_first">
-				<div class="tx" @click="goTo('/myDetail')">
-					<img src="../../assets/icon/portal.png" alt="" />
-				</div>
-				<div class="tx_right">
-					<div class="right_first">
-						<div>蓝小琴</div>
-						<div class="leader">
-							<img src="../../assets/icon/gleader.png" alt="" />
-						</div>
-					</div>
-					<div>四年级三班</div>
-				</div>
-			</div>
-			<div class="look_work">
+  <div class="pb_content" style="background: rgb(246 246 246)">
+    <div class="pb_head" style="height: 6rem">
+      <div class="top_first">
+        <div class="tx" @click="goTo('/myDetail')">
+          <img src="../../assets/icon/portal.png" alt="" />
+        </div>
+        <div class="tx_right">
+          <div class="right_first">
+            蓝小琴
+          </div>
+          <div>四年级三班</div>
+        </div>
+      </div>
+      <!-- <div class="look_work">
 				<div class="clean">
 					<img src="../../assets/icon/clean.png" alt="" />
 				</div>
 				<div class="audit_work" @click="goTo('/examine')">审核任务</div>
-			</div>
-		</div>
-		<div class="pb_content_body">
-			<div class="body_top">
-				<div class="body_top_first">
-					<div
-						:class="choose == 0 ? 'ischoose' : 'nochoose'"
-						@click="choose = 0"
-					>
-						
-					</div>
-					<div
-						:class="choose == 1 ? 'ischoose' : 'nochoose'"
-						@click="choose = 1"
-					>
-						
-					</div>
-					<div
-						:class="choose == 2 ? 'ischoose' : 'nochoose'"
-						@click="choose = 2"
-					>
-						
-					</div>
-				</div>
-				<div class="body_top_second">
-					<el-input
-						v-if="this.choose == 0 || this.choose == 1"
-						placeholder="请输入任务名搜索.."
-					></el-input>
-					<el-input v-else placeholder="请输入社团名搜索.."></el-input>
-					<div class="search_img">
-						<img src="../../assets/icon/search.png" alt="" />
-					</div>
-				</div>
-				<div
-					style="font-size: 0.8rem; width: 94%; margin: 0.5rem auto"
-					v-if="this.choose == 0 || this.choose == 1"
-				>
-					最近发布任务
-				</div>
-				<div class="body_content" v-if="this.choose == 0">
-					<div class="content_top">
-						<div class="content_top_tb">
-							<img src="../../assets/icon/house.png" alt="" />
-						</div>
-						<div
-							style="font-size: 16px; line-height: 2.2rem; padding-left: 0.5rem"
-						>
-							家庭劳动
-						</div>
-					</div>
-					<div class="content_body">
-						<div class="content_new" @click="goTo('/workDetail')">
-							<div class="new_left">
-								<div class="new_title">绿色快乐农耕园</div>
-								<div class="new_content">
-									开展"家务劳动小能手"让幼儿体会父母的艰苦劳动
-								</div>
-							</div>
-							<div
-								:class="finish == false ? 'new_right' : 'isfinish_new_right'"
-							>
-								{{ this.finish == false ? "去完成" : "已完成" }}
-							</div>
-						</div>
-						<div class="content_new" @click="goTo('/workDetail')">
-							<div class="new_left">
-								<div class="new_title">垃圾分类203</div>
-								<div class="new_content">
-									辛苦,激发幼儿为父母分担家务劳动的激情和孝敬父母的感恩之心
-								</div>
-							</div>
-							<div
-								:class="finish == false ? 'new_right' : 'isfinish_new_right'"
-							>
-								{{ this.finish == false ? "去完成" : "已完成" }}
-							</div>
-						</div>
-						<div class="content_new" @click="goTo('/workDetail')">
-							<div class="new_left">
-								<div class="new_title">制作中秋节灯笼</div>
-								<div class="new_content">
-									因此让幼儿在家里做一件力所能及的家务。
-								</div>
-							</div>
-							<div
-								:class="finish == false ? 'new_right' : 'isfinish_new_right'"
-							>
-								{{ this.finish == false ? "去完成" : "已完成" }}
-							</div>
-						</div>
-					</div>
-				</div>
-				<div class="body_content" v-if="this.choose == 1">
-					<div class="content_top">
-						<div class="content_top_tb">
-							<img src="../../assets/icon/house.png" alt="" />
-						</div>
-						<div
-							style="font-size: 16px; line-height: 2.2rem; padding-left: 0.5rem"
-						>
-							学校劳动
-						</div>
-					</div>
-					<div class="content_body">
-						<div class="content_new">
-							<div class="new_left">
-								<div class="new_title">绿色快乐农耕园</div>
-								<div class="new_content">
-									开展"家务劳动小能手"让幼儿体会父母的艰苦劳动
-								</div>
-							</div>
-							<div
-								:class="finish == false ? 'new_right' : 'isfinish_new_right'"
-							>
-								{{ this.finish == false ? "去完成" : "已完成" }}
-							</div>
-						</div>
-						<div class="content_new">
-							<div class="new_left">
-								<div class="new_title">垃圾分类203</div>
-								<div class="new_content">
-									辛苦,激发幼儿为父母分担家务劳动的激情和孝敬父母的感恩之心
-								</div>
-							</div>
-							<div
-								:class="finish == false ? 'new_right' : 'isfinish_new_right'"
-							>
-								{{ this.finish == false ? "去完成" : "已完成" }}
-							</div>
-						</div>
-						<div class="content_new">
-							<div class="new_left">
-								<div class="new_title">制作中秋节灯笼</div>
-								<div class="new_content">
-									因此让幼儿在家里做一件力所能及的家务。
-								</div>
-							</div>
-							<div
-								:class="finish == false ? 'new_right' : 'isfinish_new_right'"
-							>
-								{{ this.finish == false ? "去完成" : "已完成" }}
-							</div>
-						</div>
-					</div>
-				</div>
-				<div class="body_content" v-if="this.choose == 2">
-					<div class="content_community">
-						<div class="community_top">
-							<div class="community_people">
-								<img src="../../assets/icon/people.png" alt="" />
-							</div>
-							<div class="community_title">莲花街社区志愿者协会</div>
-						</div>
-						<div class="community_content">
-							<div class="community_content_title">
-								“全民防新冠,健康你我他”文明劝导
-							</div>
-							<div class="community_content_time">2021-09-25</div>
-							<div class="content_task">
-								<div>任务介绍</div>
-								<div>宣传防疫知识,劝导行人做好防疫措施、带好口罩</div>
-							</div>
-							<div class="content_rgtime">
-								<div>报名时间</div>
-								<div>2021-09-30</div>
-							</div>
-							<div class="content_phone">
-								<div class="phone">
-									<img src="../../assets/icon/phone.png" alt="" />
-								</div>
-								<div>82575674</div>
-							</div>
-						</div>
-						<div class="community_buttom">
-							<div class="community_attend">加入报名</div>
-							<div>></div>
-						</div>
-					</div>
-					<div class="content_community">
-						<div class="community_top">
-							<div class="community_people">
-								<img src="../../assets/icon/people.png" alt="" />
-							</div>
-							<div class="community_title">坂田街道义工联</div>
-						</div>
-						<div class="community_content">
-							<div class="community_content_title">
-								“全民防新冠,健康你我他”文明劝导
-							</div>
-							<div class="community_content_time">2021-09-25</div>
-							<div class="content_task">
-								<div>任务介绍</div>
-								<div>宣传防疫知识,劝导行人做好防疫措施、带好口罩</div>
-							</div>
-							<div class="content_rgtime">
-								<div>报名时间</div>
-								<div>2021-09-30</div>
-							</div>
-							<div class="content_phone">
-								<div class="phone">
-									<img src="../../assets/icon/phone.png" alt="" />
-								</div>
-								<div>82575674</div>
-							</div>
-						</div>
-						<div class="community_buttom">
-							<div class="community_attend">加入报名</div>
-							<div>></div>
-						</div>
-					</div>
-					<div class="content_community">
-						<div class="community_top">
-							<div class="community_people">
-								<img src="../../assets/icon/people.png" alt="" />
-							</div>
-							<div class="community_title">福田街道志愿者协会</div>
-						</div>
-						<div class="community_content">
-							<div class="community_content_title">
-								“全民防新冠,健康你我他”文明劝导
-							</div>
-							<div class="community_content_time">2021-09-25</div>
-							<div class="content_task">
-								<div>任务介绍</div>
-								<div>宣传防疫知识,劝导行人做好防疫措施、带好口罩</div>
-							</div>
-							<div class="content_rgtime">
-								<div>报名时间</div>
-								<div>2021-09-30</div>
-							</div>
-							<div class="content_phone">
-								<div class="phone">
-									<img src="../../assets/icon/phone.png" alt="" />
-								</div>
-								<div>82575674</div>
-							</div>
-						</div>
-						<div class="community_buttom">
-							<div class="community_attend">加入报名</div>
-							<div>></div>
-						</div>
-					</div>
-				</div>
-			</div>
-		</div>
-	</div>
+			</div> -->
+    </div>
+    <div class="pb_content_body">
+      <div class="body_top">
+        <div class="body_top_first">
+          <div
+            :class="choose == 0 ? 'ischoose' : 'nochoose'"
+            @click="choose = 0"
+          >
+            
+          </div>
+          <div
+            :class="choose == 1 ? 'ischoose' : 'nochoose'"
+            @click="choose = 1"
+          >
+            
+          </div>
+          <div
+            :class="choose == 2 ? 'ischoose' : 'nochoose'"
+            @click="choose = 2"
+          >
+            
+          </div>
+        </div>
+        <div class="body_top_second">
+          <el-input
+            v-if="this.choose == 0 || this.choose == 1"
+            placeholder="请输入任务名搜索.."
+          ></el-input>
+          <el-input v-else placeholder="请输入社团名搜索.."></el-input>
+          <div class="search_img">
+            <img src="../../assets/icon/search.png" alt="" />
+          </div>
+        </div>
+        <div
+          style="font-size: 0.8rem; width: 94%; margin: 0.5rem auto"
+          v-if="this.choose == 0 || this.choose == 1"
+        >
+          最近发布任务
+        </div>
+        <div class="body_content" v-if="this.choose == 0">
+          <div class="content_top">
+            <div class="content_top_tb">
+              <img src="../../assets/icon/house.png" alt="" />
+            </div>
+            <div
+              style="font-size: 16px; line-height: 2.2rem; padding-left: 0.5rem"
+            >
+              家庭劳动
+            </div>
+          </div>
+          <div class="content_body">
+            <div class="content_new" @click="goTo('/workDetail?type=1')">
+              <div class="new_left">
+                <div class="new_title">绿色快乐农耕园</div>
+                <div class="new_content">
+                  开展"家务劳动小能手"让幼儿体会父母的艰苦劳动
+                </div>
+              </div>
+              <div
+                :class="finish == false ? 'new_right' : 'isfinish_new_right'"
+              >
+                {{ this.finish == false ? "去完成" : "已完成" }}
+              </div>
+            </div>
+            <div class="content_new" @click="goTo('/workDetail?type=1')">
+              <div class="new_left">
+                <div class="new_title">垃圾分类203</div>
+                <div class="new_content">
+                  辛苦,激发幼儿为父母分担家务劳动的激情和孝敬父母的感恩之心
+                </div>
+              </div>
+              <div
+                :class="finish == false ? 'new_right' : 'isfinish_new_right'"
+              >
+                {{ this.finish == false ? "去完成" : "已完成" }}
+              </div>
+            </div>
+            <div class="content_new" @click="goTo('/workDetail?type=1')">
+              <div class="new_left">
+                <div class="new_title">制作中秋节灯笼</div>
+                <div class="new_content">
+                  因此让幼儿在家里做一件力所能及的家务。
+                </div>
+              </div>
+              <div
+                :class="finish == false ? 'new_right' : 'isfinish_new_right'"
+              >
+                {{ this.finish == false ? "去完成" : "已完成" }}
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="body_content" v-if="this.choose == 1">
+          <div class="content_top">
+            <div class="content_top_tb">
+              <img src="../../assets/icon/house.png" alt="" />
+            </div>
+            <div
+              style="font-size: 16px; line-height: 2.2rem; padding-left: 0.5rem"
+            >
+              学校劳动
+            </div>
+          </div>
+          <div class="content_body">
+            <div class="content_new" @click="goTo('/workDetail?type=1')">
+              <div class="new_left">
+                <div class="new_title">绿色快乐农耕园</div>
+                <div class="new_content">
+                  开展"家务劳动小能手"让幼儿体会父母的艰苦劳动
+                </div>
+              </div>
+              <div
+                :class="finish == false ? 'new_right' : 'isfinish_new_right'"
+              >
+                {{ this.finish == false ? "去完成" : "已完成" }}
+              </div>
+            </div>
+            <div class="content_new" @click="goTo('/workDetail?type=1')">
+              <div class="new_left">
+                <div class="new_title">垃圾分类203</div>
+                <div class="new_content">
+                  辛苦,激发幼儿为父母分担家务劳动的激情和孝敬父母的感恩之心
+                </div>
+              </div>
+              <div
+                :class="finish == false ? 'new_right' : 'isfinish_new_right'"
+              >
+                {{ this.finish == false ? "去完成" : "已完成" }}
+              </div>
+            </div>
+            <div class="content_new" @click="goTo('/workDetail?type=1')">
+              <div class="new_left">
+                <div class="new_title">制作中秋节灯笼</div>
+                <div class="new_content">
+                  因此让幼儿在家里做一件力所能及的家务。
+                </div>
+              </div>
+              <div
+                :class="finish == false ? 'new_right' : 'isfinish_new_right'"
+              >
+                {{ this.finish == false ? "去完成" : "已完成" }}
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="body_content" v-if="this.choose == 2">
+          <div class="content_community" @click="goTo('/workDetail?type=2')">
+            <div class="community_top">
+              <div class="community_people">
+                <img src="../../assets/icon/people.png" alt="" />
+              </div>
+              <div class="community_title">莲花街社区志愿者协会</div>
+            </div>
+            <div class="community_content">
+              <div class="community_content_title">
+                “全民防新冠,健康你我他”文明劝导
+              </div>
+              <div class="community_content_time">2021-09-25</div>
+              <div class="content_task">
+                <div>任务介绍</div>
+                <div>宣传防疫知识,劝导行人做好防疫措施、带好口罩</div>
+              </div>
+              <div class="content_rgtime">
+                <div>报名时间</div>
+                <div>2021-09-30</div>
+              </div>
+              <div class="content_phone">
+                <div class="phone">
+                  <img src="../../assets/icon/phone.png" alt="" />
+                </div>
+                <div>82575674</div>
+              </div>
+            </div>
+            <div class="community_buttom">
+              <div class="community_attend">加入报名</div>
+              <div>></div>
+            </div>
+          </div>
+          <div class="content_community" @click="goTo('/workDetail?type=2')">
+            <div class="community_top">
+              <div class="community_people">
+                <img src="../../assets/icon/people.png" alt="" />
+              </div>
+              <div class="community_title">坂田街道义工联</div>
+            </div>
+            <div class="community_content">
+              <div class="community_content_title">
+                “全民防新冠,健康你我他”文明劝导
+              </div>
+              <div class="community_content_time">2021-09-25</div>
+              <div class="content_task">
+                <div>任务介绍</div>
+                <div>宣传防疫知识,劝导行人做好防疫措施、带好口罩</div>
+              </div>
+              <div class="content_rgtime">
+                <div>报名时间</div>
+                <div>2021-09-30</div>
+              </div>
+              <div class="content_phone">
+                <div class="phone">
+                  <img src="../../assets/icon/phone.png" alt="" />
+                </div>
+                <div>82575674</div>
+              </div>
+            </div>
+            <div class="community_buttom">
+              <div class="community_attend">加入报名</div>
+              <div>></div>
+            </div>
+          </div>
+          <div class="content_community" @click="goTo('/workDetail?type=2')">
+            <div class="community_top">
+              <div class="community_people">
+                <img src="../../assets/icon/people.png" alt="" />
+              </div>
+              <div class="community_title">福田街道志愿者协会</div>
+            </div>
+            <div class="community_content">
+              <div class="community_content_title">
+                “全民防新冠,健康你我他”文明劝导
+              </div>
+              <div class="community_content_time">2021-09-25</div>
+              <div class="content_task">
+                <div>任务介绍</div>
+                <div>宣传防疫知识,劝导行人做好防疫措施、带好口罩</div>
+              </div>
+              <div class="content_rgtime">
+                <div>报名时间</div>
+                <div>2021-09-30</div>
+              </div>
+              <div class="content_phone">
+                <div class="phone">
+                  <img src="../../assets/icon/phone.png" alt="" />
+                </div>
+                <div>82575674</div>
+              </div>
+            </div>
+            <div class="community_buttom">
+              <div class="community_attend">加入报名</div>
+              <div>></div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				choose: 0,
-				finish: false,
-			};
-		},
-		methods: {
-			goTo(path) {
-				this.$router.push(path);
-			},
-		},
-		activated() {},
-	};
+export default {
+  name: "main-keep-alive",
+  data() {
+    return {
+      choose: 0,
+      finish: false,
+    };
+  },
+  methods: {
+    goTo(path) {
+      this.$router.push(path);
+    },
+  },
+  activated() {},
+};
 </script>
 
 <style scoped>
-	.top_first {
-		display: flex;
-		flex-direction: row;
-		justify-content: center;
-		height: 100%;
-	}
-	.tx {
-		width: 2.1rem;
-		height: 2.1rem;
-		line-height: 7.5rem;
-	}
-	.tx > img,
-	.search_img > img,
-	.content_top_tb > img,
-	.community_people > img,
-	.phone > img,
-	.leader > img,
-	.clean > img {
-		width: 100%;
-		height: 100%;
-	}
-	.tx_right {
-		display: flex;
-		flex-direction: column;
-		flex-wrap: nowrap;
-		text-align: left;
-		padding-left: 0.4rem;
-	}
-	.right_first > div:nth-child(1) {
-		font-size: 1rem;
-		line-height: 3rem;
-		padding-top: 0.8rem;
-	}
-	.right_first {
-		display: flex;
-	}
-	.tx_right > div:nth-child(2) {
-		font-size: 0.1rem;
-		line-height: 0.1rem;
-	}
-	.body_top_first {
-		margin: 0.3rem 0 0.3rem 0;
-		display: flex;
-	}
-	.ischoose {
-		width: 4rem;
-		text-align: center;
-		background: #ff6666;
-		border: 0.1rem solid #ff6666;
-		border-radius: 3rem;
-		color: #fff;
-		font-size: 0.7rem;
-		margin-left: 0.8rem;
-		line-height: 1.2rem;
-		box-shadow: 0px 0.3rem 0.1rem #db4141;
-	}
-	.nochoose {
-		background: #dbdbdb;
-		width: 4rem;
-		text-align: center;
-		border-radius: 3rem;
-		color: #fff;
-		font-size: 0.7rem;
-		margin-left: 0.8rem;
-		line-height: 1.2rem;
-	}
-	.body_top_second {
-		margin-top: 1rem;
-		position: relative;
-	}
-	.body_top_second >>> .el-input {
-		width: 95%;
-		border: none;
-		margin-left: 0.5rem;
-	}
-	.body_top_second >>> .el-input > input {
-		height: 1.8rem;
-		font-size: 0.2rem;
-	}
-	.search_img {
-		width: 1.1rem;
-		position: absolute;
-		top: 0.3rem;
-		right: 0.8rem;
-	}
-	.content_top {
-		width: 95%;
-		margin: 0 auto;
-		display: flex;
-		background: #e8e8e8;
-		height: 2.2rem;
-		border-radius: 0.2rem;
-		box-shadow: 0.1rem 0.2rem 0.2rem #ccc;
-	}
-	.content_top_tb {
-		width: 1.2rem;
-		height: 1.2rem;
-		padding: 0.5rem 0 0.5rem 0.5rem;
-	}
-	.content_body {
-		width: 95%;
-		margin: 0 auto;
-		height: 17rem;
-		background: #fff;
-		overflow: auto;
-		border-radius: 0.3rem;
-		box-shadow: 0.1rem 0.2rem 0.2rem #ccc;
-	}
-	.content_new {
-		display: flex;
-		width: 86%;
-		margin: 0 auto;
-		flex-direction: row;
-		padding: 0.4rem 0.6rem 0.2rem 0.6rem;
-		justify-content: space-around;
-		border-bottom: 1px dashed #999;
-	}
-	.new_left {
-		display: flex;
-		flex-direction: column;
-		flex-wrap: nowrap;
-	}
-	.new_title {
-		font-size: 0.8rem;
-		font-weight: bold;
-		margin-bottom: 0.4rem;
-	}
-	.new_content {
-		font-size: 0.5rem;
-		text-overflow: ellipsis;
-		overflow: hidden;
-		width: 250px;
-		white-space: nowrap;
-	}
-	.new_right {
-		font-size: 0.2rem;
-		line-height: 3rem;
-		color: #f54444;
-	}
-	.isfinish_new_right {
-		font-size: 0.2rem;
-		line-height: 3rem;
-		color: #6ec784;
-	}
-	.content_community {
-		background: #fff;
-		width: 90%;
-		margin: 1rem auto;
-		border-radius: 0.4rem;
-		border: 1px solid #e0e0e0;
-		box-shadow: 0.1rem 0.1rem 0.2rem #ccc;
-	}
-	.community_top {
-		background: rgb(241 241 241);
-		display: flex;
-		width: 100%;
-		padding: 0.5rem 0;
-		margin: 0 auto;
-		height: 1.5rem;
-	}
-	.community_people {
-		width: 1rem;
-		height: 1rem;
-		line-height: 1.5rem;
-		margin: 0 0.5rem;
-	}
-	.community_title {
-		font-size: 16px;
-		line-height: 1.2rem;
-	}
-	.community_content {
-		display: flex;
-		flex-direction: column;
-		border-bottom: 1px solid #e6e6e6;
-	}
-	.community_content_title {
-		font-size: 0.7rem;
-		font-weight: bold;
-		margin: 0.5rem 0;
-	}
-	.community_content_time {
-		font-size: 0.1rem;
-		margin: 0 0.8rem;
-		color: #969696;
-	}
-	.content_task,
-	.content_rgtime,
-	.content_phone {
-		display: flex;
-		align-items: center;
-		margin: 0.4rem 0 0 0.8rem;
-	}
-	.content_phone {
-		padding-bottom: 0.8rem;
-	}
-	.content_task > div:nth-child(1),
-	.content_rgtime > div:nth-child(1) {
-		font-size: 12px;
-		color: #c3c3c3;
-		width: 3rem;
-		line-height: 1rem;
-	}
-	.content_task > div:nth-child(2),
-	.content_rgtime > div:nth-child(2),
-	.content_phone > div:nth-child(2) {
-		font-size: 15px;
-		width: 14rem;
-		text-overflow: ellipsis;
-		overflow: hidden;
-		white-space: nowrap;
-	}
-	.phone {
-		width: 0.9rem;
-	}
-	.content_phone > div:nth-child(2) {
-		padding-left: 0.4rem;
-		color: #878a89;
-		font-size: 0.1rem;
-	}
-	.community_attend {
-		padding: 0.5rem 0 0.5rem 0.8rem;
-		font-size: 16px;
-	}
-	.leader {
-		width: 1.5rem;
-		height: 1rem;
-		line-height: 4.3rem;
-	}
-	.look_work {
-		display: flex;
-		align-items: center;
-		position: absolute;
-		right: 0.5rem;
-		top: 0;
-	}
-	.clean {
-		width: 0.8rem;
-		height: 0.8rem;
-		line-height: 1rem;
-	}
-	.audit_work {
-		padding-left: 0.2rem;
-		font-size: 0.5rem;
-	}
-	.community_buttom {
-		display: flex;
-		align-items: center;
-		flex-direction: row;
-		justify-content: space-between;
-	}
-	.community_buttom > div:nth-child(2) {
-		padding-right: 1rem;
-	}
+.top_first {
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  height: 100%;
+  align-items: center;
+}
+.tx {
+  width: 2.6rem;
+  height: 2.6rem;
+  overflow: hidden;
+  border-radius: 2.6rem;
+}
+.tx > img,
+.search_img > img,
+.content_top_tb > img,
+.community_people > img,
+.phone > img,
+.leader > img,
+.clean > img {
+  width: 100%;
+  height: 100%;
+}
+.tx_right {
+  display: flex;
+  flex-direction: column;
+  flex-wrap: nowrap;
+  text-align: left;
+  padding-left: 0.4rem;
+}
+.tx_right div{
+	height: 1.5rem;
+    display: flex;
+    align-items: center;
+}
+.right_first {
+	font-size: 1.1rem;
+}
+.tx_right > div:nth-child(2) {
+  font-size: 0.1rem;
+  height: 1rem;
+}
+.body_top_first {
+  margin: 0.3rem 0 0.3rem 0;
+  display: flex;
+}
+.ischoose {
+  width: 4rem;
+  text-align: center;
+  background: #ff6666;
+  border: 0.1rem solid #ff6666;
+  border-radius: 3rem;
+  color: #fff;
+  font-size: 0.7rem;
+  margin-left: 0.8rem;
+  line-height: 1.2rem;
+  box-shadow: 0px 0.3rem 0.1rem #db4141;
+}
+.nochoose {
+  background: #dbdbdb;
+  width: 4rem;
+  text-align: center;
+  border-radius: 3rem;
+  color: #fff;
+  font-size: 0.7rem;
+  margin-left: 0.8rem;
+  line-height: 1.2rem;
+}
+.body_top_second {
+  margin-top: 1rem;
+  position: relative;
+}
+.body_top_second >>> .el-input {
+  width: 95%;
+  border: none;
+  margin-left: 0.5rem;
+}
+.body_top_second >>> .el-input > input {
+  height: 1.8rem;
+  font-size: 0.2rem;
+}
+.search_img {
+  width: 1.1rem;
+  position: absolute;
+  top: 0.3rem;
+  right: 0.8rem;
+}
+.content_top {
+  width: 95%;
+  margin: 0 auto;
+  display: flex;
+  background: #e8e8e8;
+  height: 2.2rem;
+  border-radius: 0.2rem;
+  box-shadow: 0.1rem 0.2rem 0.2rem #ccc;
+}
+.content_top_tb {
+  width: 1.2rem;
+  height: 1.2rem;
+  padding: 0.5rem 0 0.5rem 0.5rem;
+}
+.content_body {
+  width: 95%;
+  margin: 0 auto;
+  height: 17rem;
+  background: #fff;
+  overflow: auto;
+  border-radius: 0.3rem;
+  box-shadow: 0.1rem 0.2rem 0.2rem #ccc;
+}
+.content_new {
+  display: flex;
+  width: 86%;
+  margin: 0 auto;
+  flex-direction: row;
+  padding: 0.4rem 0.6rem 0.2rem 0.6rem;
+  justify-content: space-around;
+  border-bottom: 1px dashed #999;
+}
+.new_left {
+  display: flex;
+  flex-direction: column;
+  flex-wrap: nowrap;
+}
+.new_title {
+  font-size: 0.8rem;
+  font-weight: bold;
+  margin-bottom: 0.4rem;
+}
+.new_content {
+  font-size: 0.5rem;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  width: 250px;
+  white-space: nowrap;
+}
+.new_right {
+  font-size: 0.2rem;
+  line-height: 3rem;
+  color: #f54444;
+}
+.isfinish_new_right {
+  font-size: 0.2rem;
+  line-height: 3rem;
+  color: #6ec784;
+}
+.content_community {
+  background: #fff;
+  width: 90%;
+  margin: 1rem auto;
+  border-radius: 0.4rem;
+  border: 1px solid #e0e0e0;
+  box-shadow: 0.1rem 0.1rem 0.2rem #ccc;
+}
+.community_top {
+  background: rgb(241 241 241);
+  display: flex;
+  width: 100%;
+  padding: 0.5rem 0;
+  margin: 0 auto;
+  height: 1.5rem;
+}
+.community_people {
+  width: 1rem;
+  height: 1rem;
+  line-height: 1.5rem;
+  margin: 0 0.5rem;
+}
+.community_title {
+  font-size: 16px;
+  line-height: 1.2rem;
+}
+.community_content {
+  display: flex;
+  flex-direction: column;
+  border-bottom: 1px solid #e6e6e6;
+}
+.community_content_title {
+  font-size: 0.7rem;
+  font-weight: bold;
+  margin: 0.5rem 0;
+}
+.community_content_time {
+  font-size: 0.1rem;
+  margin: 0 0.8rem;
+  color: #969696;
+}
+.content_task,
+.content_rgtime,
+.content_phone {
+  display: flex;
+  align-items: center;
+  margin: 0.4rem 0 0 0.8rem;
+}
+.content_phone {
+  padding-bottom: 0.8rem;
+}
+.content_task > div:nth-child(1),
+.content_rgtime > div:nth-child(1) {
+  font-size: 12px;
+  color: #c3c3c3;
+  width: 3rem;
+  line-height: 1rem;
+}
+.content_task > div:nth-child(2),
+.content_rgtime > div:nth-child(2),
+.content_phone > div:nth-child(2) {
+  font-size: 15px;
+  width: 14rem;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  white-space: nowrap;
+}
+.phone {
+  width: 0.9rem;
+}
+.content_phone > div:nth-child(2) {
+  padding-left: 0.4rem;
+  color: #878a89;
+  font-size: 0.1rem;
+}
+.community_attend {
+  padding: 0.5rem 0 0.5rem 0.8rem;
+  font-size: 16px;
+}
+.leader {
+  width: 1.5rem;
+  height: 1rem;
+  line-height: 4.3rem;
+}
+.look_work {
+  display: flex;
+  align-items: center;
+  position: absolute;
+  right: 0.5rem;
+  top: 0;
+}
+.clean {
+  width: 0.8rem;
+  height: 0.8rem;
+  line-height: 1rem;
+}
+.audit_work {
+  padding-left: 0.2rem;
+  font-size: 0.5rem;
+}
+.community_buttom {
+  display: flex;
+  align-items: center;
+  flex-direction: row;
+  justify-content: space-between;
+}
+.community_buttom > div:nth-child(2) {
+  padding-right: 1rem;
+}
 </style>

+ 4 - 4
src/components/pages/learning.vue

@@ -2,9 +2,9 @@
   <div class="pb_content" style="background: #24833d">
     <div class="pb_head">
       <span>五育融合</span>
-      <div class="pb_left">
+      <!-- <div class="pb_left">
         <span style="font-size: .1rem;">我的任务</span>
-      </div>
+      </div> -->
     </div>
     <div class="pb_content_body" style="height: calc(100% - 3rem)">
       <div class="li_head">
@@ -30,11 +30,11 @@
       <div class="xi_content">
         <div class="learn_box">
           <img v-lazy="require('../../assets/icon/leiIcon.png')" alt="" />
-          <span>雷达图分析</span>
+          <span>雷达图分析(点击查看任务)</span>
         </div>
         <div>
           <div>
-            <van-image :src="require('../../assets/a.png')" fit="contain" />
+            <van-image :src="require('../../assets/a.png')" fit="contain" @click="goTo('/learningDetail')" />
           </div>
         </div>
       </div>

+ 126 - 0
src/components/pages/learningDetail.vue

@@ -0,0 +1,126 @@
+<template>
+  <div class="pb_content" style="background: #fff">
+    <div class="pb_head">
+      <van-icon
+        name="arrow-left"
+        color="#fff"
+        class="pb_back"
+        size="1.2rem"
+        @click="goBack"
+      />
+      <span>劳动能力</span>
+    </div>
+    <div class="pb_content_body" style="height: calc(100% - 3rem)">
+      <div
+            class="my_wordBox"
+            v-for="x in 20"
+            :key="x"
+            @click="goTo('myWorkDetail')"
+          >
+            <div class="my_wordBox_title">
+              <div class="my_wordBox_titlet">
+                <img v-lazy="require('../../assets/icon/lao.png')" alt="" />
+                <span class="van-ellipsis">绿色快乐农耕园</span>
+              </div>
+            </div>
+            <div class="my_wordBox_content van-multi-ellipsis--l3">
+              生活中多数家长认为,孩子身心健康、聪明、爱学习是第一位的,相比之下,动手操作一些生活中的“小事”没那么重要。其实,劳动蕴含着重要的“学习价值”,劳动也是一种学习。它能够为孩子提供丰富的感知、操作机会,使他在各种操作活动中获得认知发展;还能锻炼各种能力,帮助孩子养成良好的生活习惯,培养责任感和良好品质。
+            </div>
+            <div class="my_wordBox_bottom">
+              <div>09-24 18:00</div>
+              <div :class="{ finish: x != 2 }">
+                {{ x != 2 ? "已完成" : "未完成" }}
+              </div>
+            </div>
+          </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "main-keep-alive",
+  data() {
+    return {
+      smailheadportrait: this.$store.state.userInfo.smailheadportrait,
+      name: this.$store.state.userInfo.name,
+      className: this.$store.state.userInfo.classnameA,
+      schoolName: this.$store.state.userInfo.schoolName,
+    };
+  },
+  methods: {
+    goTo(path, cid) {
+      this.$router.push(path);
+    },
+    goBack() {
+      this.$router.isBack = true;
+      if (window.history.length <= 1) {
+        this.$router.push({ path: "/" });
+        return false;
+      } else {
+        this.$router.go(-1);
+      }
+    },
+  },
+  created() {},
+};
+</script>
+
+<style scoped>
+.my_wordBox {
+  padding: 1rem 0.6rem;
+  background: #fff;
+  width: 95%;
+  margin: 0.5rem auto;
+  border-radius: 0.3rem;
+  box-shadow: 0 0 10px #d8d8d8;
+  box-sizing: border-box;
+}
+
+.my_wordBox_title {
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.my_wordBox_titlet {
+  width: calc(100% - 2rem);
+  display: flex;
+  align-items: center;
+}
+.my_wordBox_titlet img {
+  width: 1.5rem;
+  margin-right: 0.3rem;
+}
+.my_wordBox_title .my_wordBox_titlet span {
+  font-size: 0.9rem;
+  /* font-weight: 600; */
+}
+.my_wordBox_title span {
+  font-size: 0.65rem;
+}
+.my_wordBox_content {
+  font-size: 0.8rem;
+  color: rgb(134, 134, 134);
+  margin: 0.2rem 0;
+}
+
+.my_wordBox_bottom {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.my_wordBox_bottom div:nth-child(1) {
+  font-size: 0.65rem;
+  color: rgb(134, 134, 134);
+}
+
+.my_wordBox_bottom div:nth-child(2) {
+  color: red;
+  font-size: 0.9rem;
+}
+.my_wordBox_bottom .finish {
+  color: #46bb65 !important;
+}
+</style>

+ 2 - 2
src/components/pages/my.vue

@@ -206,11 +206,11 @@ export default {
 }
 .my_wordBox_titlet img {
   width: 1.3rem;
-  margin-right: 0.5rem;
+  margin-right: 0.3rem;
 }
 .my_wordBox_title .my_wordBox_titlet span {
   font-size: 0.9rem;
-  font-weight: 600;
+  /* font-weight: 600; */
 }
 .my_wordBox_title span {
   font-size: 0.65rem;

+ 2 - 2
src/components/pages/myWorkDetail.vue

@@ -69,11 +69,11 @@ export default {
 }
 .mwd_title img {
   width: 1.3rem;
-  margin-right: 0.5rem;
+  margin-right: 0.3rem;
 }
 .mwd_title span {
   font-size: 0.9rem;
-  font-weight: 600;
+  /* font-weight: 600; */
 }
 
 .mwd_content {

+ 510 - 88
src/components/pages/submitWork.vue

@@ -1,96 +1,518 @@
 <template>
-	<div class="pb_content2" style="background: #fff">
-		<div class="pb_head">
-			<van-icon
-				name="arrow-left"
-				color="#fff"
-				class="pb_back"
-				size="1.2rem"
-				@click="goBack"
-			/>
-			<span>提交作业</span>
-		</div>
-		<div
-			class="pb_content_body"
-			style="
-				display: flex;
-				flex-direction: column;
-				justify-content: space-between;
-				position: relative;
-				min-height: calc(100% - 3rem);
-			"
-		>
-			<div class="myp_parent_textarea">
-				<van-field
-					v-model="message"
-					rows="6"
-					autosize
-					type="textarea"
-					placeholder="输入文字描述..."
-					border
-				/>
-			</div>
-			<div class="myp_upload">
-				<van-uploader v-model="fileList" multiple />
-			</div>
-			<div class="upload_work" @click="uploadNow">立即上传</div>
-		</div>
-		<el-dialog></el-dialog>
-	</div>
+  <div class="pb_content2" style="background: #fff">
+    <div class="pb_head">
+      <van-icon
+        name="arrow-left"
+        color="#fff"
+        class="pb_back"
+        size="1.2rem"
+        @click="goBack"
+      />
+      <span>提交作业</span>
+    </div>
+    <div class="pb_content_body">
+      <div>
+        <span>上传作业</span>
+        <div class="myp_parent_textarea">
+          <van-field
+            v-model="message"
+            rows="6"
+            autosize
+            type="textarea"
+            placeholder="输入文字描述..."
+            border
+          />
+        </div>
+      </div>
+      <div>
+        <span>上传图片</span>
+        <div>
+          <!-- capture="camera"  -->
+          <van-uploader
+            v-model="fileList"
+            :after-read="afterRead"
+            preview-size="5rem"
+            accept="image/*"
+            v-loading="photoLoading"
+          >
+            <img src="../../assets/icon/photo.png" alt="" />
+            <template #preview-cover>
+              <div class=""></div>
+            </template>
+          </van-uploader>
+          <!-- <div v-for="(item,idnex) in fileaaa" :key="idnex">
+            {{ item.webkitRelativePath }} -- {{ item.name }}--{{ item.size }} --
+            {{ item.type }}
+          </div> -->
+          <div>{{ error }}</div>
+        </div>
+      </div>
+      <div>
+        <span>上传视频</span>
+        <div>
+          <!-- capture="camera"   -->
+          <van-uploader
+            v-model="fileList2"
+            :after-read="afterReadM"
+            preview-size="5rem"
+            accept="video/*"
+            max-count="1"
+            v-loading="mediaLoading"
+            @click-preview="mediaPreview"
+          >
+            <img src="../../assets/icon/shipin.png" alt="" />
+            <template #preview-cover>
+              <div class=""></div>
+            </template>
+          </van-uploader>
+          <!-- <div v-for="item in filebbb" :key="item.name">
+            {{ item.webkitRelativePath }} -- {{ item.name }}--{{ item.size }} --
+            {{ item.type }}
+          </div> -->
+          <!-- <div>{{fileMname}}</div> -->
+        </div>
+      </div>
+      <div class="class_learn">
+        <button @click="findWorkRepeat">提交作业</button>
+      </div>
+    </div>
+    <van-overlay
+      :show="show"
+      @click="overlayShow"
+      style="display: flex; align-items: center"
+    >
+      <div class="wrapper" @click.stop>
+        <video-player
+          class="video-player vjs-custom-skin"
+          ref="videoPlayer"
+          :playsinline="playsinline"
+          @canplay="onPlayerCanplay($event)"
+          :options="playerO"
+          @play="onPlayerPlay($event)"
+          style="width: 100%; height: 100%"
+        ></video-player>
+      </div>
+    </van-overlay>
+  </div>
 </template>
 
 <script>
-	import Vue from "vue";
-	import { Uploader } from "vant";
-	import { Dialog } from "vant";
-
-	// 全局注册
-	Vue.use(Dialog);
-
-	Vue.use(Uploader);
-	export default {
-		data() {
-			return {
-				message: "",
-				fileList: [],
-			};
-		},
-		methods: {
-			goBack() {
-				this.$router.isBack = true;
-				if (window.history.length <= 1) {
-					this.$router.push({ path: "/" });
-					return false;
-				} else {
-					this.$router.go(-1);
-				}
-			},
-			uploadNow() {
-				this.$toast.success("提交成功");
-				setTimeout(() => {
-					this.goBack();
-				}, 1000);
-			},
-		},
-	};
+import "../../common/aws-sdk-2.235.1.min";
+
+export default {
+  data() {
+    return {
+      //   cid: this.$route.query.cid,
+      message: "",
+      fileList: [],
+      fileList2: [],
+      fileaaa: [],
+      filebbb: [],
+      now: null,
+      photoLoading: false,
+      mediaLoading: false,
+      error: "",
+      show: false,
+      playerOptions: {
+        playbackRates: [0.7, 1.0, 1.5, 2.0], //播放速度
+        autoplay: false, //如果true,浏览器准备好时开始回放。
+        muted: false, // 默认情况下将会消除任何音频。
+        loop: false, // 导致视频一结束就重新开始。
+        preload: "auto", // 建议浏览器在<video>加载元素后是否应该开始下载视频数据。auto浏览器选择最佳行为,立即开始加载视频(如果浏览器支持)
+        language: "zh-CN",
+        aspectRatio: "16:9", // 将播放器置于流畅模式,并在计算播放器的动态大小时使用该值。值应该代表一个比例 - 用冒号分隔的两个数字(例如"16:9"或"4:3")
+        fluid: true, // 当true时,Video.js player将拥有流体大小。换句话说,它将按比例缩放以适应其容器。
+        sources: [
+          {
+            type: "video/mp4", //这里的种类支持很多种:基本视频格式、直播、流媒体等,具体可以参看git网址项目   || "video/ogg"|| "video/webm"
+            src: "", //url地址require("../../assets/media/aaa.mp4")
+          },
+        ],
+        // poster: require("../../assets/tu31.png"), //你的封面地址
+        // poster: dataRes.imgUrl, //你的封面地址
+        notSupportedMessage: "此视频暂无法播放,请稍后再试", //允许覆盖Video.js无法播放媒体源时显示的默认信息。
+        controlBar: {
+          timeDivider: true, //当前时间和持续时间的分隔符
+          durationDisplay: true, //显示持续时间
+          remainingTimeDisplay: false, //是否显示剩余时间功能
+          fullscreenToggle: true, //全屏按钮
+        },
+      },
+      playerO: {},
+      fileMname: "",
+    };
+  },
+  computed: {
+    playsinline() {
+      let ua = navigator.userAgent.toLocaleLowerCase();
+      // x5内核
+      if (ua.match(/tencenttraveler/) != null || ua.match(/qqbrowse/) != null) {
+        return false;
+      } else {
+        // ios端
+        return true;
+      }
+    },
+  },
+  methods: {
+    overlayShow() {
+      this.show = false;
+      this.$refs.videoPlayer.player.pause();
+    },
+    time() {
+      if (!this.now) {
+        this.now = new Date().getTime();
+        return true;
+      } else {
+        let time = new Date().getTime();
+        if (time - this.now > 3000) {
+          this.now = time;
+          return true;
+        } else {
+          return false;
+        }
+      }
+    },
+    goBack() {
+      this.$router.isBack = true;
+      if (window.history.length <= 1) {
+        this.$router.push({ path: "/" });
+        return false;
+      } else {
+        this.$router.go(-1);
+      }
+    },
+    //上传图片
+    afterRead(file) {
+      this.photoLoading = true;
+
+      var _file = file.file;
+      this.fileaaa.push(_file);
+      file.status = "uploading";
+      file.message = "上传中...";
+
+      var credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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",
+      }; //秘钥形式的登录上传
+      window.AWS.config.update(credentials);
+      window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+      var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+      var _this = this;
+
+      var mediaFormatList = ["png", "jpg", "jpeg"];
+
+      if (
+        mediaFormatList.indexOf(
+          _file.name
+            .split(".")
+            [_file.name.split(".").length - 1].toLocaleLowerCase()
+        ) == "-1"
+      ) {
+        _this.$toast.fail("请上传jpg或者png的图片格式文件");
+        _this.fileList = _this.fileList.filter((fileA) => {
+          return fileA.file.lastModified != file.file.lastModified;
+        });
+        file.status = "failed";
+        file.message = "上传失败";
+        this.photoLoading = false;
+
+        return;
+      }
+
+      if (_file) {
+        var params = {
+          Key:
+            _file.name.split(".")[0] +
+            new Date().getTime() +
+            "." +
+            _file.name.split(".")[1],
+          ContentType: _file.type,
+          Body: _file,
+          "Access-Control-Allow-Credentials": "*",
+          ACL: "public-read",
+        }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+        var options = {
+          partSize: 2048 * 1024 * 1024,
+          queueSize: 2,
+          leavePartsOnError: true,
+        };
+        bucket
+          .upload(params, options)
+          .on("httpUploadProgress", function (evt) {
+            //这里可以写进度条
+            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+          })
+          .send(function (err, data) {
+            _this.photoLoading = false;
+            if (err) {
+              _this.error = err;
+              _this.$toast.fail("上传失败");
+              file.status = "failed";
+              file.message = "上传失败";
+              //上传错误处理
+              _this.fileList = _this.fileList.filter((fileA) => {
+                return fileA.file.lastModified != _file.lastModified;
+              });
+            } else {
+              //上传成功处理
+              file.status = "success";
+              // _file.url = data.Location;
+              // _this.fileList.push(_file);
+              _this.fileList = _this.fileList.filter((fileA) => {
+                if (fileA.file.lastModified == _file.lastModified) {
+                  fileA.url = data.Location;
+                  return fileA;
+                } else {
+                  return fileA;
+                }
+              });
+              console.log(data.Location);
+            }
+          });
+      }
+    },
+    //上传视频
+    afterReadM(file) {
+      this.mediaLoading = true;
+      var _file = file.file;
+      this.filebbb.push(_file);
+      file.status = "uploading";
+      file.message = "上传中...";
+      var renameReportFile = new File(
+        [_file],
+        "MEDIA" + new Date().getTime() + "." + _file.name.split(".")[1],
+        { type: _file.type }
+      );
+      _file = renameReportFile;
+      var credentials = {
+        accessKeyId: "AKIATLPEDU37QV5CHLMH",
+        secretAccessKey: "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",
+      }; //秘钥形式的登录上传
+      window.AWS.config.update(credentials);
+      window.AWS.config.region = "cn-northwest-1"; //设置区域
+
+      var bucket = new window.AWS.S3({ params: { Bucket: "ccrb" } }); //选择桶
+      var _this = this;
+
+      if (_file) {
+        var params = {
+          Key:
+            _file.name.split(".")[0] +
+            new Date().getTime() +
+            "." +
+            _file.name.split(".")[1],
+          ContentType: _file.type,
+          Body: _file,
+          "Access-Control-Allow-Credentials": "*",
+          ACL: "public-read",
+        }; //key可以设置为桶的相抵路径,Body为文件, ACL最好要设置
+        var options = {
+          partSize: 2048 * 1024 * 1024,
+          queueSize: 2,
+          leavePartsOnError: true,
+        };
+        bucket
+          .upload(params, options)
+          .on("httpUploadProgress", function (evt) {
+            //这里可以写进度条
+            // console.log("Uploaded : " + parseInt((evt.loaded * 80) / evt.total) + '%');
+          })
+          .send(function (err, data) {
+            _this.mediaLoading = false;
+            if (err) {
+              _this.$toast.fail("上传失败");
+              file.status = "failed";
+              file.message = "上传失败";
+              //上传错误处理
+              _this.fileList2 = _this.fileList2.filter((fileA) => {
+                return fileA.file.lastModified != _file.lastModified;
+              });
+            } else {
+              //上传成功处理
+              file.status = "success";
+              _this.fileList2 = _this.fileList2.filter((fileA) => {
+                fileA.url = data.Location;
+                var renameReportFile = new File(
+                  [fileA.file],
+                  "MEDIA." + fileA.file.name.split(".")[1],
+                  { type: fileA.file.type }
+                );
+                fileA.file = renameReportFile;
+                return fileA;
+                // } else {
+                //   return fileA;
+                // }
+              });
+              console.log(data.Location);
+            }
+          });
+      }
+    },
+    findWorkRepeat() {
+      //   if (this.courseId == "") {
+      //     this.$toast.fail("请选择课题");
+      //     return;
+      //   } else if (this.message == "") {
+      //     this.$toast.fail("请填写作业描述");
+      //     return;
+      //   } else if (this.fileList.length == 0) {
+      //     this.$toast.fail("请上传作业图片");
+      //     return;
+      //   } else if (this.fileList2.length == 0) {
+      //     this.$toast.fail("请上传作业视频");
+      //     return;
+      //   }
+      //   let params = {
+      //     cid: this.cid,
+      //     uid: this.$store.state.userInfo.userid,
+      //     hid: this.courseId,
+      //   };
+      //   this.ajax
+      //     .get(this.$store.state.api + "findWorkRepeat", params)
+      //     .then((res) => {
+      //       if (res.data[0].length) {
+      //         this.$Dialog
+      //           .confirm({
+      //             title: "作业确认",
+      //             message:
+      //               "您已经提交了该作业了,如果您再提交将覆盖上次提交的作业!",
+      //           })
+      //           .then(() => {
+      //             this.SubmitWork();
+      //           })
+      //           .catch(() => {
+      //             // on cancel
+      //           });
+      //       } else {
+      //         this.SubmitWork();
+      //       }
+      //     })
+      //     .catch((err) => {
+      //       console.error(err);
+      //     });
+      this.$toast.success("提交成功");
+    },
+    //提交作业
+    SubmitWork() {
+      if (this.time()) {
+        var photo = [];
+        var media = [];
+
+        for (var i = 0; i < this.fileList.length; i++) {
+          photo.push(this.fileList[i].url);
+        }
+
+        for (var i = 0; i < this.fileList2.length; i++) {
+          media.push(this.fileList2[i].url);
+        }
+
+        this.$store.commit("update", ["loading", true]);
+        // 自定义加载图标
+        this.$toast.loading({
+          message: "提交中...",
+          forbidClick: true,
+          loadingType: "spinner",
+          duration: 0,
+        });
+        let params = [
+          {
+            uid: this.$store.state.userInfo.userid,
+            cid: this.cid,
+            hid: this.courseId,
+            ccontent: JSON.stringify({
+              content: this.message,
+              photo: photo.join(","),
+              media: media.join(","),
+            }),
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "submitWork", params)
+          .then((res) => {
+            this.$store.commit("update", ["loading", false]);
+            this.$toast.success("提交成功");
+            this.$router.go(-1);
+          })
+          .catch((err) => {
+            this.$store.commit("update", ["loading", false]);
+            this.$toast.fail("提交失败");
+            console.error(err);
+          });
+      } else {
+        return false;
+      }
+    },
+    mediaPreview(file) {
+      console.log(file);
+      this.show = true;
+      this.playerOptions.sources[0].src = file.url;
+      this.playerO = this.playerOptions;
+    },
+    onPlayerCanplay() {},
+    onPlayerPlay() {},
+  },
+  created() {},
+};
 </script>
 
 <style scoped>
-	.myp_parent_textarea {
-		width: 100%;
-		margin: 0 auto;
-	}
-	.myp_upload {
-		margin: 0 0 6rem 1.5rem;
-	}
-	.upload_work {
-		position: absolute;
-		bottom: 0;
-		width: 100%;
-		height: 2.8rem;
-		background: #50cf72;
-		color: #fff;
-		text-align: center;
-		line-height: 2.8rem;
-	}
+.myp_parent_textarea {
+  width: 93%;
+  margin: 0 auto;
+  border: 1px solid rgb(207, 207, 207);
+}
+.van-cell {
+  background: #fdfdfd;
+}
+.pb_content_body {
+  font-size: 0.9rem;
+  display: flex;
+  flex-direction: column;
+  /* justify-content: space-around; */
+  width: 90%;
+  margin: 0 auto;
+}
+
+.pb_content_body div {
+  margin: 0.5rem 0 0;
+}
+.pb_content_body div > img {
+  width: 5rem;
+}
+.pb_content_body .van-cell {
+  margin: 0;
+}
+.sw_select >>> .el-input__inner {
+  /* border: none !important; */
+  border: 1px solid #eee !important;
+}
+.sw_select >>> .el-select {
+  width: 12rem;
+}
+.class_learn button {
+  color: white;
+  background: rgb(81, 201, 154);
+  border: none;
+  box-sizing: border-box;
+  margin: 0;
+  padding: 0;
+  font-size: 1rem;
+  text-align: center;
+  border-radius: 5px;
+  cursor: pointer;
+  transition: opacity 0.2s;
+  height: 2rem;
+  width: 100%;
+  font-size: 0.8rem;
+  line-height: 1.5rem;
+}
+.wrapper {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 11rem;
+  width: 100%;
+}
 </style>

+ 168 - 132
src/components/pages/workDetail.vue

@@ -1,140 +1,176 @@
 <template>
-	<div class="pb_content2" style="background: #e8e7e7">
-		<div class="pb_head">
-			<van-icon
-				name="arrow-left"
-				color="#fff"
-				class="pb_back"
-				size="1.2rem"
-				@click="goBack"
-			/>
-			<span>作业详情</span>
-		</div>
-		<div
-			class="pb_content_body"
-			style="position: relative; min-height: calc(100% - 4rem)"
-		>
-			<div class="work_detail">
-				<div class="work_top">
-					<div class="lag"><img src="../../assets/icon/lag.png" alt="" /></div>
-					<div class="work_title">绿色快乐农耕园</div>
-				</div>
-				<div class="work_content">
-					开展"家务劳动小能手"让幼儿体会父母的辛苦,激发幼儿为父母分担家务劳动的激情。因此让幼儿在家里做一件力所能及的家务。
-				</div>
-				<div class="work_time">09-24 18:00 周五发布</div>
-			</div>
-			<div class="ex_date">
-				<div class="ex_left">
-					<div class="nolck">
-						<img src="../../assets/icon/nolck.png" alt="" />
-					</div>
-					<div class="ex_time">截止日期</div>
-				</div>
-				<div class="ex_right">09-26 周日 23:59</div>
-			</div>
-			<div class="upload_work" @click="goTo('/submitWork')">提交作业</div>
-		</div>
-	</div>
+  <div class="pb_content2" style="background: #e8e7e7">
+    <div class="pb_head">
+      <van-icon
+        name="arrow-left"
+        color="#fff"
+        class="pb_back"
+        size="1.2rem"
+        @click="goBack"
+      />
+      <span>作业详情</span>
+    </div>
+    <div
+      class="pb_content_body"
+      style="position: relative; height: calc(100% - 3rem); min-height: unset"
+    >
+      <div class="wd_box">
+        <div class="work_detail">
+          <div class="work_top">
+            <div class="lag">
+              <img src="../../assets/icon/lag.png" alt="" />
+            </div>
+            <div class="work_title">绿色快乐农耕园</div>
+          </div>
+          <div class="work_content">
+            开展"家务劳动小能手"让幼儿体会父母的辛苦,激发幼儿为父母分担家务劳动的激情。因此让幼儿在家里做一件力所能及的家务。
+          </div>
+          <div class="work_time">09-24 18:00 周五发布</div>
+        </div>
+        <div class="ex_date">
+          <div class="ex_left">
+            <div class="nolck">
+              <img src="../../assets/icon/nolck.png" alt="" />
+            </div>
+            <div class="ex_time">截止日期</div>
+          </div>
+          <div class="ex_right">09-26 周日 23:59</div>
+        </div>
+      </div>
+      <div class="wd_button" v-if="type == 1">
+        <div class="upload_work2">前往课程</div>
+        <div class="upload_work" @click="goTo('/submitWork')">提交作业</div>
+      </div>
+      <div class="wd_button" v-else-if="type == 2">
+        <div class="upload_work" @click="SignUp()">我要报名</div>
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {};
-		},
-		methods: {
-			goTo(path) {
-				this.$router.push(path);
-			},
-			goBack() {
-				this.$router.isBack = true;
-				if (window.history.length <= 1) {
-					this.$router.push({ path: "/" });
-					return false;
-				} else {
-					this.$router.go(-1);
-				}
-			},
-		},
-	};
+export default {
+  data() {
+    return {
+      type: this.$route.query.type,
+    };
+  },
+  methods: {
+    goTo(path) {
+      this.$router.push(path);
+    },
+    SignUp() {
+      this.$toast.success("报名成功,请等待管理员审核");
+    },
+    goBack() {
+      this.$router.isBack = true;
+      if (window.history.length <= 1) {
+        this.$router.push({ path: "/" });
+        return false;
+      } else {
+        this.$router.go(-1);
+      }
+    },
+  },
+};
 </script>
 
 <style scoped>
-	.lag > img,
-	.nolck > img {
-		width: 100%;
-		height: 100%;
-	}
-	.lag {
-		width: 1.5rem;
-		height: 1.5rem;
-	}
-	.work_detail {
-		background: #fff;
-		width: 90%;
-		margin: 1rem auto;
-		border-radius: 0.5rem;
-	}
-	.work_top {
-		display: flex;
-		padding: 0.8rem 0.5rem 0 0.5rem;
-	}
-	.work_title {
-		font-size: 0.9rem;
-		font-weight: bold;
-		line-height: 1.4rem;
-		padding-left: 0.4rem;
-		border-radius: 0.3rem;
-	}
-	.work_content {
-		width: 90%;
-		margin: 0 auto;
-		font-size: 0.8rem;
-		color: #999;
-		line-height: 1.5rem;
-		padding: 0.3rem 0 0.8rem 0;
-	}
-	.work_time {
-		color: #999;
-		font-size: 0.4rem;
-		padding: 0.5rem 1.2rem;
-	}
-	.nolck {
-		width: 1.1rem;
-		height: 1.1rem;
-		line-height: 1.9rem;
-	}
-	.ex_date {
-		display: flex;
-		width: 90%;
-		margin: 0 auto;
-		background: #fff;
-		padding: 0.5rem 0;
-		flex-direction: row;
-		justify-content: space-around;
-		border-radius: 0.3rem;
-	}
-	.ex_left {
-		display: flex;
-	}
-	.ex_time {
-		font-size: 0.8rem;
-		line-height: 1.5rem;
-		padding-left: 0.4rem;
-	}
-	.ex_right {
-		font-size: 0.8rem;
-		line-height: 1.5rem;
-	}
-	.upload_work {
-		position: absolute;
-		bottom: 0;
-		width: 100%;
-		height: 2.8rem;
-		background: #50cf72;
-		color: #fff;
-		text-align: center;
-		line-height: 2.8rem;
-	}
+.lag > img,
+.nolck > img {
+  width: 100%;
+  height: 100%;
+}
+.lag {
+  width: 1.5rem;
+  height: 1.5rem;
+}
+.work_detail {
+  background: #fff;
+  width: 90%;
+  margin: 0rem auto 1rem;
+  border-radius: 0.5rem;
+}
+.work_top {
+  display: flex;
+  padding: 0.8rem 0.5rem 0 0.5rem;
+}
+.work_title {
+  font-size: 0.9rem;
+  font-weight: bold;
+  line-height: 1.4rem;
+  padding-left: 0.4rem;
+  border-radius: 0.3rem;
+}
+.work_content {
+  width: 90%;
+  margin: 0 auto;
+  font-size: 0.8rem;
+  color: #999;
+  line-height: 1.5rem;
+  padding: 0.3rem 0 0.8rem 0;
+}
+.work_time {
+  color: #999;
+  font-size: 0.4rem;
+  padding: 0.5rem 1.2rem;
+}
+.nolck {
+  width: 1.1rem;
+  height: 1.1rem;
+  line-height: 1.9rem;
+}
+.ex_date {
+  display: flex;
+  width: 90%;
+  margin: 0 auto;
+  background: #fff;
+  padding: 0.5rem 0;
+  flex-direction: row;
+  justify-content: space-around;
+  border-radius: 0.3rem;
+}
+.ex_left {
+  display: flex;
+}
+.ex_time {
+  font-size: 0.8rem;
+  line-height: 1.5rem;
+  padding-left: 0.4rem;
+}
+.ex_right {
+  font-size: 0.8rem;
+  line-height: 1.5rem;
+}
+.upload_work {
+  width: 100%;
+  height: 2.8rem;
+  background: #50cf72;
+  color: #fff;
+  text-align: center;
+  line-height: 2.8rem;
+  flex: 1;
+}
+.upload_work2 {
+  width: 100%;
+  height: 2.8rem;
+  background: rgb(85, 183, 145);
+  color: #fff;
+  text-align: center;
+  line-height: 2.8rem;
+  flex: 1;
+}
+.wd_box {
+  padding: 1rem 0;
+  height: calc(100% - 2.8rem);
+  overflow: auto;
+  box-sizing: border-box;
+}
+.wd_button {
+  display: flex;
+  align-items: center;
+  position: sticky;
+  width: 100%;
+  bottom: 0;
+}
 </style>

+ 9 - 0
src/router/index.js

@@ -119,6 +119,15 @@ export default new Router({
         title: '详情',
       }
     }
+    ,
+    {
+      path: '/learningDetail',
+      name: 'learningDetail',
+      component: () => import('@/components/pages/learningDetail'),
+      meta: {
+        title: '详情',
+      }
+    }
   ]
 })