闫增涛
2024-04-16 cf1fcff430fa1331c1d9b2b844fa9ad710fb7a26
详情页,答题器bug修改
15个文件已修改
205 ■■■■ 已修改文件
packageBookService/pages/bookServices/detail/components/tree/index.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.js 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/index.wxss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/examination.js 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/examination.wxml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionList/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionList/index.wxml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionList/index.wxss 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/examination/questionOptions/index.wxss 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/assort/index.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/assort/index.skeleton.wxml 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/assort/index.skeleton.wxss 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/bookServices/assort/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageBookService/pages/bookServices/detail/components/tree/index.wxml
@@ -311,8 +311,7 @@
          itemId="{{itemId}}"
          tab="{{tab}}"
          buyIds="{{buyIds}}"
          openTeachids="{{openTeachids}}"
          openLearnids="{{openLearnids}}"
          openIds="{{openIds}}"
        ></tree>
      </view>
      <!-- 暂无数据 -->
packageBookService/pages/bookServices/detail/index.js
@@ -177,6 +177,9 @@
        name: options.name,
      },
    });
    wx.setNavigationBarTitle({
      title: options.name,
    })
    this.getBookInfo(options.id);
    this.getResourceClass(); // 获取资源所属分类
    const token = wx.getStorageSync(app.config.tokenKey);
@@ -895,29 +898,29 @@
  },
  // 获取展开项
  findChildIds(data, result) {
    let index = 0;
    let index = 0
    for (let i = 0; i < data.length; i++) {
      if (index < 3) {
        const item = data[i];
        if (item.children && item.children.length > 0) {
          result.push(item.id);
        const item = data[i]
        if (item.childrenFolderCount > 0) {
          result.push(item.id)
          for (let j = 0; j < item.children.length; j++) {
            if (index < 3) {
              const childrenItme = item.children[j];
              if (item.children && item.children.length > 0) {
                result.push(childrenItme.id);
                index += 1;
              const childrenItme = item.children[j]
              if (item.childrenCount > 0) {
                result.push(childrenItme.id)
                index += 1
              }
            } else {
              break;
              break
            }
          }
        } else if (item.children && item.children.length > 0) {
          result.push(item.id);
          index += 1;
        } else if (item.childrenCount > 0) {
          result.push(item.id)
          index += 1
        }
      } else {
        break;
        break
      }
    }
  },
packageBookService/pages/bookServices/detail/index.json
@@ -20,9 +20,8 @@
    "t-empty": "tdesign-miniprogram/empty/empty",
    "t-fab": "tdesign-miniprogram/fab/fab",
    "t-skeleton": "tdesign-miniprogram/skeleton/skeleton",
    "suggest-dialog":"/packageBookService/pages/bookServices/detail/components/suggestDialog/index"
    "suggest-dialog": "/packageBookService/pages/bookServices/detail/components/suggestDialog/index"
  },
  "navigationStyle": "custom",
  "onReachBottomDistance": 200,
  "disableScroll": true
}
packageBookService/pages/bookServices/detail/index.wxml
@@ -12,7 +12,7 @@
></suggest-dialog>
<!-- <popup showIndex="{{showIndex}}"></popup> -->
<view class="page-bookService" wx:if="{{!pageLoading}}">
  <view style="width: 100%; height: {{barHeight}}px; "></view>
  <!-- <view style="width: 100%; height: {{barHeight}}px; "></view>
  <view class="nacigationBar" style="width: 100%; height: {{navBarHeight}}px;">
    <view>
      <t-icon
@@ -25,7 +25,7 @@
    <view class="navbar-title" style="width: 100%">
      <text>{{options.name}}</text>
    </view>
  </view>
  </view> -->
  <t-toast id="t-toast" />
  <scroll-view
    scroll-y="{{true}}"
