| | |
| | | seminar, |
| | | reg_tel, |
| | | reg_telphone, |
| | | epubUrl |
| | | epubUrl, |
| | | appId |
| | | }; |
| | | export default config; |
| | |
| | | 'md5s': params |
| | | } |
| | | }); |
| | | }, |
| | | // 发送下载邮件 |
| | | sendFileWithEmail(data) { |
| | | return request({ |
| | | url: '/file/api/ApiSendFileWithEmail', |
| | | method: 'post', |
| | | data |
| | | }) |
| | | } |
| | | } |
| | | |
| | |
| | | * 页面的初始数据 |
| | | */ |
| | | data: { |
| | | input: '', |
| | | dialogKey: '', |
| | | showWithInput: false, |
| | | showTextAndTitleWithInput: false, |
| | | downloadLoadin: false, |
| | | isMore: null, |
| | | higherList: [], |
| | |
| | | navBarHeight: '', |
| | | start: 1, |
| | | tabValue: '', |
| | | keyword: '' |
| | | keyword: '', |
| | | Md5: '', |
| | | emailError: false, |
| | | }, |
| | | |
| | | /** |
| | |
| | | barHeight: systInfo.statusBarHeight, |
| | | }) |
| | | |
| | | let event = |
| | | { |
| | | detail: { value: "0" } |
| | | let event = { |
| | | detail: { |
| | | value: "0" |
| | | } |
| | | } |
| | | |
| | | this.onTabsChange(event) |
| | |
| | | teacherList: res.datas, |
| | | teacherTotal: res.total |
| | | }) |
| | | |
| | | }) |
| | | wx.stopPullDownRefresh() |
| | | |
| | | }, |
| | | downloadData(event) { |
| | | this.setData({ |
| | |
| | | console.log('下载文件失败', res); |
| | | } |
| | | }); |
| | | |
| | | setTimeout(() => { |
| | | this.setData({ |
| | | downloadLoadin: false |
| | | }); |
| | | }, 2000); |
| | | |
| | | }, |
| | | onSearchSubmit: function (e) { |
| | | const keyword = e.detail.value; |
| | |
| | | this.higherGet(keyword) |
| | | this.vocationalGet(keyword) |
| | | this.teacherGet(keyword) |
| | | |
| | | }, |
| | | |
| | | |
| | |
| | | }, |
| | | |
| | | onPullDownRefresh() { |
| | | |
| | | |
| | | let keyword = this.data.value |
| | | |
| | | this.setData({ |
| | | start: 1, |
| | | |
| | | }) |
| | | |
| | | this.higherGet(keyword) |
| | | this.vocationalGet(keyword) |
| | | this.teacherGet(keyword) |
| | | }, |
| | | // 邮箱点击 |
| | | mailbox(e) { |
| | | const key = e.currentTarget.dataset.key; |
| | | const item = e.currentTarget.dataset.item; |
| | | |
| | | |
| | | |
| | | this.setData({ |
| | | [key]: true, |
| | | dialogKey: key, |
| | | input: '', |
| | | Md5: item.datas.freeFile.FileList[0].Md5 |
| | | }); |
| | | |
| | | |
| | | |
| | | }, |
| | | |
| | | onEmailInput(e) { |
| | | const isEmailValid = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(e.detail.value); |
| | | this.setData({ |
| | | emailError: !isEmailValid, |
| | | "input": e.detail.value, |
| | | }); |
| | | }, |
| | | //弹窗确认 |
| | | onConfirm() { |
| | | if (!this.data.emailError && this.data.input) { |
| | | const { |
| | | dialogKey |
| | | } = this.data; |
| | | this.setData({ |
| | | [dialogKey]: false |
| | | }); |
| | | |
| | | |
| | | console.log(this.data.input); |
| | | console.log(this.data.Md5); |
| | | if (this.data.input) { |
| | | let query = { |
| | | eMail: this.data.input, |
| | | md5s: [this.data.Md5] |
| | | } |
| | | app.MG.file.sendFileWithEmail(query).then(res => { |
| | | console.log(res); |
| | | }) |
| | | } |
| | | } else { |
| | | // 校验不通过,给出错误提示 |
| | | wx.showToast({ |
| | | title: '邮箱格式不正确', |
| | | icon: 'none', |
| | | }); |
| | | } |
| | | |
| | | }, |
| | | // 弹窗取消 |
| | | closeDialog() { |
| | | const { |
| | | dialogKey |
| | | } = this.data; |
| | | this.setData({ |
| | | [dialogKey]: false |
| | | }); |
| | | console.log(111); |
| | | }, |
| | | |
| | | |
| | | |
| | | }) |
| | |
| | | "t-icon": "tdesign-miniprogram/icon/icon", |
| | | "t-loading": "tdesign-miniprogram/loading/loading", |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-empty": "tdesign-miniprogram/empty/empty" |
| | | "t-empty": "tdesign-miniprogram/empty/empty", |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-input": "tdesign-miniprogram/input/input", |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog" |
| | | }, |
| | | "navigationStyle": "custom", |
| | | "enablePullDownRefresh": true, |
| | |
| | | </view> |
| | | |
| | | <view wx:else class="outsideHigherBox"> |
| | | <view class="higherBox" wx:for="{{higherList}}" wx:key="index" wx:for-item="item" wx:for-index="index" bind:tap="downloadData" data-item="{{item}}"> |
| | | <view class="higherBox" wx:for="{{higherList}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | <view class="outsideHigherImageBox"> |
| | | <image class="higherImageBox" src="{{item.icon}}" mode="" /> |
| | | <view class="downloadIcon" data-item="{{item}}"> |
| | | <view bind:tap="downloadData" data-item="{{item}}"> |
| | | |
| | | <image class="higherImageBox" src="{{item.icon}}" mode="" /> |
| | | </view> |
| | | |
| | | <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" bind:tap="mailbox"> |
| | | |
| | | <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="" /> |
| | | <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="" /> |
| | |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </t-tab-panel> |
| | | |
| | | </t-tabs> |
| | | </view> |
| | | <view class="dialogBox"> |
| | | <t-dialog visible="{{showWithInput}}" title="请输入邮箱" confirm-btn="确定" cancel-btn="取消" bind:confirm="onConfirm" bind:cancel="closeDialog"> |
| | | |
| | | <t-input model:value="{{input}}" borderless class="dialog-input" clearable slot="content" placeholder="请输入邮箱号" placeholder-class="placeholder" bindchange="onEmailInput" /> |
| | | |
| | | </t-dialog> |
| | | </view> |
| | |
| | | } |
| | | |
| | | /*输入框*/ |
| | | .nav_input { |
| | | /* .nav_input { |
| | | border: 1px solid var(--egry-col); |
| | | border-radius: 40rpx; |
| | | padding-left: 72rpx; |
| | |
| | | box-sizing: border-box; |
| | | line-height: 75rpx; |
| | | height: 75rpx; |
| | | } |
| | | } */ |
| | | |
| | | .t-tabs__item--active { |
| | | color: #FF6C00 !important; |
| | |
| | | align-items: center; |
| | | margin: 0 auto; |
| | | margin-top: 250rpx; |
| | | } |
| | | |
| | | .wrapper { |
| | | margin-bottom: 32rpx; |
| | | } |
| | | |
| | | .placeholder { |
| | | color: rgba(0, 0, 0, 0.26); |
| | | line-height: 96rpx; |
| | | height: 96rpx !important; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .dialog-input { |
| | | padding-top: 12px; |
| | | padding-bottom: 12px; |
| | | text-align: left; |
| | | margin-top: 32rpx; |
| | | border-radius: 8rpx; |
| | | background-color: #f3f3f3; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .placeholder { |
| | | color: rgba(0, 0, 0, 0.4); |
| | | line-height: 96rpx; |
| | | } |
| | | |
| | | .dialogBox .t-input__control { |
| | | |
| | | min-height: 100rpx; |
| | | } |
| | | |
| | | .t-button--text { |
| | | color: #000 !important; |
| | | |
| | | } |
| | | |
| | | .t-button--text.t-button--primary { |
| | | color: var(--td-button-primary-text-color, var(--td-brand-color, var(--td-primary-color-7, #0052d9))) !important; |
| | | background: none; |
| | | } |
| | | |
| | | .t-input__control { |
| | | /* border: 1rpx #000 solid; */ |
| | | background-color: #F9F9F9; |
| | | width: 100%; |
| | | } |
| | |
| | | const app = getApp(); |
| | | // import { getPublicImage } from '@/assets/js/middleGround/tool.js' |
| | | import { getPublicImage } from '../../assets/js/middleGround/tool'; |
| | | import { |
| | | loginInfo |
| | | } from '../../assets/js/login'; |
| | | import { |
| | | getPublicImage |
| | | } from '../../assets/js/middleGround/tool'; |
| | | import Toast from 'tdesign-miniprogram/toast/index'; |
| | | |
| | | import { loginInfo } from '../../assets/js/login'; |
| | | |
| | | Page({ |
| | | data: { |
| | | onDisabled: false, |
| | |
| | | }) |
| | | } |
| | | this.shoppingCartGet(); |
| | | this.setData({ totalPrice: 0.00, selectedCount: 0, checkAll: false, }) |
| | | this.setData({ |
| | | totalPrice: 0.00, |
| | | selectedCount: 0, |
| | | checkAll: false, |
| | | }) |
| | | |
| | | |
| | | }, |
| | |
| | | ids: [item.id] |
| | | }).then(res => { |
| | | this.shoppingCartGet(); |
| | | wx.showToast({ title: '删除图书成功', icon: 'none' }); |
| | | wx.showToast({ |
| | | title: '删除图书成功', |
| | | icon: 'none' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | HandelItemChange(e) { |
| | | const { item } = e.target.dataset; |
| | | const { |
| | | item |
| | | } = e.target.dataset; |
| | | const items = this.data.shoppingCartData |
| | | items.map(eitem => { |
| | | if (eitem.id == item.id) { |
| | |
| | | |
| | | goPaymentPage() { |
| | | |
| | | |
| | | // 首页测试登录功能,后续注释 |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | |
| | | loginInfo(app, (data) => { |
| | | // 如果不是第一次登录,会执行回调 |
| | | if (data) { |
| | | |
| | | |
| | | const selectedItems = this.data.shoppingCartData.filter(item => item.checked); |
| | | // console.log(selectedItems, 789); |
| | | const selectedIds = selectedItems.map(item => item.id); |
| | |
| | | linkIds: selectedIds |
| | | } |
| | | app.MG.store.shoppingCartCreateOrder(data).then(res => { |
| | | // console.log(res, 456); |
| | | |
| | | |
| | | const url = '/pages/cart/paymentPage/index?orderNumber=' + res.orderNumber |
| | | wx.navigateTo({ |
| | | url |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | // 如果是第一次登录,会跳转至绑定用户信息页面,填写完用户信息后进行登录并储存token和用户信息,结束后跳转回当前页面(携带页面参数) |
| | | const selectedItems = this.data.shoppingCartData.filter(item => item.checked); |
| | | // console.log(selectedItems, 789); |
| | | const selectedIds = selectedItems.map(item => item.id); |
| | | console.log('选中的商品 id:', selectedIds); |
| | | if (selectedIds.length) { |
| | | let data = { |
| | | linkIds: selectedIds |
| | | } |
| | | app.MG.store.shoppingCartCreateOrder(data).then(res => { |
| | | const url = '/pages/cart/paymentPage/index?orderNumber=' + res.orderNumber |
| | | wx.navigateTo({ |
| | | url |
| | | }); |
| | | }) |
| | | } else { |
| | | Toast({ |
| | | context: this, |
| | | selector: '#t-toast', |
| | | message: '请选择商品', |
| | | theme: 'warning', |
| | | direction: 'column', |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | onPullDownRefresh() { |
| | | |
| | | this.setData({ |
| | | start: 1 |
| | | start: 1, |
| | | checkAll: false, |
| | | selectedCount: 0, |
| | | totalPrice: 0.00, |
| | | }) |
| | | console.log(978); |
| | | this.shoppingCartGet() |
| | | }, |
| | | |
| | | }); |
| | | }); |
| | |
| | | // pages/cart/paymentPage/index.js |
| | | const app = getApp() |
| | | import { getPublicImage } from '../../../assets/js/middleGround/tool'; |
| | | import { |
| | | getPublicImage |
| | | } from '../../../assets/js/middleGround/tool'; |
| | | import drawQrcode from './js/weapp.qrcode' |
| | | Page({ |
| | | |
| | |
| | | if (res.orderNumber) { |
| | | let resOrderNum = { |
| | | orderNum: res.orderNumber, |
| | | platform: "WeChatAppCustom" |
| | | }; |
| | | console.log(resOrderNum, 'resOrderNum'); |
| | | // 用户未绑定微信 报500 |
| | |
| | | }) |
| | | }, |
| | | onRetrievalPage() { |
| | | wx.navigateTo({ |
| | | url: '/pages/retrievalPage/index?searchVal=' + this.data.searchVal |
| | | }) |
| | | |
| | | // 首页测试登录功能,后续注释 |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey) |
| | | if (!token) { |
| | | loginInfo(app, (data) => { |
| | | // 如果不是第一次登录,会执行回调 |
| | | if (data) { |
| | | wx.navigateTo({ |
| | | url: '/pages/retrievalPage/index?searchVal=' + this.data.searchVal |
| | | }) |
| | | } else { |
| | | // 出现错误,返回false |
| | | } |
| | | }) |
| | | } else { |
| | | wx.navigateTo({ |
| | | url: '/pages/retrievalPage/index?searchVal=' + this.data.searchVal |
| | | }) |
| | | } |
| | | |
| | | |
| | | }, |
| | | }); |
| | |
| | | // pages/retrievalPage/index.js |
| | | import request from '../../assets/request/index' |
| | | |
| | | import { handleQueryResourceListData } from '../../assets/js/middleGround/tool' |
| | | import { |
| | | handleQueryResourceListData |
| | | } from '../../assets/js/middleGround/tool' |
| | | const app = getApp() |
| | | Page({ |
| | | |
| | |
| | | navBarHeight: '', |
| | | barHeight: '', |
| | | searchVal: '', |
| | | bookData: [], //图书 |
| | | bookData: [], //图书 |
| | | bookTotal: 0, |
| | | courseData: [], //课程 |
| | | courseData: [], //课程 |
| | | courseTotal: 0, |
| | | digitalTextbooksData: [], //数字教材 |
| | | digitalTextbooksData: [], //数字教材 |
| | | digitalTextbooksTotal: 0, |
| | | seminarData: [], //专题研讨 |
| | | seminarTotal: 0, |
| | | biblioClassificationData: [],//书展 |
| | | biblioClassificationData: [], //书展 |
| | | biblioClassificationTotal: 0, |
| | | bookFairData: [],//书目 |
| | | bookFairData: [], //书目 |
| | | bookFairTotal: 0, |
| | | pageCount: { |
| | | page: 1, |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | |
| | | console.log(app.config.appId); |
| | | const systInfo = wx.getSystemInfoSync(); |
| | | const menu = wx.getMenuButtonBoundingClientRect(); // 胶囊信息 |
| | | const navBarHeight = (menu.top - systInfo.statusBarHeight) * 2 + menu.height; // 导航栏高度 |
| | |
| | | let queryBook = { |
| | | AccessControl: { |
| | | Path: '*', |
| | | StoreRefCode: 'defaultGoodsStore27', |
| | | StoreRefCode: `defaultGoodsStore${app.config.appId}`, |
| | | Type: '*', |
| | | LinkType: '' |
| | | }, |
| | |
| | | Start: 0, |
| | | Size: this.data.pageCount.page * 9, |
| | | }, |
| | | SortQuery: [ |
| | | { |
| | | LinkOrder: 'Desc' |
| | | } |
| | | ], |
| | | SortQuery: [{ |
| | | LinkOrder: 'Desc' |
| | | }], |
| | | CreateDate: [], |
| | | Description: [], |
| | | Name: [], |
| | |
| | | Start: 0, |
| | | Size: this.data.pageCount.page * 4 |
| | | }, |
| | | SortQuery: [ |
| | | { |
| | | LinkOrder: 'Desc' |
| | | } |
| | | ], |
| | | SortQuery: [{ |
| | | LinkOrder: 'Desc' |
| | | }], |
| | | CreateDate: [], |
| | | Description: [], |
| | | Name: [], |
| | |
| | | Start: 0, |
| | | Size: this.data.pageCount.page * 9, |
| | | }, |
| | | SortQuery: [ |
| | | { |
| | | LinkOrder: 'Desc' |
| | | } |
| | | ], |
| | | SortQuery: [{ |
| | | LinkOrder: 'Desc' |
| | | }], |
| | | CreateDate: [], |
| | | Description: [], |
| | | Name: [], |
| | |
| | | Start: 0, |
| | | Size: this.data.pageCount.page * 6, |
| | | }, |
| | | SortQuery: [ |
| | | { |
| | | LinkOrder: 'Desc' |
| | | } |
| | | ], |
| | | SortQuery: [{ |
| | | LinkOrder: 'Desc' |
| | | }], |
| | | CreateDate: [], |
| | | Description: [], |
| | | Name: [], |
| | |
| | | Start: 0, |
| | | Size: this.data.pageCount.page * 10 |
| | | }, |
| | | SortQuery: [ |
| | | { |
| | | LinkOrder: 'Desc' |
| | | } |
| | | ], |
| | | SortQuery: [{ |
| | | LinkOrder: 'Desc' |
| | | }], |
| | | CreateDate: [], |
| | | Description: [], |
| | | Name: [], |
| | |
| | | console.log("下拉刷新..."); |
| | | }, |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom(e) { |
| | | if (this.data.tabValue == 0) { |
| | | console.log(0); |
| | |
| | | <!--pages/retrievalPage/index.wxml--> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <t-tabs class="tabsBox" defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel"> |
| | | <view class="tabsBox" > |
| | | <!-- sticky="true" --> |
| | | <t-tabs defaultValue="{{0}}" bind:change="onTabsChange" bind:click="onTabsClick" t-class="custom-tabs" t-class-content="custom-panel" sticky="true"> |
| | | <t-tab-panel label="图书({{bookTotal}})" value="0"> |
| | | <view wx:if="{{bookData.length <= 0}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" /> |
| | | </view> |
| | | <view class="bookDataBox"> |
| | | |
| | | |
| | | |
| | | <view class="bookDataForBox" wx:for="{{bookData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="onBook"> |
| | | <view class="imageBox"> |
| | | <image src="{{item.icon}}" mode="aspectFill" /> |
| | |
| | | <view class="bookDataAuthor">{{item.author}}</view> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view wx:if="{{bookData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | |
| | | </t-tab-panel> |
| | | <t-tab-panel label="课程({{courseTotal}})" value="1"> |
| | | <view wx:if="{{courseData.length <= 0}}" class="noDataBox"> |
| | |
| | | |
| | | </t-tab-panel> |
| | | </t-tabs> |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | position: fixed; |
| | | top: 0px; |
| | | background-color: #fff; |
| | | height: 150px; |
| | | height: 120px; |
| | | z-index: 999; |
| | | } |
| | | |
| | | .tabsBox { |
| | | margin-top: 300rpx; |
| | | } |
| | | |
| | | |
| | | |
| | | |