| | |
| | | } else if (!textvalue.length) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请输入反馈反馈内容', |
| | | title: '请输入反馈内容', |
| | | }) |
| | | } |
| | | await this.feedBack() |
| | |
| | | } else if (!textvalue.length) { |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: '请输入反馈反馈内容', |
| | | title: '请输入反馈内容', |
| | | }) |
| | | } |
| | | await this.feedBack() |
| | |
| | | } |
| | | app.MG.ugc.newTopicMessage(query).then((res) => { |
| | | wx.showToast({ |
| | | icon: "success", |
| | | icon: "error", |
| | | title: "请上传资源文件", |
| | | }); |
| | | this.closeDialog() |
| | |
| | | wx:if="{{!isShowUp && fileList.length > 0}}" |
| | | class="fileList" |
| | | > |
| | | <text>{{fileList[0].name}}</text> |
| | | <text class="fileName">{{fileList[0].name}}</text> |
| | | <image |
| | | src="/static/images/bookService/detail/deleteHover.png" |
| | | class="deleteBtn" |
| | |
| | | background: #f1f1f1; |
| | | } |
| | | |
| | | .fileName { |
| | | width: 400rpx; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .t-cell::after { |
| | | border-bottom: none !important; |
| | | } |
| | |
| | | oldlist.forEach(istrue => { |
| | | istrue.icon = getPublicImage(istrue.icon, "", 400) |
| | | }) |
| | | item.saleMethodList.forEach(async (i) => { |
| | | if (i.type != 'defaultSaleMethod') { |
| | | var index = i.name.indexOf('-') |
| | | if (index !== -1) { |
| | | item.type = i.name.substring(0, index) |
| | | } else { |
| | | item.type = i.name |
| | | } |
| | | } else { |
| | | let parentData = await app.MG.store.getProductBySaleMethod({ |
| | | saleMethodId: i.id |
| | | }) |
| | | console.log(parentData, 111) |
| | | if (parentData.storeLinks[0].storeRefCode == 'jsek_digitalCourses') { |
| | | item.type = '数字课程' |
| | | } |
| | | if (parentData.storeLinks[0].storeRefCode == 'jsek_digitalTextbooks') { |
| | | item.type = '数字教材' |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | let dataList = res.datas; |
| | | //触底加载新数据并保留老数据 |
| | | if (isReachBottom) { |
| | | dataList = [...this.data.list, ...dataList] //将新数据加入老数据中 |
| | | } |
| | | this.setData({ |
| | | list: dataList, |
| | | pageTotalCount: res.totalSize, |
| | | bottomLoading: false, |
| | | isMoreData: dataList.length > 0 ? false : true, |
| | | skeletonLoding: false, |
| | | loading: false |
| | | }) |
| | | setTimeout(() => { |
| | | let dataList = res.datas; |
| | | //触底加载新数据并保留老数据 |
| | | if (isReachBottom) { |
| | | dataList = [...this.data.list, ...dataList] //将新数据加入老数据中 |
| | | } |
| | | this.setData({ |
| | | list: dataList, |
| | | pageTotalCount: res.totalSize, |
| | | bottomLoading: false, |
| | | isMoreData: dataList.length > 0 ? false : true, |
| | | skeletonLoding: false, |
| | | loading: false |
| | | }) |
| | | }, 500) |
| | | } else { |
| | | this.setData({ |
| | | skeletonLoding: false, |
| | |
| | | } |
| | | this.getDataList(bool); |
| | | }, |
| | | |
| | | // 监听滚动距离 |
| | | onPageScroll(e) { |
| | | if (e && e.scrollTop >= 1000) { |
| | | this.setData({ |
| | | isBackTop: true |
| | | }) |
| | | } else { |
| | | this.setData({ |
| | | isBackTop: false |
| | | }) |
| | | } |
| | | }, |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | |
| | | <view class="rightCon"> |
| | | <view class="productTitle">{{itemes.name}}</view> |
| | | <view class="typeBox"> |
| | | <text class="typeCon">电子书</text> |
| | | <text class="typeCon">{{items.type ? items.type : '电子书' }}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | |
| | | .productTitle { |
| | | font-size: 28rpx; |
| | | height: 88rpx; |
| | | max-height: 88rpx; |
| | | color: #333333; |
| | | line-height: 44rpx; |
| | | display: -webkit-box; |
| | |
| | | -webkit-line-clamp: 2; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | } |
| | | |
| | | .typeBox { |
| | | line-height: 60rpx; |
| | | } |
| | | |
| | | .typeCon { |
| | |
| | | payPrice: res.payPrice.toFixed(2), |
| | | ImmediatelyReceive: res.payPrice |
| | | }) |
| | | console.log(1, res.saleMethodLinks); |
| | | res.saleMethodLinks.forEach(item => { |
| | | const type = item.orderSaleMethod.type == 'createProductItemSaleMethod' ? 'item' : 'product'; |
| | | item.type = type; // 将type设置为item对象的属性,而不是使用setData |
| | |
| | | <view class="paymentBox"> |
| | | <view class="residue">待支付:<text class="residueTextBox">¥{{payPrice}}</text></view> |
| | | <view> |
| | | <t-button wx:if="{{ImmediatelyReceive === 0}}" class="buttonBox" shape="round" catch:tap="onReceive">立即领取</t-button> |
| | | <t-button wx:if="{{payPrice === 0}}" class="buttonBox" shape="round" catch:tap="onReceive">立即领取</t-button> |
| | | <t-button wx:else class="buttonBox" shape="round" catch:tap="confirmOrderGet">微信支付</t-button> |
| | | </view> |
| | | </view> |
| | |
| | | * 生命周期函数--监听页面加载 |
| | | */ |
| | | onLoad(options) { |
| | | console.log(options); |
| | | this.setData({ |
| | | digitalTextId: options.id |
| | | }) |
| | |
| | | } |
| | | |
| | | this.getAboutBook(res.datas.productLinkInfo[res.datas.productLinkInfo.length - 1].LinkPath) |
| | | console.log(this.data.isBuy); |
| | | this.setData({ |
| | | loading: false, |
| | | type: 'basicInformation', |
| | |
| | | this.setData({ |
| | | tabValue: event.detail.value, |
| | | }) |
| | | console.log(this.data.tabValue); |
| | | }, |
| | | |
| | | onTabsClick(event) { |
| | | // console.log(`Click tab, tab-panel value is ${event.detail.value}.`); |
| | | }, |
| | | // 获取相关教材 |
| | | getAboutBook(path) { |
| | | let query = { |
| | |
| | | this.setData({ |
| | | relatedBookData: bookArr |
| | | }) |
| | | console.log(this.data.relatedBookData); |
| | | } else { |
| | | this.setData({ |
| | | relatedBookData: [] |
| | |
| | | // 发起订单初始化请求并等待结果 |
| | | const res = await app.MG.store.initOrder(query); |
| | | // 获取订单号并赋值给 orderNumber.value |
| | | console.log(res, 'res456'); |
| | | bookOrdersId = res.orderNumber; |
| | | // 检查订单号是否存在 |
| | | if (bookOrdersId) { |
| | |
| | | url, |
| | | }); |
| | | } |
| | | } else { |
| | | console.log(222); |
| | | } |
| | | } else {} |
| | | } else { |
| | | wx.showToast({ |
| | | title: "商品不在有效期", |
| | |
| | | } |
| | | }, |
| | | |
| | | // console.log(item, app.config.textReaderUrl); |
| | | // console.log(token); |
| | | goRead() { |
| | | // 首页测试登录功能,后续注释 |
| | | // 检查登录状态 |
| | |
| | | |
| | | }, |
| | | onTabClick(e) { |
| | | console.log(e); |
| | | let tab = e.currentTarget.dataset.tab; |
| | | |
| | | this.setData({ |
| | |
| | | onScroll(e) { |
| | | |
| | | let scrollTop = e.detail.scrollTop |
| | | console.log(scrollTop); |
| | | // this.setData({ |
| | | // type: scrollTop |
| | | // }) |
| | |
| | | |
| | | let that = this; |
| | | var query = wx.createSelectorQuery() |
| | | console.log(query, '12355'); |
| | | //获取板块一离scroll-view顶部的距离,第一板块实际距离为0,此处获取只为给第二及第三板块减去第一板块距离scroll-view的顶部距离 |
| | | wx.createSelectorQuery().select('#basicInformation').boundingClientRect(function (res) { |
| | | console.log(res, '456882588'); |
| | | that.basicInformation = res.top |
| | | }).exec() |
| | | //获取板块二离scroll-view顶部的距离 |
| | |
| | | }).exec() |
| | | }, |
| | | setCoolect() { |
| | | console.log(456); |
| | | |
| | | // 首页测试登录功能,后续注释 |
| | | // 检查登录状态 |
| | |
| | | suggestBtn() { |
| | | // 检查登录状态 |
| | | const token = wx.getStorageSync(app.config.tokenKey); |
| | | console.log(465); |
| | | const child = this.selectComponent("#suggest-component1"); |
| | | if (token) |
| | | // child.showDialog(); |
| | |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-toast": "tdesign-miniprogram/toast/toast", |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "suggest": "/packageBookService/pages/bookServices/detail/components/suggest/suggest", |
| | | "t-input": "tdesign-miniprogram/input/input", |
| | | "t-image-viewer": "tdesign-miniprogram/image-viewer/image-viewer", |
| | | "empty": "/components/empty/index" |
| | |
| | | </view> |
| | | </view> |
| | | <view class="certificate"> |
| | | <view class="proposal" bind:tap="suggestBtn"> |
| | | <!-- <view class="proposal" bind:tap="suggestBtn"> |
| | | <view class="suggestion"> |
| | | <image src="/static/images/digitalTextbooks/Suggestion@2x.png" mode="" class="img" /> |
| | | </view> |
| | | <view class="proposalText">我要建议</view> |
| | | </view> |
| | | <view class="frame"></view> |
| | | </view> --> |
| | | <!-- <view class="frame"></view> --> |
| | | <view class="information"> |
| | | <view class="proposal" bind:tap="onCertificate"> |
| | | <view class="suggestion"> |
| | |
| | | <view class="lable">{{item.type}}</view> |
| | | <view class="createDate">{{item.createDate ? item.createDate : '-'}}</view> |
| | | </view> |
| | | <view class="value yes" wx:if="item.value > 0">{{'+' + item.value}}</view> |
| | | <view class="value yes" wx:if="{{item.value > 0}}">{{'+' + item.value}}</view> |
| | | <view class="value no" wx:else>{{item.value}}</view> |
| | | </view> |
| | | </view> |