bug
闫增涛
2024-09-07 c6c73b7d709322052b9cd6777b3d6657e0d43d30
pages/digitalCourses/digitalCoursesDetails/index.wxml
@@ -11,51 +11,84 @@
          <view class="nameBox">{{digitalsData.name}}</view>
          <view>
            <viwe class="styleCssBox">
              <view style="width: 200rpx;"> ISBN: </view>
              <view style="width: 200rpx"> ISBN: </view>
              <view wx:if="{{digitalsData.isbn}}"> {{digitalsData.isbn}} </view>
              <view wx:else>-</view>
            </viwe>
            <viwe class="styleCssBox">
              <view style="width: 200rpx;">课程负责人:</view>
              <view wx:if="{{digitalsData.courseLeader}}"> {{digitalsData.courseLeader }}</view>
              <view style="width: 200rpx">课程负责人:</view>
              <view wx:if="{{digitalsData.courseLeader}}">
                {{digitalsData.courseLeader }}</view
              >
              <view wx:else>-</view>
            </viwe>
            <viwe class="styleCssBox">
              <view style="width: 200rpx;">课程负责人单位:</view>
              <view wx:if="{{digitalsData.affiliatedUnit}}"> {{ digitalsData.affiliatedUnit}}</view>
              <view style="width: 200rpx">课程负责人单位:</view>
              <view wx:if="{{digitalsData.affiliatedUnit}}">
                {{ digitalsData.affiliatedUnit}}</view
              >
              <view wx:else>-</view>
            </viwe>
            <viwe class="styleCssBox">
              <view style="width: 200rpx;">出版单位:</view>
              <view wx:if="{{digitalsData.publishingUnit}}"> {{publishingUnit}} </view>
              <view style="width: 200rpx">出版单位:</view>
              <view wx:if="{{digitalsData.publishingUnit}}">
                {{publishingUnit}}
              </view>
              <view wx:else>-</view>
            </viwe>
            <viwe class="styleCssBox">
              <view style="width: 200rpx;">出版时间:</view>
              <view wx:if="{{digitalsData.publicationDate}}">{{digitalsData.publicationDate}} </view>
              <view style="width: 200rpx">出版时间:</view>
              <view wx:if="{{digitalsData.publicationDate}}"
                >{{digitalsData.publicationDate}}
              </view>
              <view wx:else>-</view>
            </viwe>
            <image src="/static/images/bookService/detail/square.png" class="right-background" />
            <image
              src="/static/images/bookService/detail/square.png"
              class="right-background"
            />
          </view>
        </view>
        <view class="certificate">
          <view style="margin-left: 30rpx;">价格: <text>¥{{digitalsData.price}}</text></view>
          <view style="margin-right: 30rpx;">共<text>{{ digitalsData.classHours ? digitalsData.classHours : '0'}}</text>课时</view>
          <view style="margin-left: 30rpx"
            >价格: <text>¥{{digitalsData.price}}</text></view
          >
          <view style="margin-right: 30rpx"
            >共<text
              >{{ digitalsData.classHours ? digitalsData.classHours :
              '0'}}</text
            >课时</view
          >
        </view>
      </view>
    </view>
    <view class="tabBox">
      <t-tabs defaultValue="{{tabValue}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel">
        <t-tab-panel icon="{{ tabValue == '0' ? briefIconClick : briefIcon}}" label="基本信息" value="0">
      <t-tabs
        defaultValue="{{tabValue}}"
        bind:change="onTabsChange"
        t-class="custom-tabs"
        t-class-content="custom-panel"
      >
        <t-tab-panel
          icon="{{ tabValue == '0' ? briefIconClick : briefIcon}}"
          label="基本信息"
          value="0"
        >
          <view class="rubricBox">
            <view class="rubricimgBox">
              <image src="/static/images/bookService/detail/label.png" mode="" />
              <image
                src="/static/images/bookService/detail/label.png"
                mode=""
              />
            </view>
            <view class="basic"> 课程介绍</view>
          </view>
          <view class="course-content">
            <rich-text wx:if="{{digitalsData.content}}" nodes="{{digitalsData.content}}"></rich-text>
            <rich-text
              wx:if="{{digitalsData.content}}"
              nodes="{{digitalsData.content}}"
            ></rich-text>
            <view wx:else="" class="noDataBox">
              <!-- <t-empty icon="folder-open" description="暂无数据" font-size="80" /> -->
              <empty />
