Quellcode durchsuchen

feature 我的任务增加折叠按钮

tiedan vor 4 Jahren
Ursprung
Commit
cd3b9497ce
6 geänderte Dateien mit 36 neuen und 14 gelöschten Zeilen
  1. 2 1
      app.json
  2. 6 0
      pages/myMission/myMission.js
  3. 5 2
      pages/myMission/myMission.wxml
  4. 21 4
      pages/myMission/myMission.wxss
  5. 0 5
      project.config.json
  6. 2 2
      utils/util.js

+ 2 - 1
app.json

@@ -1,7 +1,8 @@
 {
   "pages": [
-    "pages/welcome/welcome",
     "pages/index/index",
+    "pages/welcome/welcome",
+    
   
 
     

+ 6 - 0
pages/myMission/myMission.js

@@ -42,6 +42,12 @@ Page({
     currentId: null,
     currentName: "",
     tva:32,
+    fold:true,
+  },
+  showmore(){
+    this.setData({
+      fold:this.data.fold?false:true
+    })
   },
   // 检查第一个任务 班级二维码是否点击 && 检查第二个任务 学员登记表  &&   第六个任务 领取结业证
   checkTaskList(sessionKey) {

+ 5 - 2
pages/myMission/myMission.wxml

@@ -66,9 +66,9 @@
 			<view class="layout_text2" wx:else>去填写</view>
 		</view>
 	</view>
-	<view class="step">
+	<view class="step" style="padding-bottom:20rpx;">
 		<image src='{{istask3==false?"/images/step_unfinish.png":"/images/step_finish.png"}}' mode='aspectFill' class="finish_img"></image>
-		<view class="sp_bigbox">
+		<view class="sp_bigbox {{fold?'sp_bigbox_fold':''}}">
 			<view class="sp" wx:for="{{kcArr}}" wx:for-index="idx" wx:for-item="item" wx:key="idx">
 				<image src='{{item.isDone==0||item.isDone==null?"/images/unfinish.png":"/images/finish.png"}}' mode='aspectFill' class="isfinish"></image>
 				<view class="sp_text">
@@ -90,6 +90,9 @@
 			</view>
 		</view>
 	</view>
+	<view class="step">
+		<view class="sp_showmore" bindtap="showmore">{{fold?'展开所有课程':'折叠课程'}}<van-icon name="arrow-down" wx:if="{{fold}}" /><van-icon wx:if="{{!fold}}" name="arrow-up" /></view>
+	</view>
 	<view class="step" bindtap="goQmks">
 		<image src='{{istask4==false?"/images/step_unfinish.png":"/images/step_finish.png"}}' mode='aspectFill' class="finish_img"></image>
 		<image src='/images/finallytest.png' mode='aspectFill' class="bgimg1 layout"></image>

+ 21 - 4
pages/myMission/myMission.wxss

@@ -1,3 +1,19 @@
+.sp_showmore{
+
+height:74rpx;
+box-shadow: #f2f2f2 0px 0px 15rpx;
+text-align: center;
+
+font-size: 28rpx;
+font-weight: normal;
+width: 620rpx;
+display: flex;
+justify-content: center;
+align-items: center;
+
+  margin-left: 50rpx;
+  color: #999999;
+}
 .nr_box {
   width: 670rpx;
   height: 90vh;
@@ -304,15 +320,16 @@
 
 .sp_bigbox {
   width: 620rpx;
-  height: 590rpx;
-  overflow-y: auto;
+  position: relative;
   margin-left: 50rpx;
-  overflow-y: auto;
   overflow-x: hidden;
   background-color: #fff;
   box-shadow: #f2f2f2 0px 0px 15rpx;
 }
-
+.sp_bigbox_fold{
+  height: 590rpx;
+  overflow-y: auto;
+}
 .sp_bigbox::-webkit-scrollbar {
   background-color: #e5e5e5;
   width: 8rpx;

+ 0 - 5
project.config.json

@@ -44,15 +44,12 @@
   "simulatorPluginLibVersion": {},
   "condition": {
     "search": {
-      "current": -1,
       "list": []
     },
     "conversation": {
-      "current": -1,
       "list": []
     },
     "plugin": {
-      "current": -1,
       "list": []
     },
     "game": {
@@ -60,11 +57,9 @@
       "list": []
     },
     "gamePlugin": {
-      "current": -1,
       "list": []
     },
     "miniprogram": {
-      "current": -1,
       "list": [
         {
           "id": -1,

+ 2 - 2
utils/util.js

@@ -2,8 +2,8 @@
   version:'3.2.0',
 
   imgUrl:'https://edu-mp-img-1254259530.cos.ap-nanjing.myqcloud.com',
-  //publicUrl: 'https://sqdx.jiaxintech.com'//测试地址
-  publicUrl: 'https://sqpx.jiaxintech.com'//正式地址
+  publicUrl: 'https://sqpx.jiaxintech.com'//测试地址
+  //publicUrl: 'https://sqpx.jiaxintech.com'//正式地址
   // publicUrl:'http://10.16.10.139'//ly
   // publicUrl:'http://10.16.4.19:80'//hyb
   // publicUrl:'http://10.16.4.26:80'//zxq