| | |
| | | <view class="teach-btn"> |
| | | <t-button theme="primary" style="width: 120px; height: 36px" class="btn" bind:tap="uploadBtn"> |
| | | <!-- <view class="teach-btn"> --> |
| | | <!-- <t-button theme="primary" style="width: 120px; height: 36px" class="btn" bind:tap="uploadBtn"> |
| | | <view slot="content" class="btn-content"> |
| | | <image src="/static/images/bookService/detail/upload.png" mode="aspectFit" ></image> |
| | | <text>上传资源</text> |
| | | </view> |
| | | </t-button> |
| | | </t-button> --> |
| | | <!-- <t-button theme="primary" style="width: 120px; height: 36px"> |
| | | <t-image src="/static/images/bookService/detail/download.png"></t-image> |
| | | 批量下载 |
| | | </t-button> --> |
| | | </view> |
| | | <!-- </view> --> |
| | | <view class="applyResult {{applyState == 'none' ? 'applyNone' : applyState == 'Normal' ? 'applyPass' : applyState == 'WaitAudit' ? 'applying' :applyState == 'Reject' ? 'applyReject' :'' }}"> |
| | | <view wx:if="{{applyState == 'WaitAudit'}}">资源下载申请正在审核中,请耐心等待!</view> |
| | | <view wx:if="{{applyState == 'Normal'}}"> |
| | |
| | | .applyReject, |
| | | .applyPass, |
| | | .applying { |
| | | margin-top: 40rpx; |
| | | margin-bottom: 40rpx; |
| | | margin-top: 10rpx; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | |
| | | .btn-box { |
| | |
| | | this.setData({ |
| | | resourceCodeList: res.datas.cmsDatas[0].datas |
| | | }) |
| | | // console.log('图书资源', res.datas.cmsDatas[0].datas) |
| | | }) |
| | | }, |
| | | //请求子商品的文件 |
| | |
| | | if (type.refCode == "jsek_teachingResources") { |
| | | this.findChildIds(list, result); |
| | | // const newUSeList = this.deleteTreeData(list, result) |
| | | // console.log('树剔除', result, newUSeList); |
| | | // console.log('树加一', this.increaseTreeData(list, newUSeList, 16094)); |
| | | this.setData({ |
| | | openTeachids: result, |
| | | loading: false, |
| | |
| | | applyState: "Normal", |
| | | deadline: "永久", |
| | | }); |
| | | console.log("有效日期", this.data.deadline); |
| | | } else { |
| | | let endTime = new Date(endDate + " 23:59:59").getTime(); |
| | | this.setData({ |
| | |
| | | } |
| | | }); |
| | | 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() |
| | | if (flag) { |
| | |
| | | |
| | | }, |
| | | onNameInput(e) { |
| | | console.log(e.detail.value) |
| | | this.setData({ |
| | | 'resourceInfo.resourceName': e.detail.value, |
| | | }); |
| | | }, |
| | | onResourcePicker(e) { |
| | | this.setData({ |
| | | resourceValue: [this.data.resourceInfo.fileType], |
| | | resourceVisible: true, |
| | | }); |
| | | }, |
| | |
| | | </t-tab-panel> --> |
| | | <t-tab-panel label="教学资源" icon="{{tabValue == 'jsek_teachingResources' ? teachResourcesClickIcon : teachResourcesIcon}}" value="jsek_teachingResources" class="{{loading ? 'loading': ''}}"> |
| | | <view wx:if="{{!loading && teach.length && !noResources && applyState}}"> |
| | | <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" deadline="{{deadline}}" bind:applyResource="applyResource" applyResourceLoading="{{applyResourceLoading}}" bind:uploadFile="uploadFile"></teach-resource> |
| | | <view class="teach-btn"> |
| | | <t-button theme="primary" style="width: 120px; height: 36px" class="btn" bind:tap="uploadFile"> |
| | | <view slot="content" class="btn-content"> |
| | | <image src="/static/images/bookService/detail/upload.png" mode="aspectFit" ></image> |
| | | <text>上传资源</text> |
| | | </view> |
| | | </t-button> |
| | | </view> |
| | | <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" deadline="{{deadline}}" bind:applyResource="applyResource" applyResourceLoading="{{applyResourceLoading}}"></teach-resource> |
| | | <tree id="teach-tree" openIds="{{openTeachids}}" bookInfo="{{bookDetail}}" treeList="{{teach}}" tab="{{tabValue}}" applyState="{{applyState}}" deadline="{{deadline}}" bind:downloadTeach="downloadTeach" bind:handleTree="handleTree" openTeachids="{{openTeachids}}" wx:if="{{teach.length}}" isShoppingCart="isShoppingCart" bind:updateCloudLearning="updateCloudLearning"></tree> |
| | | </view> |
| | | <!-- <t-loading |
| | |
| | | .deleteBtn { |
| | | width: 30rpx; |
| | | height: 30rpx; |
| | | } |
| | | |
| | | .teach-btn { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | padding: 0 40rpx; |
| | | height: 120rpx; |
| | | } |
| | | |
| | | .btn { |
| | | width: 220rpx; |
| | | font-size: 28rpx; |
| | | --td-button-primary-bg-color: #fff; |
| | | --td-button-primary-border-color: #FF6C00; |
| | | --td-button-primary-color: #ff6c00; |
| | | --td-button-primary-active-bg-color: #fff0e6; |
| | | --td-button-primary-active-border-color: #ff6c00; |
| | | padding: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .btn-content { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .btn image { |
| | | margin-right: 4rpx; |
| | | width: 28rpx; |
| | | height: 32rpx; |
| | | } |
| | | |
| | | .btn text { |
| | | font-size: 28rpx; |
| | | } |
| | |
| | | } |
| | | } else { |
| | | if (item.selectType === "audio" || item.learnSelectType === "audio") { |
| | | this.data.threeLeveData.push(item); |
| | | // this.data.threeLeveData.push(item); |
| | | if (this.data.storeInfo == 'jsek_digitalCourses') { |
| | | if (this.data.isBuy) { |
| | | if (item.sysType == 'CmsItem') { |
| | | this.data.threeLeveData.push(item) |
| | | } |
| | | } else { |
| | | if (item.sysType == 'CmsItem' && item.freeFile) { |
| | | this.data.threeLeveData.push(item) |
| | | } |
| | | } |
| | | } else { |
| | | if (res.datas.purchasedSaleMethodIdList.includes(item.defaultSaleMethodId) || item.freeFile) { |
| | | this.data.threeLeveData.push(item) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | isplay: false |
| | | }) |
| | | const item = e.currentTarget.dataset.item |
| | | console.log(item, 222) |
| | | if (this.data.showData != '') { |
| | | this.setData({ |
| | | titleName: item.name, |
| | |
| | | parentName: '', |
| | | parentProductLinkPath: '', |
| | | productLinkPath: '', |
| | | isBuy: false, |
| | | threeLeveData: [], |
| | | source: "", |
| | | showData: '', |
| | |
| | | } |
| | | } |
| | | app.MG.store.getProductDetail(query).then(res => { |
| | | if (res.datas.purchasedSaleMethodIdList.includes(res.datas.defaultSaleMethodId)) { |
| | | this.setData({ |
| | | isBuy: true |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | isBuy: false |
| | | }) |
| | | } |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | if (this.data.source == 'qrcode') { |
| | | if (item.id == this.data.activeId) { |
| | |
| | | } |
| | | } else { |
| | | if (item.selectType === "video" || item.learnSelectType === "video") { |
| | | this.data.threeLeveData.push(item) |
| | | if (this.data.storeInfo == 'jsek_digitalCourses') { |
| | | if (this.data.isBuy) { |
| | | if (item.sysType == 'CmsItem') { |
| | | this.data.threeLeveData.push(item) |
| | | } |
| | | } else { |
| | | if (item.sysType == 'CmsItem' && item.freeFile) { |
| | | this.data.threeLeveData.push(item) |
| | | } |
| | | } |
| | | } else { |
| | | if (res.datas.purchasedSaleMethodIdList.includes(item.defaultSaleMethodId) || item.freeFile) { |
| | | this.data.threeLeveData.push(item) |
| | | } |
| | | } |
| | | this.setData({ |
| | | threeLeveData: this.data.threeLeveData |
| | | }) |
| | |
| | | }) |
| | | 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 |
| | | let file = |
| | | item.protectedFile || item.file ? file = item.protectedFile || item.file : file = item.freeFile |
| | | this.setData({ |
| | | showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey) |
| | | }) |
| | |
| | | <t-toast id="t-toast" /> |
| | | |
| | | <!-- 弹窗 --> |
| | | <view wx:if="{{dialogBox}}"> |
| | | <view wx:if="{{dialogBox}}"> |
| | | <view class="popup-box" bindtap="closeDialog"></view> |
| | | <view class="info-center" style="top:{{height*0.4}}px;"> |
| | | <view> |
| | |
| | | } |
| | | |
| | | .higherTextBox { |
| | | height: 48rpx; |
| | | height: 70rpx; |
| | | font-weight: bold; |
| | | font-size: 25rpx; |
| | | color: #333333; |
| | | padding: 15rpx; |
| | | margin-bottom: 20rpx; |
| | | padding: 0 15rpx; |
| | | margin-bottom: 15rpx; |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 2; |
| | |
| | | |
| | | .info-center { |
| | | position: fixed; |
| | | top: 80%; |
| | | top: 30%; |
| | | z-index: 999; |
| | | background-color: white; |
| | | align-items: center; |
| | |
| | | if (res) { |
| | | this.setData({ |
| | | payId: res.payList[0].id, |
| | | payPrice: res.payPrice, |
| | | payPrice: res.payPrice.toFixed(2), |
| | | deduct: (this.data.currentBalance / 100).toFixed(2), |
| | | integral: this.data.integral - this.data.currentBalance, |
| | | showIntegral: true |
| | |
| | | console.log(res, "取消用积分") |
| | | if (res) { |
| | | this.setData({ |
| | | payPrice: res.payPrice, |
| | | payPrice: res.payPrice.toFixed(2), |
| | | showIntegral: false |
| | | }); |
| | | this.getIntegral() |
| | |
| | | </view> |
| | | </view> --> |
| | | </view> |
| | | <view class="textBox" wx:if="{{item.type == 'product'}}">图书服务-电子书</view> |
| | | <view class="textBox" wx:if="{{item.type == 'item'}}">图书服务-云学习</view> |
| | | <view class="textBox">{{item.productType}}</view> |
| | | <view class="priceBox">¥{{item.orderSaleMethod.price}}</view> |
| | | </view> |
| | | </view> |
| | |
| | | } |
| | | |
| | | let submitData = { |
| | | bookId: this.properties.bookInfo.id, |
| | | content: this.data.content.replace(/^\s*|\s*$/g, ""), |
| | | name: this.data.userName.replace(/^\s*|\s*$/g, ""), |
| | | email: "", |
| | |
| | | this.setData({ |
| | | noList: false, |
| | | }); |
| | | let topicId; |
| | | app.MG.ugc |
| | | .getTopicMessageList({ |
| | | appRefCode: app.config.appRefCode, |
| | |
| | | noteList: res.datas, |
| | | }); |
| | | } |
| | | // notePage.value.total = res.totalSize |
| | | let list = [] |
| | | res.datas.forEach((item) => { |
| | | item.title = JSON.parse(item.content).content; |
| | | item.createDate = moment(item.createDate).format("YYYY-MM-DD HH:mm:ss"); |
| | | item.updateDate = moment(item.updateDate).format("YYYY-MM-DD HH:mm:ss"); |
| | | item.feedBack = item.feedBack ? item.feedBack : '暂未回复' |
| | | if (this.properties.bookInfo.id == JSON.parse(item.content).bookId) { |
| | | list.push(item) |
| | | } |
| | | }); |
| | | this.setData({ |
| | | "pageCount.total": res.totalSize, |
| | | onlineQuestionsList: res.datas, |
| | | "pageCount.total": list.length, |
| | | onlineQuestionsList: list, |
| | | loading: false, |
| | | noList: false, |
| | | }); |
| | |
| | | height: 32rpx; |
| | | } |
| | | |
| | | .t-cell { |
| | | padding: 20rpx !important; |
| | | } |
| | | |
| | | .contentBox { |
| | | margin: 0 26rpx; |
| | | padding: 0 20rpx; |
| | |
| | | <image wx:elif="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" /> |
| | | <!-- 资源无文件内容图标 --> |
| | | <image wx:else src="/static/images/bookService/detail/word.png" mode="" /> |
| | | <text class="name" style="width:400rpx">{{citem.name || '-'}}</text> |
| | | </view> |
| | | <!-- 名称 --> |
| | | <text class="name" style="width:410rpx">{{citem.name || '-'}}</text> |
| | | <text>{{citem.progress ? citem.progress : 0}}%</text> |
| | | </view> |
| | | <view class="seeBox" wx:if="{{!isBuy && citem.freeFile ? true : false}}" bind:tap="goPlayer" data-item="{{citem}}" data-parent="{{item}}" data-isTry="{{true}}"> |
| | |
| | | height: 32rpx; |
| | | } |
| | | |
| | | .t-cell { |
| | | padding: 20rpx !important; |
| | | } |
| | | |
| | | .contentBox { |
| | | margin: 0 26rpx; |
| | | margin-left: 40rpx; |
| | | padding: 0 20rpx; |
| | | height: 88rpx; |
| | | background-color: #fff6f0; |
| | |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | |
| | | .contentBox .checkBox { |
| | | --td-checkbox-vertical-padding: 0; |
| | |
| | | padding: var(--td-collapse-content-padding, 0rpx) !important; |
| | | } */ |
| | | |
| | | .seeBox, |
| | | .fl-cn { |
| | | display: flex; |
| | | align-items: center; |
| | | flex: 1; |
| | | } |
| | | |
| | | .seeBox { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | |
| | | this.digitalCoursesDetailsGet(options.id) |
| | | this.getPlayerList() |
| | | this.getType() |
| | | this.setData({ |
| | | userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name, |
| | | }) |
| | | // this.setData({ |
| | | // userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name, |
| | | // }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | app.MG.identity |
| | | .getUserKey({ |
| | | domain: 'videoPlayer', |
| | | keys: [this.data.bookId] |
| | | keys: [this.data.bookId + ''] |
| | | }) |
| | | .then((res) => { |
| | | if (res.length > 0) { |
| | |
| | | } |
| | | if (res.datas.datas.speaker && res.datas.datas.speaker.length > 0) { |
| | | this.getSpeaker(res.datas.datas.speaker) |
| | | } else { |
| | | this.setData({ |
| | | lecturerList: [] |
| | | }) |
| | | } |
| | | if (this.data.bookPath) { |
| | | this.getAboutBook(this.data.bookPath) |
| | |
| | | }, |
| | | //获取主讲人 |
| | | getSpeaker(list) { |
| | | this.setData({ |
| | | lecturerList: [] |
| | | }) |
| | | let query = { |
| | | path: 'jsek_speaker', |
| | | fields: { |
| | |
| | | this.setData({ |
| | | tabValue: value |
| | | }) |
| | | if (this.data.tabValue == 0) { |
| | | this.digitalCoursesDetailsGet(this.data.bookId) |
| | | } |
| | | if (this.data.tabValue == 1) { |
| | | this.saveAsImage() |
| | | } |
| | |
| | | |
| | | onCorrelationBook(e) { |
| | | const item = e.currentTarget.dataset.item; |
| | | // this.digitalCoursesDetailsGet(item.id) |
| | | // this.getPlayerList() |
| | | this.onLoad({ |
| | | loading: true, |
| | | id: item.id, |
| | |
| | | icon: "none", |
| | | duration: 1000, |
| | | }); |
| | | this.getBookInfo(this.data.bookDetail.id); |
| | | this.digitalCoursesDetailsGet(this.data.bookId); |
| | | } |
| | | }); |
| | | } else { |
| | |
| | | item.content = JSON.parse(item.content) |
| | | if (item.content.id == this.data.bookId) { |
| | | this.setData({ |
| | | isCertificate: item |
| | | isCertificate: item, |
| | | userName: item.content.userName, |
| | | userPicture: app.config.requestCtx + `/file/GetPreViewImage?md5=` + item.content.userPicture |
| | | }) |
| | | } |
| | | }) |
| | |
| | | |
| | | |
| | | onCertificate() { |
| | | // if (!this.data.isBuy) { |
| | | // wx.showToast({ |
| | | // title: "请先购买,体验完整服务", |
| | | // icon: "none", |
| | | // duration: 1000, |
| | | // }); |
| | | // return false |
| | | // } |
| | | // if (!this.data.isLearn) { |
| | | // wx.showToast({ |
| | | // title: "您的学习任务还未完成,暂不能申请证书,加油哦!", |
| | | // icon: "none", |
| | | // duration: 1000, |
| | | // }); |
| | | // return false |
| | | // } |
| | | if (!this.data.isBuy) { |
| | | wx.showToast({ |
| | | title: "请先购买,体验完整服务", |
| | | icon: "none", |
| | | duration: 1000, |
| | | }); |
| | | return false |
| | | } |
| | | if (!this.data.isLearn) { |
| | | wx.showToast({ |
| | | title: "您的学习任务还未完成,暂不能申请证书,加油哦!", |
| | | icon: "none", |
| | | duration: 1000, |
| | | }); |
| | | return false |
| | | } |
| | | if (this.data.isCertificate && this.data.isCertificate.state == 'WaitAudit') { |
| | | wx.showToast({ |
| | | title: "您申请的证书正在审核中", |
| | |
| | | <view class="book-box"> |
| | | <view class="digitalCoursesDetailsTitle"> |
| | | <view class="imageBox"> |
| | | <image src="{{digitalsData.icon}}" mode="aspectFit" /> |
| | | <image src="{{digitalsData.icon ? digitalsData.icon : 'https://jsek.bnuic.com/home/image/courseIcon.png'}}" mode="aspectFit" /> |
| | | </view> |
| | | <view class="nameBox">{{digitalsData.name}}</view> |
| | | <view> |
| | |
| | | height: 40rpx; |
| | | } |
| | | |
| | | .collectionImage image { |
| | | width: 38rpx; |
| | | height: 38rpx; |
| | | } |
| | | |
| | | .bottom-btn { |
| | | background-color: #fff; |
| | | width: 25%; |
| | |
| | | background-color: #fff6f0; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 20rpx 32rpx; |
| | | padding: 20rpx; |
| | | margin-top: 30rpx; |
| | | |
| | | } |
| | |
| | | loginInfo(app, (data) => { |
| | | // 如果不是第一次登录,会执行回调 |
| | | if (data) { |
| | | // 登录成功,自动记录token和用户信息,并返回true |
| | | this.init(); |
| | | this.registe() |
| | | } else { |
| | | // 出现错误,返回false |
| | | this.init(); |
| | | } |
| | | }) |
| | | } else { |
| | | // 如果是第一次登录,会跳转至绑定用户信息页面,填写完用户信息后进行登录并储存token和用户信息,结束后跳转回当前页面(携带页面参数) |
| | | this.init(); |
| | | this.registe() |
| | | } |
| | | this.registe() |
| | | this.init(); |
| | | |
| | | }, |
| | | onReachBottom() {}, |
| | | onPullDownRefresh() { |
| | |
| | | { |
| | | "navigationBarTitleText": "我的下载", |
| | | "navigationBarTitleText": "我的积分", |
| | | "usingComponents": { |
| | | "t-back-top": "tdesign-miniprogram/back-top/back-top", |
| | | "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh", |
| | |
| | | }, |
| | | ], |
| | | tabsId: 0, //默认选型为装备 |
| | | |
| | | height: '', |
| | | inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding: 0 0 0 16rpx;height:70rpx', |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(app.config.appId); |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | |
| | | } else { |
| | | this.getUserInfo() |
| | | } |
| | | var that = this; |
| | | // 动态获取屏幕高度 |
| | | wx.getSystemInfo({ |
| | | success: (result) => { |
| | | that.setData({ |
| | | height: result.windowHeight |
| | | }); |
| | | }, |
| | | }) |
| | | }, |
| | | // 获取登录用户身份 |
| | | getUserInfo() { |
| | |
| | | //标签的切换 |
| | | onTabsChange(event) { |
| | | const value = event.detail.value |
| | | console.log(value); |
| | | this.setData({ |
| | | tabValue: value, |
| | | isMore: false |
| | |
| | | method: 'post', |
| | | data: body |
| | | }).then((resp) => { |
| | | console.log(resp, 'resp'); |
| | | //图书 0 |
| | | const data1 = resp[0] |
| | | const datas1 = handleQueryResourceListData({ |
| | |
| | | bookTotal: data1.totalCount, |
| | | [`tabList[${0}].bookTotal`]: data1.totalCount |
| | | }) |
| | | console.log(this.data.tabList, 7777) |
| | | //数字课程 1 |
| | | const data2 = resp[1] |
| | | const datas2 = handleQueryResourceListData({ |
| | |
| | | datas5.forEach((items) => { |
| | | items.subtitleName = items.subtitle + items.name |
| | | }) |
| | | // console.log(datas5, 'sadasd'); |
| | | this.setData({ |
| | | biblioClassificationData: datas5, |
| | | biblioClassificationTotal: data5.totalCount, |
| | |
| | | const item = event.currentTarget.dataset.item; |
| | | const URL = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.datas.freeFile.Value |
| | | item.determine = false |
| | | console.log(URL, 'URL'); |
| | | setTimeout(() => { |
| | | if (URL) { |
| | | item.determine = true |
| | |
| | | loading: true, |
| | | hidden: true, |
| | | }) |
| | | console.log(this.data.searchVal); |
| | | this.retrievalPageGet() |
| | | this.bibliographyGet() |
| | | }, |
| | | onBook(e) { |
| | | console.log(e.currentTarget.dataset.item); |
| | | const item = e.currentTarget.dataset.item |
| | | wx.navigateTo({ |
| | | url: '/packageBookService/pages/bookServices/detail/index?id=' + item.id + '&name=' + item.name |
| | | }) |
| | | }, |
| | | onBookExhibitionDetails(e) { |
| | | console.log(e.currentTarget.dataset.item); |
| | | const item = e.currentTarget.dataset.item |
| | | |
| | | wx.navigateTo({ |
| | |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom(e) { |
| | | console.log(this.data.tabValue); |
| | | if (this.data.tabValue == 0) { |
| | | console.log(0); |
| | | if (this.data.bookData.length < this.data.bookTotal) { |
| | | this.setData({ |
| | | isMore: true, |
| | |
| | | }, 100) |
| | | |
| | | } |
| | | console.log(2); |
| | | } else if (this.data.tabValue == 2) { |
| | | |
| | | if (this.data.digitalTextbooksData.length < this.data.digitalTextbooksTotal && this.data.digitalTextbooksData.length > 9) { |
| | |
| | | }, 100) |
| | | |
| | | } |
| | | console.log(2); |
| | | } else if (this.data.tabValue == 3) { |
| | | if (this.data.seminarData.length < this.data.seminarTotal) { |
| | | this.setData({ |
| | |
| | | }) |
| | | }, 100) |
| | | } |
| | | console.log(3); |
| | | } else if (this.data.tabValue == 4) { |
| | | if (this.data.bookFairData.length < this.data.bookFairTotal) { |
| | | this.setData({ |
| | |
| | | }) |
| | | }, 100) |
| | | } |
| | | console.log(4); |
| | | } else if (this.data.tabValue == 5) { |
| | | if (this.data.biblioClassificationData.length < this.data.biblioClassificationTotal) { |
| | | this.setData({ |
| | |
| | | |
| | | // 下拉函数 |
| | | onPullDownRefresh() { |
| | | console.log(456); |
| | | if (this.data.tabValue == 4) { |
| | | this.setData({ |
| | | "pageCount.page": 1 |
| | |
| | | }, |
| | | // 邮箱点击 |
| | | mailbox(e) { |
| | | console.log(e); |
| | | const key = e.currentTarget.dataset.key; |
| | | const item = e.currentTarget.dataset.item; |
| | | this.setData({ |
| | |
| | | this.setData({ |
| | | [dialogKey]: false |
| | | }); |
| | | console.log(this.data.input); |
| | | console.log(this.data.Md5); |
| | | if (this.data.input) { |
| | | let query = { |
| | | eMail: this.data.input, |
| | |
| | | this.setData({ |
| | | [dialogKey]: false |
| | | }); |
| | | console.log(111); |
| | | }, |
| | | onScrollToLower() { |
| | | if (this.data.tabValue == 0) { |
| | | console.log(0); |
| | | if (this.data.bookData.length < this.data.bookTotal) { |
| | | this.setData({ |
| | | isMore: true, |
| | |
| | | }, 100) |
| | | |
| | | } |
| | | console.log(2); |
| | | } else if (this.data.tabValue == 2) { |
| | | |
| | | if (this.data.digitalTextbooksData.length < this.data.digitalTextbooksTotal && this.data.digitalTextbooksData.length > 9) { |
| | |
| | | }, 100) |
| | | |
| | | } |
| | | console.log(2); |
| | | } else if (this.data.tabValue == 3) { |
| | | if (this.data.seminarData.length < this.data.seminarTotal) { |
| | | this.setData({ |
| | |
| | | }) |
| | | }, 100) |
| | | } |
| | | console.log(3); |
| | | } else if (this.data.tabValue == 4) { |
| | | if (this.data.bookFairData.length < this.data.bookFairTotal) { |
| | | this.setData({ |
| | |
| | | }) |
| | | }, 100) |
| | | } |
| | | console.log(4); |
| | | } else if (this.data.tabValue == 5) { |
| | | if (this.data.biblioClassificationData.length < this.data.biblioClassificationTotal) { |
| | | this.setData({ |
| | |
| | | } |
| | | } |
| | | }, |
| | | onTabsClick(event) { |
| | | console.log(` |
| | | Click tab, tab - panel value is $ { |
| | | event.detail.value |
| | | }. |
| | | `); |
| | | }, |
| | | tabClick() { |
| | | console.log(2323); |
| | | }, |
| | | |
| | | // 滑动时触发的事件 |
| | | slideOn(e) { |
| | | // 拿到当前索引并动态改变 |
| | |
| | | </swiper-item> |
| | | </swiper> |
| | | </view> |
| | | <view class="dialogBox" wx:if="{{showWithInput}}"> |
| | | <!-- <view class="dialogBox" wx:if="{{showWithInput}}"> |
| | | <t-dialog visible="{{showWithInput}}" title="请输入邮箱" confirm-btn="确定" cancel-btn="取消" bind:confirm="onConfirm" bind:cancel="closeDialog"> |
| | | <t-input value="{{input}}" borderless class="dialog-input" clearable slot="content" placeholder="请输入邮箱号" placeholder-class="placeholder" bindchange="onEmailInput" /> |
| | | </t-dialog> |
| | | </view> --> |
| | | </view> |
| | | <view wx:if="{{showWithInput}}"> |
| | | <view class="popup-box" bindtap="closeDialog"></view> |
| | | <view class="info-center" style="top:{{height*0.4}}px;"> |
| | | <view> |
| | | <view class="row-info"> |
| | | <view class="body"> |
| | | <view class="dialog-title">请输入邮箱</view> |
| | | <view class="input-box"> |
| | | <t-input |
| | | style="{{inputStyle}}" |
| | | class="input" |
| | | placeholder="请输入邮箱号" |
| | | value="{{input}}" |
| | | bind:change="onEmailInput" |
| | | ></t-input> |
| | | </view> |
| | | </view> |
| | | <view class="row-btn"> |
| | | <view class="left-btn" bindtap="closeDialog">取消</view> |
| | | <view class="right-btn" bindtap="onConfirm">确认</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | .tabIndexBox { |
| | | text-align: center; |
| | | } |
| | | |
| | | /* 蒙层 */ |
| | | .popup-box { |
| | | position: absolute; |
| | | z-index: 99; |
| | | top: 0; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .info-center { |
| | | position: fixed; |
| | | top: 30%; |
| | | z-index: 999; |
| | | background-color: white; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 10rpx; |
| | | width: 80%; |
| | | margin-left: 10%; |
| | | margin-right: 10%; |
| | | } |
| | | |
| | | .row-btn { |
| | | width: 100%; |
| | | display: flex; |
| | | flex-direction: row; |
| | | align-items: center; |
| | | border-top: 1rpx solid #f1f1f1; |
| | | } |
| | | |
| | | .row-btn view { |
| | | flex: 1; |
| | | text-align: center; |
| | | margin: 20rpx 10%; |
| | | padding: 12rpx 0; |
| | | font-size: 32rpx; |
| | | border-radius: 10rpx; |
| | | } |
| | | |
| | | .left-btn { |
| | | background-color: #f1f1f1; |
| | | color: #5C5C5C; |
| | | } |
| | | |
| | | .right-btn { |
| | | background-color: #ff6c00; |
| | | color: white; |
| | | } |
| | | |
| | | .row-info .body { |
| | | min-height: 120rpx; |
| | | } |
| | | |
| | | .dialog-title { |
| | | padding: 20rpx 0; |
| | | text-align: center; |
| | | font-size: 35rpx; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .input-box { |
| | | padding: 0 20rpx; |
| | | width: 92%; |
| | | margin-bottom: 16rpx; |
| | | } |
| | |
| | | </view> |
| | | <view class="list" wx:if="{{list.length > 0}}"> |
| | | <view class="listBox"> |
| | | <view class="{{active == '1' ? 'class--tem' : 'content-item'}}" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
| | | <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="{{active == '1' ? 150 : 105}}" height="{{active == '1' ? 90 : 145}}" aria-label="{{item.product.name}}" wx:if="{{item.product.icon}}" mode="aspectFit" /> |
| | | <t-image src="/static/images/default-book-img.png" width="105" height="145" aria-label="{{item.product.name}}" wx:else mode="aspectFit" /> |
| | | <t-image src="https://jsek.bnuic.com/home/image/courseIcon.png" width="150" height="90" aria-label="{{item.product.name}}" mode="aspectFit" wx:if="{{!item.product.icon && active == '1'}}"/> |
| | | <t-image src="/static/images/default-book-img.png" width="105" height="145" aria-label="{{item.product.name}}" mode="aspectFit" wx:if="{{!item.product.icon && active == '0'}}"/> |
| | | <t-image src="https://jsek.bnuic.com/home/image/textBookIcon.png" width="105" height="145" aria-label="{{item.product.name}}" mode="aspectFit" wx:if="{{!item.product.icon && active == '2'}}"/> |
| | | </view> |
| | | <view class="body-info" data-book="{{item}}" bindtap="goBookDetails"> |
| | | <view class="name">{{item.product.name}}</view> |
| | |
| | | |
| | | .dialog__button-cancel { |
| | | color: #aeb3b7 !important; |
| | | } |
| | | |
| | | .t-picker__confirm { |
| | | color: #FF6C00 !important; |
| | | } |