| | |
| | | margin-bottom: 26rpx; |
| | | background-color: var(--td-tab-bar-bg-color, var(--td-bg-color-container, var(--td-font-white-1, #ffffff))); |
| | | padding: 0 24rpx; |
| | | border-top: 1px solid #d8d8d8; |
| | | padding-top: 20rpx; |
| | | } |
| | | |
New file |
| | |
| | | { |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | /* packageBookService/pages/bookServices/buyResource/index.wxss */ |
| | |
| | | appplyElectronicBook() { |
| | | console.log(this.data.bookDetail) |
| | | if (this.data.bookDetail.isApplyBook == 2 || this.data.bookDetail.isApplyBook == 4) { |
| | | |
| | | let role = this.data.userInfo != null ? this.data.userInfo.role : null |
| | | if (role) { |
| | | if (role == 'Teacher') { |
| | |
| | | }) |
| | | } |
| | | } |
| | | } else { |
| | | wx.showToast({ |
| | | title: "该书不能申请电子样书", |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | } |
| | | }, |
| | | //申请纸质样书 |
| | |
| | | }) |
| | | } |
| | | } |
| | | } else { |
| | | wx.showToast({ |
| | | title: "该书不能申请纸质样书", |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | } |
| | | }, |
| | | //获取当前已申请次数(纸质) |
| | |
| | | <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | | <t-icon |
| | | name="chevron-left" |
| | | size="30" |
| | | data-name="{{item}}" |
| | | bind:click="goBack" |
| | | /> |
| | | <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> |
| | | </view> |
| | | <view class="navbar-title">{{options.name}}</view> |
| | | </view> |
| | |
| | | <view class="book-detail"> |
| | | <view class="detail-left"> |
| | | <view class="book-img"> |
| | | <image |
| | | loading="" |
| | | src="{{bookDetail.icon}}" |
| | | mode="aspectFill" |
| | | aria-label="{{bookDetail.name}}" |
| | | /> |
| | | <image loading="" src="{{bookDetail.icon}}" mode="aspectFill" aria-label="{{bookDetail.name}}" /> |
| | | </view> |
| | | <view class="book-use"> |
| | | <view class="collect" bind:tap="setCollect"> |
| | | <view> |
| | | <image |
| | | loading="" |
| | | src="/static/images/bookService/detail/collect.png" |
| | | wx:if="{{!bookDetail.isFavourite}}" |
| | | /> |
| | | <image |
| | | loading="" |
| | | src="/static/images/bookService/detail/collecting.png" |
| | | wx:if="{{bookDetail.isFavourite}}" |
| | | /> |
| | | <image loading="" src="/static/images/bookService/detail/collect.png" wx:if="{{!bookDetail.isFavourite}}" /> |
| | | <image loading="" src="/static/images/bookService/detail/collecting.png" wx:if="{{bookDetail.isFavourite}}" /> |
| | | </view> |
| | | <view class="use-title">收藏</view> |
| | | </view> |
| | | <view class="suggest" bind:tap="suggestBtn"> |
| | | <view> |
| | | <image |
| | | loading="" |
| | | src="/static/images/bookService/detail/suggest.png" |
| | | /> |
| | | <image loading="" src="/static/images/bookService/detail/suggest.png" /> |
| | | </view> |
| | | <view class="use-title">我要建议</view> |
| | | </view> |
| | |
| | | <view class="li-content">{{bookDetail.isbn}}</view> |
| | | </view> |
| | | <view class="message-li"> |
| | | <view class="li-title" wx:if="{{bookDetail.publicationDate}}" |
| | | >出版时间:</view |
| | | > |
| | | <view class="li-title" wx:if="{{bookDetail.publicationDate}}">出版时间:</view> |
| | | <view class="li-content">{{bookDetail.publicationDate}}</view> |
| | | </view> |
| | | <view |
| | | class="message-li" |
| | | wx:if="{{bookDetail.class}}" |
| | | style="height: 80rpx" |
| | | > |
| | | <view class="message-li" wx:if="{{bookDetail.class}}" style="height: 80rpx"> |
| | | <view class="li-title">图书分类:</view> |
| | | <view class="class-name showTow">{{bookDetail.class}}</view> |
| | | </view> |
| | | </view> |
| | | <image |
| | | src="/static/images/bookService/detail/square.png" |
| | | class="right-background" |
| | | /> |
| | | <image src="/static/images/bookService/detail/square.png" class="right-background" /> |
| | | </view> |
| | | </view> |
| | | <!-- 销售信息 --> |
| | |
| | | <image src="/static/images/bookService/detail/electon-price.png" /> |
| | | </view> |
| | | <view class="price"> |
| | | <view class="price-text" |
| | | >¥{{bookDetail.price == '0.00' ? '免费' :bookDetail.price}}</view |
| | | > |
| | | <view class="price-old" wx:if="{{bookDetail.oldPrice != '0.00'}}" |
| | | >¥{{bookDetail.oldPrice}} |
| | | <view class="price-text">¥{{bookDetail.price == '0.00' ? '免费' :bookDetail.price}}</view> |
| | | <view class="price-old" wx:if="{{bookDetail.oldPrice != '0.00'}}">¥{{bookDetail.oldPrice}} |
| | | </view> |
| | | </view> |
| | | <view> </view> |
| | |
| | | <view> |
| | | <image src="/static/images/bookService/detail/paper-price.png" /> |
| | | </view> |
| | | <view class="price" |
| | | >¥{{bookDetail.paperPrice == '0.00' ? '免费' : |
| | | bookDetail.paperPrice}}</view |
| | | > |
| | | <view class="price">¥{{bookDetail.paperPrice == '0.00' ? '免费' : |
| | | bookDetail.paperPrice}}</view> |
| | | </view> |
| | | </view> |
| | | <!-- 网店 --> |
| | | <view class="book-web"> |
| | | <image |
| | | src="/static/images/bookService/detail/jd.png" |
| | | wx:if="{{bookDetail.JDLink}}" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.JDLink}}" |
| | | data-type="jd" |
| | | /> |
| | | <image |
| | | class="tmall-image" |
| | | src="/static/images/bookService/detail/tmall.png" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.tmallLink}}" |
| | | wx:if="{{bookDetail.tmallLink}}" |
| | | /> |
| | | <image |
| | | src="/static/images/bookService/detail/dangdang.png" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.dangdangLink}}" |
| | | wx:if="{{bookDetail.dangdangLink}}" |
| | | /> |
| | | <image |
| | | src="/static/images/bookService/detail/weidian.png" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.weidianLink}}" |
| | | wx:if="{{bookDetail.weidianLink}}" |
| | | /> |
| | | <image src="/static/images/bookService/detail/jd.png" wx:if="{{bookDetail.JDLink}}" bind:tap="goShop" data-link="{{bookDetail.JDLink}}" data-type="jd" /> |
| | | <image class="tmall-image" src="/static/images/bookService/detail/tmall.png" bind:tap="goShop" data-link="{{bookDetail.tmallLink}}" wx:if="{{bookDetail.tmallLink}}" /> |
| | | <image src="/static/images/bookService/detail/dangdang.png" bind:tap="goShop" data-link="{{bookDetail.dangdangLink}}" wx:if="{{bookDetail.dangdangLink}}" /> |
| | | <image src="/static/images/bookService/detail/weidian.png" bind:tap="goShop" data-link="{{bookDetail.weidianLink}}" wx:if="{{bookDetail.weidianLink}}" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="book-resource"> |
| | | <t-tabs |
| | | defaultValue="{{tabValue}}" |
| | | bind:change="onTabsChange" |
| | | t-class="custom-tabs" |
| | | t-class-content="custom-panel" |
| | | class="tab-class" |
| | | > |
| | | <t-tabs defaultValue="{{tabValue}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel" class="tab-class"> |
| | | <t-tab-panel label="图书简介" value="brief" style="{{tabPanelstyle}}"> |
| | | <book-brief |
| | | content="{{bookDetail.content}}" |
| | | authorIntroduction="{{bookDetail.authorIntroduction}}" |
| | | wx:if="{{bookDetail.content && bookDetail.authorIntroduction}}" |
| | | ></book-brief> |
| | | <view |
| | | wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction}}" |
| | | class="noData" |
| | | > |
| | | <book-brief content="{{bookDetail.content}}" authorIntroduction="{{bookDetail.authorIntroduction}}" wx:if="{{bookDetail.content && bookDetail.authorIntroduction}}"></book-brief> |
| | | <view wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel label="电子书" value="jsek_eBook" style="{{tabPanelstyle}}"> |
| | | <epub-view |
| | | fileInfo="{{fileInfo}}" |
| | | id="eBook" |
| | | class="webView" |
| | | ></epub-view> |
| | | <epub-view fileInfo="{{fileInfo}}" id="eBook" class="webView"></epub-view> |
| | | </t-tab-panel> |
| | | <t-tab-panel |
| | | label="教学资源" |
| | | value="jsek_teachingResources" |
| | | class="{{loading ? 'loading': ''}}" |
| | | > |
| | | <t-tab-panel label="教学资源" value="jsek_teachingResources" class="{{loading ? 'loading': ''}}"> |
| | | <view wx:if="{{!loading && teach.length && !noResources}}"> |
| | | <teach-resource |
| | | applyState="{{applyState}}" |
| | | rejectCause="{{rejectCause}}" |
| | | bind:applyResource="applyResource" |
| | | applyResourceLoading="{{applyResourceLoading}}" |
| | | ></teach-resource> |
| | | <tree |
| | | openIds="{{openTeachids}}" |
| | | bookInfo="{{bookDetail}}" |
| | | treeList="{{teach}}" |
| | | tab="{{tabValue}}" |
| | | applyState="{{applyState}}" |
| | | bind:downloadTeach="downloadTeach" |
| | | openTeachids="{{openTeachids}}" |
| | | wx:if="{{teach.length}}" |
| | | ></tree> |
| | | <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" bind:applyResource="applyResource" applyResourceLoading="{{applyResourceLoading}}"></teach-resource> |
| | | <tree openIds="{{openTeachids}}" bookInfo="{{bookDetail}}" treeList="{{teach}}" tab="{{tabValue}}" applyState="{{applyState}}" bind:downloadTeach="downloadTeach" openTeachids="{{openTeachids}}" wx:if="{{teach.length}}"></tree> |
| | | </view> |
| | | <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="loading" |
| | | loading="{{loading}}" |
| | | /> |
| | | <t-loading theme="circular" size="60rpx" class="loading" loading="{{loading}}" /> |
| | | <view wx:if="{{noResources}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel |
| | | label="云学习" |
| | | value="jsek_cloudLearning" |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | <t-tab-panel label="云学习" value="jsek_cloudLearning" style="{{tabPanelstyle}}"> |
| | | <view wx:if="{{!loading && learn.length}}"> |
| | | <learn-resource |
| | | bind:getFreeResource="getFreeResource" |
| | | bind:allAddShoppiingCar="allAddShoppiingCar" |
| | | id="learn-resource" |
| | | buyResourceData="{{buyResourceData}}" |
| | | bookId="{{bookDetail.id}}" |
| | | ></learn-resource> |
| | | <tree |
| | | id="tree" |
| | | openIds="{{openLearnids}}" |
| | | bookInfo="{{bookDetail}}" |
| | | tab="{{tabValue}}" |
| | | treeList="{{learn}}" |
| | | buyIds="{{buyIdList}}" |
| | | openLearnids="{{openLearnids}}" |
| | | ></tree> |
| | | <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" id="learn-resource" buyResourceData="{{buyResourceData}}" bookId="{{bookDetail.id}}"></learn-resource> |
| | | <tree id="tree" openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}"></tree> |
| | | </view> |
| | | <view wx:if="{{noResources}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel |
| | | label="云测试" |
| | | value="questionBank" |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | <t-tab-panel label="云测试" value="questionBank" style="{{tabPanelstyle}}"> |
| | | <view wx:if="{{!loading && test.length}}"> |
| | | <test-resource |
| | | list="{{test}}" |
| | | bookInfo="{{bookDetail}}" |
| | | mockData="{{mockData}}" |
| | | ></test-resource> |
| | | <test-resource list="{{test}}" bookInfo="{{bookDetail}}" mockData="{{mockData}}"></test-resource> |
| | | </view> |
| | | <view wx:if="{{noResources}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | |
| | | <view class="box-bottom"> |
| | | <view class="bottom-btn" bind:tap="appplyElectronicBook"> |
| | | <view> |
| | | <t-image |
| | | loading="" |
| | | src="/static/images/bookService/detail/ebook.png" |
| | | ></t-image> |
| | | <t-image loading="" src="/static/images/bookService/detail/ebook.png"></t-image> |
| | | </view> |
| | | <view class="btn-text">电子样书申请</view> |
| | | </view> |
| | | <view class="bottom-btn" bind:tap="appplyPaperBook"> |
| | | <view> |
| | | <t-image |
| | | src="/static/images/bookService/detail/paper-book.png" |
| | | ></t-image> |
| | | <t-image src="/static/images/bookService/detail/paper-book.png"></t-image> |
| | | </view> |
| | | <view class="btn-text">纸质样书申请</view> |
| | | </view> |
| | | <view |
| | | class="shopCar {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'shopCarColor' }}" |
| | | bind:tap="addBookShopcCar" |
| | | wx:if="{{tabValue != 'jsek_eBook'}}" |
| | | >加入购物车</view |
| | | > |
| | | <view |
| | | class="buy {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'buyColor' }}" |
| | | bind:tap="buyBtn" |
| | | wx:if="{{tabValue != 'jsek_eBook'}}" |
| | | >立即购买</view |
| | | > |
| | | <view |
| | | class="shopCar shopCarColor" |
| | | bind:tap="addBookShopcCar" |
| | | wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}" |
| | | >加入购物车</view |
| | | > |
| | | <view |
| | | class="buy buyColor" |
| | | bind:tap="buyBtn" |
| | | wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}" |
| | | >立即购买</view |
| | | > |
| | | <view |
| | | class="read buyColor" |
| | | bind:tap="goRead" |
| | | wx:if="{{tabValue == 'jsek_eBook' && bookBuy}}" |
| | | >立即查看</view |
| | | > |
| | | <view class="shopCar {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'shopCarColor' }}" bind:tap="addBookShopcCar" wx:if="{{tabValue != 'jsek_eBook'}}">加入购物车</view> |
| | | <view class="buy {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'buyColor' }}" bind:tap="buyBtn" wx:if="{{tabValue != 'jsek_eBook'}}">立即购买</view> |
| | | <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}">加入购物车</view> |
| | | <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}">立即购买</view> |
| | | <view class="read buyColor" bind:tap="goRead" wx:if="{{tabValue == 'jsek_eBook' && bookBuy}}">立即查看</view> |
| | | </view> |
| | | </scroll-view> |
| | | <!-- 我要建议弹窗 --> |
| | | <suggest |
| | | class="suggest-component" |
| | | id="suggest-component" |
| | | bookIcon="{{bookDetail.icon}}" |
| | | bookName="{{bookDetail.name}}" |
| | | ></suggest> |
| | | <suggest class="suggest-component" id="suggest-component" bookIcon="{{bookDetail.icon}}" bookName="{{bookDetail.name}}"></suggest> |
| | | <!-- 教学资源下载提示弹窗 --> |
| | | <t-dialog |
| | | class="teachDownloadDialog" |
| | | visible="{{isShowTeachDownload}}" |
| | | title="提示" |
| | | content="请前往PC端下载" |
| | | confirm-btn="{{ confirmBtn }}" |
| | | bind:confirm="closeTeachDownload" |
| | | /> |
| | | <t-dialog class="teachDownloadDialog" visible="{{isShowTeachDownload}}" title="提示" content="请前往PC端下载" confirm-btn="{{ confirmBtn }}" bind:confirm="closeTeachDownload" /> |
| | | |
| | | <view class="applyBox" bindtap="goApply"> |
| | | <view class="box"> |
| | | <t-image |
| | | src="/static/images/home/yangshuForm.png" |
| | | mode="heightFix" |
| | | class="img" |
| | | /> |
| | | <t-image src="/static/images/home/yangshuForm1.png" mode="heightFix" class="img" /> |
| | | <view class="num" wx:if="{{num > 0}}">{{num}}</view> |
| | | </view> |
| | | </view> |
| | |
| | | success: function (res) { |
| | | if (res.confirm) { |
| | | wx.navigateTo({ |
| | | url: "/packagePersonal/pages/sampleBooks/index", |
| | | url: "/packagePersonal/pages/sampleBooks/index?stateTab=1&tabActive=" + that.data.active, |
| | | }); |
| | | } else if (res.cancel) { |
| | | } |
| | |
| | | <!-- 图书服务-列表 --> |
| | | <view clas="container"> |
| | | <view class="page-header"> |
| | | <view style="width: 100%; height: {{barHeight}}px;"></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | |
| | | <t-back-top theme="round" wx:if="{{isBackTop}}" text="顶部" bind:to-top="onToTop"></t-back-top> |
| | | <view class="applyBox" bindtap="goApply"> |
| | | <view class="box"> |
| | | <t-image src="/static/images/home/yangshuForm.png" mode="heightFix" class="img" /> |
| | | <t-image src="/static/images/home/yangshuForm1.png" mode="heightFix" class="img" /> |
| | | <view class="num" wx:if="{{num > 0}}">{{num}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | .container { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .page-header { |
| | | background-color: #fff; |
| | | position: fixed; |
| | |
| | | } |
| | | |
| | | .bookServices-list { |
| | | padding-top: 280rpx; |
| | | padding-top: 294rpx; |
| | | } |
| | | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom) - 294rpx); |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .nacigationBar { |
| | |
| | | |
| | | .list-body { |
| | | background: #F2F3F8; |
| | | padding: 40rpx 0; |
| | | } |
| | | |
| | | .title { |
| | |
| | | height: 60rpx; |
| | | font-weight: bold; |
| | | align-items: center; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .title .line { |
| | |
| | | |
| | | |
| | | .book-list { |
| | | padding: 24rpx; |
| | | padding: 20rpx; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-top: 10rpx; |
| | |
| | | flex-direction: column; |
| | | align-items: center; |
| | | margin-bottom: 40rpx; |
| | | padding: 50rpx 20rpx 32rpx 20rpx; |
| | | padding: 50rpx 16rpx 32rpx 16rpx; |
| | | box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(0, 0, 0, 0.08); |
| | | background: #fff; |
| | | } |
| | |
| | | } |
| | | |
| | | .checkbox .t-checkbox__icon--left { |
| | | margin-right: 10rpx !important; |
| | | margin-right: 6rpx !important; |
| | | } |
| | | |
| | | .checkbox .t-checkbox__title { |
| | |
| | | this.setData({ |
| | | userId: res.userId |
| | | }) |
| | | let nickNameData = res.infoList.find((item) => item.type == 'nickName') |
| | | let teacherRole = res.roleLinks.find((item) => item.role.refCode == 'teacher') |
| | | let teacherInfos = res.infoList.find((item) => item.type == 'teacherInfo') |
| | | let wechatInfo = res.infoList.find((item) => item.type == 'WeChat') |
| | | let studentInfo = res.infoList.find((item) => item.type == 'Default') |
| | | let phoneInfo = res.secretList.find((item) => item.type == 'MobilePhone') |
| | | let emailInfo = res.secretList.find((item) => item.type == 'EMail') |
| | | let secretData = res.secretList.find(i => i.type == 'LoginNameAndPassword') |
| | | let WeChatInfo = res.infoList.find((item) => item.type === "WeChat"); |
| | | let defaultUser = {}; |
| | | if (teacherRole && teacherInfos) { |
| | | defaultUser = { |
| | | ...teacherInfos, |
| | | nickName: teacherInfos.fullName, |
| | | avatarUrl: teacherInfos.icon, |
| | | nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : teacherInfos.name, |
| | | icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo ? WeChatInfo.icon : '', |
| | | userId: res.userId, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo ? emailInfo.credential : JSON.parse(teacherInfos.data).email, |
| | | role: 'Teacher', |
| | | roleId: teacherRole.role.id |
| | | roleId: teacherRole.role.id, |
| | | } |
| | | this.setData({ |
| | | currAuthStep: 2, |
| | | }); |
| | | |
| | | } else if (wechatInfo) { |
| | | } else if (WeChatInfo) { |
| | | defaultUser = { |
| | | ...wechatInfo, |
| | | nickName: wechatInfo.name, |
| | | avatarUrl: wechatInfo.icon, |
| | | ...WeChatInfo, |
| | | nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name, |
| | | icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | userId: res.userId, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo?.credential, |
| | | role: 'Student' |
| | | } |
| | | } else if (studentInfo) { |
| | | this.setData({ |
| | | currAuthStep: 3, |
| | | }); |
| | | } else if (secretData) { |
| | | defaultUser = { |
| | | ...studentInfo, |
| | | nickName: wechatInfo.name ? wechatInfo.name : studentInfo.nickName, |
| | | avatarUrl: wechatInfo.icon, |
| | | nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : secretData.credential, |
| | | icon: nickNameData ? JSON.parse(nickNameData.data).icon : "", |
| | | userId: res.userId, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo?.credential, |
| | | role: 'Student' |
| | | } |
| | | } |
| | | wx.setStorageSync(app.config.userInfoKey, JSON.stringify(defaultUser)); |
| | |
| | | md5: ele.file.md5, |
| | | linkType: 'LinkFile', |
| | | linkProtectType: 'Public', |
| | | url: app.config.requestCtx + `/file/GetPreViewImage?md5=` + ele.md5 |
| | | url: app.config.requestCtx + `/file/GetPreViewImage?md5=` + ele.md5, |
| | | imgUrl: ele.file.imgUrl |
| | | } |
| | | arr.push(imgObj); |
| | | this.setData({ |
| | |
| | | linkType: 'LinkFile', |
| | | linkProtectType: 'Public', |
| | | url: |
| | | app.config.requestCtx + `/file/GetPreViewImage?md5=` + this.data.teacherInfo.relevantCertificates |
| | | app.config.requestCtx + `/file/GetPreViewImage?md5=` + this.data.teacherInfo.relevantCertificates, |
| | | imgUrl: app.config.requestCtx + `/file/GetPreViewImage?md5=` + this.data.teacherInfo.relevantCertificates, |
| | | } |
| | | arr.push(imgObj); |
| | | this.setData({ |
| | |
| | | this.setData({ teachVisible: true }); |
| | | }, |
| | | onPickerChange(e) { |
| | | const { value, label } = e.detail; |
| | | const { label } = e.detail; |
| | | this.setData({ |
| | | teachVisible: false, |
| | | teachText: label[0], |
| | | 'teacherInfo.positionalTitle': value.join[0], |
| | | 'teacherInfo.positionalTitle': label[0], |
| | | }); |
| | | }, |
| | | onPickerCancel(e) { |
| | |
| | | reasonTxtShow: e.detail.visible |
| | | }); |
| | | }, |
| | | onCloseProtocol() { |
| | | this.setData({ |
| | | protocolShow: false, |
| | | }); |
| | | }, |
| | | |
| | | //查看为通过原因 |
| | | previewReason() { |
| | | this.setData({ |
| | | reasonTxtShow: true, |
| | | }); |
| | | }, |
| | | |
| | | onCloseReasonTxt() { |
| | | this.setData({ |
| | | reasonTxtShow: false, |
| | | }); |
| | | }, |
| | | |
| | |
| | | }) |
| | | return |
| | | } |
| | | if (that.data.teacherInfo.relevantCertificates.length == 0) { |
| | | if (that.data.imgPics.length == 0) { |
| | | wx.showToast({ |
| | | title: "请上传工作证!", |
| | | icon: 'none', |
| | |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | that.newGetTeacherInfo() |
| | | that.getUserRole() |
| | | // that.newGetTeacherInfo() |
| | | } |
| | | }) |
| | | } |
| | |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | that.newGetTeacherInfo() |
| | | // that.newGetTeacherInfo() |
| | | that.getUserRole() |
| | | } |
| | | }) |
| | | }) |
| | |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | if (wx.getStorageSync(app.config.tokenKey)) { |
| | | this.getUserRole() |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | "t-picker": "tdesign-miniprogram/picker/picker", |
| | | "t-picker-item": "tdesign-miniprogram/picker-item/picker-item", |
| | | "t-input": "tdesign-miniprogram/input/input", |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-upload": "tdesign-miniprogram/upload/upload", |
| | | "t-popup": "tdesign-miniprogram/popup/popup", |
| | | "t-checkbox": "tdesign-miniprogram/checkbox/checkbox", |
| | |
| | | <view class="container"> |
| | | <view class="content"> |
| | | <view class="tips"> 仅限学校本课程任课教师申请;请上传有效在职教师工作证将有助于审核。 </view> |
| | | <view class="page-body"> |
| | | <view class="baseInfoBox"> |
| | |
| | | <view class="from-item"> |
| | | <view class="label"> 座机: </view> |
| | | <view class="item-content"> |
| | | <t-input placeholder="输入座机号" borderless value="{{teacherInfo.telphone}}" type="number" tips="{{telphoneError ? '座机号输入不正确' : ''}}" bindchange="onTelphoneInput" disabled="{{!editState}}" /> |
| | | <t-input placeholder="输入座机号" borderless value="{{teacherInfo.telphone}}" tips="{{telphoneError ? '座机号输入不正确' : ''}}" bindchange="onTelphoneInput" disabled="{{!editState}}" /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> 邮箱: </view> |
| | | <view class="item-content"> |
| | | <t-input placeholder="输入邮箱" borderless value="{{teacherInfo.email}}" type="number" tips="{{emailError ? '邮箱输入不正确' : ''}}" bindchange="onEmailInput" disabled="{{!editState}}" /> |
| | | <t-input placeholder="输入邮箱" borderless value="{{teacherInfo.email}}" tips="{{emailError ? '邮箱输入不正确' : ''}}" bindchange="onEmailInput" disabled="{{!editState}}" /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | |
| | | <button class="submit" bindtap="submit">提交</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="popupBox"> |
| | | <t-popup visible="{{protocolShow}}" bind:visible-change="onVisibleChange" placement="center" close-btn> |
| | | <t-popup visible="{{protocolShow}}" bind:visible-change="onVisibleChange" placement="center"> |
| | | <view class="block"> |
| | | <view class="protocol"> |
| | | <rich-text space="emsp" nodes="{{protocolTxt}}" class="content" /> |
| | | </view> |
| | | <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="onCloseProtocol" /> |
| | | </view> |
| | | </t-popup> |
| | | <t-popup visible="{{reasonTxtShow}}" bind:visible-change="onVisibleChange" placement="center" close-btn> |
| | | <t-popup visible="{{reasonTxtShow}}" bind:visible-change="onVisibleChange" placement="center"> |
| | | <view class="reasonBlock"> |
| | | <view class="reasonBox"> |
| | | {{reasonTxt}} |
| | | </view> |
| | | <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="onCloseReasonTxt" /> |
| | | </view> |
| | | </t-popup> |
| | | </view> |
| | | </view> |
| | |
| | | } |
| | | |
| | | .container { |
| | | width: 100%; |
| | | padding-bottom: env(safe-area-inset-bottom); |
| | | overflow: auto; |
| | | width: 100vw; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom)); |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .tips { |
| | |
| | | color: #ff6c00 !important; |
| | | } |
| | | |
| | | .popupBox .t-popup { |
| | | width: 80% !important; |
| | | } |
| | | |
| | | .popupBox .t-popup__content { |
| | | padding: 40rpx 10rpx !important; |
| | | padding-top: 80rpx !important; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | .block { |
| | | height: 450px !important; |
| | | position: relative; |
| | | width: 600rpx; |
| | | height: 820rpx; |
| | | background: #fff; |
| | | border-radius: 16rpx; |
| | | |
| | | } |
| | | |
| | | .protocol { |
| | | padding: 20rpx; |
| | | height: 800rpx !important; |
| | | overflow: auto !important; |
| | | } |
| | | |
| | | .reasonBlock { |
| | | height: 450px !important; |
| | | .reasonBox { |
| | | height: 400rpx !important; |
| | | overflow: auto !important; |
| | | font-size: 28rpx; |
| | | line-height: 48rpx; |
| | | padding: 20rpx; |
| | | } |
| | | |
| | | .reasonBlock { |
| | | position: relative; |
| | | width: 500rpx; |
| | | height: 400rpx; |
| | | background: #fff; |
| | | border-radius: 16rpx; |
| | | } |
| | | |
| | | .close-btn { |
| | | position: absolute; |
| | | left: 50%; |
| | | margin-left: -32rpx; |
| | | bottom: calc(-1 * (48rpx + 64rpx)); |
| | | } |
| | | |
| | | .wrapper { |
| | | margin: 32rpx; |
| | | display: block; |
| | | } |
| | | |
| | | .btn-area { |
| | |
| | | <view class="container"> |
| | | <scroll-view class="scroll content" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" scroll-y refresher-enabled="{{true}}" lower-threshold="{{200}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom"> |
| | | <view slot="refresher" class="refresh-container"> |
| | | <view class="loading"> |
| | | <t-loading theme="circular" size="40rpx" text="正在刷新..." class="wrapper" /> |
| | | </view> |
| | | </view> |
| | | <view class="pageInfo"> |
| | | <view class="activation"> |
| | | <view class="title"> |
| | | <view class="line"></view> |
| | |
| | | <view>已激活商品</view> |
| | | </view> |
| | | <view class="contentBox"> |
| | | <scroll-view class="scroll content" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" scroll-y refresher-enabled="{{true}}" lower-threshold="{{200}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom"> |
| | | <view slot="refresher" class="refresh-container"> |
| | | <view class="loading"> |
| | | <t-loading theme="circular" size="40rpx" text="正在刷新..." class="wrapper" /> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="list" wx:if="{{list.length > 0}}"> |
| | | <view class="content-item" wx:for="{{list}}" wx:for-item="items" wx:for-index="index" wx:key="index"> |
| | | <view class="codeInfoBox"> |
| | |
| | | <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}"> |
| | | <text>没有更多了</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | |
| | | page { |
| | | width: 100vw; |
| | | height: 100%; |
| | | background: #F2F3F8; |
| | | } |
| | | |
| | | .container { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom)); |
| | | box-sizing: border-box; |
| | | |
| | | } |
| | | |
| | | .pageInfo { |
| | | padding: 40rpx 20rpx 0 20rpx; |
| | | } |
| | | |
| | | .refresh-container { |
| | |
| | | .loading { |
| | | padding: 20rpx; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container { |
| | | padding: 40rpx 24rpx; |
| | | } |
| | | |
| | | .activation { |
| | |
| | | /* pages/personalCenter/downloads/index.wxss */ |
| | | .container { |
| | | padding: 40rpx 30rpx; |
| | | width: 100vw; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom)); |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .pageInfo { |
| | | padding: 40rpx; |
| | | } |
| | | |
| | | .content-item { |
| | |
| | | page { |
| | | background-color: #f0f2f5; |
| | | } |
| | | |
| | | .container { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | padding: 0 20rpx; |
| | | } |
| | | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom) - 86rpx); |
| | | box-sizing: border-box; |
| | | padding: 0 24rpx; |
| | | } |
| | | |
| | | .page-header { |
| | |
| | | .submitBox .box { |
| | | display: flex; |
| | | margin: 0 auto; |
| | | width: 160rpx; |
| | | width: 170rpx; |
| | | align-items: center; |
| | | text-align: center; |
| | | font-size: 28rpx; |
| | |
| | | <view class="container"> |
| | | <t-tabs t-class="t-tabs" defaultValue="{{active}}" split="{{false}}" bind:change="tabBookClick"> |
| | | <t-tab-panel wx:for="{{tabList}}" wx:for-index="index" wx:key="index" label="{{item.label}}" value="{{index}}"> |
| | | <t-tab-panel wx:for="{{tabList}}" wx:for-index="index" wx:key="index" label="{{item.label}}" value="{{index}}" /> |
| | | </t-tabs> |
| | | <view class="pageInfo"> |
| | | <scroll-view class="scroll content" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" scroll-y refresher-enabled="{{true}}" lower-threshold="{{200}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom"> |
| | | <view slot="refresher" class="refresh-container"> |
| | |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </t-tab-panel> |
| | | </t-tabs> |
| | | |
| | | <t-back-top theme="round" wx:if="{{isBackTop}}" text="顶部" bind:to-top="onToTop"></t-back-top> |
| | | </view> |
| | |
| | | page { |
| | | background-color: #F2F3F8; |
| | | } |
| | | |
| | | .container { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .pageInfo { |
| | | background: #fff; |
| | | } |
| | | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom) - 116rpx); |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .t-tabs { |
| | | margin-top: 20rpx; |
| | | padding-top: 20rpx; |
| | | background: none !important; |
| | | width: 100%; |
| | | position: fixed; |
| | | top: 0rpx; |
| | | left: 0; |
| | | z-index: 1 |
| | | } |
| | | |
| | | .t-tabs__wrapper { |
| | |
| | | text-align: center; |
| | | } |
| | | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom)); |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .t-tabs__content { |
| | | background: #fff !important; |
| | |
| | | .container { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom)); |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .pageInfo { |
| | | padding: 40rpx 20rpx; |
| | | } |
| | |
| | | |
| | | .titleBox .item-title { |
| | | font-weight: bold; |
| | | flex: 1; |
| | | height: 40rpx; |
| | | line-height: 40rpx; |
| | | display: -webkit-box; |
| | | margin-top: 20rpx; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 1; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .createDate { |
| | | font-size: 24rpx; |
| | | color: #949494; |
| | | margin-left: 10rpx; |
| | | } |
| | | |
| | | .description { |
| | | font-size: 24rpx; |
| | | height: 88rpx; |
| | | height: 80rpx; |
| | | line-height: 40rpx; |
| | | display: -webkit-box; |
| | | margin-top: 20rpx; |
| | |
| | | <view class="container"> |
| | | <view class="page-header"> |
| | | <view class="search"> |
| | | <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="请输入订单编号" leftIcon=""> |
| | |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | <t-back-top theme="round" wx:if="{{isBackTop}}" text="顶部" bind:to-top="onToTop"></t-back-top> |
| | |
| | | page { |
| | | .container { |
| | | width: 100vw; |
| | | height: 100%; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom) - 200rpx); |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .page-header { |
| | |
| | | .pageInfo { |
| | | background: #F2F3F8; |
| | | padding-top: 200rpx; |
| | | height: calc(100% - 200rpx) |
| | | } |
| | | |
| | | .list { |
| | |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | if (options) { |
| | | this.setData({ |
| | | active: options.tabActive, |
| | | active1: options.stateTab |
| | | }) |
| | | console.log(this.data.active) |
| | | if (this.data.active == '1') { |
| | | this.setData({ |
| | | topicIdOrRefCode: 'applyBook', |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | topicIdOrRefCode: 'applyEntityBook', |
| | | }) |
| | | } |
| | | } |
| | | console |
| | | this.getDataList(false); |
| | | }, |
| | | tabClick(item) { |
| | |
| | | <view class="container"> |
| | | <view class="page-header"> |
| | | <view class="tabOne"> |
| | | <t-tabs t-class="t-tabs" defaultValue="{{active}}" split="{{false}}" bind:change="tabClick"> |
| | | <t-tabs t-class="t-tabs" value="{{active}}" split="{{false}}" bind:change="tabClick"> |
| | | <t-tab-panel label="纸质样书" value="0" /> |
| | | <t-tab-panel label="电子样书" value="1" /> |
| | | </t-tabs> |
| | |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | <t-back-top theme="round" wx:if="{{isBackTop}}" text="顶部" bind:to-top="onToTop"></t-back-top> |
| | |
| | | /* pages/personalCenter/sampleBooks/index.wxss */ |
| | | page { |
| | | background-color: #F2F3F8; |
| | | } |
| | | |
| | | .container { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom) - 230rpx); |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .pageInfo { |
| | | margin-top: 230rpx; |
| | | padding-top: 230rpx; |
| | | } |
| | | |
| | | .content-item { |
| | |
| | | backUrl: null, |
| | | userInfo: {}, |
| | | tabList: [], //目录 |
| | | current: 1,//轮播图参数 |
| | | autoplay: true, //轮播图参数 |
| | | duration: '500',//轮播图参数 |
| | | interval: 5000,//轮播图参数 |
| | |
| | | rankingList: [],//排行榜 |
| | | shoppingCartGetId: [], |
| | | baseRefresh: { |
| | | value: true |
| | | value: false |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.loadHomePage(); |
| | | this.getBannerList() |
| | | |
| | | }, |
| | | |
| | | onLoad(options) { |
| | |
| | | }, |
| | | onPullDownRefresh() { |
| | | this.setData({ |
| | | isWhite: true |
| | | 'baseRefresh.value': true, |
| | | }) |
| | | this.init(); |
| | | }, |
| | |
| | | |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | baseRefresh: { |
| | | value: false, |
| | | }, |
| | | isWhite: false, |
| | | 'baseRefresh.value': false, |
| | | }) |
| | | }, 500); |
| | | }, |
| | |
| | | <view class="container"> |
| | | <t-pull-down-refresh value="{{baseRefresh.value}}" loadingTexts="{{['下拉刷新', '松手刷新', '正在刷新', '刷新完成']}}" bind:refresh="onPullDownRefresh" bind:scroll="onScroll"> |
| | | <view class="background {{ isWhite ? 'white':''}}" style="padding-top: {{barHeight}}px"> |
| | | <text class="text">京师E课</text> |
| | | </view> |
| | | <t-pull-down-refresh value="{{baseRefresh.value}}" loadingTexts="{{['下拉刷新', '松手刷新', '正在刷新', '刷新完成']}}" bind:refresh="onPullDownRefresh" bind:scroll="onScroll"> |
| | | <view class="home-page-header"> |
| | | <view class="bg"> |
| | | <image src="/static/images/home/home-bg.png" mode="heightFix" class="image" /> |
| | |
| | | <view class="user-center-card__header__name">{{userInfo.nickName || '微信用户'}}</view> |
| | | <view class="userTypeBox"> |
| | | <text>{{userInfo.userType}}</text> |
| | | <text class="edit" bindtap="editUserType">修改</text> |
| | | <text bindtap="editUserType" wx:if="{{userInfo.userType}}" class="edit">修改</text> |
| | | <text bindtap="editUserType" wx:else class="edit">设置用户类型</text> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <view class="user-center-card__header__name">{{userInfo.nickName || '微信用户'}}</view> |
| | | <view class="userTypeBox"> |
| | | <text>{{userInfo.userType}}</text> |
| | | <text bindtap="editUserType">修改</text> |
| | | <text bindtap="editUserType" wx:if="{{userInfo.userType}}" class="edit">修改</text> |
| | | <text bindtap="editUserType" wx:else class="edit">设置用户类型</text> |
| | | </view> |
| | | </view> |
| | | <view class="setting" bind:tap="gotoUserEditPage"> |
| | |
| | | moreMenu, |
| | | moreMenu1, |
| | | visible: false, |
| | | baseRefresh: { |
| | | value: false |
| | | } |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | |
| | | url: "/pages/testLogin/index", |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | onShow() { |
| | | if (typeof this.getTabBar === 'function' && this.getTabBar()) { |
| | |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | this.setData({ |
| | | 'baseRefresh.value': true, |
| | | }) |
| | | this.getUserInfo() |
| | | }, |
| | | /** |
| | |
| | | defaultUser = { |
| | | ...WeChatInfo, |
| | | nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name, |
| | | icon: JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | userId: res.userId, |
| | | userType: type |
| | | userType: type, |
| | | role: 'Student', |
| | | } |
| | | this.setData({ |
| | | currAuthStep: 3, |
| | |
| | | } else if (secretData) { |
| | | defaultUser = { |
| | | nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : secretData.credential, |
| | | icon: JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : "", |
| | | icon: nickNameData ? JSON.parse(nickNameData.data).icon : "", |
| | | userId: res.userId, |
| | | userType: type |
| | | userType: type, |
| | | role: 'Student', |
| | | } |
| | | } |
| | | this.setData({ |
| | |
| | | }) |
| | | this.getTeacherInfo() |
| | | wx.setStorageSync(app.config.userInfoKey, JSON.stringify(this.data.userInfo)); |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | 'baseRefresh.value': false, |
| | | }) |
| | | }, 500); |
| | | } |
| | | }); |
| | | }, |
| | |
| | | } |
| | | }, |
| | | |
| | | onPageScroll(e) { |
| | | onScroll(e) { |
| | | this.setData({ |
| | | isWhite: e.scrollTop > 20 ? true : false |
| | | }) |
| | |
| | | "usingComponents": { |
| | | "t-user-center-card": "./components/user-center-card/index", |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-popup": "tdesign-miniprogram/popup/popup" |
| | | "t-popup": "tdesign-miniprogram/popup/popup", |
| | | "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh" |
| | | }, |
| | | "enablePullDownRefresh": true |
| | | } |
| | |
| | | <view> |
| | | <t-pull-down-refresh value="{{baseRefresh.value}}" loadingTexts="{{['下拉刷新', '松手刷新', '正在刷新', '刷新完成']}}" bind:refresh="onPullDownRefresh" bind:scroll="onScroll"> |
| | | <view style="width: 100%; height: {{barHeight}}px;"></view> |
| | | <view class="background {{ isWhite ? 'white':''}}" style="padding-top: {{barHeight}}px"> |
| | | <text class="text">个人中心</text> |
| | |
| | | <view class="title">请选择您的用户类型</view> |
| | | </view> |
| | | <view class="body"> |
| | | |
| | | <view wx:for="{{userTypeList}}" wx:for-item="item" wx:for-index="index" wx:key="index" data-info="{{item}}" bindtap="tabUserTypeClick" class="{{item.value === userTypeActive ? 'activeItem item' : 'item'}}"> |
| | | {{ item.lable }} |
| | | </view> |
| | |
| | | </view> |
| | | </t-popup> |
| | | </view> |
| | | </t-pull-down-refresh> |
| | | </view> |
| | |
| | | // pages/student/index.js |
| | | const app = getApp(); |
| | | import { getPublicImage } from "../../assets/js/middleGround/tool.js"; |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | learningDuration: 0, |
| | | lastLoginTime: '2024-03-25 20:00:09', |
| | | active: 0, |
| | | titleBook: "图书(0本)", |
| | | titleCourse: "课程(0门)", |
| | | titleTextBook: "数字教材(0本)", |
| | | list: [], |
| | | //分页 |
| | | page: 1, |
| | | limit: 18, |
| | | pageTotalCount: 0, |
| | | bottomLoading: false, |
| | | isMoreData: false, |
| | | // 返回顶部 |
| | | isBackTop: false, |
| | | setScrollValue: 0, |
| | | skeletonLoding: true, |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | onLoad() { |
| | | this.getDataList(false); |
| | | }, |
| | | |
| | | /** |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | tabClick(item) { |
| | | let that = this; |
| | | console.log(item) |
| | | that.setData({ |
| | | active: item.detail.value, |
| | | }) |
| | | that.setData({ |
| | | skeletonLoding: true, |
| | | list: [], |
| | | page: 1, |
| | | bottomLoading: false, |
| | | isMoreData: false, |
| | | }) |
| | | that.getDataList(false); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | getDataList(isReachBottom) { |
| | | let keywords = "jsek_mediaBook"; |
| | | if (this.data.active == '0') { |
| | | keywords = "jsek_mediaBook"; |
| | | } else if (this.data.active == '1') { |
| | | keywords = "jsek_digitalCourses"; |
| | | } else if (this.data.active == '2') { |
| | | keywords = "jsek_digitalTextbooks"; |
| | | } |
| | | let searchData = [ |
| | | { |
| | | keywords: keywords, |
| | | field: "ProductType", |
| | | }, |
| | | |
| | | ]; |
| | | let data = { |
| | | Size: this.data.limit, |
| | | Start: this.data.page * this.data.limit - this.data.limit, |
| | | sort: { |
| | | type: "Desc", |
| | | field: "CreateDate", |
| | | }, |
| | | searchList: searchData, |
| | | } |
| | | app.MG.store.getPurchasedProductList(data).then((res) => { |
| | | try { |
| | | if (res.datas.length > 0) { |
| | | res.datas.forEach((item, index) => { |
| | | item.product.icon = getPublicImage(item.product.icon, "", 200) |
| | | }) |
| | | let dataList = res.datas; |
| | | //触底加载新数据并保留老数据 |
| | | if (isReachBottom) { |
| | | dataList = [...this.data.list, ...dataList] //将新数据加入老数据中 |
| | | } |
| | | this.setData({ |
| | | list: dataList, |
| | | pageTotalCount: res.totalSize, |
| | | titleBook: "图书(" + res.totalSize + "本)", |
| | | bottomLoading: false, |
| | | isMoreData: dataList.length > 0 ? false : true, |
| | | skeletonLoding: false, |
| | | loading: false |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | skeletonLoding: false, |
| | | loading: false |
| | | }) |
| | | } |
| | | console.log(this.data.list) |
| | | } catch (error) { |
| | | console.log(error) |
| | | } |
| | | }) |
| | | }, |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | if (this._freshing) return |
| | | this.setData({ |
| | | // list: [], |
| | | page: 1, |
| | | limit: 18, |
| | | pageTotalCount: 0, |
| | | bottomLoading: false, |
| | | isMoreData: false |
| | | }) |
| | | this._freshing = true; |
| | | this.setData({ |
| | | triggered: false, |
| | | }) |
| | | this.getDataList(false); |
| | | this._freshing = false |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | this.setData({ |
| | | bottomLoading: true, |
| | | isMoreData: false |
| | | }) |
| | | let bool = false; |
| | | if (this.data.pageTotalCount > this.data.list.length) { |
| | | bool = true; |
| | | this.setData({ |
| | | page: this.data.page + 1, |
| | | }) |
| | | } else { |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | bottomLoading: false, |
| | | isMoreData: true |
| | | }) |
| | | }, 100) |
| | | return false; |
| | | } |
| | | this.getDataList(bool); |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "navigationBarTitleText": "我的学习", |
| | | "usingComponents": { |
| | | "t-tabs": "tdesign-miniprogram/tabs/tabs", |
| | | "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", |
| | | "t-back-top": "tdesign-miniprogram/back-top/back-top", |
| | | "t-loading": "tdesign-miniprogram/loading/loading", |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-empty": "tdesign-miniprogram/empty/empty" |
| | | } |
| | | } |
| | |
| | | <!--pages/student/index.wxml--> |
| | | <text> 学习</text> |
| | | <view class="container"> |
| | | <view class="top-content"> |
| | | <view class="boxStyle"> |
| | | <view class="box-item"> |
| | | <view>累计学习时长</view> |
| | | <view class="result"><text class="num">{{learningDuration}}</text>小时</view> |
| | | </view> |
| | | <view class="box-item"> |
| | | <view>上一次登陆时间</view> |
| | | <view class="result">{{lastLoginTime}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="tabOne"> |
| | | <t-tabs t-class="t-tabs" value="{{active}}" split="{{false}}" bind:change="tabClick"> |
| | | <t-tab-panel label="{{titleBook}}" value="0" /> |
| | | <t-tab-panel label="{{titleCourse}}" value="1" /> |
| | | <t-tab-panel label="{{titleTextBook}}" value="2" /> |
| | | </t-tabs> |
| | | </view> |
| | | <view class="pageInfo"> |
| | | <scroll-view class="scroll content" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" scroll-y refresher-enabled="{{true}}" lower-threshold="{{200}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom"> |
| | | <view slot="refresher" class="refresh-container"> |
| | | <view class="loading"> |
| | | <t-loading theme="circular" size="40rpx" text="正在刷新..." class="wrapper" /> |
| | | </view> |
| | | </view> |
| | | <view class="list" wx:if="{{list.length > 0}}"> |
| | | <view wx:if="{{active == '0'}}" class="listBox"> |
| | | <view class="content-item" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
| | | <view class="book-img" bind:tap="goBookDetails" data-book="{{item}}"> |
| | | <t-image src="{{item.product.icon}}" width="105" height="145" aria-label="{{item.product.name}}" wx:if="{{item.product.icon}}" /> |
| | | <t-image src="/static/images/default-book-img.png" width="105" height="145" aria-label="{{item.product.name}}" wx:else /> |
| | | </view> |
| | | <view class="body-info" data-book="{{item}}" bindtap="goBookDetails"> |
| | | <view class="name">{{item.product.name}}</view> |
| | | <!-- <view class="author">{{item.product.author}}</view> --> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- <view wx:if="{{activeName == 'Favoriteclass'}}"> |
| | | <view class="content-item" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
| | | <view class="item-con"> |
| | | <view class="titleBox"> |
| | | <view class="item-title">{{item.name}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view wx:if="{{list.length == 0}}" class="empyt"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | <view class="bottom-loading" wx:if="{{bottomLoading}}"> |
| | | <t-loading theme="circular" size="40rpx" text="加载中..." class="wrapper" /> |
| | | </view> |
| | | <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}"> |
| | | <text>没有更多了</text> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | </view> |
| | | </view> |
| | |
| | | /* pages/student/index.wxss */ |
| | | page { |
| | | background-color: #F2F3F8; |
| | | } |
| | | |
| | | .container { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | } |
| | | |
| | | .top-content { |
| | | padding: 40rpx; |
| | | } |
| | | |
| | | .boxStyle { |
| | | border: 2rpx solid #ff6d00; |
| | | background: rgba(255, 108, 0, 0.1); |
| | | font-size: 26rpx; |
| | | color: #9D9D9D; |
| | | padding: 20rpx; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | line-height: 56rpx; |
| | | } |
| | | |
| | | .box-item { |
| | | text-align: center; |
| | | } |
| | | |
| | | .result { |
| | | color: #333; |
| | | } |
| | | |
| | | |
| | | .num { |
| | | font-size: 36rpx; |
| | | color: #ff6d00; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .t-tabs__track { |
| | | display: none; |
| | | } |
| | | |
| | | .t-tabs { |
| | | padding-top: 20rpx; |
| | | background: none !important; |
| | | width: 100%; |
| | | position: fixed; |
| | | top: 0rpx; |
| | | left: 0; |
| | | z-index: 1 |
| | | } |
| | | |
| | | .t-tabs__wrapper { |
| | | background: none !important; |
| | | } |
| | | |
| | | .t-tabs__nav :nth-child(1) { |
| | | border-radius: 30rpx 30rpx 0 0rpx; |
| | | } |
| | | |
| | | .t-tabs__nav :nth-child(2) { |
| | | border-radius: 0rpx 30rpx 0 30rpx; |
| | | } |
| | | |
| | | .t-tabs__item { |
| | | flex: 1 !important; |
| | | background: #E6E8F1; |
| | | height: 76rpx !important; |
| | | margin-top: 16rpx; |
| | | border-radius: 30rpx 0 30rpx 0rpx !important; |
| | | } |
| | | |
| | | .t-tabs__item--active { |
| | | color: #333 !important; |
| | | background: #fff; |
| | | height: 96rpx; |
| | | font-size: 32rpx; |
| | | margin-top: 0; |
| | | height: 96rpx !important; |
| | | border-radius: 30rpx 30rpx 0 0rpx !important; |
| | | } |
| | | |
| | | .t-tabs__item--active+.t-tabs__item { |
| | | border-radius: 0 30rpx 0 30rpx !important; |
| | | } |
| | | |
| | | .refresh-container { |
| | | margin: 0 auto; |
| | | } |
| | | |
| | | .bottom-loading, |
| | | .loading { |
| | | padding: 20rpx; |
| | | text-align: center; |
| | | } |
| | | |
| | | .empyt { |
| | | padding: 100rpx 0; |
| | | } |
| | | |
| | | .pageInfo { |
| | | background: #fff; |
| | | margin-top: -30rpx; |
| | | padding: 30rpx; |
| | | } |
| | | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom) - 436rpx); |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .listBox { |
| | | display: flex; |
| | | flex-flow: row wrap; |
| | | padding-top: 30rpx; |
| | | } |
| | | |
| | | .content-item { |
| | | background: #f1f1f1; |
| | | border-radius: 10rpx; |
| | | box-sizing: border-box; |
| | | width: calc(100%/2 - 10rpx); |
| | | margin-right: 20rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | margin-bottom: 30rpx; |
| | | padding: 50rpx 20rpx 40rpx 20rpx; |
| | | |
| | | } |
| | | |
| | | .content-item:nth-child(2n) { |
| | | margin-right: 0; |
| | | } |
| | | |
| | | .icon image { |
| | | object-fit: contain; |
| | | } |
| | | |
| | | .body-info .name { |
| | | height: 80rpx; |
| | | margin-top: 24rpx; |
| | | width: 100%; |
| | | font-size: 30rpx; |
| | | line-height: 40rpx; |
| | | font-weight: 700; |
| | | word-break: break-all; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | overflow: hidden; |
| | | } |