| | |
| | | { |
| | | "pages": [ |
| | | "pages/home/home", |
| | | "pages/home/digitalRead/index", |
| | | "pages/retrievalPage/index", |
| | | "pages/cart/paymentPage/index", |
| | | "pages/student/index", |
| | |
| | | export const requestCtx = "http://182.92.203.7:3001"; // 请求地址 |
| | | export const appId = 27; |
| | | // export const requestCtx = "https://jsek.bnuic.com" // 请求地址 |
| | | // export const appId = 3; |
| | | // export const requestCtx = "http://182.92.203.7:3001"; // 请求地址 |
| | | // export const appId = 27; |
| | | export const requestCtx = "https://jsek.bnuic.com" // 请求地址 |
| | | export const appId = 3; |
| | | // export const epubUrl = "http://182.92.203.7:3007/epubReadMobile/"; |
| | | export const epubUrl = "http://jsysf.bnuic.com/epubReadMobile/#/"; |
| | | export const requestTimeOut = 300000; // 请求超时时间 |
| | |
| | | export const digitalCourses = "jsek_digitalCourses"; //数字课程 |
| | | export const digitalTextbooks = "jsek_digitalTextbooks"; //数字教材 |
| | | export const seminar = "jsek_seminar"; //专题研讨 |
| | | // export const seminar ="jsek_seminar";//书展 |
| | | export const digitalRead = "jsek_digitalReading"; //数字阅读 |
| | | |
| | | export const reg_tel = |
| | | /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; // 电话号正则 |
| | |
| | | digitalCourses, |
| | | digitalTextbooks, |
| | | seminar, |
| | | digitalRead, |
| | | reg_tel, |
| | | reg_telphone, |
| | | epubUrl, |
| | |
| | | // 用户信息优先级:教师认证 > 微信 > 学生(注册时默认) |
| | | if (res) { |
| | | let defaultUser = {}; |
| | | let nickNameData = res.infoList.find((item) => item.type == 'nickName') |
| | | let WeChatInfo = res.infoList.find((item) => item.type === "WeChat"); |
| | | let teacherRole = res.roleLinks.find((item) => item.role.refCode == 'teacher') |
| | | let teacherInfos = res.infoList.find((item) => item.type == 'teacherInfo') |
| | | let phoneNumber = res.secretList.find(i => i.type == 'MobilePhone') |
| | | if (WeChatInfo) { |
| | | if (teacherRole && teacherInfos) { |
| | | defaultUser = { |
| | | nickName: WeChatInfo.name, |
| | | avatarUrl: WeChatInfo.icon, |
| | | ...teacherInfos, |
| | | nickName: nickNameData && JSON.parse(nickNameData.data).nickName ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name, |
| | | icon: nickNameData && JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | userId: res.userId, |
| | | role: 'Teacher', |
| | | roleId: teacherRole.role.id, |
| | | } |
| | | } else if (WeChatInfo) { |
| | | defaultUser = { |
| | | nickName: nickNameData && JSON.parse(nickNameData.data).nickName ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name, |
| | | icon: nickNameData && JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | weChatId: WeChatInfo.id, |
| | | userId: res.userId, |
| | | } |
| | |
| | | tokenKey |
| | | } from "../../config"; |
| | | import toolClass from "../../toolClass"; |
| | | let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : ''; |
| | | const ugcApi = { |
| | | // 获取商品点赞Topic |
| | | getProductLikesTopic(data) { |
| | | let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : ''; |
| | | return request({ |
| | | url: token ? |
| | | "/ugc/api/ApiAppUserGetProductLikesTopic" : "/ugc/api/ApiGetProductLikesTopic", |
| | |
| | | |
| | | // 获取商品评论Topic |
| | | getProductCommentTopic(data) { |
| | | let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : ''; |
| | | return request({ |
| | | url: token ? |
| | | "/ugc/api/ApiAppUserGetProductCommentTopic" : "/ugc/api/ApiGetProductCommentTopic", |
| | |
| | | |
| | | // 获取MessageList |
| | | getTopicMessageList(data) { |
| | | let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : ''; |
| | | return request({ |
| | | url: token ? |
| | | "/ugc/api/ApiAppUserGetTopicMessageList" : "/ugc/api/ApiGetTopicMessageList", |
| | |
| | | import { requestCtx } from "../config"; |
| | | import { |
| | | requestCtx |
| | | } from "../config"; |
| | | // import defaultImg from "../../../images/default-book-img.png" |
| | | import moment from 'moment' |
| | | // 处理列表查询结果 |
| | |
| | | } |
| | | if (subItem.productLinkInfo && subItem.productLinkInfo.length) |
| | | subItem.productLinkPath = |
| | | subItem.productLinkInfo[0].LinkPath + |
| | | "\\" + |
| | | subItem.productLinkInfo[0].CmsItemId; |
| | | subItem.productLinkInfo[0].LinkPath + |
| | | "\\" + |
| | | subItem.productLinkInfo[0].CmsItemId; |
| | | if (subItem.linkInfo && subItem.linkInfo.length) |
| | | subItem.linkPath = |
| | | subItem.linkInfo[0].LinkPath + "\\" + subItem.linkInfo[0].CmsItemId; |
| | | subItem.linkInfo[0].LinkPath + "\\" + subItem.linkInfo[0].CmsItemId; |
| | | } |
| | | linkItemsMap[tag] = sdata.datas; |
| | | } |
| | |
| | | item.linkRepoId = item.datas.LinkRepository; |
| | | item.childrenCount = parseInt(item.datas.ChildrenCount ?? "0"); |
| | | (item.childrenFolderCount = parseInt(item.datas.ChildrenFolderCount ?? "0")), |
| | | (item.childrenChannelCount = parseInt( |
| | | item.datas.ChildrenChannelCount ?? "0" |
| | | )), |
| | | (item.linkId = parseInt(item.datas.LinkId)); |
| | | (item.childrenChannelCount = parseInt( |
| | | item.datas.ChildrenChannelCount ?? "0" |
| | | )), |
| | | (item.linkId = parseInt(item.datas.LinkId)); |
| | | item.linkOrg = JSON.parse(item.datas.LinkOrg ?? "[]")[0]; |
| | | item.linkDepartment = JSON.parse(item.datas.LinkDepartment ?? "[]")[0]; |
| | | item.linkInfo = JSON.parse(item.datas.LinkInfo ?? "[]"); |
| | |
| | | if (width) src += `&width=${width}`; |
| | | if (height) src += `&height=${height}`; |
| | | return src; |
| | | } |
| | | } |
| | |
| | | <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> |
| | | <t-toast id="t-toast" /> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="book" |
| | | bindscrolltolower="onReachBottom" |
| | | > |
| | | <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"> |
| | | <image |
| | | loading="" |
| | | src="{{bookDetail.icon ? bookDetail.icon : '/static/images/default-book-img.png'}}" |
| | | mode="aspectFill" |
| | | aria-label="{{bookDetail.name}}" |
| | | /> |
| | | <image loading="" src="{{bookDetail.icon ? bookDetail.icon : '/static/images/default-book-img.png'}}" mode="aspectFill" aria-label="{{bookDetail.name}}" /> |
| | | </view> |
| | | <view class="book-use"> |
| | | <view class="collect" bind:tap="setCollect"> |
| | | <view> |
| | | <image |
| | | loading="" |
| | | src="/static/images/bookService/detail/collect.png" |
| | | wx:if="{{!bookDetail.isFavourite}}" |
| | | /> |
| | | <image |
| | | loading="" |
| | | src="/static/images/bookService/detail/collecting.png" |
| | | wx:if="{{bookDetail.isFavourite}}" |
| | | /> |
| | | <image loading="" src="/static/images/bookService/detail/collect.png" wx:if="{{!bookDetail.isFavourite}}" /> |
| | | <image loading="" src="/static/images/bookService/detail/collecting.png" wx:if="{{bookDetail.isFavourite}}" /> |
| | | </view> |
| | | <view class="use-title">收藏</view> |
| | | </view> |
| | | <view class="suggest" bind:tap="suggestBtn"> |
| | | <view> |
| | | <image |
| | | loading="" |
| | | src="/static/images/bookService/detail/suggest.png" |
| | | /> |
| | | <image loading="" src="/static/images/bookService/detail/suggest.png" /> |
| | | </view> |
| | | <view class="use-title">我要建议</view> |
| | | </view> |
| | |
| | | <view class="li-content">{{bookDetail.isbn}}</view> |
| | | </view> |
| | | <view class="message-li"> |
| | | <view class="li-title" wx:if="{{bookDetail.publicationDate}}" |
| | | >出版时间:</view |
| | | > |
| | | <view class="li-title" wx:if="{{bookDetail.publicationDate}}">出版时间:</view> |
| | | <view class="li-content">{{bookDetail.publicationDate}}</view> |
| | | </view> |
| | | <view |
| | | class="message-li" |
| | | wx:if="{{bookDetail.class}}" |
| | | style="height: 80rpx" |
| | | > |
| | | <view class="message-li" wx:if="{{bookDetail.class}}" style="height: 80rpx"> |
| | | <view class="li-title">图书分类:</view> |
| | | <view class="class-name showTow">{{bookDetail.class}}</view> |
| | | </view> |
| | | </view> |
| | | <image |
| | | src="/static/images/bookService/detail/square.png" |
| | | class="right-background" |
| | | /> |
| | | <image src="/static/images/bookService/detail/square.png" class="right-background" /> |
| | | </view> |
| | | </view> |
| | | <!-- 销售信息 --> |
| | |
| | | <!-- 电子书售价 --> |
| | | <view class="electron-price" wx:if="{{bookDetail.price}}"> |
| | | <view> |
| | | <image |
| | | src="/static/images/bookService/detail/electon-price.png" |
| | | /> |
| | | <image src="/static/images/bookService/detail/electon-price.png" /> |
| | | </view> |
| | | <view class="price"> |
| | | <view class="price-text" |
| | | >{{bookDetail.price == '0.00' ? '免费' : '¥'+ |
| | | bookDetail.price}}</view |
| | | > |
| | | <view class="price-old" wx:if="{{bookDetail.oldPrice != '0.00'}}" |
| | | >¥{{bookDetail.oldPrice}} |
| | | <view class="price-text">{{bookDetail.price == '0.00' ? '免费' : '¥'+ |
| | | bookDetail.price}}</view> |
| | | <view class="price-old" wx:if="{{bookDetail.oldPrice != '0.00'}}">¥{{bookDetail.oldPrice}} |
| | | </view> |
| | | </view> |
| | | <view> </view> |
| | |
| | | <view> |
| | | <image src="/static/images/bookService/detail/paper-price.png" /> |
| | | </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"> |
| | | <image |
| | | src="/static/images/bookService/detail/jd.png" |
| | | wx:if="{{bookDetail.JDLink}}" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.JDLink}}" |
| | | data-type="jd" |
| | | /> |
| | | <image |
| | | class="tmall-image" |
| | | src="/static/images/bookService/detail/tmall.png" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.tmallLink}}" |
| | | wx:if="{{bookDetail.tmallLink}}" |
| | | /> |
| | | <image |
| | | src="/static/images/bookService/detail/dangdang.png" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.dangdangLink}}" |
| | | wx:if="{{bookDetail.dangdangLink}}" |
| | | /> |
| | | <image |
| | | src="/static/images/bookService/detail/weidian.png" |
| | | bind:tap="goShop" |
| | | data-link="{{bookDetail.weidianLink}}" |
| | | wx:if="{{bookDetail.weidianLink}}" |
| | | /> |
| | | <image src="/static/images/bookService/detail/jd.png" wx:if="{{bookDetail.JDLink}}" bind:tap="goShop" data-link="{{bookDetail.JDLink}}" data-type="jd" /> |
| | | <image class="tmall-image" src="/static/images/bookService/detail/tmall.png" bind:tap="goShop" data-link="{{bookDetail.tmallLink}}" wx:if="{{bookDetail.tmallLink}}" /> |
| | | <image src="/static/images/bookService/detail/dangdang.png" bind:tap="goShop" data-link="{{bookDetail.dangdangLink}}" wx:if="{{bookDetail.dangdangLink}}" /> |
| | | <image src="/static/images/bookService/detail/weidian.png" bind:tap="goShop" data-link="{{bookDetail.weidianLink}}" wx:if="{{bookDetail.weidianLink}}" /> |
| | | </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-tab-panel |
| | | label="图书简介" |
| | | icon="{{ tabValue == 'brief' ? briefIconClick : briefIcon}}" |
| | | value="brief" |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | <book-brief |
| | | content="{{bookDetail.content}}" |
| | | authorIntroduction="{{bookDetail.authorIntroduction}}" |
| | | wx:if="{{bookDetail.content || bookDetail.authorIntroduction}}" |
| | | ></book-brief> |
| | | <view |
| | | wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction}}" |
| | | class="noData" |
| | | > |
| | | <t-tabs defaultValue="{{tabValue}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel" class="tab-class"> |
| | | <t-tab-panel label="图书简介" icon="{{ tabValue == 'brief' ? briefIconClick : briefIcon}}" value="brief" style="{{tabPanelstyle}}"> |
| | | <book-brief content="{{bookDetail.content}}" authorIntroduction="{{bookDetail.authorIntroduction}}" wx:if="{{bookDetail.content || bookDetail.authorIntroduction}}"></book-brief> |
| | | <view wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | </t-tab-panel> |
| | |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | </t-tab-panel> --> |
| | | <t-tab-panel |
| | | label="教学资源" |
| | | icon="{{tabValue == 'jsek_teachingResources' ? teachResourcesClickIcon : teachResourcesIcon}}" |
| | | value="jsek_teachingResources" |
| | | class="{{loading ? 'loading': ''}}" |
| | | > |
| | | <view |
| | | wx:if="{{!loading && teach.length && !noResources && applyState}}" |
| | | > |
| | | <teach-resource |
| | | applyState="{{applyState}}" |
| | | rejectCause="{{rejectCause}}" |
| | | deadline="{{deadline}}" |
| | | bind:applyResource="applyResource" |
| | | applyResourceLoading="{{applyResourceLoading}}" |
| | | ></teach-resource> |
| | | <tree |
| | | id="teach-tree" |
| | | openIds="{{openTeachids}}" |
| | | bookInfo="{{bookDetail}}" |
| | | treeList="{{teach}}" |
| | | tab="{{tabValue}}" |
| | | applyState="{{applyState}}" |
| | | bind:downloadTeach="downloadTeach" |
| | | bind:handleTree="handleTree" |
| | | openTeachids="{{openTeachids}}" |
| | | wx:if="{{teach.length}}" |
| | | ></tree> |
| | | <t-tab-panel label="教学资源" icon="{{tabValue == 'jsek_teachingResources' ? teachResourcesClickIcon : teachResourcesIcon}}" value="jsek_teachingResources" class="{{loading ? 'loading': ''}}"> |
| | | <view wx:if="{{!loading && teach.length && !noResources && applyState}}"> |
| | | <teach-resource applyState="{{applyState}}" rejectCause="{{rejectCause}}" deadline="{{deadline}}" bind:applyResource="applyResource" applyResourceLoading="{{applyResourceLoading}}"></teach-resource> |
| | | <tree id="teach-tree" openIds="{{openTeachids}}" bookInfo="{{bookDetail}}" treeList="{{teach}}" tab="{{tabValue}}" applyState="{{applyState}}" bind:downloadTeach="downloadTeach" bind:handleTree="handleTree" openTeachids="{{openTeachids}}" wx:if="{{teach.length}}"></tree> |
| | | </view> |
| | | <t-loading |
| | | theme="circular" |
| | | size="60rpx" |
| | | class="loading" |
| | | loading="{{loading }}" |
| | | /> |
| | | <t-loading theme="circular" size="60rpx" class="loading" loading="{{loading }}" /> |
| | | <view wx:if="{{noResources}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel |
| | | label="云学习" |
| | | icon="{{tabValue == 'jsek_cloudLearning' ? learnResourceClickIcon : learnResourceIcon}}" |
| | | value="jsek_cloudLearning" |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | <t-tab-panel label="云学习" icon="{{tabValue == 'jsek_cloudLearning' ? learnResourceClickIcon : learnResourceIcon}}" value="jsek_cloudLearning" style="{{tabPanelstyle}}"> |
| | | <view wx:if="{{!loading && learn.length}}"> |
| | | <learn-resource |
| | | bind:getFreeResource="getFreeResource" |
| | | bind:allAddShoppiingCar="allAddShoppiingCar" |
| | | id="learn-resource" |
| | | buyResourceData="{{buyResourceData}}" |
| | | bookId="{{bookDetail.id}}" |
| | | ></learn-resource> |
| | | <tree |
| | | id="tree" |
| | | openIds="{{openLearnids}}" |
| | | bookInfo="{{bookDetail}}" |
| | | tab="{{tabValue}}" |
| | | treeList="{{learn}}" |
| | | buyIds="{{buyIdList}}" |
| | | openLearnids="{{openLearnids}}" |
| | | ></tree> |
| | | <learn-resource bind:getFreeResource="getFreeResource" bind:allAddShoppiingCar="allAddShoppiingCar" id="learn-resource" buyResourceData="{{buyResourceData}}" bookId="{{bookDetail.id}}"></learn-resource> |
| | | <tree id="tree" openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}"></tree> |
| | | </view> |
| | | <view wx:if="{{noResources}}" class="noData"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel |
| | | label="云测试" |
| | | icon="{{tabValue == 'questionBank' ? testResourceClickIocn : testResourceIocn}}" |
| | | value="questionBank" |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | <t-tab-panel label="云测试" icon="{{tabValue == 'questionBank' ? testResourceClickIocn : testResourceIocn}}" value="questionBank" style="{{tabPanelstyle}}"> |
| | | <view wx:if="{{!loading}}"> |
| | | <test-resource |
| | | list="{{test}}" |
| | | bookInfo="{{bookDetail}}" |
| | | mockData="{{mockData}}" |
| | | bind:buyMock="buyMock" |
| | | ></test-resource> |
| | | <test-resource list="{{test}}" bookInfo="{{bookDetail}}" mockData="{{mockData}}" bind:buyMock="buyMock"></test-resource> |
| | | </view> |
| | | </t-tab-panel> |
| | | <t-tab-panel |
| | | label="云笔记" |
| | | icon="{{tabValue == 'jsek_note' ? noteClickIcon: noteIcon}}" |
| | | value="jsek_note" |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | <t-tab-panel label="云笔记" icon="{{tabValue == 'jsek_note' ? noteClickIcon: noteIcon}}" value="jsek_note" style="{{tabPanelstyle}}"> |
| | | <note bookInfo="{{bookDetail}}" id="note" class="note-list"></note> |
| | | </t-tab-panel> |
| | | </t-tabs> |
| | | </view> |
| | | </scroll-view> |
| | | <!-- 我要建议弹窗 --> |
| | | <suggest |
| | | class="suggest-component" |
| | | id="suggest-component" |
| | | bookIcon="{{bookDetail.icon}}" |
| | | bookName="{{bookDetail.name}}" |
| | | ></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" |
| | | /> |
| | | <t-dialog class="teachDownloadDialog" visible="{{isShowTeachDownload}}" title="提示" content="请前往PC端下载" confirm-btn="{{ confirmBtn }}" bind:confirm="closeTeachDownload" /> |
| | | |
| | | <view class="applyBox" bindtap="goApply"> |
| | | <view class="box"> |
| | | <t-image |
| | | src="/static/images/home/yangshuForm1.png" |
| | | mode="heightFix" |
| | | class="img" |
| | | /> |
| | | <t-image src="/static/images/home/yangshuForm1.png" mode="heightFix" class="img" /> |
| | | <view class="num" wx:if="{{num > 0}}">{{num}}</view> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="box-bottom"> |
| | | <view class="bottom-btn" bind:tap="appplyElectronicBook"> |
| | | <view> |
| | | <t-image |
| | | loading="" |
| | | src="/static/images/bookService/detail/ebook.png" |
| | | ></t-image> |
| | | <t-image loading="" src="/static/images/bookService/detail/ebook.png"></t-image> |
| | | </view> |
| | | <view class="btn-text">电子样书申请</view> |
| | | </view> |
| | | <view class="bottom-btn" bind:tap="appplyPaperBook"> |
| | | <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 class="bottom-btn tryRead" bind:tap="goRead" wx:if="{{!bookBuy}}"> |
| | | <view> |
| | | <t-image src="/static/images/bookService/detail/shidu.png"></t-image> |
| | | </view> |
| | | <view class="btn-text">试读</view> |
| | | </view> |
| | | |
| | | <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" |
| | | >加入购物车</view |
| | | > |
| | | <view class="buy buyColor" bind:tap="buyBtn">立即购买</view> |
| | | <view |
| | | class="buy shopCarColor" |
| | | bind:tap="goRead" |
| | | wx:if="{{tabValue == 'brief' && bookBuy}}" |
| | | >立即查看</view |
| | | > |
| | | <view |
| | | class="buy shopCarColor" |
| | | bind:tap="goRead" |
| | | wx:if="{{tabValue == 'brief' && !bookBuy}}" |
| | | >在线试读</view |
| | | > |
| | | <view class="shopCar shopCarColor" bind:tap="addBookShopcCar" wx:if="{{!bookBuy}}">加入购物车</view> |
| | | <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{!bookBuy}}">立即购买</view> |
| | | <view class="buy read" bind:tap="goRead" wx:if="{{bookBuy}}">立即查看</view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="loading" wx:if="{{pageLoading}}"> |
| | | <t-loading loading="{{pageLoading}}" size="40"></t-loading> |
| | | </view> |
| | | </view> |
| | |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .tryRead { |
| | | width: 120rpx; |
| | | } |
| | | |
| | | .btn-text { |
| | | font-size: 24rpx; |
| | | color: #010101; |
| | |
| | | margin-bottom: 6rpx; |
| | | } |
| | | |
| | | .bottom-btn:nth-child(1) { |
| | | .bottom-btn:nth-child(1), |
| | | .bottom-btn:nth-child(2) { |
| | | border-right: 1px solid #DDD; |
| | | } |
| | | |
| | |
| | | |
| | | tabClick(item) { |
| | | let that = this; |
| | | that.setData({ |
| | | bookList: [] |
| | | }) |
| | | if (item.detail.value == '1') { |
| | | that.setData({ |
| | | active: item.detail.value, |
| | |
| | | electronicBookList: [], |
| | | bookList: [], |
| | | }) |
| | | wx.setStorageSync("electronicBookList", that.data.electronicBookList); |
| | | wx.setStorageSync("electronicBookList", []); |
| | | } else { |
| | | that.setData({ |
| | | paperBookList: [], |
| | | bookList: [], |
| | | }) |
| | | wx.setStorageSync("paperBookList", that.data.paperBookList); |
| | | wx.setStorageSync("paperBookList", []); |
| | | } |
| | | wx.showModal({ |
| | | title: '提示!', //提示的标题 |
| | |
| | | //高级分类选择 |
| | | onChangeIcon(e) { |
| | | this.setData({ |
| | | assortCheck: { |
| | | code: e.detail.value, |
| | | }, |
| | | 'assortCheck.code': e.detail.value, |
| | | stairCode: '', |
| | | secondCode: '', |
| | | path: `${e.detail.value}`, |
| | |
| | | <view class="srcolbox"> |
| | | <t-dropdown-menu> |
| | | <t-dropdown-item label="总分类" options="{{iconList.options}}" value="{{iconList.value}}" optionsColumns="2" bindchange="onChangeIcon" /> |
| | | <t-dropdown-item label="一级" options="{{stairList.options}}" value="{{stairList.value}}" optionsColumns="2" bindchange="onChangeStair" /> |
| | | <t-dropdown-item label="二级" options="{{secondList.options}}" optionsColumns="2" multiple value="{{secondList.value}}" bind:confirm="onConfirmSecond" bind:change="onChangeSecond" /> |
| | | <t-dropdown-item label="一级" options="{{stairList.options}}" value="{{stairList.value}}" optionsColumns="2" bindchange="onChangeStair" disabled="{{assortCheck.code == ''}}" /> |
| | | <t-dropdown-item label=" 二级" options="{{secondList.options}}" optionsColumns="2" multiple value="{{secondList.value}}" bind:confirm="onConfirmSecond" bind:change="onChangeSecond" disabled="{{stairCode == '' || assortCheck.code == ''}}" /> |
| | | </t-dropdown-menu> |
| | | </view> |
| | | <!-- </scroll-view> --> |
| | | </view> |
| | | <view class="header-sort" bind:tap="sortClick"> |
| | | <view class=" header-sort" bind:tap="sortClick"> |
| | | <view class="sort-name">排序</view> |
| | | <view class="sort-icon"> |
| | | <t-icon name="swap-left" size="24rpx" class="icon-right" color="{{sort == 'Asc' ? '#ff6c00' : ''}}" /> |
| | |
| | | <view class="title"> |
| | | <view class="line"></view> |
| | | <view class="icon"> |
| | | <t-image src="/static/images/home/yangshuliebiao.png" mode="aspectFit" class="iconImage" /> |
| | | <image src="/static/images/home/yangshuliebiao.png" mode="aspectFit" class="iconImage" /> |
| | | </view> |
| | | </view> |
| | | <view class="book-list" wx:if="{{bookList.length > 0 && !skeletonLoding}}"> |
| | |
| | | /* border-radius: 40rpx 40rpx 0 0; */ |
| | | } |
| | | |
| | | .t-button--primary::after { |
| | | border: none !important; |
| | | } |
| | | |
| | | .t-radio__title { |
| | | font-size: 28rpx !important; |
| | | } |
| | |
| | | if (teacherRole && teacherInfos) { |
| | | defaultUser = { |
| | | ...teacherInfos, |
| | | nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : teacherInfos.name, |
| | | icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo ? WeChatInfo.icon : '', |
| | | nickName: nickNameData && JSON.parse(nickNameData.data).nickName ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name, |
| | | icon: nickNameData && JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | userId: res.userId, |
| | | role: 'Teacher', |
| | | roleId: teacherRole.role.id, |
| | |
| | | } else if (WeChatInfo) { |
| | | defaultUser = { |
| | | ...WeChatInfo, |
| | | nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name, |
| | | icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | nickName: nickNameData && JSON.parse(nickNameData.data).nickName ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name, |
| | | icon: nickNameData && JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | userId: res.userId, |
| | | } |
| | | |
| | | } |
| | | wx.setStorageSync(app.config.userInfoKey, JSON.stringify(defaultUser)); |
| | | } |
| | |
| | | app.MG.resource.getCmsTypeByRefCode({ |
| | | refCodes: ['jsek_teacherCertification'] |
| | | }).then((res) => { |
| | | console.log(res) |
| | | this.setData({ |
| | | worksInfo: res[0].cmsTypeLinks[0].children, |
| | | }) |
| | | this.newGetTeacherInfo() |
| | | }) |
| | | |
| | | }, |
| | | //获取教师状态 |
| | | newGetTeacherInfo() { |
| | | let that = this; |
| | | const data = { |
| | | start: 0, |
| | | size: 10, |
| | |
| | | } |
| | | app.MG.ugc.getTopicMessageList(data).then((res) => { |
| | | try { |
| | | this.setData({ |
| | | that.setData({ |
| | | imgPics: [], |
| | | }) |
| | | const resData = res.datas.find((i) => i.appUserCreator.userId === this.data.userId) |
| | | const resData = res.datas.find((i) => i.appUserCreator.userId === that.data.userId) |
| | | if (resData) { |
| | | if (resData.state == 'WaitAudit') { |
| | | this.setData({ |
| | | that.setData({ |
| | | editState: false, |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | that.setData({ |
| | | editState: true, |
| | | }) |
| | | } |
| | | let info = getTopicMsgCmsItemFile(this.data.worksInfo, resData.cmsItemDataList) |
| | | this.setData({ |
| | | let info = getTopicMsgCmsItemFile(that.data.worksInfo, resData.cmsItemDataList) |
| | | that.setData({ |
| | | 'teacherInfo.fullName': info.fullName, |
| | | 'teacherInfo.schoolName': info.schoolName, |
| | | 'teacherInfo.positionalTitle': info.positionalTitle, |
| | |
| | | teachText: info.positionalTitle, |
| | | }) |
| | | if (resData.feedBack != null) { |
| | | this.setData({ |
| | | that.setData({ |
| | | reasonTxt: JSON.parse(resData.feedBack).reason, |
| | | }) |
| | | } |
| | | if (this.data.teacherInfo.relevantCertificates.length > 0) { |
| | | if (that.data.teacherInfo.relevantCertificates.length > 0) { |
| | | let arr = []; |
| | | if (typeof this.data.teacherInfo.relevantCertificates == 'object') { |
| | | this.data.teacherInfo.relevantCertificates.forEach((ele) => { |
| | | if (typeof that.data.teacherInfo.relevantCertificates == 'object') { |
| | | that.data.teacherInfo.relevantCertificates.forEach((ele) => { |
| | | let imgObj = { |
| | | md5: ele.file.md5, |
| | | linkType: 'LinkFile', |
| | |
| | | imgUrl: ele.file.imgUrl |
| | | } |
| | | arr.push(imgObj); |
| | | this.setData({ |
| | | that.setData({ |
| | | imgPics: arr, |
| | | }); |
| | | }) |
| | | } else { |
| | | let imgObj = { |
| | | md5: this.data.teacherInfo.relevantCertificates, |
| | | md5: that.data.teacherInfo.relevantCertificates, |
| | | linkType: 'LinkFile', |
| | | linkProtectType: 'Public', |
| | | url: app.config.requestCtx + `/file/GetPreViewImage?md5=` + this.data.teacherInfo.relevantCertificates, |
| | | imgUrl: app.config.requestCtx + `/file/GetPreViewImage?md5=` + this.data.teacherInfo.relevantCertificates, |
| | | url: app.config.requestCtx + `/file/GetPreViewImage?md5=` + that.data.teacherInfo.relevantCertificates, |
| | | imgUrl: app.config.requestCtx + `/file/GetPreViewImage?md5=` + that.data.teacherInfo.relevantCertificates, |
| | | } |
| | | arr.push(imgObj); |
| | | this.setData({ |
| | | that.setData({ |
| | | imgPics: arr, |
| | | }); |
| | | } |
| | |
| | | </t-popup> |
| | | <t-popup visible="{{reasonTxtShow}}" bind:visible-change="onVisibleChange" placement="center"> |
| | | <view class="reasonBlock"> |
| | | <view class="blick-header"> |
| | | 驳回原因 |
| | | </view> |
| | | <view class="reasonBox"> |
| | | {{reasonTxt}} |
| | | </view> |
| | |
| | | .imageBox { |
| | | border: 2rpx solid #D9D9D9; |
| | | padding: 20rpx; |
| | | min-height: 160rpx; |
| | | } |
| | | |
| | | .fileTip { |
| | |
| | | position: relative; |
| | | width: 600rpx; |
| | | height: 820rpx; |
| | | padding: 20rpx 0; |
| | | background: #fff; |
| | | border-radius: 16rpx; |
| | | |
| | | } |
| | | |
| | | .protocol { |
| | | padding: 20rpx; |
| | | padding: 0 20rpx; |
| | | height: 800rpx !important; |
| | | overflow: auto !important; |
| | | } |
| | | |
| | | .reasonBox { |
| | | height: 400rpx !important; |
| | | height: 260rpx !important; |
| | | overflow: auto !important; |
| | | font-size: 28rpx; |
| | | line-height: 48rpx; |
| | |
| | | .reasonBlock { |
| | | position: relative; |
| | | width: 500rpx; |
| | | height: 400rpx; |
| | | height: 380rpx; |
| | | background: #fff; |
| | | border-radius: 16rpx; |
| | | } |
| | | |
| | | .blick-header { |
| | | padding: 20rpx; |
| | | border-bottom: 2rpx solid #F2F3F8; |
| | | font-size: 28rpx; |
| | | font-weight: bold; |
| | | text-align: center; |
| | | } |
| | | |
| | | .close-btn { |
| | | position: absolute; |
| | | left: 50%; |
| | |
| | | <view wx:if="{{activeName == 'FavoriteBookCity'}}" class="listBox"> |
| | | <view class="content-item" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"> |
| | | <view class="icon" data-book="{{item}}" bindtap="goBookDetails"> |
| | | <t-image src="{{item.icon}}" mode="" class="img" /> |
| | | <t-image src="{{item.icon}}" mode="aspectFit" class="img" wx:if="{{item.icon}}" /> |
| | | <t-image src="/static/images/default-book-img.png" mode="aspectFit" class="img" wx:else /> |
| | | </view> |
| | | <view class="body-info" data-book="{{item}}" bindtap="goBookDetails"> |
| | | <view class="name">{{item.name}}</view> |
| | |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | list: false, |
| | | list: [], |
| | | skeletonLoding: false, |
| | | loading: false |
| | | }) |
| | |
| | | }, |
| | | |
| | | onCancel(e) { |
| | | let that = this; |
| | | let { |
| | | orderNum |
| | | } = e.currentTarget.dataset |
| | |
| | | if (res.confirm) { |
| | | app.MG.store.cancelOrder({ |
| | | orderNum: orderNum |
| | | }).then(() => { |
| | | wx.showToast({ |
| | | title: "订单已取消", |
| | | icon: 'success', |
| | | duration: 1000 |
| | | }) |
| | | this.getDataList(false) |
| | | }).then((res) => { |
| | | if (res) { |
| | | wx.showToast({ |
| | | title: "订单已取消", |
| | | icon: 'success', |
| | | duration: 1000 |
| | | }) |
| | | that.getDataList(false) |
| | | } |
| | | |
| | | }) |
| | | } else if (res.cancel) { |
| | | console.log('用户点击了取消') |
| | |
| | | } |
| | | |
| | | .order-centent .flex { |
| | | width: 100%; |
| | | width: calc(100% - 40rpx); |
| | | box-shadow: none; |
| | | text-align: left; |
| | | margin-right: 0; |
New file |
| | |
| | | // pages/home/digitalRead/index.js |
| | | const app = getApp() |
| | | Page({ |
| | | |
| | | /** |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | src: "", |
| | | link: false, |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options) |
| | | if (options && options.link) { |
| | | this.setData({ |
| | | src: decodeURIComponent(options.link), |
| | | link: options.link ? true : false, |
| | | }) |
| | | } else if (options && options.productId) { |
| | | this.setData({ |
| | | src: 'http://jsysf.bnuic.com/bookshelf/#/bookDetail?productId=' + |
| | | options.productId |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | src: 'http://jsysf.bnuic.com/bookshelf/#/index' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() { |
| | | |
| | | } |
| | | }) |
New file |
| | |
| | | { |
| | | "navigationBarTitleText": "数字阅读", |
| | | "usingComponents": {} |
| | | } |
New file |
| | |
| | | <!--pages/home/digitalRead/index.wxml--> |
| | | <view class="page-body"> |
| | | <web-view bind:message="drawBack" binderror="onError" bindload="onLoadWeb" src="{{src}}"></web-view> |
| | | </view> |
New file |
| | |
| | | /* pages/home/digitalRead/index.wxss */ |
| | | .page-body { |
| | | width: 100vw; |
| | | height: calc(100vh - env(safe-area-inset-bottom)); |
| | | overflow: hidden; |
| | | } |
| | |
| | | tabList: [], //目录 |
| | | current: 1, //轮播图参数 |
| | | autoplay: true, //轮播图参数 |
| | | duration: '500', //轮播图参数 |
| | | duration: '500', //轮播图参数 |
| | | interval: 5000, //轮播图参数 |
| | | navigation: { |
| | | type: 'dots' |
| | |
| | | //数字阅读 |
| | | getReadBookList() { |
| | | const obj = { |
| | | storeInfo: app.config.digitalTextbooks, |
| | | path: 'jsek_homepageDigitalTextbooks', |
| | | storeInfo: app.config.digitalRead, |
| | | path: 'jsek_homepageDigitalReading', |
| | | coverSize: { |
| | | width: 150 |
| | | }, |
| | |
| | | const { |
| | | book |
| | | } = e.currentTarget.dataset; |
| | | wx.showToast({ |
| | | title: "建设中", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | wx.navigateTo({ |
| | | url: '/pages/home/digitalRead/index?productId=' + book.id, |
| | | }); |
| | | }, |
| | | goTextBookDetail(e) { |
| | | const { |
| | |
| | | wx.navigateTo({ |
| | | url: '/packageBookService/pages/bookServices/list/index?assorName=' + this.data.bookTypeData.name |
| | | }) |
| | | } else if (type == "shuziyuedu") { |
| | | wx.navigateTo({ |
| | | url: '/pages/home/digitalRead/index' |
| | | }) |
| | | } else { |
| | | wx.showToast({ |
| | | title: "建设中", |
| | |
| | | // 监听滚动条 |
| | | onScroll(e) { |
| | | this.setData({ |
| | | isWhite: e.detail.scrollTop > 10 ? true : false |
| | | isWhite: e.detail.scrollTop > 20 ? true : false |
| | | }) |
| | | }, |
| | | onRetrievalPage() { |
| | |
| | | </t-search> |
| | | </view> |
| | | <view class="swiper-wrap"> |
| | | <t-swiper wx:if="{{bannerList.length > 0}}" list="{{bannerList}}" autoplay="{{autoplay}}" duration="{{duration}}" interval="{{interval}}" navigation="{{navigation}}" height="380rpx" bind:click="navToActivityDetail" /> |
| | | <!-- <t-swiper wx:if="{{bannerList.length > 0}}" list="{{bannerList}}" autoplay="{{autoplay}}" duration="{{duration}}" interval="{{interval}}" navigation="{{ { type: 'dots' } }}" height="380rpx" bind:click="navToActivityDetail" /> --> |
| | | <swiper interval="5000" indicator-dots="true" autoplay="true" circular="true" class="swiper" wx:if="{{bannerList.length > 0}}"> |
| | | <swiper-item wx:for="{{bannerList}}" wx:for-index="index" wx:key="index" data-info="{{item}}" bindtap="navToActivityDetail"> |
| | | <view class="swiperItem"> |
| | | <image src="{{item.value}}" mode="aspectFill" class="img" /> |
| | | </view> |
| | | </swiper-item> |
| | | </swiper> |
| | | <view class="body-loading" wx:else=""> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="home-page-menu"> |
| | |
| | | .home-page-header .swiper-wrap { |
| | | margin-top: 30rpx; |
| | | margin-bottom: 10rpx; |
| | | height: 380rpx; |
| | | width: 100%; |
| | | border-radius: 18rpx; |
| | | overflow: hidden; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .swiper { |
| | | height: 380rpx; |
| | | width: 100%; |
| | | } |
| | | |
| | | .swiperItem { |
| | | position: relative; |
| | | height: 380rpx; |
| | | width: 100%; |
| | | } |
| | | |
| | | .swiper .img { |
| | | width: auto !important; |
| | | height: auto !important; |
| | | max-width: 100% !important; |
| | | max-height: 100% !important; |
| | | position: absolute !important; |
| | | top: 0 !important; |
| | | left: 0 !important; |
| | | right: 0 !important; |
| | | bottom: 0 !important; |
| | | margin: auto !important; |
| | | } |
| | | |
| | | |
| | | .home-page-menu .t-grid--card { |
| | | margin: 0; |
| | |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .listBox .listItemBox { |
| | | .listBox .listItemBox { |
| | | width: 49%; |
| | | margin-bottom: 30rpx; |
| | | } |
| | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | }, |
| | | onShow() {}, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | |
| | | }); |
| | | }, |
| | | onPhoneInput(e) { |
| | | const { phoneError } = this.data; |
| | | const { |
| | | phoneError |
| | | } = this.data; |
| | | 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(e.detail.value); |
| | | if (phoneError === isPhoneNumber) { |
| | | this.setData({ |
| | |
| | | submit() { |
| | | if (this.data.lock) { |
| | | this.data.lock = false; |
| | | if (this.data.userName.replace(/^\s*|\s*$/g, "")) { |
| | | if (this.data.mannder.replace(/^\s*|\s*$/g, "")) { |
| | | if (!this.data.phoneError) { |
| | | if (this.data.content.replace(/^\s*|\s*$/g, "")) { |
| | | let submitData = { |
| | | content: this.data.content.replace(/^\s*|\s*$/g, ""), |
| | | name: this.data.userName.replace(/^\s*|\s*$/g, ""), |
| | | email: "", |
| | | phone: this.data.mannder.replace(/^\s*|\s*$/g, "") |
| | | }; |
| | | var data = { |
| | | topicIdOrRefCode: "feedback", |
| | | name: "意见反馈", |
| | | content: JSON.stringify(submitData), |
| | | type: "opinionFeedback", |
| | | state: "WaitAudit", |
| | | cmsTypeRefCode: "", |
| | | newDataListRequest: [] |
| | | }; |
| | | app.MG.ugc.newTopicMessage(data).then(res => { |
| | | this.data.lock = true; |
| | | if (res) { |
| | | wx.showToast({ |
| | | title: "提交成功", |
| | | icon: 'success', |
| | | duration: 1000, |
| | | success: function () { |
| | | setTimeout(function () { |
| | | wx.navigateBack(); |
| | | }, 1000) //延迟时间 |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } else { |
| | | this.data.lock = true; |
| | | wx.showToast({ |
| | | title: "反馈内容不能为空", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | } |
| | | } else { |
| | | this.data.lock = true; |
| | | wx.showToast({ |
| | | title: "联系方式格式不正确", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | } |
| | | } else { |
| | | this.data.lock = true; |
| | | wx.showToast({ |
| | | title: "联系方式不能为空", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | } |
| | | } else { |
| | | if (this.data.userName.replace(/^\s*|\s*$/g, "") == '') { |
| | | this.data.lock = true; |
| | | wx.showToast({ |
| | | title: "联系人不能为空", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | return |
| | | } |
| | | if (this.data.mannder.replace(/^\s*|\s*$/g, "") == '') { |
| | | this.data.lock = true; |
| | | wx.showToast({ |
| | | title: "反馈内容不能为空", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | return |
| | | } |
| | | if (this.data.phoneError) { |
| | | this.data.lock = true; |
| | | wx.showToast({ |
| | | title: "联系方式格式不正确", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | return |
| | | } |
| | | if (this.data.content.replace(/^\s*|\s*$/g, "") == '') { |
| | | this.data.lock = true; |
| | | wx.showToast({ |
| | | title: "反馈内容不能为空", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | let submitData = { |
| | | content: this.data.content.replace(/^\s*|\s*$/g, ""), |
| | | name: this.data.userName.replace(/^\s*|\s*$/g, ""), |
| | | email: "", |
| | | phone: this.data.mannder.replace(/^\s*|\s*$/g, "") |
| | | }; |
| | | var data = { |
| | | topicIdOrRefCode: "feedback", |
| | | name: "意见反馈", |
| | | content: JSON.stringify(submitData), |
| | | type: "opinionFeedback", |
| | | state: "WaitAudit", |
| | | cmsTypeRefCode: "", |
| | | newDataListRequest: [] |
| | | }; |
| | | app.MG.ugc.newTopicMessage(data).then(res => { |
| | | this.data.lock = true; |
| | | if (res) { |
| | | wx.showToast({ |
| | | title: "提交成功", |
| | | icon: 'success', |
| | | duration: 1000, |
| | | success: function () { |
| | | setTimeout(function () { |
| | | wx.navigateBack(); |
| | | }, 1000) //延迟时间 |
| | | } |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | |
| | | barHeight: systInfo.statusBarHeight, |
| | | navBarHeight: navBarHeight, |
| | | }); |
| | | |
| | | }, |
| | | onShow() { |
| | | if (typeof this.getTabBar === 'function' && this.getTabBar()) { |
| | | this.getTabBar().setData({ |
| | | active: 4 |
| | | }) |
| | | } |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | |
| | | currAuthStep: 1, |
| | | }); |
| | | this.getUserInfo() |
| | | } |
| | | }, |
| | | onShow() { |
| | | if (typeof this.getTabBar === 'function' && this.getTabBar()) { |
| | | this.getTabBar().setData({ |
| | | active: 4 |
| | | }) |
| | | } |
| | | }, |
| | | /** |
| | |
| | | if (teacherRole && teacherInfos) { |
| | | defaultUser = { |
| | | ...teacherInfos, |
| | | nickName: teacherInfos.name, |
| | | icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo ? WeChatInfo.icon : '', |
| | | nickName: nickNameData && JSON.parse(nickNameData.data).nickName ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name, |
| | | icon: nickNameData && JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | userId: res.userId, |
| | | role: 'Teacher', |
| | | roleId: teacherRole.role.id, |
| | |
| | | } else if (WeChatInfo) { |
| | | defaultUser = { |
| | | ...WeChatInfo, |
| | | nickName: nickNameData ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name, |
| | | icon: nickNameData ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | nickName: nickNameData && JSON.parse(nickNameData.data).nickName ? JSON.parse(nickNameData.data).nickName : WeChatInfo.name, |
| | | icon: nickNameData && JSON.parse(nickNameData.data).icon ? JSON.parse(nickNameData.data).icon : WeChatInfo.icon, |
| | | userId: res.userId, |
| | | userType: type, |
| | | role: 'Student', |
| | |
| | | const app = getApp(); |
| | | import { getPublicImage } from "../../assets/js/middleGround/tool.js"; |
| | | import { |
| | | getPublicImage |
| | | } from "../../assets/js/middleGround/tool.js"; |
| | | Page({ |
| | | |
| | | /** |
| | |
| | | isBackTop: false, |
| | | setScrollValue: 0, |
| | | skeletonLoding: true, |
| | | |
| | | }, |
| | | |
| | | /** |
| | |
| | | } else if (this.data.active == '2') { |
| | | keywords = "jsek_digitalTextbooks"; |
| | | } |
| | | let searchData = [ |
| | | { |
| | | keywords: keywords, |
| | | field: "ProductType", |
| | | }, |
| | | ]; |
| | | let searchData = [{ |
| | | keywords: keywords, |
| | | field: "ProductType", |
| | | }, ]; |
| | | let data = { |
| | | Size: this.data.limit, |
| | | Start: this.data.page * this.data.limit - this.data.limit, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | goBookDetails(e) { |
| | | const { |
| | | book |
| | | } = e.currentTarget.dataset; |
| | | wx.navigateTo({ |
| | | url: `/packageBookService/pages/bookServices/detail/index?id=${book.product.id}&name=${book.product.name}`, |
| | | }); |
| | | }, |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | |
| | | </view> |
| | | <view class="tabOne"> |
| | | <t-tabs t-class="t-tabs" value="{{active}}" split="{{false}}" bind:change="tabClick"> |
| | | <t-tab-panel label="{{titleBook}}" value="0" /> |
| | | <t-tab-panel label="{{titleBook}}" value="0" class="{{active == '2' ? 'oneBorder' : ''}}" /> |
| | | <t-tab-panel label="{{titleCourse}}" value="1" /> |
| | | <t-tab-panel label="{{titleTextBook}}" value="2" /> |
| | | </t-tabs> |
| | |
| | | } |
| | | |
| | | .t-tabs__nav :nth-child(1) { |
| | | border-radius: 30rpx 30rpx 0 0rpx; |
| | | border-radius: 30rpx 30rpx 0 0rpx !important; |
| | | } |
| | | |
| | | .t-tabs__nav :nth-child(2) { |
| | |
| | | border-radius: 0 30rpx 0 30rpx !important; |
| | | } |
| | | |
| | | .t-tabs__item--active+.t-tabs__item+.t-tabs__item { |
| | | border-radius: 30rpx 30rpx 0rpx 0rpx !important; |
| | | } |
| | | |
| | | .refresh-container { |
| | | margin: 0 auto; |
| | | } |
| | |
| | | |
| | | /** 获取首页数据 */ |
| | | function mockFetchHome() { |
| | | const { delay } = require('../_utils/delay'); |
| | | const { |
| | | delay |
| | | } = require('../_utils/delay'); |
| | | return delay().then(() => { |
| | | return { |
| | | tabList: [ |
| | | { |
| | | tabList: [{ |
| | | text: '图书服务', |
| | | key: 0, |
| | | icon: '/static/images/home/zhutichuban@2x.png', |
| | |
| | | text: '数字阅读', |
| | | key: 1, |
| | | icon: '/static/images/home/shuziyuedu@2x.png', |
| | | url: '', |
| | | url: '/pages/home/digitalRead/index', |
| | | }, |
| | | { |
| | | text: '数字课程', |
| | |
| | | /** 获取首页数据 */ |
| | | export function fetchHome() { |
| | | return mockFetchHome(); |
| | | } |
| | | } |