| | |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | changeCheckAll(e) { |
| | | this.setData({ |
| | | checkAllState: e.detail.value, |
| | |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | // 格式化日期 |
| | | formatDate(dateString) { |
| | | if (!dateString) { |
| | |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | |
| | | // 监听watch |
| | | watch(context, variableName, callback) { |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | copyPath() { |
| | | wx.setClipboardData({ |
| | | data: this.data.path, |
| | |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | goBack() { |
| | | wx.navigateBack(); |
| | | }, |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | }) |
| | |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | }) |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | goBack() { |
| | | wx.navigateBack() |
| | | }, |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | onTabsChange(event) {}, |
| | | |
| | | onTabsClick(event) {}, |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | onTabsChange(event) { |
| | | console.log(event, 234) |
| | | let tabValue = event.detail.value |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | }) |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | // 获取登录用户身份 |
| | | getUserInfo() { |
| | | app.MG.identity.getCurrentAppUser().then(res => { |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | |
| | | bookExhibitionGet(passId) { |
| | | this.setData({ |
| | |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | |
| | | // 图片数据的接口 |
| | | bookExhibitionGet(newValue) { |
| | | this.setData({ |
| | |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | |
| | | onShareTimeline() {}, |
| | | // 获取侧边栏列表 |
| | | getAssortList() { |
| | | this.setData({ |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | //获取视频学习 |
| | | getPlayerList() { |
| | | app.MG.identity |
| | |
| | | |
| | | |
| | | onCertificate() { |
| | | if (!this.data.isBuy) { |
| | | wx.showToast({ |
| | | title: "请先购买,体验完整服务", |
| | | icon: "none", |
| | | duration: 1000, |
| | | }); |
| | | return false |
| | | } |
| | | if (!this.data.isLearn) { |
| | | wx.showToast({ |
| | | title: "您的学习任务还未完成,暂不能申请证书,加油哦!", |
| | | icon: "none", |
| | | duration: 1000, |
| | | }); |
| | | return false |
| | | } |
| | | // if (!this.data.isBuy) { |
| | | // wx.showToast({ |
| | | // title: "请先购买,体验完整服务", |
| | | // icon: "none", |
| | | // duration: 1000, |
| | | // }); |
| | | // return false |
| | | // } |
| | | // if (!this.data.isLearn) { |
| | | // wx.showToast({ |
| | | // title: "您的学习任务还未完成,暂不能申请证书,加油哦!", |
| | | // icon: "none", |
| | | // duration: 1000, |
| | | // }); |
| | | // return false |
| | | // } |
| | | if (this.data.isCertificate && this.data.isCertificate.state == 'WaitAudit') { |
| | | wx.showToast({ |
| | | title: "您申请的证书正在审核中", |
| | |
| | | }, |
| | | |
| | | confirmM() { |
| | | let currentDate = new Date() |
| | | let year = currentDate.getFullYear() |
| | | let month = currentDate.getMonth() + 1 |
| | | let today = currentDate.getDate() |
| | | if (this.data.userInfo.fullName) { |
| | | if (this.data.pictureMd5 == '') { |
| | | wx.showToast({ |
| | |
| | | name: this.data.digitalsData.name, |
| | | ISBN: this.data.digitalsData.isbn, |
| | | affiliatedUnit: this.data.digitalsData.affiliatedUnit, |
| | | publishingUnit: this.data.publishingUnit, |
| | | publicationDate: this.data.digitalsData.publicationDate, |
| | | classHours: this.data.digitalsData.classHours, |
| | | lecturerList: this.data.lecturerList.length > 0 ? |
| | | this.data.lecturerList[0].name : this.data.digitalsData.courseLeader, |
| | | userName: this.data.userInfo.fullName, |
| | | userPicture: this.data.pictureMd5, |
| | | certificate: this.data.rzzsImg |
| | | studyTime: this.data.digitalsData.beginDate + '-' + year + '-' + month + '-' + today, |
| | | website: this.data.website |
| | | } |
| | | data = { |
| | | topicIdOrRefCode: 'applyCourseCertificate', |
| | |
| | | width: 595px; |
| | | height: 845px; |
| | | position: relative; |
| | | background-image: url('https://jsek.bnuic.com/home/certificate/kczs.jpg'); |
| | | /* background-image: url('https://jsek.bnuic.com/home/certificate/kczs.jpg'); */ |
| | | } |
| | | |
| | | #textCertificate .userIcon { |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | |
| | | |
| | | digitalTextbooksDetailsGet(digitalId) { |
| | |
| | | }, |
| | | |
| | | confirmM() { |
| | | let currentDate = new Date() |
| | | let year = currentDate.getFullYear() |
| | | let month = currentDate.getMonth() + 1 |
| | | let day = currentDate.getDate() |
| | | if (this.data.userInfo.fullName) { |
| | | if (this.data.pictureMd5 == '') { |
| | | wx.showToast({ |
| | |
| | | author: this.data.digitalsData.author, |
| | | ISBN: this.data.digitalsData.isbn, |
| | | publicationDate: this.data.digitalsData.publicationDate, |
| | | publicationDate: this.data.digitalsData.publicationDate, |
| | | userName: this.data.userInfo.fullName, |
| | | userPicture: this.data.pictureMd5, |
| | | certificate: this.data.rzzsImg |
| | | studyTime: this.data.digitalsData.beginDate + '-' + year + '-' + month + '-' + day, |
| | | website: this.data.website |
| | | } |
| | | data = { |
| | | topicIdOrRefCode: 'applyTextbookCertificate', |
| | |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareTimeline() {}, |
| | | //新加的函数 |
| | | |
| | | getCourseTypeListList() { |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | }) |
| | |
| | | |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {} |
| | | }); |
| | |
| | | const app = getApp(); |
| | | import Wxml2Canvas from 'wxml2canvas'; |
| | | import moment from 'moment' |
| | | import { |
| | | getPublicImage |
| | | } from "../../../assets/js/middleGround/tool.js"; |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | closeBtn: false, |
| | | deleteBtn: false, |
| | | images: [], |
| | | pubCertificateHide: false, |
| | | contentData: {}, |
| | | rzzsImg: '' |
| | | }, |
| | | |
| | | /** |
| | |
| | | .then((res) => { |
| | | if (res.datas.length > 0) { |
| | | res.datas.forEach((item) => { |
| | | item.updateDate = item.updateDate.split('T')[0] |
| | | if (item.content) { |
| | | item.productList = JSON.parse(item.content) |
| | | item.productList.updateDate = moment(item.updateDate).format('YYYY年MM月') |
| | | item.productList.userPicture = getPublicImage(item.productList.userPicture, '', '') |
| | | } |
| | | }) |
| | | let dataList = res.datas; |
| | |
| | | goBookDetails(e) { |
| | | let productList = e.currentTarget.dataset.book.productList |
| | | this.setData({ |
| | | images: productList.certificate ? [productList.certificate] : this.data.active === 0 ? ['/static/images/certificate/kczs.jpg'] : ['/static/images/certificate/jczs.jpg'], |
| | | contentData: productList, |
| | | pubCertificateHide: true, |
| | | }) |
| | | this.drawImage1() |
| | | }, |
| | | drawImage1() { |
| | | let that = this; |
| | | let drawMyImage1 = new Wxml2Canvas({ |
| | | width: that.data.imageWidth, |
| | | height: that.data.imageHeight, |
| | | element: 'myCanvas1', |
| | | progress(percent) {}, |
| | | finish(url) { |
| | | wx.getFileSystemManager().readFile({ |
| | | filePath: url, |
| | | encoding: 'base64', |
| | | success: (res) => { |
| | | let MyImageBase641 = 'data:image/jpg;base64,' + res.data |
| | | if (MyImageBase641) { |
| | | that.setData({ |
| | | rzzsImg: MyImageBase641, |
| | | }) |
| | | } |
| | | setTimeout(() => { |
| | | that.setData({ |
| | | pubCertificateHide: false, |
| | | images: [that.data.rzzsImg], |
| | | showIndex: true, |
| | | visible: true, |
| | | }) |
| | | |
| | | }, 1000) |
| | | }, |
| | | }) |
| | | }, |
| | | error(res) { |
| | | console.log("生成的图片失败", res) |
| | | } |
| | | }, this); |
| | | let data = { |
| | | list: [{ |
| | | type: 'wxml', |
| | | class: '.my_canvas1 .my_draw_canvas1', //.my_draw_canvas每个要绘制元素的类名 |
| | | limit: '.my_canvas1', //my_canvas根元素类名 |
| | | x: 0, |
| | | y: 0 |
| | | }] |
| | | } |
| | | drawMyImage1.draw(data, that); |
| | | }, |
| | | |
| | | onClose(e) { |
| | | const { |
| | | trigger |
| | | } = e.detail; |
| | | this.setData({ |
| | | visible: false, |
| | | images: [], |
| | | }); |
| | | }, |
| | | /** |
| | |
| | | <view class="listBox"> |
| | | <view class="content-item" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
| | | <view class="icon" data-book="{{item}}" bindtap="goBookDetails"> |
| | | <image src="{{item.productList.certificate}}" mode="aspectFit" class="img" wx:if="{{item.productList.certificate}}" /> |
| | | <image src="https://jsek.bnuic.com/home/certificate/szkc.jpg" mode="aspectFit" class="img" wx:if="{{!item.productList.certificate && active == 0}}" /> |
| | | <image src="https://jsek.bnuic.com/home/certificate/jczs.jpg" mode="aspectFit" class="img" wx:if="{{!item.productList.certificate && active == 1}}" /> |
| | | <image src="https://jsek.bnuic.com/home/certificate/kczs.jpg" mode="aspectFit" class="img" wx:if="{{active == 0}}" /> |
| | | <image src="https://jsek.bnuic.com/home/certificate/jczs.jpg" mode="aspectFit" class="img" wx:if="{{active == 1}}" /> |
| | | <view class="currentBtn hover"> |
| | | <text class="{{item.state == 'Normal' ? 'yes' : item.state == 'WaitAudit' ? 'wait' : item.state == 'Reject' ? 'no' : '-' }} ">{{item.state == 'Normal' ? '已通过' : item.state == 'WaitAudit' ? '审核中' : item.state == 'Reject' ? '未通过' : '-' }}</text> |
| | | </view> |
| | | </view> |
| | | <view class="body-info"> |
| | | <view class="name">{{item.productList.name}}</view> |
| | |
| | | <t-back-top theme="round" wx:if="{{isBackTop}}" text="顶部" bind:to-top="onToTop"></t-back-top> |
| | | <t-image-viewer deleteBtn="{{deleteBtn}}" closeBtn="{{closeBtn}}" showIndex="{{showIndex}}" visible="{{visible}}" images="{{images}}" bind:close="onClose"></t-image-viewer> |
| | | </view> |
| | | <canvas canvas-id="myCanvas1" style="height:845px;width:595px" wx:if="{{pubCertificateHide && contentData}}"></canvas> |
| | | <view id="textCertificate" class="my_canvas1" wx:if="{{pubCertificateHide && contentData}}"> |
| | | <image data-type="image" data-url="https://jsek.bnuic.com/home/certificate/kczs.jpg" src="https://jsek.bnuic.com/home/certificate/kczs.jpg" mode="" class="bgImg my_draw_canvas1" wx:if="{{active == 0}}"/> |
| | | <image data-type="image" data-url="https://jsek.bnuic.com/home/certificate/jczs.jpg" src="https://jsek.bnuic.com/home/certificate/jczs.jpg" mode="" class="bgImg my_draw_canvas1" wx:if="{{active == 1}}"/> |
| | | <view class="certificateInfo my_draw_canvas1"> |
| | | <view class="userIcon my_draw_canvas1"> |
| | | <view class="hexagon my_draw_canvas1"> |
| | | <image src="{{contentData.userPicture}}" class="img my_draw_canvas1" /> |
| | | </view> |
| | | </view> |
| | | <view class="userName my_draw_canvas1" data-type="text" data-text="{{contentData.userName}}">{{contentData.userName}}</view> |
| | | <view class="bookName my_draw_canvas1" data-type="text" data-text="{{contentData.name}}">{{contentData.name}}</view> |
| | | <view class="textAuthor my_draw_canvas1" data-type="text" data-text="{{contentData.author}}" wx:if="{{active == 1}}">{{contentData.author || '-' }}</view> |
| | | <view class="author my_draw_canvas1" data-type="text" data-text="{{contentData.courseLeader}}" wx:if="{{active == 0}}">{{contentData.courseLeader || '-' }}</view> |
| | | <view class="classHours my_draw_canvas1" data-type="text" data-text="{{contentData.classHours}}" wx:if="{{active == 0}}">{{contentData.classHours || '-' }}</view> |
| | | <view class="{{active == 0 ? 'affiliatedUnit my_draw_canvas1' : 'publishingUnit my_draw_canvas1'}}" data-type="text" data-text="{{contentData.publishingUnit}}">{{contentData.publishingUnit || '-'}}</view> |
| | | <view class="studyTime my_draw_canvas1" data-type="text" data-text="{{contentData.studyTime}}">{{contentData.studyTime}}</view> |
| | | <view class="website my_draw_canvas1" data-type="text" data-text="{{contentData.website}}">{{contentData.website}}</view> |
| | | <view class="codeBox my_draw_canvas1"></view> |
| | | <view class="updateDate my_draw_canvas1"> |
| | | {{ contentData.updateDate }} |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | .listBox { |
| | | display: flex; |
| | | flex-flow: row wrap; |
| | | padding: 30rpx 0; |
| | | padding: 30rpx; |
| | | } |
| | | |
| | | |
| | |
| | | margin-bottom: 30rpx; |
| | | margin: 0 20rpx; |
| | | align-self: stretch; |
| | | text-align: center; |
| | | } |
| | | |
| | | |
| | | .content-item .icon { |
| | | height: 470rpx; |
| | | width: 100%; |
| | | height: 400rpx; |
| | | width: 280rpx; |
| | | margin: auto; |
| | | box-shadow: 0px 0px 20rpx 2px rgba(0, 0, 0, 0.16); |
| | | position: relative; |
| | | } |
| | | |
| | | .content-item .icon .img, |
| | |
| | | padding: 200rpx 0; |
| | | text-align: center; |
| | | } |
| | | |
| | | .currentBtn { |
| | | width: 50px; |
| | | height: 26px; |
| | | text-align: center; |
| | | font-size: 12px; |
| | | line-height: 24px; |
| | | position: absolute; |
| | | left: 1px; |
| | | bottom: 1px; |
| | | background-color: rgba(255, 108, 0, 0.1); |
| | | border-radius: 0px 5px 0px 0px; |
| | | |
| | | } |
| | | |
| | | .yes { |
| | | color: #1FBC1F |
| | | } |
| | | |
| | | .wait { |
| | | color: #ff6d00; |
| | | } |
| | | |
| | | .no { |
| | | color: #ee1818; |
| | | } |
| | | |
| | | #textCertificate { |
| | | width: 595px; |
| | | height: 845px; |
| | | position: relative; |
| | | /* background-image: url('https://jsek.bnuic.com/home/certificate/kczs.jpg'); */ |
| | | } |
| | | |
| | | #textCertificate .certificateInfo { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | } |
| | | |
| | | #textCertificate .userIcon { |
| | | padding-top: 233px; |
| | | } |
| | | |
| | | #textCertificate .hexagon { |
| | | width: 103px; |
| | | height: 117px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); |
| | | margin: 0 auto; |
| | | overflow: hidden; |
| | | |
| | | |
| | | } |
| | | |
| | | #textCertificate .img { |
| | | width: 103px; |
| | | height: 117px; |
| | | } |
| | | |
| | | #textCertificate .bgImg { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | #textCertificate .userName { |
| | | height: 74rpx; |
| | | font-size: 70rpx; |
| | | padding-top: 26px; |
| | | text-align: center; |
| | | font-family: 'FZXBSJW'; |
| | | } |
| | | |
| | | #textCertificate .bookName { |
| | | padding-top: 30px; |
| | | margin-left: 460rpx; |
| | | font-size: 20px; |
| | | color: #000; |
| | | font-family: 'FZXBSJW'; |
| | | } |
| | | |
| | | #textCertificate .author { |
| | | font-size: 28rpx; |
| | | margin-top: 84rpx; |
| | | margin-left: 52%; |
| | | color: #000; |
| | | font-family: 'SimHei', sans-serif; |
| | | } |
| | | |
| | | #textCertificate .textAuthor { |
| | | font-size: 28rpx; |
| | | margin-top: 134rpx; |
| | | margin-left: 52%; |
| | | color: #000; |
| | | font-family: 'SimHei', sans-serif; |
| | | } |
| | | |
| | | #textCertificate .classHours { |
| | | font-size: 28rpx; |
| | | margin-top: 20rpx; |
| | | margin-left: 52%; |
| | | color: #000; |
| | | font-family: 'SimHei', sans-serif; |
| | | } |
| | | |
| | | #textCertificate .affiliatedUnit { |
| | | font-size: 28rpx; |
| | | margin-top: 24rpx; |
| | | margin-left: 40%; |
| | | color: #000; |
| | | font-family: 'SimHei', sans-serif; |
| | | } |
| | | |
| | | #textCertificate .publishingUnit { |
| | | font-size: 28rpx; |
| | | margin-top: 24rpx; |
| | | margin-left: 28%; |
| | | color: #000; |
| | | font-family: 'SimHei', sans-serif; |
| | | } |
| | | |
| | | #textCertificate .studyTime { |
| | | font-size: 28rpx; |
| | | margin-top: 23rpx; |
| | | margin-left: 33%; |
| | | color: #000; |
| | | font-family: 'SimHei', sans-serif; |
| | | } |
| | | |
| | | #textCertificate .website { |
| | | font-size: 28rpx; |
| | | margin-top: 40rpx; |
| | | margin-left: 27%; |
| | | color: #000; |
| | | font-family: 'SimHei', sans-serif; |
| | | } |
| | | |
| | | #textCertificate .codeBox { |
| | | height: 140rpx; |
| | | margin-top: 34rpx; |
| | | text-align: center; |
| | | } |
| | | |
| | | #textCertificate .updateDate { |
| | | margin-top: 80rpx; |
| | | text-align: center; |
| | | font-size: 12px; |
| | | color: #000; |
| | | } |
| | |
| | | isWhite: data |
| | | }) |
| | | }, |
| | | |
| | | // delectBtn() { |
| | | // app.MG.ugc |
| | | // .delTopicMessage({ |
| | | // messageIds: [2986, 1302, 1301, 3074, 1305, 1304] |
| | | // }) |
| | | // .then((res) => { |
| | | // console.log('删除成功') |
| | | // }) |
| | | // }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | goBack() { |
| | | wx.navigateBack(); |
| | | }, |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | goBack() { |
| | | wx.navigateBack(); |
| | | }, |
| | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | }) |