| | |
| | | itemFields: { |
| | | SysType: 'CmsFolder', |
| | | // 资源类型,试读文件,是否允许下载等参数 |
| | | learnSelectType: [], |
| | | selectType: [], |
| | | freeFile: [], |
| | | file: [], |
| | |
| | | position: fixed; |
| | | bottom: env(safe-area-inset-bottom); |
| | | width: 100%; |
| | | /* height: 100rpx; */ |
| | | height: min-content; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | |
| | | }, |
| | | successOrderNumber: { |
| | | type: Number, |
| | | |
| | | }, |
| | | isGoBuyResource: { |
| | | type: Boolean |
| | | } |
| | | }, |
| | | |
| | |
| | | } // 触发事件的选项 |
| | | this.triggerEvent('getFreeResource', myEventDetail, myEventOption) |
| | | }, |
| | | // allAddShoppiingCar() { |
| | | // var myEventDetail = {} // detail对象,提供给事件监听函数 |
| | | // var myEventOption = { |
| | | // bubbles: true, |
| | | // composed: true |
| | | // } // 触发事件的选项 |
| | | // this.triggerEvent('allAddShoppiingCar', myEventDetail, myEventOption) |
| | | // }, |
| | | // 跳转资源购买页 |
| | | goBuyResource() { |
| | | console.log(this.properties.successOrderNumber); |
| | | if(this.properties.successOrderNumber !== 0){ |
| | | |
| | | |
| | | |
| | | } |
| | | if (!this.properties.isGoBuyResource) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '暂无可购买资源', |
| | | }) |
| | | } |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/detail/buyResource/index?productLinkPath=${this.properties.buyResourceData.productLinkPath}&refCode=${this.properties.buyResourceData.refCode}&bookId=${this.properties.bookId}`, |
| | | }) |
| | | |
| | | }, |
| | | |
| | | changeReceive(type) { |
| | |
| | | }, |
| | | learnList: { |
| | | type: Array, |
| | | value: [] |
| | | value: [], |
| | | }, |
| | | bookInfo: { |
| | | type: Object, |
| | |
| | | type: Boolean, |
| | | }, |
| | | deadline: { |
| | | type: String |
| | | } |
| | | type: String, |
| | | }, |
| | | }, |
| | | data: { |
| | | sonPurchaseSaleMethodId: "", |
| | |
| | | // 跳转音视频播放器 |
| | | goPlayer(e) { |
| | | // 检查登录状态 |
| | | |
| | | |
| | | |
| | | |
| | | const token = wx.getStorageSync(app.config.tokenKey); |
| | | if (token) { |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | const item = e.currentTarget.dataset.item; |
| | | const parent = e.currentTarget.dataset.parent; |
| | | const parentProductLinkPath = parent ? parent.productLinkPath : wx.getStorageSync('teachResourcesPath') |
| | | const parentName = parent ? parent.name : '教学资源' |
| | | const parentProductLinkPath = parent ? |
| | | parent.productLinkPath : |
| | | wx.getStorageSync("teachResourcesPath"); |
| | | const parentName = parent ? parent.name : "教学资源"; |
| | | let url; |
| | | |
| | | |
| | | |
| | | if (this.properties.isShowCheck && this.resourceIsBuy(item)) { |
| | | return false; |
| | | } |
| | |
| | | "请先购买该资源" : "请先点击领取查看按钮", |
| | | }); |
| | | } |
| | | if (item.saleMethod.length == 0 && item.sysType == 'CmsItem' && this.properties.tab == "jsek_cloudLearning") { |
| | | if ( |
| | | item.saleMethod.length == 0 && |
| | | item.sysType == "CmsItem" && |
| | | this.properties.tab == "jsek_cloudLearning" |
| | | ) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '暂未开始销售,请联系管理员', |
| | | }) |
| | | icon: "error", |
| | | title: "暂未开始销售,请联系管理员", |
| | | }); |
| | | } |
| | | if (this.properties.tab == "jsek_teachingResources" && item.fileMap) { |
| | | if (item.file && item.fileMap[item.file].protectType !== "Public") { |
| | | let file = item.fileMap[item.file] ? item.fileMap[item.file] : item.fileMap[item.freeFile] |
| | | debugger |
| | | if (file && file.protectType !== "Public") { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '资源不可用,请联系管理员', |
| | | }) |
| | | } else if (item.freeFile && item.fileMap[item.freeFile].protectType !== "Public") { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '资源不可用,请联系管理员', |
| | | }) |
| | | icon: "error", |
| | | title: "资源不可用,请联系管理员", |
| | | }); |
| | | } |
| | | } else { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '暂无资源', |
| | | }) |
| | | } |
| | | 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}`, |
| | | }); |
| | | |
| | | |
| | | // || item.selectType == "pdf" |
| | | |
| | | |
| | | |
| | | if (item.selectType == "pdf") { |
| | | console.log(item, '79825'); |
| | | const fileLink = item.file ? item.file : item.freeFile |
| | | console.log(fileLink); |
| | | wx.navigateTo({ |
| | |
| | | item.name + |
| | | "&fileType=" + |
| | | item.selectType + "&bookBuy=true" |
| | | |
| | | }); |
| | | } |
| | | if (item.selectType == "document") { |
| | | // freeFile |
| | | |
| | | if (item.selectType == "document") { |
| | | item.selectType = "pptx" |
| | | |
| | | item.selectType = "pptx"; |
| | | } |
| | | console.log(item); |
| | | const fileLink = item.file ? |
| | | app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.file : app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.freeFile |
| | | app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.file : |
| | | app.config.requestCtx + |
| | | "/file/api/ApiDownload?md5=" + |
| | | item.freeFile; |
| | | console.log(fileLink, "fileLink"); |
| | | //提示加载中 |
| | | util.showLoading(); |
| | |
| | | util.hideLoadingWithErrorTips(); |
| | | }, |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | if (item.selectType == "webpage") { |
| | | this.setData({ |
| | | webpageSrc: item.jsek_link, |
| | | }); |
| | | console.log(this.data.webpageSrc, "webpageSrc"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | }, |
| | | |
| | |
| | | for (let node of tree) { |
| | | findAndUpdate(node); // 对每个顶层节点执行查找和更新操作 |
| | | } |
| | | // console.log(tree, 'tree345'); |
| | | return tree; // 返回修改后的完整数组 |
| | | }, |
| | | |
| | |
| | | // 这个时候checked的值是fals |
| | | let checkResourceTitleList = []; |
| | | const item = e.currentTarget.dataset.item; |
| | | const parent = this.findParentById(this.properties.learnList, item.id) |
| | | let childrenList |
| | | let flagNum |
| | | if (parent) childrenList = parent.children.filter(citem => citem.id !== item.id) |
| | | if (childrenList) flagNum = childrenList.findIndex(item => item.checked == false) |
| | | const parent = this.findParentById(this.properties.learnList, item.id); |
| | | let childrenList; |
| | | let flagNum; |
| | | if (parent) |
| | | childrenList = parent.children.filter((citem) => citem.id !== item.id); |
| | | if (childrenList) |
| | | flagNum = childrenList.findIndex((item) => item.checked == false); |
| | | let list = this.flattenTree([item]); |
| | | let ids = []; |
| | | list.forEach((item) => { |
| | | if (item.sysType == 'CmsFolder' || (item.sysType == 'CmsItem' && item.saleMethod.length)) |
| | | if ( |
| | | item.sysType == "CmsFolder" || |
| | | (item.sysType == "CmsItem" && item.saleMethod.length) |
| | | ) |
| | | ids.push(item.id); |
| | | }); |
| | | var myEventDetail = { |
| | |
| | | }; // 触发事件的选项 |
| | | this.triggerEvent("changeListChecked", myEventDetail, myEventOption); |
| | | if (flagNum == -1) { |
| | | let checkedState |
| | | let checkedState; |
| | | var myEventDetail = { |
| | | ids: [parent.id], |
| | | flag, |
| | |
| | | // 子项勾选 |
| | | checkResource(e) { |
| | | const citem = e.currentTarget.dataset.item; |
| | | const parent = e.currentTarget.dataset.parent |
| | | let outermost |
| | | if (parent) outermost = this.findParentById(this.properties.learnList, parent.id) |
| | | const childrenList = parent.children.filter(item => item.id !== citem.id && item.saleMethod.length) |
| | | const flag = childrenList.findIndex(item => item.checked == false) |
| | | const parent = e.currentTarget.dataset.parent; |
| | | let outermost; |
| | | if (parent) |
| | | outermost = this.findParentById(this.properties.learnList, parent.id); |
| | | const childrenList = parent.children.filter( |
| | | (item) => item.id !== citem.id && item.saleMethod.length |
| | | ); |
| | | const flag = childrenList.findIndex((item) => item.checked == false); |
| | | // 改变该项checked |
| | | var myEventDetail = { |
| | | id: citem.id |
| | | id: citem.id, |
| | | }; |
| | | var myEventOption = { |
| | | bubbles: true, |
| | |
| | | this.triggerEvent("changeResourceChecked", myEventDetail, myEventOption); |
| | | // 通过判断,联通父级checked |
| | | if (flag == -1) { |
| | | let checkedState |
| | | citem.checked == false ? checkedState = true : checkedState = false |
| | | let checkedState; |
| | | citem.checked == false ? (checkedState = true) : (checkedState = false); |
| | | var myEventDetail = { |
| | | ids: [parent.id], |
| | | flag: checkedState, |
| | |
| | | } |
| | | // 联通最外层级checked, 如果所有子项勾选, 且当前最外层未勾选, 则加上最外层的勾选 |
| | | if (!citem.checked && outermost) { |
| | | let allchildren = this.flattenTree([outermost]) |
| | | allchildren = allchildren.filter(item => item.sysType == 'CmsItem' && item.id !== citem.id && item.saleMethod.length) |
| | | const satate = allchildren.findIndex(item => item.checked == false) |
| | | let allchildren = this.flattenTree([outermost]); |
| | | allchildren = allchildren.filter( |
| | | (item) => |
| | | item.sysType == "CmsItem" && |
| | | item.id !== citem.id && |
| | | item.saleMethod.length |
| | | ); |
| | | const satate = allchildren.findIndex((item) => item.checked == false); |
| | | if (satate == -1) { |
| | | var myEventDetail = { |
| | | ids: [outermost.id], |
| | |
| | | async onCloudShoppingCart(e) { |
| | | let shoppingCartGetId = []; |
| | | |
| | | const item = e.currentTarget.dataset.item |
| | | const item = e.currentTarget.dataset.item; |
| | | console.log(item.isShopCar); |
| | | const saleMethodId = e.currentTarget.dataset.item.saleMethod[0].Id; |
| | | console.log(saleMethodId); |
| | |
| | | filterList: [], |
| | | searchList: [], |
| | | }; |
| | | |
| | | const res = await app.MG.store.getShoppingCartProductList(query); |
| | | res.datas.forEach((item) => { |
| | | shoppingCartGetId.push(item.saleMethod.id); |
| | | }); |
| | | if (shoppingCartGetId.includes(saleMethodId)) { |
| | | console.log(111); |
| | | // this.data.updateShoppingCartHidden(); |
| | | // this.data.updateCloudLearning(); |
| | | |
| | | wx.showToast({ |
| | | icon: "error", |
| | | title: "已添加", |
| | |
| | | icon: "success", |
| | | title: "添加成功", |
| | | }); |
| | | item.isShopCar = false |
| | | this.triggerEvent("updateCloudLearning") |
| | | item.isShopCar = false; |
| | | this.triggerEvent("updateCloudLearning"); |
| | | } |
| | | } |
| | | }, |
| | |
| | | findParentById(arr, id) { |
| | | for (let i = 0; i < arr.length; i++) { |
| | | const item = arr[i]; |
| | | // 检查当前项是否匹配(即它是不是我们要找的项) |
| | | // 检查当前项是否匹配(即它是不是我们要找的项) |
| | | if (item.id === id) { |
| | | // 如果当前项就是我们要找的项,则它没有父级,返回 null |
| | | // 如果当前项就是我们要找的项,则它没有父级,返回 null |
| | | return null; |
| | | } |
| | | // 递归查找当前项的子项 |
| | | // 递归查找当前项的子项 |
| | | const child = this.findChildById(item.children, id); |
| | | if (child) { |
| | | // 如果在子项中找到匹配的项,返回当前项作为父级 |
| | | // 如果在子项中找到匹配的项,返回当前项作为父级 |
| | | return item; |
| | | } |
| | | } |
| | | // 如果没有找到匹配的父项,返回 null |
| | | // 如果没有找到匹配的父项,返回 null |
| | | return null; |
| | | }, |
| | | |
| | | // 辅助函数,用于递归查找子项 |
| | | // 辅助函数,用于递归查找子项 |
| | | findChildById(children, id) { |
| | | if (!children) { |
| | | return null; |
| | |
| | | for (let i = 0; i < children.length; i++) { |
| | | const child = children[i]; |
| | | if (child.id === id) { |
| | | // 如果找到匹配的项,返回它 |
| | | // 如果找到匹配的项,返回它 |
| | | return child; |
| | | } |
| | | // 递归检查子项的子项 |
| | | // 递归检查子项的子项 |
| | | const subChild = this.findChildById(child.children, id); |
| | | if (subChild) { |
| | | return subChild; |
| | | } |
| | | } |
| | | // 如果没有找到匹配的项,返回 null |
| | | // 如果没有找到匹配的项,返回 null |
| | | return null; |
| | | } |
| | | }, |
| | | }, |
| | | }); |
| | |
| | | <!-- 名称 --> |
| | | <text |
| | | class="name" |
| | | style="{{ tab == 'jsek_teachingResources' ? 'width: 420rpx;' : 'width: 400rpx;'}}" |
| | | style="{{ tab == 'jsek_teachingResources' ? citem.resourceClass ? 'width: 420rpx' : 'width: 560rpx;' : 'width: 400rpx;'}}" |
| | | >{{citem.name || '-'}}</text |
| | | > |
| | | </view> |
| | | <!-- 教学资源类型 --> |
| | | <view class="teachClass"> {{citem.resourceClass}} </view> |
| | | <view |
| | | class="teach-btn" |
| | | wx:if="{{tab == 'jsek_teachingResources'}}" |
| | | > |
| | | <!-- 下载按钮 --> |
| | | <!-- <image |
| | | src="/static/images/bookService/detail/download-icon.png" |
| | | class="download-image" |
| | | data-value="{{citem}}" |
| | | catchtap="downloadTeach" |
| | | ></image> --> |
| | | <view class="teachClass" wx:if="{{citem.resourceClass}}"> |
| | | {{citem.resourceClass}} |
| | | </view> |
| | | <view wx:if="{{tab == 'jsek_cloudLearning'}}"> |
| | | <!-- 云学习试看图标 --> |
| | |
| | | .tree { |
| | | --td-collapse-content-padding: 0rpx 12rpx 32rpx 12rpx; |
| | | --td-collapse-header-text-color: #ff6C00; |
| | | --td-collapse-header-text-color: #ff6c00; |
| | | --td-collapse-icon-color: #ff6c00; |
| | | --td-collapse-header-height: min-content; |
| | | } |
| | | |
| | | |
| | | .header-title { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | --td-checkbox-vertical-padding: 0 |
| | | --td-checkbox-vertical-padding: 0; |
| | | } |
| | | |
| | | .title-box { |
| | |
| | | display: flex; |
| | | } |
| | | |
| | | |
| | | |
| | | .title-name { |
| | | height: min-content; |
| | | } |
| | | |
| | | .t-class { |
| | | background-color: #F7F7F7; |
| | | background-color: #f7f7f7; |
| | | } |
| | | |
| | | .t-class-content { |
| | |
| | | margin: 0 26rpx; |
| | | padding: 0 20rpx; |
| | | height: 88rpx; |
| | | background-color: #FFF6F0; |
| | | background-color: #fff6f0; |
| | | margin-top: 24rpx; |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | |
| | | .contentBox .checkBox { |
| | | --td-checkbox-vertical-padding: 0; |
| | | --td-checkbox-bg-color: #FFF6F0; |
| | | --td-checkbox-bg-color: #fff6f0; |
| | | } |
| | | |
| | | .box-image { |
| | |
| | | |
| | | /* .t-collapse-panel__content { |
| | | padding: var(--td-collapse-content-padding, 0rpx) !important; |
| | | } */ |
| | | } */ |
| | |
| | | openTeachids: [], |
| | | openLearnids: [], |
| | | openTestids: [], |
| | | isGoBuyResource: true, |
| | | learnPath: '', |
| | | applyResourceState: false, // 申请教学资源按钮防抖 |
| | | resourceClassList: [], // 资源所属分类 |
| | | applyState: "", // 教学资源申请状态 |
| | |
| | | return num |
| | | }, |
| | | |
| | | // 给·目录添加子项数量 |
| | | // 给目录添加子项数量 |
| | | changeResourceChildren(list) { |
| | | const changeList = (list) => { |
| | | for (let index = 0; index < list.length; index++) { |
| | |
| | | } |
| | | } |
| | | }); |
| | | if (type.refCode == "jsek_cloudLearning") { |
| | | this.setData({ |
| | | learnPath: type.productLinkPath |
| | | }) |
| | | const dataList = res.datas.cmsDatas[0].datas |
| | | if (dataList.length) { |
| | | const tag = dataList.findIndex(item => this.isShowNeedBuy(item)) |
| | | this.setData({ |
| | | isGoBuyResource: tag > -1 ? true : false |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | isGoBuyResource: false |
| | | }) |
| | | } |
| | | } |
| | | const num = query.cmsPath.length + 6 |
| | | this.getTreeList(res.datas.cmsDatas[0].datas, num, list, '\\') |
| | | list = this.ensureTreeConsistency(list) |
| | |
| | | }; |
| | | // 确认订单 |
| | | const confirmOrderRes = await app.MG.store.confirmOrder(parameter); |
| | | console.log(confirmOrderRes.orderNumber, 'confirmOrderRes.orderNumber'); |
| | | |
| | | if (confirmOrderRes.orderNumber) { |
| | | child.changeReceive(false); |
| | | wx.showToast({ |
| | | title: "领取成功", |
| | | }); |
| | | this.getBookInfo(this.data.bookId); |
| | | this.getResourceDataList({ |
| | | refCode: 'jsek_cloudLearning', |
| | | productLinkPath: this.data.learnPath |
| | | }) |
| | | this.setData({ |
| | | successOrderNumber: confirmOrderRes.orderNumber |
| | | }) |
| | | |
| | | |
| | | } |
| | | } catch (error) { |
| | | console.log(error); |
| | |
| | | this.data.bookDetail.id, |
| | | |
| | | }); |
| | | debugger |
| | | }, |
| | | |
| | | //样书申请 |
| | |
| | | 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(JSON.parse(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') { |
| | | const flag = new Date(JSON.parse(isApply.feedBack).endDate + '23:59:59').getTime() > new Date().getTime() |
| | | const flag = new Date(isApply.feedBack.endDate + '23:59:59').getTime() > new Date().getTime() |
| | | if (flag) { |
| | | wx.showToast({ |
| | | title: "该书已申请!", |
| | |
| | | bookId="{{bookDetail.id}}" |
| | | isshowDrawBtn="{{isshowDrawBtn}}" |
| | | successOrderNumber="{{successOrderNumber}}" |
| | | isGoBuyResource="{{isGoBuyResource}}" |
| | | ></learn-resource> |
| | | |
| | | <tree |
| | |
| | | <view |
| | | class="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}" |
| | | bind:tap="goRead" |
| | | wx:if="{{ applicationState == 'overdue' ? true :!bookBuy}}" |
| | | wx:if="{{!bookBuy}}" |
| | | > |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/shidu.png"></t-image> |
| | |
| | | <view |
| | | class="shopCar shopCarColor" |
| | | bind:tap="addBookShopcCar" |
| | | wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}" |
| | | wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}" |
| | | >加入购物车</view |
| | | > |
| | | <view |
| | |
| | | wx:if="{{!bookBuy && bookDetail.price == '0.00' && bookDetail.isSell == '1'}}" |
| | | >免费领取</view |
| | | > |
| | | <view class="buy read" bind:tap="goRead" wx:if="{{ applicationState == 'Normal' ? true : bookBuy}}">立即查看</view> |
| | | <view class="buy read" bind:tap="goRead" wx:if="{{bookBuy}}">立即查看</view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | bindrefresherrefresh="onPullDownRefresh" |
| | | bindrefresherpulling="{{refresh.onPulling}}" |
| | | class="list-container" |
| | | bindrefresherrefresh="onPullDownRefresh" |
| | | bindscrolltolower="onReachBottom" |
| | | > |
| | | <view slot="refresher" class="refresh-container"> |
| | |
| | | |
| | | .t-radio { |
| | | font-size: var(--td-radio-font-size, 28rpx) !important; |
| | | } |
| | | |
| | | .t-icon-base { |
| | | font-size: 44rpx; |
| | | } |
| | |
| | | src: '' |
| | | }) |
| | | if (options) { |
| | | console.log(options) |
| | | wx.setNavigationBarTitle({ |
| | | title: options.fileName, |
| | | skeletonLoding: true |
| | |
| | | const src = app.config.requestCtx + '/file/GetPdfPageImage?md5=' + data.md5 + '&index=' + (i + 1) + '&dpi=300' |
| | | list.push(src) |
| | | } |
| | | console.log(list) |
| | | that.setData({ |
| | | pdfList: list, |
| | | skeletonLoding: false, |
| | | }) |
| | | |
| | | } |
| | | }) |
| | | } |
| | |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" /> |
| | | </view> |
| | | <view wx:if="{{epubObj.fileType == 'pdf' && !skeletonLoding}}" class="pdfBox"> |
| | | <view wx:for="{{pdfList}}" wx:key="index" wx:for-item="item" wx:for-index="index" class="pdfItem"> |
| | | <view |
| | | wx:for="{{pdfList}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | class="pdfItem" |
| | | > |
| | | <image src="{{item}}" alt="" mode="widthFix"></image> |
| | | </view> |
| | | </view> |
| | | <web-view bind:message="drawBack" binderror="onError" bindload="onLoadWeb" src="{{src}}" id="webView" wx:if="{{epubObj.fileType !== 'pdf' && !skeletonLoding}}"></web-view> |
| | | </view> |
| | | <web-view |
| | | bind:message="drawBack" |
| | | binderror="onError" |
| | | bindload="onLoadWeb" |
| | | src="{{src}}" |
| | | id="webView" |
| | | wx:if="{{epubObj.fileType !== 'pdf' && !skeletonLoding}}" |
| | | ></web-view> |
| | | </view> |
| | |
| | | text-align: center; |
| | | } |
| | | |
| | | .pdfItem image { |
| | | height: 1000rpx !important; |
| | | } |
| | | |
| | | .body-loading { |
| | | padding: 200rpx 0; |
| | | text-align: center; |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | wx.setNavigationBarTitle({ |
| | | title: '资源详情' |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | console.log(options); |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | | |
| | | this.setData({ |
| | | navBarHeight: navBarHeight, |
| | | barHeight: systInfo.statusBarHeight, |
| | |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey) && epubObj.bookBuy) { |
| | | if (wx.getStorageSync(app.config.tokenKey) && epubObj && epubObj.bookBuy) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey) && epubObj.bookBuy) { |
| | | if (wx.getStorageSync(app.config.tokenKey) && epubObj && epubObj.bookBuy) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | |
| | | app.MG.store.getProductDetail(query).then((res) => { |
| | | console.log(res); |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | |
| | | |
| | | |
| | | |
| | | //刚刚进来的时候 |
| | | if (this.data.productLinkPath == item.productLinkPath) { |
| | | this.handleTeachData(item) |
| | | this.setData({ |
| | |
| | | selectType: item.selectType |
| | | }) |
| | | } |
| | | |
| | | |
| | | }) |
| | | }) |
| | | }, |
| | |
| | | onDownloadButton() { |
| | | const item = this.data.zipData; |
| | | if (this.data.applyState !== 'Normal') { |
| | | return wx.showToast({ |
| | | icon: 'none', |
| | | title: '请先申请下载', |
| | | }) |
| | | } else { |
| | | const flag = new Date(this.data.deadline) > new Date() |
| | | if (!flag) return wx.showToast({ |
| | | icon: 'none', |
| | | title: '请先申请下载', |
| | | }) |
| | | if (!this.data.deadline == '永久') { |
| | | const flag = new Date(this.data.deadline) > new Date() |
| | | return wx.showToast({ |
| | | icon: 'none', |
| | | title: '请先申请下载', |
| | | }) |
| | | } |
| | | } |
| | | if (!item || !item.file) { |
| | | wx.showToast({ |
| | |
| | | wx.showLoading({ |
| | | title: '正在下载...', |
| | | }); |
| | | |
| | | wx.downloadFile({ |
| | | url: downloadUrl, |
| | | success(res) { |
| | |
| | | console.log(item, 'item11111'); |
| | | if (item.selectType == 'picture') { |
| | | this.setData({ |
| | | |
| | | showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile, |
| | | |
| | | }) |
| | | console.log(this.data.showData, 'showData'); |
| | | } |
| | |
| | | webpageSrc: item.jsek_link |
| | | }) |
| | | } |
| | | |
| | | //文档等 |
| | | if (item.selectType == 'pdf' || item.selectType == 'document') { |
| | | app.MG.file.getPdfInfo({ |
| | |
| | | } |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | handleTap: function () { |
| | | const naturalResources = this.data.naturalResources; |
| | |
| | | // console.log(item); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | |
| | | onClick() { |
| | | this.setData({ |
| | |
| | | const { |
| | | index |
| | | } = e.detail; |
| | | |
| | | console.log('change', index); |
| | | }, |
| | | |
| | |
| | | preview(event) { |
| | | console.log(event.currentTarget.dataset.src) |
| | | let currentUrl = event.currentTarget.dataset.src |
| | | |
| | | wx.previewImage({ |
| | | current: currentUrl, // 当前显示图片的http链接 |
| | | // urls: this.data.showData // 需要预览的图片http链接列表 |
| | |
| | | </view> |
| | | <!-- bind:tap="onClick" --> |
| | | <view class="pictureBox" wx:if="{{selectType == 'picture'}}"> |
| | | <image src="{{showData}}" mode="aspectFit" data-src="{{showData}}" bindtap="preview" /> |
| | | <image |
| | | src="{{showData}}" |
| | | mode="aspectFit" |
| | | data-src="{{showData}}" |
| | | bindtap="preview" |
| | | /> |
| | | </view> |
| | | |
| | | <view wx:if="{{selectType == 'zip'}}"> |
| | |
| | | <image src="/static/images/document/zip200px.png" mode="aspectFill" /> |
| | | </view> |
| | | |
| | | |
| | | <view class="button-example"> |
| | | <t-button size="large" bind:tap="onDownloadButton"> |
| | | <view class="text"> |
| | | 下载 |
| | | </view> |
| | | <view class="text"> 下载 </view> |
| | | </t-button> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view wx:if="{{selectType == 'pdf' || selectType == 'document'}}"> |
| | | <view wx:for="{{naturalResources}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | <image src="{{item}}" alt="" style="min-height: 550px;"></image> |
| | | <view |
| | | wx:for="{{naturalResources}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | > |
| | | <image src="{{item}}" alt="" style="min-height: 550px"></image> |
| | | <view class="divider">第 {{index + 1}} 页</view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | <web-view wx:if="{{selectType == 'webpage'}}" src="{{webpageSrc}}"></web-view> |
| | | <!-- <button bind:tap="handleTap">点位</button> --> |
| | | |
| | | |
| | | |
| | | <!-- <t-button theme="primary" size="large" variant="outline" block>基础图片预览</t-button> --> |
| | | <t-toast id="t-toast" /> |
| | | <t-image-viewer usingCustomNavbar deleteBtn="{{deleteBtn}}" closeBtn="{{closeBtn}}" showIndex="{{showIndex}}" visible="{{visible}}" images="{{images}}" bind:change="onChange" bind:delete="onDelete" bind:close="onClose"></t-image-viewer> |
| | | <t-image-viewer |
| | | usingCustomNavbar |
| | | deleteBtn="{{deleteBtn}}" |
| | | closeBtn="{{closeBtn}}" |
| | | showIndex="{{showIndex}}" |
| | | visible="{{visible}}" |
| | | images="{{images}}" |
| | | bind:change="onChange" |
| | | bind:delete="onDelete" |
| | | bind:close="onClose" |
| | | ></t-image-viewer> |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | wx.setNavigationBarTitle({ |
| | | title: '资源详情-视频' |
| | | }); |
| | |
| | | showDialog(e) { |
| | | |
| | | this.setData({ |
| | | |
| | | dialogKey: true, |
| | | textvalue: '', |
| | | submitTitle: this.data.titleName |
| | |
| | | this.data.threeLeveData.forEach((items, index) => { // 修改此处添加index参数 |
| | | if (this.data.productLinkPath == items.productLinkPath) { |
| | | if (this.data.formPath === "jsek_cloudLearning") { |
| | | console.log(items); |
| | | let file |
| | | items.protectedFile ? file = items.protectedFile : file = items.freeFile |
| | | this.setData({ |
| | | showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + items.protectedFile + '&token=' + wx.getStorageSync(app.config.tokenKey), |
| | | showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey), |
| | | titleName: items.name |
| | | }) |
| | | } else { |
| | |
| | | titleName: items.name |
| | | }) |
| | | } |
| | | console.log(index, 'index'); |
| | | let selectedIndex = index; // 存储选中项的索引 |
| | | this.setData({ |
| | | selectedId: selectedIndex // 设置选中项的索引 |
| | |
| | | }); |
| | | } |
| | | }) |
| | | this.data.threeLeveData.forEach((item) => { |
| | | console.log(item.name); |
| | | }) |
| | | this.setData({ |
| | | loading: false, |
| | | hidden: false |
| | | }) |
| | | console.log('地址', this.data.showData); |
| | | }) |
| | | }, |
| | | onVideo(e) { |
| | | if (this.data.showData != '') { |
| | | this.setData({ |
| | | showData: '' |
| | | }) |
| | | } |
| | | |
| | | this.setData({ |
| | | selectedId: e.currentTarget.dataset.index, |
| | | }) |
| | | const item = e.currentTarget.dataset.item |
| | | this.setData({ |
| | | selectedId: e.currentTarget.dataset.index, |
| | | showData: '', |
| | | titleName: item.name |
| | | }) |
| | | |
| | | if (item.selectType == "video" || item.learnSelectType === "video") { |
| | | |
| | | // if (!item.file) { |
| | | // console.log(1111); |
| | | // } |
| | | |
| | | if (this.data.formPath === "jsek_cloudLearning") { |
| | | |
| | | let file |
| | | item.protectedFile ? file = item.protectedFile : file = item.freeFile |
| | | this.setData({ |
| | | showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + item.protectedFile + '&token=' + wx.getStorageSync(app.config.tokenKey) |
| | | showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey) |
| | | }) |
| | | console.log(this.data.showData); |
| | | } else { |
| | | this.setData({ |
| | | showData: item.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.freeFile, |
| | | }) |
| | | } |
| | | |
| | | console.log(this.data.showData, 'item.file'); |
| | | |
| | | } |
| | | }, |
| | | |
| | |
| | | productId: this.data.bookId, |
| | | appRefCode: app.config.appRefCode |
| | | }).then((res) => { |
| | | console.log(res); |
| | | |
| | | this.setData({ |
| | | topicId: res.id |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | newTopicMessageGet() { |
| | | let query = { |
| | |
| | | |
| | | // 标题改变 |
| | | changeTitle(e) { |
| | | console.log(e.currentTarget.dataset.value); |
| | | this.setData({ |
| | | flag: e.currentTarget.dataset.value |
| | | }) |
| | |
| | | noteList: res.datas, |
| | | loading: false |
| | | }) |
| | | console.log('笔记列表', res.datas); |
| | | }) |
| | | }, |
| | | // 编辑按钮 |
| | |
| | | noteId: note.id, |
| | | dialogKey: true, |
| | | }) |
| | | // this.showDialog() |
| | | }, |
| | | |
| | | // 删除笔记 |
| | |
| | | <!-- autoplay='false' 是否自动播放 --> |
| | | <!-- <video binderror="videoErrorCallback" src="{{showData}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video> --> |
| | | <video src="{{showData}}"></video> |
| | | |
| | | </view> |
| | | |
| | | <view wx:if="{{!videoChange}}" class="videoSubsidiaryBox"> |
| | | |
| | | <view class="videoNoData">暂无数据</view> |
| | | |
| | | </view> |
| | | |
| | | <!-- 标题 --> |
| | | <view class="titleBox">{{titleName}}</view> |
| | | <view class="contentBox"> |
| | | <t-tabs defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel" split="{{false}}"> |
| | | <t-tabs |
| | | defaultValue="{{0}}" |
| | | bind:change="onTabsChange" |
| | | bind:click="onTabsClick" |
| | | t-class="custom-tabs" |
| | | t-class-content="custom-panel" |
| | | split="{{false}}" |
| | | > |
| | | <!-- 资源列表 --> |
| | | <t-tab-panel label="资源列表" value="0" style="{{tabPanelstyle}}" style="width: 750rpx;"> |
| | | <t-tab-panel |
| | | label="资源列表" |
| | | value="0" |
| | | style="{{tabPanelstyle}}" |
| | | style="width: 750rpx" |
| | | > |
| | | <view class="wrapper"> |
| | | |
| | | |
| | | <view class="outsideDetailsName"> |
| | | <view class="titleBox">{{parentName}}</view> |
| | | <view class="detailsName" wx:for="{{threeLeveData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bind:tap="onVideo" data-item="{{item}}" data-index="{{index}}"> |
| | | <view style="color: {{selectedId == index ? '#ff6c00' : '#000'}}">{{item.name}}</view> |
| | | <view |
| | | class="detailsName" |
| | | wx:for="{{threeLeveData}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | bind:tap="onVideo" |
| | | data-item="{{item}}" |
| | | data-index="{{index}}" |
| | | > |
| | | <view style="color: {{selectedId == index ? '#ff6c00' : '#000'}}" |
| | | >{{item.name}}</view |
| | | > |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </t-tab-panel> |
| | | <!-- 笔记展示 --> |
| | | <t-tab-panel label="笔记" value="1" style="{{tabPanelstyle}}"> |
| | | |
| | | <view class="wrapper"> |
| | | |
| | | |
| | | <view wx:if="{{!noteList.length}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | |
| | | </view> |
| | | <t-collapse value="{{activeValues}}" bind:change="handleChange"> |
| | | <t-collapse-panel value="{{item.id}}" expandIcon wx:for="{{noteList}}"> |
| | | <t-collapse-panel |
| | | value="{{item.id}}" |
| | | expandIcon |
| | | wx:for="{{noteList}}" |
| | | wx:key="id" |
| | | > |
| | | <view slot="header" class="collapse-header"> |
| | | <t-image class="note-icon" src="/static/images/bookService/detail/note-icon.png"></t-image> |
| | | <t-image |
| | | class="note-icon" |
| | | src="/static/images/bookService/detail/note-icon.png" |
| | | ></t-image> |
| | | <view class="header-name">{{item.name}}</view> |
| | | </view> |
| | | <view> |
| | |
| | | <view class="note-bottom"> |
| | | <view class="note-time">{{item.createDate}}</view> |
| | | <view class="bottom-btn"> |
| | | <t-image src="/static/images/bookService/detail/compliceHover.png" class="complice" bind:tap="editNote" data-note="{{item}}"></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/compliceHover.png" |
| | | class="complice" |
| | | bind:tap="editNote" |
| | | data-note="{{item}}" |
| | | ></t-image> |
| | | <view></view> |
| | | <t-image src="/static/images/bookService/detail/deleteHover.png" class="delete" bind:tap="deleteNote" data-id="{{item.id}}"></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/deleteHover.png" |
| | | class="delete" |
| | | bind:tap="deleteNote" |
| | | data-id="{{item.id}}" |
| | | ></t-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- 记笔记 --> |
| | | <view class="takeNotes" data-key="showCloseBtn" bind:tap="showDialog"> |
| | | <view class="takeNotesLining"> |
| | | <image src="/static/images/resourceDetails/jibiji/icon@2x.png" mode="" /> 记笔记 |
| | | <image |
| | | src="/static/images/resourceDetails/jibiji/icon@2x.png" |
| | | mode="" |
| | | /> |
| | | 记笔记 |
| | | </view> |
| | | </view> |
| | | <view class="buttonBox"></view> |
| | | </view> |
| | | |
| | | |
| | | <!-- 记笔记弹窗 --> |
| | | <t-popup visible="{{dialogKey}}" bind:visible-change="onVisibleChange" placement="center"> |
| | | <t-popup |
| | | visible="{{dialogKey}}" |
| | | bind:visible-change="onVisibleChange" |
| | | placement="center" |
| | | > |
| | | <view class="popup"> |
| | | <view slot="title"> |
| | | <view class="title-text" wx:if="{{!flag}}"> |
| | | <text class="note-title">{{submitTitle}}</text> |
| | | <t-image src="/static/images/bookService/detail/edit.png" class="edit-icon" bind:tap="changeTitle" data-value="{{true}}"></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/edit.png" |
| | | class="edit-icon" |
| | | bind:tap="changeTitle" |
| | | data-value="{{true}}" |
| | | ></t-image> |
| | | </view> |
| | | <view wx:else> |
| | | <t-input value="{{submitTitle}}" style="{{inputStyle}}" data-value="{{false}}" bind:enter="changeTitle" bind:blur="changeTitle" maxlength="{{50}}" bind:change="inputChange"></t-input> |
| | | <t-input |
| | | value="{{submitTitle}}" |
| | | style="{{inputStyle}}" |
| | | data-value="{{false}}" |
| | | bind:enter="changeTitle" |
| | | bind:blur="changeTitle" |
| | | maxlength="{{50}}" |
| | | bind:change="inputChange" |
| | | ></t-input> |
| | | </view> |
| | | </view> |
| | | <view slot='content'> |
| | | <view slot="content"> |
| | | <view class="textarea-example"> |
| | | <text class="textarea-example__label">内容:</text> |
| | | <t-textarea value="{{textvalue}}" t-class="external-class" placeholder="请输入文字" bordered maxlength="500" disableDefaultPadding="{{true}}" indicator style="{{inputStyle}}" bind:change="textareaChange" /> |
| | | <t-textarea |
| | | value="{{textvalue}}" |
| | | t-class="external-class" |
| | | placeholder="请输入文字" |
| | | bordered |
| | | maxlength="500" |
| | | disableDefaultPadding="{{true}}" |
| | | indicator |
| | | style="{{inputStyle}}" |
| | | bind:change="textareaChange" |
| | | /> |
| | | </view> |
| | | <view class="submit-btn"> |
| | | <t-button theme="primary" size="large" block bind:tap="confirmSuggest">提交</t-button> |
| | | <t-button theme="primary" size="large" block bind:tap="confirmSuggest" |
| | | >提交</t-button |
| | | > |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="closeDialog" /> |
| | | <t-icon |
| | | t-class="close-btn" |
| | | name="close-circle" |
| | | size="32" |
| | | color="#fff" |
| | | bind:tap="closeDialog" |
| | | /> |
| | | </t-popup> |
| | | </view> |
| | | </view> |
| | |
| | | }, |
| | | onResetSecond() { |
| | | this.setData({ |
| | | pathList: [], |
| | | 'secondList.value': [], |
| | | }); |
| | | this.getBookList(false); |
| | |
| | | </view> |
| | | <view class="list-header"> |
| | | <view class="header-scroll"> |
| | | <!-- <scroll-view scroll-x scroll-with-animation='true' class="srcolbox"> --> |
| | | <view class="srcolbox"> |
| | | <t-dropdown-menu> |
| | | <t-dropdown-item |
| | |
| | | /> |
| | | </t-dropdown-menu> |
| | | </view> |
| | | <!-- </scroll-view> --> |
| | | </view> |
| | | <!-- <view class=" header-sort" bind:tap="sortClick"> |
| | | <view class="sort-name">排序</view> |
| | |
| | | scroll-y |
| | | refresher-enabled="{{true}}" |
| | | lower-threshold="{{200}}" |
| | | refresher-threshold="{{80}}" |
| | | refresher-threshold="{{180}}" |
| | | refresher-default-style="none" |
| | | refresher-triggered="{{triggered}}" |
| | | bindrefresherpulling="{{refresh.onPulling}}" |
| | |
| | | }).then(res => { |
| | | // console.log(res.datas[0].content); |
| | | let modifiedContent = `<div class="richTextBox">${res.datas[0].content}</div>`; |
| | | // modifiedContent = modifiedContent.replace(/\<table/gi, '<table class="aboutUs-rich-table"').replace(/\<td/gi, '<table class="aboutUs-rich-td"').replace(/\<p/gi, '<p class="aboutUs-rich-p"') |
| | | console.log(modifiedContent); |
| | | this.setData({ |
| | | aboutText: modifiedContent, |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | // this.getDataList(false); |
| | | }, |
| | | onShow() { |
| | | this.getDataList(false); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | |
| | | |
| | | |
| | | this.higherGet() |
| | | this.vocationalGet() |
| | | this.teacherGet() |
| | | |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | |
| | | |
| | | }, |
| | | onTabsChange(event) { |
| | | |
| | | const value = event.detail.value |
| | | |
| | | if (value === '0') { |
| | | console.log(value); |
| | | this.setData({ |
| | |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | |
| | | //高等教育 |
| | | higherGet(keyword) { |
| | | // console.log(keyword, 'keyword'); |
| | |
| | | 'Name*': keyword, |
| | | '||author*': keyword, |
| | | '||isbn*': keyword |
| | | |
| | | } |
| | | |
| | | app.MG.resource.getItem({ |
| | | path: 'jsek_biblioClassification\\jsek_bCHigherEducation', |
| | | queryType: '*', |
| | |
| | | res.datas.forEach(item => { |
| | | item.determine = true |
| | | }) |
| | | // console.log(res, 789111); |
| | | this.setData({ |
| | | higherList: res.datas, |
| | | higherTotal: res.total |
| | | }) |
| | | // console.log(this.data.higherList, '5555'); |
| | | this.setData({ |
| | | loading: false, //开启骨架屏加载 |
| | | hidden: false, //是否展示内容 |
| | | }) |
| | | }) |
| | | wx.stopPullDownRefresh() |
| | | |
| | | |
| | | }, |
| | | |
| | | //教师教育 |
| | |
| | | 'Name*': keyword, |
| | | '||author*': keyword, |
| | | '||isbn*': keyword |
| | | |
| | | } |
| | | app.MG.resource.getItem({ |
| | | path: 'jsek_biblioClassification\\jsek_bCVocationalEducation', |
| | |
| | | vocationalList: res.datas, |
| | | vocationalTotal: res.total |
| | | }) |
| | | |
| | | }) |
| | | wx.stopPullDownRefresh() |
| | | }, |
| | |
| | | 'Name*': keyword, |
| | | '||author*': keyword, |
| | | '||isbn*': keyword |
| | | |
| | | } |
| | | app.MG.resource.getItem({ |
| | | path: 'jsek_biblioClassification\\jsek_bCTeacherEducation', |
| | |
| | | // }, 2000); |
| | | // }, |
| | | downloadData(event) { |
| | | |
| | | const item = event.currentTarget.dataset.item |
| | | console.log(item); |
| | | if (item.fileType == "pdf") { |
| | | |
| | | wx.navigateTo({ |
| | | url: "/packageBookService/pages/components/webView/index?md5=" + |
| | | item.freeFile + |
| | |
| | | theme: 'warning', |
| | | direction: 'column', |
| | | }); |
| | | console.log(456); |
| | | } |
| | | |
| | | |
| | | |
| | | }, |
| | | onSearchSubmit: function (e) { |
| | | const keyword = e.detail.value; |
| | |
| | | this.vocationalGet(keyword) |
| | | this.teacherGet(keyword) |
| | | }, |
| | | |
| | | |
| | | goBack() { |
| | | wx.navigateBack(); |
| | | }, |
| | | onReachBottom(e) { |
| | | if (this.data.tabValue == 0) { |
| | | console.log(0); |
| | | if (this.data.higherList.length < this.data.higherTotal) { |
| | | this.setData({ |
| | | isMore: true, |
| | |
| | | isMore: false |
| | | }) |
| | | }, 100) |
| | | |
| | | } |
| | | |
| | | } else if (this.data.tabValue == 2) { |
| | | |
| | | if (this.data.teacherList.length < this.data.teacherTotal) { |
| | | this.setData({ |
| | | isMore: true, |
| | |
| | | isMore: false |
| | | }) |
| | | }, 100) |
| | | |
| | | } |
| | | |
| | | } else if (this.data.tabValue == 1) { |
| | | |
| | | console.log(this.data.vocationalList.length); |
| | | console.log(this.data.vocationalTotal); |
| | | if (this.data.vocationalList.length < this.data.vocationalTotal) { |
| | |
| | | isMore: false |
| | | }) |
| | | }, 100) |
| | | |
| | | } |
| | | console.log(2); |
| | | } |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | |
| | | mailbox(e) { |
| | | const key = e.currentTarget.dataset.key; |
| | | const item = e.currentTarget.dataset.item; |
| | | |
| | | |
| | | |
| | | this.setData({ |
| | | // [key]: true, |
| | | // dialogKey: key, |
| | | hiddenmodalput: true, |
| | | input: '', |
| | | Md5: item.datas.freeFile.FileList[0].Md5 |
| | | |
| | | }); |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | onEmailInput(e) { |
| | | const isEmailValid = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(e.detail.value); |
| | | this.setData({ |
| | | emailError: !isEmailValid, |
| | | "input": e.detail.value, |
| | | }); |
| | | }, |
| | | //弹窗确认 |
| | | onConfirm() { |
| | | if (!this.data.emailError && this.data.input) { |
| | | const { |
| | | dialogKey |
| | | } = this.data; |
| | | this.setData({ |
| | | [dialogKey]: false |
| | | }); |
| | | |
| | | |
| | | console.log(this.data.input); |
| | | console.log(this.data.Md5); |
| | | if (this.data.input) { |
| | | let query = { |
| | | eMail: this.data.input, |
| | | md5s: [this.data.Md5] |
| | | }) |
| | | wx.showModal({ |
| | | title: '请输入邮箱', |
| | | content: '', |
| | | confirmColor: '#ff6c00', |
| | | cancelColor: '#949494', |
| | | placeholderText: '请输入邮箱号', |
| | | editable: true, |
| | | complete: (res) => { |
| | | if (res.cancel) { |
| | | console.log('取消'); |
| | | } |
| | | app.MG.file.sendFileWithEmail(query).then(res => { |
| | | console.log(res); |
| | | }) |
| | | if (res.confirm) { |
| | | this.setData({ |
| | | input: res.content |
| | | }) |
| | | this.confirmM() |
| | | } |
| | | } |
| | | } else { |
| | | // 校验不通过,给出错误提示 |
| | | wx.showToast({ |
| | | title: '邮箱格式不正确', |
| | | icon: 'none', |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | // 弹窗取消 |
| | | closeDialog() { |
| | | const { |
| | | dialogKey |
| | | } = this.data; |
| | | this.setData({ |
| | | [dialogKey]: false |
| | | }); |
| | | console.log(111); |
| | | }, |
| | | //取消弹框 |
| | | cancelM: function (e) { |
| | | this.setData({ |
| | | hiddenmodalput: false, |
| | | }) |
| | | }, |
| | | //提交 |
| | | confirmM: function (e) { |
| | | console.log("姓名:" + this.data.name + " 电话:" + this.data.phoneNum); |
| | | if (!this.data.emailError && this.data.name) { |
| | | |
| | | |
| | | |
| | | |
| | | if (this.data.name) { |
| | | let query = { |
| | | eMail: this.data.name, |
| | | md5s: [this.data.Md5] |
| | | } |
| | | app.MG.file.sendFileWithEmail(query).then(res => { |
| | | console.log(res); |
| | | this.setData({ |
| | | hiddenmodalput: false, |
| | | }) |
| | | }) |
| | | confirmM(e) { |
| | | const isEmailValid = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(this.data.input); |
| | | if (isEmailValid && this.data.input) { |
| | | let query = { |
| | | eMail: this.data.input, |
| | | md5s: [this.data.Md5] |
| | | } |
| | | app.MG.file.sendFileWithEmail(query).then(res => { |
| | | if (res) { |
| | | wx.showToast({ |
| | | icon: 'success', |
| | | title: '邮件已发送', |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | // 校验不通过,给出错误提示 |
| | | wx.showToast({ |
| | |
| | | icon: 'none', |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | |
| | | iName: function (e) { |
| | | this.setData({ |
| | | name: e.detail.value |
| | | }) |
| | | // console.log(this.data.name); |
| | | }, |
| | | iPhoneNum: function (e) { |
| | | this.setData({ |
| | | phoneNum: e.detail.value |
| | | }) |
| | | }, |
| | | |
| | | |
| | | }) |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-tabs": "tdesign-miniprogram/tabs/tabs", |
| | | "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", |
| | |
| | | "t-toast": "tdesign-miniprogram/toast/toast" |
| | | }, |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": true, |
| | | "onReachBottomDistance": 200, |
| | | "backgroundTextStyle": "dark" |
| | | } |
| | |
| | | <import src="index.skeleton.wxml" /> |
| | | <template is="skeleton" wx:if="{{loading}}" /> |
| | | |
| | | |
| | | <view hidden="{{hidden}}"> |
| | | |
| | | |
| | | <view class="bibliographyList"> |
| | | <view class="titlesBox"> |
| | | <!--pages/bibliographyList/index.wxml--> |
| | | <view wx:if="{{downloadLoadin}}" class="loadinBox"> |
| | | <t-loading class="colors" theme="circular" size="70rpx" class="wrapper" /> |
| | | <view wx:if="{{!loading}}"> |
| | | <view wx:if="{{downloadLoadin}}" class="loadinBox"> |
| | | <t-loading class="colors" theme="circular" size="70rpx" class="wrapper" /> |
| | | </view> |
| | | <view class="titleBox"> |
| | | <view |
| | | style="width: 100%; height: {{barHeight}}px; background-color: #fff;" |
| | | ></view> |
| | | <view |
| | | class="nacigationBar" |
| | | style="width: 100%; height: {{navBarHeight}}px;" |
| | | > |
| | | <view> |
| | | <t-icon |
| | | name="chevron-left" |
| | | size="30" |
| | | data-name="{{item}}" |
| | | bind:click="goBack" |
| | | /> |
| | | </view> |
| | | <view class="bibliographyListBox"></view> |
| | | <view class="titleBox"> |
| | | <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> |
| | | <view class="example-search"> |
| | | <t-search model:value="{{value}}" placeholder="请输入书目名称" bind:submit="onSearchSubmit"> |
| | | </t-search> |
| | | <!-- <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" /> --> |
| | | </view> |
| | | </view> |
| | | <view class="example-search"> |
| | | <t-search |
| | | model:value="{{value}}" |
| | | placeholder="请输入书目名称" |
| | | bind:submit="onSearchSubmit" |
| | | > |
| | | </t-search> |
| | | </view> |
| | | </view> |
| | | <t-tabs class="contentBox" defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel"> |
| | | </view> |
| | | <view class="page-content"> |
| | | <t-tabs |
| | | class="contentBox" |
| | | defaultValue="{{0}}" |
| | | bind:change="onTabsChange" |
| | | bind:click="onTabsClick" |
| | | t-class="custom-tabs" |
| | | t-class-content="custom-panel" |
| | | > |
| | | <t-tab-panel label="高等教育({{higherTotal}})" value="0"> |
| | | |
| | | |
| | | |
| | | <view wx:if="{{higherList.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | <view wx:else class="outsideHigherBox"> |
| | | |
| | | <view class="higherBox" wx:for="{{higherList}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | <view class="outsideHigherImageBox"> |
| | | <view class="higherImageBox"> |
| | | <image wx:if="{{item.icon}}" data-item="{{item}}" bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" /> |
| | | <image wx:if="{{!item.icon}}" src="/static/images/default-book-img.png" mode="aspectFill" data-item="{{item}}" bind:tap="downloadData" /> |
| | | <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> |
| | | <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="aspectFit" /> |
| | | <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="aspectFit" /> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | wx:else |
| | | class="scroll-box" |
| | | refresher-enabled="{{true}}" |
| | | lower-threshold="{{200}}" |
| | | refresher-threshold="{{80}}" |
| | | refresher-default-style="none" |
| | | refresher-triggered="{{triggered}}" |
| | | bindscrolltolower="onReachBottom" |
| | | > |
| | | <view class="outsideHigherBox"> |
| | | <view |
| | | class="higherBox" |
| | | wx:for="{{higherList}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | > |
| | | <view class="outsideHigherImageBox"> |
| | | <view class="higherImageBox"> |
| | | <image |
| | | wx:if="{{item.icon}}" |
| | | data-item="{{item}}" |
| | | bind:tap="downloadData" |
| | | src="{{item.icon}}" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:if="{{!item.icon}}" |
| | | src="/static/images/default-book-img.png" |
| | | mode="aspectFill" |
| | | data-item="{{item}}" |
| | | bind:tap="downloadData" |
| | | /> |
| | | <view |
| | | class="downloadIcon" |
| | | data-item="{{item}}" |
| | | data-key="showWithInput" |
| | | bind:tap="mailbox" |
| | | > |
| | | <image |
| | | wx:if="{{determine}}" |
| | | class="download" |
| | | src="/static/images/bibliographyList/email-click.png" |
| | | mode="aspectFit" |
| | | /> |
| | | <image |
| | | wx:else="" |
| | | class="downloadshiftin" |
| | | src="/static/images/bibliographyList/email.png" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="higherTextBox">{{item.name}}</view> |
| | | </view> |
| | | <view class="higherTextBox">{{item.name}}</view> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{higherList.length > 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <view wx:if="{{higherList.length > 0}}" class="bottom-box"> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </scroll-view> |
| | | </t-tab-panel> |
| | | <t-tab-panel label="职业教育({{vocationalTotal}})" value="1"> |
| | | <view wx:if="{{vocationalList.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view wx:else class="outsideHigherBox"> |
| | | <view class="higherBox" wx:for="{{vocationalList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}"> |
| | | <view class="outsideHigherImageBox"> |
| | | <view class="higherImageBox"> |
| | | <image wx:if="{{item.icon}}" data-item="{{item}}" bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" /> |
| | | <image wx:if="{{!item.icon}}" src="/static/images/default-book-img.png" mode="aspectFill" data-item="{{item}}" bind:tap="downloadData" /> |
| | | <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> |
| | | <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="aspectFit" /> |
| | | <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="aspectFit" /> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | wx:else |
| | | class="scroll-box" |
| | | refresher-enabled="{{true}}" |
| | | lower-threshold="{{200}}" |
| | | refresher-threshold="{{80}}" |
| | | refresher-default-style="none" |
| | | refresher-triggered="{{triggered}}" |
| | | bindscrolltolower="onReachBottom" |
| | | > |
| | | <view class="outsideHigherBox"> |
| | | <view |
| | | class="higherBox" |
| | | wx:for="{{vocationalList}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | data-item="{{item}}" |
| | | > |
| | | <view class="outsideHigherImageBox"> |
| | | <view class="higherImageBox"> |
| | | <image |
| | | wx:if="{{item.icon}}" |
| | | data-item="{{item}}" |
| | | bind:tap="downloadData" |
| | | src="{{item.icon}}" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:if="{{!item.icon}}" |
| | | src="/static/images/default-book-img.png" |
| | | mode="aspectFill" |
| | | data-item="{{item}}" |
| | | bind:tap="downloadData" |
| | | /> |
| | | <view |
| | | class="downloadIcon" |
| | | data-item="{{item}}" |
| | | data-key="showWithInput" |
| | | bind:tap="mailbox" |
| | | > |
| | | <image |
| | | wx:if="{{determine}}" |
| | | class="download" |
| | | src="/static/images/bibliographyList/email-click.png" |
| | | mode="aspectFit" |
| | | /> |
| | | <image |
| | | wx:else="" |
| | | class="downloadshiftin" |
| | | src="/static/images/bibliographyList/email.png" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="higherTextBox">{{item.name}}</view> |
| | | </view> |
| | | <view class="higherTextBox">{{item.name}}</view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view wx:if="{{vocationalList.length > 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | <view wx:if="{{vocationalList.length > 0}}" class="bottom-box"> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </scroll-view> |
| | | </t-tab-panel> |
| | | <t-tab-panel label="教师教育({{teacherTotal}})" value="2"> |
| | | |
| | | <view wx:if="{{teacherList.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | <view wx:else class="outsideHigherBox"> |
| | | <view class="higherBox" wx:for="{{teacherList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}"> |
| | | <view class="outsideHigherImageBox"> |
| | | <view class="higherImageBox"> |
| | | <image wx:if="{{item.icon}}" data-item="{{item}}" bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" /> |
| | | <image wx:if="{{!item.icon}}" src="/static/images/default-book-img.png" mode="aspectFill" data-item="{{item}}" bind:tap="downloadData" /> |
| | | <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> |
| | | <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="aspectFit" /> |
| | | <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="aspectFit" /> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | wx:else |
| | | class="scroll-box" |
| | | refresher-enabled="{{true}}" |
| | | lower-threshold="{{200}}" |
| | | refresher-threshold="{{80}}" |
| | | refresher-default-style="none" |
| | | refresher-triggered="{{triggered}}" |
| | | bindscrolltolower="onReachBottom" |
| | | > |
| | | <view class="outsideHigherBox"> |
| | | <view |
| | | class="higherBox" |
| | | wx:for="{{teacherList}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | data-item="{{item}}" |
| | | > |
| | | <view class="outsideHigherImageBox"> |
| | | <view class="higherImageBox"> |
| | | <image |
| | | wx:if="{{item.icon}}" |
| | | data-item="{{item}}" |
| | | bind:tap="downloadData" |
| | | src="{{item.icon}}" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:if="{{!item.icon}}" |
| | | src="/static/images/default-book-img.png" |
| | | mode="aspectFill" |
| | | data-item="{{item}}" |
| | | bind:tap="downloadData" |
| | | /> |
| | | <view |
| | | class="downloadIcon" |
| | | data-item="{{item}}" |
| | | data-key="showWithInput" |
| | | bind:tap="mailbox" |
| | | > |
| | | <image |
| | | wx:if="{{determine}}" |
| | | class="download" |
| | | src="/static/images/bibliographyList/email-click.png" |
| | | mode="aspectFit" |
| | | /> |
| | | <image |
| | | wx:else="" |
| | | class="downloadshiftin" |
| | | src="/static/images/bibliographyList/email.png" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="higherTextBox">{{item.name}}</view> |
| | | </view> |
| | | <view class="higherTextBox">{{item.name}}</view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view wx:if="{{teacherList.length > 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | <view wx:if="{{teacherList.length > 0}}" class="bottom-box"> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </scroll-view> |
| | | </t-tab-panel> |
| | | </t-tabs> |
| | | </view> |
| | | <view class="dialogBox"> |
| | | <t-dialog visible="{{showWithInput}}" title="请输入邮箱" confirm-btn="确定" cancel-btn="取消" bind:confirm="onConfirm" bind:cancel="closeDialog"> |
| | | |
| | | <t-input model:value="{{input}}" borderless class="dialog-input" clearable slot="content" placeholder="请输入邮箱号" placeholder-class="placeholder" bindchange="onEmailInput" /> |
| | | |
| | | </t-dialog> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <modal hidden="{{!hiddenmodalput}}" title="请输入邮箱" confirm-text="确定" cancel-text="取消" bindcancel="cancelM" bindconfirm="confirmM" style="height: 300rpx !important;"> |
| | | <view style="height: 50rpx;"></view> |
| | | <input bindinput='iName' type='text' placeholder="请输入邮箱号" auto-focus /> |
| | | <view style="height: 50rpx;"></view> |
| | | </modal> |
| | | |
| | | |
| | | |
| | | |
| | | <t-toast id="t-toast" /> |
| | | <t-toast id="t-toast" /> |
| | |
| | | /* pages/bibliographyList/index.wxss */ |
| | | /* .custom-tabs { |
| | | margin-bottom: 32rpx; |
| | | } |
| | | |
| | | .custom-panel { |
| | | height: 120px; |
| | | } */ |
| | | @import "./index.skeleton.wxss"; |
| | | |
| | | .nacigationBar { |
| | |
| | | } |
| | | |
| | | .higherTextBox { |
| | | height: 50rpx; |
| | | height: 55rpx; |
| | | font-weight: bold; |
| | | font-size: 25rpx; |
| | | color: #333333; |
| | |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | |
| | | .outsideHigherImageBox {} |
| | | |
| | | .downloadIcon { |
| | | width: 34rpx; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | .example-search { |
| | | background-color: #fff; |
| | | } |
| | | |
| | | |
| | | .search_icones { |
| | | position: absolute; |
| | |
| | | width: 100%; |
| | | z-index: 999; |
| | | height: 200rpx; |
| | | } |
| | | |
| | | .contentBox { |
| | | margin-top: 180rpx; |
| | | } |
| | | |
| | | .noDataBox { |
| | |
| | | .scrollViewBox { |
| | | height: calc(100vh - 326rpx); |
| | | /* width: calc(100vw - 60rpx); */ |
| | | } |
| | | |
| | | .page-content { |
| | | height: calc(100vh - 176rpx); |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .scroll-box { |
| | | height: calc(100vh - 264rpx - env(safe-area-inset-bottom)); |
| | | padding-bottom: env(safe-area-inset-bottom); |
| | | } |
| | |
| | | // pages/bookExhibitionList/index.js |
| | | import Toast from 'tdesign-miniprogram/toast/index'; |
| | | import watch from './watch/watch' |
| | | const app = getApp() |
| | | import Toast from "tdesign-miniprogram/toast/index"; |
| | | import watch from "./watch/watch"; |
| | | const app = getApp(); |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | name: "测试watch", |
| | | newPrice: '', |
| | | newPrice: "", |
| | | loading: true, |
| | | hidden: true, |
| | | totalSize: '', |
| | | totalSize: "", |
| | | start: 0, |
| | | isMore: null, |
| | | keynoteDisabled: true, |
| | | value: '', |
| | | keyword: '', |
| | | value: "", |
| | | keyword: "", |
| | | nameSort: null, |
| | | total: null, |
| | | page: { |
| | | start: 0, |
| | | size: 16 |
| | | size: 16, |
| | | }, |
| | | keynoteValue: null, |
| | | filteredItems: [], |
| | | newValue: null, |
| | | bookExhibitionList: [], |
| | | sorter: { |
| | | value: 'default', |
| | | value: "default", |
| | | }, |
| | | product: { |
| | | value: '*', |
| | | value: "*", |
| | | options: [{ |
| | | value: '*', |
| | | label: '总分类', |
| | | value: "*", |
| | | label: "总分类", |
| | | }, |
| | | { |
| | | value: 'jsek_bFHigherEducation', |
| | | label: '高等教育', |
| | | value: "jsek_bFHigherEducation", |
| | | label: "高等教育", |
| | | }, |
| | | { |
| | | value: 'jsek_bFVocationalEducation', |
| | | label: '职业教育', |
| | | value: "jsek_bFVocationalEducation", |
| | | label: "职业教育", |
| | | }, |
| | | { |
| | | value: 'jsek_bFTeacherEducation', |
| | | label: '教师教育', |
| | | value: "jsek_bFTeacherEducation", |
| | | label: "教师教育", |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | value: [], |
| | | options: [], |
| | | }, |
| | | navBarHeight: '', |
| | | barHeight: '', |
| | | windowHeight: '', |
| | | navBarHeight: "", |
| | | barHeight: "", |
| | | windowHeight: "", |
| | | sorter: { |
| | | value: 'timeAsc', |
| | | value: "timeAsc", |
| | | options: [{ |
| | | value: 'nameAsc', |
| | | label: '名称正序', |
| | | value: "nameAsc", |
| | | label: "名称正序", |
| | | }, |
| | | { |
| | | value: 'nameDesc', |
| | | label: '名称倒序', |
| | | value: "nameDesc", |
| | | label: "名称倒序", |
| | | }, |
| | | { |
| | | value: 'timeAsc', |
| | | label: '出版时间正序', |
| | | value: "timeAsc", |
| | | label: "出版时间正序", |
| | | }, |
| | | { |
| | | value: 'timeDesc', |
| | | label: '出版时间倒序', |
| | | value: "timeDesc", |
| | | label: "出版时间倒序", |
| | | }, |
| | | ], |
| | | }, |
| | | newValue: '' |
| | | newValue: "", |
| | | disbaleProject: true, |
| | | disabledSort: false |
| | | }, |
| | | |
| | | |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | // this.setData({ |
| | | // 'product.value': '*', |
| | | // }); |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | | const navBarHeight = |
| | | (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | | this.setData({ |
| | | navBarHeight: navBarHeight, |
| | | barHeight: systInfo.statusBarHeight, |
| | | }) |
| | | |
| | | |
| | | // watch.setWatcher(this); |
| | | // let that = this; |
| | | // setTimeout(function () { |
| | | // that.data.name = "测试watch变化了" |
| | | // }, 500) |
| | | console.log(11111); |
| | | }, |
| | | watch: { |
| | | name: function (newVal, oldVal) { |
| | | //这里的this和onLoad里的this指向一样 |
| | | console.log(newVal, oldVal); |
| | | }, |
| | | newPrice: function (newVal, oldVal) { |
| | | console.log(newVal, oldVal); |
| | | } |
| | | }); |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | onReady() {}, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | this.bookExhibitionGet() |
| | | this.keyProjectsGet(this.data.newPrice) |
| | | this.bookExhibitionGet(); |
| | | this.keyProjectsGet(this.data.newPrice); |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | onHide() {}, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | |
| | | |
| | | }, |
| | | onUnload() {}, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | // onPullDownRefresh() { |
| | | // this.data.page.size = 16 //更改显示的值 |
| | | // this.bookExhibitionGet(); // 调用方法加载更多数据 |
| | | // }, |
| | | |
| | | onPullDownRefresh() {}, |
| | | onScrollToLower() { |
| | | |
| | | if (this.data.bookExhibitionList.length < this.data.totalSize) { |
| | | this.setData({ |
| | | isMore: true, |
| | | start: this.data.start + 1 |
| | | }) |
| | | this.bookExhibitionGet() |
| | | start: this.data.start + 1, |
| | | }); |
| | | this.bookExhibitionGet(); |
| | | } else { |
| | | this.setData({ |
| | | isMore: true, |
| | | }) |
| | | }); |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | isMore: false |
| | | }) |
| | | |
| | | }, 300) |
| | | isMore: false, |
| | | }); |
| | | }, 300); |
| | | } |
| | | }, |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | if (this.data.page.size >= this.data.total) { |
| | | Toast({ |
| | | context: this, |
| | | selector: '#t-toast', |
| | | message: '没有更多了', |
| | | direction: 'column', |
| | | selector: "#t-toast", |
| | | message: "没有更多了", |
| | | direction: "column", |
| | | duration: 1000, |
| | | preventScrollThrough: true, |
| | | icon: 'poweroff', |
| | | icon: "poweroff", |
| | | }); |
| | | } else { |
| | | // const currentPage = this.data.page.start + 1; // 获取当前页数并加1 |
| | | const newSize = this.data.page.size + 10; // 原来的基础上加10 |
| | | this.setData({ |
| | | // 'page.start': currentPage, |
| | | 'page.size': newSize |
| | | "page.size": newSize, |
| | | }); |
| | | // this.bookExhibitionGet(); // 调用方法加载更多数据 |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | // 图片数据的接口 |
| | | bookExhibitionGet(newValue) { |
| | | wx.showLoading({ |
| | | title: '加载中...', |
| | | this.setData({ |
| | | disabledSort: false |
| | | }) |
| | | let searchObj = { |
| | | 'Name*': this.data.keyword, |
| | | '||subtitle*': this.data.keyword |
| | | } |
| | | |
| | | let sort = {}; |
| | | |
| | | const sortOptions = { |
| | | '*': { |
| | | CreateDate: 'Asc' |
| | | }, |
| | | 'nameAsc': { |
| | | Name: 'Asc' |
| | | }, |
| | | 'nameDesc': { |
| | | Name: 'Desc' |
| | | }, |
| | | 'timeAsc': { |
| | | CreateDate: 'Asc' |
| | | }, |
| | | 'timeDesc': { |
| | | CreateDate: 'Desc' |
| | | } |
| | | "Name*": this.data.keyword, |
| | | "||subtitle*": this.data.keyword, |
| | | }; |
| | | |
| | | let sort = {}; |
| | | const sortOptions = { |
| | | "*": { |
| | | CreateDate: "Asc", |
| | | }, |
| | | nameAsc: { |
| | | Name: "Asc", |
| | | }, |
| | | nameDesc: { |
| | | Name: "Desc", |
| | | }, |
| | | timeAsc: { |
| | | CreateDate: "Asc", |
| | | }, |
| | | timeDesc: { |
| | | CreateDate: "Desc", |
| | | }, |
| | | }; |
| | | sort = sortOptions[this.data.product.value] || {}; |
| | | |
| | | |
| | | |
| | | app.MG.store.getProductList({ |
| | | storeInfo: 'jsek_bookFair', |
| | | path: this.data.newValue, |
| | | queryType: '*', |
| | | fields: { |
| | | jsek_link: [], |
| | | subtitle: [], |
| | | 'bookClassification*': this.data.keynoteValue || [], |
| | | ...searchObj |
| | | }, |
| | | paging: { |
| | | start: '0', |
| | | size: this.data.start * 10 |
| | | }, |
| | | sort: sort, |
| | | // coverSize: { |
| | | // width: 100 |
| | | // }, |
| | | }).then(res => { |
| | | res.datas.forEach((item) => { |
| | | if (item.subtitle == undefined) { |
| | | item.subtitle = '' |
| | | app.MG.store |
| | | .getProductList({ |
| | | storeInfo: "jsek_bookFair", |
| | | path: this.data.newValue, |
| | | queryType: "*", |
| | | fields: { |
| | | jsek_link: [], |
| | | subtitle: [], |
| | | "bookClassification*": this.data.keynoteValue || [], |
| | | ...searchObj, |
| | | }, |
| | | paging: { |
| | | start: "0", |
| | | size: this.data.start * 10, |
| | | }, |
| | | sort: sort, |
| | | // coverSize: { |
| | | // width: 100 |
| | | // }, |
| | | }) |
| | | .then((res) => { |
| | | res.datas.forEach((item) => { |
| | | if (item.subtitle == undefined) { |
| | | item.subtitle = ""; |
| | | } |
| | | item.subtitleName = item.subtitle + item.name; |
| | | }); |
| | | this.data.total = res.total; |
| | | if (res.datas.length == 0) { |
| | | this.setData({ |
| | | disabledSort: true |
| | | }) |
| | | if (!this.data.keynoteValue.length) { |
| | | this.setData({ |
| | | disbaleProject: true |
| | | }); |
| | | } |
| | | } |
| | | item.subtitleName = item.subtitle + item.name |
| | | }) |
| | | |
| | | this.data.total = res.total |
| | | |
| | | // list.push(res.datas) |
| | | |
| | | |
| | | |
| | | if (res.datas.length == 0) { |
| | | const list = [...res.datas]; |
| | | this.setData({ |
| | | // keynoteDisabled: true |
| | | }) |
| | | } |
| | | |
| | | const list = [...res.datas] |
| | | |
| | | this.setData({ |
| | | bookExhibitionList: list, |
| | | totalSize: res.total |
| | | }) |
| | | |
| | | |
| | | |
| | | //取消 |
| | | wx.hideLoading() |
| | | |
| | | |
| | | this.setData({ |
| | | loading: false, |
| | | hidden: false, |
| | | }) |
| | | }) |
| | | |
| | | bookExhibitionList: list, |
| | | totalSize: res.total, |
| | | }); |
| | | this.setData({ |
| | | loading: false, |
| | | hidden: false, |
| | | }); |
| | | }); |
| | | }, |
| | | //重点项目接口 |
| | | keyProjectsGet(newPrice) { |
| | | this.setData({ |
| | | filteredItems: [] // 如果存在子项则赋值,否则赋值为空数组 |
| | | filteredItems: [], // 如果存在子项则赋值,否则赋值为空数组 |
| | | }); |
| | | |
| | | //骨架屏 |
| | | this.setData({ |
| | | loading: true, |
| | | hidden: true, |
| | | }) |
| | | |
| | | }); |
| | | // 参数 |
| | | let parms = { |
| | | refCodes: ['bookClassification'] |
| | | } |
| | | refCodes: ["bookClassification"], |
| | | }; |
| | | //请求数据 |
| | | app.MG.store.getProductTypeField(parms).then(res => { |
| | | |
| | | app.MG.store.getProductTypeField(parms).then((res) => { |
| | | // 格式化数据 |
| | | const checkData = JSON.parse(res[0].config) |
| | | console.log(checkData); |
| | | |
| | | const checkData = JSON.parse(res[0].config); |
| | | // 循环然后判断相匹配的数据赋值给filteredItems |
| | | checkData.option.forEach(item => { |
| | | checkData.option.forEach((item) => { |
| | | if (newPrice == item.value) { |
| | | |
| | | |
| | | |
| | | this.setData({ |
| | | filteredItems: item.child || [] // 如果存在子项则赋值,否则赋值为空数组 |
| | | filteredItems: item.child || [], // 如果存在子项则赋值,否则赋值为空数组 |
| | | }); |
| | | } |
| | | }) |
| | | |
| | | let singleSelectOptions = [] |
| | | |
| | | }); |
| | | let singleSelectOptions = []; |
| | | // 单列选择器选项 |
| | | // 单列选择器选项 |
| | | this.data.filteredItems.forEach(item => { |
| | | this.data.filteredItems.forEach((item) => { |
| | | singleSelectOptions.push({ |
| | | label: item.name, |
| | | value: item.value, |
| | | }); |
| | | }); |
| | | |
| | | |
| | | |
| | | if (singleSelectOptions.length === 0) { |
| | | singleSelectOptions.push({ |
| | | label: '暂无数据', |
| | | |
| | | label: "暂无数据", |
| | | }); |
| | | |
| | | this.setData({ |
| | | disbaleProject: true |
| | | }) |
| | | } |
| | | |
| | | // 更新数据 |
| | | this.setData({ |
| | | 'multipleSelect.options': singleSelectOptions, |
| | | "multipleSelect.options": singleSelectOptions, |
| | | }); |
| | | |
| | | |
| | | // 取消骨架屏 |
| | | this.setData({ |
| | | loading: false, |
| | | hidden: false, |
| | | }) |
| | | }) |
| | | }); |
| | | }); |
| | | // if (newPrice) { |
| | | // this.setData({ |
| | | // keynoteDisabled: false |
| | |
| | | // } |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | // 总分类 |
| | | // 总分类 |
| | | onChange(e) { |
| | | |
| | | |
| | | |
| | | const newValue = e.detail.value; |
| | | |
| | | this.setData({ |
| | | 'product.value': newValue, |
| | | newValue: newValue |
| | | "product.value": newValue, |
| | | newValue: newValue, |
| | | disbaleProject: false, |
| | | loading: true |
| | | }); |
| | | |
| | | let newPrice = '' |
| | | if (newValue == 'jsek_bFHigherEducation') { |
| | | newPrice = 'jsek_higherEducation' |
| | | // this.setData({ |
| | | // newPrice: 'jsek_higherEducation' |
| | | // }) |
| | | } else if (newValue == 'jsek_bFVocationalEducation') { |
| | | // this.setData({ |
| | | // newPrice: 'jsek_vocationalEducation' |
| | | // }) |
| | | newPrice = 'jsek_vocationalEducation' |
| | | } else if (newValue == 'jsek_bFTeacherEducation') { |
| | | // this.setData({ |
| | | // newPrice: 'jsek_teacherEducation' |
| | | // }) |
| | | newPrice = 'jsek_teacherEducation' |
| | | let newPrice = ""; |
| | | if (newValue == "jsek_bFHigherEducation") { |
| | | newPrice = "jsek_higherEducation"; |
| | | } else if (newValue == "jsek_bFVocationalEducation") { |
| | | newPrice = "jsek_vocationalEducation"; |
| | | } else if (newValue == "jsek_bFTeacherEducation") { |
| | | newPrice = "jsek_teacherEducation"; |
| | | } else { |
| | | newPrice = '' |
| | | // 选择总分类 |
| | | this.setData({ |
| | | disbaleProject: true |
| | | }) |
| | | newPrice = ""; |
| | | } |
| | | |
| | | this.keyProjectsGet(newPrice) |
| | | this.keyProjectsGet(newPrice); |
| | | this.bookExhibitionGet(newValue); |
| | | if (this.data.keynoteValue) { |
| | | //如果有数据就清空并刷新页面 |
| | | this.data.keynoteValue = [] |
| | | this.bookExhibitionGet(newValue) |
| | | this.data.keynoteValue = []; |
| | | this.bookExhibitionGet(newValue); |
| | | } |
| | | this.onLoad() |
| | | |
| | | }, |
| | | |
| | | // 重点项目 |
| | | handleMultipleSelect(e) { |
| | | console.log(e); |
| | | this.setData({ |
| | | 'multipleSelect.value': e.detail.value, |
| | | "multipleSelect.value": e.detail.value, |
| | | }); |
| | | }, |
| | | handleConfirm(event) { |
| | | console.log(event); |
| | | const { |
| | | value |
| | | } = event.detail; |
| | |
| | | // this.data.keynoteValue = value |
| | | this.setData({ |
| | | keynoteValue: value, |
| | | |
| | | }) |
| | | this.bookExhibitionGet() |
| | | loading: true |
| | | }); |
| | | this.bookExhibitionGet(); |
| | | }, |
| | | |
| | | |
| | | handleReset(e) { |
| | | // 重置操作的处理逻辑 |
| | | this.data.keynoteValue = [] |
| | | this.bookExhibitionGet() |
| | | this.data.keynoteValue = []; |
| | | this.bookExhibitionGet(); |
| | | }, |
| | | onSwapRight() { |
| | | if (!this.data.nameSort) { |
| | | this.setData({ |
| | | nameSort: 'Desc', |
| | | nameSort: "Desc", |
| | | }); |
| | | } else if (this.data.nameSort == 'Desc') { |
| | | } else if (this.data.nameSort == "Desc") { |
| | | this.setData({ |
| | | nameSort: 'Asc', |
| | | nameSort: "Asc", |
| | | }); |
| | | } else if (this.data.nameSort == 'Asc') { |
| | | } else if (this.data.nameSort == "Asc") { |
| | | this.setData({ |
| | | nameSort: '', |
| | | nameSort: "", |
| | | }); |
| | | } |
| | | |
| | | this.bookExhibitionGet() |
| | | |
| | | this.bookExhibitionGet(); |
| | | }, |
| | | onSwapLeft() { |
| | | this.data.nameSort = 'Desc' |
| | | this.bookExhibitionGet() |
| | | this.data.nameSort = "Desc"; |
| | | this.bookExhibitionGet(); |
| | | }, |
| | | onBookExhibitionDetails: function (event) { |
| | | |
| | | const item = event.currentTarget.dataset.item; |
| | | |
| | | wx.navigateTo({ |
| | | url: '/pages/bookExhibitionDetails/index?id=' + item.id + '&bookName=' + item.name + '&subtitleName=' + item.subtitleName // 假设跳转到详情页面,并传递了id参数 |
| | | url: "/pages/bookExhibitionDetails/index?id=" + |
| | | item.id + |
| | | "&bookName=" + |
| | | item.name + |
| | | "&subtitleName=" + |
| | | item.subtitleName, // 假设跳转到详情页面,并传递了id参数 |
| | | }); |
| | | }, |
| | | |
| | | // 搜索框 |
| | | onSearchSubmit(e) { |
| | | this.setData({ |
| | | keyword: e.detail.value |
| | | }) |
| | | keyword: e.detail.value, |
| | | }); |
| | | |
| | | this.bookExhibitionGet() |
| | | this.bookExhibitionGet(); |
| | | }, |
| | | goBack() { |
| | | wx.navigateBack(); |
| | | }, |
| | | onSort(e) { |
| | | this.setData({ |
| | | 'product.value': e.detail.value, |
| | | "product.value": e.detail.value, |
| | | }); |
| | | |
| | | this.bookExhibitionGet() |
| | | this.bookExhibitionGet(); |
| | | }, |
| | | onOpend() { |
| | | |
| | | } |
| | | }) |
| | | onOpend() {}, |
| | | }); |
| | |
| | | |
| | | <!-- 弹出框 禁止 --> |
| | | |
| | | |
| | | <import src="index.skeleton.wxml" /> |
| | | <template is="skeleton" wx:if="{{loading}}" /> |
| | | |
| | | <view hidden="{{hidden}}"> |
| | | |
| | | <view wx:if="{{!loading}}"> |
| | | <t-toast id="t-toast" /> |
| | | |
| | | |
| | | <view class="outsideBigTitleBox"> |
| | | <view class="bigTitleBox"> |
| | | <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <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="example-search"> |
| | | <t-search model:value="{{value}}" placeholder="请输入书展名称" bind:submit="onSearchSubmit" /> |
| | | <t-search |
| | | model:value="{{value}}" |
| | | placeholder="请输入书展名称" |
| | | bind:submit="onSearchSubmit" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="outsideMenuBox"> |
| | | <view class="menuBox"> |
| | | |
| | | <t-dropdown-menu> |
| | | |
| | | |
| | | |
| | | |
| | | <t-dropdown-item options="{{product.options}}" default-value="{{product.value}}" bindchange="onChange" /> |
| | | |
| | | <t-dropdown-item |
| | | options="{{product.options}}" |
| | | default-value="{{product.value}}" |
| | | bindchange="onChange" |
| | | /> |
| | | |
| | | <!-- disabled="{{keynoteDisabled}}" --> |
| | | <t-dropdown-item label=" 重点项目" options="{{multipleSelect.options}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset" value="{{multipleSelect.value}}"> |
| | | <t-dropdown-item |
| | | label=" 重点项目" |
| | | disabled="{{disbaleProject}}" |
| | | options="{{multipleSelect.options}}" |
| | | bindchange="handleMultipleSelect" |
| | | multiple |
| | | bind:confirm="handleConfirm" |
| | | bind:reset="handleReset" |
| | | value="{{multipleSelect.value}}" |
| | | > |
| | | </t-dropdown-item> |
| | | <t-dropdown-item options="{{sorter.options}}" default-value="{{sorter.value}}" bindchange="onSort" /> |
| | | <t-dropdown-item |
| | | disabled="{{disabledSort}}" |
| | | options="{{sorter.options}}" |
| | | default-value="{{sorter.value}}" |
| | | bindchange="onSort" |
| | | /> |
| | | </t-dropdown-menu> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="titleBox"> |
| | | <view class="frameBox"></view> |
| | | <view class="titleTextBox"> |
| | | <image src="/static/images/bookExhibitionList/zhuantitaolun.png" mode="aspectFit" /> |
| | | <image |
| | | src="/static/images/bookExhibitionList/zhuantitaolun.png" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | </view> |
| | | |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="scrollViewBox" |
| | | bindscrolltolower="onScrollToLower" |
| | | > |
| | | <view class="outside"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <view wx:if="{{!bookExhibitionList.length }}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | <view class="contentBox" wx:for="{{bookExhibitionList}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBookExhibitionDetails"> |
| | | <view |
| | | class="contentBox" |
| | | wx:for="{{bookExhibitionList}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | data-item="{{item}}" |
| | | bind:tap="onBookExhibitionDetails" |
| | | > |
| | | <view class="imageBox"> |
| | | <view></view> |
| | | <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="aspectFit" /> |
| | | <image wx:else src="/static/images/bookExhibitionList/banner.png" mode="aspectFit" /> |
| | | <image |
| | | wx:else |
| | | src="/static/images/bookExhibitionList/banner.png" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | <view class="textBox" title="{{item.subtitleName}}"> <text>{{item.subtitleName}}</text></view> |
| | | <view class="textBox" title="{{item.subtitleName}}"> |
| | | <text>{{item.subtitleName}}</text></view |
| | | > |
| | | </view> |
| | | </view> |
| | | <view class="bottom-box" wx:if="{{bookExhibitionList.length }}"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | <!-- <Select prop-array='{{selectArray}}'></Select> --> |
| | | </scroll-view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | margin: 15px; |
| | | /* margin: 15px; */ |
| | | margin: 0 15px 15px 15px; |
| | | } |
| | | |
| | | .contentBox { |
| | |
| | | title: '购物车' |
| | | }); |
| | | this.shoppingCartGet(); |
| | | |
| | | this.setData({ |
| | | swipeOpened: true |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | |
| | | |
| | | // 金额显示.00格式 |
| | | numFormat(value) { |
| | | if (!value) return "0.00"; |
| | | value = Number(value).toFixed(2); |
| | | var intPart = Math.trunc(value); // 获取整数部分 |
| | | var intPartFormat = intPart |
| | | .toString() |
| | | .replace(/(\d)(?=(?:\d{3})+$)/g, "$1,"); // 将整数部分逢三一断 |
| | | var floatPart = ".00"; // 预定义小数部分 |
| | | var value2Array = value.split("."); |
| | | // =2表示数据有小数位 |
| | | if (value2Array.length === 2) { |
| | | floatPart = value2Array[1].toString(); // 拿到小数部分 |
| | | if (floatPart.length === 1) { |
| | | return `${intPartFormat}.${floatPart}0`; |
| | | } |
| | | return `${intPartFormat}.${floatPart}`; |
| | | } |
| | | return intPartFormat + floatPart; |
| | | }, |
| | | onDelete(e) { |
| | | const item = e.currentTarget.dataset.item; |
| | | app.MG.store.delShoppingCart({ |
| | |
| | | searchList: [] |
| | | }; |
| | | app.MG.store.getShoppingCartProductList(query).then(res => { |
| | | |
| | | console.log(res); |
| | | this.setData({ |
| | | totalSize: res.totalSize |
| | | }) |
| | | res.datas.forEach(item => { |
| | | |
| | | this.setData({ |
| | | bookId: res.id, |
| | | bookName: res.name, |
| | |
| | | // }) |
| | | const type = item.saleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'; |
| | | item.type = type; // 将type设置为item对象的属性,而不是使用setData |
| | | |
| | | item.name = item.linkCmsItems[0].name ? item.productMonWithLinkDto.product.name + ':' + item.linkCmsItems[0].name : item.productMonWithLinkDto.product.name |
| | | item.saleMethod.price = this.numFormat(item.saleMethod.price) |
| | | }); |
| | | |
| | | this.setData({ |
| | |
| | | <!-- loading |
| | | hidden --> |
| | | <view hidden="{{hidden}}"> |
| | | <scroll-view scroll-y="{{true}}" class="outsideContentBox" bindscrolltolower="onScrollToLower"> |
| | | |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="outsideContentBox" |
| | | bindscrolltolower="onScrollToLower" |
| | | > |
| | | <view> |
| | | |
| | | <!-- <checkbox-group bindchange="HandelItemChange"> --> |
| | | <view wx:if="{{shoppingCartData.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" font-size="80" /> |
| | | </view> |
| | | <!-- <button bind:tap="onLogin"> 去登录</button> --> |
| | | <t-swipe-cell wx:for="{{shoppingCartData}}" wx:key="index" wx:for-item="item" wx:for-index="index" opened="{{swipeOpened}}"> |
| | | <t-swipe-cell |
| | | wx:for="{{shoppingCartData}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | opened="{{swipeOpened}}" |
| | | > |
| | | <view class="itemWarp"> |
| | | <t-cell bordered="{{false}}"> |
| | | <view slot="title" class="titleBox"> |
| | | <view wx:if="{{item.type == 'product'}}" style="width: 386rpx;"> |
| | | <view wx:if="{{item.type == 'product'}}" style="width: 386rpx"> |
| | | <view class="boosName"> |
| | | <text class="eBook">电子书</text> |
| | | <text> {{item.name}}</text> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{item.type == 'item'}}" style="width: 386rpx;"> |
| | | <view wx:if="{{item.type == 'item'}}" style="width: 386rpx"> |
| | | <view class="boosName"> |
| | | <text class="cloudLearning">云学习</text> |
| | | <text> {{item.name}}</text> |
| | |
| | | </view> |
| | | <view slot="description" class="descriptionBox"> |
| | | <view> |
| | | <view class="textBox" wx:if="{{item.type == 'product'}}">图书服务-电子书</view> |
| | | <view class="textBox" wx:if="{{item.type == 'item'}}">图书服务-云学习</view> |
| | | <view class="textBox" wx:if="{{item.type == 'product'}}" |
| | | >图书服务-电子书</view |
| | | > |
| | | <view class="textBox" wx:if="{{item.type == 'item'}}" |
| | | >图书服务-云学习</view |
| | | > |
| | | </view> |
| | | <view wx:if="{{item.saleMethod.price != 0}}"> |
| | | ¥{{price}} |
| | | <view wx:if="{{item.saleMethod.price != 0}}" class="price-box"> |
| | | ¥{{item.saleMethod.price }} |
| | | </view> |
| | | <view wx:else class="descriptionBox"> 立即领取</view> |
| | | </view> |
| | | <view slot="left-icon" class="left-icon"> |
| | | <view class="contentCheckbox"> |
| | | <t-checkbox icon="rectangle" value=" {{item.id}}" data-item="{{item}}" checked="{{item.checked}}" bindchange="HandelItemChange" /> |
| | | <t-checkbox |
| | | icon="rectangle" |
| | | value=" {{item.id}}" |
| | | data-item="{{item}}" |
| | | checked="{{item.checked}}" |
| | | bindchange="HandelItemChange" |
| | | /> |
| | | </view> |
| | | <view class="left-image" data-item="{{item}}" bind:tap="onBook"> |
| | | <image wx:if="{{item.imgUrl}}" src="{{item.imgUrl}}" class="imageStyle" mode="aspectFit" /> |
| | | <image wx:else src="/static/images/default-book-img.png" class="imageStyle" mode="aspectFit" /> |
| | | <image |
| | | wx:if="{{item.imgUrl}}" |
| | | src="{{item.imgUrl}}" |
| | | class="imageStyle" |
| | | mode="aspectFit" |
| | | /> |
| | | <image |
| | | wx:else |
| | | src="/static/images/default-book-img.png" |
| | | class="imageStyle" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </t-cell> |
| | | </view> |
| | | <view slot="right" class="btn delete-btn" bind:tap="onDelete" data-item="{{item}}">删除</view> |
| | | <view |
| | | slot="right" |
| | | class="btn delete-btn" |
| | | bind:tap="onDelete" |
| | | data-item="{{item}}" |
| | | >删除</view |
| | | > |
| | | </t-swipe-cell> |
| | | <view wx:if="{{shoppingCartData.length > 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <t-toast id="t-toast" /> |
| | | </scroll-view> |
| | | <view class="bottomBox"> |
| | | <view class="checkGroupBox"> |
| | | <checkbox-group bindchange="bottomChange"> |
| | | <checkbox disabled="{{onDisabled}}" value="全选" checked="{{checkAll}}">全选</checkbox> |
| | | <checkbox disabled="{{onDisabled}}" value="全选" checked="{{checkAll}}" |
| | | >全选</checkbox |
| | | > |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="settlementBox"> |
| | | <view class="totalPrice">总价:<text class="totalPriceText">¥{{totalPrice}}</text></view> |
| | | <view class="totalPrice" |
| | | >总价:<text class="totalPriceText">¥{{totalPrice}}</text></view |
| | | > |
| | | <view class="buttonBox"> |
| | | <t-button class="tButtonBox" size="small" shape="round" bind:tap="goPaymentPage"> |
| | | <t-button |
| | | class="tButtonBox" |
| | | size="small" |
| | | shape="round" |
| | | bind:tap="goPaymentPage" |
| | | > |
| | | <view>去结算({{selectedCount}})</view> |
| | | </t-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | .t-checkbox__content { |
| | | height: 0rpx !important; |
| | | } |
| | | |
| | | .price-box { |
| | | color: #0F1214; |
| | | } |
| | |
| | | page: 1, |
| | | total: 0, |
| | | }, |
| | | tabValue: '' |
| | | tabValue: '0' |
| | | }, |
| | | |
| | | /** |
| | |
| | | value: "0" |
| | | } |
| | | } |
| | | this.onTabsChange(event) |
| | | // this.onTabsChange(event) |
| | | }, |
| | | |
| | | /** |
| | |
| | | onTabsChange(event) { |
| | | const value = event.detail.value |
| | | console.log(value); |
| | | |
| | | if (value === '0') { |
| | | this.setData({ |
| | | tabValue: value, |
| | |
| | | isMore: false |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | retrievalPageGet() { |
| | | |
| | | |
| | | let fields = { |
| | | liveTime: [], |
| | | lecturer: [], |
| | |
| | | }, 100) |
| | | } |
| | | } |
| | | }, |
| | | onTabsClick(event) { |
| | | console.log(`Click tab, tab-panel value is ${event.detail.value}.`); |
| | | }, |
| | | }) |
| | |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog", |
| | | "t-input": "tdesign-miniprogram/input/input" |
| | | }, |
| | | "navigationStyle": "custom", |
| | | "navigationBarTitleText": "检索结果", |
| | | "enablePullDownRefresh": true, |
| | | "onReachBottomDistance": 200, |
| | | "backgroundTextStyle": "dark", |
| | |
| | | <import src="index.skeleton.wxml" /> |
| | | <template is="skeleton" wx:if="{{loading}}" /> |
| | | |
| | | |
| | | <view class="outsideRetrievalPageBox" hidden="{{hidden}}"> |
| | | |
| | | <view class="retrievalPageBox"> |
| | | <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> |
| | | <view class="navbar-title">检索结果</view> |
| | | </view> |
| | | |
| | | |
| | | <view class="example-search"> |
| | | <t-search bind:submit="onSearchSubmit" class="searchBox" model:value="{{searchVal}}" placeholder="请输入关键词/书名/ISBN/作者" /> |
| | | <t-search |
| | | bind:submit="onSearchSubmit" |
| | | class="searchBox" |
| | | model:value="{{searchVal}}" |
| | | placeholder="请输入关键词/书名/ISBN/作者" |
| | | /> |
| | | <view class="cancellation" bind:tap="onCancellation">取消</view> |
| | | </view> |
| | | |
| | | </view> |
| | | <!--pages/retrievalPage/index.wxml--> |
| | | |
| | | |
| | | <view class="tabsBox"> |
| | | <!-- sticky="true" --> |
| | | <t-tabs defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel"> |
| | | |
| | | |
| | | |
| | | <t-tabs |
| | | value="{{tabValue}}" |
| | | bind:change="onTabsChange" |
| | | t-class="custom-tabs" |
| | | t-class-content="custom-panel" |
| | | > |
| | | <t-tab-panel label="图书({{bookTotal}})" value="0"> |
| | | |
| | | |
| | | |
| | | |
| | | <view wx:if="{{bookData.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <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"> |
| | | <view |
| | | class="bookDataForBox" |
| | | wx:for="{{bookData}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | data-item="{{item}}" |
| | | bind:tap="onBook" |
| | | > |
| | | <view class="imageBox"> |
| | | <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="aspectFit" /> |
| | | <image wx:if="{{!item.icon}}" src="/static/images/default-book-img.png" mode="" /> |
| | | <image |
| | | wx:if="{{item.icon}}" |
| | | src="{{item.icon}}" |
| | | mode="aspectFit" |
| | | /> |
| | | <image |
| | | wx:if="{{!item.icon}}" |
| | | src="/static/images/default-book-img.png" |
| | | mode="" |
| | | /> |
| | | </view> |
| | | <view class="bookDataNmae"> |
| | | {{item.name}} |
| | | </view> |
| | | <view class="bookDataNmae"> {{item.name}} </view> |
| | | <view class="bookDataAuthor">{{item.author}}</view> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{bookData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | |
| | | </t-tab-panel> |
| | | <t-tab-panel label="课程({{courseTotal}})" value="1"> |
| | | <view wx:if="{{courseData.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | |
| | | |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="scrollViewBox" |
| | | bindscrolltolower="onScrollToLower" |
| | | > |
| | | <view class="listBox1"> |
| | | <view> |
| | | <view wx:for="{{courseData}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="listItemBox"> |
| | | <view class="listItem flex" data-item="{{item}}" bind:tap="underConstruction"> |
| | | <view |
| | | wx:for="{{courseData}}" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | wx:key="index" |
| | | bindtap="toList" |
| | | data-info="{{item}}" |
| | | class="listItemBox" |
| | | > |
| | | <view |
| | | class="listItem flex" |
| | | data-item="{{item}}" |
| | | bind:tap="underConstruction" |
| | | > |
| | | <view class="specialSubject-img-box"> |
| | | <image src="{{item.icon}}" mode="aspectFill" /> |
| | | </view> |
| | |
| | | <text>{{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="aspectFill" class="addCartImg" /> |
| | | <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="aspectFill" |
| | | class="addCartImg" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{courseData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | </t-tab-panel> |
| | | <t-tab-panel label="数字教材({{digitalTextbooksTotal}})" value="2"> |
| | | |
| | | |
| | | <view wx:if="{{digitalTextbooksData.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <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"> |
| | | <view |
| | | class="bookDataForBox" |
| | | wx:for="{{digitalTextbooksData}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | data-item="{{item}}" |
| | | bind:tap="underConstruction" |
| | | > |
| | | <view class="imageBox"> |
| | | <image src="{{item.icon}}" mode="" /> |
| | | </view> |
| | | <view class="bookDataNmae"> |
| | | {{item.name}} |
| | | </view> |
| | | <view class="bookDataNmae"> {{item.name}} </view> |
| | | <view class="bookDataAuthor">{{item.author}}</view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view wx:if="{{digitalTextbooksData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | |
| | | </t-tab-panel> |
| | | <t-tab-panel label="专题({{seminarTotal}})" value="3"> |
| | | <view wx:if="{{seminarData.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <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"> |
| | | <view class="listItem" bindtap="goSubjectDetail" data-book="{{item}}"> |
| | | <view |
| | | wx:for="{{seminarData}}" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | wx:key="index" |
| | | class="listItemBox" |
| | | data-item="{{item}}" |
| | | bind:tap="underConstruction" |
| | | > |
| | | <view |
| | | class="listItem" |
| | | bindtap="goSubjectDetail" |
| | | data-book="{{item}}" |
| | | > |
| | | <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="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="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="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> |
| | | <text class="price" wx:if="{{item.price !== 0}}" |
| | | >¥{{item.price}}</text |
| | | > |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <view wx:if="{{seminarData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | |
| | | |
| | | </scroll-view> |
| | | </t-tab-panel> |
| | | <t-tab-panel label="书目({{bookFairTotal}})" value="4"> |
| | | |
| | | |
| | | |
| | | <view wx:if="{{bookFairData.length <= 0 }}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <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"> |
| | | <view |
| | | class="higherBox" |
| | | wx:for="{{bookFairData}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | > |
| | | <view class="outsideHigherImageBox"> |
| | | <view class="higherImageBox" data-item="{{item}}"> |
| | | <image bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" /> |
| | | <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> |
| | | <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="aspectFit" /> |
| | | <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="aspectFit" /> |
| | | <image |
| | | bind:tap="downloadData" |
| | | src="{{item.icon}}" |
| | | mode="aspectFill" |
| | | /> |
| | | <view |
| | | class="downloadIcon" |
| | | data-item="{{item}}" |
| | | data-key="showWithInput" |
| | | bind:tap="mailbox" |
| | | > |
| | | <image |
| | | wx:if="{{determine}}" |
| | | class="download" |
| | | src="/static/images/bibliographyList/email-click.png" |
| | | mode="aspectFit" |
| | | /> |
| | | <image |
| | | wx:else="" |
| | | class="downloadshiftin" |
| | | src="/static/images/bibliographyList/email.png" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view wx:if="{{bookFairData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | |
| | | |
| | | </scroll-view> |
| | | |
| | | |
| | | </t-tab-panel> |
| | | <t-tab-panel label="书展({{biblioClassificationTotal}})" value="5"> |
| | | <view wx:if="{{biblioClassificationData.length <= 0}}" class="noDataBox"> |
| | | <view |
| | | wx:if="{{biblioClassificationData.length <= 0}}" |
| | | class="noDataBox" |
| | | > |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <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}}"> |
| | | <image class="bookFairImage" wx:if="{{item.icon}}" src="{{item.icon}}" mode="" /> |
| | | <image class="bookFairImage" wx:else="" src="/static/images/bookExhibitionList/banner.png" mode="" /> |
| | | <view class="textBox" title="{{item.name}}"> <text>{{item.subtitleName}}</text></view> |
| | | <view |
| | | class="contentBox" |
| | | wx:for="{{biblioClassificationData}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | bindtap="onBookExhibitionDetails" |
| | | data-item="{{item}}" |
| | | > |
| | | <image |
| | | class="bookFairImage" |
| | | wx:if="{{item.icon}}" |
| | | src="{{item.icon}}" |
| | | mode="" |
| | | /> |
| | | <image |
| | | class="bookFairImage" |
| | | wx:else="" |
| | | src="/static/images/bookExhibitionList/banner.png" |
| | | mode="" |
| | | /> |
| | | <view class="textBox" title="{{item.name}}"> |
| | | <text>{{item.subtitleName}}</text></view |
| | | > |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view wx:if="{{biblioClassificationData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <view |
| | | wx:if="{{biblioClassificationData.length != 0}}" |
| | | class="bottom-box" |
| | | > |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | |
| | | |
| | | </scroll-view> |
| | | </t-tab-panel> |
| | | </t-tabs> |
| | | </view> |
| | | <view class="dialogBox"> |
| | | <t-dialog visible="{{showWithInput}}" title="请输入邮箱" confirm-btn="确定" cancel-btn="取消" bind:confirm="onConfirm" bind:cancel="closeDialog"> |
| | | |
| | | <t-input model:value="{{input}}" borderless class="dialog-input" clearable slot="content" placeholder="请输入邮箱号" placeholder-class="placeholder" bindchange="onEmailInput" /> |
| | | |
| | | <t-dialog |
| | | visible="{{showWithInput}}" |
| | | title="请输入邮箱" |
| | | confirm-btn="确定" |
| | | cancel-btn="取消" |
| | | bind:confirm="onConfirm" |
| | | bind:cancel="closeDialog" |
| | | > |
| | | <t-input |
| | | model:value="{{input}}" |
| | | borderless |
| | | class="dialog-input" |
| | | clearable |
| | | slot="content" |
| | | placeholder="请输入邮箱号" |
| | | placeholder-class="placeholder" |
| | | bindchange="onEmailInput" |
| | | /> |
| | | </t-dialog> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | /* min-width: 210rpx; */ |
| | | background-repeat: no-repeat; |
| | | background-image: url(https://jsek.bnuic.com/home/image/click-icon.png); |
| | | background-position: 83% center; |
| | | background-size: 40%; |
| | | background-position: 90% 50%; |
| | | background-size: 70rpx !important; |
| | | /* 将背景图片位置设置为靠右 */ |
| | | } |
| | | |