@@ -63,20 +96,26 @@
          </view>
          <view class="rubricBox">
            <view class="rubricimgBox">
              <image src="/static/images/bookService/detail/label.png" mode="" />
              <image
                src="/static/images/bookService/detail/label.png"
                mode=""
              />
            </view>
            <view class="basic"> 主讲老师</view>
          </view>
          <view class="course-content">
            <view class="lecturer" wx:for="{{lecturerList}}" wx:key="index" wx:for-item="item">
            <view
              class="lecturer"
              wx:for="{{lecturerList}}"
              wx:key="index"
              wx:for-item="item"
            >
              <view class="lecturerImangBox">
                <image src="{{item.icon}}" mode="aspectFit" />
              </view>
              <view class="lecturerInformation">
                <view class="lecturerName">
                  <view class="name">
                    {{item.name}}
                  </view>
                  <view class="name"> {{item.name}} </view>
                  <view class="title">{{item.title}}</view>
                </view>
                <view class="lecturerContent">{{item.description}}</view>
@@ -84,86 +123,232 @@
            </view>
          </view>
        </t-tab-panel>
        <t-tab-panel icon="{{ tabValue == '1' ?  learnResourceClickIcon : learnResourceIcon}}" label="证书信息" value="1">
        <t-tab-panel
          icon="{{ tabValue == '1' ?  learnResourceClickIcon : learnResourceIcon}}"
          label="证书信息"
          value="1"
        >
          <view class="rubricBox">
            <view class="rubricimgBox">
              <image src="/static/images/digitalTextbooks/zhengshu@2x.png" mode="" />
              <image
                src="/static/images/digitalTextbooks/zhengshu@2x.png"
                mode=""
              />
            </view>
            <view class="basic"> 证书信息</view>
          </view>
          <view class="course-content">
            <view class="certificateChart">
              <view class="chart" bind:tap="onClick1">
                <image src="https://jsek.bnuic.com/home/certificate/szkc.jpg" mode="" />
                <image src="{{cbzsImg}}" mode="" />
              </view>
              <view class="chart" bind:tap="onClick2">
                <image src="https://jsek.bnuic.com/home/certificate/kczs.jpg" mode="" />
                <image
                  src="https://jsek.bnuic.com/home/certificate/kczs.jpg"
                  mode=""
                />
              </view>
            </view>
          </view>
          <!-- <canvas canvas-id="share"></canvas>
          <view id="pubCertificate" wx:if="pubCertificateHide">
            <image src="https://jsek.bnuic.com/home/certificate/szkc.jpg" mode="" class="bgImg" />
            <view class="certificateInfo">
              <view class="bookName">{{digitalsData.name}}</view>
              <view class="author">{{digitalsData.courseLeader || '-' }}</view>
              <view class="affiliatedUnit">{{digitalsData.affiliatedUnit || '-'}}</view>
              <view class="affiliatedUnit"> {{ digitalsData.isbn || '-'}}</view>
              <view class="affiliatedUnit">{{digitalsData.publicationDate}}</view>
              <view class="affiliatedUnit">{{publishingUnit}}</view>
              <view class="website">{{website}}</view>
          <canvas
            canvas-id="myCanvas"
            style="height: 845px; width: 595px"
            wx:if="{{pubCertificateHide}}"
          ></canvas>
          <view
            id="pubCertificate"
            class="my_canvas"
            wx:if="{{pubCertificateHide}}"
          >
            <image
              data-type="image"
              data-url="https://jsek.bnuic.com/home/certificate/szkc.jpg"
              src="https://jsek.bnuic.com/home/certificate/szkc.jpg"
              mode=""
              class="bgImg"
            />
            <view class="certificateInfo my_draw_canvas">
              <view
                class="bookName my_draw_canvas"
                data-type="text"
                data-text="{{digitalsData.name}}"
                >{{digitalsData.name}}</view
              >
              <view
                class="author my_draw_canvas"
                data-type="text"
                data-text="{{digitalsData.courseLeader}}"
                >{{digitalsData.courseLeader || '-' }}</view
              >
              <view
                class="affiliatedUnit my_draw_canvas"
                data-type="text"
                data-text="{{digitalsData.affiliatedUnit}}"
                >{{digitalsData.affiliatedUnit || '-'}}</view
              >
              <view
                class="affiliatedUnit my_draw_canvas"
                data-type="text"
                data-text="{{digitalsData.isbn}}"
              >
                {{ digitalsData.isbn || '-'}}</view
              >
              <view
                class="affiliatedUnit my_draw_canvas"
                data-type="text"
                data-text="{{digitalsData.publicationDate}}"
                >{{digitalsData.publicationDate}}</view
              >
              <view
                class="affiliatedUnit my_draw_canvas"
                data-type="text"
                data-text="{{publishingUnit}}"
                >{{publishingUnit}}</view
              >
              <view
                class="website my_draw_canvas"
                data-type="text"
                data-text="{{website}}"
                >{{website}}</view
              >
              <view class="codeBox"></view>
            </view>
          </view> -->
          </view>
          <canvas canvas-id="myCanvas1" style="height:845px;width:595px" wx:if="{{pubCertificateHide}}"></canvas>
          <view id="textCertificate" class="my_canvas" wx:if="{{pubCertificateHide}}">
            <image data-type="image" data-url="https://jsek.bnuic.com/home/certificate/kczs.jpg" src="https://jsek.bnuic.com/home/certificate/kczs.jpg" mode="" class="bgImg" />
            <view class="certificateInfo my_draw_canvas">
              <view class="userIcon my_draw_canvas">
                <view class="hexagon">
                  <image src="{{userPicture}}" class="img" />
                </view>
              </view>
              <view class="userName my_draw_canvas" data-type="text" data-text="{{userName}}">{{userName}}</view>
              <view class="bookName my_draw_canvas" data-type="text" data-text="{{digitalsData.name}}">{{digitalsData.name}}</view>
              <view class="author my_draw_canvas" data-type="text" data-text="{{digitalsData.courseLeader}}">{{digitalsData.courseLeader || '-' }}</view>
              <view class="classHours my_draw_canvas" data-type="text" data-text="{{digitalsData.classHours}}">{{digitalsData.classHours || '-' }}</view>
              <view class="affiliatedUnit my_draw_canvas" data-type="text" data-text="{{publishingUnit}}">{{publishingUnit || '-'}}</view>
              <view class="affiliatedUnit my_draw_canvas" data-type="text" data-text="{{digitalsData.isbn}}"> {{ digitalsData.isbn || '-'}}</view>
              <view class="studyTime my_draw_canvas" data-type="text" data-text="{{digitalsData.classHours}}">{{digitalsData.classHours}}</view>
              <view class="website my_draw_canvas" data-type="text" data-text="{{website}}">{{website}}</view>
              <view class="codeBox"></view>
              <view class="updateDate" wx-if="{{isCertificate}}">
                {{ moment(isCertificate.updateDate).format('YYYY年MM月') }}
              </view>
            </view>
          </view>
        </t-tab-panel>
        <t-tab-panel icon="{{ tabValue == '2' ? courseLearningClick : courseLearning}}" label="课程学习" value="2">
        <t-tab-panel
          icon="{{ tabValue == '2' ? courseLearningClick : courseLearning}}"
          label="课程学习"
          value="2"
        >
          <view class="course-content">
            <view class="tabsSelect">
              <view class="{{selectActive == 'learn' ? 'tabs-item selectActive' : 'tabs-item'}}" bind:tap="selectChange" data-value="{{'learn'}}">学习内容</view>
              <view class="{{selectActive == 'test' ? 'tabs-item selectActive' : 'tabs-item'}}" bind:tap="selectChange" data-value="{{'test'}}">在线测试</view>
              <view
                class="{{selectActive == 'learn' ? 'tabs-item selectActive' : 'tabs-item'}}"
                bind:tap="selectChange"
                data-value="{{'learn'}}"
                >学习内容</view
              >
              <view
                class="{{selectActive == 'test' ? 'tabs-item selectActive' : 'tabs-item'}}"
                bind:tap="selectChange"
                data-value="{{'test'}}"
                >在线测试</view
              >
            </view>
            <view class="list-box">
              <view wx:if="{{selectActive == 'learn'}}">
                <view wx:if="{{relationTextBook}}" class="textBook">
                  <view class="textTile">
                    <image src="/static/images/bookService/detail/shuzijiaocai.png" mode="" class="leftImg" />
                    <image
                      src="/static/images/bookService/detail/shuzijiaocai.png"
                      mode=""
                      class="leftImg"
                    />
                    <view>数字教材</view>
                  </view>
                  <view class="reabtn" bind:tap="readTextBook">
                    <image src="/static/images/digitalCourses/shidu@2x.png" class="readImage"></image>
                    <image
                      src="/static/images/digitalCourses/shidu@2x.png"
                      class="readImage"
                    ></image>
                    <view>{{isTextBookBuy ? '阅读' : '试看'}}</view>
                  </view>
                </view>
                <tree id="test-tree" openIds="{{openTeachids}}" bookInfo="{{digitalsData}}" treeList="{{learnList}}">
                </tree>
                <view wx:if="{{learnList.length > 0}}">
                  <tree
                    id="test-tree"
                    openIds="{{openTeachids}}"
                    bookInfo="{{digitalsData}}"
                    treeList="{{learnList}}"
                  >
                  </tree>
                </view>
                <view wx:if="{{learnList.length == 0}}" class="noData">
                  <empty />
                </view>
              </view>
              <view wx:if="{{selectActive == 'test'}}">
                <view class="testBtnBox">
                  <view class="textTile">共{{}}个</view>
                  <view class="textTile">共{{testCount}}个</view>
                  <view class="note-btn">
                    <t-button theme="primary" class="make-note" bind:tap="goMycollect" data-answerType="errorQuestion" style="width: 220rpx">
                    <t-button
                      theme="primary"
                      class="make-note"
                      bind:tap="goMycollect"
                      data-answerType="errorQuestion"
                      style="width: 220rpx"
                    >
                      <view slot="content" class="btn-content">
                        <image src="/static/images/bookService/detail/cuoti.png" />
                        <image
                          src="/static/images/bookService/detail/cuoti.png"
                        />
                        <text class="note-btn-text">我的错题</text>
                      </view>
                    </t-button>
                    <t-button theme="primary" class="make-note" bind:tap="goMycollect" data-answerType="collectQuestion" style="width: 220rpx;margin-left:10rpx;">
                    <t-button
                      theme="primary"
                      class="make-note"
                      bind:tap="goMycollect"
                      data-answerType="collectQuestion"
                      style="width: 220rpx; margin-left: 10rpx"
                    >
                      <view slot="content" class="btn-content">
                        <image src="/static/images/bookService/detail/wodeshoucang.png" />
                        <image
                          src="/static/images/bookService/detail/wodeshoucang.png"
                        />
                        <text class="note-btn-text">我的收藏</text>
                      </view>
                    </t-button>
                  </view>
                </view>
                <testTree id="tree" openIds="{{openTeachids}}" bookInfo="{{digitalsData}}" tab="{{tab}}" treeList="{{testList}}"></testTree>
                <testTree
                  id="tree"
                  openIds="{{openTeachids}}"
                  bookInfo="{{digitalsData}}"
                  tab="{{tab}}"
                  treeList="{{testList}}"
                ></testTree>
                <view wx:if="{{testList.length == 0}}" class="noData">
                  <empty />
                </view>
              </view>
            </view>
          </view>
        </t-tab-panel>
        <t-tab-panel icon="{{ tabValue == '3' ? learningNotesClick : learningNotes}}" label="学习笔记" value="3">
        <t-tab-panel
          icon="{{ tabValue == '3' ? learningNotesClick : learningNotes}}"
          label="学习笔记"
          value="3"
        >
          <view class="course-content">
            <note bookInfo="{{digitalsData}}" id="note" class="note-list"></note>
            <note
              bookInfo="{{digitalsData}}"
              id="note"
              class="note-list"
            ></note>
            <!-- <view class="topBox">
              <view></view>
              <view class="note-btn">
