| | |
| | | selectAll: [], |
| | | shoppingCart: true, |
| | | stop: false, |
| | | cart: true |
| | | cart: true, |
| | | canExecute: true |
| | | }, |
| | | ready() {}, |
| | | |
| | |
| | | // 跳转音视频播放器 |
| | | 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 : '教学资源' |
| | | let url; |
| | | |
| | | |
| | | |
| | | if (this.properties.isShowCheck && this.resourceIsBuy(item)) { |
| | | return false; |
| | | } |
| | |
| | | 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}`, |
| | | }); |
| | | |
| | | console.log(item, '7899'); |
| | | if (item.selectType == "document" || item.selectType == "pdf") { |
| | | |
| | | // || item.selectType == "pdf" |
| | | |
| | | |
| | | |
| | | if (item.selectType == "pdf") { |
| | | console.log(item, '79825'); |
| | | const fileLink = item.file ? item.file : item.freeFile |
| | | console.log(fileLink); |
| | | wx.navigateTo({ |
| | | url: "/packageBookService/pages/components/webView/index?md5=" + |
| | | fileLink + |
| | | "&fileName=" + |
| | | item.name + |
| | | "&fileType=" + |
| | | item.selectType + "&bookBuy=true" |
| | | |
| | | }); |
| | | } |
| | | if (item.selectType == "document") { |
| | | // freeFile |
| | | |
| | | if (item.selectType == "document") { |
| | |
| | | util.hideLoadingWithErrorTips(); |
| | | }, |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | <<<<<<< Updated upstream |
| | | |
| | | |
| | | |
| | | |
| | | ======= |
| | | // if (item.selectType == "document" || item.selectType == "pdf") { |
| | | // const fileLink = app.config.requestCtx + "/file/api/ApiDownload?md5=" + item.file; |
| | | // let filePath = wx.env.USER_DATA_PATH + '/' + item.name |
| | | // console.log(filePath, 'filePath'); |
| | | // //提示加载中 |
| | | // util.showLoading(); |
| | | // // 单次下载允许的最大文件为 200MB |
| | | // wx.downloadFile({ |
| | | // url: fileLink, |
| | | // success: function (res) { |
| | | // if (res.statusCode != 200) { |
| | | // util.hideLoadingWithErrorTips(); |
| | | // return false; |
| | | // } |
| | | // var Path = res.tempFilePath; //返回的文件临时地址,用于后面打开本地预览所用 |
| | | // wx.saveFile({ |
| | | // tempFilePath: Path, |
| | | // success: function (res) { |
| | | // var savedFilePath = res.savedFilePath; |
| | | // // 将文件保存为 item.name |
| | | // wx.saveFile({ |
| | | // tempFilePath: savedFilePath, |
| | | // filePath: wx.env.USER_DATA_PATH + '/' + item.name, |
| | | // success: function (res) { |
| | | // wx.openDocument({ |
| | | // filePath: res.savedFilePath, |
| | | // showMenu: true, |
| | | // success: function (res) { |
| | | // util.hideLoading(); |
| | | // }, |
| | | // }); |
| | | // }, |
| | | // fail: function (err) { |
| | | // util.hideLoadingWithErrorTips(); |
| | | // } |
| | | // }); |
| | | // }, |
| | | // fail: function (err) { |
| | | // util.hideLoadingWithErrorTips(); |
| | | // } |
| | | // }); |
| | | // }, |
| | | // fail: function (err) { |
| | | // util.hideLoadingWithErrorTips(); |
| | | // }, |
| | | // }); |
| | | // } |
| | | >>>>>>> Stashed changes |
| | | if (item.selectType == "webpage") { |
| | | this.setData({ |
| | | webpageSrc: item.jsek_link, |
| | | }); |
| | | console.log(this.data.webpageSrc, "webpageSrc"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | }, |
| | | |
| | |
| | | this.data.bookBuy + |
| | | "&bookId=" + |
| | | this.data.bookDetail.id, |
| | | |
| | | }); |
| | | debugger |
| | | }, |
| | | |
| | | //样书申请 |
| | |
| | | "secondList.options": options, |
| | | }); |
| | | const second = [this.data.secondCode]; |
| | | console.log(second); |
| | | this.setData({ |
| | | "secondList.value": second, |
| | | }); |
| | |
| | | // pages/resourceDetails/document/index.js |
| | | import Toast from 'tdesign-miniprogram/toast/index'; |
| | | const app = getApp() |
| | | Page({ |
| | | |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | visible: false, |
| | | showIndex: false, |
| | | closeBtn: false, |
| | | deleteBtn: false, |
| | | images: [], |
| | | webpageSrc: '', |
| | | navBarHeight: '', |
| | | barHeight: '', |
| | |
| | | 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'); |
| | | } |
| | | // 下载文件zip |
| | | if (item.selectType == 'zip') { |
| | |
| | | naturalResources.forEach(function (item) { |
| | | // console.log(item); |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | onClick() { |
| | | this.setData({ |
| | | images: [ |
| | | this.data.showData, |
| | | // 'https://tdesign.gtimg.com/mobile/demos/swiper2.png', |
| | | ], |
| | | showIndex: true, |
| | | visible: true, |
| | | }); |
| | | }, |
| | | onChange(e) { |
| | | const { |
| | | index |
| | | } = e.detail; |
| | | |
| | | console.log('change', index); |
| | | }, |
| | | |
| | | onDelete(e) { |
| | | const { |
| | | index |
| | | } = e.detail; |
| | | |
| | | Toast({ |
| | | context: this, |
| | | selector: '#t-toast', |
| | | message: `删除第${index + 1}个`, |
| | | }); |
| | | }, |
| | | |
| | | onClose(e) { |
| | | const { |
| | | trigger |
| | | } = e.detail; |
| | | console.log(trigger); |
| | | this.setData({ |
| | | visible: false, |
| | | }); |
| | | }, |
| | | //预览图片,放大预览 |
| | | preview(event) { |
| | | console.log(event.currentTarget.dataset.src) |
| | | let currentUrl = event.currentTarget.dataset.src |
| | | |
| | | wx.previewImage({ |
| | | current: currentUrl, // 当前显示图片的http链接 |
| | | // urls: this.data.showData // 需要预览的图片http链接列表 |
| | | }) |
| | | }, |
| | | |
| | | }) |
| | |
| | | "usingComponents": { |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-image": "tdesign-miniprogram/image/image" |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-toast": "tdesign-miniprogram/toast/toast", |
| | | "t-image-viewer": "tdesign-miniprogram/image-viewer/image-viewer" |
| | | } |
| | | } |
| | |
| | | <view class="titleNameBox" wx:if="{{selectType != 'webpage'}}"> |
| | | {{titleName}} |
| | | </view> |
| | | |
| | | <!-- bind:tap="onClick" --> |
| | | <view class="pictureBox" wx:if="{{selectType == 'picture'}}"> |
| | | <image src="{{showData}}" mode="aspectFit" /> |
| | | <image src="{{showData}}" mode="aspectFit" data-src="{{showData}}" bindtap="preview" /> |
| | | </view> |
| | | |
| | | <view wx:if="{{selectType == 'zip'}}"> |
| | |
| | | |
| | | <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> |
| | |
| | | } |
| | | |
| | | .titleNameBox { |
| | | height: 77rpx; |
| | | min-height: 77rpx; |
| | | background: #FFFFFF; |
| | | box-shadow: 0rpx 9rpx 9rpx 2rpx rgba(0, 0, 0, 0.06); |
| | | padding: 20rpx 50rpx; |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-top: 160rpx; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .pictureBox image { |
| | | /* width: 520rpx; |
| | | height: 800rpx; */ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | |
| | | <!-- 视频 --> |
| | | <view class="videoBox" wx:if="{{videoChange}}"> |
| | | <!-- autoplay='false' 是否自动播放 --> |
| | | <video binderror="videoErrorCallback" src="{{showData}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video> |
| | | <!-- <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> |
| | | |
| | |
| | | }, |
| | | SysType: 'CmsItem' |
| | | }).then(res => { |
| | | console.log(res); |
| | | res.datas.forEach(item => { |
| | | item.determine = true |
| | | }) |
| | |
| | | const item = event.currentTarget.dataset.item |
| | | console.log(item); |
| | | if (item.fileType == "pdf") { |
| | | |
| | | wx.navigateTo({ |
| | | url: "/packageBookService/pages/components/webView/index?md5=" + |
| | | item.freeFile + |
| | |
| | | // "&freePage=" + |
| | | // this.data.fileInfo.freePage + |
| | | |
| | | // + |
| | | // "&bookId=" + |
| | | // this.data.bookDetail.id, |
| | | + |
| | | "&bookId=" + |
| | | item.id, |
| | | }); |
| | | } else { |
| | | Toast({ |
| | |
| | | |
| | | } |
| | | |
| | | } else if (this.data.tabValue == 1) { |
| | | } else if (this.data.tabValue == 2) { |
| | | |
| | | if (this.data.teacherList.length < this.data.teacherTotal) { |
| | | this.setData({ |
| | |
| | | }, 100) |
| | | |
| | | } |
| | | console.log(2); |
| | | } else if (this.data.tabValue == 2) { |
| | | |
| | | if (this.data.vocationalList.length < this.data.vocationalTotal && this.data.vocationalList.length > 9) { |
| | | } 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) { |
| | | this.setData({ |
| | | isMore: true, |
| | | start: this.data.start + 1 |
| | |
| | | </view> |
| | | <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"> |
| | |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </t-tab-panel> |
| | | <t-tab-panel label="职业教育({{vocationalTotal}})" value="1"> |
| | | <view wx:if="{{vocationalList.length <= 0}}" class="noDataBox"> |
| | |
| | | |
| | | |
| | | <view wx:else class="outsideHigherBox"> |
| | | <view class="higherBox" wx:for="{{vocationalList}}" wx:key="index" wx:for-item="item" wx:for-index="index" bind:tap="downloadData" data-item="{{item}}"> |
| | | <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" /> |
| | |
| | | <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}}" bind:tap="downloadData"> |
| | | <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" /> |
| | |
| | | /* box-shadow: 10rpx 10rpx 10rpx 10rpx rgba(0, 0, 0, 0.08); */ |
| | | box-shadow: 0rpx 0rpx 18rpx 2rpx rgba(0, 0, 0, 0.08); |
| | | margin: 30rpx 15rpx; |
| | | background-color: #fff; |
| | | /* background-color: #fff; */ |
| | | margin-bottom: 0rpx ; |
| | | } |
| | | |
| | |
| | | color: #999; |
| | | height: 80rpx; |
| | | font-size: 28rpx; |
| | | --td-loading-color: #ff6c00 |
| | | --td-loading-color: #ff6c00; |
| | | margin-top: 80rpx; |
| | | } |
| | | |
| | | .loadinBox { |
| | |
| | | background-position: 100% 100%; */ |
| | | background-image: url(https://jsek.bnuic.com/home/image/click-icon.png); |
| | | background-position: 85% center; |
| | | background-size: 30% 50%; |
| | | background-size: 20% 50%; |
| | | /* 将背景图片位置设置为靠右 */ |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | page { |
| | | background: #F2F3F8; |
| | | background: #F2F3F8 !important; |
| | | } |
| | | |
| | | .scrollViewBox { |
| | | height: calc(100vh - 326rpx); |
| | | /* width: calc(100vw - 60rpx); */ |
| | | } |
| | |
| | | ], |
| | | }, |
| | | multipleSelect: { |
| | | // value: [], |
| | | value: [], |
| | | options: [], |
| | | }, |
| | | navBarHeight: '', |
| | |
| | | // setTimeout(function () { |
| | | // that.data.name = "测试watch变化了" |
| | | // }, 500) |
| | | // console.log(11111); |
| | | console.log(11111); |
| | | }, |
| | | watch: { |
| | | name: function (newVal, oldVal) { |
| | |
| | | value |
| | | } = event.detail; |
| | | // 确认操作的处理逻辑 |
| | | this.data.keynoteValue = value |
| | | // this.data.keynoteValue = value |
| | | this.setData({ |
| | | keynoteValue: value, |
| | | |
| | | }) |
| | | this.bookExhibitionGet() |
| | | }, |
| | | |
| | |
| | | |
| | | |
| | | <!-- disabled="{{keynoteDisabled}}" --> |
| | | <t-dropdown-item label=" 重点项目" options="{{multipleSelect.options}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset"> |
| | | <t-dropdown-item label=" 重点项目" 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-menu> |