| | |
| | | pauseTime: 0, //暂停时间 |
| | | applyState: '', |
| | | deadline: '', |
| | | lzoomFlag: false, //定义 缩放事件 节流阀,防止一次缩放触发两次缩放事件 |
| | | distance: 0, //记录手指移动距离 |
| | | scale: 1, //定义初始化的页面缩放大小 |
| | | newScale: 1, //记录新的页面缩放大小 |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | |
| | | }, |
| | | //预览图片,放大预览 |
| | | preview(event) { |
| | | console.log(event.currentTarget.dataset.src) |
| | | let currentUrl = event.currentTarget.dataset.src |
| | | let urls = [event.currentTarget.dataset.src] |
| | | wx.previewImage({ |
| | | current: currentUrl, // 当前显示图片的http链接 |
| | | // urls: this.data.showData // 需要预览的图片http链接列表 |
| | | urls: urls // 需要预览的图片http链接列表 |
| | | }) |
| | | }, |
| | | |
| | | // myTouchStart(e) { |
| | | // //---------------------记录缩放事件信息--------------------- |
| | | // // 当两根手指放上去的时候,将距离(distance)初始化。 |
| | | // let xMove = e.touches[1].clientX - e.touches[0].clientX; |
| | | // let yMove = e.touches[1].clientY - e.touches[0].clientY; |
| | | // //计算开始触发两个手指坐标的距离 |
| | | // const distance = Math.sqrt(xMove * xMove + yMove * yMove); |
| | | // this.setData({ |
| | | // distance: distance |
| | | // }) |
| | | // //---------------------记录缩放事件信息end--------------------- |
| | | // }, |
| | | // myTouchMove(e) { |
| | | // // ----------------监听手势缩小放大事件---------------- |
| | | // // 单手指缩放不做任何操作 |
| | | // if (e.touches.length != 1) { |
| | | // //双手指运动 x移动后的坐标和y移动后的坐标 |
| | | // let xMove = e.touches[1].clientX - e.touches[0].clientX; |
| | | // let yMove = e.touches[1].clientY - e.touches[0].clientY; |
| | | // //双手指运动新的 ditance |
| | | // let newDistance = Math.sqrt(xMove * xMove + yMove * yMove); |
| | | // //计算移动的过程中实际移动了多少的距离 |
| | | // let distanceDiff = newDistance - this.data.distance; |
| | | // // newScale = scale + 0.005 * distanceDiff |
| | | // console.log('移动距离', distanceDiff); |
| | | // this.setData({ |
| | | // newScale: this.data.newScale + 0.005 * distanceDiff |
| | | // }) |
| | | // // 打开缩放监听 |
| | | // // zoomFlag = true |
| | | // this.setData({ |
| | | // lzoomFlag: true |
| | | // }) |
| | | // return |
| | | // } |
| | | // // ----------------监听手势缩小放大事件end---------------- |
| | | // }, |
| | | // myTouchEnd() { |
| | | // if (this.data.lzoomFlag) { |
| | | // if (this.data.newScale > 1.3) { |
| | | // console.log("放大了", this.data.newScale); |
| | | // } else if (this.data.newScale < 0.7, this.data.newScale) { |
| | | // console.log("缩小了"); |
| | | // } |
| | | // // 关闭缩放监听 |
| | | // // zoomFlag = false |
| | | // this.setData({ |
| | | // lzoomFlag: false |
| | | // }) |
| | | // } |
| | | // }, |
| | | }) |
| | |
| | | </view> |
| | | <!-- bind:tap="onClick" --> |
| | | <view class="pictureBox" wx:if="{{selectType == 'picture'}}"> |
| | | <!-- style="width: {{(newScale <= 5 ? newScale: 5) * 100}}%;" --> |
| | | <image |
| | | src="{{showData}}" |
| | | mode="aspectFit" |
| | | mode="widthFix" |
| | | data-src="{{showData}}" |
| | | bindtap="preview" |
| | | /> |
| | |
| | | background: #FFFFFF; |
| | | box-shadow: 0rpx 9rpx 9rpx 2rpx rgba(0, 0, 0, 0.06); |
| | | padding: 20rpx 50rpx; |
| | | margin-bottom: 100rpx; |
| | | font-family: PingFang SC, PingFang SC; |
| | | font-weight: 400; |
| | | font-size: 29rpx; |
| | |
| | | .pictureBox { |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-top: 160rpx; |
| | | margin-top: 20rpx; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .pictureBox image { |
| | | width: 100%; |
| | | height: 100%; |
| | | /* width: 100%; |
| | | height: auto; */ |
| | | } |
| | | |
| | | .download-btn { |
| | | width: 100%; |
| | | } |
| | | |
| | | .heart { |
| | | animation-name: scaleDraw; |
| | | /*关键帧名称*/ |
| | | animation-timing-function: ease-in-out; |
| | | /*动画的速度曲线*/ |
| | | animation-iteration-count: infinite; |
| | | /*动画播放的次数*/ |
| | | animation-duration: 2s; |
| | | /*动画所花费的时间*/ |
| | | } |
| | | |
| | | @keyframes scaleDraw { |
| | | |
| | | /*定义关键帧、scaleDrew是需要绑定到选择器的关键帧名称*/ |
| | | 0% { |
| | | transform: scale(1); |
| | | /*开始为原始大小*/ |
| | | } |
| | | |
| | | 25% { |
| | | transform: scale(1.5); |
| | | /*放大1.1倍*/ |
| | | } |
| | | |
| | | 50% { |
| | | transform: scale(1.75); |
| | | } |
| | | |
| | | 75% { |
| | | transform: scale(2.0); |
| | | } |
| | | } |
| | |
| | | <view class="bookServices-list" wx:if="{{!skeletonLoding}}"> |
| | | <view class="list-body"> |
| | | <movable-area class="movable-area"> |
| | | <!-- model:scroll-top="{{setScrollValue}}" --> |
| | | <scroll-view |
| | | class="scroll content" |
| | | bind:scroll="onPageScroll" |
| | | model:scroll-top="{{setScrollValue}}" |
| | | scroll-y |
| | | refresher-enabled="{{true}}" |
| | | lower-threshold="{{200}}" |
| | |
| | | Md5: item.datas.freeFile.FileList[0].Md5, |
| | | dialogBox: true |
| | | }) |
| | | // wx.showModal({ |
| | | // title: '请输入邮箱', |
| | | // content: '', |
| | | // confirmColor: '#ff6c00', |
| | | // cancelColor: '#949494', |
| | | // placeholderText: '请输入邮箱号', |
| | | // editable: true, |
| | | // complete: (res) => { |
| | | // if (res.cancel) { |
| | | // console.log('取消'); |
| | | // } |
| | | // if (res.confirm) { |
| | | // this.setData({ |
| | | // input: res.content |
| | | // }) |
| | | // this.confirmM() |
| | | // } |
| | | // wx.scanCode({ |
| | | // success: res => { |
| | | // console.log(res); |
| | | // } |
| | | // }) |
| | | }, |
| | |
| | | }, |
| | | //提交 |
| | | confirmM(e) { |
| | | wx.showLoading({ |
| | | title: '发送中...', |
| | | }) |
| | | 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) { |
| | | this.setData({ |
| | |
| | | md5s: [this.data.Md5] |
| | | } |
| | | app.MG.file.sendFileWithEmail(query).then(res => { |
| | | wx.hideLoading() |
| | | if (res) { |
| | | wx.showToast({ |
| | | icon: 'success', |
| | |
| | | <t-toast id="t-toast" /> |
| | | |
| | | <!-- 弹窗 --> |
| | | <view class="info-center" style="top:{{height*0.3}}px;" wx:if="{{dialogBox}}"> |
| | | <view> |
| | | <view class="row-info"> |
| | | <view class="body"> |
| | | <view class="dialog-title">请输入邮箱</view> |
| | | <view class="input-box"> |
| | | <t-input |
| | | style="{{inputStyle}}" |
| | | class="input" |
| | | placeholder="请输入联系方式" |
| | | value="{{input}}" |
| | | bind:change="inputChange" |
| | | ></t-input> |
| | | <view wx:if="{{dialogBox}}"> |
| | | <view class="popup-box" bindtap="closeDialog"></view> |
| | | <view class="info-center" style="top:{{height*0.4}}px;"> |
| | | <view> |
| | | <view class="row-info"> |
| | | <view class="body"> |
| | | <view class="dialog-title">请输入邮箱</view> |
| | | <view class="input-box"> |
| | | <t-input |
| | | style="{{inputStyle}}" |
| | | class="input" |
| | | placeholder="请输入联系方式" |
| | | value="{{input}}" |
| | | bind:change="inputChange" |
| | | ></t-input> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="row-btn"> |
| | | <view class="left-btn" bindtap="closeDialog">取消</view> |
| | | <view class="right-btn" bindtap="confirmM">确认</view> |
| | | <view class="row-btn"> |
| | | <view class="left-btn" bindtap="closeDialog">取消</view> |
| | | <view class="right-btn" bindtap="confirmM">确认</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | .info-center { |
| | | position: fixed; |
| | | top: 80%; |
| | | z-index: 999; |
| | | background-color: white; |
| | | align-items: center; |
| | |
| | | } |
| | | |
| | | .input-box { |
| | | width: 100%; |
| | | padding: 0 20rpx; |
| | | width: 92%; |
| | | margin-bottom: 16rpx; |
| | | } |
| | | |
| | | .input { |
| | | --td-input-border-radius: 20rpx; |
| | | border-radius: 20rpx; |
| | | } |
| | | |
| | | /* 蒙层 */ |
| | | .popup-box { |
| | | position: absolute; |
| | | z-index: 99; |
| | | top: 0; |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | |
| | | start: 0, |
| | | size: 16, |
| | | }, |
| | | keynoteValue: null, |
| | | keynoteValue: [], |
| | | filteredItems: [], |
| | | newValue: null, |
| | | bookExhibitionList: [], |
| | |
| | | color="#bbb" |
| | | bind:tap="navToSearchPage" |
| | | /> |
| | | |
| | | </t-search> |
| | | </view> |
| | | <view class="swiper-wrap"> |
| | |
| | | this.bibliographyGet() |
| | | }, |
| | | |
| | | |
| | | //标签的切换 |
| | | onTabsChange(event) { |
| | | const value = event.detail.value |
| | |
| | | ...searchObj, |
| | | ...fields |
| | | } |
| | | |
| | | |
| | | let courseObj = {} |
| | | if (this.data.searchVal) { |
| | | courseObj = { |
| | |
| | | '||isbn*': this.data.searchVal.trim(), |
| | | '||seriesName*': this.data.searchVal.trim() |
| | | } |
| | | |
| | | } |
| | | //课程 |
| | | let queryCourse = { |
| | |
| | | data: body |
| | | }).then((resp) => { |
| | | console.log(resp, 'resp'); |
| | | |
| | | //图书 0 |
| | | const data1 = resp[0] |
| | | const datas1 = handleQueryResourceListData({ |
| | |
| | | this.setData({ |
| | | bookData: datas1, |
| | | bookTotal: data1.totalCount, |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | //数字课程 1 |
| | | const data2 = resp[1] |
| | | const datas2 = handleQueryResourceListData({ |
| | |
| | | courseData: datas2, |
| | | courseTotal: data2.totalCount |
| | | }) |
| | | |
| | | |
| | | |
| | | // 数字教材 2 |
| | | const data3 = resp[2] |
| | | const datas3 = handleQueryResourceListData({ |
| | |
| | | digitalTextbooksData: datas3, |
| | | digitalTextbooksTotal: data3.totalCount |
| | | }) |
| | | |
| | | // 专题研讨 3 |
| | | |
| | | const data4 = resp[3] |
| | | const datas4 = handleQueryResourceListData({ |
| | | datas: data4.datas, |
| | | fields |
| | | }) |
| | | |
| | | this.setData({ |
| | | seminarData: datas4, |
| | | seminarTotal: data4.totalCount |
| | |
| | | datas: data5.datas, |
| | | fields |
| | | }) |
| | | |
| | | datas5.forEach((items) => { |
| | | items.subtitleName = items.subtitle + items.name |
| | | }) |
| | |
| | | biblioClassificationData: datas5, |
| | | biblioClassificationTotal: data5.totalCount |
| | | }) |
| | | |
| | | this.setData({ |
| | | loading: false, |
| | | hidden: false, |
| | | }) |
| | | |
| | | |
| | | }) |
| | | wx.stopPullDownRefresh() |
| | | |
| | | |
| | | |
| | | }, |
| | | bibliographyGet() { |
| | | let bibliographyObj = {} |
| | |
| | | wx.stopPullDownRefresh() |
| | | }, |
| | | downloadData(event) { |
| | | console.log(111); |
| | | const item = event.currentTarget.dataset.item; |
| | | // console.log(item.datas.freeFile.Value); |
| | | const URL = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.datas.freeFile.Value |
| | | item.determine = false |
| | | console.log(URL, 'URL'); |
| | |
| | | font-size: var(--td-search-font-size, var(--td-font-size-m, 28rpx)) !important; |
| | | } |
| | | |
| | | /* element.style { |
| | | -webkit-transform: translateX(38.9921875px) !important; |
| | | transform: translateX(38.9921875px) !important; |
| | | } */ |
| | | |
| | | .t-tabs .t-tabs__item--active { |
| | | /* min-width: 210rpx; */ |
| | |
| | | |
| | | .t-tabs__track { |
| | | background-color: #FF6C00 !important; |
| | | -webkit-transform: translateX(39px); |
| | | transform: translateX(39px); |
| | | /* -webkit-transform: translateX(39px); */ |
| | | /* transform: translateX(39px); */ |
| | | /* height: var(--td-tab-track-thickness, 0rpx) !important; */ |
| | | } |
| | | |