| | |
| | | </view> |
| | | </t-dialog> --> |
| | | <!-- <view class="suggest"> --> |
| | | <t-popup |
| | | visible="{{showWithInput}}" |
| | | bind:visible-change="onVisibleChange" |
| | | placement="center" |
| | | > |
| | | <t-popup visible="{{showWithInput}}" bind:visible-change="onVisibleChange" placement="center"> |
| | | <view class="top-icon"> |
| | | <t-image src="/static/images/bookService/detail/feedback.png"></t-image> |
| | | </view> |
| | | <view slot="content" class="content"> |
| | | <view class="top-title">我要建议</view> |
| | | <view class="demo-rate"> |
| | | <t-rate |
| | | value="{{ratevalue}}" |
| | | catch:change="onChangeRate" |
| | | size="{{30}}" |
| | | color="#FFB400" |
| | | /> |
| | | <t-rate value="{{ratevalue}}" catch:change="onChangeRate" size="{{30}}" color="#FFB400" /> |
| | | </view> |
| | | <view class="phone-input"> |
| | | <t-input |
| | | value="{{inputvalue}}" |
| | | slot="content" |
| | | label="" |
| | | placeholder="请输入联系方式" |
| | | bind:change="inputChange" |
| | | type="number" |
| | | maxlength="{{11}}" |
| | | class="phone" |
| | | style="{{inputStyle}}" |
| | | placeholder-class="t-input__placeholder input-placeholder" |
| | | /> |
| | | <t-input clearable value="{{inputvalue}}" slot="content" label="" placeholder="请输入联系方式" bind:change="inputChange" type="number" maxlength="{{11}}" class="phone" style="{{inputStyle}}" /> |
| | | </view> |
| | | <view style="width: 100%"> |
| | | <t-textarea |
| | | value="{{textvalue}}" |
| | | t-class="external-class" |
| | | label="" |
| | | placeholder="请输入反馈内容" |
| | | maxcharacter="200" |
| | | disableDefaultPadding="{{true}}" |
| | | indicator |
| | | bind:change="textareaChange" |
| | | style="{{inputStyle}}" |
| | | placeholder-style="{{placeholderstyle}}" |
| | | /> |
| | | <t-textarea value="{{textvalue}}" t-class="external-class" label="" placeholder="请输入反馈内容" maxcharacter="200" disableDefaultPadding="{{true}}" indicator bind:change="textareaChange" style="{{inputStyle}}" placeholder-style="{{placeholderstyle}}" /> |
| | | </view> |
| | | </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> |
| | | <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> --> |
| | |
| | | /* pages/bookServices/detail/components/suggest/suggest.wxss */ |
| | | |
| | | |
| | | |
| | | |
| | | .t-input__wrap .t-input__content, |
| | | .t-input__control { |
| | | font-size: 28rpx !important; |
| | |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | |
| | | .phone-input .input-placeholder { |
| | | font-size: 28rpx !important |
| | | } |
| | |
| | | return false; |
| | | } |
| | | wx.navigateTo({ |
| | | url: '/packageBookService/pages/components/webView/index?md5=' + this.data.fileInfo.md5 + '&fileName=' + this.data.fileInfo.bookName + '&fileType=' + this.data.fileInfo.fileType + '&freePage=' + this.data.fileInfo.freePage + '&bookBuy=' + this.data.bookBuy |
| | | url: '/packageBookService/pages/components/webView/index?md5=' + this.data.fileInfo.md5 + '&fileName=' + this.data.fileInfo.bookName + '&fileType=' + this.data.fileInfo.fileType + '&freePage=' + this.data.fileInfo.freePage + '&bookBuy=' + this.data.bookBuy + '&bookId=' + this.data.bookDetail.id |
| | | }) |
| | | |
| | | }, |
| | |
| | | saveTime: 20, |
| | | isNight: false, |
| | | sliderValue: 0, // 字体滑块 |
| | | startTime: "", //进入页面当前时间 |
| | | pauseTime: 0 //暂停时间 |
| | | }, |
| | | |
| | | /** |
| | |
| | | } |
| | | }, 1000) |
| | | } |
| | | this.setData({ |
| | | startTime: Date.now() |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | |
| | | onHide() { |
| | | if (wx.timer) { |
| | | clearInterval(wx.timer) |
| | | } |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey)) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | }, |
| | | |
| | |
| | | if (this.data.countdownInterval !== null) { |
| | | clearInterval(this.data.countdownInterval) |
| | | } |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey)) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | }, |
| | | |
| | | count(timeStr) { |
| | | const data = { |
| | | appRefCode: app.config.appRefCode, |
| | | type: 'LearningTime', //统计类型--阅读时长 |
| | | data: timeStr + '', //统计内容--时长毫秒 |
| | | event: 'LearningTime', |
| | | sysType: 'App' |
| | | } |
| | | //阅读商品的id |
| | | if (this.data.bookId) { |
| | | data.productId = this.data.bookId |
| | | } |
| | | //阅读资源的id |
| | | // if (product.cmsItemId) { |
| | | // data.cmsItemId = product.cmsItemId |
| | | // } |
| | | app.MG.job.newJobWithApiNewEvent(data).then((res) => {}) |
| | | }, |
| | | |
| | | /** |
| | |
| | | currentPage: '', |
| | | pdfList: [], |
| | | skeletonLoding: true, |
| | | startTime: "", //进入页面当前时间 |
| | | pauseTime: 0 //暂停时间 |
| | | }, |
| | | |
| | | /** |
| | |
| | | md5: data.md5 |
| | | }).then((res) => { |
| | | let pageCount = data.bookBuy ? res.totalPages : Number(data.freePage) |
| | | |
| | | if (pageCount) { |
| | | let list = []; |
| | | |
| | |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | this.setData({ |
| | | startTime: Date.now() |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey) && epubObj.bookBuy) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey) && epubObj.bookBuy) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | }, |
| | | |
| | | count(timeStr) { |
| | | const data = { |
| | | appRefCode: app.config.appRefCode, |
| | | type: 'LearningTime', //统计类型--阅读时长 |
| | | data: timeStr + '', //统计内容--时长毫秒 |
| | | event: 'LearningTime', |
| | | sysType: 'App' |
| | | } |
| | | //阅读商品的id |
| | | if (epubObj.bookId) { |
| | | data.productId = epubObj.bookId |
| | | } |
| | | //阅读资源的id |
| | | // if (product.cmsItemId) { |
| | | // data.cmsItemId = product.cmsItemId |
| | | // } |
| | | app.MG.job.newJobWithApiNewEvent(data).then((res) => {}) |
| | | }, |
| | | |
| | | /** |
| | |
| | | naturalResources: [], |
| | | titleName: '', |
| | | pdfDatA: [], |
| | | startTime: "", //进入页面当前时间 |
| | | pauseTime: 0 //暂停时间 |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | this.setData({ |
| | | startTime: Date.now() |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey) && epubObj.bookBuy) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey) && epubObj.bookBuy) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | }, |
| | | |
| | | count(timeStr) { |
| | | const data = { |
| | | appRefCode: app.config.appRefCode, |
| | | type: 'LearningTime', //统计类型--阅读时长 |
| | | data: timeStr + '', //统计内容--时长毫秒 |
| | | event: 'LearningTime', |
| | | sysType: 'App' |
| | | } |
| | | //阅读商品的id |
| | | if (this.data.bookId) { |
| | | data.productId = this.data.bookId |
| | | } |
| | | //阅读资源的id |
| | | if (this.data.cmsId) { |
| | | data.cmsItemId = this.data.cmsId |
| | | } |
| | | app.MG.job.newJobWithApiNewEvent(data).then((res) => {}) |
| | | }, |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | |
| | | |
| | | //文档等 |
| | | if (item.selectType == 'pdf' || item.selectType == 'document') { |
| | | app.MG.file.getPdfInfo({ md5: item.file }).then((res) => { |
| | | app.MG.file.getPdfInfo({ |
| | | md5: item.file |
| | | }).then((res) => { |
| | | if (res && res.totalPages) { |
| | | for (let i = 0; i < res.totalPages; i++) { |
| | | const src = app.config.requestCtx + '/file/GetPdfPageImage?md5=' + item.file + '&index=' + (i + 1) + '&dpi=300' |
| | |
| | | isplay: false, //是否默认播放, |
| | | selectId: '', |
| | | speed: 1.0, |
| | | myAudioPos: '' |
| | | myAudioPos: '', |
| | | startTime: "", //进入页面当前时间 |
| | | pauseTime: 0 //暂停时间 |
| | | }, |
| | | // // 时间格式化 |
| | | // format(t) { |
| | |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | this.setData({ |
| | | startTime: Date.now() |
| | | }) |
| | | |
| | | }, |
| | | |
| | |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey)) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey)) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | }, |
| | | |
| | | count(timeStr) { |
| | | const data = { |
| | | appRefCode: app.config.appRefCode, |
| | | type: 'LearningTime', //统计类型--阅读时长 |
| | | data: timeStr + '', //统计内容--时长毫秒 |
| | | event: 'LearningTime', |
| | | sysType: 'App' |
| | | } |
| | | //阅读商品的id |
| | | if (this.data.bookId) { |
| | | data.productId = this.data.bookId |
| | | } |
| | | //阅读资源的id |
| | | if (this.data.cmsId) { |
| | | data.cmsItemId = this.data.cmsId |
| | | } |
| | | app.MG.job.newJobWithApiNewEvent(data).then((res) => {}) |
| | | }, |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | |
| | | submitType: "new", // 新建 or 编辑 |
| | | noteId: '', |
| | | |
| | | videoChange: true |
| | | videoChange: true, |
| | | startTime: "", //进入页面当前时间 |
| | | pauseTime: 0 //暂停时间 |
| | | }, |
| | | // 格式化笔记时间 |
| | | convertTimestamp(timestamp) { |
| | |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | this.setData({ |
| | | startTime: Date.now() |
| | | }) |
| | | |
| | | }, |
| | | |
| | |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey)) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey)) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | }, |
| | | |
| | | count(timeStr) { |
| | | const data = { |
| | | appRefCode: app.config.appRefCode, |
| | | type: 'LearningTime', //统计类型--阅读时长 |
| | | data: timeStr + '', //统计内容--时长毫秒 |
| | | event: 'LearningTime', |
| | | sysType: 'App' |
| | | } |
| | | //阅读商品的id |
| | | if (this.data.bookId) { |
| | | data.productId = this.data.bookId |
| | | } |
| | | //阅读资源的id |
| | | if (this.data.cmsId) { |
| | | data.cmsItemId = this.data.cmsId |
| | | } |
| | | app.MG.job.newJobWithApiNewEvent(data).then((res) => {}) |
| | | }, |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | |
| | | </t-tabs> |
| | | <view class="page-content"> |
| | | <view class="con-bg"></view> |
| | | <view class="content"> |
| | | <scroll-view class="scroll content" scroll-y> |
| | | <view class="bookListBox"> |
| | | <view class="tips"> |
| | | <rich-text space="emsp" nodes="{{description}}" class="content" /> |
| | |
| | | <view class="btn-area"> |
| | | <button class="submit" bindtap="submit">提交</button> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | |
| | | .content { |
| | | box-sizing: border-box; |
| | | height: calc(100vh - env(safe-area-inset-bottom) - 96rpx); |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .t-tabs__track { |
| | |
| | | <view class="container"> |
| | | <view class="content"> |
| | | <scroll-view class="scroll content" scroll-y> |
| | | <view class="tips"> 仅限学校本课程任课教师申请;请上传有效在职教师工作证将有助于审核。 </view> |
| | | <view class="body-loading" wx:if="{{skeletonLoding}}"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" /> |
| | |
| | | <button class="submit" bindtap="submit">提交</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | <view class="popupBox"> |
| | | <t-popup visible="{{protocolShow}}" bind:visible-change="onVisibleChange" placement="center"> |
| | | <view class="block"> |
| | |
| | | .content { |
| | | height: calc(100vh - env(safe-area-inset-bottom)); |
| | | box-sizing: border-box; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .tips { |
| | |
| | | .block { |
| | | position: relative; |
| | | width: 600rpx; |
| | | height: 820rpx; |
| | | height: 600rpx; |
| | | padding: 20rpx 0; |
| | | background: #fff; |
| | | border-radius: 16rpx; |
| | |
| | | orderNum: orderNum, |
| | | }; |
| | | app.MG.store.getOrderByOrderNum(data).then(res => { |
| | | if (res && res.state != "WaitPay") { |
| | | app.MG.store.confirmOrder(data).then(conRes => { |
| | | if (conRes.orderNumber) { |
| | | const resOrderNum = { |
| | | orderNum: conRes.orderNumber, |
| | | }; |
| | | if (conRes.payPrice != 0) { |
| | | app.MG.store.makeWeChatPay(resOrderNum).then(payRes => { |
| | | const payVal = JSON.parse(payRes); |
| | | wx.requestPayment({ |
| | | "appId": payVal.appId, |
| | | "timeStamp": payVal.timeStamp, |
| | | "nonceStr": payVal.nonceStr, |
| | | "package": payVal.package, |
| | | "signType": payVal.signType, |
| | | "paySign": payVal.paySign, |
| | | "success": function (res) { |
| | | if (res.errMsg == 'requestPayment:ok') { |
| | | that.setData({ |
| | | isPaySuccess: true |
| | | }) |
| | | } |
| | | console.log(res, "成功") |
| | | }, |
| | | "fail": function (res) { |
| | | console.log(res, "失败") |
| | | }, |
| | | "complete": function (res) { |
| | | if (res.errMsg == 'requestPayment:ok') { |
| | | that.getDataList(false) |
| | | } |
| | | if (that.data.isPaySuccess && that.data.isPayComplete) { |
| | | that.navToBack() |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } else { |
| | | wx.showToast({ |
| | | title: '领取成功', |
| | | }) |
| | | // 可添加返回上级 |
| | | setTimeout(() => { |
| | | that.navToBack() |
| | | }, 2000); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | app.MG.store |
| | | .makeWeChatPay({ |
| | | orderNum: orderNum |
| | | app.MG.store.makeWeChatPay({ |
| | | orderNum: res.orderNumber, |
| | | platform: "WeChatAppCustom" |
| | | }) |
| | | .then(payRes => { |
| | | const payVal = JSON.parse(payRes); |
| | |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | }, |
| | |
| | | const app = getApp() |
| | | import SparkMD5 from 'spark-md5' |
| | | import tool from "../../../assets/js/toolClass.js"; |
| | | import FormData from '../../../utils/formdata/index.js'; |
| | | Page({ |
| | |
| | | defaultUser = { |
| | | ...teacherInfos, |
| | | nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : teacherInfos.name, |
| | | icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo ? WeChatInfo.icon : '', |
| | | icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | userId: res.userId, |
| | | role: 'Teacher', |
| | | roleId: teacherRole.role.id, |
| | |
| | | editIconInfo(e) { |
| | | var that = this; |
| | | wx.chooseMedia({ |
| | | // count: 1, // 默认9 |
| | | count: 1, // 默认9 |
| | | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 |
| | | sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 |
| | | success: function (res) { |
| | | // 返回选定照片的本地文件路径列表,tempFilePath也可以作为img标签的src属性显示图片 |
| | | tool.getFileMd5(res.tempFiles[0]).then((e) => { |
| | | wx.getFileSystemManager().readFile({ |
| | | filePath: res.tempFiles[0].tempFilePath, //选择图片返回的相对路径 |
| | | // encoding: 'binary', //编码格式 |
| | | success: ress => { |
| | | //成功的回调 |
| | | let spark = new SparkMD5.ArrayBuffer(); |
| | | spark.append(ress.data); |
| | | let md5 = spark.end(false); |
| | | let formData = new FormData(); |
| | | formData.append('Md5', e); |
| | | formData.append('FileName', e); |
| | | formData.append('Md5', md5); |
| | | formData.append('FileName', md5); |
| | | formData.append('FileType', res.tempFiles[0].fileType); |
| | | formData.appendFile("file", res.tempFiles[0].tempFilePath); |
| | | const data = formData.getData(); |
| | |
| | | resolve(res.data); |
| | | if (res.data) { |
| | | that.setData({ |
| | | 'userInfoForm.icon': app.config.requestCtx + `/file/GetPreViewImage?md5=` + e, |
| | | 'userInfoForm.icon': app.config.requestCtx + `/file/GetPreViewImage?md5=` + md5, |
| | | }); |
| | | let userTypeInfo = { |
| | | "requests": [{ |
| | |
| | | icon: 'success', |
| | | duration: 1000, |
| | | }) |
| | | this.getUserInfo() |
| | | this.setData({ |
| | | that.getUserInfo() |
| | | that.setData({ |
| | | userInfoBox: false, |
| | | }); |
| | | } |
| | |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | |
| | | } |
| | | |
| | | }, |
| | | |
| | | onCloseProtocol() { |
| | | this.setData({ |
| | | userInfoBox: false, |
| | | }); |
| | | }, |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | |
| | | <view class="itemList"> |
| | | <view class="label">手机号码</view> |
| | | <view class="content" data-info="{{'phone'}}" bindtap="editUserInfo">{{userInfo.phoneNumber || '未绑定手机号'}}</view> |
| | | <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" /> |
| | | <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" data-info="{{'phone'}}" bindtap="editUserInfo" /> |
| | | </view> |
| | | <view class="itemList"> |
| | | <view class="label">邮箱</view> |
| | | <view class="content" data-info="{{'email'}}" bindtap="editUserInfo">{{userInfo.Email}}</view> |
| | | <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" /> |
| | | <t-icon name="chevron-right" size="40rpx" color="#C2C2C2" data-info="{{'email'}}" bindtap="editUserInfo" /> |
| | | </view> |
| | | <t-popup visible="{{userInfoBox}}" bind:visible-change="onVisibleChange" placement="bottom"> |
| | | <t-popup visible="{{userInfoBox}}" bind:visible-change="onVisibleChange" placement="center"> |
| | | <view class="block"> |
| | | <view class="body"> |
| | | <view class="from-item" wx:if="{{editType == 'nickName'}}"> |
| | | <view class="label"> 昵称: </view> |
| | | <view class="item-content"> |
| | | <view class="inputBox1"> |
| | | <t-input placeholder="输入用户名" borderless value="{{userInfoForm.nickName}}" bindchange="onNameInput" /> |
| | | <t-input placeholder="输入昵称" borderless value="{{userInfoForm.nickName}}" bindchange="onNameInput" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="footer"> |
| | | <button class="submit" bindtap="confirmInfo">确定</button> |
| | | </view> |
| | | <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="onCloseProtocol" /> |
| | | </view> |
| | | </t-popup> |
| | | </view> |
| | |
| | | |
| | | .block .body { |
| | | padding: 40rpx; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .block .body .from-item { |
| | | margin-bottom: 20rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .block .body .from-item .label { |
| | | width: 200rpx; |
| | | height: 72rpx; |
| | | line-height: 72rpx; |
| | | min-width: 100rpx; |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | font-size: 32rpx; |
| | | } |
| | | |
| | | .block .body .from-item .item-content { |
| | | padding: 10rpx; |
| | | flex: 1; |
| | | display: flex; |
| | | } |
| | |
| | | } |
| | | |
| | | .inputBox1 .t-input { |
| | | width: 440rpx !important; |
| | | width: 380rpx !important; |
| | | } |
| | | |
| | | .block { |
| | | position: relative; |
| | | width: 600rpx; |
| | | min-height: 500rpx; |
| | | padding: 20rpx 0; |
| | | background: #fff; |
| | | border-radius: 16rpx; |
| | | } |
| | | |
| | | |
| | | .block .body { |
| | | min-height: 280rpx; |
| | | } |
| | | |
| | | .block .body .inputBox { |
| | | width: 250rpx; |
| | | width: 300rpx; |
| | | height: 72rpx; |
| | | border: 2rpx solid #D9D9D9; |
| | | } |
| | | |
| | | .t-input { |
| | | padding: 10rpx !important; |
| | | } |
| | | |
| | | .t-input__placeholder { |
| | | font-size: 28rpx !important; |
| | | } |
| | | |
| | | .imgCode { |
| | |
| | | color: #fff; |
| | | border-radius: 50rpx; |
| | | } |
| | | |
| | | .close-btn { |
| | | position: absolute; |
| | | left: 50%; |
| | | margin-left: -32rpx; |
| | | bottom: calc(-1 * (48rpx + 64rpx)); |
| | | } |
| | |
| | | }) |
| | | }, |
| | | navToActivityDetail(e) { |
| | | console.log(item) |
| | | let { |
| | | info |
| | | } = e.currentTarget.dataset |
| | | console.log(info) |
| | | if (info.link) { |
| | | wx.navigateTo({ |
| | | url: info.link, |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | loadHomePage() { |
| | |
| | | }, |
| | | tabChangeHandle(item) { |
| | | let info = this.data.courseTypeList[item.detail.value] |
| | | this.setData({ |
| | | courseList: [] |
| | | }) |
| | | this.getCourseList(info) |
| | | }, |
| | | //图书服务分类 |
| | |
| | | background: #fff; |
| | | border-top-left-radius: 16rpx; |
| | | border-top-right-radius: 16rpx; |
| | | margin-bottom: 100rpx; |
| | | } |
| | | |
| | | .block .header { |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad() { |
| | | this.getStaticsSum(); |
| | | this.getDataList(false); |
| | | }, |
| | | |
| | |
| | | active: 2 |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | getStaticsSum() { |
| | | const data = { |
| | | start: 0, |
| | | size: 10, |
| | | filterList: [{ |
| | | value: "LearningTime", |
| | | field: "type", |
| | | }], |
| | | }; |
| | | app.MG.app.getStaticsSum(data).then((res) => { |
| | | if (res) { |
| | | let minutes = Number(res) / (1000 * 60) |
| | | let hours = Number(res) / (1000 * 60 * 60) |
| | | if (minutes > 0 && minutes < 60) { |
| | | this.setData({ |
| | | learningDuration: Math.round(minutes) + "分钟" |
| | | }) |
| | | } else if (minutes > 60) { |
| | | this.setData({ |
| | | learningDuration: Math.round(hours) + "小时" |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | learningDuration: "0小时" |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | tabClick(item) { |
| | |
| | | <view class="boxStyle"> |
| | | <view class="box-item"> |
| | | <view>累计学习时长</view> |
| | | <view class="result"><text class="num">{{learningDuration}}</text>小时</view> |
| | | <view class="result"><text class="num">{{learningDuration}}</text></view> |
| | | </view> |
| | | <view class="box-item"> |
| | | <view>上一次登陆时间</view> |