@@ -177,9 +362,17 @@
            </view> -->
          </view>
        </t-tab-panel>
        <t-tab-panel icon="{{ tabValue == '4' ? onlineQuestioningClick : onlineQuestioning}}" label="在线提问" value="4">
        <t-tab-panel
          icon="{{ tabValue == '4' ? onlineQuestioningClick : onlineQuestioning}}"
          label="在线提问"
          value="4"
        >
          <view class="course-content">
            <question bookInfo="{{digitalsData}}" id="question" class="note-list"></question>
            <question
              bookInfo="{{digitalsData}}"
              id="question"
              class="note-list"
            ></question>
            <!-- <view class="topBox">
              <view>共{{questionTotalCount}}个</view>
              <view class="note-btn">
@@ -209,10 +402,18 @@
            </view> -->
          </view>
        </t-tab-panel>
        <t-tab-panel icon="{{tabValue == '5' ? testResourceClickIocn : testResourceIocn}}" value="5" label="相关课程" style="{{tabPanelstyle}}">
        <t-tab-panel
          icon="{{tabValue == '5' ? testResourceClickIocn : testResourceIocn}}"
          value="5"
          label="相关课程"
          style="{{tabPanelstyle}}"
        >
          <view class="rubricBox">
            <view class="rubricimgBox">
              <image src="/static/images/digitalTextbooks/Link@3x.png" mode="" />
              <image
                src="/static/images/digitalTextbooks/Link@3x.png"
                mode=""
              />
            </view>
            <view class="basic"> 相关课程</view>
          </view>
