| | |
| | | const app = getApp(); |
| | | import SparkMD5 from 'spark-md5' |
| | | import tool from "../../../assets/js/toolClass.js"; |
| | | import { getTopicMsgCmsItemFile } from '../../../assets/js/middleGround/tool.js'; |
| | | import { |
| | | getTopicMsgCmsItemFile |
| | | } from '../../../assets/js/middleGround/tool.js'; |
| | | import FormData from '../../../utils/formdata/index.js'; |
| | | import { |
| | | loginInfo |
| | | } from '../../../assets/js/login'; |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | editState: true, |
| | | reasonTxt: "", |
| | | reasonTxtShow: false, |
| | | skeletonLoding: true, |
| | | isIos: wx.getSystemInfoSync().platform === 'ios', |
| | | keyboardHeight: 0 |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad() { |
| | | //获取职称 |
| | | this.getpositionalTitle(); |
| | | this.getAgreement(); |
| | | |
| | | if (wx.getStorageSync(app.config.tokenKey)) { |
| | | this.getUserRole() |
| | | } |
| | | }, |
| | | |
| | | /** |
| | |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (data) { |
| | | this.getUserRole() |
| | | } else { |
| | | wx.switchTab({ |
| | | url: '/pages/home/home', |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | this.getUserRole() |
| | | } |
| | | |
| | | }, |
| | | |
| | |
| | | if (res) { |
| | | this.getType() |
| | | this.setData({ |
| | | userId: res.userId |
| | | userId: res.userId, |
| | | skeletonLoding: true, |
| | | }) |
| | | let nickNameData = res.infoList.find((item) => item.type == 'nickName') |
| | | let teacherRole = res.roleLinks.find((item) => item.role.refCode == 'teacher') |
| | | let teacherInfos = res.infoList.find((item) => item.type == 'teacherInfo') |
| | | let wechatInfo = res.infoList.find((item) => item.type == 'WeChat') |
| | | let studentInfo = res.infoList.find((item) => item.type == 'Default') |
| | | let phoneInfo = res.secretList.find((item) => item.type == 'MobilePhone') |
| | | let emailInfo = res.secretList.find((item) => item.type == 'EMail') |
| | | let WeChatInfo = res.infoList.find((item) => item.type === "WeChat"); |
| | | let defaultUser = {}; |
| | | if (teacherRole && teacherInfos) { |
| | | defaultUser = { |
| | | ...teacherInfos, |
| | | nickName: teacherInfos.fullName, |
| | | avatarUrl: teacherInfos.icon, |
| | | nickName: nickNameData && JSON.parse(nickNameData.data).nickName ? JSON.parse(nickNameData.data).nickName : WeChatInfo ? WeChatInfo.name : '', |
| | | icon: nickNameData && JSON.parse(nickNameData.data).icon != "" ? JSON.parse(nickNameData.data).icon : WeChatInfo ? WeChatInfo.icon : '', |
| | | userId: res.userId, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo ? emailInfo.credential : JSON.parse(teacherInfos.data).email, |
| | | role: 'Teacher', |
| | | roleId: teacherRole.role.id |
| | | roleId: teacherRole.role.id, |
| | | } |
| | | |
| | | } else if (wechatInfo) { |
| | | } else if (WeChatInfo) { |
| | | defaultUser = { |
| | | ...wechatInfo, |
| | | nickName: wechatInfo.name, |
| | | avatarUrl: wechatInfo.icon, |
| | | ...WeChatInfo, |
| | | nickName: nickNameData && JSON.parse(nickNameData.data).nickName ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name, |
| | | icon: nickNameData && JSON.parse(nickNameData.data).icon != "" ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | userId: res.userId, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo?.credential, |
| | | role: 'Student' |
| | | } |
| | | } else if (studentInfo) { |
| | | defaultUser = { |
| | | ...studentInfo, |
| | | nickName: wechatInfo.name, |
| | | avatarUrl: wechatInfo.icon, |
| | | userId: res.userId, |
| | | phoneNumber: phoneInfo?.credential, |
| | | Email: emailInfo?.credential, |
| | | role: 'Student' |
| | | } |
| | | } |
| | | wx.setStorageSync(app.config.userInfoKey, JSON.stringify(defaultUser)); |
| | | } |
| | | }) |
| | | }, |
| | | //获取字段 |
| | | getType() { |
| | | app.MG.resource.getCmsTypeByRefCode({ |
| | | refCodes: ['jsek_teacherCertification'] |
| | | }).then((res) => { |
| | | console.log(res) |
| | | this.setData({ |
| | | worksInfo: res[0].cmsTypeLinks[0].children, |
| | | }) |
| | | this.newGetTeacherInfo() |
| | | }) |
| | | }, |
| | | |
| | | |
| | | //获取教师状态 |
| | | newGetTeacherInfo() { |
| | | let that = this; |
| | | const data = { |
| | | start: 0, |
| | | size: 10, |
| | |
| | | } |
| | | app.MG.ugc.getTopicMessageList(data).then((res) => { |
| | | try { |
| | | this.setData({ |
| | | that.setData({ |
| | | imgPics: [], |
| | | }) |
| | | const resData = res.datas.find((i) => i.appUserCreator.userId === this.data.userId) |
| | | const resData = res.datas.find((i) => i.appUserCreator.userId === that.data.userId) |
| | | if (resData) { |
| | | if (resData.state == 'WaitAudit') { |
| | | this.setData({ |
| | | that.setData({ |
| | | editState: false, |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | that.setData({ |
| | | editState: true, |
| | | }) |
| | | } |
| | | let info = getTopicMsgCmsItemFile(this.data.worksInfo, resData.cmsItemDataList) |
| | | console.log(info) |
| | | this.setData({ |
| | | let info = getTopicMsgCmsItemFile(that.data.worksInfo, resData.cmsItemDataList) |
| | | that.setData({ |
| | | 'teacherInfo.fullName': info.fullName, |
| | | 'teacherInfo.schoolName': info.schoolName, |
| | | 'teacherInfo.positionalTitle': info.positionalTitle, |
| | |
| | | topicId: resData.id, |
| | | topicMessageList: resData.cmsItemDataList, |
| | | teachText: info.positionalTitle, |
| | | skeletonLoding: false, |
| | | }) |
| | | if (resData.feedBack != null) { |
| | | this.setData({ |
| | | that.setData({ |
| | | reasonTxt: JSON.parse(resData.feedBack).reason, |
| | | }) |
| | | } |
| | | if (this.data.teacherInfo.relevantCertificates.length > 0) { |
| | | if (that.data.teacherInfo.relevantCertificates.length > 0) { |
| | | let arr = []; |
| | | if (typeof this.data.teacherInfo.relevantCertificates == 'object') { |
| | | this.data.teacherInfo.relevantCertificates.forEach((ele) => { |
| | | if (typeof that.data.teacherInfo.relevantCertificates == 'object') { |
| | | that.data.teacherInfo.relevantCertificates.forEach((ele) => { |
| | | let imgObj = { |
| | | md5: ele.file.md5, |
| | | linkType: 'LinkFile', |
| | | linkProtectType: 'Public', |
| | | url: app.config.requestCtx + `/file/GetPreViewImage?md5=` + ele.md5 |
| | | url: app.config.requestCtx + `/file/GetPreViewImage?md5=` + ele.md5, |
| | | imgUrl: ele.file.imgUrl |
| | | } |
| | | arr.push(imgObj); |
| | | this.setData({ |
| | | that.setData({ |
| | | imgPics: arr, |
| | | }); |
| | | }) |
| | | } else { |
| | | let imgObj = { |
| | | md5: this.data.teacherInfo.relevantCertificates, |
| | | md5: that.data.teacherInfo.relevantCertificates, |
| | | linkType: 'LinkFile', |
| | | linkProtectType: 'Public', |
| | | url: |
| | | app.config.requestCtx + `/file/GetPreViewImage?md5=` + this.data.teacherInfo.relevantCertificates |
| | | url: app.config.requestCtx + `/file/GetPreViewImage?md5=` + that.data.teacherInfo.relevantCertificates, |
| | | imgUrl: app.config.requestCtx + `/file/GetPreViewImage?md5=` + that.data.teacherInfo.relevantCertificates, |
| | | } |
| | | arr.push(imgObj); |
| | | this.setData({ |
| | | that.setData({ |
| | | imgPics: arr, |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | that.setData({ |
| | | skeletonLoding: false, |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | } |
| | | } catch (error) {} |
| | | }) |
| | | }, |
| | | |
| | | //获取职称 |
| | | getpositionalTitle() { |
| | | const data = { |
| | | refCodes: ['positionalTitle'] |
| | |
| | | |
| | | //选择职称 |
| | | onTeachPicker() { |
| | | this.setData({ teachVisible: true }); |
| | | this.setData({ |
| | | teachVisible: true |
| | | }); |
| | | }, |
| | | onPickerChange(e) { |
| | | const { value, label } = e.detail; |
| | | const { |
| | | label |
| | | } = e.detail; |
| | | this.setData({ |
| | | teachVisible: false, |
| | | teachText: label[0], |
| | | 'teacherInfo.positionalTitle': value.join[0], |
| | | 'teacherInfo.positionalTitle': label[0], |
| | | }); |
| | | }, |
| | | onPickerCancel(e) { |
| | |
| | | }, |
| | | //输入手机号 |
| | | onPhoneInput(e) { |
| | | const { phoneError } = this.data; |
| | | const isPhoneNumber = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e.detail.value); |
| | | if (phoneError === isPhoneNumber) { |
| | | const { |
| | | phoneError |
| | | } = this.data; |
| | | if (e.detail.value) { |
| | | const isPhoneNumber = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e.detail.value); |
| | | if (phoneError === isPhoneNumber) { |
| | | this.setData({ |
| | | phoneError: !isPhoneNumber, |
| | | "teacherInfo.phone": e.detail.value, |
| | | }); |
| | | } |
| | | } else { |
| | | this.setData({ |
| | | phoneError: !isPhoneNumber, |
| | | "teacherInfo.phone": e.detail.value, |
| | | phoneError: false, |
| | | }); |
| | | } |
| | | }, |
| | | //输入座机 |
| | | onTelphoneInput(e) { |
| | | const { telphoneError } = this.data; |
| | | const isPhoneNumber = /^0\d{2}-\d{8}$|^0\d{3}-\d{7}$/.test(e.detail.value); |
| | | if (telphoneError === isPhoneNumber) { |
| | | const { |
| | | telphoneError |
| | | } = this.data; |
| | | if (e.detail.value) { |
| | | const isPhoneNumber = /^0\d{2}-\d{8}$|^0\d{3}-\d{7}$/.test(e.detail.value); |
| | | if (telphoneError === isPhoneNumber) { |
| | | this.setData({ |
| | | telphoneError: !isPhoneNumber, |
| | | "teacherInfo.telphone": e.detail.value, |
| | | }); |
| | | } |
| | | } else { |
| | | this.setData({ |
| | | telphoneError: !isPhoneNumber, |
| | | "teacherInfo.telphone": e.detail.value, |
| | | telphoneError: false, |
| | | }); |
| | | } |
| | | }, |
| | | onEmailInput(e) { |
| | | const { emailError } = this.data; |
| | | const isPhoneNumber = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(e.detail.value); |
| | | if (emailError === isPhoneNumber) { |
| | | const { |
| | | emailError |
| | | } = this.data; |
| | | if (e.detail.value) { |
| | | const isPhoneNumber = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(e.detail.value); |
| | | if (emailError === isPhoneNumber) { |
| | | this.setData({ |
| | | emailError: !isPhoneNumber, |
| | | "teacherInfo.email": e.detail.value, |
| | | }); |
| | | } |
| | | } else { |
| | | this.setData({ |
| | | emailError: !isPhoneNumber, |
| | | "teacherInfo.email": e.detail.value, |
| | | emailError: false, |
| | | }); |
| | | } |
| | | }, |
| | | // 上传图片事件 |
| | | chooseImg(e) { |
| | | var that = this; |
| | | if (that.data.imgPics.length == 4) { |
| | | wx.showToast({ |
| | | title: "工作证文件不超过5个!", |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | return |
| | | } |
| | | wx.chooseMedia({ |
| | | // count: 1, // 默认9 |
| | | count: 1, |
| | | sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有 |
| | | sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有 |
| | | success: function (res) { |
| | | // 返回选定照片的本地文件路径列表,tempFilePath也可以作为img标签的src属性显示图片 |
| | | console.log(res.tempFiles[0]) |
| | | tool.getFileMd5(res.tempFiles[0]).then((e) => { |
| | | console.log(e, 4) |
| | | if (!that.data.imgPics.find((item) => item.md5 == e)) { |
| | | let formData = new FormData(); |
| | | formData.append('Md5', e); |
| | | formData.append('FileName', e); |
| | | formData.append('FileType', res.tempFiles[0].fileType); |
| | | formData.appendFile("file", res.tempFiles[0].tempFilePath); |
| | | const data = formData.getData(); |
| | | let _token = wx.getStorageSync(app.config.tokenKey); |
| | | let header = {}; |
| | | if (_token == null) { |
| | | header["Authorization"] = `Basic ${Base64.encode(website.clientId + ":" + website.clientSecret)}`; |
| | | } else { |
| | | header["Authorization"] = `Bearer ` + _token; |
| | | } |
| | | new Promise((resolve, reject) => { |
| | | wx.request({ |
| | | url: app.config.requestCtx + '/file/api/ApiUpload', |
| | | method: 'POST', |
| | | header: { |
| | | 'content-type': data.contentType, |
| | | ...header |
| | | }, |
| | | data: data.buffer, |
| | | success(res) { |
| | | if (res.statusCode == 200) { |
| | | resolve(res.data); if (res.data) { |
| | | let arr = []; |
| | | let imgObj = { |
| | | md5: e, |
| | | linkType: 'LinkFile', |
| | | linkProtectType: 'Public', |
| | | url: |
| | | app.config.requestCtx + `/file/GetPreViewImage?md5=` + e |
| | | } |
| | | arr = [...that.data.imgPics, ...[imgObj]]; |
| | | 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); |
| | | if (!that.data.imgPics.find((item) => item.md5 == md5)) { |
| | | let formData = new FormData(); |
| | | 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(); |
| | | let _token = wx.getStorageSync(app.config.tokenKey); |
| | | let header = {}; |
| | | if (_token == null) { |
| | | header["Authorization"] = `Basic ${Base64.encode(website.clientId + ":" + website.clientSecret)}`; |
| | | } else { |
| | | header["Authorization"] = `Bearer ` + _token; |
| | | } |
| | | new Promise((resolve, reject) => { |
| | | wx.request({ |
| | | url: app.config.requestCtx + '/file/api/ApiUpload', |
| | | method: 'POST', |
| | | header: { |
| | | 'content-type': data.contentType, |
| | | ...header |
| | | }, |
| | | data: data.buffer, |
| | | success(res1) { |
| | | if (res1.statusCode == 200) { |
| | | resolve(res1.data); |
| | | if (res1.data) { |
| | | let arr = []; |
| | | let imgObj = { |
| | | md5: md5, |
| | | linkType: 'LinkFile', |
| | | linkProtectType: 'Public', |
| | | url: app.config.requestCtx + `/file/GetPreViewImage?md5=` + md5, |
| | | imgUrl: res.tempFiles[0].tempFilePath |
| | | } |
| | | arr = [...that.data.imgPics, ...[imgObj]]; |
| | | |
| | | that.setData({ |
| | | imgPics: arr, |
| | | }); |
| | | that.setData({ |
| | | imgPics: arr, |
| | | }); |
| | | } |
| | | } else { |
| | | reject('运行时错误,请稍后再试'); |
| | | } |
| | | } else { |
| | | reject('运行时错误,请稍后再试'); |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | }) |
| | | } else { |
| | | wx.showToast({ |
| | | title: "当前文件已上传,请勿重复操作!", |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | } else { |
| | | wx.showToast({ |
| | | title: "当前文件已上传,请勿重复操作!", |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | } |
| | | }); |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | onChange() { |
| | | console.log(this.data.teacherInfo.agree, 12) |
| | | if (this.data.teacherInfo.agree) { |
| | | this.setData({ |
| | | 'teacherInfo.agree': false, |
| | |
| | | reasonTxtShow: e.detail.visible |
| | | }); |
| | | }, |
| | | onCloseProtocol() { |
| | | this.setData({ |
| | | protocolShow: false, |
| | | }); |
| | | }, |
| | | |
| | | //查看为通过原因 |
| | | previewReason() { |
| | | this.setData({ |
| | | reasonTxtShow: true, |
| | | }); |
| | | }, |
| | | |
| | | onCloseReasonTxt() { |
| | | this.setData({ |
| | | reasonTxtShow: false, |
| | | }); |
| | | }, |
| | | |
| | |
| | | }) |
| | | return |
| | | } |
| | | if (that.data.teacherInfo.relevantCertificates.length == 0) { |
| | | if (!that.data.teacherInfo.detailedAddress) { |
| | | wx.showToast({ |
| | | title: "请填写详细地址!", |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | return |
| | | } |
| | | if (that.data.imgPics.length == 0) { |
| | | wx.showToast({ |
| | | title: "请上传工作证!", |
| | | icon: 'none', |
| | |
| | | }) |
| | | return |
| | | } |
| | | console.log(that.data.teacherInfo.fullName) |
| | | if (that.data.teacherInfo.agree) { |
| | | if (that.data.topicMessageList.length > 0) { |
| | | let dataRequests = tool.UpdateworksDataBytool( |
| | |
| | | that.data.teacherInfo, |
| | | that.data.imgPics |
| | | ); |
| | | console.log(dataRequests, 4) |
| | | const data = { |
| | | description: '', |
| | | icon: '', |
| | |
| | | delete basicInfo.worksInfo |
| | | delete basicInfo.state |
| | | const userInfo = { |
| | | requests: [ |
| | | { |
| | | data: JSON.stringify(basicInfo), |
| | | name: that.data.teacherInfo.fullName + '', |
| | | type: 'newTeacherInfo' |
| | | } |
| | | ] |
| | | requests: [{ |
| | | data: JSON.stringify(basicInfo), |
| | | name: that.data.teacherInfo.fullName + '', |
| | | type: 'newTeacherInfo' |
| | | }] |
| | | } |
| | | app.MG.identity.setAppUserInfo(userInfo).then((res) => { |
| | | if (res) { |
| | |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | that.newGetTeacherInfo() |
| | | that.getUserRole() |
| | | // that.newGetTeacherInfo() |
| | | } |
| | | }) |
| | | } |
| | |
| | | delete basicInfo.worksInfo |
| | | delete basicInfo.state |
| | | const userInfo = { |
| | | requests: [ |
| | | { |
| | | data: JSON.stringify(basicInfo), |
| | | name: that.data.teacherInfo.fullName + '', |
| | | type: 'teacherInfo' |
| | | } |
| | | ] |
| | | requests: [{ |
| | | data: JSON.stringify(basicInfo), |
| | | name: that.data.teacherInfo.fullName + '', |
| | | type: 'teacherInfo' |
| | | }] |
| | | } |
| | | app.MG.identity.setAppUserInfo(userInfo).then((res) => { |
| | | app.MG.ugc.newTopicMessage(data).then(() => { |
| | |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | that.newGetTeacherInfo() |
| | | // that.newGetTeacherInfo() |
| | | that.getUserRole() |
| | | } |
| | | }) |
| | | }) |
| | |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | if (wx.getStorageSync(app.config.tokenKey)) { |
| | | this.getUserRole() |
| | | } |
| | | }, |
| | | // 监听页面软键盘弹起手动推动页面 |
| | | bindkeyboardheightchange(e) { |
| | | // 只对ios 处理 |
| | | if (!this.data.isIos === 'ios') { |
| | | return |
| | | } |
| | | // 键盘高度 |
| | | const height = e.detail.height; |
| | | const className = e.target.dataset.class; |
| | | if (height === 0) { |
| | | this.scrollToInput(0); |
| | | return; |
| | | } |
| | | try { |
| | | this.createSelectorQuery() |
| | | .select(`.${className}`) |
| | | .boundingClientRect((res) => { |
| | | // 可使用窗口高度 |
| | | const windowHeight = wx.getSystemInfoSync().windowHeight; |
| | | // 除去键盘的剩余高度 |
| | | let restHeight = windowHeight - height; |
| | | // 元素左下角坐标 |
| | | let bottom = res.bottom; |
| | | // 只有当元素被软键盘覆盖的时候才上推页面 |
| | | if (bottom <= restHeight) return; |
| | | // 现阶段需要滚动的大小 |
| | | let scrollTop = bottom - restHeight; |
| | | this.scrollToInput(height, scrollTop); |
| | | }) |
| | | .exec(); |
| | | } catch (error) {} |
| | | }, |
| | | |
| | | // 获取页面滚动条位置 |
| | | getScrollOffset() { |
| | | return new Promise((resolve) => { |
| | | try { |
| | | wx.createSelectorQuery() |
| | | .selectViewport() |
| | | .scrollOffset((res) => { |
| | | resolve(res.scrollTop); |
| | | }) |
| | | .exec(); |
| | | } catch (error) { |
| | | resolve(0); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 监听页面软键盘弹起手动推动页面 |
| | | scrollToInput(keyboardHeight, scrollTop) { |
| | | this.setData({ |
| | | keyboardHeight, |
| | | }); |
| | | if (scrollTop) { |
| | | try { |
| | | this.getScrollOffset().then((lastScrollTop) => { |
| | | wx.pageScrollTo({ |
| | | // 如果已经存在滚动,在此基础上继续滚 |
| | | scrollTop: lastScrollTop ? lastScrollTop + scrollTop : scrollTop, |
| | | duration: 300, |
| | | }); |
| | | }); |
| | | } catch (error) {} |
| | | } |
| | | }, |
| | | changeParam(e) { |
| | | this.scrollToInput(0); |
| | | }, |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | onReachBottom() {}, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |