Merge refs/remotes/origin/master into refs/heads/master
| | |
| | | "pages/home/digitalRead/index", |
| | | "pages/retrievalPage/index", |
| | | "pages/cart/paymentPage/index", |
| | | "pages/student/index", |
| | | "pages/study/index", |
| | | "pages/cart/index", |
| | | "pages/bookExhibitionList/index", |
| | | "pages/bookExhibitionDetails/index", |
| | |
| | | "selectedIconPatn": "/static/images/home/service-click@2x.png" |
| | | }, |
| | | { |
| | | "pagePath": "pages/student/index", |
| | | "pagePath": "pages/study/index", |
| | | "text": "学习", |
| | | "iconPath": "/static/images/home/learn@2x.png", |
| | | "selectedIconPatn": "/static/images/home/learn-click@2x.png" |
| | |
| | | export default [ |
| | | { |
| | | export default [{ |
| | | id: 0, |
| | | text: '首页', |
| | | url: 'pages/home/home', |
| | |
| | | { |
| | | id: 2, |
| | | text: '学习', |
| | | url: 'pages/student/index', |
| | | url: 'pages/study/index', |
| | | icon: '/static/images/home/learn@2x.png', |
| | | activeIcon: '/static/images/home/learn-click@2x.png' |
| | | }, |
| | |
| | | icon: '/static/images/home/my@2x.png', |
| | | activeIcon: '/static/images/home/my-click@2x.png' |
| | | }, |
| | | ]; |
| | | ]; |
| | |
| | | const util = require("./components/util"); // 引入封装过的加载提示 |
| | | import { loginInfo } from "../../../../../../assets/js/login"; |
| | | import { |
| | | loginInfo |
| | | } from "../../../../../../assets/js/login"; |
| | | const app = getApp(); |
| | | Component({ |
| | | // checked: false, |
| | |
| | | handleList(tree) { |
| | | for (let index = 0; index < tree.length; index++) { |
| | | const item = tree[index]; |
| | | if (item.sysType == "CmsItem" && !item.checked) { |
| | | } |
| | | if (item.sysType == "CmsItem" && !item.checked) {} |
| | | if (item.children && item.children.length > 0) { |
| | | this.handleList(item.children); |
| | | } |
| | |
| | | }); |
| | | if (shoppingCartGetId.includes(saleMethodId)) { |
| | | console.log(111); |
| | | // this.data.updateShoppingCartHidden(); |
| | | // this.data.updateCloudLearning(); |
| | | |
| | | wx.showToast({ |
| | | icon: "error", |
| | |
| | | }); |
| | | } else { |
| | | let query = { |
| | | requests: [ |
| | | { |
| | | saleMethodId: saleMethodId, |
| | | storeEventId: null, |
| | | // agentCode: '电子书' |
| | | }, |
| | | ], |
| | | requests: [{ |
| | | saleMethodId: saleMethodId, |
| | | storeEventId: null, |
| | | // agentCode: '电子书' |
| | | }, ], |
| | | }; |
| | | const addRes = await app.MG.store.addShoppingCart(query); |
| | | console.log(addRes, "addRes"); |
| | |
| | | }); |
| | | } |
| | | }, |
| | | sadd() { |
| | | this.triggerEvent('updateShoppingCartHidden'); |
| | | this.triggerEvent('updateCloudLearning'); |
| | | console.log(789); |
| | | }, |
| | | |
| | | }, |
| | | |
| | | catchtap() {}, |
| | | }); |
| | | |
| | | catchtap() {} |
| | | }) |
| | |
| | | <view class="tree"> |
| | | |
| | | <t-collapse default-value="{{openIds}}" catchchange="handleChange"> |
| | | <t-collapse-panel |
| | | wx:for="{{treeList}}" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | wx:key="id" |
| | | value="{{item.id}}" |
| | | > |
| | | <t-collapse-panel wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" value="{{item.id}}"> |
| | | <view slot="header" class="header-title"> |
| | | <view class="title-checkBox" catchtap="catchTap"> |
| | | <t-checkbox |
| | | icon="rectangle" |
| | | checked="{{item.checked}}" |
| | | data-item="{{item}}" |
| | | catchchange="checkResourceTitle" |
| | | wx:if="{{isShowCheck}}" |
| | | /> |
| | | <t-checkbox icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" catchchange="checkResourceTitle" wx:if="{{isShowCheck}}" /> |
| | | <!-- 章节名 --> |
| | | <view style="width: 100%"> |
| | | <text>{{item.name}} </text |
| | | ><text wx:if="{{item.sysType =='CmsFolder'}}" |
| | | >({{item.children ? item.children.length : 0}})</text |
| | | > |
| | | <text>{{item.name}} </text><text wx:if="{{item.sysType =='CmsFolder'}}">({{item.children ? item.children.length : 0}})</text> |
| | | </view> |
| | | </view> |
| | | </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.sysType == 'CmsItem'}}" |
| | | > |
| | | <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.sysType == 'CmsItem'}}"> |
| | | <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="checkBox" |
| | | wx:if="{{isShowCheck}}" |
| | | catchtap="catchTap" |
| | | > |
| | | <view class="box-image" style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}"> |
| | | <view class="checkBox" wx:if="{{isShowCheck}}" catchtap="catchTap"> |
| | | <!-- 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}}" /> --> |
| | | <<<<<<< Updated upstream |
| | | <t-checkbox |
| | | disabled="{{!citem.saleMethod[0].Id}}" |
| | | icon="rectangle" |
| | |
| | | data-item="{{citem}}" |
| | | catch:change="checkResource" |
| | | /> |
| | | ======= |
| | | <t-checkbox icon="rectangle" checked="{{citem.checked}}" data-item="{{citem}}" catch:change="checkResource" /> |
| | | >>>>>>> Stashed changes |
| | | </view> |
| | | <!-- 教学资源图标 --> |
| | | <view class="teach-icon"> |
| | | <image |
| | | wx:if="{{citem.selectType == 'audio' || citem.learnSelectType == 'audio'}}" |
| | | src="/static/images/bookService/detail/audioIcon.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}" |
| | | src="/static/images/bookService/detail/video.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{citem.selectType == 'pdf'}}" |
| | | src="/static/images/bookService/detail/pdf.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{citem.selectType == 'webpage'}}" |
| | | src="/static/images/bookService/detail/net.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{citem.selectType == 'picture'}}" |
| | | src="/static/images/bookService/detail/picture.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{citem.selectType == 'zip'}}" |
| | | src="/static/images/bookService/detail/zip.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{ citem.fileMap[citem.file].extension == 'doc' || citem.fileMap[citem.file].extension == 'docx'}}" |
| | | src="/static/images/bookService/detail/word.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{ citem.fileMap[citem.file].extension == 'xlsx' || citem.fileMap[citem.file].extension == 'xlsx'}}" |
| | | src="/static/images/bookService/detail/excel.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{ 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' || citem.learnSelectType == 'audio'}}" src="/static/images/bookService/detail/audioIcon.png" mode="aspectFill" /> |
| | | <image wx:elif="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" /> |
| | | <image wx:elif="{{citem.selectType == 'pdf'}}" src="/static/images/bookService/detail/pdf.png" mode="aspectFill" /> |
| | | <image wx:elif="{{citem.selectType == 'webpage'}}" src="/static/images/bookService/detail/net.png" mode="aspectFill" /> |
| | | <image wx:elif="{{citem.selectType == 'picture'}}" src="/static/images/bookService/detail/picture.png" mode="aspectFill" /> |
| | | <image wx:elif="{{citem.selectType == 'zip'}}" src="/static/images/bookService/detail/zip.png" mode="aspectFill" /> |
| | | <image wx:elif="{{ citem.fileMap[citem.file].extension == 'doc' || citem.fileMap[citem.file].extension == 'docx'}}" src="/static/images/bookService/detail/word.png" mode="aspectFill" /> |
| | | <image wx:elif="{{ citem.fileMap[citem.file].extension == 'xlsx' || citem.fileMap[citem.file].extension == 'xlsx'}}" src="/static/images/bookService/detail/excel.png" mode="aspectFill" /> |
| | | <image wx:elif="{{ 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'}}"> |
| | | <!-- 下载按钮 --> |
| | | <<<<<<< Updated upstream |
| | | <!-- <image |
| | | src="/static/images/bookService/detail/download-icon.png" |
| | | class="download-image" |
| | | data-value="{{citem}}" |
| | | catchtap="downloadTeach" |
| | | ></image> --> |
| | | ======= |
| | | <image src="/static/images/bookService/detail/download-icon.png" class="download-image" data-value="{{citem}}" catchtap="downloadTeach"></image> |
| | | >>>>>>> Stashed changes |
| | | </view> |
| | | <view wx:if="{{tab == 'jsek_cloudLearning'}}"> |
| | | <!-- 云学习试看图标 --> |
| | | <image |
| | | src="/static/images/bookService/detail/shikan.png" |
| | | class="testSee" |
| | | wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}" |
| | | ></image> |
| | | <image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}"></image> |
| | | <!-- 云学习加入购物车图标 --> |
| | | <image |
| | | src="/static/images/bookService/detail/cart@2x.png" |
| | | wx:if="{{citem.isShopCar}}" |
| | | class="shopCar" |
| | | data-item="{{citem}}" |
| | | catch:tap="onCloudShoppingCart" |
| | | ></image> |
| | | <image src="/static/images/bookService/detail/cart@2x.png" wx:if="{{citem.isShopCar}}" class="shopCar" data-item="{{citem}}" catch:tap="onCloudShoppingCart"></image> |
| | | <!-- 云学习购买图标 --> |
| | | <image |
| | | src="/static/images/bookService/detail/need-buy.png" |
| | | class="need-buy" |
| | | wx:if="{{citem.isbuy }}" |
| | | ></image> |
| | | <image src="/static/images/bookService/detail/need-buy.png" class="need-buy" wx:if="{{citem.isbuy }}"></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- // 判断 不是商品 有子项 递归组件 --> |
| | | <tree |
| | | wx:if="{{citem.childrenCount > 0 && citem.sysType == 'CmsFolder' }}" |
| | | isShowCheck="{{isShowCheck}}" |
| | | bookInfo="{{bookInfo}}" |
| | | treeList="{{[citem]}}" |
| | | itemId="{{itemId}}" |
| | | tab="{{tab}}" |
| | | buyIds="{{buyIds}}" |
| | | openTeachids="{{openTeachids}}" |
| | | openLearnids="{{openLearnids}}" |
| | | ></tree> |
| | | <tree wx:if="{{citem.childrenCount > 0 && citem.sysType == 'CmsFolder' }}" isShowCheck="{{isShowCheck}}" bookInfo="{{bookInfo}}" treeList="{{[citem]}}" itemId="{{itemId}}" tab="{{tab}}" buyIds="{{buyIds}}" openTeachids="{{openTeachids}}" openLearnids="{{openLearnids}}"></tree> |
| | | </view> |
| | | <!-- 暂无数据 --> |
| | | <view wx:if="{{!item.children || !item.children.length}}" class="noData"> |
| | |
| | | </view> |
| | | </t-collapse-panel> |
| | | </t-collapse> |
| | | |
| | | </view> |
| | | |
| | | <web-view wx:if="{{webpageSrc}}" src="{{webpageSrc}}"></web-view> |
| | | <!-- <button bind:tap="sadd"> 65498</button> --> |
| | |
| | | // pages/bookServices/detail/index.js |
| | | import Toast from "tdesign-miniprogram/toast"; |
| | | import tool from "../../../../assets/js/toolClass"; |
| | | import { loginInfo } from "../../../../assets/js/login"; |
| | | import { |
| | | loginInfo |
| | | } from "../../../../assets/js/login"; |
| | | const app = getApp(); |
| | | Page({ |
| | | /** |
| | |
| | | this.setData({ |
| | | bookItemDetail: res.datas[0], |
| | | selectedIds: res.datas[0].defaultSaleMethod.id, |
| | | bookBuy: |
| | | res.datas[0].purchasedSaleMethodIdList.indexOf( |
| | | res.datas[0].defaultSaleMethodId |
| | | ) > -1, |
| | | bookBuy: res.datas[0].purchasedSaleMethodIdList.indexOf( |
| | | res.datas[0].defaultSaleMethodId |
| | | ) > -1, |
| | | }); |
| | | let times = new Date(res.datas[0].defaultSaleMethod.endDate).getTime(); |
| | | let startTime = new Date( |
| | |
| | | } |
| | | this.setData({ |
| | | selectedIds: this.data.bookDetail.defaultSaleMethodId, |
| | | bookBuy: |
| | | this.data.bookDetail.purchasedSaleMethodIdList.indexOf( |
| | | this.data.bookDetail.defaultSaleMethodId |
| | | ) > -1, |
| | | bookBuy: this.data.bookDetail.purchasedSaleMethodIdList.indexOf( |
| | | this.data.bookDetail.defaultSaleMethodId |
| | | ) > -1, |
| | | }); |
| | | let times = new Date( |
| | | this.data.bookDetail.defaultSaleMethod.endDate |
| | |
| | | }, |
| | | // 跳转网店 |
| | | goShop(e) { |
| | | const { link } = e.currentTarget.dataset; |
| | | const { |
| | | link |
| | | } = e.currentTarget.dataset; |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/webpage/index?url=${link}`, |
| | | }); |
| | |
| | | onTabsChange(e) { |
| | | this.setData({ |
| | | tabValue: e.detail.value, |
| | | noResources: false, |
| | | }); |
| | | if ( |
| | | e.detail.label == "教学资源" || |
| | | e.detail.label == "云学习" || |
| | | e.detail.label == "云测试" |
| | | ) { |
| | | const checkData = this.data.cmsDatas.find( |
| | | (item) => item.refCode == e.detail.value |
| | | ); |
| | | noResources: false |
| | | }) |
| | | 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({ |
| | |
| | | console.log(determine); |
| | | if (!determine) { |
| | | let query = { |
| | | requests: [ |
| | | { |
| | | saleMethodId: this.data.selectedIds, |
| | | storeEventId: null, |
| | | agentCode: "电子书", |
| | | }, |
| | | ], |
| | | requests: [{ |
| | | saleMethodId: this.data.selectedIds, |
| | | storeEventId: null, |
| | | agentCode: "电子书", |
| | | }, ], |
| | | }; |
| | | const addRes = app.MG.store.addShoppingCart(query); |
| | | this.showSuccessToast(); |
| | |
| | | let bookOrdersId = ""; |
| | | let query = { |
| | | remarks: "电子书", |
| | | requests: [ |
| | | { |
| | | saleMethodId: this.data.bookItemDetail.defaultSaleMethodId |
| | | ? this.data.bookItemDetail.defaultSaleMethodId |
| | | : this.data.bookDetail.defaultSaleMethodId, |
| | | count: 1, |
| | | }, |
| | | ], |
| | | requests: [{ |
| | | saleMethodId: this.data.bookItemDetail.defaultSaleMethodId ? |
| | | this.data.bookItemDetail.defaultSaleMethodId : this.data.bookDetail.defaultSaleMethodId, |
| | | count: 1, |
| | | }, ], |
| | | }; |
| | | // 发起订单初始化请求并等待结果 |
| | | const res = await app.MG.store.initOrder(query); |
| | |
| | | cmsTypeRefCode: "", |
| | | newDataListRequest: [], |
| | | name: this.data.bookDetail.name, // name为申请的书本名称 |
| | | content: JSON.stringify([ |
| | | { |
| | | name: this.data.bookDetail.name, |
| | | id: this.data.bookDetail.id, |
| | | // defaultSaleMethodId: bookData.value.defaultSaleMethodId, |
| | | icon: this.data.bookDetail.icon, |
| | | }, |
| | | ]), |
| | | content: JSON.stringify([{ |
| | | name: this.data.bookDetail.name, |
| | | id: this.data.bookDetail.id, |
| | | // defaultSaleMethodId: bookData.value.defaultSaleMethodId, |
| | | icon: this.data.bookDetail.icon, |
| | | }, ]), |
| | | }; |
| | | app.MG.ugc.newTopicMessage(query).then(async (res) => { |
| | | if (res) { |
| | |
| | | title: "尊敬的用户,您好!", |
| | | content: "请先进行教师认证!", |
| | | complete: (res) => { |
| | | if (res.cancel) { |
| | | } |
| | | if (res.cancel) {} |
| | | if (res.confirm) { |
| | | wx.navigateTo({ |
| | | url: "/packageDomain/pages/teacherCertification/index", |
| | |
| | | title: "尊敬的用户,您好!", |
| | | content: "请先进行教师认证!", |
| | | complete: (res) => { |
| | | if (res.cancel) { |
| | | } |
| | | if (res.cancel) {} |
| | | if (res.confirm) { |
| | | wx.navigateTo({ |
| | | url: "/packageDomain/pages/teacherCertification/index", |
| | |
| | | title: "尊敬的用户,您好!", |
| | | content: "请先进行教师认证!", |
| | | complete: (res) => { |
| | | if (res.cancel) { |
| | | } |
| | | if (res.cancel) {} |
| | | if (res.confirm) { |
| | | wx.navigateTo({ |
| | | url: "/packageDomain/pages/teacherCertification/index", |
| | |
| | | return false; |
| | | } |
| | | }, |
| | | |
| | | updateShoppingCartHidden() { |
| | | const isSHow = this.data.shoppingCartGetId.some((item) => item == data.saleMethod[0].Id) |
| | | console.log(isSHow); |
| | | return !isSHow |
| | | |
| | | }, |
| | | updateCloudLearning() { |
| | | const checkData = this.data.cmsDatas.find(item => item.refCode == 'jsek_cloudLearning') |
| | | this.getResourceData(checkData) |
| | | debugger |
| | | console.log(55555); |
| | | }, |
| | | // 遍历树结构转换为数组方法 |
| | | handleTreeData(array) { |
| | | const flattenedArray = []; |
| | |
| | | if (new RegExp("(" + k + ")").test(fmt)) { |
| | | fmt = fmt.replace( |
| | | RegExp.$1, |
| | | RegExp.$1.length == 1 |
| | | ? o[k] |
| | | : ("00" + o[k]).substr(("" + o[k]).length) |
| | | RegExp.$1.length == 1 ? |
| | | o[k] : |
| | | ("00" + o[k]).substr(("" + o[k]).length) |
| | | ); |
| | | } |
| | | } |
| | |
| | | try { |
| | | let query = { |
| | | remarks: "组卷", |
| | | requests: [ |
| | | { |
| | | saleMethodId: this.data.mockData.id, |
| | | count: 1, |
| | | }, |
| | | ], |
| | | requests: [{ |
| | | saleMethodId: this.data.mockData.id, |
| | | count: 1, |
| | | }, ], |
| | | }; |
| | | if (this.data.flag) { |
| | | this.setData({ |
| | |
| | | }); |
| | | // 记录购买时间,并设状态state为1,表示刚购买完成组卷 |
| | | app.MG.identity.setUserKey({ |
| | | setKeyRequests: [ |
| | | { |
| | | domain: "mockData", |
| | | key: this.data.bookDetail.id + "", |
| | | value: JSON.stringify(this.data.mockData.mockList), |
| | | }, |
| | | ], |
| | | setKeyRequests: [{ |
| | | domain: "mockData", |
| | | key: this.data.bookDetail.id + "", |
| | | value: JSON.stringify(this.data.mockData.mockList), |
| | | }, ], |
| | | }); |
| | | }, |
| | | // 获取相关图书 |
| | |
| | | tabValue: "brief", |
| | | pageLoading: true, |
| | | }); |
| | | this.onLoad({ id: e.detail.id, name: e.detail.name }); |
| | | this.onLoad({ |
| | | id: e.detail.id, |
| | | name: e.detail.name |
| | | }); |
| | | }, |
| | | // 底部购买按钮 |
| | | buyBtn() { |
| | |
| | | return false; |
| | | } |
| | | wx.navigateTo({ |
| | | url: |
| | | "/packageBookService/pages/components/webView/index?md5=" + |
| | | url: "/packageBookService/pages/components/webView/index?md5=" + |
| | | this.data.fileInfo.md5 + |
| | | "&fileName=" + |
| | | this.data.fileInfo.bookName + |
| | |
| | | wx.navigateTo({ |
| | | url: "/packageDomain/pages/teacherCertification/index", |
| | | }); |
| | | } else if (res.cancel) { |
| | | } |
| | | } else if (res.cancel) {} |
| | | }, |
| | | }); |
| | | } |
| | |
| | | wx.navigateTo({ |
| | | url: "/packageDomain/pages/teacherCertification/index", |
| | | }); |
| | | } else if (res.cancel) { |
| | | } |
| | | } else if (res.cancel) {} |
| | | }, |
| | | }); |
| | | } |
| | |
| | | teach: tree, |
| | | }); |
| | | }, |
| | | }); |
| | | }); |
| | |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | <view wx:if="{{!loading && learn.length}}"> |
| | | <<<<<<< Updated upstream |
| | | <learn-resource |
| | | bind:getFreeResource="getFreeResource" |
| | | bind:allAddShoppiingCar="allAddShoppiingCar" |
| | |
| | | buyIds="{{buyIdList}}" |
| | | openLearnids="{{openLearnids}}" |
| | | ></tree> |
| | | ======= |
| | | <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" id="learn-resource" buyResourceData="{{buyResourceData}}" bookId="{{bookDetail.id}}"></learn-resource> |
| | | |
| | | <tree id="tree" openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}" bind:updateShoppingCartHidden="updateShoppingCartHidden" bind:updateCloudLearning="updateCloudLearning"></tree> |
| | | |
| | | |
| | | >>>>>>> Stashed changes |
| | | </view> |
| | | <view wx:if="{{noResources}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | |
| | | appRefCode: app.config.appRefCode |
| | | }).then((res) => { |
| | | // console.log(res); |
| | | |
| | | this.setData({ |
| | | topicId: res.id |
| | | }) |
| | |
| | | }, |
| | | |
| | | confirmSuggest() { |
| | | if (!this.data.textvalue) { |
| | | if (!this.data.textvalue.trim()) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请填写笔记内容', |
| | |
| | | <view class=" label"> 邮箱: </view> |
| | | <view class="item-content"> |
| | | <view class="inputBox1"> |
| | | <t-input placeholder="输入邮箱" borderless value="{{userInfoForm.email}}" type="number" tips="{{emailError ? '邮箱输入不正确' : ''}}" bindchange="onEmailInput" /> |
| | | <t-input placeholder="输入邮箱" borderless value="{{userInfoForm.email}}" tips="{{emailError ? '邮箱输入不正确' : ''}}" bindchange="onEmailInput" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <view wx:else class="outsideHigherBox"> |
| | | <view class="higherBox" wx:for="{{higherList}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | <view class="outsideHigherImageBox"> |
| | | <view class="higherImageBox" bind:tap="downloadData" data-item="{{item}}"> |
| | | <image src="{{item.icon}}" mode="aspectFill" /> |
| | | <view class="higherImageBox"> |
| | | <image data-item="{{item}}" bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" /> |
| | | <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> |
| | | <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="aspectFit" /> |
| | | <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="aspectFit" /> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="higherTextBox">{{item.name}}</view> |
| | | </view> |
| | |
| | | .outsideHigherImageBox {} |
| | | |
| | | .downloadIcon { |
| | | width: 30rpx; |
| | | height: 24rpx; |
| | | width: 34rpx; |
| | | height: 34rpx; |
| | | border-radius: 5rpx 5rpx 5rpx 5rpx; |
| | | background: rgba(0, 0, 0, 0.3); |
| | | position: absolute; |
| | | top: 0rpx; |
| | | right: 0rpx; |
| | | padding: 10rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .downloadIcon image { |
| | |
| | | <view class="textBox" title="{{item.subtitleName}}"> <text>{{item.subtitleName}}</text></view> |
| | | </view> |
| | | </view> |
| | | <view class="bottom-box"> |
| | | <view class="bottom-box" wx:if="{{bookExhibitionList.length }}"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | |
| | | |
| | | Page({ |
| | | data: { |
| | | swipeOpened: false, |
| | | onDisabled: false, |
| | | imgUrl: [], |
| | | shoppingCartData: [], |
| | |
| | | start: 1, |
| | | totalSize: '', |
| | | isMore: null, |
| | | bookId: '', |
| | | bookName: '' |
| | | }, |
| | | |
| | | onLoad(options) { |
| | | |
| | | wx.setNavigationBarTitle({ |
| | | title: '购物车' |
| | | }); |
| | | this.shoppingCartGet(); |
| | | console.log(this.data.shoppingCartData.length, 'this.data.shoppingCartData.length'); |
| | | |
| | | this.setData({ |
| | | swipeOpened: true |
| | | }) |
| | | }, |
| | | onShow() { |
| | | this.setData({ |
| | | swipeOpened: false |
| | | }) |
| | | if (typeof this.getTabBar === 'function' && this.getTabBar()) { |
| | | this.getTabBar().setData({ |
| | | active: 3 |
| | |
| | | checkAll: false, |
| | | }) |
| | | }, |
| | | |
| | | |
| | | onDelete(e) { |
| | | const item = e.currentTarget.dataset.item; |
| | | app.MG.store.delShoppingCart({ |
| | |
| | | this.setData({ |
| | | totalSize: res.totalSize |
| | | }) |
| | | |
| | | res.datas.forEach(item => { |
| | | console.log(res); |
| | | |
| | | this.setData({ |
| | | bookId: res.id, |
| | | bookName: res.name |
| | | }) |
| | | item.imgUrl = getPublicImage(item.productMonWithLinkDto.product.icon, '', '160'); |
| | | // this.setData({ |
| | | // type: item.saleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product' |
| | |
| | | shoppingCartData: res.datas |
| | | }); |
| | | console.log(this.data.shoppingCartData, 'shoppingCartData'); |
| | | |
| | | if (this.data.shoppingCartData.length === 0) { |
| | | this.setData({ |
| | | onDisabled: true |
| | |
| | | console.log(978); |
| | | this.shoppingCartGet() |
| | | }, |
| | | |
| | | onBook(e) { |
| | | // console.log(e); |
| | | const item = e.currentTarget.dataset.item |
| | | console.log(item); |
| | | // wx.navigateTo({ |
| | | // url: '/packageBookService/pages/bookServices/detail/index?id=' + item.id + '&name=' + item.name |
| | | // }) |
| | | } |
| | | }); |
| | |
| | | <t-empty icon="folder-open" description="暂无数据" font-size="80" /> |
| | | </view> |
| | | <!-- <button bind:tap="onLogin"> 去登录</button> --> |
| | | <t-swipe-cell wx:for="{{shoppingCartData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | <!-- <view class="contentBox"> --> |
| | | <!-- <view class="contentCheckbox"> |
| | | <checkbox value="{{item.id}}" checked="{{item.checked}}"></checkbox> |
| | | </view> --> |
| | | <t-swipe-cell wx:for="{{shoppingCartData}}" wx:key="index" wx:for-item="item" wx:for-index="index" opened="{{swipeOpened}}"> |
| | | |
| | | <view class="itemWarp"> |
| | | <t-cell bordered="{{false}}"> |
| | | <view slot="title" class="titleBox"> |
| | | <!-- <view class="labelBox"> |
| | | <view class="eBook" wx:if="{{item.type == 'product'}}">电子书</view> |
| | | <view wx:if="{{item.type == 'item'}}" class="cloudLearning">云学习</view> |
| | | </view> |
| | | <view class="boosName"> |
| | | {{item.productMonWithLinkDto.product.name}} |
| | | </view> --> |
| | | |
| | | <view wx:if="{{item.type == 'product'}}" style="width: 386rpx;"> |
| | | <!-- <view> |
| | | <text class="eBook">电子书</text> <text class="boosName">{{item.name}}</text> |
| | | </view> --> |
| | | |
| | | <view class="boosName"> |
| | | <text class="eBook">云学习</text> |
| | | <text class="eBook">电子书</text> |
| | | <text> {{item.name}}</text> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{item.type == 'item'}}" style="width: 386rpx;"> |
| | | <!-- <view> |
| | | <text class="cloudLearning">云学习</text> <text class="boosName"> {{item.name}}</text> |
| | | </view> --> |
| | | |
| | | <view class="boosName"> |
| | | <text class="cloudLearning">云学习</text> |
| | | <text> {{item.name}}</text> |
| | |
| | | <view class="contentCheckbox"> |
| | | <t-checkbox icon="rectangle" value=" {{item.id}}" data-item="{{item}}" checked="{{item.checked}}" bindchange="HandelItemChange" /> |
| | | </view> |
| | | <view class="left-image"> |
| | | <view class="left-image" data-item="{{item}}" bind:tap="onBook"> |
| | | <image wx:if="{{item.imgUrl}}" src="{{item.imgUrl}}" class="imageStyle" mode="aspectFit" /> |
| | | <image wx:else src="/static/images/default-book-img.png" class="imageStyle" mode="aspectFit" /> |
| | | </view> |
| | |
| | | background: #F2F3F8; |
| | | border-radius: 18rpx 18rpx 18rpx 18rpx; |
| | | padding-bottom: 325rpx; |
| | | height: calc(100vh - 300rpx); |
| | | height: calc(100vh - 250rpx); |
| | | /* width: calc(100vw - 60rpx); */ |
| | | |
| | | } |
| | | |
| | | .bottomBox { |
| | | /* position: fixed; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: calc(env(safe-area-inset-bottom) + 88rpx); */ |
| | | height: 120rpx; |
| | | |
| | | /* height: 135rpx; */ |
| | | height: 100rpx; |
| | | background: #FFFFFF; |
| | | box-shadow: 0rpx -2rpx 0rpx 2rpx rgba(0, 0, 0, 0.08); |
| | | display: flex; |
| | | align-items: center; |
| | | position: fixed; |
| | | bottom: calc(env(safe-area-inset-bottom) + 100rpx); |
| | | left: 0; |
| | | right: 0; |
| | | /* height: 44px; */ |
| | | /* padding-bottom: 90px; */ |
| | | /* padding-top: 10rpx; */ |
| | | } |
| | | |
| | | .checkGroupBox { |
| | |
| | | color: #fff; |
| | | padding: 5rpx; |
| | | font-size: 22rpx; |
| | | font-weight: 400; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | color: #fff; |
| | | padding: 5rpx; |
| | | font-size: 22rpx; |
| | | |
| | | font-weight: 400; |
| | | } |
| | | |
| | | .boosName { |
| | |
| | | color: #fff; |
| | | padding: 5rpx; |
| | | font-size: 22rpx; |
| | | |
| | | font-weight: 400; |
| | | } |
| | | |
| | | .cloudLearning { |
| | |
| | | color: #fff; |
| | | padding: 5rpx; |
| | | font-size: 22rpx; |
| | | font-weight: 400; |
| | | } |
| | | |
| | | .labelBox { |
| | |
| | | |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <view class="outsideHigherBox"> |
| | | |
| | | <view class="higherBox" wx:for="{{bookFairData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | <view class="outsideHigherImageBox"> |
| | | <view bind:tap="downloadData" data-item="{{item}}"> |
| | | |
| | | <image class="higherImageBox" src="{{item.icon}}" mode="" /> |
| | | </view> |
| | | |
| | | <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> |
| | | |
| | | <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="" /> |
| | | <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="" /> |
| | | <view class="higherImageBox" data-item="{{item}}"> |
| | | <image bind:tap="downloadData" src="{{item.icon}}" mode="aspectFill" /> |
| | | <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> |
| | | <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="aspectFit" /> |
| | | <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="aspectFit" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="higherTextBox">{{item.name}}</view> |
| | | </view> |
| | | </view> |
| | |
| | | } |
| | | |
| | | .outsideHigherImageBox { |
| | | position: relative; |
| | | /* position: relative; */ |
| | | } |
| | | |
| | | .higherImageBox { |
| | | width: 190rpx; |
| | | height: 255rpx; |
| | | margin: 15rpx; |
| | | position: relative; |
| | | } |
| | | |
| | | .higherImageBox image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .downloadIcon { |
| | |
| | | border-radius: 5rpx 5rpx 5rpx 5rpx; |
| | | background: rgba(0, 0, 0, 0.3); |
| | | position: absolute; |
| | | top: 15rpx; |
| | | right: 15rpx; |
| | | top: 0rpx; |
| | | right: 0rpx; |
| | | padding: 10rpx; |
| | | } |
| | | |
| | | .download { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .downloadshiftin { |
| | | .downloadIcon image { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | |
| | | color: #ff6d00; |
| | | } |
| | | |
| | | .dialogBox .t-input__control { |
| | | /* .dialogBox .t-input__control { |
| | | min-height: 100rpx; |
| | | } |
| | | } */ |
| | | |
| | | .t-button--text { |
| | | color: #000 !important; |
File was renamed from pages/student/index.js |
| | |
| | | import { |
| | | getPublicImage |
| | | } from "../../assets/js/middleGround/tool.js"; |
| | | import { |
| | | loginInfo |
| | | } from '../../assets/js/login'; |
| | | import moment from 'moment' |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | learningDuration: 0, |
| | | lastLoginTime: '2024-03-25 20:00:09', |
| | | learningDuration: "0小时", |
| | | lastLoginTime: '-', |
| | | active: 0, |
| | | titleBook: "图书(0本)", |
| | | titleCourse: "课程(0门)", |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad() { |
| | | this.getStaticsSum(); |
| | | this.getDataList(false); |
| | | // 检查登录状态 |
| | | |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | active: 2 |
| | | }) |
| | | } |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (data) { |
| | | this.getUserInfo() |
| | | this.getStaticsSum(); |
| | | this.getDataList(false); |
| | | } |
| | | }) |
| | | } else { |
| | | this.getUserInfo() |
| | | this.getStaticsSum(); |
| | | this.getDataList(false); |
| | | |
| | | } |
| | | |
| | | }, |
| | | getUserInfo() { |
| | | app.MG.identity.getCurrentAppUser().then(res => { |
| | | if (res) { |
| | | this.setData({ |
| | | lastLoginTime: res.lastLoginTime != null ? moment(res.lastLoginTime).format('YYYY-MM-DD HH:mm:ss') : '-' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getStaticsSum() { |
| | | const data = { |