| | |
| | | }, |
| | | resourceDetailsData() { |
| | | this.setData({ |
| | | videoLoaidng: true |
| | | videoLoaidng: true, |
| | | loading: true |
| | | }) |
| | | let query = { |
| | | storeInfo: this.data.storeInfo, |
| | |
| | | }, |
| | | // 获取笔记列表 |
| | | async getNoteList() { |
| | | // this.setData({ |
| | | // loading: true |
| | | // }) |
| | | this.setData({ |
| | | loading: true |
| | | }) |
| | | let topicId |
| | | await app.MG.ugc |
| | | .getProductUserSubmitTopic({ |
| | |
| | | <import src="index.skeleton.wxml" /> |
| | | <template is="skeleton" wx:if="{{loading}}" /> |
| | | |
| | | <view wx:if="{{!loading}}"> |
| | | <view> |
| | | <!-- <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 100%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | |
| | | <t-tabs defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel" split="{{false}}"> |
| | | <!-- 资源列表 --> |
| | | <t-tab-panel label="资源列表" value="0" style="{{tabPanelstyle}}" style="width: 750rpx"> |
| | | <view class="wrapper"> |
| | | <view class="demo-section__content" wx:if="{{loading}}"> |
| | | <t-skeleton theme="paragraph" animation="gradient" loading="true"></t-skeleton> |
| | | </view> |
| | | <view class="wrapper" wx:if="{{!loading}}"> |
| | | <view class="outsideDetailsName"> |
| | | <view class="titleBox">{{parentName}}</view> |
| | | <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> |
| | | </view> |
| | | </view> |
| | | |
| | | </t-tab-panel> |
| | | <!-- 笔记展示 --> |
| | | <t-tab-panel label="笔记" value="1" style="{{tabPanelstyle}}"> |
| | |
| | | /* pages/resourceDetails/index.wxss */ |
| | | @import "./index.skeleton.wxss"; |
| | | |
| | | .nacigationBar { |
| | | background-color: #fff; |
| | | display: flex; |
| | |
| | | overflow-x: hidden; |
| | | height: 50vh; |
| | | } |
| | | |
| | | .demo-section__content { |
| | | margin: 40rpx; |
| | | } |
| | |
| | | // pages/bibliographyList/index.js |
| | | import Toast from 'tdesign-miniprogram/toast/index'; |
| | | const app = getApp() |
| | | const config = |
| | | import { |
| | | loginInfo |
| | | } from '../../assets/js/login'; |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | }); |
| | | }, |
| | | }) |
| | | |
| | | this.ceShi() |
| | | }, |
| | | |
| | | /** |
| | |
| | | */ |
| | | onShow() { |
| | | // console.log(this.data.value); |
| | | |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | if (data) { |
| | | this.getUserInfo() |
| | | } |
| | | }) |
| | | } else { |
| | | this.getUserInfo() |
| | | } |
| | | }, |
| | | |
| | | /** |
| | |
| | | onShareAppMessage() { |
| | | |
| | | }, |
| | | // 获取登录用户身份 |
| | | getUserInfo() { |
| | | app.MG.identity.getCurrentAppUser().then(res => { |
| | | // 用户信息优先级:教师认证 > 微信 > 学生(注册时默认) |
| | | if (res) { |
| | | //获取用户类型 |
| | | let teacherRole = res.roleLinks.find((item) => item.role.refCode == 'teacher') |
| | | let teacherInfos = res.infoList.find((item) => item.type == 'teacherInfo') |
| | | let eMailData = res.secretList.find(i => i.type == 'EMail') |
| | | if (eMailData) { |
| | | this.setData({ |
| | | input: eMailData.credential |
| | | }) |
| | | } else if (teacherRole && teacherInfos) { |
| | | this.setData({ |
| | | input: JSON.parse(teacherInfos.data).email |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | input: '' |
| | | }) |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | onTabsChange(event) { |
| | | const value = event.detail.value |
| | | this.setData({ |
| | |
| | | input: e.detail.value |
| | | }) |
| | | }, |
| | | ceShi() { |
| | | let that = this; |
| | | // 获取Storage中的数据 |
| | | wx.getStorage({ |
| | | key: 'website-front-userInfo', |
| | | success(res) { |
| | | let datas = JSON.parse(res.data) |
| | | console.log(datas.Email); |
| | | let personalData = JSON.parse(datas.data) |
| | | |
| | | that.setData({ |
| | | input: datas.Email |
| | | }) |
| | | console.log(that.data.value); |
| | | }, |
| | | fail(err) { |
| | | console.error(err); |
| | | } |
| | | }); |
| | | |
| | | } |
| | | }) |
| | |
| | | }); |
| | | console.log(this.data.searchVal) |
| | | this.loadHomePage(); |
| | | this.getBannerList() |
| | | |
| | | }, |
| | | |
| | | onLoad() { |
| | | this.getBannerList() |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | |
| | | }, |
| | | getBookList() { |
| | | const obj = { |
| | | storeInfo: app.config.jslx, |
| | | // storeInfo: app.config.jslx, |
| | | path: "*", |
| | | queryType: '*', |
| | | coverSize: { |
| | |
| | | console.log(res.datas, '图书信息') |
| | | let book = res.datas[0] |
| | | wx.redirectTo({ |
| | | url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}&storeInfo=${app.config.jslx}`, |
| | | url: `/packageBookService/pages/bookServices/detail/index?id=${book.id}&name=${book.name}`, |
| | | }); |
| | | }) |
| | | }, |
| | |
| | | { |
| | | "usingComponents": { |
| | | "t-loading": "tdesign-miniprogram/loading/loading" |
| | | "t-loading": "tdesign-miniprogram/loading/loading", |
| | | "t-skeleton": "tdesign-miniprogram/skeleton/skeleton" |
| | | } |
| | | } |
| | |
| | | <!--pages/index/bookDetail.wxml--> |
| | | <view class="box"> |
| | | <t-loading theme="circular" size="60rpx" text="加载中" layout="vertical" class="wrapper" /> |
| | | <t-skeleton theme="paragraph" animation="gradient" loading="true"></t-skeleton> |
| | | </view> |
| | |
| | | height: 100vh; |
| | | padding: 200rpx 0; |
| | | text-align: center; |
| | | margin: 40rpx; |
| | | } |
| | |
| | | |
| | | getBookInfo(refcode) { |
| | | const obj = { |
| | | storeInfo: app.config.jslx, |
| | | path: app.config.jslx, |
| | | storeInfo: app.config.goodsStore, |
| | | path: app.config.goodsStore, |
| | | queryType: 'ProductCmsItem', |
| | | SysType: "CmsItem", |
| | | RefCode: refcode, |
| | |
| | | formPath: book.learnSelectType ? 'jsek_cloudLearning' : '' |
| | | }) |
| | | wx.redirectTo({ |
| | | url: `${url}?productLinkPath=${this.data.productLinkPath}&parentProductLinkPath=${this.data.parentProductLinkPath}&bookId=${book.productLinkInfo.ProductId}&activeId=${book.id}&bookName=${book.productLinkInfo.Name}&cmsId=${book.id}&storeInfo=${book.storeInfo}&formPath=${this.data.formPath}`, |
| | | url: `${url}?productLinkPath=${this.data.productLinkPath}&parentProductLinkPath=${this.data.parentProductLinkPath}&bookId=${book.productLinkInfo.ProductId}&activeId=${book.id}&bookName=${book.productLinkInfo.Name}&cmsId=${book.id}&formPath=${this.data.formPath}`, |
| | | }); |
| | | |
| | | if (book.selectType == "pdf" || book.selectType == 'document') { |
| | |
| | | { |
| | | "usingComponents": { |
| | | "t-loading": "tdesign-miniprogram/loading/loading" |
| | | "t-loading": "tdesign-miniprogram/loading/loading", |
| | | "t-skeleton": "tdesign-miniprogram/skeleton/skeleton" |
| | | } |
| | | } |
| | |
| | | </view> |
| | | <web-view wx:if="{{webpageSrc}}" src="{{webpageSrc}}"></web-view> |
| | | <view class="box" wx:if='{{!copyUrl && !webpageSrc}}'> |
| | | <t-loading theme="circular" size="60rpx" text="加载中" layout="vertical" class="wrapper" /> |
| | | <t-skeleton theme="paragraph" animation="gradient" loading="true"></t-skeleton> |
| | | </view> |
| | |
| | | height: 100vh; |
| | | padding: 200rpx 0; |
| | | text-align: center; |
| | | margin: 40rpx; |
| | | } |
| | |
| | | this.data.rootCmsItemId |
| | | }&idPathList=${JSON.stringify(idPathList)}&answerTitle=${ |
| | | this.data.answerTitle |
| | | }&answerType=${"option"}&storeInfo=${book.storeInfo}`, |
| | | }&answerType=${"option"}`, |
| | | }); |
| | | }) |
| | | }, |
| | |
| | | { |
| | | "usingComponents": { |
| | | "t-loading": "tdesign-miniprogram/loading/loading" |
| | | "t-loading": "tdesign-miniprogram/loading/loading", |
| | | "t-skeleton": "tdesign-miniprogram/skeleton/skeleton" |
| | | } |
| | | } |
| | |
| | | <!--pages/test/testCover.wxml--> |
| | | <view class="box"> |
| | | <t-loading theme="circular" size="60rpx" text="加载中" layout="vertical" class="wrapper" /> |
| | | <t-skeleton theme="paragraph" animation="gradient" loading="true"></t-skeleton> |
| | | </view> |
| | |
| | | height: 100vh; |
| | | padding: 200rpx 0; |
| | | text-align: center; |
| | | margin: 40rpx; |
| | | } |