@@ -220,10 +421,22 @@
            <empty />
          </view>
          <view class="correlation" wx:else>
            <view style="margin-bottom: 30rpx;" wx:for="{{relatedBookData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onCorrelationBook">
            <view
              style="margin-bottom: 30rpx"
              wx:for="{{relatedBookData}}"
              wx:key="index"
              wx:for-item="item"
              wx:for-index="index"
              data-item="{{item}}"
              bind:tap="onCorrelationBook"
            >
              <view class="correlationImage">
                <image src="{{item.icon}}" mode="" />
                <img wx:if="{{item.icon == ''}}" src="/static/images/default-book-img.png" alt="" />
                <image src="{{item.icon}}" mode="" mode="aspectFit" />
                <img
                  wx:if="{{item.icon == ''}}"
                  src="/static/images/default-book-img.png"
                  alt=""
                />
              </view>
              <view class="correlationName">{{item.name}}</view>
              <view class="correlationAuthor">{{digitalsData.author}}</view>
@@ -235,21 +448,37 @@
    <view class="box-bottom">
      <view class="bottom-btn" bind:tap="setCoolect">
        <view class="collectionImage">
          <image wx:if="{{!digitalsData.isFavourite}}" src="/static/images/digitalTextbooks/wodeshoucang@2x.png" mode="" />
          <image wx:else src="/static/images/bookService/detail/collecting.png" mode="" />
          <image
            wx:if="{{!digitalsData.isFavourite}}"
            src="/static/images/digitalTextbooks/wodeshoucang@2x.png"
            mode=""
          />
          <image
            wx:else
            src="/static/images/bookService/detail/collecting.png"
            mode=""
          />
        </view>
        <view class="btn-text">
          收藏
        </view>
        <view class="btn-text"> 收藏 </view>
      </view>
      <view class="bottom-btn" bind:tap="onCertificate">
        <view class="applicationImageBox">
          <image src="/static/images/digitalCourses/zhengshushenqing@2x.png" mode="" />
          <image
            src="/static/images/digitalCourses/zhengshushenqing@2x.png"
            mode=""
          />
        </view>
        <view>证书申请</view>
      </view>
      <view class="bottom-btn shopCarColor" bind:tap="addBookShopcCar" wx:if="{{!isBuy}}">加入购物车</view>
      <view class="bottom-btn buyColor" bind:tap="buyBtn" wx:if="{{!isBuy}}">立即购买</view>
      <view
        class="bottom-btn shopCarColor"
        bind:tap="addBookShopcCar"
        wx:if="{{!isBuy}}"
        >加入购物车</view
      >
      <view class="bottom-btn buyColor" bind:tap="buyBtn" wx:if="{{!isBuy}}"
        >立即购买</view
      >
    </view>
    <t-toast id="t-toast" />
  </scroll-view>
