From 93463d63f0dd81c436aa3335506611aab8356b88 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期一, 25 三月 2024 23:39:40 +0800 Subject: [PATCH] 样式修改 --- pages/home/home.js | 11 pages/student/index.wxss | 154 ++++ packagePersonal/pages/sampleBooks/index.wxml | 128 +- packagePersonal/pages/activateProduct/index.wxss | 21 packageDomain/pages/sampleBookList/index.wxml | 136 +- packagePersonal/pages/activateProduct/index.wxml | 118 +- packageDomain/pages/sampleBookList/index.wxss | 20 pages/student/index.wxml | 65 + static/images/home/yangshuForm1.png | 0 packageBookService/pages/bookServices/detail/index.wxml | 249 +----- packageBookService/pages/bookServices/buyResource/index.json | 3 pages/personalCenter/components/user-center-card/index.wxml | 6 packageBookService/pages/bookServices/buyResource/index.wxss | 1 packageDomain/pages/teacherCertification/index.js | 75 + packagePersonal/pages/feedBack/index.wxss | 13 pages/student/index.js | 143 +++ pages/personalCenter/index.wxml | 161 ++-- packageDomain/pages/teacherCertification/index.wxss | 58 + packageDomain/pages/teacherCertification/index.wxml | 196 ++-- packagePersonal/pages/myOrder/index.wxml | 126 +- pages/student/index.json | 10 packagePersonal/pages/myOrder/index.wxss | 10 packageBookService/pages/bookServices/detail/index.js | 13 pages/home/home.wxml | 360 ++++---- pages/personalCenter/index.js | 24 custom-tab-bar/index.wxss | 1 pages/personalCenter/index.json | 3 packageDomain/pages/sampleBookList/applicationForm/index.js | 2 packagePersonal/pages/downloads/index.wxss | 12 packagePersonal/pages/myCollection/index.wxml | 70 packageDomain/pages/teacherCertification/index.json | 1 packagePersonal/pages/myCollection/index.wxss | 24 packagePersonal/pages/sampleBooks/index.js | 17 packagePersonal/pages/sampleBooks/index.wxss | 11 packagePersonal/pages/myMassage/index.wxss | 22 35 files changed, 1,310 insertions(+), 954 deletions(-) diff --git a/custom-tab-bar/index.wxss b/custom-tab-bar/index.wxss index 3a47b5a..ffad08d 100644 --- a/custom-tab-bar/index.wxss +++ b/custom-tab-bar/index.wxss @@ -25,7 +25,6 @@ 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; } diff --git a/packageBookService/pages/bookServices/buyResource/index.json b/packageBookService/pages/bookServices/buyResource/index.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/packageBookService/pages/bookServices/buyResource/index.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/packageBookService/pages/bookServices/buyResource/index.wxss b/packageBookService/pages/bookServices/buyResource/index.wxss new file mode 100644 index 0000000..df43765 --- /dev/null +++ b/packageBookService/pages/bookServices/buyResource/index.wxss @@ -0,0 +1 @@ +/* packageBookService/pages/bookServices/buyResource/index.wxss */ \ No newline at end of file diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js index 9f8eae4..b538001 100644 --- a/packageBookService/pages/bookServices/detail/index.js +++ b/packageBookService/pages/bookServices/detail/index.js @@ -1431,6 +1431,7 @@ 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') { @@ -1458,6 +1459,12 @@ }) } } + } else { + wx.showToast({ + title: "璇ヤ功涓嶈兘鐢宠鐢靛瓙鏍蜂功", + icon: 'none', + duration: 1000, + }) } }, //鐢宠绾歌川鏍蜂功 @@ -1482,6 +1489,12 @@ }) } } + } else { + wx.showToast({ + title: "璇ヤ功涓嶈兘鐢宠绾歌川鏍蜂功", + icon: 'none', + duration: 1000, + }) } }, //鑾峰彇褰撳墠宸茬敵璇锋鏁帮紙绾歌川锛� diff --git a/packageBookService/pages/bookServices/detail/index.wxml b/packageBookService/pages/bookServices/detail/index.wxml index 1f5f776..5787248 100644 --- a/packageBookService/pages/bookServices/detail/index.wxml +++ b/packageBookService/pages/bookServices/detail/index.wxml @@ -3,12 +3,7 @@ <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> @@ -19,35 +14,19 @@ <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> @@ -69,24 +48,15 @@ <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> <!-- 閿�鍞俊鎭� --> @@ -98,11 +68,8 @@ <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> @@ -112,142 +79,52 @@ <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="鏆傛棤鏁版嵁" /> @@ -262,77 +139,31 @@ <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> +</view> \ No newline at end of file diff --git a/packageDomain/pages/sampleBookList/applicationForm/index.js b/packageDomain/pages/sampleBookList/applicationForm/index.js index e884a0f..3153c29 100644 --- a/packageDomain/pages/sampleBookList/applicationForm/index.js +++ b/packageDomain/pages/sampleBookList/applicationForm/index.js @@ -223,7 +223,7 @@ 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) { } diff --git a/packageDomain/pages/sampleBookList/index.wxml b/packageDomain/pages/sampleBookList/index.wxml index 06be016..223dc51 100644 --- a/packageDomain/pages/sampleBookList/index.wxml +++ b/packageDomain/pages/sampleBookList/index.wxml @@ -1,75 +1,77 @@ <!-- 鍥句功鏈嶅姟-鍒楄〃 --> -<view class="page-header"> - <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" /> +<view clas="container"> + <view class="page-header"> + <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" /> + </view> + <t-search model:value="{{searchValue}}" shape="round" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" class="navBar-search" style="width: 464rpx" bind:submit="searchBook" /> </view> - <t-search model:value="{{searchValue}}" shape="round" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" class="navBar-search" style="width: 464rpx" bind:submit="searchBook" /> + <view class="list-header"> + <view class="header-scroll"> + <scroll-view scroll-x scroll-with-animation='true' class="srcolbox"> + <t-dropdown-menu> + <t-dropdown-item label="鎬诲垎绫�" options="{{iconList.options}}" default-value="{{iconList.value}}" optionsColumns="2" bindchange="onChangeIcon" arrow-icon="" /> + <t-dropdown-item label="涓�绾�" options="{{stairList.options}}" value="{{stairList.value}}" optionsColumns="2" bindchange="onChangeStair" arrow-icon="" /> + <t-dropdown-item label="浜岀骇" options="{{secondList.options}}" optionsColumns="2" multiple value="{{secondList.value}}" bind:confirm="onConfirmSecond" bind:change="onChangeSecond" /> + </t-dropdown-menu> + </scroll-view> + </view> + <view class="header-sort" bind:tap="sortClick"> + <view class="sort-name">鎺掑簭</view> + <view class="sort-icon"> + <t-icon name="swap-left" size="24rpx" class="icon-right" color="{{sort == 'Asc' ? '#ff6c00' : ''}}" /> + <t-icon name="swap-left" size="24rpx" class="icon-left" color="{{sort == 'Desc' ? '#ff6c00' : ''}}" /> + </view> + </view> + </view> </view> - <view class="list-header"> - <view class="header-scroll"> - <scroll-view scroll-x scroll-with-animation='true' class="srcolbox"> - <t-dropdown-menu> - <t-dropdown-item label="鎬诲垎绫�" options="{{iconList.options}}" default-value="{{iconList.value}}" optionsColumns="2" bindchange="onChangeIcon" arrow-icon="" /> - <t-dropdown-item label="涓�绾�" options="{{stairList.options}}" value="{{stairList.value}}" optionsColumns="2" bindchange="onChangeStair" arrow-icon="" /> - <t-dropdown-item label="浜岀骇" options="{{secondList.options}}" optionsColumns="2" multiple value="{{secondList.value}}" bind:confirm="onConfirmSecond" bind:change="onChangeSecond" /> - </t-dropdown-menu> + <view class="bookServices-list"> + <view class="list-body"> + <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="姝e湪鍒锋柊..." class="wrapper" /> + </view> + </view> + <view class="title"> + <view class="line"></view> + <view class="icon"> + <t-image src="/static/images/home/yangshuliebiao.png" mode="heightFix" class="iconImage" /> + </view> + </view> + <view class="book-list" wx:if="{{bookList.length > 0}}"> + <view class="book-box" wx:for="{{bookList}}" wx:key="id"> + <view class="book-img" bind:tap="goDetail" data-book="{{item}}"> + <t-image src="{{item.icon}}" width="105" height="145" aria-label="{{item.name}}" wx:if="{{item.icon}}" /> + <t-image src="/static/images/default-book-img.png" width="105" height="145" aria-label="{{item.name}}" wx:else /> + </view> + <view class="book-name book-color" bind:tap="goDetail" data-book="{{item}}">{{ item.name}}</view> + <view class="book-author book-color">{{item.author}}</view> + <view class="checkbox"> + <t-checkbox label="绾歌川鏍蜂功" icon="rectangle" borderless='true' default-checked="{{item.paperChecked}}" disabled="{{item.paperDisabled || item.isApplyBook == '1' || item.isApplyBook == '2'}}" data-book="{{item}}" bind:change="onChangePaper" /> + <t-checkbox label="鐢靛瓙鏍蜂功" icon="rectangle" borderless='true' class="eBook" default-checked="{{item.electronChecked}}" disabled="{{item.electronDisabled || item.isApplyBook == '1' || item.isApplyBook == '3'}}" data-book="{{item}}" bind:change="onChangeElectron" /> + </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 class="header-sort" bind:tap="sortClick"> - <view class="sort-name">鎺掑簭</view> - <view class="sort-icon"> - <t-icon name="swap-left" size="24rpx" class="icon-right" color="{{sort == 'Asc' ? '#ff6c00' : ''}}" /> - <t-icon name="swap-left" size="24rpx" class="icon-left" color="{{sort == 'Desc' ? '#ff6c00' : ''}}" /> - </view> + </view> + <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/yangshuForm1.png" mode="heightFix" class="img" /> + <view class="num" wx:if="{{num > 0}}">{{num}}</view> </view> - </view> -</view> -<view class="bookServices-list"> - <view class="list-body"> - <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="姝e湪鍒锋柊..." class="wrapper" /> - </view> - </view> - <view class="title"> - <view class="line"></view> - <view class="icon"> - <t-image src="/static/images/home/yangshuliebiao.png" mode="heightFix" class="iconImage" /> - </view> - </view> - <view class="book-list" wx:if="{{bookList.length > 0}}"> - <view class="book-box" wx:for="{{bookList}}" wx:key="id"> - <view class="book-img" bind:tap="goDetail" data-book="{{item}}"> - <t-image src="{{item.icon}}" width="105" height="145" aria-label="{{item.name}}" wx:if="{{item.icon}}" /> - <t-image src="/static/images/default-book-img.png" width="105" height="145" aria-label="{{item.name}}" wx:else /> - </view> - <view class="book-name book-color" bind:tap="goDetail" data-book="{{item}}">{{ item.name}}</view> - <view class="book-author book-color">{{item.author}}</view> - <view class="checkbox"> - <t-checkbox label="绾歌川鏍蜂功" icon="rectangle" borderless='true' default-checked="{{item.paperChecked}}" disabled="{{item.paperDisabled || item.isApplyBook == '1' || item.isApplyBook == '2'}}" data-book="{{item}}" bind:change="onChangePaper" /> - <t-checkbox label="鐢靛瓙鏍蜂功" icon="rectangle" borderless='true' class="eBook" default-checked="{{item.electronChecked}}" disabled="{{item.electronDisabled || item.isApplyBook == '1' || item.isApplyBook == '3'}}" data-book="{{item}}" bind:change="onChangeElectron" /> - </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> -<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" /> - <view class="num" wx:if="{{num > 0}}">{{num}}</view> </view> </view> \ No newline at end of file diff --git a/packageDomain/pages/sampleBookList/index.wxss b/packageDomain/pages/sampleBookList/index.wxss index ed8578b..20b62f8 100644 --- a/packageDomain/pages/sampleBookList/index.wxss +++ b/packageDomain/pages/sampleBookList/index.wxss @@ -1,3 +1,8 @@ +.container { + width: 100vw; + height: 100vh; +} + .page-header { background-color: #fff; position: fixed; @@ -7,7 +12,12 @@ } .bookServices-list { - padding-top: 280rpx; + padding-top: 294rpx; +} + +.content { + height: calc(100vh - env(safe-area-inset-bottom) - 294rpx); + box-sizing: border-box; } .nacigationBar { @@ -126,7 +136,6 @@ .list-body { background: #F2F3F8; - padding: 40rpx 0; } .title { @@ -134,6 +143,7 @@ height: 60rpx; font-weight: bold; align-items: center; + margin-top: 20rpx; } .title .line { @@ -168,7 +178,7 @@ .book-list { - padding: 24rpx; + padding: 20rpx; display: flex; flex-wrap: wrap; margin-top: 10rpx; @@ -184,7 +194,7 @@ 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; } @@ -250,7 +260,7 @@ } .checkbox .t-checkbox__icon--left { - margin-right: 10rpx !important; + margin-right: 6rpx !important; } .checkbox .t-checkbox__title { diff --git a/packageDomain/pages/teacherCertification/index.js b/packageDomain/pages/teacherCertification/index.js index c245a0a..0979b20 100644 --- a/packageDomain/pages/teacherCertification/index.js +++ b/packageDomain/pages/teacherCertification/index.js @@ -88,44 +88,40 @@ 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)); @@ -201,7 +197,8 @@ 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({ @@ -214,7 +211,8 @@ 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({ @@ -299,11 +297,11 @@ 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) { @@ -472,11 +470,22 @@ reasonTxtShow: e.detail.visible }); }, + onCloseProtocol() { + this.setData({ + protocolShow: false, + }); + }, //鏌ョ湅涓洪�氳繃鍘熷洜 previewReason() { this.setData({ reasonTxtShow: true, + }); + }, + + onCloseReasonTxt() { + this.setData({ + reasonTxtShow: false, }); }, @@ -522,7 +531,7 @@ }) return } - if (that.data.teacherInfo.relevantCertificates.length == 0) { + if (that.data.imgPics.length == 0) { wx.showToast({ title: "璇蜂笂浼犲伐浣滆瘉锛�", icon: 'none', @@ -575,7 +584,8 @@ icon: 'none', duration: 1000, }) - that.newGetTeacherInfo() + that.getUserRole() + // that.newGetTeacherInfo() } }) } @@ -611,7 +621,8 @@ icon: 'none', duration: 1000, }) - that.newGetTeacherInfo() + // that.newGetTeacherInfo() + that.getUserRole() } }) }) @@ -630,13 +641,15 @@ * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 */ onPullDownRefresh() { + if (wx.getStorageSync(app.config.tokenKey)) { + this.getUserRole() + } }, /** * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� */ onReachBottom() { - }, /** diff --git a/packageDomain/pages/teacherCertification/index.json b/packageDomain/pages/teacherCertification/index.json index 965b59d..26f3469 100644 --- a/packageDomain/pages/teacherCertification/index.json +++ b/packageDomain/pages/teacherCertification/index.json @@ -5,6 +5,7 @@ "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", diff --git a/packageDomain/pages/teacherCertification/index.wxml b/packageDomain/pages/teacherCertification/index.wxml index da571aa..9c89ca8 100644 --- a/packageDomain/pages/teacherCertification/index.wxml +++ b/packageDomain/pages/teacherCertification/index.wxml @@ -1,109 +1,117 @@ <view class="container"> - <view class="tips"> 浠呴檺瀛︽牎鏈绋嬩换璇炬暀甯堢敵璇凤紱璇蜂笂浼犳湁鏁堝湪鑱屾暀甯堝伐浣滆瘉灏嗘湁鍔╀簬瀹℃牳銆� </view> - <view class="page-body"> - <view class="baseInfoBox"> - <view class="from-item"> - <view class="label"> 褰撳墠鐘舵�侊細 </view> - <view class="stateBox"> - <text class="wait" wx:if="{{teacherInfo.state == 'WaitAudit'}}">绛夊緟瀹℃牳</text> - <text class="yes" wx:if="{{teacherInfo.state == 'Normal'}}">宸茶璇�</text> - <text class="no" wx:if="{{teacherInfo.state == 'Reject'}}">宸查┏鍥�</text> - <text class="wait" wx:if="{{teacherInfo.state == ''}}">寰呰璇�</text> - <view class="reasonTxt" bindtap="previewReason" wx:if="{{teacherInfo.state == 'Reject'}}">鏌ョ湅鍘熷洜</view> - </view> - </view> - <view class="from-item"> - <view class="label"> 瀛︽牎锛� </view> - <view class="item-content"> - <t-input placeholder="璇疯緭鍏ュ鏍�" borderless value="{{teacherInfo.schoolName}}" disabled="{{!editState}}" bindchange="onSchoolNameInput" /> - </view> - </view> - <view class="from-item"> - <view class="label"> 鐪熷疄濮撳悕锛� </view> - <view class="item-content"> - <t-input placeholder="璇疯緭鍏ョ湡瀹炲鍚�" borderless value="{{teacherInfo.fullName}}" disabled="{{!editState}}" bindchange="onFullNameInput" /> - </view> - </view> - <view class="from-item"> - <view class="label"> 鑱岀О锛� </view> - <view class="item-content state" wx:if="{{editState}}"> - <t-cell arrow note="{{teachText}}" bind:click="onTeachPicker" /> - <t-picker visible="{{teachVisible}}" value="{{teacherInfo.positionalTitle}}" title="閫夋嫨鑱岀О" cancelBtn="鍙栨秷" confirmBtn="纭" bindchange="onPickerChange" bindcancel="onPickerCancel"> - <t-picker-item options="{{teachPosts}}" /> - </t-picker> - </view> - <view class="item-content" wx:if="{{!editState}}"> - <t-cell arrow note="{{teachText}}" /> - </view> - </view> - <view class="from-item"> - <view class="label"> 浠绘暀璇剧▼锛� </view> - <view class="item-content"> - <t-input placeholder="璇疯緭鍏ヤ换鏁欒绋�" borderless value="{{teacherInfo.courseName}}" bindchange="onCourseNameInput" disabled="{{!editState}}" /> - </view> - </view> - <view class="from-item"> - <view class="label"> 鎵嬫満鍙凤細 </view> - <view class="item-content"> - <t-input placeholder="杈撳叆鎵嬫満鍙风爜" borderless value="{{teacherInfo.phone}}" type="number" tips="{{phoneError ? '鎵嬫満鍙疯緭鍏ヤ笉姝g‘' : ''}}" bindchange="onPhoneInput" disabled="{{!editState}}" /> - </view> - </view> - <view class="from-item"> - <view class="label"> 搴ф満锛� </view> - <view class="item-content"> - <t-input placeholder="杈撳叆搴ф満鍙�" borderless value="{{teacherInfo.telphone}}" type="number" tips="{{telphoneError ? '搴ф満鍙疯緭鍏ヤ笉姝g‘' : ''}}" 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}}" /> - </view> - </view> - <view class="from-item"> - <view class="label"> 璇︾粏鍦板潃锛� </view> - <view class="item-content"> - <t-input placeholder="璇疯緭鍏ヨ缁嗗湴鍧�" borderless value="{{teacherInfo.detailedAddress}}" bindchange="onAddressInput" disabled="{{!editState}}" /> - </view> - </view> - </view> - <view class="fileInfoBox"> - <view class="from-item"> - <view class="label"> 鍦ㄨ亴鏁欏笀宸ヤ綔璇侊細 </view> - <view class="imageBox"> - <view class="weui-uploader"> - <view class='pics' wx:for="{{imgPics}}" wx:for-item="item" wx:key="*this"> - <image class='weui-uploader__img' src="{{item.url}}" data-index="{{index}}" mode="aspectFill" bindtap="previewImg"> - <icon type='cancel' class="delete-btn" data-index="{{index}}" catchtap="deleteImg"></icon> - </image> - </view> - <view class="tp_cont {{tj_ycang?'':'hide'}}" bindtap="chooseImg" wx:if="{{editState}}"> - <view class="tp_add">+</view> - </view> + <view class="content"> + <view class="tips"> 浠呴檺瀛︽牎鏈绋嬩换璇炬暀甯堢敵璇凤紱璇蜂笂浼犳湁鏁堝湪鑱屾暀甯堝伐浣滆瘉灏嗘湁鍔╀簬瀹℃牳銆� </view> + <view class="page-body"> + <view class="baseInfoBox"> + <view class="from-item"> + <view class="label"> 褰撳墠鐘舵�侊細 </view> + <view class="stateBox"> + <text class="wait" wx:if="{{teacherInfo.state == 'WaitAudit'}}">绛夊緟瀹℃牳</text> + <text class="yes" wx:if="{{teacherInfo.state == 'Normal'}}">宸茶璇�</text> + <text class="no" wx:if="{{teacherInfo.state == 'Reject'}}">宸查┏鍥�</text> + <text class="wait" wx:if="{{teacherInfo.state == ''}}">寰呰璇�</text> + <view class="reasonTxt" bindtap="previewReason" wx:if="{{teacherInfo.state == 'Reject'}}">鏌ョ湅鍘熷洜</view> </view> </view> - <view class="fileTip"> - 鏁欏姟澶勭洊绔犳枃浠躲�佹牎宸ュ崱鐨嗗彲 + <view class="from-item"> + <view class="label"> 瀛︽牎锛� </view> + <view class="item-content"> + <t-input placeholder="璇疯緭鍏ュ鏍�" borderless value="{{teacherInfo.schoolName}}" disabled="{{!editState}}" bindchange="onSchoolNameInput" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 鐪熷疄濮撳悕锛� </view> + <view class="item-content"> + <t-input placeholder="璇疯緭鍏ョ湡瀹炲鍚�" borderless value="{{teacherInfo.fullName}}" disabled="{{!editState}}" bindchange="onFullNameInput" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 鑱岀О锛� </view> + <view class="item-content state" wx:if="{{editState}}"> + <t-cell arrow note="{{teachText}}" bind:click="onTeachPicker" /> + <t-picker visible="{{teachVisible}}" value="{{teacherInfo.positionalTitle}}" title="閫夋嫨鑱岀О" cancelBtn="鍙栨秷" confirmBtn="纭" bindchange="onPickerChange" bindcancel="onPickerCancel"> + <t-picker-item options="{{teachPosts}}" /> + </t-picker> + </view> + <view class="item-content" wx:if="{{!editState}}"> + <t-cell arrow note="{{teachText}}" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 浠绘暀璇剧▼锛� </view> + <view class="item-content"> + <t-input placeholder="璇疯緭鍏ヤ换鏁欒绋�" borderless value="{{teacherInfo.courseName}}" bindchange="onCourseNameInput" disabled="{{!editState}}" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 鎵嬫満鍙凤細 </view> + <view class="item-content"> + <t-input placeholder="杈撳叆鎵嬫満鍙风爜" borderless value="{{teacherInfo.phone}}" type="number" tips="{{phoneError ? '鎵嬫満鍙疯緭鍏ヤ笉姝g‘' : ''}}" bindchange="onPhoneInput" disabled="{{!editState}}" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 搴ф満锛� </view> + <view class="item-content"> + <t-input placeholder="杈撳叆搴ф満鍙�" borderless value="{{teacherInfo.telphone}}" tips="{{telphoneError ? '搴ф満鍙疯緭鍏ヤ笉姝g‘' : ''}}" 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}}" tips="{{emailError ? '閭杈撳叆涓嶆纭�' : ''}}" bindchange="onEmailInput" disabled="{{!editState}}" /> + </view> + </view> + <view class="from-item"> + <view class="label"> 璇︾粏鍦板潃锛� </view> + <view class="item-content"> + <t-input placeholder="璇疯緭鍏ヨ缁嗗湴鍧�" borderless value="{{teacherInfo.detailedAddress}}" bindchange="onAddressInput" disabled="{{!editState}}" /> + </view> </view> </view> - </view> - <view class="protocolBox"> - <t-checkbox label="" icon="rectangle" checked="{{teacherInfo.agree}}" bind:change="onChange" disabled="{{!editState}}" /> - <text class="wait" bind:tap="viewContent">銆婃暀甯堣璇佹湇鍔℃潯娆俱��</text> - </view> - <view class="btn-area" wx:if="{{editState}}"> - <button class="submit" bindtap="submit">鎻愪氦</button> + <view class="fileInfoBox"> + <view class="from-item"> + <view class="label"> 鍦ㄨ亴鏁欏笀宸ヤ綔璇侊細 </view> + <view class="imageBox"> + <view class="weui-uploader"> + <view class='pics' wx:for="{{imgPics}}" wx:for-item="item" wx:key="*this"> + <image class='weui-uploader__img' src="{{item.url}}" data-index="{{index}}" mode="aspectFill" bindtap="previewImg"> + <icon type='cancel' class="delete-btn" data-index="{{index}}" catchtap="deleteImg"></icon> + </image> + </view> + <view class="tp_cont {{tj_ycang?'':'hide'}}" bindtap="chooseImg" wx:if="{{editState}}"> + <view class="tp_add">+</view> + </view> + </view> + </view> + <view class="fileTip"> + 鏁欏姟澶勭洊绔犳枃浠躲�佹牎宸ュ崱鐨嗗彲 + </view> + </view> + </view> + <view class="protocolBox"> + <t-checkbox label="" icon="rectangle" checked="{{teacherInfo.agree}}" bind:change="onChange" disabled="{{!editState}}" /> + <text class="wait" bind:tap="viewContent">銆婃暀甯堣璇佹湇鍔℃潯娆俱��</text> + </view> + <view class="btn-area" wx:if="{{editState}}"> + <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"> - <rich-text space="emsp" nodes="{{protocolTxt}}" class="content" /> + <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"> - {{reasonTxt}} + <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> diff --git a/packageDomain/pages/teacherCertification/index.wxss b/packageDomain/pages/teacherCertification/index.wxss index 52b7b8b..e509bb0 100644 --- a/packageDomain/pages/teacherCertification/index.wxss +++ b/packageDomain/pages/teacherCertification/index.wxss @@ -3,9 +3,14 @@ } .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 { @@ -154,25 +159,52 @@ 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 { diff --git a/packagePersonal/pages/activateProduct/index.wxml b/packagePersonal/pages/activateProduct/index.wxml index e75732a..6c78965 100644 --- a/packagePersonal/pages/activateProduct/index.wxml +++ b/packagePersonal/pages/activateProduct/index.wxml @@ -1,71 +1,73 @@ <view class="container"> - <view class="activation"> - <view class="title"> - <view class="line"></view> - <view>婵�娲荤爜</view> - </view> - <view class="contentBox"> - <view class="inputBox"> - <input class="weui-input" name="code" auto-focus="true" adjust-position="true" value="{{code}}" placeholder="璇疯緭鍏ユ縺娲荤爜" bindinput="bindTnputBlur" /> - <button class="button" bindtap="onActivation">婵�娲诲晢鍝�</button> + <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="姝e湪鍒锋柊..." class="wrapper" /> </view> </view> - </view> - <view class="page-content"> - <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="姝e湪鍒锋柊..." class="wrapper" /> + <view class="pageInfo"> + <view class="activation"> + <view class="title"> + <view class="line"></view> + <view>婵�娲荤爜</view> + </view> + <view class="contentBox"> + <view class="inputBox"> + <input class="weui-input" name="code" auto-focus="true" adjust-position="true" value="{{code}}" placeholder="璇疯緭鍏ユ縺娲荤爜" bindinput="bindTnputBlur" /> + <button class="button" bindtap="onActivation">婵�娲诲晢鍝�</button> </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>婵�娲荤爜锛歿{items.code}}</view> - <view>婵�娲绘椂闂达細{{items.createDate}}</view> - </view> - <view class="listBox"> - <scroll-view class="srcolbox" scroll-x scroll-with-animation='true'> - <view class="order-centent"> - <view class="bookBox" wx:for="{{items.productList}}" wx:for-item="itemes" wx:for-index="idx" wx:key="idx" bindtap="onOrderDetail" data-info="{{itemes}}"> - <view class="leftCon"> - <!-- 鑾峰彇鍥剧墖 --> - <image class="purchasedIcon" wx:if="{{itemes.icon}}" src="{{itemes.icon}}" mode="aspectFit" /> - <image class="purchasedIcon" wx:else src="/static/images/default-book-img.png" mode="aspectFit" /> - </view> - <!-- 鑾峰彇鍚嶇О --> - <view class="rightCon"> - <view class="productTitle">{{itemes.name}}</view> - <view class="typeBox"> - <text class="typeCon">{{ - itemes.orderSaleMethod.type == 'defaultSaleMethod' - ? '鐢靛瓙涔�' - : itemes.orderSaleMethod.type == 'createProductSaleMethod' && itemes.orderSaleMethod.cmsItemList == 0 ? '缁勫嵎' : '浜戝涔�' - }}</text> + </view> + <view class="page-content"> + <view class="title"> + <view class="line"></view> + <view>宸叉縺娲诲晢鍝�</view> + </view> + <view class="contentBox"> + + <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>婵�娲荤爜锛歿{items.code}}</view> + <view>婵�娲绘椂闂达細{{items.createDate}}</view> + </view> + <view class="listBox"> + <scroll-view class="srcolbox" scroll-x scroll-with-animation='true'> + <view class="order-centent"> + <view class="bookBox" wx:for="{{items.productList}}" wx:for-item="itemes" wx:for-index="idx" wx:key="idx" bindtap="onOrderDetail" data-info="{{itemes}}"> + <view class="leftCon"> + <!-- 鑾峰彇鍥剧墖 --> + <image class="purchasedIcon" wx:if="{{itemes.icon}}" src="{{itemes.icon}}" mode="aspectFit" /> + <image class="purchasedIcon" wx:else src="/static/images/default-book-img.png" mode="aspectFit" /> + </view> + <!-- 鑾峰彇鍚嶇О --> + <view class="rightCon"> + <view class="productTitle">{{itemes.name}}</view> + <view class="typeBox"> + <text class="typeCon">{{ + itemes.orderSaleMethod.type == 'defaultSaleMethod' + ? '鐢靛瓙涔�' + : itemes.orderSaleMethod.type == 'createProductSaleMethod' && itemes.orderSaleMethod.cmsItemList == 0 ? '缁勫嵎' : '浜戝涔�' + }}</text> + </view> </view> </view> </view> - </view> - </scroll-view> + </scroll-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> </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> - - </view> + </scroll-view> </view> \ No newline at end of file diff --git a/packagePersonal/pages/activateProduct/index.wxss b/packagePersonal/pages/activateProduct/index.wxss index 1dafe1f..029a009 100644 --- a/packagePersonal/pages/activateProduct/index.wxss +++ b/packagePersonal/pages/activateProduct/index.wxss @@ -1,7 +1,20 @@ 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 { @@ -12,10 +25,6 @@ .loading { padding: 20rpx; text-align: center; -} - -.container { - padding: 40rpx 24rpx; } .activation { diff --git a/packagePersonal/pages/downloads/index.wxss b/packagePersonal/pages/downloads/index.wxss index 6d8fe3a..f9ab05d 100644 --- a/packagePersonal/pages/downloads/index.wxss +++ b/packagePersonal/pages/downloads/index.wxss @@ -1,6 +1,16 @@ /* 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 { diff --git a/packagePersonal/pages/feedBack/index.wxss b/packagePersonal/pages/feedBack/index.wxss index db30755..96e6e47 100644 --- a/packagePersonal/pages/feedBack/index.wxss +++ b/packagePersonal/pages/feedBack/index.wxss @@ -1,7 +1,16 @@ 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 { @@ -166,7 +175,7 @@ .submitBox .box { display: flex; margin: 0 auto; - width: 160rpx; + width: 170rpx; align-items: center; text-align: center; font-size: 28rpx; diff --git a/packagePersonal/pages/myCollection/index.wxml b/packagePersonal/pages/myCollection/index.wxml index 8636000..7a0a3d1 100644 --- a/packagePersonal/pages/myCollection/index.wxml +++ b/packagePersonal/pages/myCollection/index.wxml @@ -1,29 +1,30 @@ <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}}"> - <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="姝e湪鍒锋柊..." class="wrapper" /> + <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 class="loading"> + <t-loading theme="circular" size="40rpx" text="姝e湪鍒锋柊..." class="wrapper" /> + </view> + </view> + <view class="list" wx:if="{{list.length > 0}}"> + <view wx:if="{{activeName == 'FavoriteBookCity'}}" class="listBox"> + <view class="content-item" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"> + <view class="icon" data-book="{{item}}" bindtap="goBookDetails"> + <t-image src="{{item.icon}}" mode="" class="img" /> + </view> + <view class="body-info" data-book="{{item}}" bindtap="goBookDetails"> + <view class="name">{{item.name}}</view> + <view class="author">{{item.author}}</view> + </view> + <view class="currentBtn" data-info="{{item}}" bindtap="setCoolect"> + <t-image src="/static/images/personal/quxiaoshoucang.png" mode="heightFix" class="img" /> </view> </view> - <view class="list" wx:if="{{list.length > 0}}"> - <view wx:if="{{activeName == 'FavoriteBookCity'}}" class="listBox"> - <view class="content-item" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"> - <view class="icon" data-book="{{item}}" bindtap="goBookDetails"> - <t-image src="{{item.icon}}" mode="" class="img" /> - </view> - <view class="body-info" data-book="{{item}}" bindtap="goBookDetails"> - <view class="name">{{item.name}}</view> - <view class="author">{{item.author}}</view> - </view> - <view class="currentBtn" data-info="{{item}}" bindtap="setCoolect"> - <t-image src="/static/images/personal/quxiaoshoucang.png" mode="heightFix" class="img" /> - </view> - </view> - </view> - <!-- <view wx:if="{{activeName == 'Favoriteclass'}}"> + </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"> @@ -32,19 +33,18 @@ </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> - </t-tab-panel> - </t-tabs> + <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> + <t-back-top theme="round" wx:if="{{isBackTop}}" text="椤堕儴" bind:to-top="onToTop"></t-back-top> </view> \ No newline at end of file diff --git a/packagePersonal/pages/myCollection/index.wxss b/packagePersonal/pages/myCollection/index.wxss index ed8b651..10d2847 100644 --- a/packagePersonal/pages/myCollection/index.wxss +++ b/packagePersonal/pages/myCollection/index.wxss @@ -1,5 +1,18 @@ 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; } @@ -8,8 +21,13 @@ } .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 { @@ -56,10 +74,6 @@ text-align: center; } -.content { - height: calc(100vh - env(safe-area-inset-bottom)); - box-sizing: border-box; -} .t-tabs__content { background: #fff !important; diff --git a/packagePersonal/pages/myMassage/index.wxss b/packagePersonal/pages/myMassage/index.wxss index 2848b48..593df59 100644 --- a/packagePersonal/pages/myMassage/index.wxss +++ b/packagePersonal/pages/myMassage/index.wxss @@ -1,3 +1,13 @@ +.container { + width: 100vw; + height: 100vh; +} + +.content { + height: calc(100vh - env(safe-area-inset-bottom)); + box-sizing: border-box; +} + .pageInfo { padding: 40rpx 20rpx; } @@ -30,16 +40,26 @@ .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; diff --git a/packagePersonal/pages/myOrder/index.wxml b/packagePersonal/pages/myOrder/index.wxml index c0ab04c..cee7ffd 100644 --- a/packagePersonal/pages/myOrder/index.wxml +++ b/packagePersonal/pages/myOrder/index.wxml @@ -1,73 +1,75 @@ -<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=""> - <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" bind:tap="navToSearchPage" /> - </t-search> - </view> - <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-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="姝e湪鍒锋柊..." class="wrapper" /> - </view> +<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=""> + <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" bind:tap="navToSearchPage" /> + </t-search> </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="order-cent"> - <text class="order-cent-one">璁㈠崟鍙�: {{items.orderNumber}}</text> - <text class="right {{items.colorName}}">{{items.CustomState}}</text> + <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-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="姝e湪鍒锋柊..." class="wrapper" /> </view> - <view class="order-centent"> - <scroll-view class="srcolbox" scroll-x scroll-with-animation='true'> - <view class="bookBox {{items.saleMethodLinks.length == 1 ? 'flex' : ''}}" wx:for="{{items.saleMethodLinks}}" wx:for-item="itemes" wx:for-index="idx" wx:key="idx" bindtap="onOrderDetail" data-info="{{itemes}}"> - <view class="leftCon {{items.saleMethodLinks.length == 1 ? 'fl' : ''}}"> - <!-- 鑾峰彇鍥剧墖 --> - <image class="purchasedIcon" wx:if="{{itemes.icon}}" src="{{itemes.icon}}" mode="aspectFit" /> - <image class="purchasedIcon" wx:else src="/static/images/default-book-img.png" mode="aspectFit" /> - </view> - <!-- 鑾峰彇鍚嶇О --> - <view class="rightCon"> - <view class="productTitle">{{itemes.name}}</view> - <view class="cmsName" wx:if="{{itemes.orderSaleMethod.type != 'defaultSaleMethod'}}">{{itemes.orderSaleMethod.cmsItemList[0].name}}</view> - <view class="{{items.saleMethodLinks.length == 1 ? 'top' : ''}}"> - <text class="typeBox">{{ - itemes.orderSaleMethod.type == 'defaultSaleMethod' - ? '鍥句功鏈嶅姟-鐢靛瓙涔�' - : itemes.orderSaleMethod.type == 'createProductSaleMethod' && itemes.orderSaleMethod.cmsItemList == 0 ? '鍥句功鏈嶅姟-缁勫嵎' : '鍥句功鏈嶅姟-浜戝涔�' - }}</text> + </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="order-cent"> + <text class="order-cent-one">璁㈠崟鍙�: {{items.orderNumber}}</text> + <text class="right {{items.colorName}}">{{items.CustomState}}</text> + </view> + <view class="order-centent"> + <scroll-view class="srcolbox" scroll-x scroll-with-animation='true'> + <view class="bookBox {{items.saleMethodLinks.length == 1 ? 'flex' : ''}}" wx:for="{{items.saleMethodLinks}}" wx:for-item="itemes" wx:for-index="idx" wx:key="idx" bindtap="onOrderDetail" data-info="{{itemes}}"> + <view class="leftCon {{items.saleMethodLinks.length == 1 ? 'fl' : ''}}"> + <!-- 鑾峰彇鍥剧墖 --> + <image class="purchasedIcon" wx:if="{{itemes.icon}}" src="{{itemes.icon}}" mode="aspectFit" /> + <image class="purchasedIcon" wx:else src="/static/images/default-book-img.png" mode="aspectFit" /> + </view> + <!-- 鑾峰彇鍚嶇О --> + <view class="rightCon"> + <view class="productTitle">{{itemes.name}}</view> + <view class="cmsName" wx:if="{{itemes.orderSaleMethod.type != 'defaultSaleMethod'}}">{{itemes.orderSaleMethod.cmsItemList[0].name}}</view> + <view class="{{items.saleMethodLinks.length == 1 ? 'top' : ''}}"> + <text class="typeBox">{{ + itemes.orderSaleMethod.type == 'defaultSaleMethod' + ? '鍥句功鏈嶅姟-鐢靛瓙涔�' + : itemes.orderSaleMethod.type == 'createProductSaleMethod' && itemes.orderSaleMethod.cmsItemList == 0 ? '鍥句功鏈嶅姟-缁勫嵎' : '鍥句功鏈嶅姟-浜戝涔�' + }}</text> + </view> </view> </view> + </scroll-view> + <view class="count"> + <text wx:if="{{items.saleMethodLinks.length > 1 }}">鍏眥{items.saleMethodLinks.length}}浠�</text> + <text wx:if="{{items.saleMethodLinks.length == 1 }}">锟{items.payPrice}}</text> </view> - </scroll-view> - <view class="count"> - <text wx:if="{{items.saleMethodLinks.length > 1 }}">鍏眥{items.saleMethodLinks.length}}浠�</text> - <text wx:if="{{items.saleMethodLinks.length == 1 }}">锟{items.payPrice}}</text> </view> - </view> - <view class="order-top"> - <text class="finishedDate" wx:if="{{items.state == 'Success'}}">{{items.finishedDate}}</text> - <text class="order-top-price" wx:if="{{items.state == 'WaitPay'}}">搴斾粯锛�<text class="">锟{items.payPrice}}</text></text> - <view class="button-example" wx:if="{{items.state == 'WaitPay'}}"> - <button class="button" bindtap="onCancel" data-order-num="{{items.orderNumber}}">鍙栨秷璁㈠崟</button> - <button class="unfollow" bindtap="onPayment" data-order-num="{{items.orderNumber}}">绔嬪嵆鏀粯</button> + <view class="order-top"> + <text class="finishedDate" wx:if="{{items.state == 'Success'}}">{{items.finishedDate}}</text> + <text class="order-top-price" wx:if="{{items.state == 'WaitPay'}}">搴斾粯锛�<text class="">锟{items.payPrice}}</text></text> + <view class="button-example" wx:if="{{items.state == 'WaitPay'}}"> + <button class="button" bindtap="onCancel" data-order-num="{{items.orderNumber}}">鍙栨秷璁㈠崟</button> + <button class="unfollow" bindtap="onPayment" data-order-num="{{items.orderNumber}}">绔嬪嵆鏀粯</button> + </view> + <view wx:if="{{items.state == 'Cancel'}}" class="button-bottem">鎬昏锛�<text class="price">锟{items.payPrice}}</text> </view> </view> - <view wx:if="{{items.state == 'Cancel'}}" class="button-bottem">鎬昏锛�<text class="price">锟{items.payPrice}}</text> </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 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> <t-back-top theme="round" wx:if="{{isBackTop}}" text="椤堕儴" bind:to-top="onToTop"></t-back-top> \ No newline at end of file diff --git a/packagePersonal/pages/myOrder/index.wxss b/packagePersonal/pages/myOrder/index.wxss index 6b750d8..4f8c7aa 100644 --- a/packagePersonal/pages/myOrder/index.wxss +++ b/packagePersonal/pages/myOrder/index.wxss @@ -1,6 +1,11 @@ -page { +.container { width: 100vw; - height: 100%; + height: 100vh; +} + +.content { + height: calc(100vh - env(safe-area-inset-bottom) - 200rpx); + box-sizing: border-box; } .page-header { @@ -54,7 +59,6 @@ .pageInfo { background: #F2F3F8; padding-top: 200rpx; - height: calc(100% - 200rpx) } .list { diff --git a/packagePersonal/pages/sampleBooks/index.js b/packagePersonal/pages/sampleBooks/index.js index 984fa38..0fd34e4 100644 --- a/packagePersonal/pages/sampleBooks/index.js +++ b/packagePersonal/pages/sampleBooks/index.js @@ -46,6 +46,23 @@ */ 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) { diff --git a/packagePersonal/pages/sampleBooks/index.wxml b/packagePersonal/pages/sampleBooks/index.wxml index 98927fa..2369db3 100644 --- a/packagePersonal/pages/sampleBooks/index.wxml +++ b/packagePersonal/pages/sampleBooks/index.wxml @@ -1,71 +1,73 @@ -<view class="page-header"> - <view class="tabOne"> - <t-tabs t-class="t-tabs" defaultValue="{{active}}" split="{{false}}" bind:change="tabClick"> - <t-tab-panel label="绾歌川鏍蜂功" value="0" /> - <t-tab-panel label="鐢靛瓙鏍蜂功" value="1" /> - </t-tabs> - </view> - <view class="tabTwo"> - <t-tabs t-class="custom-tabs" value="{{active1}}" split="{{false}}" bind:change="tabBookClick"> - <t-tab-panel wx:for="{{tabList}}" wx:for-index="index" wx:key="index" label="{{item.label}}" value="{{index}}" /> - </t-tabs> - </view> -</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="姝e湪鍒锋柊..." class="wrapper" /> - </view> +<view class="container"> + <view class="page-header"> + <view class="tabOne"> + <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> - <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="top"> - <view class="stateBox">鐘舵�侊細 - <text wx:if="{{items.state =='Normal'}}" class="success">宸查�氳繃</text> - <text wx:if="{{items.state =='WaitAudit'}}" class="wait">瀹℃牳涓�</text> - <text wx:if="{{items.state =='Reject'}}" class="reject">鏈�氳繃</text> - </view> - <view>鐢宠鏃ユ湡锛歿{items.updateDate ? items.updateDate : '-'}}</view> - </view> - <view class="down"> - <text wx:if="{{active == '1' && items.state =='Normal'}}">鏈夋晥鏈熻嚦锛歿{items.feedBack ? items.feedBack.endDate : '-'}}</text> - <text wx:if="{{items.state =='Reject'}}">鍘熷洜锛歿{items.feedBack.reason}}</text> - <view wx:if="{{active == '0' && items.state =='Normal'}}" class="mailInfo"> - <text class="mailNum">蹇�掑崟鍙凤細{{items.feedBack && items.feedBack.mailNum ? items.feedBack.mailNum : '-'}}</text> - <text>蹇�掑叕鍙革細{{items.feedBack.mailName ? items.feedBack.mailName : '-'}}</text> - </view> - </view> + <view class="tabTwo"> + <t-tabs t-class="custom-tabs" value="{{active1}}" split="{{false}}" bind:change="tabBookClick"> + <t-tab-panel wx:for="{{tabList}}" wx:for-index="index" wx:key="index" label="{{item.label}}" value="{{index}}" /> + </t-tabs> + </view> + </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="姝e湪鍒锋柊..." class="wrapper" /> </view> - <view class="listBox"> - <scroll-view class="srcolbox" scroll-x scroll-with-animation='true'> - <view class="order-centent"> - <view class="bookBox" wx:for="{{items.productList}}" wx:for-item="itemes" wx:for-index="idx" wx:key="idx" bindtap="onOrderDetail" data-info="{{itemes}}"> - <view class="leftCon"> - <!-- 鑾峰彇鍥剧墖 --> - <image class="purchasedIcon" wx:if="{{itemes.icon}}" src="{{itemes.icon}}" mode="aspectFit" /> - <image class="purchasedIcon" wx:else src="/static/images/default-book-img.png" mode="aspectFit" /> - </view> - <!-- 鑾峰彇鍚嶇О --> - <view class="rightCon"> - <view class="productTitle">{{itemes.title}}</view> - </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="top"> + <view class="stateBox">鐘舵�侊細 + <text wx:if="{{items.state =='Normal'}}" class="success">宸查�氳繃</text> + <text wx:if="{{items.state =='WaitAudit'}}" class="wait">瀹℃牳涓�</text> + <text wx:if="{{items.state =='Reject'}}" class="reject">鏈�氳繃</text> + </view> + <view>鐢宠鏃ユ湡锛歿{items.updateDate ? items.updateDate : '-'}}</view> + </view> + <view class="down"> + <text wx:if="{{active == '1' && items.state =='Normal'}}">鏈夋晥鏈熻嚦锛歿{items.feedBack ? items.feedBack.endDate : '-'}}</text> + <text wx:if="{{items.state =='Reject'}}">鍘熷洜锛歿{items.feedBack.reason}}</text> + <view wx:if="{{active == '0' && items.state =='Normal'}}" class="mailInfo"> + <text class="mailNum">蹇�掑崟鍙凤細{{items.feedBack && items.feedBack.mailNum ? items.feedBack.mailNum : '-'}}</text> + <text>蹇�掑叕鍙革細{{items.feedBack.mailName ? items.feedBack.mailName : '-'}}</text> </view> </view> - </scroll-view> + </view> + <view class="listBox"> + <scroll-view class="srcolbox" scroll-x scroll-with-animation='true'> + <view class="order-centent"> + <view class="bookBox" wx:for="{{items.productList}}" wx:for-item="itemes" wx:for-index="idx" wx:key="idx" bindtap="onOrderDetail" data-info="{{itemes}}"> + <view class="leftCon"> + <!-- 鑾峰彇鍥剧墖 --> + <image class="purchasedIcon" wx:if="{{itemes.icon}}" src="{{itemes.icon}}" mode="aspectFit" /> + <image class="purchasedIcon" wx:else src="/static/images/default-book-img.png" mode="aspectFit" /> + </view> + <!-- 鑾峰彇鍚嶇О --> + <view class="rightCon"> + <view class="productTitle">{{itemes.title}}</view> + </view> + </view> + </view> + </scroll-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 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> <t-back-top theme="round" wx:if="{{isBackTop}}" text="椤堕儴" bind:to-top="onToTop"></t-back-top> \ No newline at end of file diff --git a/packagePersonal/pages/sampleBooks/index.wxss b/packagePersonal/pages/sampleBooks/index.wxss index 49d188b..8e3d30a 100644 --- a/packagePersonal/pages/sampleBooks/index.wxss +++ b/packagePersonal/pages/sampleBooks/index.wxss @@ -1,6 +1,15 @@ /* 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; } @@ -93,7 +102,7 @@ } .pageInfo { - margin-top: 230rpx; + padding-top: 230rpx; } .content-item { diff --git a/pages/home/home.js b/pages/home/home.js index 298b193..60f3e8a 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -11,6 +11,7 @@ backUrl: null, userInfo: {}, tabList: [], //鐩綍 + current: 1,//杞挱鍥惧弬鏁� autoplay: true, //杞挱鍥惧弬鏁� duration: '500',//杞挱鍥惧弬鏁� interval: 5000,//杞挱鍥惧弬鏁� @@ -28,12 +29,13 @@ rankingList: [],//鎺掕姒� shoppingCartGetId: [], baseRefresh: { - value: true + value: false } }, onShow() { this.loadHomePage(); this.getBannerList() + }, onLoad(options) { @@ -63,7 +65,7 @@ }, onPullDownRefresh() { this.setData({ - isWhite: true + 'baseRefresh.value': true, }) this.init(); }, @@ -77,10 +79,7 @@ setTimeout(() => { this.setData({ - baseRefresh: { - value: false, - }, - isWhite: false, + 'baseRefresh.value': false, }) }, 500); }, diff --git a/pages/home/home.wxml b/pages/home/home.wxml index ddd3ef8..ff43634 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -1,206 +1,206 @@ <view class="container"> -<view class="background {{ isWhite ? 'white':''}}" style="padding-top: {{barHeight}}px"> - <text class="text">浜笀E璇�</text> -</view> -<t-pull-down-refresh value="{{baseRefresh.value}}" loadingTexts="{{['涓嬫媺鍒锋柊', '鏉炬墜鍒锋柊', '姝e湪鍒锋柊', '鍒锋柊瀹屾垚']}}" 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> - <view class="search"> - <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" leftIcon="" bind:submit="onRetrievalPage" model:value="{{searchVal}}"> - <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" bind:tap="navToSearchPage" /> - </t-search> - </view> - <view class="swiper-wrap"> - <t-swiper wx:if="{{bannerList.length > 0}}" list="{{bannerList}}" autoplay="{{autoplay}}" duration="{{duration}}" interval="{{interval}}" navigation="{{navigation}}" bind:click="navToActivityDetail" /> - </view> -</view> -<view class="home-page-menu"> - <t-grid class="t-grid-block" theme="card" border="{{border}}" column="{{5}}"> - <t-grid-item wx:for="{{tabList}}" wx:for-index="index" wx:key="index" text="{{item.text}}" image="{{item.icon}}" data-info="{{item}}" bindtap="toPages" /> - </t-grid> -</view> -<view class="home-page-container"> - <view class="home-page-list"> - <view class="tabCardPublic iconOne"> - <view class="icon"> - <image src="/static/images/home/zhuantitaolun2.png" mode="aspectFit" class="iconImage" /> + <t-pull-down-refresh value="{{baseRefresh.value}}" loadingTexts="{{['涓嬫媺鍒锋柊', '鏉炬墜鍒锋柊', '姝e湪鍒锋柊', '鍒锋柊瀹屾垚']}}" bind:refresh="onPullDownRefresh" bind:scroll="onScroll"> + <view class="background {{ isWhite ? 'white':''}}" style="padding-top: {{barHeight}}px"> + <text class="text">浜笀E璇�</text> + </view> + <view class="home-page-header"> + <view class="bg"> + <image src="/static/images/home/home-bg.png" mode="heightFix" class="image" /> </view> - <view data-info="{{'zhuantitaolun'}}" bindtap="onMoreGuide" class="flex"> - <text class="more">鏇村</text> - <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> + <view class="search"> + <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" leftIcon="" bind:submit="onRetrievalPage" model:value="{{searchVal}}"> + <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" bind:tap="navToSearchPage" /> + </t-search> + </view> + <view class="swiper-wrap"> + <t-swiper wx:if="{{bannerList.length > 0}}" list="{{bannerList}}" autoplay="{{autoplay}}" duration="{{duration}}" interval="{{interval}}" navigation="{{navigation}}" bind:click="navToActivityDetail" /> </view> </view> - <view class="listBox"> - <view wx:for="{{specialSubjectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox"> - <view class="listItem" bindtap="goSubjectDetail" data-book="{{item}}"> - <view class="specialSubject-img"> - <image src="{{item.icon}}" mode="aspectFill" class="img" /> + <view class="home-page-menu"> + <t-grid class="t-grid-block" theme="card" border="{{border}}" column="{{5}}"> + <t-grid-item wx:for="{{tabList}}" wx:for-index="index" wx:key="index" text="{{item.text}}" image="{{item.icon}}" data-info="{{item}}" bindtap="toPages" /> + </t-grid> + </view> + <view class="home-page-container"> + <view class="home-page-list"> + <view class="tabCardPublic iconOne"> + <view class="icon"> + <image src="/static/images/home/zhuantitaolun2.png" mode="aspectFit" class="iconImage" /> </view> - <view class="body-info"> - <view class="name">{{item.name}}</view> - <view class="time" wx:if="{{item.liveTime}}">鐩存挱鏃堕棿锛歿{item.liveTime}}</view> - <view class="time" wx:if="{{item.startTime}}">寮�鎾椂闂达細{{ item.startTime }}</view> - <view class="time" wx:if="{{!item.liveTime && !item.startTime}}">寮�鎾椂闂达細<text class="grey">寰呭畾</text></view> - <view class="flex jc-sb"> - <text class="author">{{item.lecturer}} {{item.position}}</text> - <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> - <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> - </view> + <view data-info="{{'zhuantitaolun'}}" bindtap="onMoreGuide" class="flex"> + <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> </view> </view> - </view> - </view> - <view class="tabCardPublic iconTwo"> - <view class="icon"> - <image src="/static/images/home/jingxuankecheng2.png" mode="aspectFit" class="iconImage" /> - </view> - <view data-info="{{'jingxuankecheng'}}" bindtap="onMoreGuide" class="flex"> - <text class="more">鏇村</text> - <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> - </view> - </view> - <view class="home-page-tabs"> - <t-tabs t-class="t-tabs" split="{{false}}" defaultValue="{{activeItem}}" bind:change="tabChangeHandle"> - <t-tab-panel wx:for="{{courseTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" /> - </t-tabs> - </view> - <view class="listBox1"> - <view wx:if="{{courseList.length>0}}"> - <view wx:for="{{courseList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox"> - <view class="listItem flex" data-book="{{item}}" bindtap="goCourseDetail"> - <view class="specialSubject-img"> - <image src="{{item.icon}}" mode="aspectFill" class="img" /> - </view> - <view class="body-info"> - <view class="name">{{item.name}}</view> - <view class="flex jc-sb"> - <text class="author">{{item.courseLeader}}</text> - <text class="classHours">{{item.classHours}}璇炬椂</text> + <view class="listBox"> + <view wx:for="{{specialSubjectList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox"> + <view class="listItem" bindtap="goSubjectDetail" data-book="{{item}}"> + <view class="specialSubject-img"> + <image src="{{item.icon}}" mode="aspectFill" class="img" /> </view> - <view class="priceBox flex jc-sb"> - <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> - <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> - <image src="/static/images/home/home-cart.png" mode="aspectFit" class="addCartImg" bind:tap="addCart" data-info="{{item}}" /> + <view class="body-info"> + <view class="name">{{item.name}}</view> + <view class="time" wx:if="{{item.liveTime}}">鐩存挱鏃堕棿锛歿{item.liveTime}}</view> + <view class="time" wx:if="{{item.startTime}}">寮�鎾椂闂达細{{ item.startTime }}</view> + <view class="time" wx:if="{{!item.liveTime && !item.startTime}}">寮�鎾椂闂达細<text class="grey">寰呭畾</text></view> + <view class="flex jc-sb"> + <text class="author">{{item.lecturer}} {{item.position}}</text> + <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> + <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> + </view> </view> </view> </view> </view> - </view> - <view class="empyt" wx:else> - <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> - </view> - </view> - <view class="tabCardPublic iconTwo"> - <view class="icon"> - <image src="/static/images/home/tushufuwu2.png" mode="aspectFit" class="iconImage" /> - </view> - <view data-info="{{'tushufuwu'}}" bindtap="onMoreGuide" class="flex"> - <text class="more">鏇村</text> - <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> - </view> - </view> - <view class="home-page-tabs"> - <t-tabs t-class="t-tabs" split="{{false}}" position="{{'home'}}" defaultValue="{{activeItem1}}" bind:change="tabBookClick"> - <t-tab-panel wx:for="{{bookTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" /> - </t-tabs> - </view> - <view class="listBox2"> - <view wx:if="{{booksList.length > 0}}" class="flex"> - <view wx:for="{{booksList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox"> - <view class="listItem" bind:tap="goDetail" data-book="{{item}}"> - <view class="specialSubject-img"> - <image src="{{item.icon}}" mode="aspectFit" class="img" /> - </view> - <view class="body-info"> - <view class="name">{{item.name}}</view> - <view class="author">{{item.author}}</view> - </view> + <view class="tabCardPublic iconTwo"> + <view class="icon"> + <image src="/static/images/home/jingxuankecheng2.png" mode="aspectFit" class="iconImage" /> + </view> + <view data-info="{{'jingxuankecheng'}}" bindtap="onMoreGuide" class="flex"> + <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> </view> </view> - </view> - <view class="empyt" wx:else> - <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> - </view> - </view> - <view class="tabCardPublic iconTwo"> - <view class="icon"> - <image src="/static/images/home/shuziyuedu2.png" mode="aspectFit" class="iconImage" /> - </view> - <view data-info="{{'shuziyuedu'}}" bindtap="onMoreGuide" class="flex"> - <text class="more">鏇村</text> - <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> - </view> - </view> - <view class="listBox2 flex"> - <view wx:for="{{readBookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox"> - <view class="listItem" bind:tap="goReadBookDetail" data-book="{{item}}"> - <view class="specialSubject-img"> - <image src="{{item.icon}}" mode="aspectFit" class="img" /> + <view class="home-page-tabs"> + <t-tabs t-class="t-tabs" split="{{false}}" defaultValue="{{activeItem}}" bind:change="tabChangeHandle"> + <t-tab-panel wx:for="{{courseTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" /> + </t-tabs> + </view> + <view class="listBox1"> + <view wx:if="{{courseList.length>0}}"> + <view wx:for="{{courseList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox"> + <view class="listItem flex" data-book="{{item}}" bindtap="goCourseDetail"> + <view class="specialSubject-img"> + <image src="{{item.icon}}" mode="aspectFill" class="img" /> + </view> + <view class="body-info"> + <view class="name">{{item.name}}</view> + <view class="flex jc-sb"> + <text class="author">{{item.courseLeader}}</text> + <text class="classHours">{{item.classHours}}璇炬椂</text> + </view> + <view class="priceBox flex jc-sb"> + <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> + <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> + <image src="/static/images/home/home-cart.png" mode="aspectFit" class="addCartImg" bind:tap="addCart" data-info="{{item}}" /> + </view> + </view> + </view> + </view> </view> - <view class="body-info"> - <view class="name">{{item.name}}</view> - <view class="author">{{item.author}}</view> + <view class="empyt" wx:else> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> </view> </view> - </view> - </view> - <view class="tabCardPublic iconTwo"> - <view class="icon"> - <image src="/static/images/home/shuzijiaocai2.png" mode="aspectFit" class="iconImage" /> - </view> - <view data-info="{{'shuzijiaocai'}}" bindtap="onMoreGuide" class="flex"> - <text class="more">鏇村</text> - <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> - </view> - </view> - <view class="listBox3"> - <view wx:if="{{textbookList.length > 0}}"> - <view wx:for="{{textbookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="textbooksItemBox"> - <view class="listItem flex" bind:tap="goTextBookDetail" data-book="{{item}}"> - <view class="specialSubject-img"> - <image src="{{item.icon}}" mode="aspectFit" class="img" /> + <view class="tabCardPublic iconTwo"> + <view class="icon"> + <image src="/static/images/home/tushufuwu2.png" mode="aspectFit" class="iconImage" /> + </view> + <view data-info="{{'tushufuwu'}}" bindtap="onMoreGuide" class="flex"> + <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> + </view> + </view> + <view class="home-page-tabs"> + <t-tabs t-class="t-tabs" split="{{false}}" position="{{'home'}}" defaultValue="{{activeItem1}}" bind:change="tabBookClick"> + <t-tab-panel wx:for="{{bookTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" /> + </t-tabs> + </view> + <view class="listBox2"> + <view wx:if="{{booksList.length > 0}}" class="flex"> + <view wx:for="{{booksList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox"> + <view class="listItem" bind:tap="goDetail" data-book="{{item}}"> + <view class="specialSubject-img"> + <image src="{{item.icon}}" mode="aspectFit" class="img" /> + </view> + <view class="body-info"> + <view class="name">{{item.name}}</view> + <view class="author">{{item.author}}</view> + </view> + </view> </view> - <view class="body-info"> - <view class="name">{{item.name}}</view> - <view class="introduction">{{item.description}}</view> - <view class="author">{{item.author}}</view> - <view class="priceBox flex jc-sb"> - <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> - <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> - <image src="/static/images/home/home-cart.png" mode="aspectFit" class="addCartImg" bind:tap="addCart" data-info="{{item}}" /> + </view> + <view class="empyt" wx:else> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> + </view> + </view> + <view class="tabCardPublic iconTwo"> + <view class="icon"> + <image src="/static/images/home/shuziyuedu2.png" mode="aspectFit" class="iconImage" /> + </view> + <view data-info="{{'shuziyuedu'}}" bindtap="onMoreGuide" class="flex"> + <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> + </view> + </view> + <view class="listBox2 flex"> + <view wx:for="{{readBookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox"> + <view class="listItem" bind:tap="goReadBookDetail" data-book="{{item}}"> + <view class="specialSubject-img"> + <image src="{{item.icon}}" mode="aspectFit" class="img" /> + </view> + <view class="body-info"> + <view class="name">{{item.name}}</view> + <view class="author">{{item.author}}</view> </view> </view> </view> </view> - </view> - <view class="empyt" wx:else> - <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> - </view> - </view> - <view class="tabCardPublic"> - <view class="icon"> - <image src="/static/images/home/paihangbang2.png" mode="" class="iconImage" /> - </view> - </view> - <view class="rankingList"> - <scroll-view class="srcolbox" scroll-x scroll-with-animation='true'> - <view wx:for="{{rankingList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox"> - <view class="listItem" bind:tap="goDetail" data-book="{{item}}"> - <view class="specialSubject-img"> - <image src="{{item.icon}}" mode="aspectFit" class="img" wx:if="{{item.icon}}" /> - <image src="/static/images/default-book-img.png" mode="aspectFit" class="img" wx:else /> - </view> - <view class="body-info"> - <view class="name">{{item.name}}</view> - <!-- <view class="author">{{item.author}}</view> --> - </view> + <view class="tabCardPublic iconTwo"> + <view class="icon"> + <image src="/static/images/home/shuzijiaocai2.png" mode="aspectFit" class="iconImage" /> + </view> + <view data-info="{{'shuzijiaocai'}}" bindtap="onMoreGuide" class="flex"> + <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> </view> </view> - </scroll-view> + <view class="listBox3"> + <view wx:if="{{textbookList.length > 0}}"> + <view wx:for="{{textbookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="textbooksItemBox"> + <view class="listItem flex" bind:tap="goTextBookDetail" data-book="{{item}}"> + <view class="specialSubject-img"> + <image src="{{item.icon}}" mode="aspectFit" class="img" /> + </view> + <view class="body-info"> + <view class="name">{{item.name}}</view> + <view class="introduction">{{item.description}}</view> + <view class="author">{{item.author}}</view> + <view class="priceBox flex jc-sb"> + <text class="price" wx:if="{{item.price == 0}}">鍏嶈垂</text> + <text class="price" wx:if="{{item.price !== 0}}">锟{item.price}}</text> + <image src="/static/images/home/home-cart.png" mode="aspectFit" class="addCartImg" bind:tap="addCart" data-info="{{item}}" /> + </view> + </view> + </view> + </view> + </view> + <view class="empyt" wx:else> + <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> + </view> + </view> + <view class="tabCardPublic"> + <view class="icon"> + <image src="/static/images/home/paihangbang2.png" mode="" class="iconImage" /> + </view> + </view> + <view class="rankingList"> + <scroll-view class="srcolbox" scroll-x scroll-with-animation='true'> + <view wx:for="{{rankingList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox"> + <view class="listItem" bind:tap="goDetail" data-book="{{item}}"> + <view class="specialSubject-img"> + <image src="{{item.icon}}" mode="aspectFit" class="img" wx:if="{{item.icon}}" /> + <image src="/static/images/default-book-img.png" mode="aspectFit" class="img" wx:else /> + </view> + <view class="body-info"> + <view class="name">{{item.name}}</view> + <!-- <view class="author">{{item.author}}</view> --> + </view> + </view> + </view> + </scroll-view> + </view> + </view> </view> - </view> -</view> -</t-pull-down-refresh> + </t-pull-down-refresh> </view> \ No newline at end of file diff --git a/pages/personalCenter/components/user-center-card/index.wxml b/pages/personalCenter/components/user-center-card/index.wxml index 04cd0a2..19e9ae9 100644 --- a/pages/personalCenter/components/user-center-card/index.wxml +++ b/pages/personalCenter/components/user-center-card/index.wxml @@ -20,7 +20,8 @@ <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> @@ -39,7 +40,8 @@ <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"> diff --git a/pages/personalCenter/index.js b/pages/personalCenter/index.js index 486252c..ff34677 100644 --- a/pages/personalCenter/index.js +++ b/pages/personalCenter/index.js @@ -117,6 +117,9 @@ moreMenu, moreMenu1, visible: false, + baseRefresh: { + value: false + } }, /** * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 @@ -142,7 +145,6 @@ url: "/pages/testLogin/index", }); } - }, onShow() { if (typeof this.getTabBar === 'function' && this.getTabBar()) { @@ -155,6 +157,9 @@ * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 */ onPullDownRefresh() { + this.setData({ + 'baseRefresh.value': true, + }) this.getUserInfo() }, /** @@ -202,9 +207,10 @@ 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, @@ -212,9 +218,10 @@ } 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({ @@ -222,6 +229,11 @@ }) this.getTeacherInfo() wx.setStorageSync(app.config.userInfoKey, JSON.stringify(this.data.userInfo)); + setTimeout(() => { + this.setData({ + 'baseRefresh.value': false, + }) + }, 500); } }); }, @@ -323,7 +335,7 @@ } }, - onPageScroll(e) { + onScroll(e) { this.setData({ isWhite: e.scrollTop > 20 ? true : false }) diff --git a/pages/personalCenter/index.json b/pages/personalCenter/index.json index 98d959b..4e2f668 100644 --- a/pages/personalCenter/index.json +++ b/pages/personalCenter/index.json @@ -4,7 +4,8 @@ "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 } \ No newline at end of file diff --git a/pages/personalCenter/index.wxml b/pages/personalCenter/index.wxml index 990b8f3..50cd24b 100644 --- a/pages/personalCenter/index.wxml +++ b/pages/personalCenter/index.wxml @@ -1,87 +1,90 @@ -<view style="width: 100%; height: {{barHeight}}px;"></view> -<view class="background {{ isWhite ? 'white':''}}" style="padding-top: {{barHeight}}px"> - <text class="text">涓汉涓績</text> -</view> -<view class="home-page"> - <view class="bg"> - <image src="/static/images/personal/my-bg.png" mode="heightFix" class="image" /> - </view> - <t-user-center-card userInfo="{{userInfo}}" isPhoneHide="{{true}}" name-class="custom-name-class" phone-class="custom-phone-class" avatar-class="customer-avatar-class" currAuthStep="{{currAuthStep}}" bind:gotoUserEditPage="gotoUserEditPage" bind:editUserType="editUserType" /> - <view class="content-wrapper"> - <view class="topBox"> - <view class="teacherBox"> - <view> - <view class="wait" wx:if="{{teacherState.state == 'WaitAudit'}}">绛夊緟瀹℃牳</view> - <view class="yes" wx:if="{{teacherState.state == 'Normal'}}">宸茶璇�</view> - <view class="no" wx:if="{{teacherState.state == 'Reject'}}">宸查┏鍥�</view> - <view class="wait" wx:if="{{teacherState.state == ''}}">寰呰璇�</view> - <view class="title"><text>鏁欏笀璁よ瘉</text> - <text class="change-info" wx:if="{{teacherState.state == ''}}" bindtap="toCertification">璁よ瘉</text> - <text class="change-info" wx:if="{{teacherState.state == 'Normal' || teacherState.state == 'Reject'}}" bindtap="toCertification">淇敼</text> - </view> - </view> - <view class="line"></view> - <view> - <view>{{integral}}</view> - <view class="title">绉垎</view> - </view> - </view> +<view> + <t-pull-down-refresh value="{{baseRefresh.value}}" loadingTexts="{{['涓嬫媺鍒锋柊', '鏉炬墜鍒锋柊', '姝e湪鍒锋柊', '鍒锋柊瀹屾垚']}}" 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> - <view class="domainBox"> - <view class="title"> - <text>甯哥敤鍔熻兘</text> + <view class="home-page"> + <view class="bg"> + <image src="/static/images/personal/my-bg.png" mode="heightFix" class="image" /> </view> - <view class="domainList"> - <view wx:for="{{menuData}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem"> - <view class="icon"> - <image src="{{item.icon}}" mode="aspectFit" class="img" /> + <t-user-center-card userInfo="{{userInfo}}" isPhoneHide="{{true}}" name-class="custom-name-class" phone-class="custom-phone-class" avatar-class="customer-avatar-class" currAuthStep="{{currAuthStep}}" bind:gotoUserEditPage="gotoUserEditPage" bind:editUserType="editUserType" /> + <view class="content-wrapper"> + <view class="topBox"> + <view class="teacherBox"> + <view> + <view class="wait" wx:if="{{teacherState.state == 'WaitAudit'}}">绛夊緟瀹℃牳</view> + <view class="yes" wx:if="{{teacherState.state == 'Normal'}}">宸茶璇�</view> + <view class="no" wx:if="{{teacherState.state == 'Reject'}}">宸查┏鍥�</view> + <view class="wait" wx:if="{{teacherState.state == ''}}">寰呰璇�</view> + <view class="title"><text>鏁欏笀璁よ瘉</text> + <text class="change-info" wx:if="{{teacherState.state == ''}}" bindtap="toCertification">璁よ瘉</text> + <text class="change-info" wx:if="{{teacherState.state == 'Normal' || teacherState.state == 'Reject'}}" bindtap="toCertification">淇敼</text> + </view> + </view> + <view class="line"></view> + <view> + <view>{{integral}}</view> + <view class="title">绉垎</view> + </view> </view> - <view class="label"> - <text>{{item.title}}</text> + </view> + <view class="domainBox"> + <view class="title"> + <text>甯哥敤鍔熻兘</text> + </view> + <view class="domainList"> + <view wx:for="{{menuData}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem"> + <view class="icon"> + <image src="{{item.icon}}" mode="aspectFit" class="img" /> + </view> + <view class="label"> + <text>{{item.title}}</text> + </view> + </view> + </view> + </view> + <view class="domainBox"> + <view class="title"> + <text>鏇村鍔熻兘</text> + </view> + <view class="domainList1"> + <view wx:for="{{moreMenu}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem"> + <view class="icon"> + <image src="{{item.icon}}" mode="aspectFit" class="img" /> + </view> + <view class="label"> + <text>{{item.title}}</text> + </view> + </view> + </view> + <view class="domainList2"> + <view wx:for="{{moreMenu1}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem"> + <view class="icon"> + <image src="{{item.icon}}" mode="aspectFit" class="img" /> + </view> + <view class="label"> + <text>{{item.title}}</text> + </view> + </view> </view> </view> </view> + <t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="bottom"> + <view class="block"> + <view class="header"> + <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> + <view class="footer"> + <button class="submit" bindtap="submit">纭畾</button> + </view> + </view> + </t-popup> </view> - <view class="domainBox"> - <view class="title"> - <text>鏇村鍔熻兘</text> - </view> - <view class="domainList1"> - <view wx:for="{{moreMenu}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem"> - <view class="icon"> - <image src="{{item.icon}}" mode="aspectFit" class="img" /> - </view> - <view class="label"> - <text>{{item.title}}</text> - </view> - </view> - </view> - <view class="domainList2"> - <view wx:for="{{moreMenu1}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toPages" data-info="{{item}}" class="listItem"> - <view class="icon"> - <image src="{{item.icon}}" mode="aspectFit" class="img" /> - </view> - <view class="label"> - <text>{{item.title}}</text> - </view> - </view> - </view> - </view> - </view> - <t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="bottom"> - <view class="block"> - <view class="header"> - <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> - <view class="footer"> - <button class="submit" bindtap="submit">纭畾</button> - </view> - </view> - </t-popup> + </t-pull-down-refresh> </view> \ No newline at end of file diff --git a/pages/student/index.js b/pages/student/index.js index 6911ad5..621df7c 100644 --- a/pages/student/index.js +++ b/pages/student/index.js @@ -1,18 +1,36 @@ -// 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); }, /** @@ -33,34 +51,123 @@ } }, - /** - * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 - */ - 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); }, - /** * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� */ diff --git a/pages/student/index.json b/pages/student/index.json index 8835af0..8f196ac 100644 --- a/pages/student/index.json +++ b/pages/student/index.json @@ -1,3 +1,11 @@ { - "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" + } } \ No newline at end of file diff --git a/pages/student/index.wxml b/pages/student/index.wxml index 0c697e8..96d6462 100644 --- a/pages/student/index.wxml +++ b/pages/student/index.wxml @@ -1,2 +1,63 @@ -<!--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="姝e湪鍒锋柊..." 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> \ No newline at end of file diff --git a/pages/student/index.wxss b/pages/student/index.wxss index f32601b..8477b25 100644 --- a/pages/student/index.wxss +++ b/pages/student/index.wxss @@ -1 +1,153 @@ -/* pages/student/index.wxss */ \ No newline at end of file +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; +} \ No newline at end of file diff --git a/static/images/home/yangshuForm1.png b/static/images/home/yangshuForm1.png new file mode 100644 index 0000000..304dfcf --- /dev/null +++ b/static/images/home/yangshuForm1.png Binary files differ -- Gitblit v1.9.1