| | |
| | | "pages/personalCenter/certificate/index", |
| | | "pages/bookServices/assort/index", |
| | | "pages/testLogin/index", |
| | | "pages/bindInfo/index" |
| | | "pages/bindInfo/index", |
| | | "pages/bookExhibitionList/select/select" |
| | | ], |
| | | "subPackages": [ |
| | | { |
| | |
| | | .t-loading__circular { |
| | | color: #ff6d00 !important; |
| | | } |
| | | |
| | |
| | | export const requestCtx = "http://182.92.203.7:3001"; // 请求地址 |
| | | export const appId = 27; |
| | | // export const requestCtx = "https://jsek.bnuic.com"; // 请求地址 |
| | | // export const appId = 3; |
| | | // export const requestCtx = "http://182.92.203.7:3001"; // 请求地址 |
| | | // export const appId = 27; |
| | | export const requestCtx = "https://jsek.bnuic.com"; // 请求地址 |
| | | export const appId = 3; |
| | | // export const epubUrl = "http://182.92.203.7:3007/epubReadMobile/"; |
| | | export const epubUrl = "https://jsek.bnuic.com/epubReadMobile/#/"; |
| | | export const pdfUrl = "http://182.92.203.7:3007/pdfRead/"; |
| | |
| | | }, |
| | | }).then(res => { |
| | | // console.log(res.datas[0].content); |
| | | |
| | | let modifiedContent = `<div class="richTextBox">${res.datas[0].content}</div>`; |
| | | console.log(modifiedContent); |
| | | this.setData({ |
| | | aboutText: res.datas[0].content, |
| | | aboutText: modifiedContent, |
| | | loading: false, |
| | | hidden: false, |
| | | }) |
| | | |
| | | |
| | | }) |
| | | }, |
| | | goBack() { |
| | |
| | | <rich-text nodes="{{aboutText}}" space="emsp"></rich-text> |
| | | </view> |
| | | </view> |
| | | <view wx:else class="aboutText" style="margin: 5rpx;"> |
| | | <rich-text class="richTextBox" style="width: 100%;" space="emsp" nodes="{{aboutText}}" mode="compat"></rich-text> |
| | | <view wx:else class="aboutText richTextBox" style="margin: 5rpx;"> |
| | | <rich-text style="width: 100%;" space="emsp" nodes="{{aboutText}}" mode="compat"></rich-text> |
| | | </view> |
| | | </view> |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | .titleTextBox { |
| | | margin: 0 auto; |
| | | } |
| | | |
| | | |
| | | /* 富文本初始化样式 */ |
| | | .richTextBox { |
| | | line-height: 1.4; |
| | | font-size: 14px; |
| | | line-height: 1.4 !important; |
| | | font-size: 14px !important; |
| | | } |
| | | |
| | | .richTextBox { |
| | | margin: revert; |
| | | padding: revert; |
| | | border: revert; |
| | | font: revert; |
| | | vertical-align: revert; |
| | | color: #000; |
| | | margin: revert !important; |
| | | padding: revert !important; |
| | | border: revert !important; |
| | | font: revert !important; |
| | | vertical-align: revert !important; |
| | | color: #000 !important; |
| | | } |
| | | |
| | | |
| | | .richTextBox p { |
| | | display: block; |
| | | text-align: center; |
| | | -webkit-margin-before: 1em; |
| | | margin-block-start: 1em; |
| | | -webkit-margin-after: 1em; |
| | | margin-block-end: 1em; |
| | | -webkit-margin-start: 0; |
| | | margin-inline-start: 0; |
| | | -webkit-margin-end: 0; |
| | | margin-inline-end: 0; |
| | | display: block !important; |
| | | -webkit-margin-before: 1em !important; |
| | | margin-block-start: 1em !important; |
| | | -webkit-margin-after: 1em !important; |
| | | margin-block-end: 1em !important; |
| | | -webkit-margin-start: 0 !important; |
| | | margin-inline-start: 0 !important; |
| | | -webkit-margin-end: 0 !important; |
| | | margin-inline-end: 0 !important; |
| | | } |
| | | |
| | | .richTextBox td { |
| | | border-bottom: 1px dashed; |
| | | border-right: 1px dashed; |
| | | border-bottom: 1px dashed !important; |
| | | border-right: 1px dashed !important; |
| | | border-width: 1px !important; |
| | | } |
| | | |
| | | .richTextBox table { |
| | | border-width: 2px !important; |
| | | } |
| | | |
| | | .titleTextBox { |
| | | margin: 0 auto; |
| | | |
| | | } |
| | |
| | | emailError: false, |
| | | imgCode: '', |
| | | countDown: 0, |
| | | mailCountDown: 0, |
| | | userInfoBox: false, |
| | | height: '', //屏幕高度 |
| | | }, |
| | |
| | | this.setData({ |
| | | userInfoBox: e.detail.visible, |
| | | countDown: 0, |
| | | mailCountDown:0 |
| | | }); |
| | | }, |
| | | editIconInfo(e) { |
| | |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | // 开启短信验证倒计时 |
| | | this.getSecondEmail(60) |
| | | } else { |
| | | wx.showToast({ |
| | | title: '邮箱验证码发送失败', |
| | |
| | | }) |
| | | } |
| | | }, |
| | | getSecondEmail(time) { |
| | | if (this.data.mailCountDown <= 0) { |
| | | this.setData({ |
| | | mailCountDown: time, |
| | | }); |
| | | |
| | | let timer = setInterval(() => { |
| | | let count = this.data.mailCountDown - 1; |
| | | this.setData({ |
| | | mailCountDown: count, |
| | | }); |
| | | |
| | | if (count === 0) { |
| | | clearInterval(timer); |
| | | } |
| | | }, 1000); |
| | | } |
| | | }, |
| | | |
| | | confirmInfo() { |
| | | if (this.data.editType == 'nickName') { |
| | |
| | | <view class="from-item" wx:if="{{editType == 'phone'}}"> |
| | | <view class="label"> 手机号: </view> |
| | | <view class="item-content"> |
| | | <view class="outsideInputBox1"> |
| | | |
| | | <view class="inputBox1"> |
| | | <t-input placeholder="输入手机号码" borderless value="{{userInfoForm.phone}}" type="number" tips="{{phoneError ? '手机号输入不正确' : ''}}" bindchange="onPhoneInput" /> |
| | | <t-input placeholder="输入手机号码" borderless value="{{userInfoForm.phone}}" type="number" bindchange="onPhoneInput" /> |
| | | </view> |
| | | <view wx:if="{{phoneError}}" style="font-size: 24rpx; color: red;">手机号输入不正确</view> |
| | | |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | <view class="from-item" wx:if="{{editType == 'email'}}"> |
| | | <view class=" label"> 邮箱: </view> |
| | | <view class="item-content"> |
| | | <view class="outsideInputBox1"> |
| | | <view class="inputBox1"> |
| | | <t-input placeholder="输入邮箱" borderless value="{{userInfoForm.email}}" tips="{{emailError ? '邮箱输入不正确' : ''}}" bindchange="onEmailInput" /> |
| | | <t-input placeholder="输入邮箱" borderless value="{{userInfoForm.email}}" bindchange="onEmailInput" /> |
| | | |
| | | </view> |
| | | <view wx:if="{{emailError}}" style="font-size: 24rpx; color: red;">邮箱输入不正确</view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | <view class="from-item" wx:if="{{editType !== 'nickName'}}"> |
| | |
| | | <t-input placeholder="输入短信验证码" borderless value="{{userInfoForm.code}}" type="number" bindchange="onCodeInput" /> |
| | | </view> |
| | | <view class="code"> |
| | | <button class="btn" bindtap="getPhoneCode">{{countDown > 0 ? '验证码(' + countDown + 's)' : '获取短信验证码'}}</button> |
| | | <button class="{{countDown > 0 ? ' disabled' : 'btn'}}" bindtap="getPhoneCode">{{countDown > 0 ? '验证码(' + countDown + 's)' : '获取短信验证码'}}</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <t-input placeholder="输入邮箱验证码" borderless value="{{userInfoForm.code}}" type="number" bindchange="onCodeInput" /> |
| | | </view> |
| | | <view class="code"> |
| | | <button class="btn" bindtap="getEmailCode">获取邮箱验证码</button> |
| | | <button class="{{mailCountDown > 0 ? ' disabled' : 'btn'}}" bindtap="getEmailCode"> {{mailCountDown > 0 ? '验证码(' + mailCountDown + 's)' : '获取邮箱验证码'}}</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | .row-info .body .from-item .item-content { |
| | | flex: 1; |
| | | display: flex; |
| | | |
| | | } |
| | | |
| | | .inputBox1 { |
| | | border: 2rpx solid #D9D9D9; |
| | | flex: 1; |
| | | width: 100%; |
| | | |
| | | } |
| | | |
| | | .outsideInputBox1 { |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 100%; |
| | | } |
| | | |
| | | |
| | | .block { |
| | |
| | | border: 2rpx solid #ff6c00; |
| | | color: #fff; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .disabled { |
| | | width: 190rpx; |
| | | height: 72rpx; |
| | | background: #ccc; |
| | | |
| | | color: #000; |
| | | cursor: not-allowed; |
| | | font-size: 28rpx; |
| | | padding: 0 10rpx !important; |
| | | } |
| | | |
| | | .footer { |
| | |
| | | background-color: #ff6c00; |
| | | color: white; |
| | | } |
| | | |
| | | .t-input--default+.t-input__tips { |
| | | color: var(--td-input-default-tips-color, var(--td-font-gray-3, rgba(229, 62, 48))) !important; |
| | | } |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | hiddenmodalput: false, |
| | | name: "", |
| | | phoneNum: '', |
| | | input: '', |
| | | dialogKey: '', |
| | | showWithInput: false, |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | |
| | | |
| | | |
| | | this.higherGet() |
| | | this.vocationalGet() |
| | | this.teacherGet() |
| | |
| | | |
| | | |
| | | this.setData({ |
| | | [key]: true, |
| | | dialogKey: key, |
| | | // [key]: true, |
| | | // dialogKey: key, |
| | | hiddenmodalput: true, |
| | | input: '', |
| | | Md5: item.datas.freeFile.FileList[0].Md5 |
| | | |
| | | }); |
| | | |
| | | |
| | |
| | | }); |
| | | console.log(111); |
| | | }, |
| | | //取消弹框 |
| | | cancelM: function (e) { |
| | | this.setData({ |
| | | hiddenmodalput: false, |
| | | }) |
| | | }, |
| | | //提交 |
| | | confirmM: function (e) { |
| | | console.log("姓名:" + this.data.name + " 电话:" + this.data.phoneNum); |
| | | if (!this.data.emailError && this.data.name) { |
| | | |
| | | |
| | | |
| | | |
| | | if (this.data.name) { |
| | | let query = { |
| | | eMail: this.data.name, |
| | | md5s: [this.data.Md5] |
| | | } |
| | | app.MG.file.sendFileWithEmail(query).then(res => { |
| | | console.log(res); |
| | | this.setData({ |
| | | hiddenmodalput: false, |
| | | }) |
| | | }) |
| | | } |
| | | } else { |
| | | // 校验不通过,给出错误提示 |
| | | wx.showToast({ |
| | | title: '邮箱格式不正确', |
| | | icon: 'none', |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | |
| | | iName: function (e) { |
| | | this.setData({ |
| | | name: e.detail.value |
| | | }) |
| | | // console.log(this.data.name); |
| | | }, |
| | | iPhoneNum: function (e) { |
| | | this.setData({ |
| | | phoneNum: e.detail.value |
| | | }) |
| | | }, |
| | | |
| | | |
| | | }) |
| | |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | |
| | | <modal hidden="{{!hiddenmodalput}}" title="请输入邮箱" confirm-text="确定" cancel-text="取消" bindcancel="cancelM" bindconfirm="confirmM" style="height: 300rpx !important;"> |
| | | <view style="height: 50rpx;"></view> |
| | | <input bindinput='iName' type='text' placeholder="请输入邮箱号" auto-focus /> |
| | | <view style="height: 50rpx;"></view> |
| | | </modal> |
| | | |
| | | |
| | | |
| | | |
| | | <t-toast id="t-toast" /> |
| | |
| | | |
| | | .higherBox { |
| | | width: 220rpx; |
| | | /* height: 390rpx; */ |
| | | /* min-height: 390rpx; */ |
| | | /* 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; |
| | | margin-bottom: 0rpx ; |
| | | } |
| | | |
| | | .outsideHigherBox { |
| | |
| | | } |
| | | |
| | | .higherTextBox { |
| | | height: 50rpx; |
| | | font-weight: bold; |
| | | font-size: 25rpx; |
| | | color: #333333; |
| | | padding: 15rpx; |
| | | margin-bottom: 10rpx; |
| | | margin-bottom: 20rpx; |
| | | display: -webkit-box; |
| | | -webkit-box-orient: vertical; |
| | | -webkit-line-clamp: 2; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | |
| | | .outsideHigherImageBox {} |
| | | |
| | | .downloadIcon { |
| | |
| | | // pages/bookExhibitionList/index.js |
| | | import Toast from 'tdesign-miniprogram/toast/index'; |
| | | |
| | | import watch from './watch/watch' |
| | | const app = getApp() |
| | | Page({ |
| | | |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | name: "测试watch", |
| | | newPrice: '', |
| | | loading: true, |
| | | hidden: true, |
| | | totalSize: '', |
| | |
| | | }, |
| | | { |
| | | value: 'jsek_bFHigherEducation', |
| | | //重点项目 |
| | | price: 'jsek_higherEducation', |
| | | label: '高等教育', |
| | | }, |
| | | { |
| | | value: 'jsek_bFVocationalEducation', |
| | | //重点项目 |
| | | price: 'jsek_vocationalEducation', |
| | | label: '职业教育', |
| | | }, |
| | | { |
| | | value: 'jsek_bFTeacherEducation', |
| | | //重点项目 |
| | | price: 'jsek_teacherEducation', |
| | | label: '教师教育', |
| | | }, |
| | | ], |
| | | }, |
| | | multipleSelect: { |
| | | value: [], |
| | | // value: [], |
| | | options: [], |
| | | }, |
| | | navBarHeight: '', |
| | |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | |
| | | // this.setData({ |
| | | // 'product.value': '*', |
| | | // }); |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | |
| | | barHeight: systInfo.statusBarHeight, |
| | | }) |
| | | |
| | | // 单列选择器选项 |
| | | const singleSelectOptions = this.data.filteredItems.map(item => ({ |
| | | label: item.name, |
| | | value: item.value, |
| | | disabled: false, |
| | | })) |
| | | |
| | | if (this.data.filteredItems = []) { |
| | | |
| | | // singleSelectOptions.push({ |
| | | // label: '暂无数据', |
| | | // value: 'disabled', |
| | | // disabled: true, |
| | | // }); |
| | | } else { |
| | | console.log(7889); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 更新数据 |
| | | this.setData({ |
| | | 'multipleSelect.options': singleSelectOptions, |
| | | }); |
| | | |
| | | |
| | | watch.setWatcher(this); |
| | | let that = this; |
| | | setTimeout(function () { |
| | | that.data.name = "测试watch变化了" |
| | | }, 5000) |
| | | // |
| | | }, |
| | | |
| | | watch: { |
| | | name: function (newVal, oldVal) { |
| | | //这里的this和onLoad里的this指向一样 |
| | | console.log(newVal, oldVal); |
| | | }, |
| | | newPrice: function (newVal, oldVal) { |
| | | console.log(newVal, oldVal); |
| | | } |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | // debugger |
| | | this.bookExhibitionGet() |
| | | this.keyProjectsGet() |
| | | |
| | | // this.keyProjectsGet(this.data.newPrice) |
| | | |
| | | |
| | | }, |
| | | |
| | |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | |
| | | preventScrollThrough: true, |
| | | icon: 'poweroff', |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | } else { |
| | | // const currentPage = this.data.page.start + 1; // 获取当前页数并加1 |
| | | const newSize = this.data.page.size + 10; // 原来的基础上加10 |
| | |
| | | |
| | | if (res.datas.length == 0) { |
| | | this.setData({ |
| | | keynoteDisabled: true |
| | | // keynoteDisabled: true |
| | | }) |
| | | } |
| | | |
| | |
| | | }, |
| | | //重点项目接口 |
| | | keyProjectsGet(newPrice) { |
| | | |
| | | this.setData({ |
| | | loading: true, |
| | | hidden: true, |
| | | }) |
| | | |
| | | let parms = { |
| | | refCodes: ['bookClassification'] |
| | | } |
| | | app.MG.store.getProductTypeField(parms).then(res => { |
| | | |
| | | const checkData = JSON.parse(res[0].config) |
| | | console.log(checkData); |
| | | checkData.option.forEach(item => { |
| | | if (newPrice == item.value) { |
| | | this.setData({ |
| | | filteredItems: item.child || [] // 如果存在子项则赋值,否则赋值为空数组 |
| | | }); |
| | | |
| | | } |
| | | }) |
| | | |
| | | this.onLoad(); |
| | | // 单列选择器选项 |
| | | const singleSelectOptions = this.data.filteredItems.map(item => ({ |
| | | label: item.name, |
| | | value: item.value, |
| | | })) |
| | | // 更新数据 |
| | | this.setData({ |
| | | 'multipleSelect.options': singleSelectOptions, |
| | | }); |
| | | |
| | | this.setData({ |
| | | loading: false, |
| | | hidden: false, |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | // 总分类 |
| | | // 总分类 |
| | | onChange(e) { |
| | | this.data.page.size = 16 //更改显示的值 |
| | | const newValue = e.detail.value; |
| | | const selectedOption = this.data.product.options.find(option => option.value === newValue); |
| | | const newPrice = selectedOption ? selectedOption.price : null; |
| | | |
| | | |
| | | // const bookExhibitionListsubsidiary = [] |
| | | // this.setData({ |
| | | // bookExhibitionListsubsidiary: this.data.bookExhibitionList |
| | | // }) |
| | | |
| | | |
| | | if (newPrice) { |
| | | this.setData({ |
| | | keynoteDisabled: false |
| | |
| | | keynoteDisabled: true |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | // 总分类 |
| | | // 总分类 |
| | | onChange(e) { |
| | | |
| | | |
| | | |
| | | // this.data.page.size = 16 //更改显示的值 |
| | | const newValue = e.detail.value; |
| | | |
| | | this.setData({ |
| | | 'product.value': newValue, |
| | | 'product.price': newPrice, // 将选中的 price 值保存在数据中 |
| | | |
| | | }); |
| | | |
| | | |
| | | // debugger |
| | | // let newPrice = '' |
| | | |
| | | |
| | | |
| | | |
| | | if (newValue == 'jsek_bFHigherEducation') { |
| | | |
| | | this.setData({ |
| | | newPrice: 'jsek_higherEducation' |
| | | }) |
| | | } else if (newValue == 'jsek_bFVocationalEducation') { |
| | | this.setData({ |
| | | newPrice: 'jsek_vocationalEducation' |
| | | }) |
| | | } else if (newValue == 'jsek_bFTeacherEducation') { |
| | | this.setData({ |
| | | newPrice: 'jsek_teacherEducation' |
| | | }) |
| | | } |
| | | this.bookExhibitionGet(newValue); |
| | | this.keyProjectsGet(newPrice); |
| | | // 调用更新页面数据的函数,传入新的 value 和 price 值 |
| | | this.keyProjectsGet(this.data.newPrice) |
| | | |
| | | |
| | | |
| | | |
| | | if (this.data.keynoteValue) { |
| | | //如果有数据就清空并刷新页面 |
| | | this.data.keynoteValue = [] |
| | | this.bookExhibitionGet(newValue) |
| | | this.onLoad() |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // e.stopImmediatePropagation() |
| | | |
| | | }, |
| | | |
| | | // 重点项目 |
| | | handleMultipleSelect(e) { |
| | | console.log(e); |
| | | this.setData({ |
| | | 'multipleSelect.value': e.detail.value, |
| | | }); |
| | | }, |
| | | handleConfirm(event) { |
| | | console.log(event); |
| | | const { |
| | | value |
| | | } = event.detail; |
| | | // 确认操作的处理逻辑 |
| | | |
| | | |
| | | this.data.keynoteValue = value |
| | | this.bookExhibitionGet() |
| | | }, |
| | |
| | | </view> |
| | | <view class="example-search"> |
| | | <t-search model:value="{{value}}" placeholder="请输入书展名称" bind:submit="onSearchSubmit" /> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="outsideMenuBox"> |
| | | <view class="menuBox"> |
| | | |
| | | <t-dropdown-menu> |
| | | <!-- show-overlay="{{false}}" --> |
| | | <!-- <t-dropdown-item options="{{product.options}}" value="{{product.value}}" bindchange="onChange" /> --> |
| | | <t-dropdown-item options="{{product.options}}" value="{{product.value}}" bindchange="onChange" /> |
| | | |
| | | |
| | | |
| | | |
| | | <t-dropdown-item options="{{product.options}}" default-value="{{product.value}}" bindchange="onChange" /> |
| | | |
| | | |
| | | <!-- disabled="{{keynoteDisabled}}" --> |
| | | <t-dropdown-item disabled="{{keynoteDisabled}}" label=" 重点项目" options="{{multipleSelect.options}}" value="{{multipleSelect.value}}" 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"> |
| | | </t-dropdown-item> |
| | | |
| | | <t-dropdown-item options="{{sorter.options}}" default-value="{{sorter.value}}" bindchange="onSort" /> |
| | | |
| | | </t-dropdown-menu> |
| | | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | <view class="assembleContent"> |
| | | <view class="titleBox"> |
| | | <view class="frameBox"></view> |
| | |
| | | <view class="outside"> |
| | | |
| | | |
| | | <!-- <button bind:tap="onTest">点一下</button> --> |
| | | |
| | | |
| | | |
| | | |
| | |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | <!-- <Select prop-array='{{selectArray}}'></Select> --> |
| | | </scroll-view> |
| | | |
| | | </view> |
| | |
| | | |
| | | .menuBox { |
| | | display: flex; |
| | | /* height: 75rpx; */ |
| | | height: 100rpx; |
| | | margin-top: 10rpx; |
| | | align-items: center; |
| | | |
New file |
| | |
| | | // pages/bookExhibitionList/select/select.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | <!--pages/bookExhibitionList/select/select.wxml--> |
| | | <text>pages/bookExhibitionList/select/select.wxml</text> |
New file |
| | |
| | | const observe = (obj, key, watchFun, deep, page) => { |
| | | let val = obj[key]; |
| | | if (val != null && typeof val === "object" && deep) { |
| | | Object.keys(val).forEach((item) => { |
| | | observe(val, item, watchFun, deep, page); |
| | | }); |
| | | } |
| | | Object.defineProperty(obj, key, { |
| | | configurable: true, |
| | | enumerable: true, |
| | | set: (value) => { |
| | | watchFun.call(page, value, val); |
| | | val = value; |
| | | if (deep) { |
| | | observe(obj, key, watchFun, deep, page); |
| | | } |
| | | }, |
| | | get: () => { |
| | | return val; |
| | | } |
| | | }); |
| | | } |
| | | const setWatcher = (page) => { |
| | | let data = page.data; |
| | | let watch = page.watch; |
| | | Object.keys(watch).forEach((item) => { |
| | | let targetData = data; |
| | | let keys = item.split("."); |
| | | for (let i = 0; i < keys.length - 1; i++) { |
| | | targetData = targetData[keys[i]]; |
| | | } |
| | | let targetKey = keys[keys.length - 1]; |
| | | let watchFun = watch[item].handler || watch[item]; |
| | | let deep = watch[item].deep; |
| | | observe(targetData, targetKey, watchFun, deep, page); |
| | | }); |
| | | } |
| | | module.exports = { |
| | | setWatcher |
| | | }; |