| | |
| | | "pages/bookServices/detail/index", |
| | | "pages/bookServices/examination/examination", |
| | | "pages/bookServices/webpage/index", |
| | | "pages/components/webView/index" |
| | | "pages/components/webView/index", |
| | | "pages/bookServices/buyResource/index", |
| | | "pages/bookServices/detail/buyResource/index" |
| | | ] |
| | | } |
| | | ], |
| | |
| | | export const fontUrl = "http://192.168.3.132:5173"; |
| | | // export const fontUrl = "http://182.92.203.7:3007/jsek/website"; |
| | | // export const fontUrl = "http://jsysf.bnuic.com/website"; |
| | | // export const epubUrl = "http://182.92.203.7:3007/epubReadMobile/"; |
| | | export const epubUrl = "http://jsysf.bnuic.com/epubReadMobile/#/"; |
| | | export const epubUrl = "http://182.92.203.7:3007/epubReadMobile/"; |
| | | // export const epubUrl = "http://jsysf.bnuic.com/epubReadMobile/#/"; |
| | | |
| | | const config = { |
| | | requestCtx, |
New file |
| | |
| | | // packageBookService/pages/bookServices/buyResource/index.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--packageBookService/pages/bookServices/buyResource/index.wxml--> |
| | | <text>packageBookService/pages/bookServices/buyResource/index.wxml</text> |
New file |
| | |
| | | /* packageBookService/pages/bookServices/buyResource/index.wxss */ |
New file |
| | |
| | | // packageBookService/pages/bookServices/detail/buyResource/index.js |
| | | const app = getApp() |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | barHeight: '', |
| | | navBarHeight: '', |
| | | learn: [], |
| | | openLearnids: [], |
| | | bookId: '', |
| | | loading: false, |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | | this.setData({ |
| | | barHeight: systInfo.statusBarHeight, |
| | | navBarHeight: navBarHeight, |
| | | bookId: options.bookId |
| | | }); |
| | | this.getResourceClass() |
| | | console.log(options); |
| | | this.getResourceData({ productLinkPath: options.productLinkPath, refCode: options.refCode }) |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | goBack() { |
| | | wx.navigateBack() |
| | | }, |
| | | // 获取教学资源 云学习 云测试 |
| | | getResourceData(type) { |
| | | this.setData({ |
| | | loading: true, |
| | | noResources: false |
| | | }) |
| | | let query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | productId: this.data.bookId, |
| | | cmsPath: type.productLinkPath, |
| | | itemFields: { |
| | | SysType: 'CmsFolder', |
| | | // 资源类型,试读文件,是否允许下载等参数 |
| | | selectType: [], |
| | | freeFile: [], |
| | | file: [], |
| | | resourcesClassification: [], |
| | | isDownload: [], |
| | | jsek_resourceBrief: [], |
| | | jsek_link: [], |
| | | jsek_questionBank: [] |
| | | }, |
| | | pading: { |
| | | start: 0, |
| | | size: 999 |
| | | }, |
| | | } |
| | | app.MG.store |
| | | .getProductDetail(query) |
| | | .then(async (res) => { |
| | | if (!res.datas.cmsDatas[0].datas.length) { |
| | | return this.setData({ |
| | | noResources: true, |
| | | loading: false |
| | | }) |
| | | } |
| | | //教学资源 云学习 |
| | | if (type.refCode == 'jsek_teachingResources' || type.refCode == 'jsek_cloudLearning') { |
| | | if (res.datas.cmsDatas[0].datas.length > 0) { |
| | | res.datas.cmsDatas[0].datas.forEach(item => { |
| | | item.checked = false |
| | | }) |
| | | const list = await this.getAllResource(res.datas.cmsDatas[0].datas) |
| | | if (type.refCode == 'jsek_teachingResources') { |
| | | this.setData({ |
| | | teach: list, |
| | | loading: false |
| | | }) |
| | | this.findChildIds(this.data.teach, this.data.openTeachids = []) |
| | | } else if (type.refCode == 'jsek_cloudLearning') { |
| | | res.datas.cmsDatas[0].datas.forEach(item => { |
| | | item.checked = false |
| | | }) |
| | | const list = await this.getAllResource(res.datas.cmsDatas[0].datas) |
| | | this.setData({ |
| | | learn: list, |
| | | loading: false |
| | | }) |
| | | this.findChildIds(this.data.learn, this.data.openLearnids = []) |
| | | } |
| | | } else { |
| | | // 无数据 |
| | | } |
| | | } else if (type.refCode == 'jsek_questionBank') { |
| | | // const list = await this.getAllResource(res.datas.cmsDatas[0].datas) |
| | | this.setData({ |
| | | test: res.datas.cmsDatas[0].datas, |
| | | loading: false |
| | | }) |
| | | } else { |
| | | console.log('其他'); |
| | | } |
| | | }) |
| | | .catch((e) => { |
| | | console.log(e) |
| | | }) |
| | | }, |
| | | // 获取tag下所有资源 |
| | | async getAllResource(data) { |
| | | if (!data.length) return false |
| | | for (let i = 0; i < data.length; i++) { |
| | | let item = data[i] |
| | | if (item.sysType == 'CmsFolder' && item.childrenCount > 0) { |
| | | item.children = [] |
| | | item.children = await this.getFolderItem(item.productLinkPath) |
| | | await this.getAllResource(item.children) |
| | | } |
| | | } |
| | | return data |
| | | }, |
| | | // 获取资源接口 |
| | | async getFolderItem(path) { |
| | | let query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | productId: this.data.bookId, |
| | | cmsPath: path, |
| | | itemFields: { |
| | | SysType: 'CmsFolder', |
| | | // 资源类型,试读文件,是否允许下载等参数 |
| | | selectType: [], |
| | | freeFile: [], |
| | | file: [], |
| | | protectedFile: [], |
| | | resourcesClassification: [], |
| | | isDownload: [], |
| | | jsek_resourceBrief: [], |
| | | jsek_link: [], |
| | | accessType: [] |
| | | }, |
| | | pading: { |
| | | start: 0, |
| | | size: 999 |
| | | }, |
| | | } |
| | | const data = await app.MG.store.getProductDetail(query) |
| | | data.datas.cmsDatas[0].datas.forEach((item) => { |
| | | this.data.resourceClassList.forEach((type) => { |
| | | if (type.value == item.resourcesClassification) item.resourceClass = type.name |
| | | }) |
| | | // 网页 不能下载 私有文件 |
| | | if (item.sysType == 'CmsItem') { |
| | | if (item.selectType == 'webpage') { |
| | | item.disabled = true |
| | | } else { |
| | | if (item.isDownload != 1) { |
| | | item.disabled = true |
| | | } |
| | | } |
| | | if (item.file) { |
| | | if (item.fileMap[item.file].protectType == 'Private') item.disabled = true |
| | | } |
| | | } |
| | | }) |
| | | data.datas.cmsDatas[0].datas.forEach(item => { |
| | | if (this.data.tabValue == 'jsek_teachingResources') { |
| | | item.checked = false |
| | | } else if (this.data.tabValue == 'jsek_cloudLearning') { |
| | | item.checked = false |
| | | item.isbuy = this.resourceIsBuy(item) |
| | | item.isShopCar = this.isShoppingCart(item) |
| | | } |
| | | }) |
| | | return data.datas.cmsDatas[0].datas |
| | | }, |
| | | // 获取展开项 |
| | | findChildIds(data, result) { |
| | | let index = 0 |
| | | for (let i = 0; i < data.length; i++) { |
| | | if (index < 3) { |
| | | const item = data[i] |
| | | if (item.childrenFolderCount > 0) { |
| | | result.push(item.id) |
| | | for (let j = 0; j < item.children.length; j++) { |
| | | if (index < 3) { |
| | | const childrenItme = item.children[j] |
| | | if (item.childrenCount > 0) { |
| | | result.push(childrenItme.id) |
| | | index += 1 |
| | | } |
| | | } else { |
| | | break |
| | | } |
| | | } |
| | | } else if (item.childrenCount > 0) { |
| | | result.push(item.id) |
| | | index += 1 |
| | | } |
| | | } else { |
| | | break |
| | | } |
| | | } |
| | | }, |
| | | // 获取资源所属分类 |
| | | getResourceClass() { |
| | | let query = { |
| | | refCodes: ['resourcesClassification'] |
| | | } |
| | | app.MG.store.getProductTypeField(query).then((res) => { |
| | | this.setData({ |
| | | resourceClassList: JSON.parse(res[0].config).option |
| | | }) |
| | | }) |
| | | }, |
| | | }) |
New file |
| | |
| | | { |
| | | "usingComponents": { |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "tree": "/packageBookService/pages/bookServices/detail/components/tree/index", |
| | | "t-loading": "tdesign-miniprogram/loading/loading" |
| | | }, |
| | | "navigationStyle": "custom" |
| | | } |
New file |
| | |
| | | <!--packageBookService/pages/bookServices/detail/buyResource/index.wxml--> |
| | | <!--导航区域 --> |
| | | <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <view class="flex"> |
| | | <view> |
| | | <t-icon |
| | | name="chevron-left" |
| | | size="30" |
| | | data-name="{{item}}" |
| | | bind:click="goBack" |
| | | /> |
| | | </view> |
| | | <view class="navbar-title">资源购买</view> |
| | | </view> |
| | | <view> 全选 </view> |
| | | </view> |
| | | |
| | | <!-- 内容 --> |
| | | |
| | | <view class="buy-resource" wx:if="{{!loading}}"> |
| | | <tree treeList="{{learn}}" tab="{{'jsek_cloudLearning'}}" /> |
| | | </view> |
| | | |
| | | <view class="noData" wx:if="{{loading}}"> |
| | | <t-loading size="60rpx" loading="{{loading}}" /> |
| | | </view> |
New file |
| | |
| | | /* packageBookService/pages/bookServices/detail/buyResource/index.wxss */ |
| | | .nacigationBar { |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .navbar-title { |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | color: #0F1214; |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .flex { |
| | | display: flex; |
| | | } |
| | | |
| | | .space-between { |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .noData { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | --td-loading-color: #ff6c00; |
| | | } |
| | |
| | | type: String, |
| | | value: '', |
| | | }, |
| | | }, |
| | | data:{ |
| | | richStyle:'font-size: 28rpx;color: #333; line-height: 48rpx;text-align: justify;' |
| | | } |
| | | }); |
| | |
| | | <view class="basic" wx:if="{{content}}"> |
| | | <view class="basic-title"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/label.png"></t-image> |
| | | <image src="/static/images/bookService/detail/label.png" /> |
| | | </view> |
| | | <view class="title-name">基本信息</view> |
| | | </view> |
| | | <rich-text nodes="{{content}}" style="font-size: 28rpx; color: #333; line-height: 48rpx; text-align: justify"></rich-text> |
| | | <rich-text nodes="{{content}}" style="{{richStyle}}"></rich-text> |
| | | </view> |
| | | <view class="basic" wx:if="{{authorIntroduction}}"> |
| | | <view class="basic-title"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/author.png"></t-image> |
| | | <image src="/static/images/bookService/detail/author.png" /> |
| | | </view> |
| | | <view class="title-name">作者简介</view> |
| | | </view> |
| | | </view> |
| | | <rich-text nodes="{{authorIntroduction}}" style="font-size: 28rpx; color: #333; line-height: 48rpx; text-align: justify" /> |
| | | <rich-text nodes="{{authorIntroduction}}" style="{{richStyle}}" /> |
| | | </view> |
| | |
| | | * 组件的属性列表 |
| | | */ |
| | | properties: { |
| | | |
| | | buyResourceData: { |
| | | type: Object, |
| | | }, |
| | | bookId: { |
| | | type: Number |
| | | } |
| | | }, |
| | | |
| | | /** |
| | |
| | | } // 触发事件的选项 |
| | | this.triggerEvent('getFreeResource', myEventDetail, myEventOption) |
| | | }, |
| | | allAddShoppiingCar() { |
| | | var myEventDetail = {} // detail对象,提供给事件监听函数 |
| | | var myEventOption = { |
| | | bubbles: true, |
| | | composed: true |
| | | } // 触发事件的选项 |
| | | this.triggerEvent('allAddShoppiingCar', myEventDetail, myEventOption) |
| | | // allAddShoppiingCar() { |
| | | // var myEventDetail = {} // detail对象,提供给事件监听函数 |
| | | // var myEventOption = { |
| | | // bubbles: true, |
| | | // composed: true |
| | | // } // 触发事件的选项 |
| | | // this.triggerEvent('allAddShoppiingCar', myEventDetail, myEventOption) |
| | | // }, |
| | | goBuyResource() { |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/detail/buyResource/index?productLinkPath=${this.properties.buyResourceData.productLinkPath}&refCode=${this.properties.buyResourceData.refCode}&bookId=${this.properties.bookId}`, |
| | | }) |
| | | }, |
| | | |
| | | changeReceive(type) { |
| | | this.setData({ |
| | | receive: type |
| | |
| | | <!--pages/bookServices/detail/components/learnResource/learnResource.wxml--> |
| | | <view class="learnResource" theme="primary"> |
| | | <t-button loading="{{receive}}" class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx; " t-class="external-class" bind:tap="getFreeResource"> |
| | | <t-image src=" /static/images/bookService/detail/yijianlingqu.png"></t-image> |
| | | <t-button |
| | | loading="{{receive}}" |
| | | class="btn" |
| | | theme="primary" |
| | | style="height: 72rpx; font-size: 28rpx" |
| | | t-class="external-class" |
| | | bind:tap="getFreeResource" |
| | | > |
| | | <image src=" /static/images/bookService/detail/yijianlingqu.png" /> |
| | | <text>领取查看</text> |
| | | </t-button> |
| | | <t-button loading="{{buy}}" class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;" bind:tap="allAddShoppiingCar"> |
| | | <t-image src="/static/images/bookService/detail/yijiangoumai.png"></t-image> |
| | | 一键购买 |
| | | <t-button |
| | | loading="{{buy}}" |
| | | class="btn" |
| | | theme="primary" |
| | | style="height: 72rpx; font-size: 28rpx" |
| | | bind:tap="goBuyResource" |
| | | > |
| | | <image src="/static/images/bookService/detail/yijiangoumai.png" /> |
| | | 资源购买 |
| | | </t-button> |
| | | <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;" wx:if="{{false}}"> |
| | | <t-image src="/static/images/bookService/detail/renwudan/icon.png"></t-image> |
| | | <t-button |
| | | class="btn" |
| | | theme="primary" |
| | | style="height: 72rpx; font-size: 28rpx" |
| | | wx:if="{{false}}" |
| | | > |
| | | <image src="/static/images/bookService/detail/renwudan/icon.png" /> |
| | | 学习任务单 |
| | | </t-button> |
| | | </view> |
| | |
| | | loading: true, |
| | | noList: false |
| | | }) |
| | | console.log(this.properties.bookInfo.id, 'this.properties.bookInfo.id'); |
| | | let topicId |
| | | await app.MG.ugc |
| | | .getProductUserSubmitTopic({ |
| | |
| | | <!--pages/bookServices/detail/components/note/note.wxml--> |
| | | <view class="note"> |
| | | <view class="note-btn"> |
| | | <t-button theme="primary" class="make-note" bind:tap="openDialog" style="width: 240rpx;"> |
| | | <t-button |
| | | theme="primary" |
| | | class="make-note" |
| | | bind:tap="openDialog" |
| | | style="width: 240rpx" |
| | | > |
| | | <view slot="content"> |
| | | <t-image src="/static/images/bookService/detail/makeNote.png"></t-image> |
| | | <image src="/static/images/bookService/detail/makeNote.png" /> |
| | | 记笔记 |
| | | </view> |
| | | </t-button> |
| | | </view> |
| | | <view class="note-content"> |
| | | |
| | | <t-collapse value="{{activeValues}}" bind:change="handleChange" wx:if="{{!loading && noteList.length}}"> |
| | | <t-collapse |
| | | value="{{activeValues}}" |
| | | bind:change="handleChange" |
| | | wx:if="{{!loading && noteList.length}}" |
| | | > |
| | | <t-collapse-panel value="{{item.id}}" expandIcon wx:for="{{noteList}}"> |
| | | <view slot="header" class="collapse-header"> |
| | | <t-image class="note-icon" src="/static/images/bookService/detail/note-icon.png"></t-image> |
| | | <t-image |
| | | class="note-icon" |
| | | src="/static/images/bookService/detail/note-icon.png" |
| | | ></t-image> |
| | | <view class="header-name">{{item.name}}</view> |
| | | </view> |
| | | <view> |
| | |
| | | <view class="note-bottom"> |
| | | <view class="note-time">{{item.createDate}}</view> |
| | | <view class="bottom-btn"> |
| | | <t-image src="/static/images/bookService/detail/compliceHover.png" class="complice" bind:tap="editNote" data-note="{{item}}"></t-image> |
| | | <t-image src="/static/images/bookService/detail/deleteHover.png" class="delete" bind:tap="deleteNote" data-id="{{item.id}}"></t-image> |
| | | <image |
| | | src="/static/images/bookService/detail/compliceHover.png" |
| | | class="complice" |
| | | bind:tap="editNote" |
| | | data-note="{{item}}" |
| | | /> |
| | | <image |
| | | src="/static/images/bookService/detail/deleteHover.png" |
| | | class="delete" |
| | | bind:tap="deleteNote" |
| | | data-id="{{item.id}}" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <t-loading loading="{{loading}}" size="60rpx"></t-loading> |
| | | </view> |
| | | |
| | | |
| | | <!-- 记笔记弹窗 --> |
| | | <t-popup visible="{{showNoteDialog}}" bind:visible-change="onVisibleChange" placement="center"> |
| | | <t-popup |
| | | visible="{{showNoteDialog}}" |
| | | bind:visible-change="onVisibleChange" |
| | | placement="center" |
| | | > |
| | | <view class="popup"> |
| | | <view slot="title"> |
| | | <view class="title-text" wx:if="{{!flag}}"> |
| | | <text class="note-title">{{submitTitle}}</text> |
| | | <t-image src="/static/images/bookService/detail/edit.png" class="edit-icon" bind:tap="changeTitle" data-value="{{true}}"></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/edit.png" |
| | | class="edit-icon" |
| | | bind:tap="changeTitle" |
| | | data-value="{{true}}" |
| | | ></t-image> |
| | | </view> |
| | | <view wx:else> |
| | | <t-input value="{{submitTitle}}" data-value="{{false}}" bind:enter="changeTitle" bind:blur="changeTitle" bind:change="inputChange" maxlength="{{50}}" style="{{inputStyle}}"></t-input> |
| | | <t-input |
| | | value="{{submitTitle}}" |
| | | data-value="{{false}}" |
| | | bind:enter="changeTitle" |
| | | bind:blur="changeTitle" |
| | | bind:change="inputChange" |
| | | maxlength="{{50}}" |
| | | style="{{inputStyle}}" |
| | | ></t-input> |
| | | </view> |
| | | </view> |
| | | <view slot="content" class="content"> |
| | | <t-textarea value="{{textvalue}}" t-class="external-class" label="" placeholder="请输入笔记内容" maxcharacter="500" disableDefaultPadding="{{true}}" indicator bind:change="textareaChange" bind:blur="" style="{{inputStyle}}" placeholder-style="{{placeholderstyle}}" /> |
| | | <t-textarea |
| | | value="{{textvalue}}" |
| | | t-class="external-class" |
| | | label="" |
| | | placeholder="请输入笔记内容" |
| | | maxcharacter="500" |
| | | disableDefaultPadding="{{true}}" |
| | | indicator |
| | | bind:change="textareaChange" |
| | | bind:blur="" |
| | | style="{{inputStyle}}" |
| | | placeholder-style="{{placeholderstyle}}" |
| | | /> |
| | | </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> |
| | | </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> |
| | |
| | | textvalue: e.detail.value |
| | | }) |
| | | }, |
| | | feedBack() { |
| | | async feedBack() { |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | |
| | | newDataListRequest: [] |
| | | } |
| | | |
| | | app.MG.ugc.newTopicMessage(query).then((res) => { |
| | | await app.MG.ugc.newTopicMessage(query).then((res) => { |
| | | wx.showToast({ |
| | | title: '提交成功', |
| | | icon: 'success', |
| | |
| | | }) |
| | | }, |
| | | // 确定 |
| | | confirmSuggest() { |
| | | async confirmSuggest() { |
| | | 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(this.data.inputvalue); |
| | | if (!this.data.ratevalue) { |
| | | return wx.showToast({ |
| | |
| | | title: '请输入反馈反馈内容', |
| | | }) |
| | | } |
| | | this.feedBack() |
| | | await this.feedBack() |
| | | } |
| | | }, |
| | | }) |
| | |
| | | <!--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"> |
| | | <t-image src="{{ radioItem == 'test' ? '/static/images/bookService/detail/practice-icon.png' : '/static/images/bookService/detail/notest.png'}}"></t-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: 74rpx"> |
| | | <view class="radio-content" slot="content"> |
| | | <t-image src="{{ radioItem == 'mock' ? '/static/images/bookService/detail/checkpaper.png' : '/static/images/bookService/detail/zujuan.png'}}"></t-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"> |
| | | <t-image src="/static/images/bookService/detail/cuoti.png"></t-image> |
| | | <image src="/static/images/bookService/detail/cuoti.png"></image> |
| | | 我的错题 |
| | | </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"> |
| | | <t-image src="/static/images/bookService/detail/wodeshoucang.png"></t-image> |
| | | <image src="/static/images/bookService/detail/wodeshoucang.png"></image> |
| | | 我的收藏 |
| | | </view> |
| | | </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"> |
| | | <t-image src="/static/images/bookService/detail/test-icon.png"></t-image> |
| | | <image src="/static/images/bookService/detail/test-icon.png"></image> |
| | | <text>{{item.name}}</text> |
| | | </view> |
| | | <view class="practice" bind:tap="goTest" data-value="{{item}}"> |
| | | <t-image src="/static/images/bookService/detail/lianxi-icon.png"></t-image> |
| | | <image src="/static/images/bookService/detail/lianxi-icon.png"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <view wx:if="{{mockData.mockList.length}}"> |
| | | <view class="mack-num">已组卷{{mockData.mockList.length}}次</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-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.report.userScore}}">{{item.report.userScore}}分</view> |
| | | <view class="mock-score" wx:if="{{item.state == '3'}}" |
| | | >{{item.report.userScore}}分</view |
| | | > |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view wx:else class="not-mock"> |
| | | <t-image src="/static/images/bookService/examination/zhuangtai-icon.png"></t-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> |
| | | <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> |
| | |
| | | background-color: #FFF6F0; |
| | | } |
| | | |
| | | .list-title { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .list-title image { |
| | | width: 34rpx; |
| | | height: 38rpx; |
| | |
| | | <view class="tree"> |
| | | <t-collapse default-value="{{activeValues}}" bind:change="handleChange"> |
| | | <t-collapse-panel wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" value="{{index}}" expandIcon disabled="{{!item.children}}"> |
| | | <t-collapse-panel |
| | | wx:for="{{treeList}}" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | wx:key="id" |
| | | value="{{index}}" |
| | | expandIcon |
| | | disabled="{{!item.children}}" |
| | | > |
| | | <view slot="header" class="header-title"> |
| | | <view wx:if="{{tab == 'jsek_cloudLearning'}}"> |
| | | <t-checkbox icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" bind:change="checkResourceTitle" /> |
| | | <t-checkbox |
| | | icon="rectangle" |
| | | checked="{{item.checked}}" |
| | | data-item="{{item}}" |
| | | bind:change="checkResourceTitle" |
| | | /> |
| | | <!-- <t-checkbox icon="rectangle" checked="{{true}}" data-item="{{item}}" bind:change="checkResourceTitle" /> --> |
| | | |
| | | </view> |
| | | <text>{{item.name}}</text> |
| | | </view> |
| | | <view class="list" wx:for="{{item.children}}" wx:for-item="citem" wx:for-index="cindex" wx:key="cindex"> |
| | | <view |
| | | class="list" |
| | | wx:for="{{item.children}}" |
| | | wx:for-item="citem" |
| | | wx:for-index="cindex" |
| | | wx:key="cindex" |
| | | > |
| | | <!-- // 判断 无子项 且为商品item 直接显示 --> |
| | | <view class="listItems" wx:if="{{citem.childrenFolderCount <= 0 && citem.type == 'productItem'}}"> |
| | | <view class="itemsInfo" wx:if="{{citem.name}}" data-item="{{citem}}" data-index="{{cindex}}"> |
| | | <view class="contentBox" bind:tap="goPlayer" data-item="{{citem}}" data-parent="{{item}}"> |
| | | <view |
| | | class="listItems" |
| | | wx:if="{{citem.childrenFolderCount <= 0 && citem.type == 'productItem'}}" |
| | | > |
| | | <view |
| | | class="itemsInfo" |
| | | wx:if="{{citem.name}}" |
| | | data-item="{{citem}}" |
| | | data-index="{{cindex}}" |
| | | > |
| | | <view |
| | | class="contentBox" |
| | | bind:tap="goPlayer" |
| | | data-item="{{citem}}" |
| | | data-parent="{{item}}" |
| | | > |
| | | <!-- 教学资源 云学习 图标 --> |
| | | <view class="box-image" style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}"> |
| | | <view |
| | | class="box-image" |
| | | style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}" |
| | | > |
| | | <view class="checkBox" wx:if="{{tab == 'jsek_cloudLearning'}}"> |
| | | <!-- checked="{{citem.checked}}" --> |
| | | <!-- <t-checkbox icon="rectangle" checked="{{citem.checked}}" disabled="{{citem.selectType=='webpage' || citem.isDownload != 1 || citem.fileMap[citem.file].protectType == 'Private'}}" catch:change="checkResource" data-item="{{citem}}" /> --> |
| | | <t-checkbox icon="rectangle" checked="{{citem.checked}}" data-item="{{citem}}" catch:change="checkResource" /> |
| | | <t-checkbox |
| | | icon="rectangle" |
| | | checked="{{citem.checked}}" |
| | | data-item="{{citem}}" |
| | | catch:change="checkResource" |
| | | /> |
| | | </view> |
| | | <!-- 教学资源图标 --> |
| | | <view class="teach-icon"> |
| | | <t-image wx:if="{{citem.selectType == 'audio'}}" src="/static/images/bookService/detail/audioIcon.png" mode="aspectFill" /> |
| | | <t-image wx:if="{{citem.selectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" /> |
| | | <t-image wx:if="{{citem.selectType == 'pdf'}}" src="/static/images/bookService/detail/pdf.png" mode="aspectFill" /> |
| | | <t-image wx:if="{{citem.selectType == 'webpage'}}" src="/static/images/bookService/detail/net.png" mode="aspectFill" /> |
| | | <t-image wx:if="{{citem.selectType == 'picture'}}" src="/static/images/bookService/detail/picture.png" mode="aspectFill" /> |
| | | <t-image wx:if="{{citem.selectType == 'zip'}}" src="/static/images/bookService/detail/zip.png" mode="aspectFill" /> |
| | | <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'doc' || citem.fileMap[citem.file].extension == 'docx'}}" src="/static/images/bookService/detail/word.png" mode="aspectFill" /> |
| | | <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'xlsx' || citem.fileMap[citem.file].extension == 'xlsx'}}" src="/static/images/bookService/detail/excel.png" mode="aspectFill" /> |
| | | <t-image wx:if="{{ citem.fileMap[citem.file].extension == 'ppt' || citem.fileMap[citem.file].extension == 'pptx'}}" src="/static/images/bookService/detail/PPT.png" mode="aspectFill" /> |
| | | <image |
| | | wx:if="{{citem.selectType == 'audio'}}" |
| | | src="/static/images/bookService/detail/audioIcon.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:if="{{citem.selectType == 'video'}}" |
| | | src="/static/images/bookService/detail/video.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:if="{{citem.selectType == 'pdf'}}" |
| | | src="/static/images/bookService/detail/pdf.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:if="{{citem.selectType == 'webpage'}}" |
| | | src="/static/images/bookService/detail/net.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:if="{{citem.selectType == 'picture'}}" |
| | | src="/static/images/bookService/detail/picture.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:if="{{citem.selectType == 'zip'}}" |
| | | src="/static/images/bookService/detail/zip.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:if="{{ citem.fileMap[citem.file].extension == 'doc' || citem.fileMap[citem.file].extension == 'docx'}}" |
| | | src="/static/images/bookService/detail/word.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:if="{{ citem.fileMap[citem.file].extension == 'xlsx' || citem.fileMap[citem.file].extension == 'xlsx'}}" |
| | | src="/static/images/bookService/detail/excel.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:if="{{ citem.fileMap[citem.file].extension == 'ppt' || citem.fileMap[citem.file].extension == 'pptx'}}" |
| | | src="/static/images/bookService/detail/PPT.png" |
| | | mode="aspectFill" |
| | | /> |
| | | </view> |
| | | <!-- 云学习图标 --> |
| | | <view> </view> |
| | | <!-- 名称 --> |
| | | <text class="name" style="{{ tab == 'jsek_teachingResources' ? 'width: 300rpx;' : 'width: 400rpx;'}}">{{citem.name}}</text> |
| | | <text |
| | | class="name" |
| | | style="{{ tab == 'jsek_teachingResources' ? 'width: 300rpx;' : 'width: 400rpx;'}}" |
| | | >{{citem.name}}</text |
| | | > |
| | | </view> |
| | | <!-- 教学资源类型 --> |
| | | <view class="teachClass"> {{citem.resourceClass}} </view> |
| | | <view class="teach-btn" wx:if="{{tab == 'jsek_teachingResources'}}"> |
| | | <view |
| | | class="teach-btn" |
| | | wx:if="{{tab == 'jsek_teachingResources'}}" |
| | | > |
| | | <!-- 下载按钮 --> |
| | | <t-image src="/static/images/bookService/detail/download-icon.png" width="16" height="16" class="download" data-value="{{citem}}" catchtap="downloadTeach"></t-image> |
| | | <image |
| | | src="/static/images/bookService/detail/download-icon.png" |
| | | class="download-image" |
| | | data-value="{{citem}}" |
| | | catchtap="downloadTeach" |
| | | ></image> |
| | | </view> |
| | | <view wx:if="{{tab == 'jsek_cloudLearning'}}"> |
| | | <!-- 云学习试看图标 --> |
| | | <t-image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}"></t-image> |
| | | <image |
| | | src="/static/images/bookService/detail/shikan.png" |
| | | class="testSee" |
| | | wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}" |
| | | ></image> |
| | | <!-- 云学习加入购物车图标 --> |
| | | <t-image src="/static/images/bookService/detail/cart.png" wx:if="{{citem.isShopCar}}" class="shopCar" bind:tap="onCloudShoppingCart"></t-image> |
| | | <image |
| | | src="/static/images/bookService/detail/cart.png" |
| | | wx:if="{{citem.isShopCar}}" |
| | | class="shopCar" |
| | | bind:tap="onCloudShoppingCart" |
| | | ></image> |
| | | <!-- 云学习购买图标 --> |
| | | <t-image bind:tap="onCloudShoppingCart" src="/static/images/bookService/detail/need-buy.png" class="need-buy" wx:if="{{citem.isbuy }}"></t-image> |
| | | <image |
| | | bind:tap="onCloudShoppingCart" |
| | | src="/static/images/bookService/detail/need-buy.png" |
| | | class="need-buy" |
| | | wx:if="{{citem.isbuy }}" |
| | | ></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- // 判断 不是商品 有子项 递归组件 --> |
| | | <tree wx:else bookInfo="{{bookInfo}}" treeList="{{[citem]}}" itemId="{{itemId}}" tab="{{tab}}" openTeachids="{{openTeachids}}" openLearnids="{{openLearnids}}"></tree> |
| | | <tree |
| | | wx:else |
| | | bookInfo="{{bookInfo}}" |
| | | treeList="{{[citem]}}" |
| | | itemId="{{itemId}}" |
| | | tab="{{tab}}" |
| | | openTeachids="{{openTeachids}}" |
| | | openLearnids="{{openLearnids}}" |
| | | ></tree> |
| | | </view> |
| | | <view class="listItems" wx:if="{{children.length <= 0 && !loading}}"> |
| | | 暂无数据 |
| | |
| | | padding: 0; |
| | | } |
| | | |
| | | |
| | | .download-image { |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | } |
| | | |
| | | .contentBox { |
| | | padding: 0 26rpx; |
New file |
| | |
| | | // packageBookService/pages/components/webView/index.js |
| | | const app = getApp() |
| | | Component({ |
| | | /** |
| | | * 组件的属性列表 |
| | | */ |
| | | properties: { |
| | | fileInfo: { |
| | | type: Object, |
| | | value: {} |
| | | } |
| | | }, |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | src: "", |
| | | link: false, |
| | | epubObj: null, |
| | | currentPage: '', |
| | | }, |
| | | |
| | | methods: { |
| | | onLoadWeb(e) { |
| | | console.log(e, "load") |
| | | }, |
| | | |
| | | onError(e) { |
| | | console.log(e, "err") |
| | | }, |
| | | |
| | | setWebViewSrc() { |
| | | var url = app.config.epubUrl + |
| | | "?md5=" + |
| | | this.properties.fileInfo.md5 + |
| | | "&bookName=" + |
| | | this.properties.fileInfo.bookName + |
| | | "&url=" + app.config.requestCtx + |
| | | "&token=" + |
| | | wx.getStorageSync(app.config.tokenKey) + |
| | | "&recordLocation=" + |
| | | this.data.currentPage |
| | | this.setData({ |
| | | src: url |
| | | }) |
| | | }, |
| | | |
| | | // 获取UserKey |
| | | getProgress() { |
| | | app.MG.identity |
| | | .getUserKey({ |
| | | domain: "bookReadProgress", |
| | | keys: [this.properties.fileInfo.md5], |
| | | }) |
| | | .then((res) => { |
| | | if (res.length) { |
| | | try { |
| | | this.setData({ |
| | | currentPage: JSON.parse(res[0].value).page, |
| | | }); |
| | | } catch (error) { |
| | | this.setData({ |
| | | currentPage: "", |
| | | }); |
| | | } |
| | | if (this.data.currentPage > this.properties.fileInfo.freePage) { |
| | | this.setData({ |
| | | currentPage: "", |
| | | }); |
| | | } |
| | | } |
| | | this.setWebViewSrc(); |
| | | }); |
| | | }, |
| | | // 设置userKey |
| | | setProgress(data) { |
| | | if (data.page && data.page != this.data.currentPage) { |
| | | app.MG.identity |
| | | .setUserKey({ |
| | | setKeyRequests: [{ |
| | | domain: "bookReadProgress", |
| | | key: this.properties.fileInfo.md5, |
| | | value: JSON.stringify(data), |
| | | },], |
| | | }) |
| | | .then((res) => { }); |
| | | } |
| | | }, |
| | | |
| | | drawBack(e) { |
| | | let { |
| | | currentLocation, |
| | | percentage, |
| | | type |
| | | } = |
| | | e.detail.data[0]; |
| | | if (type == "progress" && type != "backDetail") { |
| | | this.setProgress({ |
| | | page: currentLocation, |
| | | progress: percentage, |
| | | }); |
| | | } else if (type == "backDetail") { |
| | | this.setProgress({ |
| | | page: 1, |
| | | progress: "0%", |
| | | }); |
| | | } |
| | | }, |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--packageBookService/pages/components/webView/index.wxml--> |
| | | <view class="page-body"> |
| | | <!-- <web-view bind:message="drawBack" binderror="onError" bindload="onLoadWeb" src="{{src}}"></web-view> --> |
| | | </view> |
New file |
| | |
| | | .page-body { |
| | | width: 100vw; |
| | | height: 500rpx; |
| | | } |
| | |
| | | paperBookCount: 0, //纸质书剩余次数 |
| | | ebookCount: 0, //电子书剩余次数 |
| | | userInfo: {}, |
| | | fileInfo: { |
| | | bookName: "", |
| | | fileType: "", |
| | | md5: "", |
| | | freePage: "" |
| | | }, //阅读器数据 |
| | | buyResourceData: { |
| | | productLinkPath: '', |
| | | refCode: '', |
| | | } |
| | | }, |
| | | |
| | | |
| | |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | if (this.data.tabValue == 'jesk_note') { |
| | | if (this.data.tabValue == 'jsek_note') { |
| | | const child = this.selectComponent('#note') |
| | | child.onReachBottom() |
| | | } |
| | |
| | | this.setData({ |
| | | noFile: true |
| | | }); |
| | | if (res.datas[0].bookshelf_pdf) { |
| | | this.setData({ |
| | | "fileInfo.bookName": this.data.bookDetail.name, |
| | | "fileInfo.fileType": 'pdf', |
| | | "fileInfo.md5": res.datas[0].bookshelf_pdf, |
| | | "fileInfo.freePage": res.datas[0].bookshelf_probationPage, |
| | | }); |
| | | } else if (res.datas[0].bookshelf_protectedEpub) { |
| | | this.setData({ |
| | | "fileInfo.bookName": this.data.bookDetail.name, |
| | | "fileInfo.fileType": 'epub', |
| | | "fileInfo.md5": res.datas[0].bookshelf_protectedEpub, |
| | | "fileInfo.freePage": res.datas[0].bookshelf_freeEpub, |
| | | }); |
| | | } |
| | | } |
| | | } else { |
| | | if (this.data.bookDetail.pdf || this.data.bookDetail.protectedEpub) { |
| | | this.setData({ |
| | | noFile: true |
| | | }); |
| | | if (this.data.bookDetail.pdf) { |
| | | this.setData({ |
| | | "fileInfo.bookName": this.data.bookDetail.name, |
| | | "fileInfo.fileType": 'pdf', |
| | | "fileInfo.md5": this.data.bookDetail.pdf, |
| | | "fileInfo.freePage": this.data.bookDetail.probationPage, |
| | | }); |
| | | } else if (this.data.bookDetail.protectedEpub) { |
| | | this.setData({ |
| | | "fileInfo.bookName": this.data.bookDetail.name, |
| | | "fileInfo.fileType": 'epub', |
| | | "fileInfo.md5": this.data.bookDetail.protectedEpub, |
| | | "fileInfo.freePage": this.data.bookDetail.freeEpubPage, |
| | | }); |
| | | } |
| | | } |
| | | console.log(this.data.fileInfo, 456) |
| | | this.setData({ |
| | | selectedIds: this.data.bookDetail.defaultSaleMethodId, |
| | | bookBuy: this.data.bookDetail.purchasedSaleMethodIdList.indexOf(this.data.bookDetail.defaultSaleMethodId) > -1 |
| | |
| | | if (e.detail.label == '教学资源' || e.detail.label == '云学习' || e.detail.label == '云测试') { |
| | | const checkData = this.data.cmsDatas.find(item => item.refCode == e.detail.value) |
| | | if (checkData) { |
| | | if (e.detail.value == 'jsek_cloudLearning') { |
| | | this.setData({ |
| | | 'buyResourceData.productLinkPath': checkData.productLinkPath, |
| | | 'buyResourceData.refCode': checkData.refCode |
| | | }) |
| | | } |
| | | if ((e.detail.value == 'jsek_teachingResources' && !this.data.teach.length) |
| | | || (e.detail.value == 'jsek_cloudLearning' && !this.data.learn.length) |
| | | || (e.detail.value == 'questionBank' && !this.data.test.length)) { |
| | |
| | | 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({ |
| | |
| | | |
| | | let query = { |
| | | start: 0, |
| | | size: 999, |
| | | size: 9999, |
| | | filterList: [], |
| | | searchList: [] |
| | | } |
| | |
| | | direction: 'column', |
| | | }); |
| | | } |
| | | } else { |
| | | wx.showToast({ |
| | | title: "商品不在有效期", |
| | | icon: 'none', |
| | | duration: 1000, |
| | | }) |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | |
| | | } |
| | | }, |
| | | |
| | | goRead() { |
| | | if (!this.data.noFile) { |
| | | wx.showToast({ |
| | | title: '暂无阅读文件', |
| | | icon: 'none', |
| | | duration: 2000 |
| | | }) |
| | | 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 |
| | | }) |
| | | |
| | | }, |
| | | |
| | | //样书申请 |
| | | //申请电子样书 |
| | | appplyElectronicBook() { |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | |
| | | "note": "/packageBookService/pages/bookServices/detail/components/note/note", |
| | | "tree": "/packageBookService/pages/bookServices/detail/components/tree/index", |
| | | "suggest": "/packageBookService/pages/bookServices/detail/components/suggest/suggest", |
| | | "epub-view": "/packageBookService/pages/bookServices/detail/components/webView/index", |
| | | "t-loading": "tdesign-miniprogram/loading/loading", |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog", |
| | | "t-toast": "tdesign-miniprogram/toast/toast", |
| | |
| | | <view class="book-detail"> |
| | | <view class="detail-left"> |
| | | <view class="book-img"> |
| | | <t-image |
| | | <image |
| | | loading="" |
| | | src="{{bookDetail.icon}}" |
| | | mode="aspectFill" |
| | | width="120" |
| | | height="170" |
| | | aria-label="{{bookDetail.name}}" |
| | | /> |
| | | </view> |
| | | <view class="book-use"> |
| | | <view class="collect" bind:tap="setCollect"> |
| | | <view> |
| | | <t-image |
| | | <image |
| | | loading="" |
| | | src="/static/images/bookService/detail/collect.png" |
| | | wx:if="{{!bookDetail.isFavourite}}" |
| | | ></t-image> |
| | | <t-image |
| | | /> |
| | | <image |
| | | loading="" |
| | | src="/static/images/bookService/detail/collecting.png" |
| | | wx:if="{{bookDetail.isFavourite}}" |
| | | ></t-image> |
| | | /> |
| | | </view> |
| | | <view class="use-title">收藏</view> |
| | | </view> |
| | | <view class="suggest" bind:tap="suggestBtn"> |
| | | <view> |
| | | <t-image |
| | | <image |
| | | loading="" |
| | | src="/static/images/bookService/detail/suggest.png" |
| | | ></t-image> |
| | | /> |
| | | </view> |
| | | <view class="use-title">我要建议</view> |
| | | </view> |
| | |
| | | <view class="class-name showTow">{{bookDetail.class}}</view> |
| | | </view> |
| | | </view> |
| | | <t-image |
| | | <image |
| | | src="/static/images/bookService/detail/square.png" |
| | | class="right-background" |
| | | ></t-image> |
| | | /> |
| | | </view> |
| | | </view> |
| | | <!-- 销售信息 --> |
| | |
| | | <!-- 电子书售价 --> |
| | | <view class="electron-price"> |
| | | <view> |
| | | <t-image |
| | | src="/static/images/bookService/detail/electon-price.png" |
| | | ></t-image> |
| | | <image src="/static/images/bookService/detail/electon-price.png" /> |
| | | </view> |
| | | <view class="price"> |
| | | <view class="price-text" |
| | | >¥{{bookDetail.price == '0.00' ? '免费' :bookDetail.price}}</view |
| | | > |
| | | <view class="price-old" wx:if="{{bookDetail.oldPrice != '0.00'}}" |
| | | >¥{{bookDetail.oldPrice}} <view class="line"></view> |
| | | >¥{{bookDetail.oldPrice}} |
| | | </view> |
| | | </view> |
| | | <view> </view> |
| | |
| | | <!-- 纸质书售价 --> |
| | | <view class="paper-price"> |
| | | <view> |
| | | <t-image |
| | | src="/static/images/bookService/detail/paper-price.png" |
| | | ></t-image> |
| | | <image src="/static/images/bookService/detail/paper-price.png" /> |
| | | </view> |
| | | <view class="price" |
| | | >¥{{bookDetail.paperPrice == '0.00' ? '免费' : |
| | |
| | | </view> |
| | | <!-- 网店 --> |
| | | <view class="book-web"> |
| | | <t-image |
| | | <image |
| | | src="/static/images/bookService/detail/jd.png" |
| | | wx:if="{{bookDetail.JDLink}}" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.JDLink}}" |
| | | data-type="jd" |
| | | ></t-image> |
| | | <t-image |
| | | /> |
| | | <image |
| | | class="tmall-image" |
| | | src="/static/images/bookService/detail/tmall.png" |
| | | width="32" |
| | | height="22" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.tmallLink}}" |
| | | wx:if="{{bookDetail.tmallLink}}" |
| | | ></t-image> |
| | | <t-image |
| | | /> |
| | | <image |
| | | src="/static/images/bookService/detail/dangdang.png" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.dangdangLink}}" |
| | | wx:if="{{bookDetail.dangdangLink}}" |
| | | ></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/jd.png" |
| | | /> |
| | | <image |
| | | src="/static/images/bookService/detail/weidian.png" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.weidianLink}}" |
| | | wx:if="{{bookDetail.weidianLink}}" |
| | | ></t-image> |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <book-brief |
| | | content="{{bookDetail.content}}" |
| | | authorIntroduction="{{bookDetail.authorIntroduction}}" |
| | | wx:if="{{bookDetail.content || bookDetail.authorIntroduction}}" |
| | | wx:if="{{bookDetail.content && bookDetail.authorIntroduction}}" |
| | | ></book-brief> |
| | | <view |
| | | wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction}}" |
| | |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel label="电子书" value="1" style="{{tabPanelstyle}}"> |
| | | 电子书 |
| | | <t-tab-panel label="电子书" value="jsek_eBook" style="{{tabPanelstyle}}"> |
| | | <epub-view |
| | | fileInfo="{{fileInfo}}" |
| | | id="eBook" |
| | | class="webView" |
| | | ></epub-view> |
| | | </t-tab-panel> |
| | | <t-tab-panel |
| | | label="教学资源" |
| | |
| | | bind:getFreeResource="getFreeResource" |
| | | bind:allAddShoppiingCar="allAddShoppiingCar" |
| | | id="learn-resource" |
| | | buyResourceData="{{buyResourceData}}" |
| | | bookId="{{bookDetail.id}}" |
| | | ></learn-resource> |
| | | <tree |
| | | id="tree" |
| | |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel label="云笔记" value="jesk_note" style="{{tabPanelstyle}}"> |
| | | <note |
| | | bookInfo="{{bookDetail}}" |
| | | id="note" |
| | | class="note-list" |
| | | bind:changeLoaidng="changeLoaidng" |
| | | ></note> |
| | | <t-tab-panel label="云笔记" value="jsek_note" style="{{tabPanelstyle}}"> |
| | | <note bookInfo="{{bookDetail}}" id="note" class="note-list"></note> |
| | | </t-tab-panel> |
| | | </t-tabs> |
| | | </view> |
| | |
| | | <view class="box-bottom"> |
| | | <view class="bottom-btn" bind:tap="appplyElectronicBook"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/ebook.png"></t-image> |
| | | <t-image |
| | | loading="" |
| | | src="/static/images/bookService/detail/ebook.png" |
| | | ></t-image> |
| | | </view> |
| | | <view class="btn-text">电子样书申请</view> |
| | | </view> |
| | |
| | | <view class="btn-text">纸质样书申请</view> |
| | | </view> |
| | | <view |
| | | class="shopCar {{(tabValue == 'jsek_teachingResources' || tabValue == 'jesk_note') ? 'disabledColor' : 'shopCarColor' }}" |
| | | class="shopCar {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'shopCarColor' }}" |
| | | bind:tap="addBookShopcCar" |
| | | wx:if="{{tabValue != 'jsek_eBook'}}" |
| | | >加入购物车</view |
| | | > |
| | | <view |
| | | class="buy {{(tabValue == 'jsek_teachingResources' || tabValue == 'jesk_note') ? 'disabledColor' : 'buyColor' }}" |
| | | class="buy {{(tabValue == 'jsek_teachingResources' || tabValue == 'jsek_note') ? 'disabledColor' : 'buyColor' }}" |
| | | bind:tap="buyBtn" |
| | | wx:if="{{tabValue != 'jsek_eBook'}}" |
| | | >立即购买</view |
| | | > |
| | | <view |
| | | class="shopCar shopCarColor" |
| | | bind:tap="addBookShopcCar" |
| | | wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}" |
| | | >加入购物车</view |
| | | > |
| | | <view |
| | | class="buy buyColor" |
| | | bind:tap="buyBtn" |
| | | wx:if="{{tabValue == 'jsek_eBook' && !bookBuy}}" |
| | | >立即购买</view |
| | | > |
| | | <view |
| | | class="read buyColor" |
| | | bind:tap="goRead" |
| | | wx:if="{{tabValue == 'jsek_eBook' && bookBuy}}" |
| | | >立即查看</view |
| | | > |
| | | </view> |
| | | </scroll-view> |
| | | <!-- 我要建议弹窗 --> |
| | |
| | | background-color: #F2F3F8; |
| | | } |
| | | |
| | | .book-img image { |
| | | width: 240rpx; |
| | | height: 340rpx; |
| | | } |
| | | |
| | | .book-detail { |
| | | padding: 32rpx; |
| | | display: flex; |
| | | border-radius: 0 0 20rpx 20rpx; |
| | | } |
| | | |
| | | .tmall-image { |
| | | width: 64rpx !important; |
| | | } |
| | | |
| | | .detail-left { |
| | |
| | | position: relative; |
| | | font-size: 28rpx; |
| | | opacity: 0.6; |
| | | text-decoration: line-through; |
| | | text-decoration-color: #fff; |
| | | } |
| | | |
| | | .line { |
| | | position: absolute; |
| | | top: 50%; |
| | | left: -5rpx; |
| | | width: 80%; |
| | | height: 3rpx; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .book-web { |
| | | margin-left: 30rpx; |
| | |
| | | color: #fff; |
| | | } |
| | | |
| | | .read { |
| | | width: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | color: #fff; |
| | | } |
| | | |
| | | .shopCarColor { |
| | | background-color: #F1AC37; |
| | | } |
| | |
| | | top: 30rpx; |
| | | left: 118rpx; |
| | | } |
| | | |
| | | .webView { |
| | | height: 500rpx; |
| | | } |
| | |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | if (this.data.answerType != 'mock') { |
| | | if (wx.timer) { |
| | | clearInterval(wx.timer) |
| | | } |
| | | } |
| | | if (this.data.answerType == 'mock') { |
| | | if (wx.timer) { |
| | | clearInterval(wx.timer) |
| | |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | if (wx.timer) { |
| | | clearInterval(wx.timer) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload(e) { |
| | | if (wx.timer) { |
| | | clearInterval(wx.timer) |
| | | } |
| | | if (this.data.countdownInterval !== null) { |
| | | clearInterval(this.data.countdownInterval) |
| | | } |
| | |
| | | let oldQuestionList = [] |
| | | oldQuestionList = await this.getMockQuestionList() |
| | | const userAnswerList = await this.getMockAnswer() |
| | | await this.getMockDataList(oldQuestionList, userAnswerList) |
| | | this.setData({ |
| | | 'mockData.sumTime': oldMockData.time, |
| | | cardList: oldQuestionList |
| | | }) |
| | | await this.getMockDataList(oldQuestionList, userAnswerList) |
| | | } |
| | | if (oldMockData.state == '0' || oldMockData.state == '1' || oldMockData.state == '2') { |
| | | this.startCountdown() |
| | | } |
| | | if (oldMockData.state == '3') { |
| | | this.setData({ |
| | | submitStatus: true |
| | | submitStatus: true, |
| | | subjectiveNum: oldMockData.report.userScore |
| | | }) |
| | | } |
| | | } |
| | |
| | | // 获取组卷题目列表 |
| | | async getMockDataList(questionList, oldList) { |
| | | const questionDataList = this.data.questionDataList |
| | | // for (let pathindex = 0; pathindex < questionList.length; pathindex++) { |
| | | // const pathitem = questionList[pathindex]; |
| | | // let itemIds = [] |
| | | // pathitem.infoList.forEach(item => { |
| | | // itemIds.push(item.id + '') |
| | | // }) |
| | | // let query = { |
| | | // path: '*', |
| | | // cmsPath: this.data.rootCmsItemId, |
| | | // cmsType: '*', |
| | | // productId: this.data.bookId, |
| | | // queryType: '*', |
| | | // itemIds, |
| | | // itemFields: { |
| | | // Embedded_QuestionBank_Stem: [], |
| | | // Embedded_QuestionBank_AnalysisCon: [], |
| | | // Embedded_QuestionBank_Answer: [], |
| | | // Embedded_QuestionBank_Option: [], |
| | | // Embedded_QuestionBank_QuestionType: [], |
| | | // Embedded_QuestionBank_StemStyle: [], |
| | | // Embedded_QuestionBank_OptionStyle: [], |
| | | // Embedded_QuestionBank_KnowledgePoint: [], |
| | | // Embedded_QuestionBank_Difficulty: [] |
| | | // } |
| | | // } |
| | | // await app.MG.store.getProductDetail(query).then((res) => { |
| | | // res.datas.cmsDatas[0].datas.forEach((item, index) => { |
| | | // // 循环questionList,给每题赋值分数 |
| | | // let oldObj |
| | | // if (oldList) oldObj = oldList.find((oldItem) => oldItem.id == item.id) |
| | | // let questionObj = { |
| | | // // number: pathitem.infoList.find(infoItem => infoItem.itemId == item.id).number, |
| | | // id: item.id, |
| | | // score: pathitem.infoList.find(infoItem => infoItem.id == item.id).score, |
| | | // stem: |
| | | // item.Embedded_QuestionBank_QuestionType == 'completion' |
| | | // ? JSON.parse(item.Embedded_QuestionBank_Stem) |
| | | // .stemTxt.replaceAll('<vacancy>', ',input,') |
| | | // .split(',') |
| | | // : JSON.parse(item.Embedded_QuestionBank_Stem), // 题干 |
| | | // answer: item.Embedded_QuestionBank_Answer, // 答案 |
| | | // option: item.Embedded_QuestionBank_Option |
| | | // ? JSON.parse(item.Embedded_QuestionBank_Option) |
| | | // : '', // 选择题选项 |
| | | // analysisCon: item.Embedded_QuestionBank_AnalysisCon, // 解析 |
| | | // questionType: item.Embedded_QuestionBank_QuestionType, // 题型 |
| | | // optionStyle: item.Embedded_QuestionBank_OptionStyle, // 选项显示类型 |
| | | // stemStyle: item.Embedded_QuestionBank_StemStyle, // 题干显示类型 |
| | | // difficulty: item.Embedded_QuestionBank_Difficulty |
| | | // ? 4 - item.Embedded_QuestionBank_Difficulty |
| | | // : 0, // 难度等级 |
| | | // userAnswer: oldObj |
| | | // ? oldObj.answer |
| | | // : item.Embedded_QuestionBank_QuestionType == 'completion' || |
| | | // item.Embedded_QuestionBank_QuestionType == 'multipleChoice' |
| | | // ? [] |
| | | // : '', |
| | | // isUserAnswer: oldObj ? this.isHaveAnswer(oldObj.userAnswer) : false, |
| | | // isRight: oldObj ? oldObj.isRight : null, |
| | | // // isComplete: oldObj ? oldObj.isComplete : false, |
| | | // isComplete: this.data.mockData.state == '3' ? true : oldObj ? this.isHaveAnswer(oldObj.answer) : false, |
| | | // isCollect: this.data.collectList.indexOf(item.id) > -1 ? true : false, |
| | | // isUnfold: '' // 控制解析的折叠面板是否展开 |
| | | // } |
| | | // // 多选和填空答案肯为数组,要转换JSON格式 |
| | | // if ( |
| | | // questionObj.questionType == 'completion' || |
| | | // questionObj.questionType == 'multipleChoice' |
| | | // ) { |
| | | // try { |
| | | // questionObj.answer = JSON.parse(questionObj.answer) |
| | | // } catch (error) { |
| | | // questionObj.answer = item.Embedded_QuestionBank_Answer |
| | | // } |
| | | // } |
| | | // // 填空题改造 |
| | | // if (questionObj.questionType == 'completion') { |
| | | // let index = 0 |
| | | // for (let i = 0; i < questionObj.stem.length; i++) { |
| | | // const item = questionObj.stem[i] |
| | | // if (item == 'input') { |
| | | // questionObj.stem[i] = { |
| | | // num: index, |
| | | // data: 'input' |
| | | // } |
| | | // if (!oldObj) questionObj.userAnswer[index] = '' |
| | | // index++ |
| | | // } |
| | | // } |
| | | // } |
| | | // // 获取图片 |
| | | // if (questionObj.stemStyle == 'Image' || questionObj.stemStyle == 'TxtAndImage') { |
| | | // questionObj.stem.stemImage = getPublicImage(questionObj.stem.stemImage, 150) |
| | | // } |
| | | // if (questionObj.optionStyle == 'Image' || questionObj.optionStyle == 'TxtAndImage') { |
| | | // questionObj.option.forEach(optionItem => { |
| | | // if (optionItem.img) optionItem.img = getPublicImage(optionItem.img, 150) |
| | | // }) |
| | | // } |
| | | // if (oldObj && oldObj.isRight) { |
| | | // this.setData({ |
| | | // correctNum: this.data.correctNum + 1 |
| | | // }) |
| | | // } |
| | | // if (item.questionType != 'shortAnswer' && item.isComplete) { |
| | | // this.setData({ |
| | | // subjectiveTotal: this.data.subjectiveTotal + 1 |
| | | // }) |
| | | // } |
| | | // // if (oldObj && isHaveAnswer(oldObj.answer)) countDownRef.value.changeAlready() |
| | | // // cardList赋值 |
| | | // let cardIndex = this.data.cardList.findIndex((item) => item.catalogName == pathitem.catalogName) |
| | | // debugger |
| | | // let infoIndex = this.data.cardList[cardIndex].infoList.findIndex(infoItem => infoItem.id == item.id) |
| | | |
| | | // this.setData({ |
| | | // [`cardList[${cardIndex}].infoList[${infoIndex}]`]: questionObj |
| | | // }) |
| | | // let questionList = [] |
| | | // const cardUpdatedList = this.data.cardList |
| | | // cardUpdatedList.forEach(aitem => { |
| | | // aitem.infoList.forEach((bitem, bindex) => { |
| | | // questionList.push(bitem) |
| | | // bitem.number = bindex + 1 |
| | | // }) |
| | | // }) |
| | | // this.setData({ |
| | | // questionDataList: questionList, |
| | | // cardList: cardUpdatedList |
| | | // }) |
| | | // console.log('组卷题目列表', this.data.questionDataList); |
| | | // }) |
| | | // }) |
| | | // } |
| | | questionList.forEach(async (pathitem, pathindex) => { |
| | | for (let pathindex = 0; pathindex < questionList.length; pathindex++) { |
| | | const pathitem = questionList[pathindex]; |
| | | let itemIds = [] |
| | | pathitem.infoList.forEach(item => { |
| | | itemIds.push(item.id + '') |
| | |
| | | isUserAnswer: oldObj ? this.isHaveAnswer(oldObj.userAnswer) : false, |
| | | isRight: oldObj ? oldObj.isRight : null, |
| | | // isComplete: oldObj ? oldObj.isComplete : false, |
| | | isComplete: this.data.mockData.state == '3' ? true : oldObj ? this.isHaveAnswer(oldObj.answer) : false, |
| | | isComplete: this.data.mockData.state == '3' ? true : false, |
| | | isCollect: this.data.collectList.indexOf(item.id) > -1 ? true : false, |
| | | isUnfold: '' // 控制解析的折叠面板是否展开 |
| | | } |
| | |
| | | questionDataList: questionList, |
| | | cardList: cardUpdatedList |
| | | }) |
| | | console.log('组卷题目列表', this.data.questionDataList); |
| | | }) |
| | | }) |
| | | }) |
| | | } |
| | | this.setData({ |
| | | loading: false |
| | | }) |
| | |
| | | /> |
| | | </view> --> |
| | | |
| | | <view class="page-content"> |
| | | <view class="page-content" style="background-color:{{isNight ? '#222' : ''}}"> |
| | | <question-schedule |
| | | wx:if="{{!loading}}" |
| | | id="countDownRef" |
| | |
| | | |
| | | <!-- 底部区域--> |
| | | |
| | | <view class="page-bottom"> |
| | | <view class="page-bottom" style="background-color:{{isNight ? '#202020' : ''}}"> |
| | | <question-options |
| | | id="question-options" |
| | | isNight="{{isNight}}" |
| | |
| | | <!--pages/bookServices/examination/questionList/index.wxml--> |
| | | <view |
| | | class="question-list" |
| | | style="background-color:{{isNight ? '#000' : '#fff'}}" |
| | | style="background-color:{{isNight ? '#222' : '#fff'}}" |
| | | > |
| | | <!-- 题型title --> |
| | | <view |
| | | class="question-title" |
| | | wx:if="{{questionList[showIndex].type}}" |
| | | style="background-color:{{isNight ? '#000' : '#fff'}}" |
| | | style="background-color:{{isNight ? '#222' : '#fff'}}" |
| | | > |
| | | <text class="title-name">{{questionList[showIndex].type}}</text |
| | | ><text class="title-score" style="color: {{isNight ? '#fff' : '#000'}};" |
| | |
| | | class="title-TxtAndImage" |
| | | > |
| | | <text>{{item.stem.stemTxt}}</text> |
| | | <t-image src="{{item.stem.stemImage}}"></t-image> |
| | | <t-image src="{{item.stem.stemImage}}" /> |
| | | </view> |
| | | <!-- 富文本 --> |
| | | <view |
| | |
| | | <!-- 仅图片 --> |
| | | <view wx:if="{{item.optionStyle == 'Image'}}" class="fl-center"> |
| | | <text>{{contentItem.value}}、</text> |
| | | <t-image src="{{contentItem.img}}"></t-image> |
| | | <t-image src="{{contentItem.img}}" /> |
| | | </view> |
| | | <!-- 文字加图片 --> |
| | | <view |
| | |
| | | > |
| | | <text>{{contentItem.value}}、</text> |
| | | <text>{{contentItem.txt}}</text> |
| | | <t-image src="{{contentItem.img}}"></t-image> |
| | | <t-image src="{{contentItem.img}}" /> |
| | | </view> |
| | | <!-- 富文本 --> |
| | | <view wx:if="{{item.optionStyle == 'RichText'}}"> |
| | |
| | | <!-- 仅图片 --> |
| | | <view wx:if="{{item.optionStyle == 'Image'}}" class="fl-center"> |
| | | <text>{{contentItem.value}}、</text> |
| | | <t-image src="{{contentItem.img}}"></t-image> |
| | | <t-image src="{{contentItem.img}}" /> |
| | | </view> |
| | | <!-- 文字加图片 --> |
| | | <view |
| | |
| | | > |
| | | <text>{{contentItem.value}}、</text> |
| | | <text>{{contentItem.txt}}</text> |
| | | <t-image src="{{contentItem.img}}"></t-image> |
| | | <t-image src="{{contentItem.img}}" /> |
| | | </view> |
| | | <!-- 富文本 --> |
| | | <view wx:if="{{item.optionStyle == 'RichText'}}"> |
| | |
| | | /* pages/bookServices/examination/questionList/index.wxss */ |
| | | .question-list { |
| | | width: 95%; |
| | | height: 86%; |
| | | height: 84%; |
| | | padding: 20rpx; |
| | | background-color: #ffffff; |
| | | border-radius: 20rpx; |
| | |
| | | questionCardState: false, |
| | | setUpPopup: false, |
| | | testReportState: false, |
| | | sliderValue: 10, |
| | | sliderValue: 28, |
| | | useTime: '', |
| | | radioItem: 'daytime' |
| | | }, |
| | |
| | | }, |
| | | // 滑块变化 |
| | | onChangeSlider(e) { |
| | | console.log(e); |
| | | this.setData({ |
| | | sliderValue: e.detail.value |
| | | }) |
| | | console.log(e.detail.value); |
| | | }, |
| | | // 设置遮罩层点击 |
| | | onSetUpChange(e) { |
| | |
| | | <!--pages/bookServices/examination/questionOptions/index.wxml--> |
| | | <view |
| | | class="page-bottom" |
| | | style="color: {{isNight ? '#fff' : '#000'}}; background-color:{{isNight ? '#000' : '#fff'}}" |
| | | style="color: {{isNight ? '#fff' : '#000'}}; background-color:{{isNight ? '#202020' : '#fff'}}" |
| | | > |
| | | <view |
| | | class="li-option" |
| | | bind:tap="setCollect" |
| | | style="color: {{isNight ? '#fff' : '#000'}};" |
| | | > |
| | | <t-image |
| | | src="{{ questionDataList[currentIndex].isCollect ? '/static/images/bookService/detail/collecting.png' : '/static/images/bookService/examination/collect.png'}}" |
| | | > |
| | | </t-image> |
| | | <image |
| | | src="{{ questionDataList[currentIndex].isCollect ? '/static/images/bookService/detail/collecting.png' : isNight ? '/static/images/bookService/examination/wodeshoucang-w.png' : '/static/images/bookService/examination/collect.png'}}" |
| | | /> |
| | | 收藏 |
| | | </view> |
| | | <view |
| | |
| | | bind:tap="handlePopup" |
| | | style="color: {{isNight ? '#fff' : '#000'}};" |
| | | > |
| | | <t-image |
| | | src="/static/images/bookService/examination/questionCard.png" |
| | | ></t-image> |
| | | <image |
| | | src="{{isNight ? '/static/images/bookService/examination/datika-w.png' : '/static/images/bookService/examination/questionCard.png'}}" |
| | | /> |
| | | 答题卡 |
| | | </view> |
| | | <view |
| | |
| | | bind:tap="setUpBtn" |
| | | style="color: {{isNight ? '#fff' : '#000'}};" |
| | | > |
| | | <t-image src="/static/images/bookService/examination/setting.png"></t-image> |
| | | <image |
| | | src="{{isNight ? '/static/images/bookService/examination/setting-w.png' : '/static/images/bookService/examination/setting.png'}}" |
| | | /> |
| | | 设置 |
| | | </view> |
| | | <view |
| | |
| | | wx:if="{{answerType == 'option' || (answerType == 'mock' && !submitStatus)}}" |
| | | style="color: {{isNight ? '#fff' : '#000'}};" |
| | | > |
| | | <t-image src="/static/images/bookService/examination/reset.png"></t-image> |
| | | <image |
| | | src="{{isNight ? '/static/images/bookService/examination/chongzuo-w.png' : '/static/images/bookService/examination/reset.png'}}" |
| | | /> |
| | | 重做 |
| | | </view> |
| | | <view class="bottom-submit"> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="question-card-list"> |
| | | <view wx:for="{{cardList}}" class="card-box"> |
| | | <view wx:for="{{cardList}}" wx:key="index" class="card-box"> |
| | | <!-- 题型 --> |
| | | <view class="question-title"> |
| | | <text class="color-box"></text> |
| | |
| | | <t-slider |
| | | value="{{sliderValue}}" |
| | | theme="capsule" |
| | | step="{{10}}" |
| | | min="{{14}}" |
| | | max="{{100}}" |
| | | step="{{7}}" |
| | | bind:change="onChangeSlider" |
| | | /> |
| | | <!-- <slider |
| | | value="{{sliderValue}}" |
| | | min="{{10}}" |
| | | step="{{10}}" |
| | | activeColor="#ff6c00" |
| | | bind:chang="onChangeSlider" |
| | | /> --> |
| | | </view> |
| | | |
| | | <text>A+</text> |
| | |
| | | <view class="card {{radioItem == 'daytime' ? 'card--active' : ''}}"> |
| | | <t-radio value="daytime" icon="none" borderless> |
| | | <view class="radio-content" slot="content"> |
| | | <t-image |
| | | src="{{ radioItem == 'daytime' ? '/static/images/bookService/examination/rijian.png' : '/static/images/bookService/detail/notest.png'}}" |
| | | ></t-image> |
| | | <image |
| | | src="{{ radioItem == 'daytime' ? '/static/images/bookService/examination/rijian-click.png' : '/static/images/bookService/examination/rijian.png'}}" |
| | | /> |
| | | <text style="color: {{radioItem == 'daytime' ? '#fff':''}};" |
| | | >日间模式</text |
| | | > |
| | |
| | | <view class="card {{radioItem == 'night' ? 'card--active' : ''}}"> |
| | | <t-radio value="night" icon="none" borderless> |
| | | <view class="radio-content" slot="content"> |
| | | <t-image |
| | | src="{{ radioItem == 'night' ? '/static/images/bookService/detail/practice-icon.png' : '/static/images/bookService/examination/yejian.png'}}" |
| | | ></t-image> |
| | | <image |
| | | src="{{ radioItem == 'night' ? '/static/images/bookService/examination/yejian-click.png' : '/static/images/bookService/examination/yejian.png'}}" |
| | | /> |
| | | <text style="color: {{radioItem == 'night' ? '#fff':''}};" |
| | | >夜间模式</text |
| | | > |
| | |
| | | this.setData({ |
| | | percentage: (this.data.ready / this.data.questionList.length) * 100 |
| | | }) |
| | | }, |
| | | 'isNight': function (newValue) { |
| | | console.log('is', newValue); |
| | | } |
| | | }, |
| | | /** |
| | |
| | | wx:if="{{((answerType == 'option' || answerType == 'mock') && !submitStatus) || answerType == 'collectQuestion' || answerType =='errorQuestion'}}" |
| | | class="schedule" |
| | | id="schedule" |
| | | style="background-color:{{isNight ? '#000' : '#fff'}}" |
| | | style="background-color:{{isNight ? '#1a1a1a' : '#fff'}}" |
| | | > |
| | | <view class="schedule-top"> |
| | | <!-- 答题进度 --> |
| | |
| | | ], |
| | | sort, |
| | | coverSize: { |
| | | height: 145, |
| | | width: 105 |
| | | }, |
| | | paging: { |
| | | start: 0, |
| | |
| | | <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" /> |
| | | <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" /> |
| | | <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"> |
| | | <scroll-view scroll-x="{{true}}" class="header-scroll"> |
| | | <t-dropdown-menu style="width: 800rpx;"> |
| | | <t-dropdown-item options="{{stairList.options}}" value="{{stairList.value}}" bindchange="onChangeStair" style="background-color: #F6F6F6;" /> |
| | | <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 style="width: 800rpx"> |
| | | <t-dropdown-item |
| | | options="{{stairList.options}}" |
| | | value="{{stairList.value}}" |
| | | bindchange="onChangeStair" |
| | | style="background-color: #f6f6f6" |
| | | /> |
| | | <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> |
| | | </scroll-view> |
| | | <view class="header-sort" bind:tap="sortClick"> |
| | | <view class="sort-name">排序</view> |
| | | <!-- <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' : ''}}" /> |
| | | <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"> |
| | | <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-box" |
| | | wx:for="{{bookList}}" |
| | | wx:key="id" |
| | | bind:tap="goDetail" |
| | | data-book="{{item}}" |
| | | > |
| | | <view class="book-img"> |
| | | <t-image src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" aria-label="{item.name{}}" mode="widthFix" /> |
| | | <image |
| | | src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" |
| | | aria-label="{item.name{}}" |
| | | mode="widthFix" |
| | | /> |
| | | </view> |
| | | <view class="book-name book-color">{{ item.name}}</view> |
| | | <view class="book-author book-color">{{item.author}}</view> |
| | |
| | | </view> |
| | | <!-- loading --> |
| | | <view class="loading-box" wx:if="{{loaidng}}"> |
| | | <t-loading theme="circular" size="60rpx" class="wrapper" loading="{{loaidng}}" wx:if="{{loaidng}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="wrapper" |
| | | loading="{{loaidng}}" |
| | | wx:if="{{loaidng}}" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </scroll-view> |
| | |
| | | background-color: #FF6C00 !important; |
| | | } |
| | | |
| | | |
| | | |
| | | .publicBtn { |
| | | margin-right: 10rpx; |
| | | margin-left: 20rpx; |
| | |
| | | field: 'state' |
| | | } |
| | | ], |
| | | coverSize: { |
| | | width: 76 |
| | | }, |
| | | queryType: '\\', |
| | | searchList: [], |
| | | size: '30', |
| | |
| | | <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 |
| | | 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="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}}" /> |
| | | <t-side-bar-item |
| | | wx:for="{{assortList}}" |
| | | wx:key="id" |
| | | 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"> |
| | | <scroll-view scroll-x="{{true}}" class="myScroll" show-scrollbar="{{false}}"> |
| | | <view wx:for="{{startList}}" wx:key="id" class="row {{startCheck.id == item.id ? 'tab-active' : ''}}" bind:tap="tabClick" data-tabData="{{item}}">{{item.name}}</view> |
| | | <scroll-view |
| | | scroll-x="{{true}}" |
| | | class="myScroll" |
| | | show-scrollbar="{{false}}" |
| | | > |
| | | <view |
| | | wx:for="{{startList}}" |
| | | wx:key="id" |
| | | class="row {{startCheck.id == item.id ? 'tab-active' : ''}}" |
| | | bind:tap="tabClick" |
| | | data-tabData="{{item}}" |
| | | >{{item.name}}</view |
| | | > |
| | | </scroll-view> |
| | | </view> |
| | | <!-- 内容 --> |
| | | <scroll-view scroll-y="{{true}}" class="class-list" scroll-into-view="{{ 'list' + startCheck.id}}"> |
| | | <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> |
| | | <t-loading |
| | | theme="spinner" |
| | | size="400rpx" |
| | | loading="{{listLoading}}" |
| | | ></t-loading> |
| | | </view> |
| | | <view wx:for="{{startList}}" wx:for-item="item" wx:key="item.id" id="{{ 'list' + item.id}}" class="class-box" wx:if="{{!listLoading}}"> |
| | | <view |
| | | wx:for="{{startList}}" |
| | | wx:for-item="item" |
| | | wx:key="item.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 |
| | | 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/bookService/assort/book-img.png'}}" mode="widthFix" /> |
| | | <image |
| | | src="{{citem.icon ? citem.icon : '/static/images/bookService/assort/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 |
| | | 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/bookService/assort/book-img.png'}}" mode="heightFix"></image> |
| | | <image |
| | | src="{{item.icon ? item.icon : '/static/images/bookService/assort/book-img.png'}}" |
| | | mode="widthFix" |
| | | ></image> |
| | | </view> |
| | | <text class="classify">全部</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="bottom-box"> |
| | | </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}}" /> |
| | | <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}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="wrapper" |
| | | loading="{{loading}}" |
| | | wx:if="{{loading}}" |
| | | /> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | .assort-img { |
| | | display: flex; |
| | | width: 116rpx; |
| | | height: 142rpx; |
| | | width: 152rpx; |
| | | height: 186rpx; |
| | | box-shadow: 0px 3px 6px 1px rgba(0, 0, 0, 0.16); |
| | | margin-bottom: 20rpx; |
| | | } |
| | |
| | | }) |
| | | |
| | | res.datas.forEach(item => { |
| | | console.log(item, 'item456'); |
| | | item.imgUrl = getPublicImage(item.productMonWithLinkDto.product.icon, '', '160'); |
| | | |
| | | this.setData({ |
| | |
| | | const selectedIds = selectedItems.map(item => item.id); |
| | | console.log('选中的商品 id:', selectedIds); |
| | | if (selectedIds.length) { |
| | | app.MG.store.shoppingCartCreateOrder({ linkIds: selectedIds }).then(res => { |
| | | let data = { |
| | | linkIds: selectedIds |
| | | } |
| | | app.MG.store.shoppingCartCreateOrder(data).then(res => { |
| | | console.log(res, 456); |
| | | |
| | | |
| | | const url = '/pages/cart/paymentPage/index?orderNumber=' + res.orderNumber |
| | | wx.navigateTo({ |
| | | url |
| | |
| | | productList: [], |
| | | payPrice: '', |
| | | orderGoods: '', |
| | | isPaySuccess: false, |
| | | isPayComplete: false, |
| | | }, |
| | | |
| | | /** |
| | |
| | | }) |
| | | }, |
| | | confirmOrderGet() { |
| | | |
| | | var that = this; |
| | | let query = { |
| | | orderNum: this.data.orderGoods |
| | | } |
| | |
| | | // 用户未绑定微信 报500 |
| | | app.MG.store.makeWeChatPay(resOrderNum).then(payRes => { |
| | | const payVal = JSON.parse(payRes); |
| | | console.log(payVal); |
| | | wx.requestPayment({ |
| | | "appId": payVal.appId, |
| | | "timeStamp": payVal.timeStamp, |
| | | "nonceStr": payVal.nonceStr, |
| | | "package": payVal.package, |
| | | "signType": payVal.signType, |
| | | "paySign": payVal.paySign, |
| | | success: function (res) { |
| | | console.log('支付成功'); |
| | | if (res.errMsg == 'requestPayment:ok') { |
| | | that.setData({ |
| | | isPaySuccess: true |
| | | }) |
| | | } |
| | | // this.makeWeChatQrPayGet() |
| | | }, |
| | | fail: function (res) { |
| | | console.log('支付失败'); |
| | | }, |
| | | // 无论支付成功失败都会调用 |
| | | "complete": function (res) { |
| | | if (res.errMsg == 'requestPayment:ok') { |
| | | that.setData({ |
| | | isPayComplete: true |
| | | }) |
| | | } |
| | | if (that.data.isPaySuccess && that.data.isPayComplete) { |
| | | that.navToBack() |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | // 调取微信二维码支付 |
| | | }, |
| | | // 页面返回 |
| | | navToBack() { |
| | | |
| | | // 返回 |
| | | wx.navigateBack() |
| | | }, |
| | | }) |
| | |
| | | {{item.orderSaleMethod.product.name}} |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="textBox" wx:if="{{type == 'product'}}">图书服务-电子书</view> |
| | | <view class="textBox" wx:if="{{type == 'item'}}">图书服务-云学习</view> |
| | | <view class="priceBox">¥{{item.payPrice}}</view> |
| | |
| | | background: #FFFFFF; |
| | | border-radius: 20px; |
| | | margin: 30rpx 0; |
| | | /* padding: 30rpx 0; */ |
| | | } |
| | | |
| | | .imageBox { |
| | |
| | | margin: 30rpx 0; |
| | | } |
| | | |
| | | .paymentPageBox {} |
| | | .paymentPageBox { |
| | | margin-top: 165rpx; |
| | | } |
| | | |
| | | page { |
| | | background-color: #F2F3F8; |
| | |
| | | |
| | | onPageScroll(e) { |
| | | this.setData({ |
| | | isWhite: e.scrollTop > 50 ? true : false |
| | | isWhite: e.scrollTop > 20 ? true : false |
| | | }) |
| | | |
| | | }, |
| | |
| | | justify-content: center; |
| | | --td-loading-color: #ff6c00; |
| | | } |
| | | |
| | | .t-tabs__item--evenly { |
| | | flex: 1 0 auto !important; |
| | | } |