xuqiaoying 3 лет назад
Родитель
Сommit
af79fcbf5f
3 измененных файлов с 71 добавлено и 2 удалено
  1. 11 0
      pages.json
  2. 23 2
      pages2/dailyPractice/index.vue
  3. 37 0
      pages2/dailyPractice/weekRecord.vue

+ 11 - 0
pages.json

@@ -728,6 +728,17 @@
 					}
 				}
 			},
+			{
+				"path": "dailyPractice/weekRecord",
+				"style": {
+					"navigationBarTitleText": "一周记录",
+					"navigationStyle": "custom", // 隐藏系统导航栏
+					"app-plus": {
+						"titleNView": false, //禁用原生导航栏 
+						"bounce": "none"
+					}
+				}
+			},
 			{
 				"path": "randomPractice/index",
 				"style": {

+ 23 - 2
pages2/dailyPractice/index.vue

@@ -63,6 +63,11 @@
                         </view>
                     </view>
                 </view>
+                <!-- 一周记录 -->
+                <view class="week_record" @click="toWeekRecord()">
+                    <text>一周记录</text>
+                    <u-icon name="arrow-right" color="#677998" size="28"></u-icon>
+                </view>
             </view>
         </template>
         <template v-else>
@@ -260,8 +265,12 @@ export default {
         },
         // 订阅消息
         getSubscription() {
-            this.meassgeModal = true
-            
+            this.meassgeModal = true 
+        },
+        toWeekRecord() {
+            uni.navigateTo({
+                url: '/pages2/dailyPractice/weekRecord?goodsId=' + this.goodsId
+            })
         },
     },
 }
@@ -492,6 +501,18 @@ export default {
         }
     }   
 }
+.week_record {
+    width: 100%;
+    height: 88rpx;
+    line-height: 88rpx;
+    text-align: center;
+    background: #FFFFFF;
+    border-radius: 24rpx;
+    margin-top: 40rpx;
+    font-size: 28rpx;
+    font-weight: 500;
+    color: #3E4055;
+}
 // 订阅消息弹窗
 .message_box {
     width: 100%;

+ 37 - 0
pages2/dailyPractice/weekRecord.vue

@@ -0,0 +1,37 @@
+<template>
+    <view class="week_record">
+        <nav-bar title="一周记录"></nav-bar>
+        yizhou
+    </view>
+</template>
+
+<script>
+export default {
+    name: 'weekRecord',
+    data() {
+        return {
+            goodsId: '',
+            weekRecords: {},
+            weekResultList: [],
+        }
+    },
+    onLoad(option) {
+        this.goodsId = option.goodsId
+        this.getWeekRecord()
+    },
+    methods: {
+        getWeekRecord() {
+            this.$http({
+                url: `/bank/question/todayExam/tob/weekRecord/${this.goodsId}`,
+                method: 'get'
+            }).then((res) => {
+                if (res.data.code == 200) {
+                    console.log('res:', res);
+                    this.weekRecords = res.data.data || {}
+                    this.weekResultList = this.weekRecords.resultList || []
+                }
+            })
+        }
+    }
+}
+</script>