@@ -262,15 +491,25 @@
      <view class="row-info">
        <view class="body">
          <view class="dialog-title">学习证书申请</view>
          <view style="width: 100%; height: 2rpx; background-color: #F4F4F4;"></view>
          <view
            style="width: 100%; height: 2rpx; background-color: #f4f4f4"
          ></view>
          <view class="input-box">
            <t-input class="input" borderless placeholder="请输入真实姓名" value="{{userInfo.fullName}}" bind:change="onFullNameInput"></t-input>
            <t-input
              class="input"
              borderless
              placeholder="请输入真实姓名"
              value="{{userInfo.fullName}}"
              bind:change="onFullNameInput"
            ></t-input>
          </view>
          <view class="contentImg">
            <image src="{{userInfo.userPicture}}" mode="aspectFill" />
          </view>
          <view class="buttonBox">
            <t-button size="small" class="right-btn" bind:tap="uploadPicture">上传照片</t-button>
            <t-button size="small" class="right-btn" bind:tap="uploadPicture"
              >上传照片</t-button
            >
          </view>
        </view>
        <view class="row-btn">
@@ -282,4 +521,13 @@
  </view>
</view>
<t-image-viewer usingCustomNavbar deleteBtn="{{deleteBtn}}" closeBtn="{{closeBtn}}" showIndex="{{showIndex}}" visible="{{visible}}" images="{{images}}" bind:change="onChange" bind:close="onClose"></t-image-viewer>
<t-image-viewer
  usingCustomNavbar
  deleteBtn="{{deleteBtn}}"
  closeBtn="{{closeBtn}}"
  showIndex="{{showIndex}}"
  visible="{{visible}}"
  images="{{images}}"
  bind:change="onChange"
  bind:close="onClose"
></t-image-viewer>