35个文件已修改
3个文件已删除
63个文件已添加
1 文件已重命名
New file |
| | |
| | | { |
| | | "overrides": [ |
| | | { |
| | | "files": "*.wxml", |
| | | "options": { |
| | | "parser": "html" |
| | | } |
| | | }, |
| | | { |
| | | "files": "*.wxss", |
| | | "options": { |
| | | "parser": "css" |
| | | } |
| | | }, |
| | | { |
| | | "files": "*.wxs", |
| | | "options": { |
| | | "parser": "babel" |
| | | } |
| | | } |
| | | ] |
| | | } |
| | |
| | | }, |
| | | "editor.tabSize": 2, |
| | | "[wxml]": { |
| | | "editor.defaultFormatter": "wechat.miniprogram.wxml-language-features" |
| | | "editor.defaultFormatter": "esbenp.prettier-vscode" |
| | | }, |
| | | "[css]": { |
| | | "editor.defaultFormatter": "HookyQR.beautify" |
| | |
| | | { |
| | | "pages": [ |
| | | <<<<<<< HEAD |
| | | "pages/home/home", |
| | | "pages/resourceDetails/index", |
| | | ======= |
| | | "pages/resourceDetails/myAudio/index", |
| | | "pages/resourceDetails/myVideo/index", |
| | | "pages/resourceDetails/document/index", |
| | | >>>>>>> master |
| | | "pages/retrievalPage/index", |
| | | "pages/cart/paymentPage/index", |
| | | "pages/cart/index", |
| | |
| | | "pages/personalCenter/sampleBooks/index", |
| | | "pages/personalCenter/downloads/index", |
| | | "pages/personalCenter/activateProduct/index", |
| | | "pages/testLogin/index" |
| | | "pages/testLogin/index", |
| | | "pages/bookServices/examination/examination" |
| | | ], |
| | | "tabBar": { |
| | | "custom": true, |
| | |
| | | bookCreator: '', |
| | | bookContent: '', |
| | | bookImage: '', |
| | | bookExhibitionList: [] |
| | | bookExhibitionList: [], |
| | | navBarHeight: '', |
| | | barHeight: '', |
| | | bookName: '' |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // è¶åä¿¡æ¯ |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // å¯¼èªæ é«åº¦ |
| | | this.setData({ |
| | | navBarHeight: navBarHeight, |
| | | barHeight: systInfo.statusBarHeight, |
| | | }) |
| | | console.log(); |
| | | |
| | | |
| | | this.setData({ |
| | | bookName: options.bookName |
| | | }) |
| | | |
| | | const passId = options.id |
| | | |
| | |
| | | // wx.navigateTo({ |
| | | // url: '/pages/bookExhibitionDetails/index?id?name=' + item.id + item.name // å设跳转å°è¯¦æ
页é¢ï¼å¹¶ä¼ éäºidåæ° |
| | | // }); |
| | | } |
| | | }, |
| | | goBack() { |
| | | wx.navigateBack(); |
| | | }, |
| | | |
| | | }) |
| | |
| | | { |
| | | "usingComponents": {} |
| | | "usingComponents": { |
| | | "t-icon": "tdesign-miniprogram/icon/icon" |
| | | }, |
| | | "navigationStyle": "custom" |
| | | } |
| | |
| | | <!--pages/bookExhibitionDetails/index.wxml--> |
| | | |
| | | <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | | <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> |
| | | </view> |
| | | <view class="navbar-title">{{bookName}}</view> |
| | | </view> |
| | | |
| | | <view class="headBox"> |
| | | <text class="titleBox">{{bookName}}</text> |
| | |
| | | /* pages/bookExhibitionDetails/index.wxss */ |
| | | .headBox {} |
| | | |
| | | .nacigationBar { |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | } |
| | | |
| | | .navbar-title { |
| | | white-space: nowrap; |
| | | /* overflow: hidden; */ |
| | | text-overflow: ellipsis; |
| | | color: #0F1214; |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | margin-bottom: 5rpx; |
| | | } |
| | | |
| | | .titleBox { |
| | | font-weight: 800; |
| | | font-size: 45rpx; |
| | |
| | | value: [], |
| | | options: [], |
| | | }, |
| | | navBarHeight: '', |
| | | barHeight: '' |
| | | |
| | | }, |
| | | |
| | | |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | // console.log(this.data.filteredItems, 88888); |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // è¶åä¿¡æ¯ |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // å¯¼èªæ é«åº¦ |
| | | this.setData({ |
| | | navBarHeight: navBarHeight, |
| | | barHeight: systInfo.statusBarHeight, |
| | | }) |
| | | |
| | | // ååéæ©å¨é项 |
| | | const singleSelectOptions = this.data.filteredItems.map(item => ({ |
| | | label: item.name, |
| | | value: item.value, |
| | | disabled: false, |
| | | })) |
| | | |
| | | if (this.data.filteredItems = []) { |
| | | console.log(11111); |
| | | singleSelectOptions.push({ |
| | | label: 'ç¦ç¨é项', |
| | | value: 'disabled', |
| | | disabled: true, |
| | | }); |
| | | } |
| | | |
| | | // singleSelectOptions.push({ |
| | | // label: 'ç¦ç¨é项', |
| | | // value: 'disabled', |
| | | // disabled: true, |
| | | // }); |
| | | |
| | | |
| | | // æ´æ°æ°æ® |
| | | this.setData({ |
| | | 'multipleSelect.options': singleSelectOptions, |
| | | }); |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | |
| | | this.setData({ |
| | | bookExhibitionList: list |
| | | }) |
| | | |
| | | //åæ¶ |
| | | wx.hideLoading() |
| | | // console.log(this.data.bookExhibitionList, 'æ°æ®'); |
| | |
| | | }, |
| | | |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | // console.log(this.data.filteredItems, 88888); |
| | | |
| | | // ååéæ©å¨é项 |
| | | const singleSelectOptions = this.data.filteredItems.map(item => ({ |
| | | label: item.name, |
| | | value: item.value, |
| | | disabled: false, |
| | | })) |
| | | |
| | | if (this.data.filteredItems = []) { |
| | | console.log(11111); |
| | | singleSelectOptions.push({ |
| | | label: 'ç¦ç¨é项', |
| | | value: 'disabled', |
| | | disabled: true, |
| | | }); |
| | | } |
| | | |
| | | // singleSelectOptions.push({ |
| | | // label: 'ç¦ç¨é项', |
| | | // value: 'disabled', |
| | | // disabled: true, |
| | | // }); |
| | | |
| | | |
| | | // æ´æ°æ°æ® |
| | | this.setData({ |
| | | 'multipleSelect.options': singleSelectOptions, |
| | | }); |
| | | |
| | | }, |
| | | |
| | | |
| | | // æ»åç±» |
| | |
| | | const item = event.currentTarget.dataset.item; |
| | | console.log(item); |
| | | wx.navigateTo({ |
| | | url: '/pages/bookExhibitionDetails/index?id=' + item.id // å设跳转å°è¯¦æ
页é¢ï¼å¹¶ä¼ éäºidåæ° |
| | | url: '/pages/bookExhibitionDetails/index?id=' + item.id + '&bookName=' + item.name // å设跳转å°è¯¦æ
页é¢ï¼å¹¶ä¼ éäºidåæ° |
| | | }); |
| | | }, |
| | | // æç´¢æ¡ |
| | |
| | | }) |
| | | console.log(this.data.keyword, 'keyword'); |
| | | this.bookExhibitionGet() |
| | | } |
| | | }, |
| | | goBack() { |
| | | wx.navigateBack(); |
| | | }, |
| | | }) |
| | |
| | | "t-toast": "tdesign-miniprogram/toast/toast", |
| | | "t-icon": "tdesign-miniprogram/icon/icon" |
| | | }, |
| | | "onReachBottomDistance": 200 |
| | | "onReachBottomDistance": 200, |
| | | "navigationStyle": "custom" |
| | | } |
| | |
| | | <!-- å¼¹åºæ¡ ç¦æ¢ --> |
| | | <t-toast id="t-toast" /> |
| | | |
| | | |
| | | <view class="example-search"> |
| | | <t-search model:value="{{value}}" placeholder="请è¾å
¥å
³é®è¯/书ç®/ISBN/ä½è
" bind:submit="onSearchSubmit" /> |
| | | <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | | <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> |
| | | </view> |
| | | <view class="example-search"> |
| | | <t-search model:value="{{value}}" placeholder="请è¾å
¥ä¹¦å±åç§°" bind:submit="onSearchSubmit" /> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <view class="menuBox"> |
| | |
| | | <view class="outside"> |
| | | |
| | | <view class="contentBox" wx:for="{{bookExhibitionList}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}"> |
| | | <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="" /> |
| | | <image wx:if="{{item.icon}}" src="{{item.icon}}" mode="aspectFit" /> |
| | | <image wx:else="" src="/static/images/bookExhibitionList/banner.png" mode="" /> |
| | | <view class="textBox" title="{{item.name}}"> <text>{{item.name}}</text></view> |
| | | </view> |
| | |
| | | /* pages/bookExhibitionList/index.wxss */ |
| | | |
| | | .nacigationBar { |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | } |
| | | |
| | | .navbar-title { |
| | | white-space: nowrap; |
| | | /* overflow: hidden; */ |
| | | text-overflow: ellipsis; |
| | | color: #0F1214; |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | margin-bottom: 5rpx; |
| | | } |
| | | |
| | | |
| | | .outside { |
| | |
| | | |
| | | |
| | | .textBox { |
| | | font-family: PingFang SC, PingFang SC; |
| | | width: 280rpx; |
| | | /* height: 75rpx; */ |
| | | font-size: 25rpx; |
| | |
| | | // pages/bookServices/assort/index.js |
| | | import { getPublicImage } from '../../../assets/js/middleGround/tool' |
| | | const app = getApp(); |
| | | Page({ |
| | | /** |
| | |
| | | sort: { type: 'Asc', field: 'LinkOrder' }, |
| | | }; |
| | | app.MG.store.getStoreChannelList(query).then((res) => { |
| | | |
| | | const list = res.datas.filter((item) => item.refCode != 'jsek_homepageBookService'); |
| | | |
| | | this.setData({ |
| | | assortList: list, |
| | | }); |
| | |
| | | sort: { type: 'Asc', field: 'LinkOrder' }, |
| | | }; |
| | | app.MG.store.getStoreChannelList(query).then(async (res) => { |
| | | |
| | | console.log(res, 'res'); |
| | | // ä¸çº§åç±»éä¸ |
| | | this.setData({ |
| | | startCheck: res.datas[0].refCode, |
| | | }); |
| | | // this.setData({ |
| | | // startCheck: res.datas[0].refCode, |
| | | // }); |
| | | // è·åäºçº§åç±» |
| | | for (let index = 0; index < res.datas.length; index++) { |
| | | const item = res.datas[index]; |
| | | item.icon ? item.icon = getPublicImage(item.icon, 58, 72) : item.icon = item.icon |
| | | item.children = await this.getSecondList(item); |
| | | } |
| | | // ä¸çº§åç±»èµå¼ |
| | |
| | | sort: { type: 'Asc', field: 'LinkOrder' }, |
| | | }; |
| | | await app.MG.store.getStoreChannelList(query).then((res) => { |
| | | for (let index = 0; index < res.datas.length; index++) { |
| | | const element = res.datas[index]; |
| | | if (element.icon) |
| | | element.icon = getPublicImage(element.icon, 58, 72) |
| | | |
| | | } |
| | | datas = res.datas; |
| | | }); |
| | | return datas; |
| | | }, |
| | | tabClick(tabData) { |
| | | const data = tabData.currentTarget.dataset.tabdata; |
| | | tabClick(e) { |
| | | const data = e.currentTarget.dataset.tabdata; |
| | | this.setData({ |
| | | startCheck: data.refCode, |
| | | }); |
| | | console.log(data); |
| | | }, |
| | | // 跳转å表页 |
| | | goPageList(item) { |
| | | const secondCode = `${item.currentTarget.dataset.staircode.pathLinks[0].linkPath}\\${item.currentTarget.dataset.staircode.id}`; |
| | | wx.navigateTo({ |
| | | url: `/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&secondCode=${secondCode}`, |
| | | }); |
| | | goPageList(e) { |
| | | const tab = e.currentTarget.dataset.tabdata |
| | | const stair = e.currentTarget.dataset.stair |
| | | this.setData({ |
| | | startCheck: tab.refCode |
| | | }) |
| | | if (stair) { |
| | | const secondCode = `${stair.pathLinks[0].linkPath}\\${stair.id}`; |
| | | wx.navigateTo({ |
| | | url: `/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}&stairCode=${this.data.startCheck}&secondCode=${secondCode}`, |
| | | }); |
| | | } else { |
| | | wx.navigateTo({ |
| | | url: `/pages/bookServices/list/index?assorName=${this.data.assortCheck.name}&assortCode=${this.data.assortCheck.code}`, |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | navToSearchPage(e) { |
| | | console.log(e.detail.value); |
| | |
| | | <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" |
| | | > |
| | | <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="请è¾å
¥å
³é®è¯/书å/ISBN/ä½è
" leftIcon="" bind:submit="navToSearchPage" placeholder-class="placeholder" placeholder-style="font-size:28rpx;"> |
| | | <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" /> |
| | | </t-search> |
| | | </view> |
| | |
| | | <view class="side-bar-wrapper"> |
| | | <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="side-bar-content"> |
| | | <!-- ä¸çº§åç±» --> |
| | | <view class="tab-top"> |
| | | <scroll-view scroll-x="{{true}}" class="myScroll"> |
| | | <view |
| | | wx:for="{{startList}}" |
| | | wx:key="id" |
| | | class="row {{startCheck == item.refCode ? 'tab-active' : ''}}" |
| | | bind:tap="tabClick" |
| | | data-tabData="{{item}}" |
| | | wx:if="{{item.children.length}}" |
| | | >{{item.name}}</view |
| | | > |
| | | <view wx:for="{{startList}}" wx:key="id" class="row {{startCheck == item.refCode ? 'tab-active' : ''}}" bind:tap="tabClick" data-tabData="{{item}}">{{item.name}}</view> |
| | | </scroll-view> |
| | | </view> |
| | | <!-- å
容 --> |
| | |
| | | <view wx:if="{{listLoading}}"> |
| | | <t-loading theme="spinner" size="400rpx" loading="{{listLoading}}"></t-loading> |
| | | </view> |
| | | <view |
| | | wx:for="{{startList}}" |
| | | wx:for-item="item" |
| | | wx:key="item.refCode" |
| | | id="{{item.refCode}}" |
| | | class="class-box" |
| | | wx:if="{{item.children.length && !listLoading}}" |
| | | > |
| | | <view wx:for="{{startList}}" wx:for-item="item" wx:key="item.refCode" id="{{item.refCode}}" 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-stairCode="{{citem}}" |
| | | > |
| | | <t-image src="/static/images/bookService/assort/book-img.png" mode="heightFix" width="58" height="72" /> |
| | | <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}}"> |
| | | <image src="{{citem.icon ? citem.icon : '/static/images/bookService/assort/book-img.png'}}" mode="heightFix" /> |
| | | <view class="classify">{{citem.name}}</view> |
| | | </view> |
| | | <view wx:if="{{!item.children.length}}" class="book-box" bind:tap="goPageList" data-tabData="{{item}}"> |
| | | <image src="{{item.icon ? item.icon : '/static/images/bookService/assort/book-img.png'}}" mode="heightFix"></image> |
| | | <text class="classify">å
¨é¨</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | left: 0; |
| | | width: 100%; |
| | | z-index: 99; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .placeholder { |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .page-header .t-search__input-container { |
| | |
| | | |
| | | .book-box { |
| | | width: 140rpx; |
| | | margin-right: 10rpx; |
| | | margin: 0 10rpx 20rpx 0 |
| | | } |
| | | |
| | | .book-box:nth-child(3n) { |
| | |
| | | } |
| | | |
| | | .book-box image { |
| | | width: 58px; |
| | | height: 70px; |
| | | height: 142rpx; |
| | | object-fit: contain; |
| | | } |
| | | |
| | | .classify { |
| | |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | receive: false, |
| | | buy: false, |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | |
| | | getFreeResource() { |
| | | var myEventDetail = {} // detailå¯¹è±¡ï¼æä¾ç»äºä»¶çå¬å½æ° |
| | | var myEventOption = { |
| | | bubbles: true, |
| | | composed: true |
| | | } // 触åäºä»¶çé项 |
| | | this.triggerEvent('getFreeResource', myEventDetail, myEventOption) |
| | | }, |
| | | allAddShoppiingCar() { |
| | | var myEventDetail = {} // detailå¯¹è±¡ï¼æä¾ç»äºä»¶çå¬å½æ° |
| | | var myEventOption = { |
| | | bubbles: true, |
| | | composed: true |
| | | } // 触åäºä»¶çé项 |
| | | this.triggerEvent('allAddShoppiingCar', myEventDetail, myEventOption) |
| | | }, |
| | | changeReceive(type) { |
| | | this.setData({ |
| | | receive: type |
| | | }) |
| | | }, |
| | | changeBuy(type) { |
| | | this.setData({ |
| | | buy: type |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | |
| | | <!--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-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> |
| | | <text>é¢åæ¥ç</text> |
| | | </t-button> |
| | | <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;"> |
| | | <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> |
| | | <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx;"> |
| | | <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> |
| | |
| | | } |
| | | |
| | | .btn { |
| | | width: 232rpx; |
| | | width: 300rpx; |
| | | font-size: 28rpx; |
| | | --td-button-primary-bg-color: #fff; |
| | | --td-button-primary-border-color: #FF6C00; |
| | | --td-button-primary-color: #ff6c00; |
| | | --td-button-primary-active-bg-color: #fff0e6; |
| | | --td-button-primary-active-border-color: #ff6c00; |
| | | padding: 0; |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | .btn image { |
| | | width: 28rpx; |
| | | height: 32rpx; |
| | | margin: 25rpx 10rpx 0 0; |
| | | } |
New file |
| | |
| | | // pages/bookServices/detail/components/note/note.js |
| | | const app = getApp() |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | bookInfo: { |
| | | type: Object, |
| | | value: {} |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding:16rpx', |
| | | placeholderstyle: 'font-size:28rpx', |
| | | flag: false, // è¾å
¥æ¡æ¯å¦æ¾ç¤º |
| | | submitType: "new", // æ°å»º or ç¼è¾ |
| | | showNoteDialog: false, |
| | | textvalue: '', |
| | | noteId: '', |
| | | showInput: false, |
| | | submitTitle: "", |
| | | pageCount: { |
| | | page: 1, |
| | | total: 0, |
| | | }, |
| | | isMore: null, |
| | | noteList: [], |
| | | activeValues: 0, |
| | | loading: false, |
| | | }, |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | onReachBottom() { |
| | | const flag = this.data.noteList.length < this.data.pageCount.total |
| | | if (flag) { |
| | | this.setData({ |
| | | isMore: true, |
| | | "pageCount.page": this.data.pageCount.page + 1 |
| | | }) |
| | | this.getNoteList() |
| | | } else { |
| | | this.setData({ |
| | | isMore: true |
| | | }) |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | isMore: false |
| | | }) |
| | | }, 100) |
| | | } |
| | | }, |
| | | handleSubmitTitle() { |
| | | this.setData({ |
| | | submitTitle: this.properties.bookInfo.name |
| | | }) |
| | | }, |
| | | openDialog() { |
| | | this.setData({ |
| | | submitTitle: this.properties.bookInfo.name, |
| | | showNoteDialog: true |
| | | }) |
| | | }, |
| | | closeDialog() { |
| | | this.setData({ |
| | | flag: false, |
| | | showNoteDialog: false, |
| | | submitTitle: '', |
| | | textvalue: "", |
| | | }) |
| | | }, |
| | | textareaChange(e) { |
| | | this.setData({ |
| | | textvalue: e.detail.value |
| | | }) |
| | | }, |
| | | textareaBlur() { |
| | | console.log('失å»ç¦ç¹'); |
| | | }, |
| | | // æ é¢è¾å
¥æ¡å¼ |
| | | inputChange(e) { |
| | | this.setData({ |
| | | submitTitle: e.detail.value |
| | | }) |
| | | }, |
| | | // å¼¹çªç¡®å®æé® |
| | | confirmSuggest() { |
| | | if (!this.data.submitTitle) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请填åç¬è®°æ é¢', |
| | | }) |
| | | } else if (!this.data.textvalue) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请填åç¬è®°å
容', |
| | | }) |
| | | } |
| | | if (this.data.submitType == 'new') { |
| | | this.makeNote() |
| | | } else if (this.data.submitType == 'edit') { |
| | | this.updateNote() |
| | | } |
| | | this.setData({ |
| | | showNoteDialog: false |
| | | }) |
| | | }, |
| | | handleChange(e) { |
| | | this.setData({ |
| | | activeValues: e.detail.value |
| | | }) |
| | | }, |
| | | // æ ¼å¼åç¬è®°æ¶é´ |
| | | convertTimestamp(timestamp) { |
| | | const isoDate = new Date(timestamp) |
| | | const year = isoDate.getFullYear() |
| | | const month = String(isoDate.getMonth() + 1).padStart(2, '0') |
| | | const day = String(isoDate.getDate()).padStart(2, '0') |
| | | const hours = String(isoDate.getHours()).padStart(2, '0') |
| | | const minutes = String(isoDate.getMinutes()).padStart(2, '0') |
| | | const seconds = String(isoDate.getSeconds()).padStart(2, '0') |
| | | const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}` |
| | | return formattedDate |
| | | }, |
| | | changeLoading() { |
| | | this.setData({ |
| | | loading:true |
| | | }) |
| | | }, |
| | | // è·åç¬è®°å表 |
| | | async getNoteList() { |
| | | // this.setData({ |
| | | // loading: true |
| | | // }) |
| | | let topicId |
| | | await app.MG.ugc |
| | | .getProductUserSubmitTopic({ |
| | | productId: this.properties.bookInfo.id, |
| | | appRefCode: app.config.appRefCode |
| | | }) |
| | | .then((res) => { |
| | | if (res) { |
| | | topicId = res.id |
| | | } else { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: 'æ¥è¯¢å¤±è´¥', |
| | | }) |
| | | } |
| | | }) |
| | | // loadings.value.bookResource = true |
| | | let query = { |
| | | start: 0, |
| | | size: this.data.pageCount.page * 5, |
| | | messageType: 'note', |
| | | sort: { |
| | | type: 'Desc', |
| | | field: 'CreateDate' |
| | | }, |
| | | appRefCode: app.config.appRefCode, |
| | | topicIdOrRefCode: topicId + '' |
| | | } |
| | | await app.MG.ugc.getTopicMessageList(query).then((res) => { |
| | | // notePage.value.total = res.totalSize |
| | | res.datas.forEach((item) => { |
| | | item.compliceHover = false |
| | | item.deleteHover = false |
| | | item.createDate = this.convertTimestamp(item.createDate) |
| | | }) |
| | | this.setData({ |
| | | "pageCount.total": res.totalSize, |
| | | noteList: res.datas, |
| | | loading: false |
| | | }) |
| | | console.log('ç¬è®°å表', res.datas); |
| | | }) |
| | | }, |
| | | // æ°å»ºç¬è®°æ¥å£ |
| | | async makeNote() { |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | | desc: 'ç¨æ·ç»å½', |
| | | success: (res) => { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | } |
| | | let topicId |
| | | await app.MG.ugc |
| | | .getProductUserSubmitTopic({ |
| | | productId: this.properties.bookInfo.id, |
| | | appRefCode: app.config.appRefCode |
| | | }) |
| | | .then((res) => { |
| | | if (res) { |
| | | topicId = res.id |
| | | } else { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: 'æ°å»ºå¤±è´¥', |
| | | }) |
| | | } |
| | | }) |
| | | let query = { |
| | | topicIdOrRefCode: topicId + '', |
| | | name: this.data.submitTitle, |
| | | content: this.data.textvalue, |
| | | type: 'note', |
| | | cmsTypeRefCode: '', |
| | | newDataListRequest: [] |
| | | } |
| | | await app.MG.ugc.newTopicMessage(query).then((res) => { |
| | | wx.showToast({ |
| | | title: 'æ°å»ºæå', |
| | | }) |
| | | this.closeDialog() |
| | | this.getNoteList() |
| | | }) |
| | | }, |
| | | // å é¤ç¬è®° |
| | | deleteNote(e) { |
| | | const id = e.currentTarget.dataset.id |
| | | const messageIds = [] |
| | | messageIds.push(id) |
| | | wx.showModal({ |
| | | title: 'æç¤º', |
| | | content: '确认å é¤è¯¥ç¬è®°åï¼',//editableå¦æä¸ºtrueï¼è¿å°±æ¯è¾å
¥æ¡çå
容 |
| | | editable: false,//æ¯å¦æ¾ç¤ºè¾å
¥æ¡ |
| | | placeholderText: '请è¾å
¥å
容å§',//è¾å
¥æ¡çé»è®¤å
容 |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | app.MG.ugc |
| | | .delTopicMessage({ messageIds }) |
| | | .then((res) => { |
| | | wx.showToast({ |
| | | title: 'å 餿å', |
| | | }) |
| | | // if ((notePage.value.total % 3) - 1 == 0) { |
| | | // notePage.value.page -= 1 |
| | | // } |
| | | this.getNoteList() |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('ç¨æ·ç¹å»åæ¶') |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æ 颿¹å |
| | | changeTitle(e) { |
| | | this.setData({ |
| | | flag: e.currentTarget.dataset.value |
| | | }) |
| | | }, |
| | | // ç¼è¾æé® |
| | | editNote(e) { |
| | | const note = e.currentTarget.dataset.note |
| | | this.setData({ |
| | | submitType: "edit", |
| | | textvalue: note.content, |
| | | submitTitle: note.name, |
| | | noteId: note.id |
| | | }) |
| | | this.openDialog() |
| | | }, |
| | | // ç¼è¾ç¬è®°æ¥å£ |
| | | updateNote() { |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | | desc: 'ç¨æ·ç»å½', |
| | | success: (res) => { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | } |
| | | if (!this.data.submitTitle) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请填åç¬è®°æ é¢', |
| | | }) |
| | | } else if (!this.data.textvalue) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请填åç¬è®°å
容', |
| | | }) |
| | | } |
| | | let query = { |
| | | id: this.data.noteId, |
| | | name: this.data.submitTitle, |
| | | description: 'string', |
| | | icon: 'string', |
| | | type: 'note', |
| | | content: this.data.textvalue, |
| | | newDataRequests: [], |
| | | updateDataRequests: [] |
| | | } |
| | | app.MG.ugc.updateTopicMessage(query).then((res) => { |
| | | wx.showToast({ |
| | | title: 'ç¼è¾æå', |
| | | }) |
| | | this.closeDialog() |
| | | this.getNoteList() |
| | | }) |
| | | this.setData({ |
| | | submitType: "new" |
| | | }) |
| | | } |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-collapse": "tdesign-miniprogram/collapse/collapse", |
| | | "t-collapse-panel": "tdesign-miniprogram/collapse-panel/collapse-panel", |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog", |
| | | "t-textarea": "tdesign-miniprogram/textarea/textarea", |
| | | "t-input": "tdesign-miniprogram/input/input", |
| | | "t-loading": "tdesign-miniprogram/loading/loading", |
| | | "t-popup": "tdesign-miniprogram/popup/popup", |
| | | "t-icon": "tdesign-miniprogram/icon/icon" |
| | | } |
| | | } |
New file |
| | |
| | | <!--pages/bookServices/detail/components/note/note.wxml--> |
| | | <view class="note" wx:if="{{!loading && noteList.length}}"> |
| | | <view class="note-btn"> |
| | | <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> |
| | | è®°ç¬è®° |
| | | </view> |
| | | </t-button> |
| | | </view> |
| | | <view class="note-content"> |
| | | |
| | | <t-collapse value="{{activeValues}}" bind:change="handleChange"> |
| | | <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> |
| | | <view class="header-name">{{item.name}}</view> |
| | | </view> |
| | | <view> |
| | | <view class="note-content">{{item.content}}</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> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </t-collapse-panel> |
| | | </t-collapse> |
| | | |
| | | </view> |
| | | <view class="bottom-box"> |
| | | <t-loading wx:if="{{isMore == true}}"></t-loading> |
| | | <text wx:if="{{isMore == false}}">æ²¡ææ´å¤äº</text> |
| | | </view> |
| | | </view> |
| | | <view class="loading-box" wx:if="{{loading}}"> |
| | | <t-loading loading="{{loading}}" size="60rpx"></t-loading> |
| | | </view> |
| | | |
| | | |
| | | <!-- è®°ç¬è®°å¼¹çª --> |
| | | <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> |
| | | </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> |
| | | </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}}" /> |
| | | </view> |
| | | <view class="submit-btn"> |
| | | <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-popup> |
New file |
| | |
| | | /* pages/bookServices/detail/components/note/note.wxss */ |
| | | |
| | | .popup { |
| | | padding: 40rpx; |
| | | width: 600rpx; |
| | | } |
| | | |
| | | .note-btn { |
| | | height: 140rpx; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | border-bottom: 1px solid #EFF0F1; |
| | | --td-button-primary-bg-color: #fff; |
| | | --td-button-primary-border-color: #ff6c00; |
| | | --td-button-primary-color: #ff6c00; |
| | | --td-button-primary-active-bg-color: #fff0e6; |
| | | } |
| | | |
| | | .note-btn image { |
| | | width: 28rpx; |
| | | height: 32rpx; |
| | | margin-top: 24rpx; |
| | | } |
| | | |
| | | |
| | | |
| | | .note-title { |
| | | width: 90%; |
| | | height: 84rpx; |
| | | line-height: 84rpx; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .make-note { |
| | | margin: 0; |
| | | margin-right: 40rpx; |
| | | } |
| | | |
| | | .title-text { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .edit-icon { |
| | | margin-left: 10rpx; |
| | | width: 30rpx; |
| | | height: 30rpx; |
| | | } |
| | | |
| | | .header { |
| | | display: flex; |
| | | } |
| | | |
| | | .note-icon { |
| | | width: 44rpx; |
| | | height: 48rpx; |
| | | margin-right: 20rpx; |
| | | } |
| | | |
| | | .collapse-header { |
| | | display: flex; |
| | | } |
| | | |
| | | .collapse-header .header-name { |
| | | font-size: 32rpx; |
| | | width: 500rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .note-content { |
| | | height: min-content; |
| | | font-size: 28rpx; |
| | | color: #949494; |
| | | margin-bottom: 20rpx; |
| | | max-height: 600rpx; |
| | | text-align: justify; |
| | | /* padding-bottom: 200rpx; */ |
| | | } |
| | | |
| | | .wrapper { |
| | | height: 100%; |
| | | } |
| | | |
| | | .note-bottom { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .bottom-btn { |
| | | height: 40rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .note-time { |
| | | color: #D9D9D9; |
| | | } |
| | | |
| | | .complice, |
| | | .delete { |
| | | width: 30rpx; |
| | | height: 30rpx; |
| | | } |
| | | |
| | | .delete { |
| | | margin-left: 40rpx; |
| | | } |
| | | |
| | | .loading-box { |
| | | width: 100%; |
| | | min-height: 550rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .content { |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .close-btn { |
| | | position: absolute; |
| | | left: 50%; |
| | | margin-left: -32rpx; |
| | | bottom: calc(-1 * (48rpx + 64rpx)); |
| | | } |
| | | |
| | | .submit-btn { |
| | | padding: 40rpx; |
| | | --td-button-border-radius: 60rpx; |
| | | --td-button-primary-bg-color: #ff6c00; |
| | | --td-button-primary-border-color: #ff6c00; |
| | | --td-button-primary-active-bg-color: #ff984d; |
| | | --td-button-primary-active-border-color: #ff984d; |
| | | } |
| | | |
| | | .bottom-box { |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | |
| | | // pages/bookServices/detail/components/suggest/suggest.js |
| | | const app = getApp() |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | |
| | | bookIcon: { |
| | | type: String, |
| | | value: '' |
| | | }, |
| | | bookName: { |
| | | type: String, |
| | | value: '' |
| | | } |
| | | }, |
| | | |
| | | data: { |
| | | inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding:16rpx', |
| | | placeholderstyle: 'font-size:28rpx', |
| | | dialogKey: '', |
| | | showWithInput: false, |
| | | showTextAndTitleWithInput: false, |
| | | inputvalue: '', |
| | | textvalue: '', |
| | | ratevalue: 0, |
| | | textError: false, |
| | | }, |
| | | methods: { |
| | | showDialog(e) { |
| | |
| | | |
| | | closeDialog() { |
| | | this.setData({ |
| | | showWithInput: false |
| | | showWithInput: false, |
| | | ratevalue: 0, |
| | | inputvalue: '', |
| | | textvalue: '' |
| | | }) |
| | | }, |
| | | // è¯åæ¹å |
| | | onChangeRate(e) { |
| | | const { value } = e.detail; |
| | | console.log(e.detail); |
| | | this.setData({ |
| | | ratevalue: value |
| | | ratevalue: e.detail.value |
| | | }); |
| | | }, |
| | | // è¾å
¥æ¡æ¹å |
| | | inputChange(e) { |
| | | this.setData({ |
| | | inputvalue: e.detail.value |
| | | }) |
| | | }, |
| | | // ææ¬æ¡æ¹å |
| | | textareaChange(e) { |
| | | this.setData({ |
| | | textvalue: e.detail.value |
| | | }) |
| | | }, |
| | | feedBack() { |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | | desc: 'ç¨æ·ç»å½', |
| | | success: (res) => { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | } |
| | | this.closeDialog() |
| | | let content = { |
| | | source: this.data.ratevalue, |
| | | phone: this.data.inputvalue, |
| | | content: this.data.textvalue, |
| | | icon: this.properties.bookIcon |
| | | } |
| | | let query = { |
| | | topicIdOrRefCode: 'bookOpinion', |
| | | name: this.properties.bookName, |
| | | content: JSON.stringify(content), |
| | | type: 'ProductComment', |
| | | cmsTypeRefCode: '', |
| | | newDataListRequest: [] |
| | | } |
| | | |
| | | app.MG.ugc.newTopicMessage(query).then((res) => { |
| | | wx.showToast({ |
| | | title: 'æäº¤æå', |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | }) |
| | | }, |
| | | // ç¡®å® |
| | | 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({ |
| | | icon: "error", |
| | | title: 'è¯·éæ©è¯å', |
| | | }) |
| | | } else if (!this.data.inputvalue) { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: '请填åèç³»æ¹å¼', |
| | | }) |
| | | } else if (!isPhoneNumber) { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: '请è¾å
¥æ£ç¡®èç³»æ¹å¼', |
| | | }) |
| | | } else if (!this.data.textvalue) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请è¾å
¥åé¦åé¦å
容', |
| | | }) |
| | | } |
| | | this.feedBack() |
| | | } |
| | | }, |
| | | }) |
| | |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog", |
| | | "t-input": "tdesign-miniprogram/input/input", |
| | | "t-textarea": "tdesign-miniprogram/textarea/textarea", |
| | | "t-rate": "tdesign-miniprogram/rate/rate" |
| | | "t-rate": "tdesign-miniprogram/rate/rate", |
| | | "t-popup": "tdesign-miniprogram/popup/popup", |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-image": "tdesign-miniprogram/image/image" |
| | | } |
| | | } |
| | |
| | | <t-dialog visible="{{showWithInput}}" title="æè¦å»ºè®®" confirm-btn="ç¡®å®" cancel-btn="åæ¶" bind:confirm="closeDialog" bind:cancel="closeDialog" class="suggest-dialog"> |
| | | <!-- <t-dialog visible="{{showWithInput}}" title="æè¦å»ºè®®" confirm-btn="ç¡®å®" cancel-btn="åæ¶" bind:confirm="confirmSuggest" 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 class="demo-rate__title">è¯å</view> |
| | | <t-rate value="{{ratevalue}}" catch: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 /> |
| | | <t-input clearable value="{{inputvalue}}" slot="content" label="èç³»æ¹å¼" placeholder="请è¾å
¥èç³»æ¹å¼" placeholder-class="placeholder" bind:change="inputChange" type="number" maxlength="{{11}}" tips="{{phoneError ? 'ææºå·è¾å
¥ä¸æ£ç¡®' : ''}}" /> |
| | | <t-textarea value="{{textvalue}}" t-class="external-class" label="æè§åé¦" placeholder="请è¾å
¥å
容" maxcharacter="200" disableDefaultPadding="{{true}}" indicator bind:change="textareaChange" /> |
| | | </view> |
| | | </t-dialog> |
| | | </t-dialog> --> |
| | | <!-- <view class="suggest"> --> |
| | | <t-popup visible="{{showWithInput}}" bind:visible-change="onVisibleChange" placement="center"> |
| | | <view class="top-icon"> |
| | | <t-image src="/static/images/bookService/detail/feedback.png"></t-image> |
| | | </view> |
| | | <view slot="content" class="content"> |
| | | <view class="top-title">æè¦å»ºè®®</view> |
| | | <view class="demo-rate"> |
| | | <t-rate value="{{ratevalue}}" catch:change="onChangeRate" size="{{30}}" color="#FFB400" /> |
| | | </view> |
| | | <view class="phone-input"> |
| | | <t-input clearable value="{{inputvalue}}" slot="content" label="" placeholder="请è¾å
¥èç³»æ¹å¼" placeholder-class="placeholder" bind:change="inputChange" type="number" maxlength="{{11}}" class="phone" style="{{inputStyle}}" placeholder-style="{{placeholderstyle}}" /> |
| | | </view> |
| | | <t-textarea value="{{textvalue}}" t-class="external-class" label="" placeholder="请è¾å
¥åé¦å
容" maxcharacter="200" disableDefaultPadding="{{true}}" indicator bind:change="textareaChange" style="{{inputStyle}}" placeholder-style="{{placeholderstyle}}" /> |
| | | </view> |
| | | <view class="submit-btn"> |
| | | <t-button theme="primary" size="large" block bind:tap="confirmSuggest">æäº¤</t-button> |
| | | </view> |
| | | <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="closeDialog" /> |
| | | </t-popup> |
| | | <!-- </view> --> |
| | |
| | | /* 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; |
| | | } |
| | | |
| | | .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; |
| | |
| | | background-color: transparent; |
| | | padding-left: 32rpx; |
| | | border: 0; |
| | | } |
| | | |
| | | .block { |
| | | position: relative; |
| | | width: 240px; |
| | | height: 240px; |
| | | background: #fff; |
| | | border-radius: 16rpx; |
| | | } |
| | | |
| | | .close-btn { |
| | | position: absolute; |
| | | left: 50%; |
| | | margin-left: -32rpx; |
| | | bottom: calc(-1 * (48rpx + 64rpx)); |
| | | } |
| | | |
| | | .wrapper { |
| | | margin: 32rpx; |
| | | display: block; |
| | | } |
| | | |
| | | .content { |
| | | position: relative; |
| | | border-radius: 40rpx; |
| | | padding: 100rpx 40rpx 0rpx 40rpx; |
| | | width: 600rpx; |
| | | background-image: linear-gradient(to bottom, #FFF8E5, #fffcf5); |
| | | } |
| | | |
| | | .demo-rate { |
| | | width: 350rpx; |
| | | margin: 20rpx auto 20rpx auto; |
| | | } |
| | | |
| | | .phone { |
| | | margin-bottom: 16rpx; |
| | | --td-input-border-radius: 20rpx; |
| | | border-radius: 20rpx; |
| | | } |
| | | |
| | | |
| | | .submit-btn { |
| | | padding: 40rpx; |
| | | --td-button-border-radius: 60rpx; |
| | | --td-button-primary-bg-color: #ff6c00; |
| | | --td-button-primary-border-color: #ff6c00; |
| | | --td-button-primary-active-bg-color: #ff984d; |
| | | --td-button-primary-active-border-color: #ff984d; |
| | | } |
| | | |
| | | .top-icon { |
| | | top: -50rpx; |
| | | left: 40%; |
| | | position: absolute; |
| | | } |
| | | |
| | | .top-icon image { |
| | | width: 146rpx; |
| | | height: 146rpx; |
| | | } |
| | | |
| | | .top-title { |
| | | width: 160rpx; |
| | | margin: 0 auto; |
| | | color: #0F1214; |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | } |
| | |
| | | <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> |
| | | ä¸ä¼ èµæº |
| | | <view class="teach-btn" wx:if="{{false}}"> |
| | | <t-button theme="primary" style="width: 120px; height: 36px;" class="btn-upload" wx:if="{{false}}"> |
| | | <t-image src="/static/images/bookService/detail/upload.png" style="margin-top: 20rpx;"></t-image> |
| | | <text>ä¸ä¼ èµæº</text> |
| | | </t-button> |
| | | <t-button theme="primary" style="width: 120px; height: 36px;"> |
| | | <t-image src="/static/images/bookService/detail/download.png"></t-image> |
| | |
| | | .teach-btn { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | height: 134rpx; |
| | | --td-button-primary-bg-color: #fff; |
| | | --td-button-primary-border-color: #FF6C00; |
| | | --td-button-primary-color: #ff6c00; |
| | | --td-button-primary-active-bg-color: #fff0e6; |
| | | --td-button-primary-active-border-color: #ff6c00; |
| | | } |
| | | |
| | | .btn-content { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .teach-btn image { |
| | | width: 32rpx; |
| | | height: 32rpx; |
| | | margin-right: 6rpx; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .teach-btn .t-button__content { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .applyResult { |
| | | padding: 0 10rpx; |
| | | width: 740rpx; |
| | | height: 80rpx; |
| | | width: 660rpx; |
| | | min-height: 80rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | margin: 0 auto; |
| | |
| | | } |
| | | |
| | | .applyPass { |
| | | |
| | | background-color: rgba(0, 128, 0, 0.16); |
| | | border: 1px solid green; |
| | | } |
| | |
| | | .applying { |
| | | background-color: #fff2e9; |
| | | border: 1px solid #ff6c00; |
| | | } |
| | | |
| | | .applyNone, |
| | | .applyReject, |
| | | .applyPass, |
| | | .applying { |
| | | margin-top: 40rpx; |
| | | margin-bottom: 40rpx; |
| | | } |
| | | |
| | | .btn-box { |
| | |
| | | --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ï¼ |
| | | --td-button-primary-active-bg-color: #ff984d; |
| | | --td-button-primary-active-border-color: #ff984d; |
| | | } |
| | | |
| | | .rejectBtn { |
New file |
| | |
| | | // pages/bookServices/detail/components/testResource/testResource.js |
| | | const app = getApp() |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | list: { |
| | | type: Array, |
| | | value: [] |
| | | }, |
| | | bookInfo: { |
| | | type: Object, |
| | | value: "", |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | async goTest(e) { |
| | | const value = e.currentTarget.dataset.value |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | | desc: 'ç¨æ·ç»å½', |
| | | success: (res) => { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | } |
| | | // è·åç« è䏿¯å¦æé¢ç® |
| | | let idPathList = [] |
| | | let query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | productId: this.properties.bookInfo.id, |
| | | cmsPath: value.productLinkPath, |
| | | pading: { |
| | | start: 0, |
| | | size: 999 |
| | | } |
| | | } |
| | | if (value.childrenFolderCount == 0) { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: 'ææ æ°æ®', |
| | | }) |
| | | } else { |
| | | const res = await app.MG.store.getProductDetail(query) |
| | | debugger |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | idPathList.push({ |
| | | id: item.id, |
| | | name: item.name, |
| | | productLinkPath: item.productLinkPath, |
| | | type: item.type |
| | | }) |
| | | }) |
| | | } |
| | | // query: { |
| | | // title: bookData.value.test, |
| | | // bookId: route.query.bookId, |
| | | // productLinkPath: data.productLinkPath, |
| | | // answerTitle: data.name, |
| | | // answerType: 'option', |
| | | // rootCmsItemId: bookData.value.rootCmsItemId, |
| | | // idPathList: JSON.stringify(idPathList) |
| | | // } |
| | | |
| | | wx.navigateTo({ |
| | | url: `/pages/bookServices/examination/examination?bookId=${this.properties.bookInfo.id}&productLinkPath=${value.productLinkPath}&rootCmsItemId=${this.properties.bookInfo.rootCmsItemId}&idPathList=${JSON.stringify(idPathList)}&answerTitle=${value.name}&answerType=${'option'}`, |
| | | }) |
| | | } |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-image": "tdesign-miniprogram/image/image" |
| | | } |
| | | } |
New file |
| | |
| | | <!--pages/bookServices/detail/components/testResource/testResource.wxml--> |
| | | <view class="test-resource"> |
| | | <view class="top-btn"> |
| | | <t-button class="practice-btn" theme="primary" size="medium" style="width: 85px;"> |
| | | <view slot="content"> |
| | | <t-image src="/static/images/bookService/detail/practice-icon.png"></t-image> |
| | | ç»ä¹ |
| | | </view> |
| | | </t-button> |
| | | <t-button class="paper-btn" theme="default" size="medium" style="width: 85px;"> |
| | | <view slot="content"> |
| | | <t-image src="/static/images/bookService/detail/zujuan.png"></t-image> |
| | | ç»å· |
| | | </view> |
| | | |
| | | </t-button> |
| | | <t-button class="error-btn" theme="default" size="medium" style="padding: 0 12rpx;"> |
| | | <view slot="content"> |
| | | <t-image src="/static/images/bookService/detail/cuoti.png"></t-image> |
| | | æçéé¢ |
| | | </view> |
| | | </t-button> |
| | | <t-button class="collect-btn" theme="default" size="medium" style="padding: 0 12rpx;"> |
| | | <view slot="content"> |
| | | <t-image src="/static/images/bookService/detail/wodeshoucang.png"></t-image> |
| | | æçæ¶è |
| | | </view> |
| | | </t-button> |
| | | </view> |
| | | <view class="resource-list" wx:for="{{list}}" wx:key="item.id"> |
| | | <view class="list-title"> |
| | | <t-image src="/static/images/bookService/detail/test-icon.png"></t-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> |
| | | </view> |
| | | </view> |
| | | </view> |
New file |
| | |
| | | /* pages/bookServices/detail/components/testResource/testResource.wxss */ |
| | | .test-resource { |
| | | padding-top: 20rpx; |
| | | } |
| | | |
| | | .resource-list { |
| | | height: 80rpx; |
| | | margin: 20rpx; |
| | | padding: 0 20rpx; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | background-color: #FFF6F0; |
| | | } |
| | | |
| | | .list-title image { |
| | | width: 34rpx; |
| | | height: 38rpx; |
| | | } |
| | | |
| | | .practice image { |
| | | width: 26rpx; |
| | | height: 30rpx; |
| | | } |
| | | |
| | | .list-title text { |
| | | margin-left: 10rpx; |
| | | color: #333; |
| | | } |
| | | |
| | | .top-btn { |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | } |
| | | |
| | | .top-btn image { |
| | | margin-top: 20rpx; |
| | | width: 36rpx; |
| | | height: 36rpx; |
| | | } |
| | | |
| | | .practice-btn { |
| | | --td-button-primary-bg-color: #ff6c00; |
| | | --td-button-primary-border-color: #ff6c00; |
| | | --td-button-primary-active-bg-color: #ff984d; |
| | | --td-button-primary-active-border-color: #ff984d; |
| | | } |
| | | |
| | | .paper-btn, |
| | | .error-btn, |
| | | .collect-btn { |
| | | --td-button-default-bg-color: #fff; |
| | | --td-button-default-color: #ff6c00; |
| | | --td-button-default-active-bg-color: #fff0e6; |
| | | --td-button-medium-font-size: 28rpx |
| | | } |
| | |
| | | |
| | | import Message from 'tdesign-miniprogram/message/message'; |
| | | const app = getApp() |
| | | Component({ |
| | |
| | | treeList: { |
| | | type: Array, |
| | | value: [] |
| | | }, |
| | | bookInfo: { |
| | | type: Object, |
| | | value: {} |
| | | }, |
| | | buyIds: { |
| | | type: Array, |
| | |
| | | applyState: { |
| | | type: String, |
| | | value: '' |
| | | }, |
| | | openTeachids: { |
| | | type: Array, |
| | | value: '' |
| | | }, |
| | | openLearnids: { |
| | | type: Array, |
| | | value: "" |
| | | } |
| | | }, |
| | | data: { |
| | |
| | | } |
| | | }, |
| | | downloadTeach(e) { |
| | | console.log('ç¹å»äº', e); |
| | | const value = e.currentTarget.dataset.value |
| | | var myEventDetail = { |
| | | value, |
| | |
| | | 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 |
| | | } |
| | | } |
| | | resourceIsBuy(data) { |
| | | if (data.saleMethod && data.saleMethod.length) { |
| | | const isSHow = buyIdList.value.some((item) => item == data.saleMethod[0].Id) |
| | | return !isSHow |
| | | } else { |
| | | return false |
| | | } |
| | | }, |
| | | // 跳转é³è§é¢ææ¾å¨ |
| | | goPlayer(e) { |
| | | const item = e.currentTarget.dataset.item |
| | | const parent = e.currentTarget.dataset.parent |
| | | // "pages/resourceDetails/myAudio/index", |
| | | // "pages/resourceDetails/myVideo/index", |
| | | // "pages/resourceDetails/document/index", |
| | | let url |
| | | if (item.selectType == 'video') { |
| | | url = '/pages/resourceDetails/myVideo/index' |
| | | } else if (item.selectType == 'audio') { |
| | | url = '/pages/resourceDetails/myAudio/index' |
| | | } else { |
| | | url = '/pages/resourceDetails/document/index' |
| | | } |
| | | wx.navigateTo({ |
| | | url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parent.productLinkPath}&parentName=${parent.name}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}`, |
| | | }) |
| | | }, |
| | | // æ¿å°ææé¡¹ |
| | | getAllChildren(id) { |
| | | let result = []; |
| | | function findChildren(item) { |
| | | if (item.id === id) { |
| | | if (item.children && item.children.length > 0) { |
| | | item.children.forEach(child => { |
| | | findChildren(child); |
| | | }); |
| | | } |
| | | } else { |
| | | if (item.children && item.children.length > 0) { |
| | | item.children.forEach(child => { |
| | | findChildren(child); |
| | | }); |
| | | } |
| | | } |
| | | if (item.children && item.children.length > 0) { |
| | | result.push(...item.children); |
| | | } |
| | | } |
| | | this.properties.treeList.forEach(item => { |
| | | findChildren(item); |
| | | }); |
| | | return result; |
| | | }, |
| | | // æ¿å°å½å项å项 |
| | | flattenTree(tree) { |
| | | let result = []; |
| | | function flatten(node) { |
| | | result.push(node); |
| | | if (node.children && node.children.length > 0) { |
| | | node.children.forEach(child => { |
| | | flatten(child); |
| | | }); |
| | | } |
| | | } |
| | | tree.forEach(node => { |
| | | flatten(node); |
| | | }); |
| | | return result |
| | | }, |
| | | findAndUpdateItemById(tree, id) { |
| | | function findAndUpdate(node) { |
| | | if (node.id === id) { |
| | | node.check = true; // å°ç®æ 项ç check 屿§è®¾ç½®ä¸º true |
| | | return true; // è¿å true 表示æ¾å°äºç®æ 项 |
| | | } |
| | | if (node.children && node.children.length > 0) { |
| | | for (let child of node.children) { |
| | | if (findAndUpdate(child)) { |
| | | return true; // 妿å¨åèç¹ä¸æ¾å°äºç®æ 项ï¼åç´æ¥è¿å true |
| | | } |
| | | } |
| | | } |
| | | return false; // è¡¨ç¤ºæªæ¾å°ç®æ 项 |
| | | } |
| | | |
| | | for (let node of tree) { |
| | | if (findAndUpdate(node)) { |
| | | break; // 妿å¨é¡¶å±èç¹ä¸æ¾å°äºç®æ 项ï¼ç´æ¥éåºå¾ªç¯ |
| | | } |
| | | } |
| | | }, |
| | | // å为true |
| | | findAndUpdateItemsByIds(tree, ids) { |
| | | function findAndUpdate(node) { |
| | | if (ids.includes(node.id)) { |
| | | node.checked = true; // å°ç®æ 项ç check 屿§è®¾ç½®ä¸º true |
| | | } |
| | | if (node.children && node.children.length > 0) { |
| | | for (let child of node.children) { |
| | | findAndUpdate(child); // éå½å¤çåèç¹ |
| | | } |
| | | } |
| | | } |
| | | |
| | | for (let node of tree) { |
| | | findAndUpdate(node); // 对æ¯ä¸ªé¡¶å±èç¹æ§è¡æ¥æ¾åæ´æ°æä½ |
| | | } |
| | | return tree; // è¿åä¿®æ¹åç宿´æ°ç» |
| | | }, |
| | | // ç« èå¾é |
| | | checkResourceTitle(e) { |
| | | const item = e.currentTarget.dataset.item |
| | | let list = this.flattenTree([item]) |
| | | let ids = [] |
| | | list.forEach(item => { |
| | | ids.push(item.id) |
| | | }) |
| | | const tab = this.findAndUpdateItemsByIds([item], ids) |
| | | console.log(ids, tab); |
| | | } |
| | | } |
| | | }) |
| | |
| | | <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> |
| | | <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 |
| | | > |
| | | <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 wx:if="{{tab == 'jsek_cloudLearning'}}"> |
| | | <t-checkbox |
| | | icon="rectangle" |
| | | checked="{{item.checked}}" |
| | | 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"> |
| | | <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"> |
| | | <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 |
| | | class="box-image" |
| | | style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}" |
| | | > |
| | | <view class="checkBox" wx:if="{{tab == 'jsek_cloudLearning'}}"> |
| | | <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}}" |
| | | /> |
| | | </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" /> |
| | | <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> |
| | | <view> </view> |
| | | <!-- åç§° --> |
| | | <text class="name">{{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="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> |
| | | <t-image |
| | | src="/static/images/bookService/detail/download-icon.png" |
| | | width="16" |
| | | height="16" |
| | | class="download" |
| | | data-value="{{citem}}" |
| | | catchtap="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> |
| | | <!-- äºå¦ä¹ è¯ç徿 --> |
| | | <t-image |
| | | src="/static/images/bookService/detail/shikan.png" |
| | | class="testSee" |
| | | wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}" |
| | | ></t-image> |
| | | <!-- äºå¦ä¹ å å
¥è´ç©è½¦å¾æ --> |
| | | <t-image |
| | | src="/static/images/bookService/detail/cart.png" |
| | | wx:if="{{citem.isShopCar}}" |
| | | class="shopCar" |
| | | ></t-image> |
| | | <!-- äºå¦ä¹ è´ä¹°å¾æ --> |
| | | <t-image |
| | | src="/static/images/bookService/detail/need-buy.png" |
| | | class="need-buy" |
| | | wx:if="{{citem.isbuy }}" |
| | | ></t-image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- // 夿 䏿¯åå æå项 éå½ç»ä»¶ --> |
| | | <tree wx:else treeList="{{[citem]}}" itemId="{{itemId}}"></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}}"> |
| | | ææ æ°æ® |
| | |
| | | </view> |
| | | </t-collapse-panel> |
| | | </t-collapse> |
| | | </view> |
| | | </view> |
| | |
| | | .tree { |
| | | --td-collapse-content-padding: 32rpx 12rpx 32rpx 32rpx; |
| | | --td-collapse-content-padding: 0rpx 12rpx 32rpx 12rpx; |
| | | --td-collapse-header-text-color: #ff6C00; |
| | | --td-collapse-icon-color: #ff6c00 |
| | | } |
| | | |
| | | .header-title { |
| | |
| | | --td-checkbox-vertical-padding: 0 |
| | | } |
| | | |
| | | .t-class { |
| | | background-color: #F7F7F7; |
| | | } |
| | | |
| | | .t-class-content { |
| | | padding: 0; |
| | | } |
| | | |
| | | |
| | | |
| | | .contentBox { |
| | | padding: 0 26rpx; |
| | |
| | | } |
| | | |
| | | .testSee, |
| | | .need-buy { |
| | | .need-buy, |
| | | .shopCar { |
| | | width: 38rpx; |
| | | height: 38rpx; |
| | | } |
| | | |
| | | .testSee, |
| | | .shopCar { |
| | | margin-right: 20rpx; |
| | | } |
| | |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | bookId: '', |
| | | barHeight: '', |
| | | navBarHeight: '', |
| | | options: { |
| | |
| | | teachResources: [], |
| | | teach: [], |
| | | learn: [], |
| | | test: [], |
| | | openTeachids: [], |
| | | openLearnids: [], |
| | | openTestids: [], |
| | | resourceClassList: [], // èµæºæå±åç±» |
| | | applyState: "", // æå¦èµæºç³è¯·ç¶æ |
| | | deadline: "", // æå¦èµæºç³è¯·æææ¥æ |
| | | rejectCause: "", // ä¸è½½æç»åå |
| | | buyIdList: [], |
| | | shoppingCartGetId: [], // å·²è´ä¹°idå表 |
| | | shoppingList: [] |
| | | shoppingList: [], |
| | | loading: false, |
| | | isShowTeachDownload: false, // æç¤ºPCä¸è½½å¼¹çªç¶æ |
| | | confirmBtn: { content: 'æç¥éäº', variant: 'base' }, |
| | | }, |
| | | |
| | | resetTree: function (e) { |
| | |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // è¶åä¿¡æ¯ |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // å¯¼èªæ é«åº¦ |
| | | this.setData({ |
| | | bookId: options.id, |
| | | barHeight: systInfo.statusBarHeight, |
| | | navBarHeight: navBarHeight, |
| | | }); |
| | |
| | | this.getBookInfo(options.id); |
| | | this.getResourceClass() // è·åèµæºæå±åç±» |
| | | this.getApplyInfo(options.id) |
| | | if (wx.getAccountInfoSync('jsek-token')) { |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (token) { |
| | | this.getShoppingCartProductGet() |
| | | } |
| | | }, |
| | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { }, |
| | | onPullDownRefresh() { |
| | | |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { }, |
| | | onReachBottom() { |
| | | if (this.data.tabValue == 'jesk_note') { |
| | | const child = this.selectComponent('#note') |
| | | child.onReachBottom() |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | |
| | | freeEpubPage: [], //epubè¯è¯»ç¾åæ¯ |
| | | }, |
| | | }; |
| | | app.MG.store.getProductDetail(query).then((res) => { |
| | | app.MG.store.getProductDetail(query).then(async (res) => { |
| | | |
| | | this.setData({ |
| | | bookDetail: res.datas, |
| | | cmsDatas: res.datas.cmsDatas[0].datas, |
| | |
| | | // è·åå¾ä¹¦åç±» |
| | | const iconType = JSON.parse(res.datas.bookClassification)[0][0]; |
| | | const classType = JSON.parse(res.datas.bookClassification)[0][1]; |
| | | const className = await this.getBookClass(iconType, classType) |
| | | this.setData({ |
| | | 'bookDetail.publicationDate': this.formatDate(this.data.bookDetail.publicationDate), |
| | | 'bookDetail.class': this.getBookClass(iconType, classType), |
| | | 'bookDetail.class': className, |
| | | 'bookDetail.price': this.numFormat(this.data.bookDetail.price), |
| | | 'bookDetail.oldPrice': this.numFormat(this.data.bookDetail.oldPrice), |
| | | 'bookDetail.paperPrice': this.numFormat(this.data.bookDetail.paperPrice), |
| | |
| | | }); |
| | | }, |
| | | // è·åå¾ä¹¦åç±» |
| | | getBookClass(iconType, classType) { |
| | | async getBookClass(iconType, classType) { |
| | | let name = ''; |
| | | const query = { |
| | | refCodes: ['bookClassification'], |
| | | }; |
| | | app.MG.store.getProductTypeField(query).then((res) => { |
| | | await app.MG.store.getProductTypeField(query).then((res) => { |
| | | JSON.parse(res[0].config).option.forEach((item) => { |
| | | if (item.value == iconType) { |
| | | item.child.forEach((item) => { |
| | | if (item.value == classType) { |
| | | name = item.name; |
| | | item.child.forEach((citem) => { |
| | | if (citem.value == classType) { |
| | | name = citem.name; |
| | | } |
| | | }); |
| | | } |
| | |
| | | || (e.detail.value == 'questionBank' && !this.data.test.length)) { |
| | | this.getResourceData(checkData) |
| | | } |
| | | |
| | | } |
| | | } else if (e.detail.label == 'äºç¬è®°') { |
| | | const token = wx.getStorageSync('jsek-token') |
| | | const child = this.selectComponent('#note') |
| | | child.handleSubmitTitle() |
| | | if (token) { |
| | | child.changeLoading() |
| | | child.getNoteList() |
| | | } |
| | | |
| | | } |
| | | console.log('忢', this.data.tabValue); |
| | | }, |
| | | // è·åèµæºæå±åç±» |
| | | getResourceClass() { |
| | |
| | | }, |
| | | // è·åæå¦èµæº äºå¦ä¹ äºæµè¯ |
| | | getResourceData(type) { |
| | | this.setData({ |
| | | loading: true |
| | | }) |
| | | let query = { |
| | | path: '*', |
| | | queryType: '*', |
| | |
| | | const data = res.datas.cmsDatas[0].datas.filter( |
| | | (item) => item.refCode == 'jsek_questionBank' |
| | | ) |
| | | if (data.length) return getResourceData(data[0]) |
| | | if (data.length) return this.getResourceData(data[0]) |
| | | } |
| | | //æå¦èµæº äºå¦ä¹ |
| | | if (type.refCode == 'jsek_teachingResources' || type.refCode == 'jsek_cloudLearning') { |
| | |
| | | }) |
| | | const list = await this.getAllResource(res.datas.cmsDatas[0].datas) |
| | | this.setData({ |
| | | teachResources: list, |
| | | teach: list |
| | | teach: list, |
| | | loading: false |
| | | }) |
| | | this.findChildIds(this.data.teachResources, this.data.openTeachids = []) |
| | | this.findChildIds(this.data.teach, this.data.openTeachids = []) |
| | | } else if (type.refCode == 'jsek_cloudLearning') { |
| | | const list = await this.getAllResource(res.datas.cmsDatas[0].datas) |
| | | this.setData({ |
| | | learn: list |
| | | learn: list, |
| | | loading: false |
| | | }) |
| | | console.log('äºå¦ä¹ ', this.data.learn); |
| | | this.findChildIds(this.data.teachResources, this.data.openLearnids = []) |
| | | this.findChildIds(this.data.learn, this.data.openLearnids = []) |
| | | } |
| | | } else { |
| | | // æ æ°æ® |
| | | } |
| | | } else if (type.refCode == 'jsek_questionBank') { |
| | | console.log('äºæµè¯'); |
| | | // 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) |
| | | }) |
| | | console.log('ä¿¡æ¯', this.data); |
| | | }, |
| | | // è·åtag䏿æèµæº |
| | | async getAllResource(data) { |
| | |
| | | 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: 'æ°¸ä¹
', |
| | | }) |
| | | console.log('æææ¥æ', this.data.deadline); |
| | | } else { |
| | | |
| | | let endTime = new Date(endDate + ' 23:59:59').getTime() |
| | | // deadline.value = endDate + ' 23:59:59' |
| | | this.setData({ |
| | | deadline: endDate + ' 23:59:59' |
| | | }) |
| | |
| | | applyState: 'none' |
| | | }) |
| | | } |
| | | console.log('ç³è¯·éè¿', this.data.applyState); |
| | | }) |
| | | |
| | | console.log('æææ¥æ', this.data.deadline); |
| | | }, |
| | | // ç³è¯·æå¦èµæº |
| | | applyResource() { |
| | |
| | | // // logIn() |
| | | // } |
| | | }, |
| | | // æå¦èµæºä¸è½½åå¾PCæç¤ºDiialog |
| | | closeTeachDownload() { |
| | | this.setData({ |
| | | isShowTeachDownload: false |
| | | }) |
| | | }, |
| | | // ä¸è½½åè½ |
| | | 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 |
| | | this.setData({ |
| | | isShowTeachDownload: true |
| | | }) |
| | | console.log('zhuan', this.data.isShowTeachDownload); |
| | | // 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: 'è¯¥èµæºæ æ³ä¸è½½', |
| | | // }) |
| | | // .catch(() => { }) |
| | | // } |
| | | // } 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 { |
| | | // logIn() |
| | | // } |
| | | // // } else { |
| | | // // ElMessageBox.confirm('请å
è¿è¡æå¸è®¤è¯ï¼', 'å°æ¬çç¨æ·ï¼æ¨å¥½ï¼', { |
| | | // // confirmButtonText: 'å»è®¤è¯', |
| | | // // cancelButtonText: 'åæ¶', |
| | | // // type: 'warning' |
| | | // // }) |
| | | // // .then(() => { |
| | | // // isShow.value = true |
| | | // // }) |
| | | // // .catch(() => { }) |
| | | // // } |
| | | // // } else { |
| | | // // logIn() |
| | | // // } |
| | | }, |
| | | downloadFile(url) { |
| | | wx.downloadFile({ |
| | |
| | | return false |
| | | } |
| | | }, |
| | | // è·åå·²è´ä¹°åå |
| | | getShoppingCartProductGet() { |
| | | let query = { |
| | | start: 0, |
| | |
| | | shoppingList: res.datas, |
| | | shoppingCartGetId: list |
| | | }) |
| | | console.log('è´ä¹°', this.data); |
| | | }) |
| | | }, |
| | | // å¤æèµæºå å
¥è´ç©è½¦æé®æ¯å¦æ¾ç¤º |
| | |
| | | } else { |
| | | return false |
| | | } |
| | | } |
| | | }, |
| | | // éåæ ç»æè½¬æ¢ä¸ºæ°ç»æ¹æ³ |
| | | handleTreeData(array) { |
| | | const flattenedArray = [] |
| | | array.forEach((node) => { |
| | | // å°å½åèç¹æ·»å å°å±å¼çæ°ç»ä¸ |
| | | flattenedArray.push(node) |
| | | // éå½å¤çåèç¹ |
| | | if (node.children && node.children.length > 0) { |
| | | const childrenArray = this.handleTreeData(node.children) |
| | | flattenedArray.push(...childrenArray) |
| | | } |
| | | }) |
| | | return flattenedArray.filter((item) => item.sysType == 'CmsItem') |
| | | }, |
| | | // äºå¦ä¹ ä¸é®é¢å |
| | | async getFreeResource() { |
| | | const child = this.selectComponent('#learn-resource') |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | | desc: 'ç¨æ·ç»å½', |
| | | success: (res) => { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | } |
| | | let arr = this.handleTreeData(this.data.learn).filter((item) => this.resourceIsBuy(item)) |
| | | let freeIds = arr.filter((item) => { |
| | | return item.saleMethod[0].Price == 0 |
| | | }) |
| | | if (!freeIds.length) return wx.showToast({ |
| | | icon: "error", |
| | | title: 'ææ å
è´¹èµæº', |
| | | }) |
| | | child.changeReceive(true) |
| | | let requests = [] |
| | | freeIds.forEach((item, index) => { |
| | | if (this.resourceIsBuy(item)) { |
| | | requests.push({ |
| | | saleMethodId: item.saleMethod[0].Id, |
| | | count: 1 |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | let query = { |
| | | remarks: 'äºå¦ä¹ ', |
| | | requests, |
| | | } |
| | | try { |
| | | const initOrderRes = await app.MG.store.initOrder(query) |
| | | let parameter = { |
| | | orderNum: initOrderRes.orderNumber |
| | | } |
| | | // 确认订å |
| | | const confirmOrderRes = await app.MG.store.confirmOrder(parameter) |
| | | if (confirmOrderRes.orderNumber) { |
| | | child.changeReceive(false) |
| | | wx.showToast({ |
| | | title: 'é¢åæå', |
| | | }) |
| | | this.getBookInfo(this.data.bookId) |
| | | } |
| | | } catch (error) { |
| | | console.log(error) |
| | | } |
| | | }, |
| | | // äºå¦ä¹ ä¸é®è´ä¹° |
| | | async allAddShoppiingCar() { |
| | | const child = this.selectComponent('#learn-resource') |
| | | const token = wx.getStorageSync('jsek-token') |
| | | if (!token) { |
| | | return wx.getUserProfile({ |
| | | desc: 'ç¨æ·ç»å½', |
| | | success: (res) => { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | } |
| | | let shopList = this.handleTreeData(this.data.learn).filter((item) => this.resourceIsBuy(item)) |
| | | this.getShoppingCartProductGet() |
| | | if (!shopList.length) return wx.showToast({ |
| | | icon: "error", |
| | | title: 'å·²å
¨é¨è´ä¹°', |
| | | }) |
| | | child.changeBuy(true) |
| | | let requests = [] |
| | | shopList.forEach((item) => { |
| | | requests.push({ |
| | | saleMethodId: item.saleMethod[0].Id, |
| | | count: 1, |
| | | }) |
| | | }) |
| | | let query = { |
| | | remarks: 'äºå¦ä¹ ', |
| | | requests, |
| | | } |
| | | const initOrderRes = await app.MG.store.initOrder(query) |
| | | child.changeBuy(false) |
| | | // æ£æ¥è®¢åå·æ¯å¦åå¨ |
| | | if (initOrderRes.orderNumber) { |
| | | // bookService: orderNumber.value, å°ä¼ è¿ä¸ª ï¼ææ¶ä¸ç¥éæä»ä¹ç¨ |
| | | wx.navigateTo({ |
| | | url: `/pages/cart/paymentPage/index?&bookId=${this.data.bookDetail.id}&bookName=${this.data.bookDetail.name}&orderNum=${initOrderRes.orderNumber}`, |
| | | }) |
| | | } else { |
| | | // 订åå·ä¸åå¨ï¼æ¾ç¤ºè¦åæ¶æ¯ |
| | | wx.showToast({ |
| | | icon: "error", |
| | | title: '请éè¯', |
| | | }) |
| | | } |
| | | }, |
| | | // å为ææcheck true |
| | | findAndUpdateItemsByIds(tree, ids) { |
| | | function findAndUpdate(node) { |
| | | if (ids.includes(node.id)) { |
| | | node.checked = true; // å°ç®æ 项ç check 屿§è®¾ç½®ä¸º true |
| | | } |
| | | if (node.children && node.children.length > 0) { |
| | | for (let child of node.children) { |
| | | findAndUpdate(child); // éå½å¤çåèç¹ |
| | | } |
| | | } |
| | | } |
| | | |
| | | for (let node of tree) { |
| | | findAndUpdate(node); // 对æ¯ä¸ªé¡¶å±èç¹æ§è¡æ¥æ¾åæ´æ°æä½ |
| | | } |
| | | return tree; // è¿åä¿®æ¹åç宿´æ°ç» |
| | | }, |
| | | handleTrue() { |
| | | // findAndUpdateItemsByIds(this.date.) |
| | | }, |
| | | |
| | | }) |
| | |
| | | "book-brief": "/pages/bookServices/detail/components/brief/index", |
| | | "teach-resource": "/pages/bookServices/detail/components/teachResource/index", |
| | | "learn-resource": "/pages/bookServices/detail/components/learnResource/learnResource", |
| | | "test-resource": "/pages/bookServices/detail/components/testResource/testResource", |
| | | "note": "/pages/bookServices/detail/components/note/note", |
| | | "tree": "/pages/bookServices/detail/components/tree/index", |
| | | "suggest": "/pages/bookServices/detail/components/suggest/suggest", |
| | | "t-loading": "tdesign-miniprogram/loading/loading" |
| | | "t-loading": "tdesign-miniprogram/loading/loading", |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog" |
| | | }, |
| | | "navigationStyle": "custom" |
| | | "navigationStyle": "custom", |
| | | "onReachBottomDistance": 200 |
| | | } |
| | |
| | | <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> |
| | | <view class="navbar-title">{{options.name}}</view> |
| | | </view> |
| | | <scroll-view scroll-y="{{true}}" class="book"> |
| | | <scroll-view scroll-y="{{true}}" class="book" bindscrolltolower="onReachBottom"> |
| | | <!-- å¾ä¹¦è¯¦æ
--> |
| | | <view class="book-box"> |
| | | <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 class="use-title">æ¶è</view> |
| | | </view> |
| | | <view class="suggest" bind:tap="suggestBtn"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/suggest.png"></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/suggest.png" |
| | | ></t-image> |
| | | </view> |
| | | <view class="use-title">æè¦å»ºè®®</view> |
| | | </view> |
| | |
| | | <view class="li-title">åºçæ¶é´ï¼</view> |
| | | <view class="li-content">{{bookDetail.publicationDate}}</view> |
| | | </view> |
| | | <view class="message-li"> |
| | | <view |
| | | class="message-li" |
| | | wx:if="{{bookDetail.class}}" |
| | | style="height: 80rpx" |
| | | > |
| | | <view class="li-title">å¾ä¹¦åç±»ï¼</view> |
| | | <view class="li-content">{{bookDetail.class}}</view> |
| | | <view class="class-name showTow">{{bookDetail.class}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- çµå书å®ä»· --> |
| | | <view class="electron-price"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/electon-price.png"></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/electon-price.png" |
| | | ></t-image> |
| | | </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> |
| | | <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 class="paper-price"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/paper-price.png"></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/paper-price.png" |
| | | ></t-image> |
| | | </view> |
| | | <view class="price">Â¥{{bookDetail.paperPrice == '0.00' ? 'å
è´¹' : 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="{{tabValue}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel" class="tab-class"> |
| | | <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> |
| | | <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="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 |
| | | label="æå¦èµæº" |
| | | value="jsek_teachingResources" |
| | | class="{{loading ? 'loading': ''}}" |
| | | > |
| | | <view wx:if="{{!loading && teach.length}}"> |
| | | <teach-resource |
| | | applyState="{{applyState}}" |
| | | rejectCause="{{rejectCause}}" |
| | | bind:applyResource="applyResource" |
| | | ></teach-resource> |
| | | <tree |
| | | bookInfo="{{bookDetail}}" |
| | | treeList="{{teach}}" |
| | | tab="{{tabValue}}" |
| | | applyState="{{applyState}}" |
| | | bind:downloadTeach="downloadTeach" |
| | | openTeachids="{{openTeachids}}" |
| | | ></tree> |
| | | </view> |
| | | <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="loading" |
| | | loading="{{loading}}" |
| | | /> |
| | | </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 |
| | | label="äºå¦ä¹ " |
| | | value="jsek_cloudLearning" |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | <view wx:if="{{!loading && learn.length}}"> |
| | | <learn-resource |
| | | bind:getFreeResource="getFreeResource" |
| | | bind:allAddShoppiingCar="allAddShoppiingCar" |
| | | id="learn-resource" |
| | | ></learn-resource> |
| | | <tree |
| | | bookInfo="{{bookDetail}}" |
| | | tab="{{tabValue}}" |
| | | treeList="{{learn}}" |
| | | buyIds="{{buyIdList}}" |
| | | openLearnids="{{openLearnids}}" |
| | | ></tree> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel label="äºæµè¯" value="questionBank" style="{{tabPanelstyle}}">é项åå
容</t-tab-panel> |
| | | <t-tab-panel |
| | | label="äºæµè¯" |
| | | value="questionBank" |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | <view wx:if="{{!loading && test.length}}"> |
| | | <test-resource |
| | | list="{{test}}" |
| | | bookInfo="{{bookDetail}}" |
| | | ></test-resource> |
| | | </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> |
| | | </t-tabs> |
| | | </view> |
| | | <!-- è´ä¹°æé® --> |
| | |
| | | </view> |
| | | <view class="bottom-btn"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/paper-book.png"></t-image> |
| | | <t-image |
| | | src="/static/images/bookService/detail/paper-book.png" |
| | | ></t-image> |
| | | </view> |
| | | <view class="btn-text">çº¸è´¨æ ·ä¹¦ç³è¯·</view> |
| | | </view> |
| | |
| | | </view> |
| | | </scroll-view> |
| | | <!-- æè¦å»ºè®®å¼¹çª --> |
| | | <suggest class="suggest-component" id="suggest-component"></suggest> |
| | | <suggest |
| | | class="suggest-component" |
| | | id="suggest-component" |
| | | bookIcon="{{bookDetail.icon}}" |
| | | bookName="{{bookDetail.name}}" |
| | | ></suggest> |
| | | <!-- æå¦èµæºä¸è½½æç¤ºå¼¹çª --> |
| | | <t-dialog |
| | | class="teachDownloadDialog" |
| | | visible="{{isShowTeachDownload}}" |
| | | title="æç¤º" |
| | | content="请åå¾PC端ä¸è½½" |
| | | confirm-btn="{{ confirmBtn }}" |
| | | bind:confirm="closeTeachDownload" |
| | | /> |
| | |
| | | } |
| | | |
| | | .detail-right .book-name { |
| | | width: 420rpx; |
| | | font-weight: bold; |
| | | font-size: 36rpx; |
| | | color: #000000; |
| | | margin-bottom: 30rpx; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .showTow { |
| | | word-break: break-all; |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .book-message { |
| | |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .class-name { |
| | | height: 2.5em; |
| | | width: 280rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .book-use { |
| | |
| | | |
| | | .book-web { |
| | | margin-left: 30rpx; |
| | | display: flex; |
| | | } |
| | | |
| | | .book-web image { |
| | |
| | | |
| | | .tab-box { |
| | | min-height: 550rpx; |
| | | } |
| | | |
| | | .note-list { |
| | | /* margin-bottom: 80rpx; */ |
| | | } |
| | | |
| | | .tab-class { |
| | | --td-loading-color: #ff6c00 |
| | | } |
| | | |
| | | .loading { |
| | | min-height: 550rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .teachDownloadDialog { |
| | | --td-button-primary-bg-color: #ff6c00; |
| | | --td-button-primary-border-color: #ff6c00; |
| | | --td-button-primary-active-bg-color: #ff984d; |
| | | --td-button-primary-active-border-color: #ff984d; |
| | | } |
New file |
| | |
| | | const app = getApp() |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | barHeight: "", |
| | | navBarHeight: "", |
| | | loading: false, |
| | | answerTitle: "", // å¯¼èªæ æ é¢ |
| | | bookId: "", |
| | | productLinkPath: "", |
| | | rootCmsItemId: "", |
| | | idPathList: [], // é¢ç®å表 |
| | | answerType: "", // çé¢ç±»å |
| | | submitStatus: false, // æäº¤ç¶æ |
| | | currentIndex: 0, // å½åç颿° |
| | | collectList: [], // æ¶èé¢ç®å表 |
| | | subjectiveNum: 0, // 主è§é¢å¾å |
| | | subjectiveGrade: 0, // 主è§é¢æ»å |
| | | total: 0, // é¢ç®æ»æ° |
| | | correctNum: 0, // æ£ç¡®é¢ç®æ°é |
| | | cardList: [], // æäº¤é¡¹, |
| | | questionDataList: [] |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | 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, |
| | | answerTitle: options.answerTitle, |
| | | bookId: options.bookId, |
| | | productLinkPath: options.productLinkPath, |
| | | rootCmsItemId: options.rootCmsItemId, |
| | | idPathList: JSON.parse(options.idPathList), |
| | | answerType: options.answerType |
| | | }); |
| | | this.init() |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | | */ |
| | | onShareAppMessage() { |
| | | }, |
| | | // è¿å |
| | | goBack() { |
| | | wx.navigateBack(); |
| | | }, |
| | | // åå§å彿° |
| | | async init() { |
| | | if (this.data.answerType == 'option') { |
| | | // æµè¯çé¢ |
| | | await this.getCollectIdList() // è·åæ¶èidå表 |
| | | // await getErrorList() // è·åéé¢idå表 |
| | | } |
| | | }, |
| | | // è·åæ¶èé¢ç®å表id |
| | | getCollectIdList() { |
| | | app.MG.identity |
| | | .getUserKey({ |
| | | domain: 'collectData', |
| | | keys: [this.data.rootCmsItemId] |
| | | }) |
| | | .then(async (res) => { |
| | | try { |
| | | this.setData({ |
| | | collectList: JSON.parse(res[0].value) |
| | | }) |
| | | } catch (error) { |
| | | } |
| | | if (this.data.answerType == 'option') { |
| | | // å
è·åç¨æ·çé¢è®°å½ |
| | | await this.getAnswerInfo((res) => { |
| | | if (res.length) { |
| | | // æè®°å½ï¼ä¸è½çé¢ï¼ç¶æè®¾ä¸ºå·²æäº¤ |
| | | this.setData({ |
| | | submitStatus: true |
| | | }) |
| | | let value = JSON.parse(res[0].value) |
| | | // console.log('çé¢è®°å½', JSON.parse(res[0].value)) |
| | | // æçé¢è®°å½ï¼å¾åèµå¼ |
| | | if (value) { |
| | | value.dataList.forEach((item) => { |
| | | if (item.name == '客è§é¢å¾å' && item.path == this.data.productLinkPath) |
| | | this.setData({ |
| | | subjectiveNum: item.score |
| | | }) |
| | | }) |
| | | } |
| | | this.setData({ |
| | | currentIndex: value.currentIndex |
| | | }) |
| | | // æºå¸¦çé¢è®°å½ è·åé¢ç® |
| | | this.getQuestionList(value.dataList) |
| | | } else { |
| | | this.getQuestionList() // è·åé¢åºé¢ç® |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // è·åé¢åºé¢ç® |
| | | getQuestionList(oldData) { |
| | | // æ¸
空æ£ç¡®é¢æ°è®°å½ |
| | | this.setData({ |
| | | correctNum: 0 |
| | | }) |
| | | let flag = 0 |
| | | this.data.idPathList.forEach((pathitem) => { |
| | | const pathList = this.data.cardList |
| | | pathList.push({ |
| | | name: pathitem.name, |
| | | path: pathitem.productLinkPath, |
| | | catalogName: pathitem.type, |
| | | infoList: [] |
| | | }) |
| | | this.setData({ |
| | | cardList: pathList |
| | | }) |
| | | // è·åé¢ç® |
| | | let questionArr = [] |
| | | let query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | productId: this.data.bookId, |
| | | cmsPath: pathitem.productLinkPath, |
| | | itemFields: { |
| | | // SysType: 'CmsFolder', |
| | | 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: [] |
| | | }, |
| | | pading: { |
| | | start: 0, |
| | | size: 999 |
| | | } |
| | | } |
| | | app.MG.store.getProductDetail(query).then((res) => { |
| | | this.setData({ |
| | | total: res.datas.cmsDatas[0].datas.length |
| | | }) |
| | | // total.value += res.datas.cmsDatas[0].datas.length |
| | | let oldList |
| | | if (oldData) { |
| | | // æäº¤è¿ï¼åå¨çé¢è®°å½ |
| | | oldList = oldData.find((item) => item.path == pathitem.productLinkPath).infoList |
| | | this.setData({ |
| | | submitStatus: true |
| | | }) |
| | | } |
| | | res.datas.cmsDatas[0].datas.forEach((item, index) => { |
| | | let oldObj = '' |
| | | if (oldList) oldObj = oldList.find((oldItem) => oldItem.id == item.id) |
| | | let questionObj = { |
| | | // num: index, // é¢å· |
| | | id: item.id, |
| | | 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.userAnswer |
| | | : item.Embedded_QuestionBank_QuestionType == 'completion' || |
| | | item.Embedded_QuestionBank_QuestionType == 'multipleChoice' |
| | | ? [] |
| | | : '', |
| | | isRight: oldObj ? oldObj.isRight : null, |
| | | isComplete: oldObj ? oldObj.isComplete : 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++ |
| | | } |
| | | } |
| | | } |
| | | questionArr.push(questionObj) |
| | | // æ§æ°æ®é é¢ç®å·²ç»ä½çï¼ä¿®æ¹å·²çé¢ç®æ°é |
| | | // if (oldObj && oldObj.userAnswer.length > 0) countDownRef.value.changeAlready() |
| | | // æ§æ°æ®é é¢ç®æ£ç¡® è®°å½æ£ç¡®æ°é |
| | | if (questionObj.isRight) { |
| | | this.setData({ |
| | | correctNum: this.data.correctNum + 1 |
| | | }) |
| | | } |
| | | // if (pathitem.name == '夿é¢') { |
| | | // topicList.value.judge.data = questionArr |
| | | // topicList.value.judge.path = pathitem.productLinkPath |
| | | // if (oldData) subjectiveTotal.value += 1 // ææ§æ°æ®ï¼è®¡ç®ä¸»è§é¢æ° |
| | | // } else if (pathitem.name == '填空é¢') { |
| | | // topicList.value.gap.data = questionArr |
| | | // topicList.value.gap.path = pathitem.productLinkPath |
| | | // if (oldData) subjectiveTotal.value += 1 |
| | | // } else if (pathitem.name == 'å¤éé¢') { |
| | | // topicList.value.check.data = questionArr |
| | | // topicList.value.check.path = pathitem.productLinkPath |
| | | // if (oldData) subjectiveTotal.value += 1 |
| | | // } else if (pathitem.name == 'åéé¢') { |
| | | // topicList.value.radio.data = questionArr |
| | | // topicList.value.radio.path = pathitem.productLinkPath |
| | | // if (oldData) subjectiveTotal.value += 1 |
| | | // } else if (pathitem.name == 'ç®çé¢') { |
| | | // topicList.value.short.data = questionArr |
| | | // topicList.value.short.path = pathitem.productLinkPath |
| | | // } else if (pathitem.name == 'ç¿»è¯é¢') { |
| | | // topicList.value.translate.data = questionArr |
| | | // topicList.value.translate.path = pathitem.productLinkPath |
| | | // } else if (pathitem.name == 'å¬åé¢') { |
| | | // topicList.value.listen.data = questionArr |
| | | // topicList.value.listen.path = pathitem.productLinkPath |
| | | // if (oldData) subjectiveTotal.value += 1 |
| | | // } |
| | | let infoList = |
| | | this.data.cardList[this.data.cardList.findIndex((item) => item.path == pathitem.productLinkPath)] |
| | | .infoList |
| | | infoList.push(questionObj) |
| | | flag++; |
| | | let questionList = [] |
| | | // if (flag == this.data.idPathList.length) { |
| | | this.data.cardList.forEach(aitem => { |
| | | aitem.infoList.forEach(bitem => { |
| | | questionList.push(bitem) |
| | | bitem.number = questionList.length |
| | | }) |
| | | }) |
| | | this.setData({ |
| | | questionDataList: questionList |
| | | }) |
| | | // } |
| | | }) |
| | | }) |
| | | }) |
| | | this.setData({ |
| | | loading: false, |
| | | }) |
| | | console.log('é¢ç®å表', this.data.questionDataList, this.data.cardList); |
| | | }, |
| | | // è·åç颿°æ® |
| | | getAnswerInfo(callback) { |
| | | app.MG.identity |
| | | .getUserKey({ |
| | | domain: 'answerData', |
| | | keys: [this.data.productLinkPath] |
| | | }) |
| | | .then((res) => { |
| | | if (callback) callback(res) |
| | | }) |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "usingComponents": { |
| | | "question-options": "/pages/bookServices/examination/questionOptions/index", |
| | | "question-schedule": "/pages/bookServices/examination/questionSchedule/index", |
| | | "question-list": "/pages/bookServices/examination/questionList/index", |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-button": "tdesign-miniprogram/button/button" |
| | | }, |
| | | "navigationStyle": "custom" |
| | | } |
New file |
| | |
| | | <!--pages/examination/examination.wxml--> |
| | | <!--导èªåºå --> |
| | | <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | | <t-icon |
| | | name="chevron-left" |
| | | size="30" |
| | | data-name="{{item}}" |
| | | bind:click="goBack" |
| | | /> |
| | | </view> |
| | | <view class="navbar-title">{{answerTitle}}</view> |
| | | </view> |
| | | <view class="page-content"> |
| | | <question-schedule></question-schedule> |
| | | <question-list questionList="{{questionDataList}}"></question-list> |
| | | </view> |
| | | |
| | | <!-- åºé¨åºå--> |
| | | |
| | | <view class="page-bottom"> |
| | | <question-options></question-options> |
| | | </view> |
New file |
| | |
| | | /* pages/examination/examination.wxss */ |
| | | |
| | | .nacigationBar { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .navbar-title { |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | color: #0F1214; |
| | | font-size: 40rpx; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | .page-content { |
| | | box-sizing: border-box; |
| | | width: 100%; |
| | | height: 78vh; |
| | | padding: 20rpx; |
| | | background-color: #F2F3F8; |
| | | } |
New file |
| | |
| | | // pages/bookServices/examination/questionList/index.js |
| | | |
| | | const imageCdn = 'https://tdesign.gtimg.com/mobile/demos'; |
| | | const swiperList = [ |
| | | `${imageCdn}/swiper1.png`, |
| | | `${imageCdn}/swiper2.png`, |
| | | `${imageCdn}/swiper1.png`, |
| | | `${imageCdn}/swiper2.png`, |
| | | `${imageCdn}/swiper1.png`, |
| | | ]; |
| | | |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | questionList: { |
| | | type: Array, |
| | | value: [] |
| | | } |
| | | }, |
| | | created() { |
| | | console.log('ç»ä»¶ä¼ å', this.properties); |
| | | }, |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | current: 2, |
| | | autoplay: true, |
| | | duration: 500, |
| | | interval: 5000, |
| | | paginationPosition: 'bottom-right', |
| | | swiperList, |
| | | navigation: { type: 'fraction' }, |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-swiper": "tdesign-miniprogram/swiper/swiper", |
| | | "t-swiper-nav": "tdesign-miniprogram/swiper-nav/swiper-nav" |
| | | } |
| | | } |
New file |
| | |
| | | <!--pages/bookServices/examination/questionList/index.wxml--> |
| | | <view class="question-list"> |
| | | <!-- é¢åtitle --> |
| | | <view class="question-title"> |
| | | <text class="title-name">åéé¢</text><text class="title-score">(æ¯é¢2å)</text> |
| | | </view> |
| | | <!-- é¢ç®å表 --> |
| | | <swiper> |
| | | <swiper-item wx:for="{{questionList}}"> |
| | | <text>{{item.stem.stemTxt}}</text> |
| | | </swiper-item> |
| | | </swiper> |
| | | </view> |
New file |
| | |
| | | /* pages/bookServices/examination/questionList/index.wxss */ |
| | | .question-list { |
| | | width: 100%; |
| | | height: 90%; |
| | | padding: 20rpx; |
| | | background-color: #ffffff; |
| | | border-radius: 20rpx; |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .question-title { |
| | | font-size: 28rpx; |
| | | margin-bottom: 20rpx; |
| | | } |
| | | |
| | | .title-name { |
| | | padding: 6rpx; |
| | | background-color: #ff6c00; |
| | | color: #ffffff; |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .title-score { |
| | | color: #000; |
| | | } |
New file |
| | |
| | | // pages/bookServices/examination/questionOptions/index.js |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | btnStyle: "width:320rpx;border-radius:60rpx", |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-button": "tdesign-miniprogram/button/button" |
| | | } |
| | | } |
New file |
| | |
| | | <!--pages/bookServices/examination/questionOptions/index.wxml--> |
| | | <view class="page-bottom"> |
| | | <view class="li-option"> |
| | | <t-image src="/static/images/bookService/examination/collect.png"></t-image> |
| | | æ¶è |
| | | </view> |
| | | <view class="li-option"> |
| | | <t-image |
| | | src="/static/images/bookService/examination/questionCard.png" |
| | | ></t-image> |
| | | çé¢å¡ |
| | | </view> |
| | | <view class="li-option"> |
| | | <t-image src="/static/images/bookService/examination/setting.png"></t-image> |
| | | 设置 |
| | | </view> |
| | | <view class="li-option"> |
| | | <t-image src="/static/images/bookService/examination/reset.png"></t-image> |
| | | éå |
| | | </view> |
| | | <view class="bottom-submit"> |
| | | <t-button theme="primary" size="large" style="{{btnStyle}}">æäº¤</t-button> |
| | | </view> |
| | | </view> |
New file |
| | |
| | | /* pages/bookServices/examination/questionOptions/index.wxss */ |
| | | .page-bottom { |
| | | display: flex; |
| | | justify-content: space-evenly; |
| | | align-items: center; |
| | | position: fixed; |
| | | bottom: 30rpx; |
| | | width: 100%; |
| | | height: 180rpx; |
| | | /* background-color: red; */ |
| | | } |
| | | |
| | | .li-option { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | font-size: 24rpx; |
| | | color: #010101; |
| | | } |
| | | |
| | | .page-bottom image { |
| | | width: 36rpx; |
| | | height: 36rpx; |
| | | } |
| | | |
| | | .bottom-submit { |
| | | --td-button-primary-bg-color: #ff6c00; |
| | | --td-button-primary-border-color: #FF6C00; |
| | | --td-button-primary-active-bg-color: #ff984d; |
| | | --td-button-primary-active-border-color: #ff984d; |
| | | } |
New file |
| | |
| | | |
| | | // pages/bookServices/examination/questionSchedule/questionSchedule.js |
| | | Component({ |
| | | /** |
| | | * ç»ä»¶ç屿§å表 |
| | | */ |
| | | properties: { |
| | | |
| | | }, |
| | | created() { |
| | | // if (props.answerType == 'option') { |
| | | // this.startCountdown() |
| | | this.setData({ |
| | | countdownTime: 2 * 60 * 60 * 1000 |
| | | }) |
| | | // } |
| | | }, |
| | | detached() { |
| | | if (this.data.countdownInterval !== null) { |
| | | clearInterval(this.data.countdownInterval) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * ç»ä»¶çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | countdownInterval: null, // 计æ¶å¨ |
| | | isCountdownRunning: true, // æ¯å¦åè®¡æ¶ |
| | | countdownTime: "", // æ¶é´ |
| | | showTime: '', |
| | | }, |
| | | observers: { |
| | | 'countdownTime': function (newValue, oldValue) { |
| | | const showTime = this.formatTime(this.data.countdownTime) |
| | | this.setData({ |
| | | showTime: showTime |
| | | }) |
| | | console.log(this.data.showTime); |
| | | } |
| | | }, |
| | | /** |
| | | * ç»ä»¶çæ¹æ³å表 |
| | | */ |
| | | methods: { |
| | | // æ ¼å¼åæ¶é´ |
| | | formatTime(ms) { |
| | | const hours = Math.floor((ms / (1000 * 60 * 60)) % 24) |
| | | .toString() |
| | | .padStart(2, '0') |
| | | const minutes = Math.floor((ms / (1000 * 60)) % 60) |
| | | .toString() |
| | | .padStart(2, '0') |
| | | const seconds = Math.floor((ms / 1000) % 60) |
| | | .toString() |
| | | .padStart(2, '0') |
| | | return `${hours}:${minutes}:${seconds}` |
| | | }, |
| | | // è·åä¿åçåè®¡æ¶æ¶é´ |
| | | getSavedTime() { |
| | | const savedTime = wx.getStorageSync('countdownTime') |
| | | return savedTime ? parseInt(savedTime) : null |
| | | }, |
| | | // ä¿ååè®¡æ¶æ¶é´å°æ¬å°åå¨ |
| | | saveTime() { |
| | | wx.setStorageSync('countdownTime', this.data.countdownTime.toString()) |
| | | }, |
| | | clearTime() { |
| | | this.setData({ |
| | | countdownTime: 2 * 60 * 60 * 1000 |
| | | }) |
| | | }, |
| | | // æåæç»§ç»åè®¡æ¶ |
| | | toggleCountdown() { |
| | | if (countdownInterval) { |
| | | clearInterval(this.data.countdownInterval) |
| | | this.setData({ |
| | | countdownInterval: null, |
| | | isCountdownRunning: false |
| | | }) |
| | | } else { |
| | | this.startCountdown() |
| | | this.setData({ |
| | | isCountdownRunning: true |
| | | }) |
| | | } |
| | | }, |
| | | // å¼å§åè®¡æ¶ |
| | | startCountdown() { |
| | | // å¦æè®¡æ¶å¨å·²ç»åå¨ï¼å
æ¸
é¤ä¹åç计æ¶å¨ |
| | | if (this.data.countdownInterval) { |
| | | clearInterval(this.data.countdownInterval) |
| | | this.setData({ |
| | | countdownInterval: null |
| | | }) |
| | | } |
| | | this.setData({ |
| | | countdownInterval: setInterval(() => { |
| | | this.setData({ |
| | | countdownTime: this.data.countdownTime - 1000 |
| | | }) |
| | | if (this.data.countdownTime <= 0) { |
| | | clearInterval(this.data.countdownInterval) |
| | | this.setData({ |
| | | countdownTime: 0, |
| | | isCountdownRunning: false |
| | | }) |
| | | } |
| | | this.saveTime() |
| | | }, 1000) |
| | | }) |
| | | |
| | | } |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-progress": "tdesign-miniprogram/progress/progress" |
| | | } |
| | | } |
New file |
| | |
| | | <!--pages/bookServices/examination/questionSchedule/questionSchedule.wxml--> |
| | | <view class="schedule"> |
| | | <view class="schedule-top"> |
| | | <view class="question-schedule">çé¢è¿åº¦<text class="parimary-color question-num">1</text> <text>/18</text></view> |
| | | <view class="remainder">å©ä½æ¶é´ <text class="parimary-color">{{showTime}}</text></view> |
| | | </view> |
| | | <view class="schedule-progress"> |
| | | <t-progress percentage="80" color="#ff6c00" label="" /> |
| | | </view> |
| | | |
| | | </view> |
New file |
| | |
| | | /* pages/bookServices/examination/questionSchedule/questionSchedule.wxss */ |
| | | .schedule { |
| | | background-color: #ffffff; |
| | | padding: 20rpx; |
| | | font-size: 28rpx; |
| | | border-radius: 20rpx; |
| | | } |
| | | |
| | | .schedule-top { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .question-schedule { |
| | | color: #000; |
| | | } |
| | | |
| | | .schedule-progress { |
| | | margin-top: 20rpx; |
| | | } |
| | | |
| | | .remainder { |
| | | color: #545C63; |
| | | } |
| | | |
| | | .parimary-color { |
| | | color: #ff6c00; |
| | | } |
| | | |
| | | .question-num { |
| | | margin-left: 10rpx; |
| | | } |
| | |
| | | searchValue: '', |
| | | path: '', |
| | | pathList: [], |
| | | page: 1, |
| | | pageCount: { |
| | | page: 1, |
| | | total: 0, |
| | | }, |
| | | isMore: null, |
| | | assortCheck: { |
| | | name: '', |
| | | code: '', |
| | |
| | | */ |
| | | onReachBottom(e) { |
| | | console.log('åºé¨'); |
| | | const flag = this.data.bookList.length < this.data.pageCount.total |
| | | if (flag) { |
| | | this.setData({ |
| | | isMore: true, |
| | | "pageCount.page": this.data.pageCount.page + 1 |
| | | }) |
| | | this.getBookList(this.data.path) |
| | | } else { |
| | | this.setData({ |
| | | isMore: true, |
| | | }) |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | isMore: false |
| | | }) |
| | | }, 100) |
| | | console.log('æ²¡ææ´å¤äº'); |
| | | } |
| | | }, |
| | | |
| | | /** |
| | |
| | | height: 145, |
| | | }, |
| | | paging: { |
| | | start: (this.data.page - 1) * 16, |
| | | size: 16, |
| | | start: 0, |
| | | size: this.data.pageCount.page * 8, |
| | | }, |
| | | fields: { |
| | | author: [], |
| | |
| | | app.MG.store.getProductList(query).then((res) => { |
| | | this.setData({ |
| | | bookList: res.datas, |
| | | enable: false |
| | | enable: false, |
| | | "pageCount.total": res.total |
| | | }); |
| | | console.log('å¾ä¹¦å表', res, this.data.pageCount); |
| | | }); |
| | | }, |
| | | // ä¸çº§åç±»åæ¢ |
| | |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-search": "tdesign-miniprogram/search/search", |
| | | "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh" |
| | | "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh", |
| | | "t-loading": "tdesign-miniprogram/loading/loading" |
| | | }, |
| | | "navigationStyle": "custom", |
| | | "onReachBottomDistance": 250 |
| | | "navigationStyle": "custom" |
| | | } |
| | |
| | | </view> |
| | | </view> |
| | | <t-pull-down-refresh value="{{enable}}" loadingProps="{{loadingProps}}" loadingTexts="{{['䏿巿°', 'æ¾æå·æ°', 'æ£å¨å·æ°', 'å·æ°å®æ']}}" bind:refresh="onRefresh"> |
| | | <scroll-view scroll-y="{{true}}" class="list-container"> |
| | | <scroll-view scroll-y="{{true}}" class="list-container" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom"> |
| | | <view class="assort-title"> |
| | | <view class="title-box"></view> |
| | | <view class="title-name">{{assortCheck.name}}</view> |
| | |
| | | <view class="book-author book-color">{{item.author}}</view> |
| | | </view> |
| | | </view> |
| | | <view class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <text wx:if="{{isMore == false}}">æ²¡ææ´å¤äº</text> |
| | | </view> |
| | | </scroll-view> |
| | | </t-pull-down-refresh> |
| | | </view> |
| | |
| | | .list-container { |
| | | height: 80vh; |
| | | margin-top: 20rpx; |
| | | background-color: #fff; |
| | | /* background-color: #fff; */ |
| | | } |
| | | |
| | | .assort-title { |
| | |
| | | .book-box { |
| | | box-sizing: border-box; |
| | | width: 48%; |
| | | background-color: #f7f7f7; |
| | | background-color: #fff; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | |
| | | |
| | | .book-name { |
| | | margin-top: 24rpx; |
| | | color: #333; |
| | | width: 100%; |
| | | font-size: 28rpx; |
| | | font-weight: 700; |
| | |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | overflow: hidden; |
| | | text-align: center; |
| | | text-align: left; |
| | | } |
| | | |
| | | .book-author { |
| | | color: #333; |
| | | margin-top: 16rpx; |
| | | width: 100%; |
| | | font-size: 24rpx; |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | text-align: center; |
| | | text-align: left; |
| | | } |
| | | |
| | | .bottom-box { |
| | | display: flex; |
| | | justify-content: center; |
| | | color: #999; |
| | | height: 80rpx; |
| | | font-size: 28rpx; |
| | | --td-loading-color: #ff6c00 |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- |
| | | <t-button t-class="wrapper" theme="primary" size="large" variant="outline" data-key="showCloseBtn" bind:tap="showDialog" block> |
| | | 带å
³éæé® |
| | | </t-button> |
| | | </t-button> --> |
| | | <t-dialog visible="{{showCloseBtn}}" close-btn bind:confirm="closeDialog" bind:cancel="closeDialog"> |
| | | <view slot="content" class="slotContent"> |
| | | <view class="myQrcodeBox"> |
New file |
| | |
| | | // pages/resourceDetails/document/index.js |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--pages/resourceDetails/document/index.wxml--> |
| | | <text>pages/resourceDetails/document/index.wxml</text> |
| | | <view> |
| | | |
| | | |
| | | </view> |
New file |
| | |
| | | /* pages/resourceDetails/document/index.wxss */ |
New file |
| | |
| | | // audio.js |
| | | Page({ |
| | | data: { |
| | | poster: 'http://y.gtimg.cn/music/photo_new/T002R300x300M000003rsKF44GyaSk.jpg?max_age=2592000', |
| | | name: 'æ¤æ¶æ¤å»', |
| | | author: '许å·', |
| | | src: 'http://182.92.203.7:3001/file/api/ApiDownload?md5=aa72e586dd93b7c2633bee6320bc6c76', |
| | | navBarHeight: '', |
| | | barHeight: '', |
| | | |
| | | }, |
| | | onLoad(options) { |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // è¶åä¿¡æ¯ |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // å¯¼èªæ é«åº¦ |
| | | |
| | | this.setData({ |
| | | navBarHeight: navBarHeight, |
| | | barHeight: systInfo.statusBarHeight, |
| | | }) |
| | | }, |
| | | onReady: function (e) { |
| | | // ä½¿ç¨ wx.createAudioContext è·å audio ä¸ä¸æ context |
| | | this.audioCtx = wx.createAudioContext('myAudio') |
| | | }, |
| | | |
| | | audioPlay: function () { |
| | | this.audioCtx.play() |
| | | }, |
| | | audioPause: function () { |
| | | this.audioCtx.pause() |
| | | }, |
| | | audio14: function () { |
| | | this.audioCtx.seek(14) |
| | | }, |
| | | audioStart: function () { |
| | | this.audioCtx.seek(0) |
| | | }, |
| | | goBack() { |
| | | wx.navigateBack() |
| | | }, |
| | | |
| | | |
| | | MusicStart: function (e) { |
| | | var progress = parseInt((e.detail.currentTime / e.detail.duration) * 100) |
| | | var that = this |
| | | that.setData({ |
| | | progress: progress |
| | | }) |
| | | console.log('é³ä¹ææ¾è¿åº¦ä¸º' + progress + '%') |
| | | }, |
| | | }) |
New file |
| | |
| | | <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | | <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> |
| | | </view> |
| | | <view class="navbar-title">èµæºè¯¦æ
-é³é¢</view> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | | <view class="audioBox"> |
| | | <view class=""> |
| | | <image class="imageFront" src="/static/images/resourceDetailsMyAudio/cd.png" mode="aspectFit" /> |
| | | <image class=" imageAfter" src="/static/images/resourceDetailsMyAudio/video-bg.png" mode="aspectFit" /> |
| | | </view> |
| | | <view class="controlBox"> |
| | | |
| | | <image src="/static/images/resourceDetailsMyAudio/shangyizhang.png" mode="" /> |
| | | <image bindtap="audioPlay" src="/static/images/resourceDetailsMyAudio/zanting.png" mode="" /> |
| | | <image bindtap="audioPause" src="/static/images/resourceDetailsMyAudio/xiayizhang.png" mode="" /> |
| | | |
| | | |
| | | <image src="/static/images/resourceDetailsMyAudio/Full screen.png" mode="" /> |
| | | <!-- <view class="free-MusicProgress"> |
| | | <view style="width:{{progress}}%;"></view> |
| | | </view> --> |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | <audio wx:if="{{false}}" bindtimeupdate="MusicStart" poster="{{poster}}" name="{{name}}" author="{{author}}" src="{{src}}" id="myAudio" controls loop> |
| | | |
| | | |
| | | </audio> |
| | | <!-- <button type="primary" >ææ¾</button> |
| | | <button type="primary">æå</button> |
| | | <button type="primary" bindtap="audio14">设置å½åææ¾æ¶é´ä¸º14ç§</button> |
| | | <button type="primary" bindtap="audioStart">åå°å¼å¤´</button> --> |
New file |
| | |
| | | /* pages/resourceDetails/myAudio/index.wxss */ |
| | | .nacigationBar { |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | } |
| | | |
| | | .navbar-title { |
| | | white-space: nowrap; |
| | | /* overflow: hidden; */ |
| | | text-overflow: ellipsis; |
| | | color: #0F1214; |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | margin-bottom: 5rpx; |
| | | } |
| | | |
| | | .audioBox { |
| | | width: 100%; |
| | | height: 350rpx; |
| | | } |
| | | |
| | | .imageFront { |
| | | width: 300rpx; |
| | | height: 300rpx; |
| | | position: absolute; |
| | | top: 150rpx; |
| | | left: 250rpx; |
| | | } |
| | | |
| | | .imageAfter { |
| | | width: 100%; |
| | | } |
| | | |
| | | .controlBox { |
| | | width: 750rpx; |
| | | height: 96rpx; |
| | | background: #000000; |
| | | border-radius: 0rpx 0rpx 0rpx 0rpx; |
| | | opacity: 0.6; |
| | | position: relative; |
| | | } |
| | | |
| | | .controlBox image { |
| | | width: 45rpx; |
| | | height: 45rpx; |
| | | margin: 20rpx 35rpx; |
| | | } |
| | | |
| | | audio { |
| | | position: relative; |
| | | } |
| | | |
| | | .free-MusicProgress { |
| | | position: absolute; |
| | | width: 78%; |
| | | left: 21.7%; |
| | | bottom: 1px; |
| | | background: #C3C3C3; |
| | | } |
| | | |
| | | .free-MusicProgress>view { |
| | | background: #48c23d; |
| | | height: 5px; |
| | | } |
New file |
| | |
| | | // pages/resourceDetails/index.js |
| | | const app = getApp() |
| | | |
| | | Page({ |
| | | |
| | | /** |
| | | * 页é¢çåå§æ°æ® |
| | | */ |
| | | data: { |
| | | navBarHeight: '', |
| | | barHeight: '', |
| | | |
| | | tabPanelstyle: 'display:flex;justify-content:center;align-items:center;', |
| | | activeValues: [0], |
| | | dialogKey: true, |
| | | style: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx;', |
| | | activeId: '', |
| | | bookId: '', |
| | | bookName: '', |
| | | cmsId: '', |
| | | parentName: '', |
| | | parentProductLinkPath: '', |
| | | productLinkPath: '', |
| | | threeLeveData: [], |
| | | showData: '', |
| | | src: '', |
| | | selectedId: null, |
| | | topicId: '' |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å è½½ |
| | | */ |
| | | onLoad(options) { |
| | | console.log(this.data.dialogKey, 'dialogKey'); |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // è¶åä¿¡æ¯ |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // å¯¼èªæ é«åº¦ |
| | | |
| | | this.setData({ |
| | | navBarHeight: navBarHeight, |
| | | barHeight: systInfo.statusBarHeight, |
| | | activeId: options.activeId, |
| | | bookId: options.bookId, |
| | | bookName: options.bookName, |
| | | cmsId: options.cmsId, |
| | | parentName: options.parentName, |
| | | parentProductLinkPath: options.parentProductLinkPath, |
| | | productLinkPath: options.productLinkPath |
| | | }) |
| | | console.log(this.data.parentProductLinkPath, 'parentProductLinkPath'); |
| | | this.resourceDetailsData() |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å次渲æå®æ |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢æ¾ç¤º |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢éè |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * çå½å¨æå½æ°--çå¬é¡µé¢å¸è½½ |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ç¸å
³äºä»¶å¤ç彿°--çå¬ç¨æ·ä¸æå¨ä½ |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页é¢ä¸æè§¦åºäºä»¶çå¤ç彿° |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·ç¹å»å³ä¸è§å享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | onTabsChange(event) { |
| | | |
| | | }, |
| | | |
| | | onTabsClick(event) { |
| | | |
| | | }, handleChange(e) { |
| | | this.setData({ |
| | | activeValues: e.detail.value, |
| | | }); |
| | | }, |
| | | onTakeNotes() { |
| | | |
| | | }, |
| | | showDialog(e) { |
| | | const { key } = e.currentTarget.dataset; |
| | | this.setData({ [key]: true, dialogKey: key }); |
| | | }, |
| | | |
| | | closeDialog() { |
| | | |
| | | this.setData({ |
| | | dialogKey: false |
| | | }); |
| | | }, |
| | | goBack() { |
| | | wx.navigateBack(); |
| | | }, |
| | | resourceDetailsData() { |
| | | |
| | | |
| | | let query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | productId: this.data.bookId, |
| | | cmsPath: this.data.parentProductLinkPath, |
| | | itemFields: { |
| | | SysType: 'CmsFolder', |
| | | // èµæºç±»åï¼è¯è¯»æä»¶ï¼æ¯å¦å
许ä¸è½½çåæ° |
| | | selectType: [], |
| | | freeFile: [], |
| | | file: [], |
| | | protectedFile: [], |
| | | resourcesClassification: [], |
| | | isDownload: [], |
| | | jsek_resourceBrief: [], |
| | | jsek_link: [], |
| | | jsek_questionBank: [], |
| | | learnSelectType: [] |
| | | }, |
| | | pading: { |
| | | start: 0, |
| | | size: 999 |
| | | } |
| | | } |
| | | |
| | | app.MG.store.getProductDetail(query).then(res => { |
| | | console.log(res, 'res'); |
| | | |
| | | const list = [] |
| | | |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | this.data.threeLeveData.push(item) |
| | | list.push(item) |
| | | this.setData({ |
| | | threeLeveData: list |
| | | }) |
| | | |
| | | if (this.data.productLinkPath == item.productLinkPath) { |
| | | console.log(item, 'item'); |
| | | this.setData({ |
| | | showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file |
| | | }) |
| | | } |
| | | // console.log(this.data.threeLeveData, 'threeLeveData'); |
| | | }) |
| | | |
| | | }) |
| | | }, |
| | | onVideo(e) { |
| | | |
| | | this.setData({ |
| | | selectedId: e.currentTarget.dataset.index, |
| | | }) |
| | | |
| | | |
| | | |
| | | // console.log(e); |
| | | const item = e.currentTarget.dataset.item |
| | | // console.log(item); |
| | | if (item.selectType == "video") { |
| | | console.log(item.file); |
| | | this.setData({ |
| | | showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file |
| | | }) |
| | | console.log(this.data.showData); |
| | | } else { |
| | | console.log(app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file); |
| | | } |
| | | }, |
| | | |
| | | getProductUserSubmitTopicGet() { |
| | | app.MG.ugc.getProductUserSubmitTopic({ |
| | | productId: this.data.bookId, |
| | | appRefCode: app.config.appRefCode |
| | | }).then((res) => { |
| | | console.log(res); |
| | | |
| | | this.setData({ |
| | | topicId: res.id |
| | | }) |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | newTopicMessageGet() { |
| | | let query = { |
| | | topicIdOrRefCode: topicId + '', |
| | | name: titleText.value, |
| | | content: form.value.noteContent, |
| | | type: 'note', |
| | | cmsTypeRefCode: '', |
| | | newDataListRequest: [] |
| | | } |
| | | app.MG.ugc.newTopicMessage(query).then(res => { |
| | | console.log(res); |
| | | }) |
| | | }, |
| | | // currentTarget |
| | | onConfirm() { |
| | | console.log(1111); |
| | | |
| | | }, |
| | | onCancellation() { |
| | | console.log(222); |
| | | |
| | | this.data.dialogKey = false |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "component": true, |
| | | "usingComponents": { |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-tabs": "tdesign-miniprogram/tabs/tabs", |
| | | "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", |
| | | "t-collapse": "tdesign-miniprogram/collapse/collapse", |
| | | "t-collapse-panel": "tdesign-miniprogram/collapse-panel/collapse-panel", |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog", |
| | | "t-input": "tdesign-miniprogram/input/input" |
| | | }, |
| | | "navigationStyle": "custom" |
| | | } |
New file |
| | |
| | | <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | | <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> |
| | | </view> |
| | | <view class="navbar-title">èµæºè¯¦æ
-è§é¢</view> |
| | | </view> |
| | | <!-- è§é¢ ç --> |
| | | <view class="videoBox"> |
| | | <video src="{{showData}}" play-btn-position='center' object-fit='fill' controls enable-play-gesture enable-auto-rotation></video> |
| | | |
| | | </view> |
| | | |
| | | <!-- æ é¢ --> |
| | | <view class="titleBox">åºç¡æè²ç ç©¶èæ¯æ»ä½è®¾è®¡</view> |
| | | |
| | | <view class="contentBox"> |
| | | <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}}" style="width: 750rpx;"> |
| | | <view class="wrapper"> |
| | | <t-collapse value="{{activeValues}}" bind:change="handleChange"> |
| | | <t-collapse-panel header="{{parentName}}" value="{{0}}" expandIcon> |
| | | |
| | | <view class="detailsName" wx:for="{{threeLeveData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bind:tap="onVideo" data-item="{{item}}" data-index="{{index}}"> |
| | | <view style="color: {{selectedId == index ? '#ff6c00' : '#000'}}">{{item.name}}</view> |
| | | </view> |
| | | |
| | | |
| | | </t-collapse-panel> |
| | | </t-collapse> |
| | | </view> |
| | | </t-tab-panel> |
| | | <!-- ç¬è®°å±ç¤º --> |
| | | <t-tab-panel label="ç¬è®°" value="1" style="{{tabPanelstyle}}"> |
| | | <view class="wrapper"> |
| | | <t-collapse value="{{activeValues}}" bind:change="handleChange"> |
| | | <t-collapse-panel header="第1第1è¯¾æ¶ è¯¾ç¨è§é¢" value="{{0}}" expandIcon> |
| | | <view> æ¤å¤å¯èªå®ä¹å
容æ¤å¤å¯èªå®ä¹å
容æ¤å¤å¯èªå®ä¹å
容æ¤å¤å¯èªå®ä¹å
容æ¤å¤å¯èªå®ä¹å
容æ¤å¤å¯èªå®ä¹å
容æ¤å¤å¯èªå®ä¹å
容æ¤å¤å¯èªå®ä¹å
容</view> |
| | | <view class="operateBox"> |
| | | <view>2023-08-29</view> |
| | | <view class="iconBox"> |
| | | <image src="/static/images/resourceDetails/jibijiicon2.png" mode="" /> |
| | | <image src="/static/images/resourceDetails/jibijiicon3.png" mode="" /> |
| | | </view> |
| | | </view> |
| | | </t-collapse-panel> |
| | | </t-collapse> |
| | | </view> |
| | | </t-tab-panel> |
| | | </t-tabs> |
| | | |
| | | <!-- è®°ç¬è®° --> |
| | | <view class="takeNotes" data-key="showCloseBtn" bind:tap="showDialog"> |
| | | <view class="takeNotesLining"> |
| | | <image src="/static/images/resourceDetails/jibijii.png" mode="" /> è®°ç¬è®° |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <!-- è®°ç¬è®°å¼¹çª --> |
| | | <t-dialog visible="{{showCloseBtn}}" close-btn bind:confirm="closeDialog" bind:cancel="closeDialog"> |
| | | <view slot='title' class="dialogTitleBox">ä¸ãéå¾·ä¸åå¾·çå
³ç³»-æè¯ç |
| | | <image class="titleImageBox" src="/static/images/resourceDetails/edit.png" alt="" /> |
| | | </view> |
| | | <view slot='content'> |
| | | <view class="input-example"> |
| | | <view class="input-example__label"> å
容 </view> |
| | | <t-input class="inputBox" placeholder="请è¾å
¥æå" borderless="{{true}}" style="{{style}}" /> |
| | | </view> |
| | | <view class="buttonBox"> |
| | | <view> |
| | | <t-button bind:tap="onCancellation" style="margin: 20rpx 30rpx;" variant="outline" size="extra-small">åæ¶</t-button> |
| | | <t-button bind:tap="onConfirm" style="margin: 20rpx 30rpx;" theme="primary" size="extra-small">确认</t-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </t-dialog> |
New file |
| | |
| | | /* pages/resourceDetails/index.wxss */ |
| | | .nacigationBar { |
| | | background-color: #fff; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | } |
| | | |
| | | .navbar-title { |
| | | white-space: nowrap; |
| | | /* overflow: hidden; */ |
| | | text-overflow: ellipsis; |
| | | color: #0F1214; |
| | | font-size: 40rpx; |
| | | font-weight: bold; |
| | | margin-bottom: 5rpx; |
| | | } |
| | | |
| | | .videoBox { |
| | | width: 100%; |
| | | } |
| | | |
| | | .videoBox video { |
| | | width: 100vw; |
| | | } |
| | | |
| | | .titleBox { |
| | | margin: 30rpx; |
| | | border-bottom: 1px #f4f4f4 solid; |
| | | padding-bottom: 20rpx; |
| | | font-weight: bold; |
| | | |
| | | } |
| | | |
| | | .contentBox { |
| | | position: relative; |
| | | } |
| | | |
| | | .contentBox .custom-tabs { |
| | | /* margin-bottom: 32rpx; */ |
| | | width: 400rpx; |
| | | } |
| | | |
| | | |
| | | .t-tabs__content { |
| | | width: 750rpx !important; |
| | | overflow: auto !important; |
| | | } |
| | | |
| | | |
| | | .custom-panel { |
| | | /* height: 120px; */ |
| | | width: 750rpx; |
| | | /* height: 200rpx; */ |
| | | |
| | | } |
| | | |
| | | .contentBox .takeNotes { |
| | | |
| | | position: absolute; |
| | | top: 5rpx; |
| | | right: 0; |
| | | width: 350rpx; |
| | | border-bottom: 1px solid #f4f4f4; |
| | | |
| | | } |
| | | |
| | | .takeNotes image { |
| | | width: 30rpx; |
| | | height: 30rpx; |
| | | margin-top: 10rpx; |
| | | margin-right: 10rpx; |
| | | } |
| | | |
| | | .takeNotesLining { |
| | | margin: 25rpx; |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | } |
| | | |
| | | .operateBox { |
| | | display: flex; |
| | | align-items: flex-end; |
| | | justify-content: space-between; |
| | | |
| | | } |
| | | |
| | | .iconBox { |
| | | display: flex; |
| | | } |
| | | |
| | | .iconBox image { |
| | | width: 26rpx; |
| | | height: 26rpx; |
| | | margin: 0 10rpx; |
| | | } |
| | | |
| | | .t-dialog__content { |
| | | padding: 0 !important; |
| | | } |
| | | |
| | | .titleImageBox { |
| | | width: 40rpx; |
| | | height: 40rpx; |
| | | margin-left: 20rpx; |
| | | } |
| | | |
| | | .dialogTitleBox { |
| | | margin: 30rpx; |
| | | border-bottom: 1px #f4f4f4 solid; |
| | | padding-bottom: 20rpx; |
| | | font-weight: bold; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .input-example { |
| | | --td-input-vertical-padding: 24rpx; |
| | | |
| | | background-color: #fff; |
| | | padding: 32rpx 32rpx 16rpx; |
| | | } |
| | | |
| | | .input-example__label { |
| | | color: rgba(0, 0, 0, 0.9); |
| | | font-size: 24rpx; |
| | | line-height: 40rpx; |
| | | margin: 0 8rpx 16rpx; |
| | | } |
| | | |
| | | .buttonBox { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | |
| | | } |
| | | |
| | | /* .inputBox { |
| | | height: 500rpx; |
| | | } */ |
| | | |
| | | |
| | | .detailsName { |
| | | margin: 30rpx; |
| | | width: 90%; |
| | | height: 60rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | background: #F4F4F4; |
| | | padding-left: 20rpx; |
| | | } |
| | | |
| | | .detailsName:hover { |
| | | background-color: #fff0e6; |
| | | width: 90%; |
| | | height: 60rpx; |
| | | color: #ff6c00; |
| | | } |
| | | |
| | | .audioBox { |
| | | width: 750rpx; |
| | | height: 200rpx; |
| | | } |
| | |
| | | |
| | | <view class="bookDataForBox" wx:for="{{bookData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | <view class="imageBox"> |
| | | <image src="{{item.icon}}" mode="" /> |
| | | <image src="{{item.icon}}" mode="aspectFill" /> |
| | | </view> |
| | | <view class="bookDataNmae"> |
| | | {{item.name}} |