feat(合并代码): 和冰帝阿
合并代码
BREAKING CHANGE: N
| | |
| | | <view class="message"> |
| | | <view class="basic"> |
| | | <view class="basic" wx:if="{{content}}"> |
| | | <view class="basic-title"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/label.png"></t-image> |
| | | </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="font-size: 28rpx; color: #333; line-height: 48rpx; text-align: justify"></rich-text> |
| | | </view> |
| | | <view class="basic"> |
| | | <view class="basic" wx:if="{{authorIntroduction}}"> |
| | | <view class="basic-title"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/author.png"></t-image> |
| | |
| | | <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="font-size: 28rpx; color: #333; line-height: 48rpx; text-align: justify" /> |
| | | </view> |
| | |
| | | /* pages/bookServices/detail/components/brief/index.wxss */ |
| | | .message { |
| | | padding: 0 40rpx 40rpx 40rpx; |
| | | min-height: 550rpx; |
| | | } |
| | | |
| | | |
| | | .message image { |
| | | width: 42rpx; |
| | | height: 48rpx; |
New file |
| | |
| | | // pages/bookServices/detail/components/learnResource/learnResource.js |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-button": "tdesign-miniprogram/button/button" |
| | | } |
| | | } |
New file |
| | |
| | | <!--pages/bookServices/detail/components/learnResource/learnResource.wxml--> |
| | | <view class="learnResource" theme="primary"> |
| | | <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx; " t-class="external-class"> |
| | | <t-image src=" /static/images/bookService/detail/yijianlingqu.png"></t-image> |
| | | <text>é¢åæ¥ç</text> |
| | | </t-button> |
| | | <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;"> |
| | | <t-image src="/static/images/bookService/detail/yijiangoumai.png"></t-image> |
| | | ä¸é®è´ä¹° |
| | | </t-button> |
| | | <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;"> |
| | | <t-image src="/static/images/bookService/detail/renwudanï¼icon.png"></t-image> |
| | | å¦ä¹ ä»»å¡å |
| | | </t-button> |
| | | </view> |
New file |
| | |
| | | /* pages/bookServices/detail/components/learnResource/learnResource.wxss */ |
| | | .learnResource { |
| | | padding: 40rpx 0; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | border-bottom: 1px solid #EFF0F1; |
| | | } |
| | | |
| | | .btn { |
| | | width: 232rpx; |
| | | font-size: 28rpx; |
| | | --td-button-primary-bg-color: #fff; |
| | | --td-button-primary-border-color: #FF6C00; |
| | | --td-button-primary-color: #ff6c00; |
| | | padding: 0; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .btn image { |
| | | width: 28rpx; |
| | | height: 32rpx; |
| | | } |
New file |
| | |
| | | // pages/bookServices/detail/components/suggest/suggest.js |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | |
| | | }, |
| | | |
| | | data: { |
| | | dialogKey: '', |
| | | showWithInput: false, |
| | | showTextAndTitleWithInput: false, |
| | | inputvalue: '', |
| | | textvalue: '', |
| | | ratevalue: 0, |
| | | }, |
| | | methods: { |
| | | showDialog(e) { |
| | | this.setData({ |
| | | showWithInput: true |
| | | }) |
| | | }, |
| | | |
| | | closeDialog() { |
| | | this.setData({ |
| | | showWithInput: false |
| | | }) |
| | | }, |
| | | // è¯åæ¹å |
| | | onChangeRate(e) { |
| | | const { value } = e.detail; |
| | | this.setData({ |
| | | ratevalue: value |
| | | }); |
| | | }, |
| | | }, |
| | | }) |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog", |
| | | "t-input": "tdesign-miniprogram/input/input", |
| | | "t-textarea": "tdesign-miniprogram/textarea/textarea", |
| | | "t-rate": "tdesign-miniprogram/rate/rate" |
| | | } |
| | | } |
New file |
| | |
| | | <t-dialog visible="{{showWithInput}}" title="æè¦å»ºè®®" confirm-btn="ç¡®å®" cancel-btn="åæ¶" bind:confirm="closeDialog" bind:cancel="closeDialog" class="suggest-dialog"> |
| | | <view slot="content"> |
| | | <view class="demo-rate"> |
| | | <view class="demo-rate__title">å®å¿è¯å</view> |
| | | <t-rate value="{{ratevalue}}" bind:change="onChangeRate" /> |
| | | </view> |
| | | <t-input clearable value="{{inputvalue}}" slot="content" label="èç³»æ¹å¼" placeholder="请è¾å
¥èç³»æ¹å¼" placeholder-class="placeholder" /> |
| | | <t-textarea value="{{textvalue}}" t-class="external-class" label="æ ç¾æå" placeholder="设置æå¤§å符个æ°ï¼ä¸ä¸ªæ±å表示两个å符" maxcharacter="200" disableDefaultPadding="{{true}}" indicator /> |
| | | </view> |
| | | </t-dialog> |
New file |
| | |
| | | /* pages/bookServices/detail/components/suggest/suggest.wxss */ |
| | | .suggest-dialog { |
| | | --td-dialog-close-color: #666 |
| | | } |
| | | |
| | | .t-class-content { |
| | | height: 400px; |
| | | } |
| | | |
| | | |
| | | .wrapper { |
| | | margin-bottom: 32rpx; |
| | | } |
| | | |
| | | .placeholder { |
| | | color: rgba(0, 0, 0, 0.26); |
| | | line-height: 96rpx; |
| | | height: 96rpx !important; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .dialog-input { |
| | | padding-top: 12px; |
| | | padding-bottom: 12px; |
| | | text-align: left; |
| | | margin-top: 32rpx; |
| | | border-radius: 8rpx; |
| | | background-color: #f3f3f3; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .placeholder { |
| | | color: rgba(0, 0, 0, 0.4); |
| | | line-height: 96rpx; |
| | | } |
| | | |
| | | .demo-rate { |
| | | background-color: #fff; |
| | | height: 96rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 0 32rpx; |
| | | border-bottom: solid 1rpx #f0f0f0; |
| | | border-top: solid 1rpx #f0f0f0; |
| | | margin-top: 32rpx; |
| | | margin-bottom: 32rpx; |
| | | } |
| | | |
| | | .demo-rate__title { |
| | | width: 200rpx; |
| | | } |
| | | |
| | | .demo-rate__transparent { |
| | | background-color: transparent; |
| | | padding-left: 32rpx; |
| | | border: 0; |
| | | } |
New file |
| | |
| | | Component({ |
| | | properties: { |
| | | applyState: { |
| | | type: String, |
| | | value: 'none' |
| | | }, |
| | | rejectCause: { |
| | | type: String, |
| | | value: '' |
| | | } |
| | | }, |
| | | data: { |
| | | showRejectDialog: false, |
| | | confirmBtn: { content: 'ç¥éäº', variant: 'base' }, |
| | | }, |
| | | methods: { |
| | | applyResource() { |
| | | var myEventDetail = {} // detailå¯¹è±¡ï¼æä¾ç»äºä»¶çå¬å½æ° |
| | | var myEventOption = { |
| | | bubbles: true, |
| | | composed: true, |
| | | // capturePhase: true, |
| | | } // 触åäºä»¶çé项 |
| | | this.triggerEvent('applyResource', myEventDetail, myEventOption) |
| | | }, |
| | | showDialog() { |
| | | this.setData({ |
| | | showRejectDialog: true |
| | | }) |
| | | }, |
| | | closeDialog() { |
| | | this.setData({ |
| | | showRejectDialog: false |
| | | }) |
| | | } |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog" |
| | | } |
| | | } |
New file |
| | |
| | | <view class="teach-btn"> |
| | | <t-button theme="primary" style="width: 120px; height: 36px;" class="btn-upload"> |
| | | <t-image src="/static/images/bookService/detail/upload.png"></t-image> |
| | | ä¸ä¼ èµæº |
| | | </t-button> |
| | | <t-button theme="primary" style="width: 120px; height: 36px;"> |
| | | <t-image src="/static/images/bookService/detail/download.png"></t-image> |
| | | æ¹éä¸è½½ |
| | | </t-button> |
| | | </view> |
| | | <view class="applyResult {{applyState == 'none' ? 'applyNone' : applyState == 'Normal' ? 'applyPass' : applyState == 'WaitAudit' ? 'applying' :applyState == 'Reject' ? 'applyReject' :'' }}"> |
| | | <view wx:if="{{applyState == 'WaitAudit'}}">èµæºä¸è½½ç³è¯·æ£å¨å®¡æ ¸ä¸ï¼è¯·èå¿çå¾
ï¼</view> |
| | | <view wx:if="{{applyState == 'Normal'}}"> |
| | | èµæºä¸è½½ç³è¯·å·²éè¿<text wx:if="{{deadline}}">ï¼æææ¥ææªè³ï¼{{ deadline }}</text> |
| | | </view> |
| | | <view wx:if="{{applyState == 'Reject'}}">èµæºä¸è½½éè¦ç³è¯·ï¼è¯·å
ç³è¯·å¹¶çå¾
å®¡æ ¸éè¿åæ¹å¯ä¸è½½</view> |
| | | <view wx:if="{{applyState == 'none'}}"> |
| | | èµæºä¸è½½éè¦ç³è¯·ï¼è¯·å
ç³è¯·å¹¶çå¾
å®¡æ ¸éè¿åæ¹å¯ä¸è½½ |
| | | </view> |
| | | <view class="btn-box"> |
| | | <t-button wx:if="{{applyState == 'Reject'}}" bind:tap="checkCause" style="height: 50rpx;" class="rejectBtn" bind:tap="showDialog">æ¥çåå </t-button> |
| | | <t-button wx:if="{{applyState == 'none' || applyState == 'Reject'}}" theme="primary" bind:tap="applyResource" class="applyBtn" style="height: 50rpx;">ç³è¯·</t-button> |
| | | </view> |
| | | </view> |
| | | <!-- æªéè¿åå --> |
| | | <t-dialog visible="{{showRejectDialog}}" title="æç¤º" confirm-btn="{{ confirmBtn }}" bind:confirm="closeDialog"> |
| | | <view slot="content"> |
| | | <text class="cause-title">èµæºä¸è½½ç³è¯·æªéè¿ï¼è§£å³é®é¢åå¯ç¹å»âç³è¯·âæé®éæ°æäº¤ç³è¯·</text> |
| | | <view class="cause-content">åå :{{ rejectCause }}</view> |
| | | </view> |
| | | </t-dialog> |
New file |
| | |
| | | .teach-btn { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | height: 134rpx; |
| | | --td-button-primary-bg-color: #fff; |
| | | --td-button-primary-border-color: #FF6C00; |
| | | --td-button-primary-color: #ff6c00; |
| | | } |
| | | |
| | | .teach-btn image { |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | margin-right: 6rpx; |
| | | } |
| | | |
| | | .teach-btn .t-button__content { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .applyResult { |
| | | padding: 0 10rpx; |
| | | width: 740rpx; |
| | | height: 80rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 auto; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | .applyNone { |
| | | background-color: rgba(255, 108, 0, 0.06); |
| | | color: #ff6C00; |
| | | } |
| | | |
| | | .applyReject { |
| | | background-color: rgba(238, 24, 24, 0.16); |
| | | border: 1px solid #ee1818; |
| | | } |
| | | |
| | | .applyPass { |
| | | background-color: rgba(0, 128, 0, 0.16); |
| | | border: 1px solid green; |
| | | } |
| | | |
| | | .applying { |
| | | background-color: #fff2e9; |
| | | border: 1px solid #ff6c00; |
| | | } |
| | | |
| | | .btn-box { |
| | | display: flex; |
| | | } |
| | | |
| | | .applyBtn { |
| | | margin-left: 20rpx; |
| | | width: 92rpx; |
| | | height: 50rpx; |
| | | --td-button-font-size: 24rpx; |
| | | --td-button-border-radius: 10rpx; |
| | | --td-button-primary-bg-color: #ff6c00; |
| | | --td-button-primary-border-color: #FF6C00; |
| | | --td-button-primary-text-active-bg-color: #000ï¼ |
| | | } |
| | | |
| | | .rejectBtn { |
| | | width: 150rpx; |
| | | } |
| | | |
| | | .cause-title { |
| | | color: #FF6C00; |
| | | } |
| | | |
| | | .cause-content { |
| | | line-height: 40rpx; |
| | | } |
New file |
| | |
| | | import Message from 'tdesign-miniprogram/message/message'; |
| | | const app = getApp() |
| | | Component({ |
| | | properties: { |
| | | treeList: { |
| | | type: Array, |
| | | value: [] |
| | | }, |
| | | buyIds: { |
| | | type: Array, |
| | | value: [] |
| | | }, |
| | | tab: { |
| | | type: String, |
| | | value: '' |
| | | }, |
| | | applyState: { |
| | | type: String, |
| | | value: '' |
| | | } |
| | | }, |
| | | data: { |
| | | activeValues: [0] |
| | | }, |
| | | onShow() { |
| | | |
| | | }, |
| | | methods: { |
| | | // èç¹å±å¼ |
| | | handleChange(e) { |
| | | this.setData({ |
| | | activeValues: e.detail.value, |
| | | }); |
| | | console.log('ä¼ é', this.properties.buyIds); |
| | | }, |
| | | handleCheck(data) { |
| | | for (let index = 0; index < data.length; index++) { |
| | | const element = data[index]; |
| | | element.checked = true |
| | | if (element.childrenCount && element.type == "productFolder") { |
| | | handleCheck(element.children) |
| | | } |
| | | } |
| | | }, |
| | | downloadTeach(e) { |
| | | console.log('ç¹å»äº', e); |
| | | const value = e.currentTarget.dataset.value |
| | | var myEventDetail = { |
| | | value, |
| | | } // detailå¯¹è±¡ï¼æä¾ç»äºä»¶çå¬å½æ° |
| | | var myEventOption = { |
| | | bubbles: true, |
| | | composed: true |
| | | } // 触åäºä»¶çé项 |
| | | this.triggerEvent('downloadTeach', myEventDetail, myEventOption) |
| | | }, |
| | | // å¤æèµæºæ¯å¦è´ä¹° |
| | | resourceIsBuy (data) { |
| | | if (data.saleMethod && data.saleMethod.length) { |
| | | const isSHow = buyIdList.value.some((item) => item == data.saleMethod[0].Id) |
| | | return !isSHow |
| | | } else { |
| | | return false |
| | | } |
| | | } |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-collapse": "tdesign-miniprogram/collapse/collapse", |
| | | "t-collapse-panel": "tdesign-miniprogram/collapse-panel/collapse-panel", |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-checkbox": "tdesign-miniprogram/checkbox/checkbox", |
| | | "tree": "/pages/bookServices/detail/components/tree/index" |
| | | } |
| | | } |
New file |
| | |
| | | <view class="tree"> |
| | | <t-collapse defaultValue="{{activeValues}}" bind:change="handleChange"> |
| | | <t-collapse-panel wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" value="{{index}}" expandIcon> |
| | | <view slot="header" class="header-title"> |
| | | <view> |
| | | <t-checkbox icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" catch:change="checkResourceTitle" wx:if="{{tab == 'jsek_teachingResources'}}" /> |
| | | </view> |
| | | <text>{{item.name}}</text> |
| | | </view> |
| | | <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"> |
| | | <!-- æå¦èµæº äºå¦ä¹ 徿 --> |
| | | <view class="box-image"> |
| | | <view class="checkBox"> |
| | | <t-checkbox icon="rectangle" checked="{{citem.checked}}" disabled="{{citem.selectType=='webpage' || citem.isDownload != 1 || citem.fileMap[citem.file].protectType == 'Private'}}" bind:change="checkResource" data-item="{{citem}}" wx:if="{{tab == 'jsek_teachingResources'}}" /> |
| | | </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" /> |
| | | </view> |
| | | <!-- äºå¦ä¹ 徿 --> |
| | | <view> |
| | | |
| | | </view> |
| | | <!-- åç§° --> |
| | | <text class="name">{{citem.name}}</text> |
| | | </view> |
| | | <!-- æå¦èµæºç±»å --> |
| | | <view class="teachClass"> |
| | | {{citem.resourceClass}} |
| | | </view> |
| | | <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}}" bind:tap="downloadTeach"></t-image> |
| | | </view> |
| | | <view wx:if="{{tab == 'jsek_cloudLearning'}}"> |
| | | <t-image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{citem.isuy }}"></t-image> |
| | | <t-image src="/static/images/bookService/detail/need-buy.png" class="need-buy"></t-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- // 夿 䏿¯åå æå项 éå½ç»ä»¶ --> |
| | | <tree wx:else treeList="{{[citem]}}" itemId="{{itemId}}"></tree> |
| | | </view> |
| | | <view class="listItems" wx:if="{{children.length <= 0 && !loading}}"> |
| | | ææ æ°æ® |
| | | </view> |
| | | <view class="loading" wx:if="{{loading}}"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" /> |
| | | </view> |
| | | </t-collapse-panel> |
| | | </t-collapse> |
| | | </view> |
New file |
| | |
| | | .tree { |
| | | --td-collapse-content-padding: 32rpx 12rpx 32rpx 32rpx; |
| | | } |
| | | |
| | | .header-title { |
| | | display: flex; |
| | | align-items: center; |
| | | --td-checkbox-vertical-padding: 0 |
| | | } |
| | | |
| | | .t-class-content { |
| | | padding: 0; |
| | | } |
| | | |
| | | .contentBox { |
| | | padding: 0 26rpx; |
| | | height: 88rpx; |
| | | background-color: #FFF6F0; |
| | | margin-top: 24rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .contentBox .checkBox { |
| | | --td-checkbox-vertical-padding: 0; |
| | | --td-checkbox-bg-color: #FFF6F0; |
| | | } |
| | | |
| | | .box-image { |
| | | width: 350rpx; |
| | | display: flex; |
| | | } |
| | | |
| | | .box-image image { |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | margin-right: 8rpx; |
| | | } |
| | | |
| | | .contentBox .box-image .name { |
| | | width: 300rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .teachClass { |
| | | color: #949494; |
| | | } |
| | | |
| | | .teach-btn { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .testSee, |
| | | .need-buy { |
| | | width: 38rpx; |
| | | height: 38rpx; |
| | | } |
| | |
| | | // pages/bookServices/detail/index.js |
| | | import Message from 'tdesign-miniprogram/message/index'; |
| | | import Message from 'tdesign-miniprogram/message/index.js'; |
| | | const app = getApp(); |
| | | Page({ |
| | | /** |
| | |
| | | dang: '', |
| | | micro: '', |
| | | }, |
| | | tabValue: 'brief', |
| | | cmsDatas: [], // èµæºrefCodeå表 |
| | | ids: [1], |
| | | list: [], |
| | | teachResources: [], |
| | | teach: [], |
| | | learn: [], |
| | | openTeachids: [], |
| | | openLearnids: [], |
| | | resourceClassList: [], // èµæºæå±åç±» |
| | | applyState: "", // æå¦èµæºç³è¯·ç¶æ |
| | | deadline: "", // æå¦èµæºç³è¯·æææ¥æ |
| | | rejectCause: "", // ä¸è½½æç»åå |
| | | buyIdList: [], |
| | | shoppingCartGetId: [], // å·²è´ä¹°idå表 |
| | | shoppingList: [] |
| | | }, |
| | | |
| | | resetTree: function (e) { |
| | | this.setData({ |
| | | currentCheck: e.detail.checkedItem, |
| | | list: e.detail.changeList |
| | | }) |
| | | }, |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | |
| | | }, |
| | | }); |
| | | this.getBookInfo(options.id); |
| | | this.getResourceClass() // è·åèµæºæå±åç±» |
| | | this.getApplyInfo(options.id) |
| | | if (wx.getAccountInfoSync('jsek-token')) { |
| | | this.getShoppingCartProductGet() |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() {}, |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | |
| | | app.MG.store.getProductDetail(query).then((res) => { |
| | | this.setData({ |
| | | bookDetail: res.datas, |
| | | cmsDatas: res.datas.cmsDatas[0].datas, |
| | | buyIdList: res.datas.purchasedSaleMethodIdList |
| | | }); |
| | | console.log('详æ
', res.datas); |
| | | // è·åå¾ä¹¦åç±» |
| | | const iconType = JSON.parse(res.datas.bookClassification)[0][0]; |
| | | const classType = JSON.parse(res.datas.bookClassification)[0][1]; |
| | |
| | | linkType: 'FavoriteBookCity', |
| | | }) |
| | | .then(() => { |
| | | this.data.bookDetail.isFavourite = false; |
| | | this.setData({ |
| | | 'bookDetail.isFavourite': false |
| | | }) |
| | | Message.success({ |
| | | context: this, |
| | | offset: ['20rpx', '32rpx'], |
| | | duration: 2000, |
| | | content: 'åæ¶æ¶è', |
| | | offset: [20, 32], |
| | | duration: 5000, |
| | | content: 'è¿æ¯ä¸æ¡æåçæç¤ºæ¶æ¯', |
| | | }); |
| | | }); |
| | | } else { |
| | |
| | | linkType: 'FavoriteBookCity', |
| | | }; |
| | | app.MG.store.addProductLink(params).then((res) => { |
| | | console.log(res); |
| | | this.data.bookDetail.isFavourite = true; |
| | | this.setData({ |
| | | 'bookDetail.isFavourite': true |
| | | }) |
| | | Message.success({ |
| | | context: this, |
| | | offset: ['20rpx', '32rpx'], |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // æè¦å»ºè®® |
| | | suggestBtn() { |
| | | const child = this.selectComponent('#suggest-component') |
| | | child.showDialog() |
| | | }, |
| | | // 跳转ç½åº |
| | | goShop(e) { |
| | | const { link } = e.currentTarget.dataset; |
| | |
| | | url: link, |
| | | }); |
| | | }, |
| | | }); |
| | | onTabsChange(e) { |
| | | this.setData({ |
| | | tabValue: e.detail.value |
| | | }) |
| | | 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_teachingResources' && !this.data.teach.length) |
| | | || (e.detail.value == 'jsek_cloudLearning' && !this.data.learn.length) |
| | | || (e.detail.value == 'questionBank' && !this.data.test.length)) { |
| | | this.getResourceData(checkData) |
| | | } |
| | | } |
| | | } |
| | | console.log('忢', this.data.tabValue); |
| | | }, |
| | | // è·åèµæºæå±åç±» |
| | | getResourceClass() { |
| | | let query = { |
| | | refCodes: ['resourcesClassification'] |
| | | } |
| | | app.MG.store.getProductTypeField(query).then((res) => { |
| | | this.setData({ |
| | | resourceClassList: JSON.parse(res[0].config).option |
| | | }) |
| | | }) |
| | | }, |
| | | // è·åæå¦èµæº äºå¦ä¹ äºæµè¯ |
| | | getResourceData(type) { |
| | | let query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | productId: this.data.bookDetail.id, |
| | | 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 (type.refCode == 'questionBank') { |
| | | const data = res.datas.cmsDatas[0].datas.filter( |
| | | (item) => item.refCode == 'jsek_questionBank' |
| | | ) |
| | | if (data.length) return getResourceData(data[0]) |
| | | } |
| | | //æå¦èµæº äºå¦ä¹ |
| | | if (type.refCode == 'jsek_teachingResources' || type.refCode == 'jsek_cloudLearning') { |
| | | if (res.datas.cmsDatas[0].datas.length > 0) { |
| | | if (type.refCode == 'jsek_teachingResources') { |
| | | res.datas.cmsDatas[0].datas.forEach(item => { |
| | | item.checked = false |
| | | }) |
| | | const list = await this.getAllResource(res.datas.cmsDatas[0].datas) |
| | | this.setData({ |
| | | teachResources: list, |
| | | teach: list |
| | | }) |
| | | this.findChildIds(this.data.teachResources, this.data.openTeachids = []) |
| | | } else if (type.refCode == 'jsek_cloudLearning') { |
| | | const list = await this.getAllResource(res.datas.cmsDatas[0].datas) |
| | | this.setData({ |
| | | learn: list |
| | | }) |
| | | console.log('äºå¦ä¹ ', this.data.learn); |
| | | this.findChildIds(this.data.teachResources, this.data.openLearnids = []) |
| | | } |
| | | } else { |
| | | // æ æ°æ® |
| | | } |
| | | } else if (type.refCode == 'jsek_questionBank') { |
| | | console.log('äºæµè¯'); |
| | | } else { |
| | | console.log('å
¶ä»'); |
| | | } |
| | | }) |
| | | .catch((e) => { |
| | | console.log(e) |
| | | }) |
| | | console.log('ä¿¡æ¯', this.data); |
| | | }, |
| | | // è·å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.bookDetail.id, |
| | | 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.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 |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // å¾ä¹¦æ·»å è´ç©è½¦ |
| | | addBookShopcCar() { |
| | | let query = { |
| | | requests: [ |
| | | { |
| | | saleMethodId: this.data.bookDetail.defaultSaleMethodId, |
| | | storeEventId: null, |
| | | agentCode: 'çµå书' |
| | | } |
| | | ] |
| | | } |
| | | const addRes = app.MG.store.addShoppingCart(query) |
| | | }, |
| | | // è·åæå¦èµæºä¸è½½æ¯å¦ç³è¯·éè¿ |
| | | getApplyInfo(id) { |
| | | // è·åå½åæ¶é´ |
| | | const currentDate = new Date() |
| | | let query = { |
| | | sort: { |
| | | type: 'Desc', |
| | | field: 'CreateDate' |
| | | }, |
| | | start: 0, |
| | | size: 99999, |
| | | appRefCode: app.config.appRefCode, |
| | | topicIdOrRefCode: 'productDownLoad' |
| | | } |
| | | app.MG.ugc.getTopicMessageList(query).then((res) => { |
| | | const applyResource = res.datas.find((item) => { |
| | | let content = [] |
| | | try { |
| | | content = JSON.parse(item.content) |
| | | } catch (error) { |
| | | content = [] |
| | | } |
| | | if (Array.isArray(content)) return content.find((citem) => citem.id == id) |
| | | return false |
| | | }) |
| | | // æç³è¯·è®°å½ |
| | | if (applyResource) { |
| | | if (applyResource.state == 'Reject') { |
| | | this.setData({ |
| | | rejectCause: JSON.parse(applyResource.feedBack).reason, |
| | | applyState: 'Reject' |
| | | }) |
| | | } else if (applyResource.state == 'Normal') { |
| | | const endDate = JSON.parse(applyResource.feedBack).endDate |
| | | // const endDate = new Date(JSON.parse(applyResource.feedBack).endDate + ' 23:59:59').getTime() |
| | | if (endDate == 'æ°¸ä¹
') { |
| | | // deadline.value = 'æ°¸ä¹
' |
| | | this.setData({ |
| | | applyState: 'Normal', |
| | | deadline: 'æ°¸ä¹
', |
| | | }) |
| | | } else { |
| | | let endTime = new Date(endDate + ' 23:59:59').getTime() |
| | | // deadline.value = endDate + ' 23:59:59' |
| | | this.setData({ |
| | | deadline: endDate + ' 23:59:59' |
| | | }) |
| | | if (currentDate.getTime() < endTime) { |
| | | // æªè¶
æ¶ |
| | | this.setData({ |
| | | applyState: 'Normal' |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | applyState: 'none' |
| | | }) |
| | | } |
| | | } |
| | | } else { |
| | | this.setData({ |
| | | applyState: applyResource.state |
| | | }) |
| | | } |
| | | } else { |
| | | this.setData({ |
| | | applyState: 'none' |
| | | }) |
| | | } |
| | | console.log('ç³è¯·éè¿', this.data.applyState); |
| | | }) |
| | | |
| | | }, |
| | | // ç³è¯·æå¦èµæº |
| | | applyResource() { |
| | | // let role = userStore.userInfo ? userStore.userInfo.role : null |
| | | // if (role) { |
| | | // if (role == 'Teacher') { |
| | | // ç³è¯·æå¦èµæº |
| | | let query = { |
| | | topicIdOrRefCode: 'productDownLoad', |
| | | type: 'applyForDownload', |
| | | state: 'WaitAudit', |
| | | 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 |
| | | } |
| | | ]) |
| | | } |
| | | app.MG.ugc.newTopicMessage(query).then((res) => { |
| | | if (res) { |
| | | Message.success('ç³è¯·å·²æäº¤ï¼è¯·å¾
å®¡æ ¸éè¿åä¸è½½') |
| | | } |
| | | this.getApplyInfo(this.data.bookDetail.id) |
| | | }) |
| | | // } else { |
| | | // ElMessageBox.confirm('请å
è¿è¡æå¸è®¤è¯ï¼', 'å°æ¬çç¨æ·ï¼æ¨å¥½ï¼', { |
| | | // confirmButtonText: 'å»è®¤è¯', |
| | | // cancelButtonText: 'åæ¶', |
| | | // type: 'warning' |
| | | // }) |
| | | // .then(() => { |
| | | // isShow.value = true |
| | | // }) |
| | | // .catch(() => { }) |
| | | // } |
| | | // } else { |
| | | // // logIn() |
| | | // } |
| | | }, |
| | | downloadTeach(e) { |
| | | |
| | | const data = e.detail.value |
| | | // const data |
| | | // let role = userStore.userInfo ? userStore.userInfo.role : null |
| | | // if (role) { |
| | | // if (role == 'Teacher') { |
| | | if (this.properties.applyState == 'Normal' || this.properties.applyState == 'none') { |
| | | // æ¯å¦å
许ä¸è½½ |
| | | if (data.isDownload == 1) { |
| | | // ç³è¯·éè¿ |
| | | let url = app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' |
| | | if (data.file) { |
| | | // 夿æ¯å¦ç§æ |
| | | if (data.fileMap[data.file].protectType == 'Private') |
| | | return Message.error({ |
| | | context: this, |
| | | offset: ['20rpx', '32rpx'], |
| | | duration: 5000, |
| | | content: '该æä»¶æ æ³ä¸è½½' |
| | | }) |
| | | url = url + data.file + '&token=' + wx.getStorageSync('jsek-token') |
| | | } else if (data.freeFile) { |
| | | url = url + data.freeFile + '&token=' + wx.getStorageSync('jsek-token') |
| | | } else { |
| | | Message.error({ |
| | | context: this, |
| | | offset: ['20rpx', '32rpx'], |
| | | duration: 5000, |
| | | content: 'ææ èµæº', |
| | | }) |
| | | } |
| | | this.downloadFile(url) |
| | | } else { |
| | | Message.error({ |
| | | context: this, |
| | | offset: ['20rpx', '32rpx'], |
| | | duration: 5000, |
| | | content: 'è¯¥èµæºæ æ³ä¸è½½', |
| | | }) |
| | | } |
| | | } else if (this.properties.applyState == 'WaitAudit') { |
| | | // ElMessageBox.confirm('请å
ç³è¯·ä¸è½½ï¼', 'å°æ¬çç¨æ·ï¼æ¨å¥½ï¼', { |
| | | // confirmButtonText: 'ç³è¯·', |
| | | // cancelButtonText: 'åæ¶', |
| | | // type: 'warning' |
| | | // }) |
| | | // .then(() => applyBookInfo()) |
| | | // .catch() |
| | | Message.error({ |
| | | context: this, |
| | | offset: ['20rpx', '32rpx'], |
| | | duration: 5000, |
| | | content: 'è¯¥èµæºä¸è½½ç³è¯·å®¡æ ¸ä¸', |
| | | }) |
| | | } else if (this.properties.applyState == 'Reject') { |
| | | Message.error({ |
| | | context: this, |
| | | offset: ['20rpx', '32rpx'], |
| | | duration: 5000, |
| | | content: 'èµæºä¸è½½ç³è¯·æªéè¿' |
| | | }) |
| | | |
| | | } else { |
| | | // Message.error({ |
| | | // context: this, |
| | | // offset: ['20rpx', '32rpx'], |
| | | // duration: 5000, |
| | | // content: '请å
ç³è¯·ä¸è½½' |
| | | // }) |
| | | console.log('请å
ç³è¯·ä¸è½½'); |
| | | } |
| | | // } else { |
| | | // ElMessageBox.confirm('请å
è¿è¡æå¸è®¤è¯ï¼', 'å°æ¬çç¨æ·ï¼æ¨å¥½ï¼', { |
| | | // confirmButtonText: 'å»è®¤è¯', |
| | | // cancelButtonText: 'åæ¶', |
| | | // type: 'warning' |
| | | // }) |
| | | // .then(() => { |
| | | // isShow.value = true |
| | | // }) |
| | | // .catch(() => { }) |
| | | // } |
| | | // } else { |
| | | // logIn() |
| | | // } |
| | | }, |
| | | downloadFile(url) { |
| | | wx.downloadFile({ |
| | | url: url, |
| | | success: function (res) { |
| | | // ä¸è½½æååï¼è°ç¨saveImageToPhotosAlbum彿°ä¿åå¾çå°æ¬å° |
| | | wx.saveFile({ |
| | | tempFilePath: res.tempFilePath, |
| | | success: function (res) { |
| | | wx.showToast({ |
| | | title: 'ä¸è½½æå', |
| | | icon: 'success' |
| | | }) |
| | | }, |
| | | fail: function (res) { |
| | | wx.showToast({ |
| | | title: 'ä¸è½½å¤±è´¥', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | fail: function (res) { |
| | | wx.showToast({ |
| | | title: 'ä¸è½½å¤±è´¥', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // å¤æèµæºæ¯å¦è´ä¹° |
| | | resourceIsBuy(data) { |
| | | if (data.saleMethod && data.saleMethod.length) { |
| | | const isSHow = this.data.buyIdList.some((item) => item == data.saleMethod[0].Id) |
| | | return !isSHow |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | getShoppingCartProductGet() { |
| | | let query = { |
| | | start: 0, |
| | | size: 999, |
| | | filterList: [], |
| | | searchList: [] |
| | | } |
| | | app.MG.store.getShoppingCartProductList(query).then((res) => { |
| | | const list = [] |
| | | res.datas.forEach((item) => { |
| | | list.push(item.saleMethod.id) |
| | | }) |
| | | this.setData({ |
| | | shoppingList: res.datas, |
| | | shoppingCartGetId: list |
| | | }) |
| | | console.log('è´ä¹°', this.data); |
| | | }) |
| | | }, |
| | | // å¤æèµæºå å
¥è´ç©è½¦æé®æ¯å¦æ¾ç¤º |
| | | isShoppingCart(data) { |
| | | if (data.saleMethod && data.saleMethod.length) { |
| | | if (data.saleMethod[0].Price <= 0) return false |
| | | // å夿æ¯å¦è´ä¹° |
| | | const isBuy = this.data.buyIdList.some((item) => item == data.saleMethod[0].Id) |
| | | if (isBuy) { |
| | | // è´ä¹°äº |
| | | return false |
| | | } else { |
| | | // 夿æ¯å¦å å
¥è´ç©è½¦ |
| | | const isSHow = this.data.shoppingCartGetId.some((item) => item == data.saleMethod[0].Id) |
| | | return !isSHow |
| | | } |
| | | } else { |
| | | return false |
| | | } |
| | | } |
| | | }) |
| | |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-tabs": "tdesign-miniprogram/tabs/tabs", |
| | | "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", |
| | | "book-brief": "/pages/bookServices/detail/components/brief/index" |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-message": "tdesign-miniprogram/message/message", |
| | | "book-brief": "/pages/bookServices/detail/components/brief/index", |
| | | "teach-resource": "/pages/bookServices/detail/components/teachResource/index", |
| | | "learn-resource": "/pages/bookServices/detail/components/learnResource/learnResource", |
| | | "tree": "/pages/bookServices/detail/components/tree/index", |
| | | "suggest": "/pages/bookServices/detail/components/suggest/suggest", |
| | | "t-loading": "tdesign-miniprogram/loading/loading" |
| | | }, |
| | | "navigationStyle": "custom" |
| | | } |
| | |
| | | <view class="book-detail"> |
| | | <view class="detail-left"> |
| | | <view class="book-img"> |
| | | <t-image |
| | | src="{{bookDetail.icon}}" |
| | | mode="aspectFill" |
| | | width="120" |
| | | height="170" |
| | | aria-label="{{bookDetail.name}}" |
| | | /> |
| | | <t-image 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 |
| | | src="/static/images/bookService/detail/collect.png" |
| | | wx:if="{{!bookDetail.isFavourite}}" |
| | | ></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/collecting.png" |
| | | wx:if="{{bookDetail.isFavourite}}" |
| | | ></t-image> |
| | | <t-image src="/static/images/bookService/detail/collect.png" wx:if="{{!bookDetail.isFavourite}}"></t-image> |
| | | <t-image src="/static/images/bookService/detail/collecting.png" wx:if="{{bookDetail.isFavourite}}"></t-image> |
| | | </view> |
| | | <view>æ¶è</view> |
| | | <view class="use-title">æ¶è</view> |
| | | </view> |
| | | <view class="suggest"> |
| | | <view class="suggest" bind:tap="suggestBtn"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/suggest.png"></t-image> |
| | | </view> |
| | | <view>æè¦å»ºè®®</view> |
| | | <view class="use-title">æè¦å»ºè®®</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <t-image src="/static/images/bookService/detail/electon-price.png"></t-image> |
| | | </view> |
| | | <view class="price"> |
| | | <view>Â¥{{bookDetail.price}}</view> |
| | | <view class="price-old">Â¥{{bookDetail.oldPrice}} <view class="line"></view> </view> |
| | | <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> |
| | | </view> |
| | | </view> |
| | | <view> </view> |
| | | </view> |
| | |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/paper-price.png"></t-image> |
| | | </view> |
| | | <view class="price">Â¥{{bookDetail.paperPrice}}</view> |
| | | <view class="price">Â¥{{bookDetail.paperPrice == '0.00' ? 'å
è´¹' : bookDetail.paperPrice}}</view> |
| | | </view> |
| | | </view> |
| | | <!-- ç½åº --> |
| | | <view class="book-web"> |
| | | <t-image |
| | | src="/static/images/bookService/detail/jd.png" |
| | | wx:if="{{bookDetail.JDLink}}" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.tmallLink}}" |
| | | data-type="jd" |
| | | ></t-image> |
| | | <t-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 |
| | | 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" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.weidianLink}}" |
| | | wx:if="{{bookDetail.weidianLink}}" |
| | | ></t-image> |
| | | <t-image src="/static/images/bookService/detail/jd.png" wx:if="{{bookDetail.JDLink}}" bind:tap="goShop" data-link="{{bookDetail.tmallLink}}" data-type="jd"></t-image> |
| | | <t-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 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" bind:tap="goShop" data-link="{{bookDetail.weidianLink}}" wx:if="{{bookDetail.weidianLink}}"></t-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="book-resource"> |
| | | <t-tabs |
| | | defaultValue="{{0}}" |
| | | bind:change="onTabsChange" |
| | | bind:click="onTabsClick" |
| | | t-class="custom-tabs" |
| | | t-class-content="custom-panel" |
| | | > |
| | | <t-tab-panel label="å¾ä¹¦ç®ä»" value="0" style="{{tabPanelstyle}}"> |
| | | <book-brief |
| | | content="{{bookDetail.content}}" |
| | | authorIntroduction="{{bookDetail.authorIntroduction}}" |
| | | ></book-brief> |
| | | <t-tabs defaultValue="{{tabValue}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel" class="tab-class"> |
| | | <t-tab-panel label="å¾ä¹¦ç®ä»" value="brief" style="{{tabPanelstyle}}"> |
| | | <book-brief content="{{bookDetail.content}}" authorIntroduction="{{bookDetail.authorIntroduction}}"></book-brief> |
| | | </t-tab-panel> |
| | | <t-tab-panel label="çµå书" value="1" style="{{tabPanelstyle}}">é项äºå
容</t-tab-panel> |
| | | <t-tab-panel label="äºå¦ä¹ " value="2" style="{{tabPanelstyle}}">é项ä¸å
容</t-tab-panel> |
| | | <t-tab-panel label="äºæµè¯" value="3" style="{{tabPanelstyle}}">é项åå
容</t-tab-panel> |
| | | <t-tab-panel label="çµå书" value="1" style="{{tabPanelstyle}}"> |
| | | çµå书 |
| | | </t-tab-panel> |
| | | <t-tab-panel label="æå¦èµæº" value="jsek_teachingResources"> |
| | | <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" bind:applyResource="applyResource"></teach-resource> |
| | | <tree treeList="{{teach}}" tab="{{tabValue}}" applyState="{{applyState}}" bind:downloadTeach="downloadTeach"></tree> |
| | | </t-tab-panel> |
| | | <t-tab-panel label="äºå¦ä¹ " value="jsek_cloudLearning" style="{{tabPanelstyle}}"> |
| | | <learn-resource></learn-resource> |
| | | <tree tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}"></tree> |
| | | </t-tab-panel> |
| | | <t-tab-panel label="äºæµè¯" value="questionBank" style="{{tabPanelstyle}}">é项åå
容</t-tab-panel> |
| | | </t-tabs> |
| | | </view> |
| | | <!-- è´ä¹°æé® --> |
| | |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/ebook.png"></t-image> |
| | | </view> |
| | | <view>çµåæ ·ä¹¦ç³è¯·</view> |
| | | <view class="btn-text">çµåæ ·ä¹¦ç³è¯·</view> |
| | | </view> |
| | | <view class="bottom-btn"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/paper-book.png"></t-image> |
| | | </view> |
| | | <view>çº¸è´¨æ ·ä¹¦ç³è¯·</view> |
| | | <view class="btn-text">çº¸è´¨æ ·ä¹¦ç³è¯·</view> |
| | | </view> |
| | | <view class="shopCar">å å
¥è´ç©è½¦</view> |
| | | <view class="shopCar" bind:tap="addBookShopcCar">å å
¥è´ç©è½¦</view> |
| | | <view class="buy">ç«å³è´ä¹°</view> |
| | | </view> |
| | | </scroll-view> |
| | | <!-- æè¦å»ºè®®å¼¹çª --> |
| | | <suggest class="suggest-component" id="suggest-component"></suggest> |
| | |
| | | } |
| | | |
| | | .message-li { |
| | | font-size: 28rpx; |
| | | color: #333333; |
| | | display: flex; |
| | | height: 40rpx; |
| | |
| | | |
| | | .li-title { |
| | | width: 140rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .li-content { |
| | | width: 280rpx; |
| | | font-size: 28rpx; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .book-use { |
| | | margin-top: 16rpx; |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | font-size: 24rpx; |
| | | color: #949494; |
| | | } |
| | | |
| | | .use-title { |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | .collect, |
| | |
| | | color: #fff; |
| | | } |
| | | |
| | | .price-text { |
| | | font-size: 34rpx; |
| | | } |
| | | |
| | | .price-old { |
| | | margin-left: 10rpx; |
| | | position: relative; |
| | |
| | | |
| | | /* å¾ä¹¦èµæº */ |
| | | .book-resource { |
| | | min-height: 640rpx; |
| | | margin-top: 20rpx; |
| | | background-color: #fff !important; |
| | | } |
| | | |
| | | |
| | | .custom-tabs { |
| | | --td-tab-item-active-color: #FF6C00 |
| | | --td-tab-item-active-color: #FF6C00; |
| | | --td-tab-font-size: 28rpx; |
| | | } |
| | | |
| | | |
| | | /* åºé¨ */ |
| | | .box-bottom { |
| | |
| | | bottom: 40rpx; |
| | | width: 100%; |
| | | height: 110rpx; |
| | | |
| | | } |
| | | |
| | | .box-bottom { |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | flex-direction: column; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .btn-text { |
| | | font-size: 24rpx; |
| | | color: #010101; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .bottom-btn image { |
| | |
| | | .buy { |
| | | background-color: #F14B3B; |
| | | } |
| | | |
| | | .tab-box { |
| | | min-height: 550rpx; |
| | | } |
| | |
| | | stairCode: '', // ä¸çº§åç±»éä¸é¡¹ |
| | | secondCode: '', // äºçº§åç±»éä¸é¡¹ |
| | | sort: '', // æåº |
| | | enable: false, |
| | | loadingProps: { |
| | | size: '50rpx', |
| | | }, |
| | | }, |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | |
| | | this.setData({ |
| | | 'stairList.value': options.stairCode, |
| | | stairCode: options.stairCode, |
| | | secondCode: options.secondCode, |
| | | 'secondList.value': options.secondCode, |
| | | path: `${options.assortCode}\\${options.stairCode}`, |
| | | }); |
| | | } |
| | | // äºçº§åç±»èµå¼ |
| | | if (options.secondCode) { |
| | | this.setData({ |
| | | secondCode: options.secondCode, |
| | | pathList: [{ |
| | | Path: options.secondCode, |
| | | Type: '*', |
| | | StoreRefCode: app.config.goodsStore, |
| | | } |
| | | ], |
| | | }) |
| | | } |
| | | // è·åäºçº§åç±» |
| | | this.getSecondList(`${options.assortCode}\\${options.stairCode}`); |
| | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() {}, |
| | | onReady() { |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() {}, |
| | | onShow() { |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() {}, |
| | | onPullDownRefresh() { |
| | | console.log('䏿'); |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() {}, |
| | | onReachBottom(e) { |
| | | console.log('åºé¨'); |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | |
| | | } |
| | | this.setData({ |
| | | 'secondList.options': options, |
| | | 'secondList.value': this.data.secondCode, |
| | | }); |
| | | const second = [this.data.secondCode] |
| | | this.setData({ |
| | | 'secondList.value': second |
| | | }) |
| | | }); |
| | | }, |
| | | // è·åéç¹é¡¹ç® |
| | |
| | | app.MG.store.getProductList(query).then((res) => { |
| | | this.setData({ |
| | | bookList: res.datas, |
| | | enable: false |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | ? `${this.data.assortCheck.code}\\${e.detail.value}` |
| | | : this.data.assortCheck.code; |
| | | this.setData({ |
| | | pathList: [], |
| | | stairCode: e.detail.value, |
| | | secondCode: '', |
| | | path: path, |
| | |
| | | }, |
| | | // äºçº§åç±»åæ¢ |
| | | onChangeSecond(e) { |
| | | console.log(e); |
| | | const pathList = []; |
| | | for (let index = 0; index < e.detail.value.length; index++) { |
| | | const element = e.detail.value[index]; |
| | |
| | | pathList: pathList, |
| | | 'secondList.value': e.detail.value, |
| | | }); |
| | | |
| | | }, |
| | | // |
| | | onConfirmSecond() { |
| | | this.getBookList(this.data.path); |
| | | }, |
| | | // éç¹é¡¹ç®æ¹å |
| | |
| | | url: `/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, |
| | | }); |
| | | }, |
| | | onRefresh() { |
| | | this.setData({ enable: true }); |
| | | this.getBookList(this.data.path) |
| | | }, |
| | | }); |
| | |
| | | "t-dropdown-item": "tdesign-miniprogram/dropdown-item/dropdown-item", |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-search": "tdesign-miniprogram/search/search" |
| | | "t-search": "tdesign-miniprogram/search/search", |
| | | "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh" |
| | | }, |
| | | "navigationStyle": "custom" |
| | | "navigationStyle": "custom", |
| | | "onReachBottomDistance": 250 |
| | | } |
| | |
| | | <view> |
| | | <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> |
| | | </view> |
| | | <t-search |
| | | model:value="{{searchValue}}" |
| | | shape="round" |
| | | placeholder="请è¾å
¥å
³é®è¯/书å/ISBN/ä½è
" |
| | | class="navBar-search" |
| | | style="width: 464rpx" |
| | | bind:submit="searchBook" |
| | | /> |
| | | <t-search model:value="{{searchValue}}" shape="round" placeholder="请è¾å
¥å
³é®è¯/书å/ISBN/ä½è
" class="navBar-search" style="width: 464rpx" bind:submit="searchBook" /> |
| | | </view> |
| | | |
| | | <view class="bookServices-list"> |
| | |
| | | <scroll-view scroll-x="{{true}}" class="header-scroll"> |
| | | <t-dropdown-menu> |
| | | <t-dropdown-item options="{{stairList.options}}" value="{{stairList.value}}" bindchange="onChangeStair" /> |
| | | <t-dropdown-item |
| | | label="äºçº§" |
| | | options="{{secondList.options}}" |
| | | optionsColumns="2" |
| | | multiple |
| | | defaultValue="{{secondList.value}}" |
| | | bind:confirm="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-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> |
| | | </view> |
| | | </view> |
| | | <t-pull-down-refresh value="{{enable}}" loadingProps="{{loadingProps}}" loadingTexts="{{['䏿巿°', 'æ¾æå·æ°', 'æ£å¨å·æ°', 'å·æ°å®æ']}}" bind:refresh="onRefresh"> |
| | | <scroll-view scroll-y="{{true}}" class="list-container"> |
| | | <view class="assort-title"> |
| | | <view class="title-box"></view> |
| | |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </t-pull-down-refresh> |
| | | </view> |