| | |
| | | "t-loading": "tdesign-miniprogram/loading/loading", |
| | | "t-button": "tdesign-miniprogram/button/button" |
| | | }, |
| | | "navigationStyle": "custom" |
| | | "navigationStyle": "custom", |
| | | "disableScroll": true |
| | | } |
| | |
| | | }) |
| | | }, |
| | | async feedBack() { |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | | desc: '用户登录', |
| | | success: (res) => { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // const token = wx.getStorageSync('jsek-token') |
| | | // if (!token) { |
| | | // return wx.getUserProfile({ |
| | | // desc: '用户登录', |
| | | // success: (res) => { |
| | | // console.log(res); |
| | | // } |
| | | // }) |
| | | // } |
| | | let content = { |
| | | source: this.data.ratevalue, |
| | | phone: this.data.inputvalue, |
| | |
| | | await this.feedBack() |
| | | } |
| | | }, |
| | | }) |
| | | }) |
| | |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-radio": "tdesign-miniprogram/radio/radio", |
| | | "t-radio-group": "tdesign-miniprogram/radio-group/radio-group" |
| | | "t-radio-group": "tdesign-miniprogram/radio-group/radio-group", |
| | | "t-empty": "tdesign-miniprogram/empty/empty" |
| | | } |
| | | } |
| | |
| | | <!--pages/bookServices/detail/components/testResource/testResource.wxml--> |
| | | <view class="test-resource"> |
| | | <view class="top-btn"> |
| | | <t-radio-group |
| | | class="test-radio" |
| | | t-class="horizontal-box" |
| | | value="{{radioItem}}" |
| | | bind:change="onRadioChange" |
| | | style="margin: 0 10rpx 0 0" |
| | | > |
| | | <t-radio-group class="test-radio" t-class="horizontal-box" value="{{radioItem}}" bind:change="onRadioChange" style="margin: 0 10rpx 0 0"> |
| | | <view class="card {{radioItem == 'test' ? 'card--active' : ''}}"> |
| | | <t-radio value="test" icon="none" borderless style="height: 80rpx"> |
| | | <view class="radio-content" slot="content"> |
| | | <image |
| | | src="{{ radioItem == 'test' ? '/static/images/bookService/detail/practice-icon.png' : '/static/images/bookService/detail/notest.png'}}" |
| | | ></image> |
| | | <text style="color: {{radioItem == 'test' ? '#fff':''}};" |
| | | >练习</text |
| | | > |
| | | <image src="{{ radioItem == 'test' ? '/static/images/bookService/detail/practice-icon.png' : '/static/images/bookService/detail/notest.png'}}"></image> |
| | | <text style="color: {{radioItem == 'test' ? '#fff':''}};">练习</text> |
| | | </view> |
| | | </t-radio> |
| | | </view> |
| | | <view class="card {{radioItem == 'mock' ? 'card--active' : ''}}"> |
| | | <t-radio value="mock" icon="none" borderless style="height: 80rpx"> |
| | | <view class="radio-content" slot="content"> |
| | | <image |
| | | src="{{ radioItem == 'mock' ? '/static/images/bookService/detail/checkpaper.png' : '/static/images/bookService/detail/zujuan.png'}}" |
| | | ></image> |
| | | <text style="color: {{radioItem == 'mock' ? '#fff':''}};" |
| | | >组卷</text |
| | | > |
| | | <image src="{{ radioItem == 'mock' ? '/static/images/bookService/detail/checkpaper.png' : '/static/images/bookService/detail/zujuan.png'}}"></image> |
| | | <text style="color: {{radioItem == 'mock' ? '#fff':''}};">组卷</text> |
| | | </view> |
| | | </t-radio> |
| | | </view> |
| | | </t-radio-group> |
| | | <t-button |
| | | class="error-btn" |
| | | theme="default" |
| | | size="medium" |
| | | style="padding: 0 12rpx" |
| | | bind:tap="goMycollect" |
| | | data-answerType="errorQuestion" |
| | | > |
| | | <t-button class="error-btn" theme="default" size="medium" style="padding: 0 12rpx" bind:tap="goMycollect" data-answerType="errorQuestion"> |
| | | <view slot="content" class="btn-content"> |
| | | <image src="/static/images/bookService/detail/cuoti.png"></image> |
| | | <text>我的错题</text> |
| | | </view> |
| | | </t-button> |
| | | <t-button |
| | | class="collect-btn" |
| | | theme="default" |
| | | size="medium" |
| | | style="padding: 0 12rpx" |
| | | bind:tap="goMycollect" |
| | | data-answerType="collectQuestion" |
| | | > |
| | | <t-button class="collect-btn" theme="default" size="medium" style="padding: 0 12rpx" bind:tap="goMycollect" data-answerType="collectQuestion"> |
| | | <view slot="content" class="btn-content"> |
| | | <image src="/static/images/bookService/detail/wodeshoucang.png"></image> |
| | | <text> 我的收藏</text> |
| | |
| | | </t-button> |
| | | </view> |
| | | <!-- 练习列表 --> |
| | | <view |
| | | class="resource-list" |
| | | wx:for="{{list}}" |
| | | wx:key="id" |
| | | wx:if="{{radioItem == 'test'}}" |
| | | > |
| | | <view class="resource-list" wx:for="{{list}}" wx:key="id" wx:if="{{radioItem == 'test'}}"> |
| | | <view class="list-title"> |
| | | <image src="/static/images/bookService/detail/test-icon.png"></image> |
| | | <text>{{item.name}}</text> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <view wx:if="{{noResources}}" class="noData" wx:if="{{radioItem == 'test' && !list.length}}"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | |
| | | <!-- 组卷列表 --> |
| | | <view class="mock-data" wx:if="{{radioItem == 'mock'}}"> |
| | | <view wx:if="{{mockData.mockList.length}}"> |
| | | <view> |
| | | <view class="mack-num"> |
| | | <text>已组卷{{mockData.mockList.length}}次</text> |
| | | <t-button class="buy-mock-btn" bind:tap="buyMock">购买组卷</t-button> |
| | | </view> |
| | | <view class="mock-list"> |
| | | <view |
| | | class="mock-list-box" |
| | | wx:for="{{mockData.mockList}}" |
| | | wx:key="id" |
| | | data-item="{{item}}" |
| | | bind:tap="goMackPaper" |
| | | > |
| | | <view class="mock-list" wx:if="{{mockData.mockList.length}}"> |
| | | <view class="mock-list-box" wx:for="{{mockData.mockList}}" wx:key="id" data-item="{{item}}" bind:tap="goMackPaper"> |
| | | <view class="mock-title">{{item.name}}</view> |
| | | <view class="mock-message"> |
| | | <view class="message-box"> |
| | | <view class="mack-state"> |
| | | <text wx:if="{{item.state == '3'}}" class="complete state-pad" |
| | | >已完成</text |
| | | > |
| | | <text |
| | | wx:elif="{{item.state == '2' || item.state == '1'}}" |
| | | class="Incomplete state-pad" |
| | | >未完成</text |
| | | > |
| | | <text wx:if="{{item.state == '3'}}" class="complete state-pad">已完成</text> |
| | | <text wx:elif="{{item.state == '2' || item.state == '1'}}" class="Incomplete state-pad">未完成</text> |
| | | <text wx:else class="Incomplete state-pad">未开始</text> |
| | | </view> |
| | | <view class="mock-time">{{item.createDate}}</view> |
| | | </view> |
| | | <view class="mock-score" wx:if="{{item.state == '3'}}" |
| | | >{{item.report.userScore}}分</view |
| | | > |
| | | <view class="mock-score" wx:if="{{item.state == '3'}}">{{item.report.userScore}}分</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view wx:else class="not-mock"> |
| | | <image src="/static/images/bookService/examination/zhuangtai-icon.png"></image> |
| | | <view class="not-mock-message note-mock-text">组卷是收费功能,请购买后使用!</view> |
| | | <view class="note-mock-price note-mock-text">价格:<text class="mock-price">¥{{mockData.price}}</text> 元/次</view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view wx:else class="not-mock"> |
| | | <image |
| | | src="/static/images/bookService/examination/zhuangtai-icon.png" |
| | | ></image> |
| | | <view class="not-mock-message note-mock-text" |
| | | >组卷是收费功能,请购买后使用!</view |
| | | > |
| | | <view class="note-mock-price note-mock-text" |
| | | >价格:<text class="mock-price">¥{{mockData.price}}</text> 元/次</view |
| | | > |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | import Message from 'tdesign-miniprogram/message/message'; |
| | | const util = require('./components/util') // 引入封装过的加载提示 |
| | | import { |
| | | loginInfo |
| | | } from '../../../../../../assets/js/login' |
| | | const app = getApp() |
| | | Component({ |
| | | // checked: false, |
| | |
| | | }, |
| | | // 跳转音视频播放器 |
| | | goPlayer(e) { |
| | | if (this.properties.isShowCheck) return true |
| | | const item = e.currentTarget.dataset.item |
| | | const parent = e.currentTarget.dataset.parent |
| | | let url |
| | | if (item.selectType == 'video' || item.learnSelectType == 'video') { |
| | | url = '/packageDomain/pages/resourceDetails/myVideo/index' |
| | | } else if (item.selectType == 'audio' || item.learnSelectType == 'audio') { |
| | | url = '/packageDomain/pages/resourceDetails/myAudio/index' |
| | | } else if (item.selectType == 'picture' || item.selectType == 'zip') { |
| | | url = '/packageDomain/pages/resourceDetails/document/index' |
| | | } |
| | | if (this.properties.tab == 'jsek_cloudLearning' && this.resourceIsBuy(item)) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请先购买该资源', |
| | | }) |
| | | } |
| | | wx.navigateTo({ |
| | | url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parent.productLinkPath}&parentName=${parent.name}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}`, |
| | | }) |
| | | |
| | | |
| | | if (item.selectType == 'document' || item.selectType == 'pdf') { |
| | | const fileLink = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file |
| | | console.log(fileLink, 'fileLink'); |
| | | //提示加载中 |
| | | util.showLoading() |
| | | // 单次下载允许的最大文件为 200MB |
| | | wx.downloadFile({ |
| | | url: fileLink, // 地址已打码,自己换个其他的地址("https://www.xxxxx.com/file/测试通知.pdf") |
| | | success: function (res) { |
| | | console.log(res, "wx.downloadFile success res") |
| | | if (res.statusCode != 200) { |
| | | util.hideLoadingWithErrorTips() |
| | | return false |
| | | } |
| | | var Path = res.tempFilePath //返回的文件临时地址,用于后面打开本地预览所用 |
| | | wx.openDocument({ |
| | | filePath: Path, |
| | | showMenu: true, |
| | | success: function (res) { |
| | | console.log('打开成功'); |
| | | util.hideLoading() |
| | | } |
| | | }) |
| | | }, |
| | | fail: function (err) { |
| | | console.log(err, "wx.downloadFile fail err"); |
| | | util.hideLoadingWithErrorTips() |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | // 如果不是第一次登录,会执行回调 |
| | | if (data) { |
| | | // 登录成功,自动记录token和用户信息,并返回true |
| | | } else { |
| | | // 出现错误,返回false |
| | | } |
| | | }) |
| | | |
| | | |
| | | } |
| | | |
| | | if (item.selectType == 'webpage') { |
| | | console.log(11); |
| | | this.setData({ |
| | | webpageSrc: item.jsek_link |
| | | } else { |
| | | if (this.properties.isShowCheck) return true |
| | | const item = e.currentTarget.dataset.item |
| | | const parent = e.currentTarget.dataset.parent |
| | | let url |
| | | if (item.selectType == 'video' || item.learnSelectType == 'video') { |
| | | url = '/packageDomain/pages/resourceDetails/myVideo/index' |
| | | } else if (item.selectType == 'audio' || item.learnSelectType == 'audio') { |
| | | url = '/packageDomain/pages/resourceDetails/myAudio/index' |
| | | } else if (item.selectType == 'picture' || item.selectType == 'zip') { |
| | | url = '/packageDomain/pages/resourceDetails/document/index' |
| | | } |
| | | if (this.properties.tab == 'jsek_cloudLearning' && this.resourceIsBuy(item)) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请先购买该资源', |
| | | }) |
| | | } |
| | | wx.navigateTo({ |
| | | url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parent.productLinkPath}&parentName=${parent.name}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}`, |
| | | }) |
| | | console.log(this.data.webpageSrc, 'webpageSrc'); |
| | | if (item.selectType == 'document' || item.selectType == 'pdf') { |
| | | const fileLink = app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file |
| | | console.log(fileLink, 'fileLink'); |
| | | //提示加载中 |
| | | util.showLoading() |
| | | // 单次下载允许的最大文件为 200MB |
| | | wx.downloadFile({ |
| | | url: fileLink, // 地址已打码,自己换个其他的地址("https://www.xxxxx.com/file/测试通知.pdf") |
| | | success: function (res) { |
| | | console.log(res, "wx.downloadFile success res") |
| | | if (res.statusCode != 200) { |
| | | util.hideLoadingWithErrorTips() |
| | | return false |
| | | } |
| | | var Path = res.tempFilePath //返回的文件临时地址,用于后面打开本地预览所用 |
| | | wx.openDocument({ |
| | | filePath: Path, |
| | | showMenu: true, |
| | | success: function (res) { |
| | | console.log('打开成功'); |
| | | util.hideLoading() |
| | | } |
| | | }) |
| | | }, |
| | | fail: function (err) { |
| | | console.log(err, "wx.downloadFile fail err"); |
| | | util.hideLoadingWithErrorTips() |
| | | } |
| | | }) |
| | | } |
| | | if (item.selectType == 'webpage') { |
| | | this.setData({ |
| | | webpageSrc: item.jsek_link |
| | | }) |
| | | console.log(this.data.webpageSrc, 'webpageSrc'); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | }, |
| | | // 拿到所有项 |
| | | getAllChildren(id) { |
| | |
| | | // pages/bookServices/detail/index.js |
| | | import Message from 'tdesign-miniprogram/message/index.js'; |
| | | import Toast from 'tdesign-miniprogram/toast'; |
| | | import tool from '../../../../assets/js/toolClass' |
| | | import tool from '../../../../assets/js/toolClass'; |
| | | import { |
| | | loginInfo |
| | | } from '../../../../assets/js/login' |
| | | const app = getApp(); |
| | | Page({ |
| | | /** |
| | |
| | | paperBookCount: 0, //纸质书剩余次数 |
| | | ebookCount: 0, //电子书剩余次数 |
| | | userInfo: {}, |
| | | pageLoading: true, |
| | | fileInfo: { |
| | | bookName: "", |
| | | fileType: "", |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | // 检查登录状态 |
| | | // const token = wx.getStorageSync(app.config.tokenKey) |
| | | // if (!token) { |
| | | // loginInfo(app, (data) => { |
| | | // // 如果不是第一次登录,会执行回调 |
| | | // if (data) { |
| | | // // 登录成功,自动记录token和用户信息,并返回true |
| | | // } else { |
| | | // // 出现错误,返回false |
| | | // } |
| | | // }) |
| | | // } else { |
| | | // // 如果是第一次登录,会跳转至绑定用户信息页面,填写完用户信息后进行登录并储存token和用户信息,结束后跳转回当前页面(携带页面参数) |
| | | // } |
| | | |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | |
| | | |
| | | this.getBookInfo(options.id); |
| | | this.getResourceClass() // 获取资源所属分类 |
| | | const token = wx.getStorageSync('jsek-token') |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (token) { |
| | | this.getShoppingCartProductGet() |
| | | this.getApplyInfo(options.id) |
| | |
| | | this.setData({ |
| | | "mockData'.id": 0, |
| | | "mockData.price": 0, |
| | | "mockData.count": 0 |
| | | "mockData.count": 0, |
| | | }) |
| | | const query = { |
| | | path: '*', |
| | |
| | | 'bookDetail.price': this.numFormat(this.data.bookDetail.price), |
| | | 'bookDetail.oldPrice': this.numFormat(this.data.bookDetail.oldPrice), |
| | | 'bookDetail.paperPrice': this.numFormat(this.data.bookDetail.paperPrice), |
| | | pageLoading: false |
| | | }); |
| | | console.log('图书信息', this.data.bookDetail); |
| | | }); |
| | |
| | | }, |
| | | // 收藏 |
| | | setCollect() { |
| | | if (this.data.bookDetail.isFavourite) { |
| | | app.MG.store |
| | | .delProductLink({ |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | // 检查登录状态 |
| | | loginInfo(app, (data) => { |
| | | // 如果不是第一次登录,会执行回调 |
| | | if (data) { |
| | | // 登录成功,自动记录token和用户信息,并返回true |
| | | this.getBookInfo(this.data.bookId) |
| | | } else { |
| | | // 出现错误,返回false |
| | | } |
| | | }) |
| | | } else { |
| | | debugger |
| | | if (this.data.bookDetail.isFavourite) { |
| | | app.MG.store |
| | | .delProductLink({ |
| | | productIds: [this.data.bookDetail.id], |
| | | linkType: 'FavoriteBookCity', |
| | | }) |
| | | .then(() => { |
| | | this.setData({ |
| | | 'bookDetail.isFavourite': false |
| | | }) |
| | | }); |
| | | } else { |
| | | const params = { |
| | | productIds: [this.data.bookDetail.id], |
| | | linkType: 'FavoriteBookCity', |
| | | }) |
| | | .then(() => { |
| | | }; |
| | | app.MG.store.addProductLink(params).then((res) => { |
| | | this.setData({ |
| | | 'bookDetail.isFavourite': false |
| | | 'bookDetail.isFavourite': true |
| | | }) |
| | | Message.success({ |
| | | context: this, |
| | | offset: [20, 32], |
| | | duration: 5000, |
| | | content: '这是一条成功的提示消息', |
| | | }); |
| | | }); |
| | | } else { |
| | | const params = { |
| | | productIds: [this.data.bookDetail.id], |
| | | linkType: 'FavoriteBookCity', |
| | | }; |
| | | app.MG.store.addProductLink(params).then((res) => { |
| | | this.setData({ |
| | | 'bookDetail.isFavourite': true |
| | | }) |
| | | Message.success({ |
| | | context: this, |
| | | offset: ['20rpx', '32rpx'], |
| | | duration: 2000, |
| | | content: '收藏成功', |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | }, |
| | | // 我要建议 |
| | | suggestBtn() { |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | const child = this.selectComponent('#suggest-component') |
| | | child.showDialog() |
| | | if (!token) { |
| | | wx.showLoading({ |
| | | title: '加载中', |
| | | }) |
| | | loginInfo(app, (data) => { |
| | | // 如果不是第一次登录,会执行回调 |
| | | if (data) { |
| | | // 登录成功,自动记录token和用户信息,并返回true |
| | | child.showDialog() |
| | | wx.hideLoading() |
| | | } else { |
| | | // 出现错误,返回false |
| | | } |
| | | }) |
| | | } else { |
| | | // 如果是第一次登录,会跳转至绑定用户信息页面,填写完用户信息后进行登录并储存token和用户信息,结束后跳转回当前页面(携带页面参数) |
| | | child.showDialog() |
| | | } |
| | | }, |
| | | // 跳转网店 |
| | | goShop(e) { |
| | |
| | | }) |
| | | } |
| | | } else if (e.detail.label == '云笔记') { |
| | | const token = wx.getStorageSync('jsek-token') |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | const child = this.selectComponent('#note') |
| | | child.handleSubmitTitle() |
| | | if (token) { |
| | | child.changeLoading() |
| | | child.getNoteList() |
| | | } |
| | | |
| | | } else if (e.detail.label == '电子书') { |
| | | const child = this.selectComponent('#eBook') |
| | | if (child) { |
| | | child.getProgress() |
| | | } |
| | | |
| | | } |
| | | }, |
| | | // 获取资源所属分类 |
| | |
| | | |
| | | // 图书添加购物车 |
| | | async addBookShopcCar() { |
| | | |
| | | if (!this.data.expire) { |
| | | |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | |
| | | // 云学习一键领取 |
| | | async getFreeResource() { |
| | | const child = this.selectComponent('#learn-resource') |
| | | const token = wx.getStorageSync('jsek-token') |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | | desc: '用户登录', |
| | | success: (res) => { |
| | | console.log(res); |
| | | loginInfo(app, (data) => { |
| | | // 如果不是第一次登录,会执行回调 |
| | | if (data) { |
| | | // 登录成功,自动记录token和用户信息,并返回true |
| | | } else { |
| | | // 出现错误,返回false |
| | | } |
| | | }) |
| | | } |
| | | let arr = this.handleTreeData(this.data.learn).filter((item) => this.resourceIsBuy(item)) |
| | | let freeIds = arr.filter((item) => { |
| | | return item.saleMethod[0].Price == 0 |
| | | }) |
| | | if (!freeIds.length) return wx.showToast({ |
| | | icon: "error", |
| | | title: '暂无免费资源', |
| | | }) |
| | | child.changeReceive(true) |
| | | let requests = [] |
| | | freeIds.forEach((item, index) => { |
| | | if (this.resourceIsBuy(item)) { |
| | | requests.push({ |
| | | saleMethodId: item.saleMethod[0].Id, |
| | | count: 1 |
| | | }) |
| | | } |
| | | }) |
| | | } else { |
| | | let arr = this.handleTreeData(this.data.learn).filter((item) => this.resourceIsBuy(item)) |
| | | let freeIds = arr.filter((item) => { |
| | | return item.saleMethod[0].Price == 0 |
| | | }) |
| | | if (!freeIds.length) return wx.showToast({ |
| | | icon: "error", |
| | | title: '暂无免费资源', |
| | | }) |
| | | child.changeReceive(true) |
| | | let requests = [] |
| | | freeIds.forEach((item, index) => { |
| | | if (this.resourceIsBuy(item)) { |
| | | requests.push({ |
| | | saleMethodId: item.saleMethod[0].Id, |
| | | count: 1 |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | let query = { |
| | | remarks: '云学习', |
| | | requests, |
| | | } |
| | | try { |
| | | const initOrderRes = await app.MG.store.initOrder(query) |
| | | let parameter = { |
| | | orderNum: initOrderRes.orderNumber |
| | | let query = { |
| | | remarks: '云学习', |
| | | requests, |
| | | } |
| | | // 确认订单 |
| | | const confirmOrderRes = await app.MG.store.confirmOrder(parameter) |
| | | if (confirmOrderRes.orderNumber) { |
| | | child.changeReceive(false) |
| | | wx.showToast({ |
| | | title: '领取成功', |
| | | }) |
| | | this.getBookInfo(this.data.bookId) |
| | | try { |
| | | const initOrderRes = await app.MG.store.initOrder(query) |
| | | let parameter = { |
| | | orderNum: initOrderRes.orderNumber |
| | | } |
| | | // 确认订单 |
| | | const confirmOrderRes = await app.MG.store.confirmOrder(parameter) |
| | | if (confirmOrderRes.orderNumber) { |
| | | child.changeReceive(false) |
| | | wx.showToast({ |
| | | title: '领取成功', |
| | | }) |
| | | this.getBookInfo(this.data.bookId) |
| | | } |
| | | } catch (error) { |
| | | console.log(error) |
| | | } |
| | | } catch (error) { |
| | | console.log(error) |
| | | } |
| | | }, |
| | | // 云学习一键购买 |
| | |
| | | buyBtn() { |
| | | if (this.data.tabValue == 'brief' && !this.data.bookBuy) { |
| | | this.buyBook() |
| | | } |
| | | else if (this.data.tabValue == 'jsek_cloudLearning') { |
| | | } else if (this.data.tabValue == 'jsek_cloudLearning') { |
| | | const tree = this.selectComponent('#tree') |
| | | tree.onCloudShoppingCart() |
| | | } else { |
| | |
| | | "t-fab": "tdesign-miniprogram/fab/fab" |
| | | }, |
| | | "navigationStyle": "custom", |
| | | "onReachBottomDistance": 200 |
| | | "onReachBottomDistance": 200, |
| | | "disableScroll": true |
| | | } |
| | |
| | | <!--pages/bookServices/detail/index.wxml--> |
| | | <!--导航区域 --> |
| | | <view class="page-bookService"> |
| | | <view class="page-bookService" wx:if="{{!pageLoading}}"> |
| | | <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | |
| | | <view class="book-sale"> |
| | | <view class="book-price"> |
| | | <!-- 电子书售价 --> |
| | | <view class="electron-price"> |
| | | <view class="electron-price" wx:if="{{bookDetail.price}}"> |
| | | <view> |
| | | <image |
| | | src="/static/images/bookService/detail/electon-price.png" |
| | |
| | | value="questionBank" |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | <view wx:if="{{!loading && test.length}}"> |
| | | <view wx:if="{{!loading}}"> |
| | | <test-resource |
| | | list="{{test}}" |
| | | bookInfo="{{bookDetail}}" |
| | | mockData="{{mockData}}" |
| | | bind:buyMock="buyMock" |
| | | ></test-resource> |
| | | </view> |
| | | <view wx:if="{{noResources}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel |
| | |
| | | > |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="loading" wx:if="{{pageLoading}}"> |
| | | <t-loading loading="{{pageLoading}}" size="40"></t-loading> |
| | | </view> |
| | |
| | | background-size: 40% 64%; |
| | | background-position: right; |
| | | background-image: url(http://jsysf.bnuic.com/website/image/click-icon.png); |
| | | } |
| | | |
| | | .loading { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | |
| | | "t-loading": "tdesign-miniprogram/loading/loading" |
| | | }, |
| | | "navigationStyle": "custom", |
| | | "navigationBarBackgroundColor": "#010101" |
| | | "navigationBarBackgroundColor": "#010101", |
| | | "disableScroll": true |
| | | } |
| | |
| | | secondList: { |
| | | value: [], |
| | | options: [], |
| | | disabled: false, |
| | | }, |
| | | disabledSecondList: false, |
| | | majorProjectList: { |
| | | value: [], |
| | | options: [], |
| | |
| | | size: '50rpx' |
| | | }, |
| | | loading: false, |
| | | noData: false |
| | | noData: false, |
| | | showDropdown: false, |
| | | }, |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | |
| | | "pageCount.total": res.total, |
| | | loading: false |
| | | }); |
| | | console.log('图书列表', res.datas); |
| | | if (!res.datas.length) { |
| | | this.setData({ |
| | | noData: true |
| | | noData: true, |
| | | }) |
| | | } |
| | | }); |
| | |
| | | const path = e.detail.value.length ? |
| | | `${this.data.assortCheck.code}\\${e.detail.value}` : |
| | | this.data.assortCheck.code; |
| | | console.log(this.data.path); |
| | | this.setData({ |
| | | pathList: [], |
| | | stairCode: e.detail.value, |
| | |
| | | }); |
| | | this.getBookList(path); |
| | | this.getSecondList(path); |
| | | if (e.detail.value == '') { |
| | | this.setData({ |
| | | disabledSecondList: true |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | disabledSecondList: false |
| | | }) |
| | | } |
| | | console.log(this.data.disabledSecondList); |
| | | }, |
| | | // 二级分类切换 |
| | | onChangeSecond(e) { |
| | |
| | | }); |
| | | this.getBookList(this.data.path) |
| | | }, |
| | | openDropdown() { |
| | | console.log('展开哦', ); |
| | | this.setData({ |
| | | showDropdown: true |
| | | }) |
| | | }, |
| | | closeDropdown() { |
| | | console.log('关闭'); |
| | | this.setData({ |
| | | showDropdown: false |
| | | }) |
| | | } |
| | | }); |
| | |
| | | "t-loading": "tdesign-miniprogram/loading/loading", |
| | | "t-empty": "tdesign-miniprogram/empty/empty" |
| | | }, |
| | | "navigationStyle": "custom" |
| | | "navigationStyle": "custom", |
| | | "disableScroll": true |
| | | } |
| | |
| | | <!-- 图书服务-列表 --> |
| | | <view style="width: 100%; height: {{barHeight}}px;"></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | | <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> |
| | | <page-meta page-style="{{showDropdown ? 'overflow: hidden;' : ''}}"> |
| | | <view style="width: 100%; height: {{barHeight}}px;"></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | | <t-icon |
| | | name="chevron-left" |
| | | size="30" |
| | | data-name="{{item}}" |
| | | bind:click="goBack" |
| | | /> |
| | | </view> |
| | | <t-search |
| | | model:value="{{searchValue}}" |
| | | shape="round" |
| | | placeholder="请输入关键词/书名/ISBN/作者" |
| | | class="navBar-search" |
| | | style="width: 464rpx" |
| | | bind:submit="searchBook" |
| | | /> |
| | | </view> |
| | | <t-search model:value="{{searchValue}}" shape="round" placeholder="请输入关键词/书名/ISBN/作者" class="navBar-search" style="width: 464rpx" bind:submit="searchBook" /> |
| | | </view> |
| | | |
| | | <view class="bookServices-list"> |
| | | <view class="list-header"> |
| | | <view class="header-scroll"> |
| | | <t-dropdown-menu style="width: 1000rpx"> |
| | | <t-dropdown-item options="{{stairList.options}}" value="{{stairList.value}}" bindchange="onChangeStair" /> |
| | | <t-dropdown-item label="二级" options="{{secondList.options}}" optionsColumns="2" multiple value="{{secondList.value}}" bind:confirm="onConfirmSecond" bind:change="onChangeSecond" /> |
| | | <t-dropdown-item label="重点项目" options="{{majorProjectList.options}}" optionsColumns="2" multiple defaultValue="{{majorProjectList.value}}" bind:confirm="changeMajorProject" bind:reset="resetMajorProject" /> |
| | | <t-dropdown-item label="新形态教材" options="{{newTextBook.options}}" optionsColumns="2" multiple defaultValue="{{newTextBook.value}}" bind:confirm="changeNewText" bind:reset="resetNewText" /> |
| | | </t-dropdown-menu> |
| | | </view> |
| | | <view class="header-sort" bind:tap="sortClick"> |
| | | <text class="sort-name">排序</text> |
| | | <!-- <view class="sort-icon"> --> |
| | | <t-icon name="swap-left" size="28rpx" class="icon-right" color="{{sort == 'Asc' ? '#ff6c00' : ''}}" /> |
| | | <t-icon name="swap-left" size="28rpx" class="icon-left" color="{{sort == 'Desc' ? '#ff6c00' : ''}}" /> |
| | | <!-- </view> --> |
| | | </view> |
| | | </view> |
| | | <t-pull-down-refresh value="{{enable}}" loadingProps="{{loadingProps}}" loadingTexts="{{['下拉刷新', '松手刷新', '正在刷新', '刷新完成']}}" bind:refresh="onRefresh" class="down-refresh"> |
| | | <scroll-view scroll-y="{{true}}" class="list-container" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom"> |
| | | <view class="assort-title"> |
| | | <view class="title-box"></view> |
| | | <view class="title-name">{{assortCheck.name}}</view> |
| | | <view class="bookServices-list"> |
| | | <view class="list-header"> |
| | | <view class="header-scroll"> |
| | | <t-dropdown-menu style="width: 1000rpx"> |
| | | <t-dropdown-item |
| | | optionsColumns="2" |
| | | options="{{stairList.options}}" |
| | | value="{{stairList.value}}" |
| | | bindchange="onChangeStair" |
| | | /> |
| | | <t-dropdown-item |
| | | disabled="{{disabledSecondList}}" |
| | | label="二级" |
| | | bind:open="openDropdown" |
| | | bind:close="closeDropdown" |
| | | options="{{secondList.options}}" |
| | | optionsColumns="2" |
| | | multiple |
| | | value="{{secondList.value}}" |
| | | bind:confirm="onConfirmSecond" |
| | | bind:change="onChangeSecond" |
| | | /> |
| | | <t-dropdown-item |
| | | label="重点项目" |
| | | options="{{majorProjectList.options}}" |
| | | optionsColumns="2" |
| | | multiple |
| | | defaultValue="{{majorProjectList.value}}" |
| | | bind:confirm="changeMajorProject" |
| | | bind:reset="resetMajorProject" |
| | | /> |
| | | <t-dropdown-item |
| | | label="新形态教材" |
| | | options="{{newTextBook.options}}" |
| | | optionsColumns="2" |
| | | multiple |
| | | defaultValue="{{newTextBook.value}}" |
| | | bind:confirm="changeNewText" |
| | | bind:reset="resetNewText" |
| | | /> |
| | | </t-dropdown-menu> |
| | | </view> |
| | | <view class="page-content"> |
| | | <view class="book-list" wx:if="{{!loaidng}}"> |
| | | <view class="book-box" wx:for="{{bookList}}" wx:key="id" bind:tap="goDetail" data-book="{{item}}"> |
| | | <view class="book-img"> |
| | | <image src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" aria-label="{item.name{}}" mode="widthFix" /> |
| | | <view class="header-sort" bind:tap="sortClick"> |
| | | <text class="sort-name">排序</text> |
| | | <!-- <view class="sort-icon"> --> |
| | | <t-icon |
| | | name="swap-left" |
| | | size="28rpx" |
| | | class="icon-right" |
| | | color="{{sort == 'Asc' ? '#ff6c00' : ''}}" |
| | | /> |
| | | <t-icon |
| | | name="swap-left" |
| | | size="28rpx" |
| | | class="icon-left" |
| | | color="{{sort == 'Desc' ? '#ff6c00' : ''}}" |
| | | /> |
| | | <!-- </view> --> |
| | | </view> |
| | | </view> |
| | | <t-pull-down-refresh |
| | | value="{{enable}}" |
| | | loadingProps="{{loadingProps}}" |
| | | loadingTexts="{{['下拉刷新', '松手刷新', '正在刷新', '刷新完成']}}" |
| | | bind:refresh="onRefresh" |
| | | class="down-refresh" |
| | | > |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="list-container" |
| | | bindrefresherrefresh="onPullDownRefresh" |
| | | bindscrolltolower="onReachBottom" |
| | | > |
| | | <view class="assort-title"> |
| | | <view class="title-box"></view> |
| | | <view class="title-name">{{assortCheck.name}}</view> |
| | | </view> |
| | | <view class="page-content"> |
| | | <view class="book-list" wx:if="{{!loaidng}}"> |
| | | <view |
| | | class="book-box" |
| | | wx:for="{{bookList}}" |
| | | wx:key="id" |
| | | bind:tap="goDetail" |
| | | data-book="{{item}}" |
| | | > |
| | | <view class="book-img"> |
| | | <image |
| | | src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" |
| | | aria-label="{item.name{}}" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | <view class="book-name book-color">{{ item.name}}</view> |
| | | <view class="book-author book-color">{{item.author}}</view> |
| | | </view> |
| | | <view class="book-name book-color">{{ item.name}}</view> |
| | | <view class="book-author book-color">{{item.author}}</view> |
| | | <view wx:if="{{noData}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{noData}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | <!-- loading --> |
| | | <view class="loading-box" wx:if="{{loaidng}}"> |
| | | <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="wrapper" |
| | | loading="{{loaidng}}" |
| | | wx:if="{{loaidng}}" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <!-- loading --> |
| | | <view class="loading-box" wx:if="{{loaidng}}"> |
| | | <t-loading theme="circular" size="60rpx" class="wrapper" loading="{{loaidng}}" wx:if="{{loaidng}}" /> |
| | | <view class="bottom-box"> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </view> |
| | | <view class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </scroll-view> |
| | | </t-pull-down-refresh> |
| | | </view> |
| | | </scroll-view> |
| | | </t-pull-down-refresh> |
| | | </view> |
| | | </page-meta> |
| | |
| | | overflow: hidden; |
| | | display: flex; |
| | | height: 96rpx; |
| | | --td-button-primary-active-bg-color: #ff984d; |
| | | } |
| | | |
| | | .list-header .t-button--primary { |
| | |
| | | border-radius: 50rpx !important; |
| | | color: #545C63 !important; |
| | | border: 2rpx solid #979797 !important; |
| | | } |
| | | |
| | | .list-header .t-button--light { |
| | | background: #fff !important; |
| | | border-radius: 50rpx !important; |
| | | color: #545C63 !important; |
| | | border: 2rpx solid #979797 !important; |
| | | } |
| | | |
| | | .t-checkbox--tag.t-checkbox--checked { |
| | | background-color: #f3e0d3 !important; |
| | | } |
| | | |
| | | .t-dropdown-menu__item--active { |
| | | background: #F6F6F6 !important; |
| | | } |
| | | |
| | | .t-button--primary::after { |
| | | border: none; |
| | | } |
| | | |
| | | .t-radio--block { |
| | | padding: 20rpx !important; |
| | | } |
| | | |
| | | .t-radio__border { |
| | | height: 0 !important; |
| | | } |
| | | |
| | | .t-dropdown-menu__item--active, |
| | |
| | | |
| | | .icon-left { |
| | | position: absolute; |
| | | top: 38rpx; |
| | | top: 34rpx; |
| | | right: 26rpx; |
| | | transform: rotate(270deg); |
| | | } |
| | | |
| | | .icon-right { |
| | | position: absolute; |
| | | top: 38rpx; |
| | | top: 34rpx; |
| | | right: 10rpx; |
| | | transform: rotate(90deg); |
| | | } |
| | |
| | | box-shadow: 0px 3px 6px 1px rgba(0, 0, 0, 0.16); |
| | | } |
| | | |
| | | .book-img image { |
| | | height: 100% !important; |
| | | } |
| | | |
| | | |
| | | |
| | | .book-name { |
| | | margin-top: 24rpx; |
| | |
| | | border-radius: 80rpx; |
| | | height: 70%; |
| | | margin-left: 20rpx; |
| | | } |
| | | |
| | | .t-dropdown-item__body { |
| | | padding-bottom: 10rpx !important; |
| | | } |
| | |
| | | .srcolbox .t-button--primary { |
| | | border-radius: 50rpx !important; |
| | | background: #FF6C00 !important; |
| | | border: none; |
| | | border: none !important; |
| | | } |
| | | |
| | | .srcolbox .t-button--light { |
| | |
| | | "navigationBarTitleText": "图书服务", |
| | | "onReachBottomDistance": 10, |
| | | "backgroundTextStyle": "light", |
| | | "enablePullDownRefresh": true, |
| | | "disableScroll": true, |
| | | "usingComponents": { |
| | | "t-search": "tdesign-miniprogram/search/search", |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | |
| | | <!--图书服务分类--> |
| | | <view class="page-header"> |
| | | <!-- 搜索框 --> |
| | | <view class="search"> |
| | | <t-search |
| | | t-class-input="t-search__input" |
| | | t-class-input-container="t-search__input-container" |
| | | placeholder="请输入关键词/书名/ISBN/作者" |
| | | leftIcon="" |
| | | bind:submit="navToSearchPage" |
| | | placeholder-style="{{placeholderstyle}}" |
| | | > |
| | | <t-icon |
| | | slot="left-icon" |
| | | prefix="wr" |
| | | name="search" |
| | | size="40rpx" |
| | | color="#bbb" |
| | | /> |
| | | </t-search> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="page-container"> |
| | | <view class="side-bar-wrapper" wx:if="{{!loading}}"> |
| | | <view class="tab-left"> |
| | | <t-side-bar value="{{assortCheck.code}}" bind:change="changeAssort"> |
| | | <t-side-bar-item |
| | | wx:for="{{assortList}}" |
| | | wx:key="id" |
| | | value="{{item.refCode}}" |
| | | label="{{item.name}}" |
| | | badge-props="{{item.badgeProps}}" |
| | | <page-meta style="width: 100vw; overflow: hidden"> |
| | | <view class="page-header"> |
| | | <!-- 搜索框 --> |
| | | <view class="search"> |
| | | <t-search |
| | | t-class-input="t-search__input" |
| | | t-class-input-container="t-search__input-container" |
| | | placeholder="请输入关键词/书名/ISBN/作者" |
| | | leftIcon="" |
| | | bind:submit="navToSearchPage" |
| | | placeholder-style="{{placeholderstyle}}" |
| | | > |
| | | <t-icon |
| | | slot="left-icon" |
| | | prefix="wr" |
| | | name="search" |
| | | size="40rpx" |
| | | color="#bbb" |
| | | /> |
| | | </t-side-bar> |
| | | </t-search> |
| | | </view> |
| | | <view class="page-right"> |
| | | <!-- 右侧 --> |
| | | <view class="side-bar-content" wx:if="{{!listLoding}}"> |
| | | <!-- 一级分类 --> |
| | | <view class="tab-top"> |
| | | <view |
| | | class="myScroll" |
| | | > |
| | | <view |
| | | wx:for="{{startList}}" |
| | | wx:key="id" |
| | | class="row {{startCheck.id == item.id ? 'tab-active' : ''}}" |
| | | bind:tap="tabClick" |
| | | data-tabData="{{item}}" |
| | | >{{item.name}}</view |
| | | > |
| | | </view> |
| | | </view> |
| | | <!-- 内容 --> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="class-list" |
| | | scroll-into-view="{{ 'list' + startCheck.id}}" |
| | | > |
| | | <view wx:if="{{listLoading}}"> |
| | | <t-loading |
| | | theme="spinner" |
| | | size="400rpx" |
| | | loading="{{listLoading}}" |
| | | ></t-loading> |
| | | </view> |
| | | <view |
| | | wx:for="{{startList}}" |
| | | wx:for-item="item" |
| | | </view> |
| | | |
| | | <view class="page-container"> |
| | | <view class="side-bar-wrapper" wx:if="{{!loading}}"> |
| | | <view class="tab-left"> |
| | | <t-side-bar value="{{assortCheck.code}}" bind:change="changeAssort"> |
| | | <t-side-bar-item |
| | | wx:for="{{assortList}}" |
| | | wx:key="id" |
| | | id="{{ 'list' + item.id}}" |
| | | class="class-box" |
| | | wx:if="{{!listLoading}}" |
| | | > |
| | | <view class="class-name">{{item.name}}</view> |
| | | <view class="class-content"> |
| | | value="{{item.refCode}}" |
| | | label="{{item.name}}" |
| | | badge-props="{{item.badgeProps}}" |
| | | /> |
| | | </t-side-bar> |
| | | </view> |
| | | <view class="page-right"> |
| | | <!-- 右侧 --> |
| | | <view class="side-bar-content" wx:if="{{!listLoding}}"> |
| | | <!-- 一级分类 --> |
| | | <view class="tab-top"> |
| | | <view class="myScroll"> |
| | | <view |
| | | wx:for="{{item.children}}" |
| | | wx:for-item="citem" |
| | | wx:for="{{startList}}" |
| | | wx:key="id" |
| | | class="book-box" |
| | | bind:tap="goPageList" |
| | | data-stair="{{citem}}" |
| | | class="row {{startCheck.id == item.id ? 'tab-active' : ''}}" |
| | | bind:tap="tabClick" |
| | | data-tabData="{{item}}" |
| | | wx:if="{{item.children.length}}" |
| | | >{{item.name}}</view |
| | | > |
| | | <view class="assort-img"> |
| | | <image |
| | | src="{{citem.icon ? citem.icon : '/static/images/default-book-img.png'}}" |
| | | mode="widthFix" |
| | | /> |
| | | </view> |
| | | <view class="classify">{{citem.name}}</view> |
| | | </view> |
| | | <view |
| | | wx:if="{{!item.children.length}}" |
| | | class="book-box" |
| | | bind:tap="goPageList" |
| | | data-tabData="{{item}}" |
| | | > |
| | | <view class="assort-img"> |
| | | <image |
| | | src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" |
| | | mode="widthFix" |
| | | ></image> |
| | | </view> |
| | | <text class="classify">全部</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="bottom-box"> </view> |
| | | </scroll-view> |
| | | </view> |
| | | <!-- loading --> |
| | | <view class="loading-box" wx:if="{{listLoding}}"> |
| | | <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="wrapper" |
| | | loading="{{listLoding}}" |
| | | wx:if="{{listLoding}}" |
| | | /> |
| | | <!-- 内容 --> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="class-list" |
| | | scroll-into-view="{{ 'list' + startCheck.id}}" |
| | | > |
| | | <view wx:if="{{listLoading}}"> |
| | | <t-loading |
| | | theme="spinner" |
| | | size="400rpx" |
| | | loading="{{listLoading}}" |
| | | ></t-loading> |
| | | </view> |
| | | <view |
| | | wx:for="{{startList}}" |
| | | wx:for-item="item" |
| | | wx:key="id" |
| | | id="{{ 'list' + item.id}}" |
| | | class="class-box" |
| | | wx:if="{{!listLoading}}" |
| | | > |
| | | <view class="class-name">{{item.name}}</view> |
| | | <view class="class-content"> |
| | | <view |
| | | wx:for="{{item.children}}" |
| | | wx:for-item="citem" |
| | | wx:key="id" |
| | | class="book-box" |
| | | bind:tap="goPageList" |
| | | data-stair="{{citem}}" |
| | | data-tabData="{{item}}" |
| | | wx:if="{{item.children.length}}" |
| | | > |
| | | <view class="assort-img"> |
| | | <image |
| | | src="{{citem.icon ? citem.icon : '/static/images/default-book-img.png'}}" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | <view class="classify">{{citem.name}}</view> |
| | | </view> |
| | | <view |
| | | wx:if="{{!item.children.length}}" |
| | | class="book-box" |
| | | bind:tap="goPageList" |
| | | data-tabData="{{item}}" |
| | | > |
| | | <view class="assort-img"> |
| | | <image |
| | | src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | <text class="classify">全部</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="bottom-box"> </view> |
| | | </scroll-view> |
| | | </view> |
| | | <!-- loading --> |
| | | <view class="loading-box" wx:if="{{listLoding}}"> |
| | | <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="wrapper" |
| | | loading="{{listLoding}}" |
| | | wx:if="{{listLoding}}" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="loading-box" wx:if="{{loading}}"> |
| | | <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="wrapper" |
| | | loading="{{loading}}" |
| | | wx:if="{{loading}}" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="loading-box" wx:if="{{loading}}"> |
| | | <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="wrapper" |
| | | loading="{{loading}}" |
| | | wx:if="{{loading}}" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </page-meta> |
| | |
| | | page { |
| | | width: 100vw; |
| | | overflow: hidden; |
| | | box-sizing: border-box; |
| | | padding-bottom: calc(env(safe-area-inset-bottom) + 96rpx); |
| | | } |
| | |
| | | } |
| | | |
| | | .book-box image { |
| | | height: 142rpx; |
| | | height: 180rpx; |
| | | } |
| | | |
| | | .classify { |