| | |
| | | wx.navigateTo({ |
| | | url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parentProductLinkPath}&parentName=${parentName}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}&formPath=${this.properties.tab}&applyState=${this.properties.applyState}&deadline=${this.properties.deadline}`, |
| | | }); |
| | | <<<<<<< Updated upstream |
| | | ======= |
| | | |
| | | // debugger |
| | | >>>>>>> Stashed changes |
| | | if (item.selectType == "pdf" || item.selectType == "document") { |
| | | const fileLink = item.file ? item.file : item.freeFile |
| | | console.log(fileLink); |
| | |
| | | fileLink + |
| | | "&fileName=" + |
| | | item.name + |
| | | <<<<<<< Updated upstream |
| | | "&fileType=pdf" + |
| | | "&bookBuy=true" |
| | | ======= |
| | | "&fileType=pdf" + "&bookBuy=true" |
| | | >>>>>>> Stashed changes |
| | | }); |
| | | } |
| | | // if (item.selectType == "document") { |
| | |
| | | const smBook = list.find(item => item.content[0].id == this.data.bookDetail.id) |
| | | console.log('已申请', smBook); |
| | | if (smBook && smBook.state == 'Normal') { |
| | | const flag = new Date(smBook.feedBack.endDate + '23:59:59').getTime() > new Date().getTime() |
| | | const flag = new Date(smBook.feedBack.endDate + ' 23:59:59').getTime() > new Date().getTime() |
| | | if (flag) { |
| | | this.setData({ |
| | | applicationState: 'Normal' |
| | |
| | | return false; |
| | | } else if (isApply.state == 'Normal') { |
| | | console.log(isApply.state, "isApply.state") |
| | | const flag = new Date(isApply.feedBack.endDate + '23:59:59').getTime() > new Date().getTime() |
| | | console.log(isApply.feedBack.endDate, new Date() |
| | | 'ooo') |
| | | const flag = new Date(isApply.feedBack.endDate + ' 23:59:59').getTime() > new Date().getTime() |
| | | if (flag) { |
| | | wx.showToast({ |
| | | title: "该书已申请!", |
| | |
| | | </view> |
| | | <view class="btn-text">纸质样书申请</view> |
| | | </view> |
| | | <view class="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}" bind:tap="goRead" wx:if="{{!bookBuy}}"> |
| | | <view class="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}" bind:tap="goRead" wx:if="{{!bookBuy || applicationState == 'overdue'}}"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/shidu.png"></t-image> |
| | | </view> |
| | |
| | | <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}">加入购物车</view> |
| | | <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}">立即购买</view> |
| | | <view class="buy receiveColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price == '0.00' && bookDetail.isSell == '1'}}">免费领取</view> |
| | | <view class="buy read" bind:tap="goRead" wx:if="{{bookBuy}}">立即查看</view> |
| | | <view class="buy read" bind:tap="goRead" wx:if="{{bookBuy || applicationState == 'Normal'}}">立即查看</view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey), |
| | | titleName: items.name |
| | | }) |
| | | console.log(this.data.showData, 11) |
| | | } else { |
| | | this.setData({ |
| | | showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile, |
| | |
| | | }) |
| | | if (item.selectType == "video" || item.learnSelectType === "video") { |
| | | if (this.data.formPath === "jsek_cloudLearning") { |
| | | |
| | | let file |
| | | item.protectedFile || item.file ? file = item.protectedFile || item.file : file = item.freeFile |
| | | this.setData({ |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | if (options.scene) { |
| | | this.setData({ |
| | | refcode: options.scene, |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | // 如果不是第一次登录,会执行回调 |
| | | if (data) { |
| | | if (options.scene) { |
| | | this.setData({ |
| | | refcode: options.scene, |
| | | }) |
| | | this.getBookList() |
| | | } |
| | | } |
| | | }) |
| | | this.getBookList() |
| | | } else { |
| | | if (options.scene) { |
| | | this.setData({ |
| | | refcode: options.scene, |
| | | }) |
| | | this.getBookList() |
| | | } |
| | | } |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | if (options.scene) { |
| | | this.getBookInfo(options.scene) |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | // 如果不是第一次登录,会执行回调 |
| | | if (data) { |
| | | if (options.scene) { |
| | | this.getBookInfo(options.scene) |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | if (options.scene) { |
| | | this.getBookInfo(options.scene) |
| | | } |
| | | } |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | value: false |
| | | }, |
| | | loadingProps: { |
| | | size: '50rpx', |
| | | size: '10rpx', |
| | | }, |
| | | scrollTop: 0, |
| | | }, |
| | |
| | | <view> |
| | | <view class="container"> |
| | | <t-pull-down-refresh value="{{baseRefresh.value}}" loadingProps="{{loadingProps}}" loadingTexts="{{['下拉刷新', '正在刷新', '刷新完成']}}" bind:refresh="onPullDownRefresh" bind:scroll="onScroll"> |
| | | <view style="width: 100%; height: {{barHeight}}px;"></view> |
| | | <view class="background {{ isWhite ? 'white':''}}" style="padding-top: {{barHeight}}px"> |
| | |
| | | page: 1, |
| | | total: 0, |
| | | }, |
| | | tabValue: 0, |
| | | tabValue: '0', |
| | | tabPanelstyle: 'display:flex;justify-content:center;align-items:center;', |
| | | // tab选项 |
| | | tabList: [{ |
| | | title: "图书", |
| | | index: "0", |
| | | // bookTotal: this.data.bookTotal |
| | | bookTotal: 0 |
| | | }, |
| | | { |
| | | title: "课程", |
| | | index: "1", |
| | | // bookTotal: this.data.courseTotal |
| | | bookTotal: 0 |
| | | }, |
| | | { |
| | | title: "数字教材", |
| | | index: "2", |
| | | // bookTotal: this.data.digitalTextbooksTotal |
| | | bookTotal: 0 |
| | | }, { |
| | | title: "专题", |
| | | index: "3", |
| | | // bookTotal: this.data.seminarTotal |
| | | bookTotal: 0 |
| | | }, |
| | | { |
| | | title: "书目", |
| | | index: "4", |
| | | // bookTotal: this.data.bookFairTotal |
| | | bookTotal: 0 |
| | | }, |
| | | { |
| | | title: "书展", |
| | | index: "5", |
| | | // bookTotal: this.data.biblioClassificationTotal |
| | | bookTotal: 0 |
| | | }, |
| | | ], |
| | | tabsId: 0, //默认选型为装备 |
| | |
| | | this.setData({ |
| | | bookData: datas1, |
| | | bookTotal: data1.totalCount, |
| | | [`tabList[${0}].bookTotal`]: data1.totalCount |
| | | }) |
| | | console.log(this.data.tabList, 7777) |
| | | //数字课程 1 |
| | | const data2 = resp[1] |
| | | const datas2 = handleQueryResourceListData({ |
| | |
| | | }) |
| | | this.setData({ |
| | | courseData: datas2, |
| | | courseTotal: data2.totalCount |
| | | courseTotal: data2.totalCount, |
| | | [`tabList[${1}].bookTotal`]: data2.totalCount |
| | | }) |
| | | // 数字教材 2 |
| | | const data3 = resp[2] |
| | |
| | | }) |
| | | this.setData({ |
| | | digitalTextbooksData: datas3, |
| | | digitalTextbooksTotal: data3.totalCount |
| | | digitalTextbooksTotal: data3.totalCount, |
| | | [`tabList[${2}].bookTotal`]: data3.totalCount |
| | | }) |
| | | // 专题研讨 3 |
| | | const data4 = resp[3] |
| | |
| | | }) |
| | | this.setData({ |
| | | seminarData: datas4, |
| | | seminarTotal: data4.totalCount |
| | | seminarTotal: data4.totalCount, |
| | | [`tabList[${3}].bookTotal`]: data4.totalCount |
| | | }) |
| | | // 书展 4 |
| | | const data5 = resp[4] |
| | |
| | | // console.log(datas5, 'sadasd'); |
| | | this.setData({ |
| | | biblioClassificationData: datas5, |
| | | biblioClassificationTotal: data5.totalCount |
| | | biblioClassificationTotal: data5.totalCount, |
| | | [`tabList[${5}].bookTotal`]: data5.totalCount |
| | | }) |
| | | this.setData({ |
| | | loading: false, |
| | |
| | | |
| | | this.setData({ |
| | | bookFairData: res.datas, |
| | | bookFairTotal: res.total |
| | | bookFairTotal: res.total, |
| | | [`tabList[${4}].bookTotal`]: res.total |
| | | }) |
| | | |
| | | }) |
| | |
| | | } |
| | | }, |
| | | onTabsClick(event) { |
| | | console.log(`Click tab, tab-panel value is ${event.detail.value}.`); |
| | | console.log(` |
| | | Click tab, tab - panel value is $ { |
| | | event.detail.value |
| | | }. |
| | | `); |
| | | }, |
| | | tabClick() { |
| | | console.log(2323); |
| | |
| | | <view class="cancellation" bind:tap="onCancellation">取消</view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view> |
| | | <!-- Tab布局 --> |
| | | <view class="navBox"> |
| | | <view class="titleBox" wx:for="{{tabList}}" bindtap="tabsOn" data-idx="{{item.index}}"> |
| | | |
| | | <view class="tabIndexBox"> |
| | | |
| | | |
| | | <text class="{{item.index == tabsId ? 'fontColorBox' : ''}}">{{item.title}} </text> |
| | | <!-- <view style="font-size: 22rpx;"> ({{bookTotal}}) </view> --> |
| | | <scroll-view scroll-x="{{true}}" class="scroll-x"> |
| | | <view class="navBox"> |
| | | <view class="titleBox" wx:for="{{tabList}}" bindtap="tabsOn" data-idx="{{item.index}}"> |
| | | <view class="tabIndexBox"> |
| | | <text class="{{item.index == tabsId ? 'fontColorBox' : ''}}">{{item.title}} ({{item.bookTotal}}) </text> |
| | | </view> |
| | | <hr class="{{item.index == tabsId ? 'lineBox' : ''}}" /> |
| | | </view> |
| | | |
| | | |
| | | <hr class="{{item.index == tabsId ? 'lineBox' : ''}}" /> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | <!-- 内容布局 --> |
| | | <swiper class="swiperTtemBox" bindchange="slideOn" current="{{tabsId}}" circular> |
| | | <!-- circular 启用循环滑动 --> |
| | | <swiper-item> |
| | | <view wx:if="{{bookData.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <view class="bookDataBox"> |
| | | <view class="bookDataForBox" wx:for="{{bookData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBook"> |
| | |
| | | </scroll-view> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | |
| | | |
| | | |
| | | |
| | | <view wx:if="{{courseData.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <view class="listBox1"> |
| | | <view> |
| | |
| | | |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <view wx:if="{{digitalTextbooksData.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <view class="bookDataBox"> |
| | | <view class="bookDataForBox" wx:for="{{digitalTextbooksData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="underConstruction"> |
| | |
| | | |
| | | </swiper-item> |
| | | <swiper-item> |
| | | |
| | | <view wx:if="{{seminarData.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <view class="listBox"> |
| | | <view wx:for="{{seminarData}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox" data-item="{{item}}" bind:tap="underConstruction"> |
| | |
| | | |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <view wx:if="{{bookFairData.length <= 0 }}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <view class="outsideHigherBox"> |
| | | <view class="higherBox" wx:for="{{bookFairData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | |
| | | </scroll-view> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <view wx:if="{{biblioClassificationData.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | |
| | | |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <view class="outside"> |
| | | <view class="contentBox" wx:for="{{biblioClassificationData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}"> |
| | |
| | | |
| | | |
| | | |
| | | |
| | | .scroll-x { |
| | | height: 70rpx; |
| | | border-bottom: 2rpx solid rgb(243, 244, 249); |
| | | padding-top: 20rpx; |
| | | } |
| | | |
| | | .navBox { |
| | | /* tab整体样式 */ |
| | | height: 70rpx; |
| | | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | border-bottom: 2rpx solid rgb(243, 244, 249); |
| | | line-height: 45rpx; |
| | | margin-top: 20rpx; |
| | | /* overflow-y: scroll; */ |
| | | display: flex; |
| | | flex: 1 0 auto; |
| | | |
| | | /* |
| | | overflow-x: hidden; */ |
| | | } |
| | | |
| | | .fontColorBox { |
| | | /* 选中tab样式 */ |
| | | color: #FF6C00; |
| | | font-weight: bold; |
| | | |
| | | } |
| | | |
| | | .titleBox { |
| | | /* 未选中tab样式 */ |
| | | height: 70rpx; |
| | | color: rgb(168, 170, 175); |
| | | font-size: 28rpx; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | |
| | | min-width: 180rpx; |
| | | flex: 1 |
| | | } |
| | | |
| | | .lineBox { |
| | | /* 线条样式 */ |
| | | width: 32rpx; |
| | | width: 80rpx; |
| | | height: 8rpx; |
| | | background: #FF6C00; |
| | | margin-top: 10rpx; |
| | | margin-top: 25rpx; |
| | | margin-right: 10rpx; |
| | | border-radius: 4rpx; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .tabIndexBox { |
| | | display: flex; |
| | | margin: 0 20rpx; |
| | | |
| | | |
| | | |
| | | text-align: center; |
| | | } |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | if (options.scene) { |
| | | this.getBookInfo(options.scene) |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | // 如果不是第一次登录,会执行回调 |
| | | if (data) { |
| | | // 登录成功,自动记录token和用户信息,并返回true |
| | | if (options.scene) { |
| | | this.getBookInfo(options.scene) |
| | | } |
| | | } |
| | | }) |
| | | } else { |
| | | // 如果是第一次登录,会跳转至绑定用户信息页面,填写完用户信息后进行登录并储存token和用户信息,结束后跳转回当前页面(携带页面参数) |
| | | if (options.scene) { |
| | | this.getBookInfo(options.scene) |
| | | } |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | | /** |