packageBookService/pages/bookServices/detail/index.wxss
@@ -32,7 +32,8 @@
.book {
  position: relative;
  height: calc(100vh - env(safe-area-inset-bottom) - 141px);
  height: calc(100vh - env(safe-area-inset-bottom) - 60px);
  /* height: calc(100vh - env(safe-area-inset-bottom) - 141px); */
  background-color: #F2F3F8;
}
@@ -221,13 +222,11 @@
/* 图书资源 */
.book-resource {
  /* min-height: 640rpx; */
  min-height: calc(100vh - 900rpx);
  margin-top: 20rpx;
  background-color: #fff !important;
  --td-tab-item-height: 140rpx;
}
.custom-tabs {
  --td-tab-item-active-color: #FF6C00;
packageBookService/pages/bookServices/examination/examination.js
@@ -47,7 +47,7 @@
    sliderValue: 0, // 字体滑块
    startTime: "", //进入页面当前时间
    pauseTime: 0, //暂停时间
    showDialog: false // 未提交退出拦截弹窗
  },
  /**
@@ -68,6 +68,9 @@
      idPathList: options.idPathList ? JSON.parse(options.idPathList) : [],
      answerType: options.answerType,
    });
    // wx.setNavigationBarTitle({
    //   title: options.answerTitle,
    // })
    if (this.data.answerType == "mock") {
      this.setData({
        uuid: options.uuid,
@@ -238,10 +241,15 @@
      confirmColor: "#ff6c00",
      cancelColor: "#949494",
      complete: (res) => {
        if (res.cancel) {}
        if (res.cancel) {
          this.setData({
            showDialog: true
          })
        }
        if (res.confirm) {
          this.setData({
            submitStatus: true,
            showDialog: false
          });
          wx.navigateBack();
        }
@@ -488,6 +496,7 @@
  // 提交逻辑
  submitPaper() {
    this.setData({
      showDialog: false,
      submitStatus: true,
      loading: true,
    });
@@ -566,7 +575,6 @@
    });
    if (this.data.answerType == "option") {
      if (this.data)
        // this.startCountdown()
        this.setData({
          countdownTime: 2 * 60 * 60 * 1000,
        });
@@ -630,6 +638,9 @@
            oldMockData.state == "2"
          ) {
            this.startCountdown();
            this.setData({
              showDialog: true
            })
          }
          if (oldMockData.state == "3") {
            this.setData({
@@ -729,6 +740,9 @@
              await this.getQuestionList(value.dataList);
            } else {
              await this.getQuestionList(); // 获取题库题目
              this.setData({
                showDialog: true
              })
            }
          });
        }
@@ -984,7 +998,7 @@
    }
    // 有题目再开始倒计时
    if (this.data.questionDataList.length) {
      // console.log(this.data.questionDataList);
      console.log(this.data.questionDataList);
      this.startCountdown();
    } else {
      this.setData({
@@ -2057,11 +2071,12 @@
      })
      .then((res) => {
        if (res[0]) {
          // 这里的 countdownTime 赋值:如果是时间到了提交,记录的剩余时间就是0,所以:如果是0的话赋值1秒,防止监听到时间为0再次提交
          this.setData({
            currentIndex: JSON.parse(res[0].value).currentIndex,
            "mockData.time": JSON.parse(res[0].value).time,
            countdownTime: JSON.parse(res[0].value).time ?
              JSON.parse(res[0].value).time : this.data.mockData.sumTime,
            countdownTime: JSON.parse(res[0].value).time > 0 ?
              JSON.parse(res[0].value).time : 1000,
            "mockData.answer": JSON.parse(res[0].value).answerData,
          });
          console.log(JSON.parse(res[0].value));
packageBookService/pages/bookServices/examination/examination.wxml
@@ -93,8 +93,7 @@
</view>
<page-container
  wx:if="{{(answerType == 'mock' || answerType == 'option') && !submitStatus}}"
  show="{{true}}"
  show="{{showDialog}}"
  duration="{{false}}"
  overlay="{{false}}"
  bind:beforeleave="beforeleave"
packageBookService/pages/bookServices/examination/questionList/index.js
@@ -35,7 +35,7 @@
    }
  },
  observers: {},
  ready() {
  detached() {
    innerAudioContext.stop();
    innerAudioContext.destroy();
  },
packageBookService/pages/bookServices/examination/questionList/index.wxml
@@ -189,12 +189,13 @@
              disabled="{{item.isComplete}}"
              icon="rectangle"
              block="{{false}}"
              class="t-checkbox"
              value="{{contentItem.value}}"
              style="background-color:{{isNight ? '#222' :'#F9F9F9'}}; display: flex; align-items: center; margin-bottom: 20rpx;"
              style="background-color:{{isNight ? '#222' :'#F9F9F9'}}; "
            >
              <!-- 仅文字 -->
              <view
                class="fl-center"
                class="fl-center mh"
                wx:if="{{item.optionStyle == 'Txt'}}"
                style="color:{{ isNight  ? '#fff' : '#000'}};font-size:{{sliderValue || 32}}rpx;"
              >
@@ -203,7 +204,10 @@
              </view>
              <!-- 仅图片 -->
              <view wx:if="{{item.optionStyle == 'Image'}}" class="fl-center">
              <view
                wx:if="{{item.optionStyle == 'Image'}}"
                class="fl-center mh"
              >
                <text
                  style="color:{{ isNight  ? '#fff' : '#000'}};font-size:{{sliderValue || 32}}rpx;"
                  >{{contentItem.value}}、</text
@@ -213,7 +217,7 @@
              <!-- 文字加图片 -->
              <view
                wx:if="{{item.optionStyle == 'TxtAndImage'}}"
                class="fl-center"
                class="fl-center mh"
              >
                <text
                  style="color:{{ isNight  ? '#fff' : '#000'}};font-size:{{sliderValue || 32}}rpx;"
@@ -232,7 +236,7 @@
              <!-- 富文本 -->
              <view
                wx:if="{{item.optionStyle == 'RichText'}}"
                class="check-rich-box"
                class="check-rich-box mh"
              >
                <text>{{contentItem.value}}、</text>
                <rich-text
packageBookService/pages/bookServices/examination/questionList/index.wxss
@@ -94,14 +94,19 @@
  align-items: center;
}
.checkbox-group {
  --td-checkbox-icon-checked-color: #FF6C00;
}
.t-checkbox {
  display: flex;
  align-items: center;
  margin-bottom: 20rpx;
  --td-checkbox-icon-checked-color: #ff6c00;
}
/* .t-checkbox {
  display: flex;
  align-items: center;
} */
.completion-box {
  display: inline-block;
@@ -290,4 +295,8 @@
.fl-cl {
  display: flex;
  flex-direction: column;
}
.mh {
  min-height: 104rpx;
}
packageBookService/pages/bookServices/examination/questionOptions/index.wxss
@@ -67,6 +67,7 @@
}
.question-explain {
  height: 100rpx;
  padding-right: 40rpx;
  display: flex;
  justify-content: flex-end;
pages/bookServices/assort/index.json
@@ -1,5 +1,5 @@
{
  "navigationStyle": "custom",
  "navigationBarTitleText": "图书服务",
  "onReachBottomDistance": 10,
  "backgroundTextStyle": "light",
  "disableScroll": true,
pages/bookServices/assort/index.skeleton.wxml
@@ -1,5 +1,5 @@
<!--
此文件为开发者工具生成,生成时间: 2024/4/11下午2:20:53
此文件为开发者工具生成,生成时间: 2024/4/16上午11:03:51
使用方法:
在 D:\WebData\project\2024\jsek-applet\pages\bookServices\assort\index.wxml 引入模板
@@ -18,21 +18,13 @@
<template name="skeleton">
  <view class="sk-container">
    <page-meta style="width: 100vw; overflow: hidden">
      <view style="width: 100%; height: 47px"></view>
      <view class="nacigationBar" style="width: 100%; height: 40px">
        <view
          class="navbar-title "
          style="background-position-x: 50%"
          >图书服务</view
        >
      </view>
      <view class="page-header">
        <view class="search">
          <view class="t-search search--t-search" >
          <view class="t-search search--t-search">
            <view
              class="t-search__input-box search--t-search__input-box t-not-focused search--t-not-focused t-search__input-box-- search--t-search__input-box-- t-search__input-box--square search--t-search__input-box--square t-search__input-container"
            >
              <view class="wr icon--wr" >
              <view class="wr icon--wr" style="color: #bbb; font-size: 20px">
                <label
                  class="wr-search icon--wr-search t-icon-base icon--t-icon-base sk-pseudo sk-pseudo-circle"
                ></label>
@@ -52,7 +44,7 @@
      <view class="page-container">
        <view class="side-bar-wrapper">
          <view class="tab-left">
            <view class="t-side-bar bar--t-side-bar" >
            <view class="t-side-bar bar--t-side-bar">
              <view
                class="t-side-bar-item item--t-side-bar-item t-side-bar-item--active item--t-side-bar-item--active sk-transparent sk-button"
              >
@@ -100,27 +92,27 @@
              <view class="tab-top">
                <view class="myScroll">
                  <view
                    class="row sk-transparent sk-text-14-2857-470 sk-text"
                    class="row sk-transparent sk-text-14-2857-751 sk-text"
                    data-tabdata="[object Object]"
                    >公共基础类</view
                  >
                  <view
                    class="row sk-transparent sk-text-14-2857-274 sk-text"
                    class="row sk-transparent sk-text-14-2857-718 sk-text"
                    data-tabdata="[object Object]"
                    >哲学</view
                  >
                  <view
                    class="row sk-transparent sk-text-14-2857-868 sk-text"
                    class="row sk-transparent sk-text-14-2857-788 sk-text"
                    data-tabdata="[object Object]"
                    >法学</view
                  >
                  <view
                    class="row sk-transparent sk-text-14-2857-149 sk-text"
                    class="row sk-transparent sk-text-14-2857-764 sk-text"
                    data-tabdata="[object Object]"
                    >经济学</view
                  >
                  <view
                    class="row sk-transparent sk-text-14-2857-66 sk-text"
                    class="row sk-transparent sk-text-14-2857-970 sk-text"
                    data-tabdata="[object Object]"
                    >管理学</view
                  >
@@ -133,7 +125,7 @@
              >
                <view class="class-box" id="list405">
                  <view
                    class="class-name sk-transparent sk-text-14-2857-360 sk-text"
                    class="class-name sk-transparent sk-text-14-2857-157 sk-text"
                    >公共基础类</view
                  >
                  <view class="class-content">
@@ -146,7 +138,7 @@
                        <image mode="aspectFit" class="sk-image"></image>
                      </view>
                      <view
                        class="classify sk-transparent sk-text-14-2857-787 sk-text"
                        class="classify sk-transparent sk-text-14-2857-985 sk-text"
                        >大学语文类</view
                      >
                    </view>
@@ -159,7 +151,7 @@
                        <image mode="aspectFit" class="sk-image"></image>
                      </view>
                      <view
                        class="classify sk-transparent sk-text-14-2857-115 sk-text"
                        class="classify sk-transparent sk-text-14-2857-156 sk-text"
                        >高等数学类</view
                      >
                    </view>
@@ -172,7 +164,7 @@
                        <image mode="aspectFit" class="sk-image"></image>
                      </view>
                      <view
                        class="classify sk-transparent sk-text-14-2857-469 sk-text"
                        class="classify sk-transparent sk-text-14-2857-56 sk-text"
                        >就业、创新与创业类</view
                      >
                    </view>
@@ -185,7 +177,7 @@
                        <image mode="aspectFit" class="sk-image"></image>
                      </view>
                      <view
                        class="classify sk-transparent sk-text-14-2857-515 sk-text"
                        class="classify sk-transparent sk-text-14-2857-717 sk-text"
                        >应用文写作类</view
                      >
                    </view>
@@ -198,7 +190,7 @@
                        <image mode="aspectFit" class="sk-image"></image>
                      </view>
                      <view
                        class="classify sk-transparent sk-text-14-2857-824 sk-text"
                        class="classify sk-transparent sk-text-14-2857-278 sk-text"
                        >心理健康教育类</view
                      >
                    </view>
@@ -211,7 +203,7 @@
                        <image mode="aspectFit" class="sk-image"></image>
                      </view>
                      <view
                        class="classify sk-transparent sk-text-14-2857-988 sk-text"
                        class="classify sk-transparent sk-text-14-2857-608 sk-text"
                        >体育类</view
                      >
                    </view>
@@ -224,7 +216,7 @@
                        <image mode="aspectFit" class="sk-image"></image>
                      </view>
                      <view
                        class="classify sk-transparent sk-text-14-2857-89 sk-text"
                        class="classify sk-transparent sk-text-14-2857-652 sk-text"
                        >生涯规划类</view
                      >
                    </view>
@@ -237,18 +229,13 @@
                        <image mode="aspectFit" class="sk-image"></image>
                      </view>
                      <view
                        class="classify sk-transparent sk-text-14-2857-188 sk-text"
                        class="classify sk-transparent sk-text-14-2857-938 sk-text"
                        >其他类</view
                      >
                    </view>
                  </view>
                </view>
                <view class="class-box" id="list406">
                  <view
                    class="class-name sk-transparent sk-text-14-2857-674 sk-text"
                    >哲学</view
                  >
                </view>
                <view class="class-box" id="list406"></view>
              </scroll-view>
            </view>
          </view>
pages/bookServices/assort/index.skeleton.wxss
@@ -1,5 +1,5 @@
/*
此文件为开发者工具生成,生成时间: 2024/4/11下午2:20:53
此文件为开发者工具生成,生成时间: 2024/4/16上午11:03:51
在 D:\WebData\project\2024\jsek-applet\pages\bookServices\assort\index.wxss 中引入样式
```
@@ -11,9 +11,9 @@
.sk-transparent {
    color: transparent !important;
  }
.sk-text-14-2857-436 {
.sk-text-14-2857-751 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 53.8462rpx;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text {
@@ -23,79 +23,69 @@
    color: transparent !important;
    background-repeat: repeat-y !important;
  }
.sk-text-14-2857-470 {
.sk-text-14-2857-718 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-274 {
.sk-text-14-2857-788 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-868 {
.sk-text-14-2857-764 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-149 {
.sk-text-14-2857-970 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-66 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-360 {
.sk-text-14-2857-157 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 43.0769rpx;
    position: relative !important;
  }
.sk-text-14-2857-787 {
.sk-text-14-2857-985 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-115 {
.sk-text-14-2857-156 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-469 {
.sk-text-14-2857-56 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-515 {
.sk-text-14-2857-717 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-824 {
.sk-text-14-2857-278 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-988 {
.sk-text-14-2857-608 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-89 {
.sk-text-14-2857-652 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-188 {
.sk-text-14-2857-938 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 37.6923rpx;
    position: relative !important;
  }
.sk-text-14-2857-674 {
    background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
    background-size: 100% 43.0769rpx;
    position: relative !important;
  }
.sk-button {
pages/bookServices/assort/index.wxml
@@ -3,10 +3,6 @@
<!--图书服务分类-->
<page-meta style="width: 100vw; overflow: hidden" wx:if="{{!listLoding}}">
  <view style="width: 100%; height: {{barHeight}}px; "></view>
  <view class="nacigationBar" style="width: 100%; height: {{navBarHeight}}px;">
    <view class="navbar-title">图书服务</view>
  </view>
  <view class="page-header">
    <!-- 搜索框 -->
    <view class="search">