| | |
| | | }] |
| | | }) |
| | | } |
| | | |
| | | let token = wx.getStorageSync(tokenKey) ? wx.getStorageSync(tokenKey) : ''; |
| | | let url = token ? '/store/api/ApiQueryProductByAppUser' : '/store/api/ApiQueryProduct' |
| | | return request({ |
| | |
| | | method: 'post', |
| | | data: body, |
| | | cancelToken: source?.token |
| | | }) |
| | | .then((resp) => { |
| | | }).then((resp) => { |
| | | if (resp.length > 0) { |
| | | const data = resp[0] |
| | | if (data.datas.length) { |
| | | |
| | | data.datas[0].subDatas = data.datas[0].cmsDatas |
| | | const datas = handleDetailQueryRequestData({ |
| | | item: data.datas[0], |
| | |
| | | productLinkPath: options.productLinkPath, |
| | | refCode: options.refCode |
| | | }); |
| | | this.getResourceClass(); |
| | | this.getShoppingCartProductGet(); |
| | | }, |
| | | |
| | |
| | | if (item.fileMap[item.file].protectType == 'Private') item.disabled = true |
| | | } |
| | | } |
| | | // 在插入过程中对数据进行排序 并且去除已经领取和购买的 |
| | | if (item.sysType == 'CmsFolder') { |
| | | // 在插入过程中对数据进行排序 |
| | | newArr = this.insertAndSortObjectsByProductLinkPath(newArr, item) |
| | | } else if (item.sysType == 'CmsItem' && this.resourceIsBuy(item)) { |
| | | newArr = this.insertAndSortObjectsByProductLinkPath(newArr, item) |
| | | } |
| | | // 插进数组后 从原数据中删除 |
| | | rootList = rootList.filter(nitem => nitem.id != item.id) |
| | | } |
| | | } |
| | | //给数组里面再添加一个children的空数组 |
| | |
| | | flattenedArray.push(...childrenArray); |
| | | } |
| | | }); |
| | | return flattenedArray.filter((item) => item.sysType == "CmsItem"); |
| | | return flattenedArray; |
| | | }, |
| | | |
| | | // 教学资源 云学习 获取 |
| | | // 递归树结构,如果父级有销售方式(有效期),去掉所有子集的销售方式 |
| | | clearTreeSealmethod(clearSaleMethod, tree) { |
| | | for (let item of tree) { |
| | | const saleData = item.saleMethod && |
| | | item.saleMethod.length ? |
| | | item.saleMethod.find((citem) => citem.SaleType == 'Normal') : null |
| | | if ( |
| | | ((saleData && new Date(saleData.EndDate).getTime() >= new Date().getTime() && new Date(saleData.BeginDate).getTime() <= new Date().getTime()) || |
| | | clearSaleMethod) && item.children && item.children.length |
| | | ) { |
| | | item.children.forEach((ditem) => (ditem.saleMethod = [])) |
| | | } |
| | | if (item.children && item.children.length) |
| | | this.clearTreeSealmethod( |
| | | saleData && new Date(saleData.EndDate).getTime() >= new Date().getTime() && new Date(saleData.BeginDate).getTime() <= new Date().getTime(), |
| | | item.children |
| | | ) |
| | | } |
| | | return tree |
| | | }, |
| | | // 勾选禁用 |
| | | handleTreeCheck(tree) { |
| | | for (const item of tree) { |
| | | const saleData = item.saleMethod && |
| | | item.saleMethod.length ? |
| | | item.saleMethod.find((citem) => citem.SaleType == 'Normal') : undefined |
| | | if (saleData && new Date(saleData.EndDate).getTime() >= new Date().getTime() && new Date(saleData.BeginDate).getTime() <= new Date().getTime()) { |
| | | item.disabled = false |
| | | } else { |
| | | item.disabled = true |
| | | } |
| | | if (item.children && item.children.length) this.handleTreeCheck(item.children) |
| | | } |
| | | return tree |
| | | }, |
| | | // 获取云学习 |
| | | getResourceDataList(type) { |
| | | this.setData({ |
| | | loading: true, |
| | |
| | | }); |
| | | } |
| | | let list = [] |
| | | // 测试 6位// 正式 5位// 测试调用传20,内部7 正式调用传17 内部传6 |
| | | //教学资源 云学习 |
| | | if ( |
| | | type.refCode == "jsek_teachingResources" || |
| | | type.refCode == "jsek_cloudLearning" |
| | | ) { |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | item.checked = false; |
| | | if (item.sysType == 'CmsItem') { |
| | | // 教学资源 类型名称赋值 |
| | | this.data.resourceClassList.forEach((type) => { |
| | | if (type.value == item.resourcesClassification) |
| | | item.resourceClass = type.name; |
| | | }); |
| | | item.isbuy = this.isShowNeedBuy(item); |
| | | item.isShopCar = this.isShoppingCart(item); |
| | | } |
| | | // if (item.sysType == 'CmsItem') { |
| | | // item.isbuy = this.resourceIsBuy(item); |
| | | // item.isShopCar = this.isShoppingCart(item); |
| | | // } |
| | | }); |
| | | // 显示 需要购买的和需要免费领取的 |
| | | this.getTreeList(res.datas.cmsDatas[0].datas, list, query.cmsPath) |
| | | list = this.ensureTreeConsistency(list) |
| | | list = this.changeResourceChildren(list) |
| | | list = this.clearTreeSealmethod(false, list) |
| | | list = this.handleTreeCheck(list) |
| | | this.handleTreeData(list).forEach(item => { |
| | | item.isbuy = this.resourceIsBuy(item); |
| | | item.isShopCar = this.isShoppingCart(item); |
| | | }) |
| | | console.log('修改后云', list); |
| | | let result = []; |
| | | if (type.refCode == "jsek_teachingResources") { |
| | | this.findChildIds(list, result); |
| | | this.setData({ |
| | | teach: list, |
| | | loading: false, |
| | | openTeachids: result, |
| | | }); |
| | | } else if (type.refCode == "jsek_cloudLearning") { |
| | | let arr = this.handleTreeData(list).filter( |
| | | let arr = res.datas.cmsDatas[0].datas.filter( |
| | | (item) => item.saleMethod[0] |
| | | ); |
| | | let freeIds = arr.filter((item) => { |
| | |
| | | loading: false, |
| | | openLearnids: result, |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | async getBookInfo(id) { |
| | | this.setData({ |
| | | "mockData'.id": 0, |
| | | "mockData.price": 0, |
| | | "mockData.count": 0, |
| | | }); |
| | | const query = { |
| | | path: "*", |
| | | queryType: "*", |
| | |
| | | // 判断资源是否购买 |
| | | resourceIsBuy(data) { |
| | | if (data.saleMethod && data.saleMethod.length) { |
| | | const isSHow = this.data.buyIdList.some( |
| | | (item) => item == data.saleMethod[0].Id |
| | | const saleData = data.saleMethod.find((item) => item.SaleType == 'Normal') |
| | | if (saleData.State == 'Disable') return false |
| | | const isShow = this.data.buyIdList.some( |
| | | (item) => item == saleData.Id |
| | | ); |
| | | return !isSHow; |
| | | // 已经购买 |
| | | if (isShow) return false |
| | | // 未购买,查看销售方式是否过期 |
| | | if (!isShow) { |
| | | const flag = new Date(saleData.EndDate).getTime() >= new Date().getTime() && |
| | | new Date(saleData.BeginDate).getTime() <= new Date().getTime() |
| | | if (flag) { |
| | | // 为过期 ,需要购买 |
| | | return true |
| | | } else { |
| | | // 已过期 无需购买 |
| | | return false |
| | | } |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | |
| | | isShowNeedBuy(data) { |
| | | if (data.saleMethod && data.saleMethod.length) { |
| | | const isSHow = this.data.buyIdList.some( |
| | | (item) => item == data.saleMethod[0].Id |
| | | ); |
| | | if (isSHow) { |
| | | return false; |
| | | } else { |
| | | return data.saleMethod[0].Price > 0 ? true : false; |
| | | } |
| | | return !isSHow; |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | // 判断资源加入购物车按钮是否显示 |
| | | isShoppingCart(data) { |
| | | if (data.saleMethod && data.saleMethod.length) { |
| | | if (data.saleMethod[0].Price <= 0) return false; |
| | | const saleData = data.saleMethod.find((item) => item.SaleType == 'Normal') |
| | | // 先判断是否免费 |
| | | if (saleData.Price <= 0) return false |
| | | // 再判断是否购买 |
| | | const isBuy = this.data.buyIdList.some( |
| | | (item) => item == data.saleMethod[0].Id |
| | | ); |
| | | const isBuy = this.data.buyIdList.some((item) => item == saleData.Id) |
| | | if (isBuy) { |
| | | // 购买了 |
| | | return false; |
| | | return false |
| | | } else { |
| | | // 判断是否加入购物车 |
| | | const isSHow = this.data.shoppingCartGetId.some( |
| | | (item) => item == data.saleMethod[0].Id |
| | | ); |
| | | return !isSHow; |
| | | const isShow = this.data.shoppingCartGetId.some((item) => item == saleData.Id) |
| | | if (isShow) return false |
| | | // 未购买,查看销售方式是否过期 |
| | | if (!isShow) { |
| | | const flag = new Date(saleData.EndDate).getTime() >= new Date().getTime() && |
| | | new Date(saleData.BeginDate).getTime() <= new Date().getTime() |
| | | if (flag) { |
| | | // 为过期 ,需要购买 |
| | | return true |
| | | } else { |
| | | // 已过期 无需购买 |
| | | return false |
| | | } |
| | | } |
| | | } |
| | | // if (data.saleMethod[0].Price <= 0) return false; |
| | | // // 再判断是否购买 |
| | | // const isBuy = this.data.buyIdList.some( |
| | | // (item) => item == data.saleMethod[0].Id |
| | | // ); |
| | | // if (isBuy) { |
| | | // // 购买了 |
| | | // return false; |
| | | // } else { |
| | | // // 判断是否加入购物车 |
| | | // const isSHow = this.data.shoppingCartGetId.some( |
| | | // (item) => item == data.saleMethod[0].Id |
| | | // ); |
| | | // return !isSHow; |
| | | // } |
| | | } else { |
| | | return false; |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | // 获取资源所属分类 |
| | | getResourceClass() { |
| | | let query = { |
| | | refCodes: ["resourcesClassification"], |
| | | }; |
| | | app.MG.store.getProductTypeField(query).then((res) => { |
| | | this.setData({ |
| | | resourceClassList: JSON.parse(res[0].config).option, |
| | | }); |
| | | |
| | | }); |
| | | }, |
| | | checkAll() { |
| | | const child = this.selectComponent("#tree"); |
| | | child.checkAll(); |
| | |
| | | title: '暂无数据', |
| | | }) |
| | | } |
| | | let saleMethodIds = []; |
| | | let requests = []; |
| | | let item = []; |
| | | let selectAllId = []; |
| | | const child = this.selectComponent("#tree"); |
| | | item = child.data.superiorPurchaseSaleMethodId; |
| | | const sonItem = child.data.sonPurchaseSaleMethodId; |
| | | let selectAll = child.data.selectAll; |
| | | if (selectAll) { |
| | | selectAll.forEach((item) => { |
| | | if (item.saleMethod != 0) { |
| | | selectAllId.push(item.saleMethod[0].Id); |
| | | } |
| | | }); |
| | | app.MG.store |
| | | .initOrder({ |
| | | requests: selectAllId.map((id) => ({ |
| | | saleMethodId: id, |
| | | count: 1, |
| | | })), |
| | | }) |
| | | .then((res) => { |
| | | if (res) { |
| | | wx.navigateTo({ |
| | | url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | }); |
| | | selectAllId = []; |
| | | child.setData({ |
| | | selectAll: [], |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | if (item) { |
| | | // 拿到id |
| | | item.forEach((items) => { |
| | | if (items.saleMethod != 0) { |
| | | saleMethodIds.push(items.saleMethod[0].Id); |
| | | } |
| | | }); |
| | | app.MG.store |
| | | .initOrder({ |
| | | requests: saleMethodIds.map((id) => ({ |
| | | saleMethodId: id, |
| | | count: 1, |
| | | })), |
| | | }) |
| | | .then((res) => { |
| | | if (res) { |
| | | wx.navigateTo({ |
| | | url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | }); |
| | | // 修改后方法 |
| | | const checkData = this.handleTreeData(this.data.learn).filter(item => item.checked == true) |
| | | console.log('选中', checkData); |
| | | // let saleMethodIds = []; |
| | | // let requests = []; |
| | | // let item = []; |
| | | // let selectAllId = []; |
| | | // const child = this.selectComponent("#tree"); |
| | | // item = child.data.superiorPurchaseSaleMethodId; |
| | | // const sonItem = child.data.sonPurchaseSaleMethodId; |
| | | // let selectAll = child.data.selectAll; |
| | | // if (selectAll.length) { |
| | | // selectAll.forEach((item) => { |
| | | // if (item.saleMethod != 0) { |
| | | // selectAllId.push(item.saleMethod[0].Id); |
| | | // } |
| | | // }); |
| | | // app.MG.store |
| | | // .initOrder({ |
| | | // requests: selectAllId.map((id) => ({ |
| | | // saleMethodId: id, |
| | | // count: 1, |
| | | // })), |
| | | // }) |
| | | // .then((res) => { |
| | | // if (res) { |
| | | // wx.navigateTo({ |
| | | // url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | // }); |
| | | // selectAllId = []; |
| | | // child.setData({ |
| | | // selectAll: [], |
| | | // }); |
| | | // } |
| | | // }); |
| | | // } |
| | | // if (item) { |
| | | // // 拿到id |
| | | // item.forEach((items) => { |
| | | // if (items.saleMethod != 0) { |
| | | // saleMethodIds.push(items.saleMethod[0].Id); |
| | | // } |
| | | // }); |
| | | // app.MG.store |
| | | // .initOrder({ |
| | | // requests: saleMethodIds.map((id) => ({ |
| | | // saleMethodId: id, |
| | | // count: 1, |
| | | // })), |
| | | // }) |
| | | // .then((res) => { |
| | | // if (res) { |
| | | // wx.navigateTo({ |
| | | // url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | // }); |
| | | |
| | | child.setData({ |
| | | superiorPurchaseSaleMethodId: [], // 使用setData方法清空sonPurchaseSaleMethodId数据 |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | if (item.length == 0 && sonItem) { |
| | | app.MG.store |
| | | .initOrder({ |
| | | requests: sonItem.map((id) => ({ |
| | | saleMethodId: id, |
| | | count: 1, |
| | | })), |
| | | }) |
| | | .then((res) => { |
| | | if (res) { |
| | | wx.navigateTo({ |
| | | url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | }); |
| | | this.setData({ |
| | | paymentPage: true, |
| | | }); |
| | | child.setData({ |
| | | sonPurchaseSaleMethodId: [], // 使用setData方法清空sonPurchaseSaleMethodId数据 |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | // child.setData({ |
| | | // superiorPurchaseSaleMethodId: [], // 使用setData方法清空sonPurchaseSaleMethodId数据 |
| | | // }); |
| | | // } |
| | | // }); |
| | | // } |
| | | // if (item.length == 0 && sonItem) { |
| | | // app.MG.store |
| | | // .initOrder({ |
| | | // requests: sonItem.map((id) => ({ |
| | | // saleMethodId: id, |
| | | // count: 1, |
| | | // })), |
| | | // }) |
| | | // .then((res) => { |
| | | // if (res) { |
| | | // wx.navigateTo({ |
| | | // url: "/pages/cart/paymentPage/index?orderNumber=" + res.orderNumber, |
| | | // }); |
| | | // this.setData({ |
| | | // paymentPage: true, |
| | | // }); |
| | | // child.setData({ |
| | | // sonPurchaseSaleMethodId: [], // 使用setData方法清空sonPurchaseSaleMethodId数据 |
| | | // }); |
| | | // } |
| | | // }); |
| | | // } |
| | | }, |
| | | |
| | | // 章节勾选方法 |
| | |
| | | this.setData({ |
| | | learn: updated |
| | | }) |
| | | }, |
| | | upDateShopCar(id, tree) { |
| | | for (let item of tree) { |
| | | if (item.id == id) { |
| | | item.isShopCar = false |
| | | } else { |
| | | if (item.children && item.children.length) this.upDateShopCar(id, item.children) |
| | | } |
| | | } |
| | | return tree |
| | | }, |
| | | // 更新购物车图标 |
| | | updateCloudLearning(e) { |
| | | const { |
| | | id |
| | | } = e.detail |
| | | console.log(id); |
| | | const list = this.upDateShopCar(id, this.data.learn) |
| | | this.setData({ |
| | | learn: list |
| | | }) |
| | | } |
| | | }); |
| | |
| | | <!-- 资源购买页面 --> |
| | | |
| | | |
| | | |
| | | <view> |
| | | <!--导航区域 --> |
| | | <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | |
| | | <view class="flex"> |
| | | <view class="back-icon"> |
| | | <!-- <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> --> |
| | | <image src="/static/images/digitalTextbooks/chevron-left.png" bind:tap="goBack" mode="aspectFit" /> |
| | | <image |
| | | src="/static/images/digitalTextbooks/chevron-left.png" |
| | | bind:tap="goBack" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | <view class="navbar-title">资源购买</view> |
| | | </view> |
| | |
| | | <!-- 内容 --> |
| | | |
| | | <view class="buy-resource" wx:if="{{!loading}}"> |
| | | <tree id="tree" paymentPage="{{paymentPage}}" superior="{{superior}}" treeList="{{learn}}" learnList="{{learn}}" tab="{{'jsek_cloudLearning'}}" isShowCheck="{{true}}" openIds="{{openLearnids}}" checkAllState="{{checkAllState}}" bind:changeCheckAll="changeCheckAll" bind:changeListChecked="changeListChecked" bind:changeResourceChecked="changeResourceChecked" /> |
| | | <tree |
| | | id="tree" |
| | | paymentPage="{{paymentPage}}" |
| | | superior="{{superior}}" |
| | | treeList="{{learn}}" |
| | | learnList="{{learn}}" |
| | | tab="{{'jsek_cloudLearning'}}" |
| | | isShowCheck="{{true}}" |
| | | openIds="{{openLearnids}}" |
| | | checkAllState="{{checkAllState}}" |
| | | bind:changeCheckAll="changeCheckAll" |
| | | bind:changeListChecked="changeListChecked" |
| | | bind:changeResourceChecked="changeResourceChecked" |
| | | bind:updateCloudLearning="updateCloudLearning" |
| | | /> |
| | | <view class="noData" wx:if="{{noData}}"> |
| | | <!-- <t-empty icon="folder-open" description="暂无数据" /> --> |
| | | <empty /> |
| | | </view> |
| | | </view> |
| | | <view class="page-bottom"> |
| | | <t-button theme="primary" size="large" class="btn-buy" bindtap="batchPurchase">批量购买</t-button> |
| | | <t-button |
| | | theme="primary" |
| | | size="large" |
| | | class="btn-buy" |
| | | bindtap="batchPurchase" |
| | | >批量购买</t-button |
| | | > |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | }, |
| | | isGoBuyResource: { |
| | | type: Boolean |
| | | } |
| | | }, |
| | | isShowBuyCloundMenu: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | }, |
| | | |
| | | /** |
| | |
| | | <!--pages/bookServices/detail/components/learnResource/learnResource.wxml--> |
| | | <view class="learnResource" theme="primary" style="justify-content: {{!isshowDrawBtn ? 'flex-end' : ''}};"> |
| | | <t-button wx:if="{{isshowDrawBtn}}" loading="{{receive}}" class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx" t-class="external-class" bind:tap="getFreeResource"> |
| | | <view |
| | | class="learnResource" |
| | | theme="primary" |
| | | style="justify-content: {{!isshowDrawBtn ? 'flex-end' : ''}};" |
| | | > |
| | | <t-button |
| | | wx:if="{{isshowDrawBtn}}" |
| | | loading="{{receive}}" |
| | | class="btn" |
| | | theme="primary" |
| | | style="height: 72rpx; font-size: 28rpx" |
| | | t-class="external-class" |
| | | bind:tap="getFreeResource" |
| | | > |
| | | <view slot="content" class="btn-content"> |
| | | <image src=" /static/images/bookService/detail/yijianlingqu.png" /> |
| | | <text>领取查看</text> |
| | | </view> |
| | | </t-button> |
| | | <t-button loading="{{buy}}" class="btn" theme="primary" bind:tap="goBuyResource" style="height: 72rpx; font-size: 28rpx;margin: {{!isshowDrawBtn ? '0 20rpx' : ''}}"> |
| | | <t-button |
| | | wx:if="{{!isShowBuyCloundMenu}}" |
| | | loading="{{buy}}" |
| | | class="btn" |
| | | theme="primary" |
| | | bind:tap="goBuyResource" |
| | | style="height: 72rpx; font-size: 28rpx;margin: {{!isshowDrawBtn ? '0 20rpx' : ''}}" |
| | | > |
| | | <view slot="content" class="btn-content"> |
| | | <image src="/static/images/bookService/detail/yijiangoumai.png" /> |
| | | <text>资源购买</text> |
| | | </view> |
| | | </t-button> |
| | | <t-button class="btn" theme="primary" style="height: 72rpx; font-size: 28rpx; margin: 0 20rpx" bind:tap="goLearnTask"> |
| | | <t-button |
| | | theme="primary" |
| | | class="btn" |
| | | style="height: 72rpx; font-size: 28rpx" |
| | | wx:if="{{isShowBuyCloundMenu}}" |
| | | > |
| | | <view slot="content" class="btn-content"> |
| | | <image src="/static/images/bookService/detail/yijiangoumai.png" /> |
| | | <text>全部购买</text> |
| | | </view> |
| | | </t-button> |
| | | <t-button |
| | | class="btn" |
| | | theme="primary" |
| | | style="height: 72rpx; font-size: 28rpx; margin: 0 20rpx" |
| | | bind:tap="goLearnTask" |
| | | > |
| | | <view slot="content" class="btn-content"> |
| | | <image src="/static/images/bookService/detail/renwudan/icon.png" /> |
| | | <text>学习任务单</text> |
| | |
| | | type: String, |
| | | value: "", |
| | | }, |
| | | treeList: { |
| | | type: Array, |
| | | } |
| | | }, |
| | | data: { |
| | | showRejectDialog: false, |
| | |
| | | "usingComponents": { |
| | | "t-image": "tdesign-miniprogram/image/image", |
| | | "t-button": "tdesign-miniprogram/button/button", |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog" |
| | | "t-dialog": "tdesign-miniprogram/dialog/dialog", |
| | | "empty": "/components/empty/index" |
| | | } |
| | | } |
| | |
| | | <!-- <view class="teach-btn"> --> |
| | | <!-- <t-button theme="primary" style="width: 120px; height: 36px" class="btn" bind:tap="uploadBtn"> |
| | | <view class="teach-btn"> |
| | | <t-button |
| | | theme="primary" |
| | | style="width: 120px; height: 36px" |
| | | class="btn" |
| | | bind:tap="uploadBtn" |
| | | > |
| | | <view slot="content" class="btn-content"> |
| | | <image src="/static/images/bookService/detail/upload.png" mode="aspectFit" ></image> |
| | | <image |
| | | src="/static/images/bookService/detail/upload.png" |
| | | mode="aspectFit" |
| | | ></image> |
| | | <text>上传资源</text> |
| | | </view> |
| | | </t-button> --> |
| | | </t-button> |
| | | <!-- <t-button theme="primary" style="width: 120px; height: 36px"> |
| | | <t-image src="/static/images/bookService/detail/download.png"></t-image> |
| | | 批量下载 |
| | | </t-button> --> |
| | | <!-- </view> --> |
| | | <view class="applyResult {{applyState == 'none' ? 'applyNone' : applyState == 'Normal' ? 'applyPass' : applyState == 'WaitAudit' ? 'applying' :applyState == 'Reject' ? 'applyReject' :'' }}"> |
| | | <view wx:if="{{applyState == 'WaitAudit'}}">资源下载申请正在审核中,请耐心等待!</view> |
| | | </view> |
| | | <view |
| | | class="applyResult {{applyState == 'none' ? 'applyNone' : applyState == 'Normal' ? 'applyPass' : applyState == 'WaitAudit' ? 'applying' :applyState == 'Reject' ? 'applyReject' :'' }}" |
| | | wx:if="{{treeList.length}}" |
| | | > |
| | | <view wx:if="{{applyState == 'WaitAudit'}}" |
| | | >资源下载申请正在审核中,请耐心等待!</view |
| | | > |
| | | <view wx:if="{{applyState == 'Normal'}}"> |
| | | <view> |
| | | 资源下载申请已通过<text wx:if="{{deadline}}">,有效日期截至:{{ deadline }}</text></view> |
| | | 资源下载申请已通过<text wx:if="{{deadline}}" |
| | | >,有效日期截至:{{ deadline }}</text |
| | | ></view |
| | | > |
| | | <view style="display: flex; align-items: center; margin-top: 10rpx"> |
| | | <text>下载资源请到PC端京师智教</text> |
| | | <text bind:tap="copy" class="copy-text">复制</text> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{applyState == 'Reject'}}">资源下载需要申请,请先申请并等待审核通过后方可下载</view> |
| | | <view wx:if="{{applyState == 'Reject'}}" |
| | | >资源下载需要申请,请先申请并等待审核通过后方可下载</view |
| | | > |
| | | <view wx:if="{{applyState == 'none'}}"> |
| | | 资源下载需要申请,请先申请并等待审核通过后方可下载 |
| | | </view> |
| | | <view class="btn-box"> |
| | | <t-button wx:if="{{applyState == 'Reject'}}" bind:tap="checkCause" style="height: 50rpx" class="rejectBtn" bind:tap="showDialog">查看原因</t-button> |
| | | <t-button wx:if="{{applyState == 'none' || applyState == 'Reject'}}" theme="primary" bind:tap="applyResource" class="applyBtn" style="height: 50rpx">申请</t-button> |
| | | <t-button |
| | | wx:if="{{applyState == 'Reject'}}" |
| | | bind:tap="checkCause" |
| | | style="height: 50rpx" |
| | | class="rejectBtn" |
| | | bind:tap="showDialog" |
| | | >查看原因</t-button |
| | | > |
| | | <t-button |
| | | wx:if="{{applyState == 'none' || applyState == 'Reject'}}" |
| | | theme="primary" |
| | | bind:tap="applyResource" |
| | | class="applyBtn" |
| | | style="height: 50rpx" |
| | | >申请</t-button |
| | | > |
| | | </view> |
| | | </view> |
| | | <view class="noData" wx:else> |
| | | <empty /> |
| | | </view> |
| | | <!-- 未通过原因 --> |
| | | <t-dialog visible="{{showRejectDialog}}" title="提示" confirm-btn="{{ confirmBtn }}" bind:confirm="closeDialog" class="notPassed"> |
| | | <t-dialog |
| | | visible="{{showRejectDialog}}" |
| | | title="提示" |
| | | confirm-btn="{{ confirmBtn }}" |
| | | bind:confirm="closeDialog" |
| | | class="notPassed" |
| | | > |
| | | <view slot="content"> |
| | | <text class="cause-title">资源下载申请未通过,解决问题后可点击“申请”按钮重新提交申请</text> |
| | | <text class="cause-title" |
| | | >资源下载申请未通过,解决问题后可点击“申请”按钮重新提交申请</text |
| | | > |
| | | <view class="cause-content">原因:{{ rejectCause || '-'}}</view> |
| | | </view> |
| | | </t-dialog> |
| | |
| | | .btn text { |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .noData { |
| | | height: 300rpx; |
| | | } |
| | |
| | | deadline: { |
| | | type: String, |
| | | }, |
| | | cloundMenuIsBuy: { |
| | | type: Boolean |
| | | } |
| | | }, |
| | | data: { |
| | | sonPurchaseSaleMethodId: "", |
| | | superiorPurchaseSaleMethodId: [], |
| | | activeValues: [1, 2], |
| | | webpageSrc: "", |
| | | cloudShoppingCart: [], |
| | | selectAll: [], |
| | | shoppingCart: true, |
| | | stop: false, |
| | | cart: true, |
| | | canExecute: true |
| | | canExecute: true, |
| | | purchaseList: [] |
| | | }, |
| | | ready() {}, |
| | | |
| | | onLoad() { |
| | | this.setData({ |
| | | sonPurchaseSaleMethodId: [], |
| | | }); |
| | | }, |
| | | onLoad() {}, |
| | | observers: { |
| | | treeList: function (newValue) { |
| | | const list = []; |
| | |
| | | } |
| | | } |
| | | }, |
| | | // 遍历树结构转换为数组方法 |
| | | 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; |
| | | }, |
| | | // 节点展开 |
| | | handleChange(e) { |
| | | console.log(e.detail.value); |
| | | this.setData({ |
| | | openIds: e.detail.value, |
| | | }); |
| | |
| | | // 判断资源是否购买 |
| | | resourceIsBuy(data) { |
| | | if (data.saleMethod && data.saleMethod.length) { |
| | | if (data.saleMethod[0].State == "Disable") return false; |
| | | const saleData = data.saleMethod.find((item) => item.SaleType == 'Normal') |
| | | if (saleData.State == 'Disable') return false |
| | | const isSHow = this.properties.buyIds.some( |
| | | (item) => item == data.saleMethod[0].Id |
| | | (item) => item == saleData.Id |
| | | ); |
| | | return !isSHow; |
| | | // 已经购买 |
| | | if (isShow) return false |
| | | // 未购买,查看销售方式是否过期 |
| | | if (!isShow) { |
| | | const flag = new Date(saleData.EndDate).getTime() >= new Date().getTime() && |
| | | new Date(saleData.BeginDate).getTime() <= new Date().getTime() |
| | | if (flag) { |
| | | // 为过期 ,需要购买 |
| | | return true |
| | | } else { |
| | | // 已过期 无需购买 |
| | | return false |
| | | } |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | |
| | | const parentName = parent ? parent.name : "教学资源"; |
| | | // 资源购买页面(只展示未购买资源) 点击不跳转 |
| | | if (this.properties.isShowCheck) return false; |
| | | if ( |
| | | this.properties.tab == "jsek_cloudLearning" && |
| | | this.resourceIsBuy(item) |
| | | ) { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: item.saleMethod[0].Price > 0 ? |
| | | "请先购买该资源" : "请先点击领取查看按钮", |
| | | }); |
| | | if (item.selectType == "webpage") { |
| | | // 网页类型跳转到网址复制页,因为url传参不能传 带参数的网络地址,所以此处要把网络地址里的传参摘出来,放到url里 |
| | | let urlData = '' |
| | | const flags = item.jsek_link.indexOf("?") |
| | | if (flags > -1) { |
| | | urlData = item.jsek_link.slice(flags + 1, item.jsek_link.length) |
| | | } |
| | | if (this.properties.tab == "jsek_teachingResources" && (item.file || item.freeFile)) { |
| | | let file = item.fileMap[item.file] ? item.fileMap[item.file] : item.fileMap[item.freeFile] |
| | | if (file && file.protectType !== "Public") { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: "资源不可用,请联系管理员", |
| | | }); |
| | | } |
| | | url = '/packageBookService/pages/bookServices/linkPage/index' |
| | | return wx.navigateTo({ |
| | | url: urlData ? url + `?path=${item.jsek_link.slice(0,flags)}` + '&' + urlData : url + `?path=${item.jsek_link}` |
| | | }) |
| | | } |
| | | if (!item.file && !item.freeFile && !item.protectedFile) { |
| | | return wx.showToast({ |
| | |
| | | }) |
| | | } |
| | | } |
| | | let url; |
| | | if (item.selectType == "webpage") { |
| | | // 网页类型跳转到网址复制页,因为url传参不能传 带参数的网络地址,所以此处要把网络地址里的传参摘出来,放到url里 |
| | | let urlData = '' |
| | | const flags = item.jsek_link.indexOf("?") |
| | | if (flags > -1) { |
| | | urlData = item.jsek_link.slice(flags + 1, item.jsek_link.length) |
| | | if (this.properties.tab == "jsek_teachingResources" && (item.file || item.freeFile)) { |
| | | let file = item.fileMap[item.file] ? item.fileMap[item.file] : item.fileMap[item.freeFile] |
| | | if (file && file.protectType !== "Public") { |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: "资源不可用,请联系管理员", |
| | | }); |
| | | } |
| | | url = '/packageBookService/pages/bookServices/linkPage/index' |
| | | return wx.navigateTo({ |
| | | url: urlData ? url + `?path=${item.jsek_link.slice(0,flags)}` + '&' + urlData : url + `?path=${item.jsek_link}` |
| | | } |
| | | if (this.properties.tab == "jsek_cloudLearning") { |
| | | // 判断父级或自身是否购买 |
| | | var myEventOption = { |
| | | bubbles: true, |
| | | composed: true, |
| | | }; |
| | | // 出发判断云学习是否购买判断 |
| | | this.triggerEvent("getCloundIsBuy", {}, myEventOption) |
| | | if (!this.properties.cloundMenuIsBuy) { |
| | | // 云学习未购买,查找以购买的目录和资源本身 |
| | | const learn = this.handleTreeData(this.properties.treeList).filter( |
| | | (citem) => citem.saleMethod && |
| | | citem.saleMethod.find((ditem) => ditem.SaleType == 'Normal') && |
| | | new Date(citem.saleMethod.find((ditem) => ditem.SaleType == 'Normal').EndDate).getTime() >= new Date().getTime() && |
| | | new Date(citem.saleMethod.find((ditem) => ditem.SaleType == 'Normal').BeginDate).getTime() <= new Date().getTime() && |
| | | item.productLinkPath.includes(citem.productLinkPath) |
| | | ) |
| | | // 资源和父级目录都无销售方式 |
| | | // if (!learn.length) return wx.showToast({ |
| | | // icon: 'error', |
| | | // title: '暂未开售', |
| | | // }) |
| | | const buyList = learn.filter((citem) => this.properties.buyIds.includes(citem.saleMethod.find((ditem) => ditem.SaleType == 'Normal').Id)) |
| | | // 资源和本身都未购买 |
| | | if (!buyList.length) { |
| | | const itemSaleMethod = item.saleMethod && item.saleMethod.length ? item.saleMethod.find(citem => citem.SaleType == 'Normal') : undefined |
| | | return wx.showToast({ |
| | | icon: 'error', |
| | | title: itemSaleMethod && itemSaleMethod.Price == 0 ? '请先领取资源' : '请先购买资源', |
| | | }) |
| | | } |
| | | |
| | | } |
| | | } |
| | | let url; |
| | | if (item.selectType == "video" || item.learnSelectType == "video") { |
| | | url = "/packageDomain/pages/resourceDetails/myVideo/index"; |
| | | } |
| | |
| | | result.push(...item.children); |
| | | } |
| | | } |
| | | console.log(this.properties.treeList, "this.properties.treeList"); |
| | | this.properties.treeList.forEach((item) => { |
| | | findChildren(item); |
| | | }); |
| | |
| | | tree.forEach((node) => { |
| | | flatten(node); |
| | | }); |
| | | // console.log(result, 'result'); |
| | | return result; |
| | | }, |
| | | |
| | |
| | | findAndUpdateItemsByIds(tree, ids, state) { |
| | | function findAndUpdate(node) { |
| | | if (ids.includes(node.id)) { |
| | | // console.log(node, 'node'); |
| | | node.checked = state; // 将目标项的 check 属性设置为 true |
| | | } |
| | | if (node.children && node.children.length > 0) { |
| | |
| | | return tree; // 返回修改后的完整数组 |
| | | }, |
| | | |
| | | checkResoucrceInfo(tree, id) { |
| | | function findAndUpdate(node) { |
| | | if (node.sysType == "CmsFolder" && node.children.length > 0) { |
| | | for (let index = 0; index < node.children.length; index++) { |
| | | const element = node.children[index]; |
| | | findAndUpdate(element); |
| | | } |
| | | } else if (id == node.id && node.sysType == "CmsItem") { |
| | | node.checked = !node.checked; // 将目标项的 check 属性设置为 true |
| | | } |
| | | } |
| | | for (let node of tree) { |
| | | findAndUpdate(node); // 对每个顶层节点执行查找和更新操作 |
| | | } |
| | | return tree; // 返回修改后的完整数组 |
| | | }, |
| | | // 全选 |
| | | checkAll() { |
| | | const ids = []; |
| | | const list = []; |
| | | let list = []; |
| | | let checked = ""; |
| | | this.properties.treeList.forEach((item) => { |
| | | if (item.children && item.children.length > 0) { |
| | | list.push(...this.flattenTree([item])); |
| | | } |
| | | }); |
| | | list = list.filter(item => !item.disabled) |
| | | list.forEach((item) => { |
| | | ids.push(item.id); |
| | | checked = item.checked; |
| | | }); |
| | | // const flag = |
| | | // list.findIndex((item) => item.checked == false) > -1 ? true : false; |
| | | const flag = this.properties.checkAllState; |
| | | // const updataList = this.findAndUpdateItemsByIds( |
| | | // this.properties.treeList, |
| | | // ids, |
| | | // flag |
| | | // ); |
| | | // this.setData({ |
| | | // treeList: updataList, |
| | | // }); |
| | | |
| | | var myEventDetail = { |
| | | ids, |
| | | flag, |
| | | }; // detail对象,提供给事件监听函数 |
| | | }; |
| | | var myEventOption = { |
| | | bubbles: true, |
| | | composed: true, |
| | | }; // 触发事件的选项 |
| | | }; |
| | | this.triggerEvent("changeListChecked", myEventDetail, myEventOption); |
| | | |
| | | if (!checked) { |
| | | this.setData({ |
| | | selectAll: list, |
| | | }); |
| | | } |
| | | var myEventDetail = { |
| | | value: !flag, |
| | | }; // detail对象,提供给事件监听函数 |
| | |
| | | checkResourceTitle(e) { |
| | | const flag = e.detail.checked; |
| | | // 这个时候checked的值是fals |
| | | let checkResourceTitleList = []; |
| | | const item = e.currentTarget.dataset.item; |
| | | const parent = this.findParentById(this.properties.learnList, item.id); |
| | | let childrenList; |
| | | let childrenList = []; |
| | | let flagNum; |
| | | if (parent) |
| | | childrenList = parent.children.filter((citem) => citem.id !== item.id); |
| | | if (childrenList) |
| | | flagNum = childrenList.findIndex((item) => item.checked == false); |
| | | let list = this.flattenTree([item]); |
| | | list = list.filter(item => !item.disabled) |
| | | let ids = []; |
| | | list.forEach((item) => { |
| | | if ( |
| | | item.sysType == "CmsFolder" || |
| | | (item.sysType == "CmsItem" && item.saleMethod.length) |
| | | ) |
| | | ids.push(item.id); |
| | | ids.push(item.id) |
| | | }); |
| | | var myEventDetail = { |
| | | ids, |
| | |
| | | bubbles: true, |
| | | composed: true, |
| | | }; // 触发事件的选项 |
| | | // 去勾选点击目录的子项 |
| | | this.triggerEvent("changeListChecked", myEventDetail, myEventOption); |
| | | if (flagNum == -1) { |
| | | // 去勾选点击目录的父项 |
| | | if (flagNum == -1 && parent && !parent.disabled) { |
| | | let checkedState; |
| | | var myEventDetail = { |
| | | ids: [parent.id], |
| | | flag, |
| | | }; // detail对象,提供给事件监听函数 |
| | | }; |
| | | var myEventOption = { |
| | | bubbles: true, |
| | | composed: true, |
| | | }; // 触发事件的选项 |
| | | }; |
| | | this.triggerEvent("changeListChecked", myEventDetail, myEventOption); |
| | | } |
| | | if (!list.checked) { |
| | | this.setData({ |
| | | superiorPurchaseSaleMethodId: list, |
| | | }); |
| | | } |
| | | list.forEach((items) => { |
| | | console.log(items.checked, "itesasd"); |
| | | if (!items.checked) { |
| | | this.setData({ |
| | | cloudShoppingCart: items, |
| | |
| | | }; |
| | | this.triggerEvent("changeResourceChecked", myEventDetail, myEventOption); |
| | | // 通过判断,联通父级checked |
| | | if (flag == -1) { |
| | | if (flag == -1 && !parent.disabled) { |
| | | let checkedState; |
| | | citem.checked == false ? (checkedState = true) : (checkedState = false); |
| | | var myEventDetail = { |
| | |
| | | this.triggerEvent("changeListChecked", myEventDetail, myEventOption); |
| | | } |
| | | // 联通最外层级checked, 如果所有子项勾选, 且当前最外层未勾选, 则加上最外层的勾选 |
| | | if (!citem.checked && outermost) { |
| | | if (!citem.checked && outermost && !outermost.disabled) { |
| | | let allchildren = this.flattenTree([outermost]); |
| | | allchildren = allchildren.filter( |
| | | (item) => |
| | |
| | | this.triggerEvent("changeListChecked", myEventDetail, myEventOption); |
| | | } |
| | | } |
| | | if (!citem.checked) { |
| | | //选中的时候添加id |
| | | let sonPurchaseSaleMethodId = this.data.sonPurchaseSaleMethodId || []; |
| | | if (this.properties.paymentPage) { |
| | | sonPurchaseSaleMethodId = []; |
| | | this.properties.paymentPage = false; |
| | | } |
| | | if (!this.properties.paymentPage) { |
| | | sonPurchaseSaleMethodId.push(citem.saleMethod[0].Id); |
| | | } |
| | | this.setData({ |
| | | sonPurchaseSaleMethodId: sonPurchaseSaleMethodId, |
| | | }); |
| | | } else { |
| | | // 取消选中的时候删除id |
| | | } |
| | | }, |
| | | // 加入购物车 |
| | | async onCloudShoppingCart(e) { |
| | | let shoppingCartGetId = []; |
| | | |
| | | const item = e.currentTarget.dataset.item; |
| | | console.log(item.isShopCar); |
| | | const saleMethodId = e.currentTarget.dataset.item.saleMethod[0].Id; |
| | | console.log(saleMethodId); |
| | | let query = { |
| | | start: 0, |
| | | size: 999, |
| | |
| | | shoppingCartGetId.push(item.saleMethod.id); |
| | | }); |
| | | if (shoppingCartGetId.includes(saleMethodId)) { |
| | | // this.data.updateShoppingCartHidden(); |
| | | // this.data.updateCloudLearning(); |
| | | wx.showToast({ |
| | | icon: "error", |
| | | title: "已添加", |
| | |
| | | }, ], |
| | | }; |
| | | const addRes = await app.MG.store.addShoppingCart(query); |
| | | console.log(addRes, "addRes"); |
| | | if (addRes) { |
| | | wx.showToast({ |
| | | icon: "success", |
| | | title: "添加成功", |
| | | }); |
| | | item.isShopCar = false; |
| | | this.triggerEvent("updateCloudLearning"); |
| | | var myEventDetail = { |
| | | id: item.id, |
| | | }; |
| | | var myEventOption = { |
| | | bubbles: true, |
| | | composed: true, |
| | | }; |
| | | this.triggerEvent("updateCloudLearning", myEventDetail, myEventOption); |
| | | } |
| | | } |
| | | }, |
| | |
| | | <view class="tree"> |
| | | <t-collapse default-value="{{openIds}}" catchchange="handleChange"> |
| | | <view wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" wx:if="{{item.sysType== 'CmsItem' }}"> |
| | | <view class="listItems" wx:if="{{item.childrenFolderCount <= 0 && item.sysType == 'CmsItem'}}"> |
| | | <view |
| | | wx:for="{{treeList}}" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | wx:key="id" |
| | | wx:if="{{item.sysType== 'CmsItem' }}" |
| | | > |
| | | <view |
| | | class="listItems" |
| | | wx:if="{{item.childrenFolderCount <= 0 && item.sysType == 'CmsItem'}}" |
| | | > |
| | | <view class="itemsInfo" data-item="{{item}}" data-index="{{index}}"> |
| | | <view class="contentBox" bind:tap="goPlayer" data-item="{{item}}" data-parent="{{''}}"> |
| | | <view |
| | | class="contentBox" |
| | | bind:tap="goPlayer" |
| | | data-item="{{item}}" |
| | | data-parent="{{''}}" |
| | | > |
| | | <!-- 教学资源 云学习 图标 --> |
| | | <view class="box-image fl-cn" style="width: 80%"> |
| | | <view class="checkBox" wx:if="{{isShowCheck}}" catchtap="catchTap"> |
| | | <!-- checked="{{citem.checked}}" --> |
| | | <!-- <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}}" /> --> |
| | | <t-checkbox disabled="{{!citem.saleMethod[0].Id}}" icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" data-parent="{{item}}" catch:change="checkResource" /> |
| | | <view |
| | | class="checkBox" |
| | | wx:if="{{isShowCheck}}" |
| | | catchtap="catchTap" |
| | | > |
| | | <t-checkbox |
| | | disabled="{{item.disabled}}" |
| | | icon="rectangle" |
| | | checked="{{item.checked}}" |
| | | data-item="{{item}}" |
| | | data-parent="{{item}}" |
| | | catch:change="checkResource" |
| | | /> |
| | | </view> |
| | | <!-- 教学资源图标 --> |
| | | <view class="teach-icon fl-cn"> |
| | | <image wx:if="{{item.selectType == 'audio' || item.learnSelectType == 'audio'}}" src="/static/images/bookService/detail/audioIcon.png" mode="aspectFill" /> |
| | | <image wx:elif="{{item.selectType == 'video' || item.learnSelectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" /> |
| | | <image wx:elif="{{item.selectType == 'pdf'}}" src="/static/images/bookService/detail/pdf.png" mode="aspectFill" /> |
| | | <image wx:elif="{{item.selectType == 'webpage'}}" src="/static/images/bookService/detail/net.png" mode="aspectFill" /> |
| | | <image wx:elif="{{item.selectType == 'picture'}}" src="/static/images/bookService/detail/picture.png" mode="aspectFill" /> |
| | | <image wx:elif="{{item.selectType == 'zip'}}" src="/static/images/bookService/detail/zip.png" mode="aspectFill" /> |
| | | <image wx:elif="{{ item.fileMap[item.file].extension == 'doc' || item.fileMap[item.file].extension == 'docx'}}" src="/static/images/bookService/detail/word.png" mode="aspectFill" /> |
| | | <image wx:elif="{{ item.fileMap[item.file].extension == 'xlsx' || item.fileMap[item.file].extension == 'xlsx'}}" src="/static/images/bookService/detail/excel.png" mode="aspectFill" /> |
| | | <image wx:elif="{{ item.fileMap[item.file].extension == 'ppt' || item.fileMap[item.file].extension == 'pptx'}}" src="/static/images/bookService/detail/PPT.png" mode="aspectFill" /> |
| | | <image |
| | | wx:if="{{item.selectType == 'audio' || item.learnSelectType == 'audio'}}" |
| | | src="/static/images/bookService/detail/audioIcon.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{item.selectType == 'video' || item.learnSelectType == 'video'}}" |
| | | src="/static/images/bookService/detail/video.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{item.selectType == 'pdf'}}" |
| | | src="/static/images/bookService/detail/pdf.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{item.selectType == 'webpage'}}" |
| | | src="/static/images/bookService/detail/net.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{item.selectType == 'picture'}}" |
| | | src="/static/images/bookService/detail/picture.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{item.selectType == 'zip'}}" |
| | | src="/static/images/bookService/detail/zip.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{ item.fileMap[item.file].extension == 'doc' || item.fileMap[item.file].extension == 'docx'}}" |
| | | src="/static/images/bookService/detail/word.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{ item.fileMap[item.file].extension == 'xlsx' || item.fileMap[item.file].extension == 'xlsx'}}" |
| | | src="/static/images/bookService/detail/excel.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{ item.fileMap[item.file].extension == 'ppt' || item.fileMap[item.file].extension == 'pptx'}}" |
| | | src="/static/images/bookService/detail/PPT.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <!-- 资源无文件内容图标 --> |
| | | <image wx:else src="/static/images/bookService/detail/word.png" mode="" /> |
| | | <image |
| | | wx:else |
| | | src="/static/images/bookService/detail/word.png" |
| | | mode="" |
| | | /> |
| | | </view> |
| | | <!-- 云学习图标 --> |
| | | <view> </view> |
| | | <!-- 名称 --> |
| | | <text class="name" style="width: 100%">{{item.name || '-'}}</text> |
| | | </view> |
| | |
| | | </view> |
| | | <view wx:if="{{tab == 'jsek_cloudLearning'}}"> |
| | | <!-- 云学习试看图标 --> |
| | | <image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{!item.isbuy ? false : item.freeFile ? true : false}}"></image> |
| | | <image |
| | | src="/static/images/bookService/detail/shikan.png" |
| | | class="testSee" |
| | | wx:if="{{!item.isbuy ? false : item.freeFile ? true : false}}" |
| | | ></image> |
| | | <!-- 云学习加入购物车图标 --> |
| | | <image src="/static/images/bookService/detail/cart@2x.png" wx:if="{{item.isShopCar}}" class="shopCar" data-item="{{item}}" catch:tap="onCloudShoppingCart"></image> |
| | | <image |
| | | src="/static/images/bookService/detail/cart@2x.png" |
| | | wx:if="{{item.isShopCar}}" |
| | | class="shopCar" |
| | | data-item="{{item}}" |
| | | catch:tap="onCloudShoppingCart" |
| | | ></image> |
| | | <!-- 云学习购买图标 --> |
| | | <image src="/static/images/bookService/detail/need-buy.png" class="need-buy" wx:if="{{item.isbuy }}"></image> |
| | | <image |
| | | src="/static/images/bookService/detail/need-buy.png" |
| | | class="need-buy" |
| | | wx:if="{{item.isbuy }}" |
| | | ></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <t-collapse-panel wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" value="{{item.id}}" wx:if="{{item.sysType == 'CmsFolder' }}"> |
| | | <t-collapse-panel |
| | | wx:for="{{treeList}}" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | wx:key="id" |
| | | value="{{item.id}}" |
| | | wx:if="{{item.sysType == 'CmsFolder' }}" |
| | | > |
| | | <view slot="header" class="header-title"> |
| | | <view class="title-checkBox" catchtap="catchTap"> |
| | | <t-checkbox style="align-items: center" icon="rectangle" checked="{{item.checked}}" data-item="{{item}}" catchchange="checkResourceTitle" wx:if="{{isShowCheck}}" /> |
| | | <t-checkbox |
| | | style="align-items: center" |
| | | icon="rectangle" |
| | | disabled="{{item.disabled}}" |
| | | checked="{{item.checked}}" |
| | | data-item="{{item}}" |
| | | catchchange="checkResourceTitle" |
| | | wx:if="{{isShowCheck}}" |
| | | /> |
| | | <!-- 章节名 --> |
| | | <view class="title-box"> |
| | | <view class="title-t" > |
| | | <view class="title-name">{{item.name}} </view> |
| | | <view wx:if="{{item.sysType =='CmsFolder'}}" class="title-num"> |
| | | ({{item.childrenItem}}) |
| | | </view> |
| | | </view> |
| | | <view class="title-icon" > |
| | | <!-- 云学习加入购物车图标 --> |
| | | <image |
| | | src="/static/images/bookService/detail/cart@2x.png" |
| | | wx:if="{{item.isShopCar}}" |
| | | class="shopCar" |
| | | data-item="{{item}}" |
| | | catch:tap="onCloudShoppingCart" |
| | | ></image> |
| | | <!-- 云学习购买图标 --> |
| | | <image |
| | | src="/static/images/bookService/detail/need-buy.png" |
| | | class="need-buy" |
| | | wx:if="{{item.isbuy }}" |
| | | ></image> |
| | | </view> |
| | | </view> |
| | | <view class="list" wx:for="{{item.children}}" wx:for-item="citem" wx:for-index="cindex" wx:key="cindex"> |
| | | </view> |
| | | </view> |
| | | <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.sysType == 'CmsItem'}}"> |
| | | <view |
| | | class="listItems" |
| | | wx:if="{{citem.childrenFolderCount <= 0 && citem.sysType == 'CmsItem'}}" |
| | | > |
| | | <view class="itemsInfo" data-item="{{citem}}" data-index="{{cindex}}"> |
| | | <view class="contentBox" bind:tap="goPlayer" data-item="{{citem}}" data-parent="{{item}}"> |
| | | <!-- 教学资源 云学习 图标 --> |
| | | <view |
| | | class="contentBox" |
| | | bind:tap="goPlayer" |
| | | data-item="{{citem}}" |
| | | data-parent="{{item}}" |
| | | > |
| | | <!-- 教学资源 图标 --> |
| | | <view class="box-image fl-cn"> |
| | | <view class="checkBox" wx:if="{{isShowCheck}}" catchtap="catchTap"> |
| | | <!-- checked="{{citem.checked}}" --> |
| | | <!-- <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}}" /> --> |
| | | <t-checkbox disabled="{{!citem.saleMethod[0].Id}}" icon="rectangle" checked="{{citem.checked}}" data-item="{{citem}}" data-parent="{{item}}" catch:change="checkResource" /> |
| | | <view |
| | | class="checkBox" |
| | | wx:if="{{isShowCheck}}" |
| | | catchtap="catchTap" |
| | | > |
| | | <t-checkbox |
| | | disabled="{{citem.disabled}}" |
| | | icon="rectangle" |
| | | checked="{{citem.checked}}" |
| | | data-item="{{citem}}" |
| | | data-parent="{{item}}" |
| | | catch:change="checkResource" |
| | | /> |
| | | </view> |
| | | <!-- 教学资源图标 --> |
| | | <view class="teach-icon fl-cn"> |
| | | <image wx:if="{{citem.selectType == 'audio' || citem.learnSelectType == 'audio'}}" src="/static/images/bookService/detail/audioIcon.png" mode="aspectFill" /> |
| | | <image wx:elif="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" /> |
| | | <image wx:elif="{{citem.selectType == 'pdf'}}" src="/static/images/bookService/detail/pdf.png" mode="aspectFill" /> |
| | | <image wx:elif="{{citem.selectType == 'webpage'}}" src="/static/images/bookService/detail/net.png" mode="aspectFill" /> |
| | | <image wx:elif="{{citem.selectType == 'picture'}}" src="/static/images/bookService/detail/picture.png" mode="aspectFill" /> |
| | | <image wx:elif="{{citem.selectType == 'zip'}}" src="/static/images/bookService/detail/zip.png" mode="aspectFill" /> |
| | | <image wx:elif="{{ citem.fileMap[citem.file].extension == 'doc' || citem.fileMap[citem.file].extension == 'docx'}}" src="/static/images/bookService/detail/word.png" mode="aspectFill" /> |
| | | <image wx:elif="{{ citem.fileMap[citem.file].extension == 'xlsx' || citem.fileMap[citem.file].extension == 'xlsx'}}" src="/static/images/bookService/detail/excel.png" mode="aspectFill" /> |
| | | <image wx:elif="{{ citem.fileMap[citem.file].extension == 'ppt' || citem.fileMap[citem.file].extension == 'pptx'}}" src="/static/images/bookService/detail/PPT.png" mode="aspectFill" /> |
| | | <image |
| | | wx:if="{{citem.selectType == 'audio' || citem.learnSelectType == 'audio'}}" |
| | | src="/static/images/bookService/detail/audioIcon.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}" |
| | | src="/static/images/bookService/detail/video.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{citem.selectType == 'pdf'}}" |
| | | src="/static/images/bookService/detail/pdf.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{citem.selectType == 'webpage'}}" |
| | | src="/static/images/bookService/detail/net.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{citem.selectType == 'picture'}}" |
| | | src="/static/images/bookService/detail/picture.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{citem.selectType == 'zip'}}" |
| | | src="/static/images/bookService/detail/zip.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{ citem.fileMap[citem.file].extension == 'doc' || citem.fileMap[citem.file].extension == 'docx'}}" |
| | | src="/static/images/bookService/detail/word.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{ citem.fileMap[citem.file].extension == 'xlsx' || citem.fileMap[citem.file].extension == 'xlsx'}}" |
| | | src="/static/images/bookService/detail/excel.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <image |
| | | wx:elif="{{ citem.fileMap[citem.file].extension == 'ppt' || citem.fileMap[citem.file].extension == 'pptx'}}" |
| | | src="/static/images/bookService/detail/PPT.png" |
| | | mode="aspectFill" |
| | | /> |
| | | <!-- 资源无文件内容图标 --> |
| | | <image wx:else src="/static/images/bookService/detail/word.png" mode="" /> |
| | | <image |
| | | wx:else |
| | | src="/static/images/bookService/detail/word.png" |
| | | mode="" |
| | | /> |
| | | </view> |
| | | <!-- 云学习图标 --> |
| | | <view> </view> |
| | | <!-- 名称 --> |
| | | <text class="name" style="{{ tab == 'jsek_teachingResources' ? citem.resourceClass ? 'width: 420rpx' : 'width: 560rpx;' : (citem.isShopCar &&citem.isbuy ) ? 'width: 400rpx;' : (citem.isShopCar ||citem.isbuy) ? 'width:520rpx' : 'width:560rpx'}}">{{citem.name || '-'}}</text> |
| | | <text |
| | | class="name" |
| | | style="{{ tab == 'jsek_teachingResources' ? citem.resourceClass ? 'width: 420rpx' : 'width: 500rpx;' : (citem.isShopCar &&citem.isbuy ) ? 'width: 400rpx;' : (citem.isShopCar ||citem.isbuy) ? 'width:460rpx' : 'width:500rpx'}}" |
| | | >{{citem.name || '-'}}</text |
| | | > |
| | | </view> |
| | | <!-- 教学资源类型 --> |
| | | <view class="teachClass fl-cn" wx:if="{{citem.resourceClass && tab == 'jsek_teachingResources'}}"> |
| | | <view |
| | | class="teachClass fl-cn" |
| | | wx:if="{{citem.resourceClass && tab == 'jsek_teachingResources'}}" |
| | | > |
| | | {{citem.resourceClass}} |
| | | </view> |
| | | <view wx:if="{{tab == 'jsek_cloudLearning'}}"> |
| | | <view wx:if="{{tab == 'jsek_cloudLearning'}}" class="clound-icon"> |
| | | <!-- 云学习试看图标 --> |
| | | <image src="/static/images/bookService/detail/shikan.png" class="testSee" wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}"></image> |
| | | <image |
| | | src="/static/images/bookService/detail/shikan.png" |
| | | class="testSee" |
| | | wx:if="{{!citem.isbuy ? false : citem.freeFile ? true : false}}" |
| | | ></image> |
| | | <!-- 云学习加入购物车图标 --> |
| | | <image src="/static/images/bookService/detail/cart@2x.png" wx:if="{{citem.isShopCar}}" class="shopCar" data-item="{{citem}}" catch:tap="onCloudShoppingCart"></image> |
| | | <image |
| | | src="/static/images/bookService/detail/cart@2x.png" |
| | | wx:if="{{citem.isShopCar}}" |
| | | class="shopCar" |
| | | data-item="{{citem}}" |
| | | catch:tap="onCloudShoppingCart" |
| | | ></image> |
| | | <!-- 云学习购买图标 --> |
| | | <image src="/static/images/bookService/detail/need-buy.png" class="need-buy" wx:if="{{citem.isbuy }}"></image> |
| | | <image |
| | | src="/static/images/bookService/detail/need-buy.png" |
| | | class="need-buy" |
| | | wx:if="{{citem.isbuy }}" |
| | | ></image> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- // 判断 不是商品 有子项 递归组件 --> |
| | | <tree wx:if="{{ citem.sysType == 'CmsFolder' }}" isShowCheck="{{isShowCheck}}" bookInfo="{{bookInfo}}" treeList="{{[citem]}}" learnList="{{learnList}}" itemId="{{itemId}}" tab="{{tab}}" buyIds="{{buyIds}}" openIds="{{openIds}}"></tree> |
| | | <tree |
| | | wx:if="{{ citem.sysType == 'CmsFolder' }}" |
| | | isShowCheck="{{isShowCheck}}" |
| | | bookInfo="{{bookInfo}}" |
| | | treeList="{{[citem]}}" |
| | | learnList="{{learnList}}" |
| | | itemId="{{itemId}}" |
| | | tab="{{tab}}" |
| | | buyIds="{{buyIds}}" |
| | | openIds="{{openIds}}" |
| | | ></tree> |
| | | </view> |
| | | <!-- 暂无数据 --> |
| | | <view wx:if="{{!item.children || !item.children.length}}" class="noData"> |
| | |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .title-t, |
| | | .title-icon { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .title-icon {} |
| | | |
| | | .title-checkBox { |
| | | width: 100%; |
| | |
| | | padding-bottom: 20rpx; |
| | | } |
| | | |
| | | /* .t-collapse-panel__content { |
| | | padding: var(--td-collapse-content-padding, 0rpx) !important; |
| | | } */ |
| | | |
| | | .fl-cn { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .clound-icon { |
| | | display: flex; |
| | | } |
| | |
| | | applyState: "", // 教学资源申请状态 |
| | | deadline: "", // 教学资源申请有效日期, |
| | | isshowDrawBtn: true, // 云学习领取查看按钮是否显示 |
| | | isShowBuyCloundMenu: false, // 云学习全部购买按钮是否显示 |
| | | isCloundHaveSaleMethod: false, // 云学习是否有销售方式 |
| | | cloundMenuIsBuy: false, |
| | | rejectCause: "", // 下载拒绝原因 |
| | | buyIdList: [], |
| | | shoppingCartGetId: [], // 已购买id列表 |
| | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面初次渲染完成 |
| | | */ |
| | | onReady() {}, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | |
| | | }, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() {}, |
| | | |
| | | /** |
| | | * 生命周期函数--监听页面卸载 |
| | | */ |
| | | onUnload() {}, |
| | | |
| | | /** |
| | | * 页面相关事件处理函数--监听用户下拉动作 |
| | | */ |
| | | onPullDownRefresh() {}, |
| | | |
| | | /** |
| | | * 页面上拉触底事件的处理函数 |
| | | */ |
| | | onReachBottom() { |
| | |
| | | } |
| | | }, |
| | | |
| | | /** |
| | | * 用户点击右上角分享 |
| | | */ |
| | | onShareAppMessage() {}, |
| | | onShareTimeline() {}, |
| | | // 格式化日期 |
| | | formatDate(dateString) { |
| | | if (!dateString) { |
| | |
| | | } |
| | | app.MG.store.getProductDetail(query).then((res) => { |
| | | this.setData({ |
| | | resourceCodeList: res.datas.cmsDatas[0].datas |
| | | resourceCodeList: res.datas.cmsDatas[0].datas, |
| | | }) |
| | | console.log('refcode', this.data.resourceCodeList); |
| | | }) |
| | | }, |
| | | //请求子商品的文件 |
| | |
| | | // 返回更新后的数组 |
| | | return array; |
| | | }, |
| | | // 递归树结构,如果父级有销售方式(有效期),去掉所有子集的销售方式 |
| | | clearTreeSealmethod(clearSaleMethod, tree) { |
| | | for (let item of tree) { |
| | | const saleData = item.saleMethod && |
| | | item.saleMethod.length ? |
| | | item.saleMethod.find((citem) => citem.SaleType == 'Normal') : null |
| | | if ( |
| | | ((saleData && new Date(saleData.EndDate).getTime() >= new Date().getTime() && new Date(saleData.BeginDate).getTime() <= new Date().getTime()) || |
| | | clearSaleMethod) && item.children && item.children.length |
| | | ) { |
| | | item.children.forEach((ditem) => (ditem.saleMethod = [])) |
| | | } |
| | | if (item.children && item.children.length) |
| | | this.clearTreeSealmethod( |
| | | saleData && new Date(saleData.EndDate).getTime() >= new Date().getTime() && new Date(saleData.BeginDate).getTime() <= new Date().getTime(), |
| | | item.children |
| | | ) |
| | | } |
| | | return tree |
| | | }, |
| | | // 教学资源 云学习 获取 |
| | | getResourceDataList(type) { |
| | | this.setData({ |
| | |
| | | let query = { |
| | | path: '*', |
| | | queryType: '*', |
| | | storeInfo: this.data.options.storeInfo, |
| | | // storeInfo: this.data.options.storeInfo, |
| | | productId: this.data.bookDetail.id, |
| | | cmsPath: type.productLinkPath, |
| | | cmsType: '*', |
| | |
| | | }, |
| | | } |
| | | app.MG.store.getProductDetailNoChildren(query).then((res) => { |
| | | console.log('未处理资源', res.datas.cmsDatas[0].datas); |
| | | if (!res.datas.cmsDatas[0].datas.length) { |
| | | return this.setData({ |
| | | noResources: true, |
| | |
| | | }); |
| | | } |
| | | let list = [] |
| | | // 测试 6位// 正式 5位// 测试调用传20,内部7 正式调用传17 内部传6 |
| | | //教学资源 云学习 |
| | | if ( |
| | | type.refCode == "jsek_teachingResources" || |
| | | type.refCode == "jsek_cloudLearning" |
| | | ) { |
| | | // 判断云学习有无销售方式和有效期 |
| | | const cloundSaleMethod = |
| | | type.saleMethod && type.saleMethod.length ? |
| | | type.saleMethod.find((citem) => citem.SaleType == 'Normal') : |
| | | null |
| | | let flags = |
| | | type.refCode == 'jsek_cloudLearning' && |
| | | cloundSaleMethod && |
| | | new Date().getTime() <= new Date(cloundSaleMethod.EndDate).getTime() && |
| | | new Date().getTime() >= new Date(cloundSaleMethod.BeginDate).getTime() |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | // 云学习上有销售方式,去掉云学习下所有销售方式 |
| | | if (flags) item.saleMethod = [] |
| | | item.checked = false; |
| | | if (item.sysType == 'CmsItem') { |
| | | // 教学资源 类型名称赋值 |
| | |
| | | if (type.value == item.resourcesClassification) |
| | | item.resourceClass = type.name; |
| | | }); |
| | | if (this.data.tabValue == "jsek_teachingResources") {} else if (this.data.tabValue == "jsek_cloudLearning") { |
| | | item.isbuy = this.isShowNeedBuy(item); |
| | | item.isShopCar = this.isShoppingCart(item); |
| | | } |
| | | // if (this.data.tabValue == "jsek_teachingResources") {} else if (this.data.tabValue == "jsek_cloudLearning") { |
| | | // item.isbuy = this.isShowNeedBuy(item); |
| | | // item.isShopCar = this.isShoppingCart(item); |
| | | // } |
| | | } |
| | | }); |
| | | if (type.refCode == "jsek_cloudLearning") { |
| | | this.setData({ |
| | | learnPath: type.productLinkPath |
| | | }) |
| | | const dataList = res.datas.cmsDatas[0].datas |
| | | // 先判断是否否买云学习整个目录 |
| | | let couldId = null |
| | | let codeData = null |
| | | if (this.data.resourceCodeList.length) { |
| | | codeData = this.data.resourceCodeList.find(item => item.refCode == 'jsek_cloudLearning') |
| | | if (codeData && codeData.saleMethod && codeData.saleMethod.length) |
| | | couldId = codeData.saleMethod[0].Id |
| | | } |
| | | if (couldId) { |
| | | this.setData({ |
| | | isGoBuyResource: this.data.buyIdList.indexOf(couldId) > -1 ? false : true |
| | | }) |
| | | } else if (dataList.length) { |
| | | const tag = dataList.findIndex(item => item.saleMethod.length && item.saleMethod[0].Price > 0) |
| | | this.setData({ |
| | | isGoBuyResource: tag > -1 ? true : false |
| | | }) |
| | | // 判断处理资源 |
| | | if (res.datas.cmsDatas[0].datas.some((item) => item.sysType == 'CmsFolder')) { |
| | | if (!res.datas.cmsDatas[0].datas.some((item) => item.sysType == 'CmsItem')) { |
| | | // 1.只有目录,没有资源 |
| | | list = res.datas.cmsDatas[0].datas |
| | | } else { |
| | | this.setData({ |
| | | isGoBuyResource: false |
| | | }) |
| | | } |
| | | } |
| | | this.getTreeList(res.datas.cmsDatas[0].datas, list, query.cmsPath) |
| | | list = this.ensureTreeConsistency(list) |
| | | list = this.changeResourceChildren(list) |
| | | } |
| | | } else { |
| | | // 3.只有资源,没有目录 |
| | | list = res.datas.cmsDatas[0].datas |
| | | } |
| | | let result = []; |
| | | if (type.refCode == "jsek_teachingResources") { |
| | | this.findChildIds(list, result); |
| | | // const newUSeList = this.deleteTreeData(list, result) |
| | | this.setData({ |
| | | openTeachids: result, |
| | | loading: false, |
| | | teach: list, |
| | | }); |
| | | } else if (type.refCode == "jsek_cloudLearning") { |
| | | let arr = this.handleTreeData(list).filter( |
| | | (item) => item.saleMethod[0] |
| | | ); |
| | | let freeIds = arr.filter((item) => { |
| | | return item.saleMethod[0].Price == 0; |
| | | }); |
| | | if (!freeIds.length) |
| | | this.setData({ |
| | | isshowDrawBtn: false, |
| | | }); |
| | | // 云学习上无销售方式,走目录 资源 销售方式去除方法 |
| | | if (!flags) list = this.clearTreeSealmethod(false, list) |
| | | // 判断领取查看是否显示(云学习,或资源目录,有售价为0) |
| | | let isshowDrawBtn = res.datas.cmsDatas[0].datas.some( |
| | | (item) => |
| | | item.saleMethod.length && |
| | | item.saleMethod.find((citem) => citem.SaleType == 'Normal').Price == 0 && |
| | | new Date(item.saleMethod.find((citem) => citem.SaleType == 'Normal').EndDate).getTime() >= new Date().getTime() && |
| | | new Date(item.saleMethod.find((citem) => citem.SaleType == 'Normal').BeginDate).getTime() <= new Date().getTime() |
| | | ) || (flags && cloundSaleMethod.Price == 0) |
| | | // 判断云学习全部购买按钮是否显示 |
| | | let isShowBuyCloundMenu = flags && cloundSaleMethod.Price >= 0 |
| | | // 判断购物车按钮和锁按钮是否显示 |
| | | this.handleTreeData(list).forEach(item => { |
| | | item.isbuy = this.resourceIsBuy(item); |
| | | item.isShopCar = this.isShoppingCart(item); |
| | | }) |
| | | this.findChildIds(list, result); |
| | | this.setData({ |
| | | isshowDrawBtn, |
| | | isShowBuyCloundMenu, |
| | | isCloundHaveSaleMethod: flags, |
| | | learn: list, |
| | | loading: false, |
| | | openLearnids: result, |
| | | learnPath: type.productLinkPath |
| | | }); |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | |
| | | console.log(e); |
| | | }); |
| | | }, |
| | | // 获取tag下所有资源 |
| | | async getAllResource(data) { |
| | | if (!data.length) return false; |
| | | for (let i = 0; i < data.length; i++) { |
| | | let item = data[i]; |
| | | if (item.sysType == "CmsFolder" && item.childrenCount > 0) { |
| | | item.children = []; |
| | | item.children = await this.getFolderItem(item.productLinkPath); |
| | | await this.getAllResource(item.children); |
| | | } |
| | | } |
| | | return data; |
| | | }, |
| | | // 获取资源接口 |
| | | async getFolderItem(path) { |
| | | let query = { |
| | | path: "*", |
| | | queryType: "*", |
| | | storeInfo: this.data.options.storeInfo, |
| | | productId: this.data.bookDetail.id, |
| | | cmsPath: path, |
| | | itemFields: { |
| | | SysType: "CmsFolder", |
| | | // 资源类型,试读文件,是否允许下载等参数 |
| | | selectType: [], |
| | | freeFile: [], |
| | | file: [], |
| | | protectedFile: [], |
| | | resourcesClassification: [], |
| | | isDownload: [], |
| | | jsek_resourceBrief: [], |
| | | jsek_link: [], |
| | | accessType: [], |
| | | learnSelectType: [], |
| | | }, |
| | | pading: { |
| | | start: 0, |
| | | size: 999, |
| | | }, |
| | | }; |
| | | let data = await app.MG.store.getProductDetail(query); |
| | | // 如果item层级里有floder,删除floder |
| | | const flag = data.datas.cmsDatas[0].datas.findIndex( |
| | | (item) => item.sysType == "CmsItem" |
| | | ); |
| | | if (flag > -1) |
| | | data.datas.cmsDatas[0].datas = data.datas.cmsDatas[0].datas.filter( |
| | | (item) => item.sysType == "CmsItem" |
| | | ); |
| | | data.datas.cmsDatas[0].datas.forEach((item) => { |
| | | // if (item.sysType == "CmsFolder" && flag > -1) { |
| | | // item.isShow = false; |
| | | // } else { |
| | | // item.isShow = true; |
| | | // } |
| | | this.data.resourceClassList.forEach((type) => { |
| | | if (type.value == item.resourcesClassification) |
| | | item.resourceClass = type.name; |
| | | }); |
| | | // 网页 不能下载 私有文件 |
| | | if (item.sysType == "CmsItem") { |
| | | if (item.selectType == "webpage") { |
| | | item.disabled = true; |
| | | } else { |
| | | if (item.isDownload != 1) { |
| | | item.disabled = true; |
| | | } |
| | | } |
| | | if (item.file && item.fileMap && item.fileMap[item.file]) { |
| | | if (item.fileMap[item.file].protectType == "Private") |
| | | item.disabled = true; |
| | | } |
| | | } |
| | | }); |
| | | data.datas.cmsDatas[0].datas.forEach((item) => { |
| | | if (this.data.tabValue == "jsek_teachingResources") { |
| | | item.checked = false; |
| | | } else if (this.data.tabValue == "jsek_cloudLearning") { |
| | | item.checked = false; |
| | | item.isbuy = this.isShowNeedBuy(item); |
| | | item.isShopCar = this.isShoppingCart(item); |
| | | } |
| | | }); |
| | | return data.datas.cmsDatas[0].datas; |
| | | }, |
| | | |
| | | // 获取展开项 |
| | | findChildIds(data, result) { |
| | | let index = 0 |
| | |
| | | }, |
| | | // 判断资源是否购买 |
| | | resourceIsBuy(data) { |
| | | let couldId = null |
| | | let codeData = null |
| | | if (this.data.resourceCodeList.length) { |
| | | codeData = this.data.resourceCodeList.find(item => item.refCode == 'jsek_cloudLearning') |
| | | if (codeData && codeData.saleMethod && codeData.saleMethod.length) |
| | | couldId = codeData.saleMethod[0].Id |
| | | } |
| | | if (couldId) { |
| | | return this.data.buyIdList.indexOf(couldId) > -1 ? false : true |
| | | } else if (data.saleMethod && data.saleMethod.length) { |
| | | const isSHow = this.data.buyIdList.some( |
| | | (item) => item == data.saleMethod[0].Id |
| | | if (data.saleMethod && data.saleMethod.length) { |
| | | const saleData = data.saleMethod.find((item) => item.SaleType == 'Normal') |
| | | if (saleData.State == 'Disable') return false |
| | | const isShow = this.data.buyIdList.some( |
| | | (item) => item == saleData.Id |
| | | ); |
| | | return !isSHow; |
| | | // 已经购买 |
| | | if (isShow) return false |
| | | // 未购买,查看销售方式是否过期 |
| | | if (!isShow) { |
| | | const flag = new Date(saleData.EndDate).getTime() >= new Date().getTime() && |
| | | new Date(saleData.BeginDate).getTime() <= new Date().getTime() |
| | | if (flag) { |
| | | // 为过期 ,需要购买 |
| | | return true |
| | | } else { |
| | | // 已过期 无需购买 |
| | | return false |
| | | } |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | |
| | | }, |
| | | // 判断资源加入购物车按钮是否显示 |
| | | isShoppingCart(data) { |
| | | let couldId = null |
| | | let codeData = null |
| | | if (this.data.resourceCodeList.length) { |
| | | codeData = this.data.resourceCodeList.find(item => item.refCode == 'jsek_cloudLearning') |
| | | if (codeData && codeData.saleMethod && codeData.saleMethod.length) |
| | | couldId = codeData.saleMethod[0].Id |
| | | } |
| | | if (couldId) { |
| | | return this.data.buyIdList.indexOf(couldId) > -1 ? false : true |
| | | } else if (data.saleMethod && data.saleMethod.length) { |
| | | if (data.saleMethod[0].Price <= 0) return false; |
| | | if (data.saleMethod && data.saleMethod.length) { |
| | | const saleData = data.saleMethod.find((item) => item.SaleType == 'Normal') |
| | | // 先判断是否免费 |
| | | if (saleData.Price <= 0) return false |
| | | // 再判断是否购买 |
| | | const isBuy = this.data.buyIdList.some( |
| | | (item) => item == data.saleMethod[0].Id |
| | | ); |
| | | const isBuy = this.data.buyIdList.some((item) => item == saleData.Id) |
| | | if (isBuy) { |
| | | // 购买了 |
| | | return false; |
| | | return false |
| | | } else { |
| | | // 判断是否加入购物车 |
| | | const isSHow = this.data.shoppingCartGetId.some( |
| | | (item) => item == data.saleMethod[0].Id |
| | | ); |
| | | return !isSHow; |
| | | const isShow = this.data.shoppingCartGetId.some((item) => item == saleData.Id) |
| | | if (isShow) return false |
| | | // 未购买,查看销售方式是否过期 |
| | | if (!isShow) { |
| | | const flag = new Date(saleData.EndDate).getTime() >= new Date().getTime() && |
| | | new Date(saleData.BeginDate).getTime() <= new Date().getTime() |
| | | if (flag) { |
| | | // 为过期 ,需要购买 |
| | | return true |
| | | } else { |
| | | // 已过期 无需购买 |
| | | return false |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | return false; |
| | |
| | | flattenedArray.push(...childrenArray); |
| | | } |
| | | }); |
| | | return flattenedArray.filter((item) => item.sysType == "CmsItem"); |
| | | return flattenedArray; |
| | | }, |
| | | // 云学习一键领取 |
| | | async getFreeResource() { |
| | |
| | | // 出现错误,返回false |
| | | } |
| | | }); |
| | | } |
| | | // 领取查看 ,先看云学习上的 再看资源上的 |
| | | const cloundMenu = this.data.resourceCodeList.find((item) => item.refCode == 'jsek_cloudLearning') |
| | | const cloundMenuSaleMethod = |
| | | cloundMenu.saleMethod && cloundMenu.saleMethod.length ? |
| | | cloundMenu.saleMethod.find((ditem) => ditem.SaleType == 'Normal') : |
| | | undefined |
| | | let query = {} |
| | | if (this.data.isCloundHaveSaleMethod && !cloundMenuSaleMethod.Price) { |
| | | // 云学习上有销售方式,且为0元,直接领取云学习 |
| | | query = { |
| | | remarks: '云学习', |
| | | requests: [{ |
| | | saleMethodId: cloundMenuSaleMethod.Id, |
| | | count: 1 |
| | | }] |
| | | } |
| | | } else { |
| | | let arr = this.handleTreeData(this.data.learn).filter((item) => |
| | | this.resourceIsBuy(item) |
| | | ); |
| | | // 领取资源 |
| | | let arr = this.handleTreeData(this.data.learn).filter(item => this.resourceIsBuy(item)) |
| | | let freeIds = arr.filter((item) => { |
| | | return item.saleMethod[0].Price == 0; |
| | | }); |
| | | return item.saleMethod.find((citem) => citem.SaleType == 'Normal').Price == 0 |
| | | }) |
| | | if (!freeIds.length) |
| | | return wx.showToast({ |
| | | icon: "error", |
| | | title: "暂无免费资源", |
| | | }); |
| | | child.changeReceive(true); |
| | | let requests = []; |
| | | freeIds.forEach((item, index) => { |
| | | if (this.resourceIsBuy(item)) { |
| | |
| | | }); |
| | | } |
| | | }); |
| | | let query = { |
| | | query = { |
| | | remarks: "云学习", |
| | | requests, |
| | | }; |
| | | } |
| | | child.changeReceive(true); |
| | | try { |
| | | const initOrderRes = await app.MG.store.initOrder(query); |
| | | let parameter = { |
| | |
| | | } catch (error) { |
| | | console.log(error); |
| | | } |
| | | } |
| | | }, |
| | | // 云学习一键购买 |
| | | async allAddShoppiingCar() { |
| | |
| | | }, |
| | | }); |
| | | } |
| | | let shopList = this.handleTreeData(this.data.learn).filter((item) => |
| | | let shopList = this.handleTreeData(this.data.learn).filter(item => item.cmsType == 'cmsItem') |
| | | shopList = shopList.filter((item) => |
| | | this.resourceIsBuy(item) |
| | | ); |
| | | this.getShoppingCartProductGet(); |
| | |
| | | title: "请重试", |
| | | }); |
| | | } |
| | | }, |
| | | // 云学习字段购买 |
| | | async buyCloundMenu() { |
| | | const cloundData = this.data.resourceCodeList.find(item => item.refCode == 'jsek_cloudLearning') |
| | | |
| | | }, |
| | | // 变为所有check true |
| | | findAndUpdateItemsByIds(tree, ids) { |
| | |
| | | }); |
| | | this.closeDialog() |
| | | }) |
| | | }, |
| | | getCloundIsBuy() { |
| | | let flag = false |
| | | if (!this.data.isCloundHaveSaleMethod) flag = false |
| | | const cloundData = this.data.resourceCodeList.find(item => item.refCode == 'jsek_cloudLearning') |
| | | const saleData = cloundData.saleMethod.find(item => item.SaleType == "Normal") |
| | | if (!saleData) flag = false |
| | | flag = this.data.buyIdList.some(item => item == saleData.Id) |
| | | this.setData({ |
| | | cloundMenuIsBuy: flag |
| | | }) |
| | | } |
| | | }) |
| | |
| | | <!--pages/bookServices/detail/index.wxml--> |
| | | <import src="index.skeleton.wxml" /> |
| | | <template is="skeleton" wx:if="{{pageLoading}}" /> |
| | | <!-- pageLoading --> |
| | | <!--导航区域 --> |
| | | |
| | | <suggest-dialog class="suggest-dialog" showIndex="{{showIndex}}" bookIcon="{{bookDetail.icon}}" bookName="{{bookDetail.name}}"></suggest-dialog> |
| | | <suggest-dialog |
| | | class="suggest-dialog" |
| | | showIndex="{{showIndex}}" |
| | | bookIcon="{{bookDetail.icon}}" |
| | | bookName="{{bookDetail.name}}" |
| | | ></suggest-dialog> |
| | | <!-- <popup showIndex="{{showIndex}}"></popup> --> |
| | | <view class="page-bookService" wx:if="{{!pageLoading}}"> |
| | | <!-- <view style="width: 100%; height: {{barHeight}}px; "></view> |
| | | <view class="nacigationBar" style="width: 100%; height: {{navBarHeight}}px;"> |
| | | <view> |
| | | <t-icon |
| | | name="chevron-left" |
| | | size="30" |
| | | data-name="{{item}}" |
| | | bind:click="goBack" |
| | | /> |
| | | </view> |
| | | <view class="navbar-title" style="width: 100%"> |
| | | <text>{{options.name}}</text> |
| | | </view> |
| | | </view> --> |
| | | <t-toast id="t-toast" /> |
| | | <movable-area class="movable-area"> |
| | | <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" id="book-detail"> |
| | | <view class="detail-left"> |
| | | <view class="book-img"> |
| | | <image loading="" src="{{bookDetail.icon ? bookDetail.icon : '/static/images/default-book-img.png'}}" mode="aspectFit" aria-label="{{bookDetail.name}}" /> |
| | | <image |
| | | loading="" |
| | | src="{{bookDetail.icon ? bookDetail.icon : '/static/images/default-book-img.png'}}" |
| | | mode="aspectFit" |
| | | 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-title">出版时间:</view> |
| | | <view class="li-content">{{bookDetail.publicationDate}}</view> |
| | | </view> |
| | | <view class="message-li" wx:if="{{bookClass.length}}" style="height: 80rpx"> |
| | | <view |
| | | class="message-li" |
| | | wx:if="{{bookClass.length}}" |
| | | style="height: 80rpx" |
| | | > |
| | | <view class="li-title">图书分类:</view> |
| | | <view class="class-name showTow">{{bookClass}}</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 class="paper-price" wx:if="{{bookDetail.paperPrice}}"> |
| | | <view> |
| | | <image src="/static/images/bookService/detail/paper-price.png" /> |
| | | <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 value="{{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}}" catalogue="{{bookDetail.catalogue}}" authorIntroduction="{{bookDetail.authorIntroduction}}" wx:if="{{bookDetail.content || bookDetail.authorIntroduction}}"></book-brief> |
| | | <view wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction && !loading}}" class="noData"> |
| | | <t-tabs |
| | | value="{{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}}" |
| | | catalogue="{{bookDetail.catalogue}}" |
| | | authorIntroduction="{{bookDetail.authorIntroduction}}" |
| | | wx:if="{{bookDetail.content || bookDetail.authorIntroduction}}" |
| | | ></book-brief> |
| | | <view |
| | | wx:if="{{!bookDetail.content && !bookDetail.authorIntroduction && !loading}}" |
| | | class="noData" |
| | | > |
| | | <!-- <t-empty icon="folder-open" description="暂无数据" /> --> |
| | | <empty /> |
| | | </view> |
| | |
| | | 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}}"> |
| | | <view class="teach-btn"> |
| | | <t-button theme="primary" style="width: 120px; height: 36px" class="btn" bind:tap="uploadFile"> |
| | | <view slot="content" class="btn-content"> |
| | | <image src="/static/images/bookService/detail/upload.png" mode="aspectFit" ></image> |
| | | <text>上传资源</text> |
| | | </view> |
| | | </t-button> |
| | | </view> |
| | | <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}}" deadline="{{deadline}}" bind:downloadTeach="downloadTeach" bind:handleTree="handleTree" openTeachids="{{openTeachids}}" wx:if="{{teach.length}}" isShoppingCart="isShoppingCart" bind:updateCloudLearning="updateCloudLearning"></tree> |
| | | <t-tab-panel |
| | | label="教学资源" |
| | | icon="{{tabValue == 'jsek_teachingResources' ? teachResourcesClickIcon : teachResourcesIcon}}" |
| | | value="jsek_teachingResources" |
| | | class="{{loading ? 'loading': ''}}" |
| | | > |
| | | <view wx:if="{{!loading && applyState}}"> |
| | | <teach-resource |
| | | applyState="{{applyState}}" |
| | | rejectCause="{{rejectCause}}" |
| | | deadline="{{deadline}}" |
| | | bind:applyResource="applyResource" |
| | | treeList="{{teach}}" |
| | | applyResourceLoading="{{applyResourceLoading}}" |
| | | bind:uploadFile="uploadFile" |
| | | ></teach-resource> |
| | | <tree |
| | | id="teach-tree" |
| | | openIds="{{openTeachids}}" |
| | | bookInfo="{{bookDetail}}" |
| | | treeList="{{teach}}" |
| | | tab="{{tabValue}}" |
| | | applyState="{{applyState}}" |
| | | deadline="{{deadline}}" |
| | | bind:downloadTeach="downloadTeach" |
| | | bind:handleTree="handleTree" |
| | | openTeachids="{{openTeachids}}" |
| | | wx:if="{{teach.length}}" |
| | | isShoppingCart="isShoppingCart" |
| | | bind:updateCloudLearning="updateCloudLearning" |
| | | ></tree> |
| | | </view> |
| | | <!-- <t-loading |
| | | theme="circular" |
| | |
| | | loading="{{loading }}" |
| | | /> --> |
| | | <view wx:if="{{loading}}" style="width: 100%; height: min-content"> |
| | | <t-skeleton row-col="{{rowCol}}" theme="paragraph" animation="gradient" loading="{{loading}}"></t-skeleton> |
| | | </view> |
| | | <view wx:if="{{noResources && !loading}}" class="noData"> |
| | | <!-- <t-empty icon="folder-open" description="暂无数据" /> --> |
| | | <empty /> |
| | | <t-skeleton |
| | | row-col="{{rowCol}}" |
| | | theme="paragraph" |
| | | animation="gradient" |
| | | loading="{{loading}}" |
| | | ></t-skeleton> |
| | | </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}}" isshowDrawBtn="{{isshowDrawBtn}}" successOrderNumber="{{successOrderNumber}}" isGoBuyResource="{{isGoBuyResource}}"></learn-resource> |
| | | <learn-resource |
| | | bind:getFreeResource="getFreeResource" |
| | | bind:allAddShoppiingCar="allAddShoppiingCar" |
| | | id="learn-resource" |
| | | buyResourceData="{{buyResourceData}}" |
| | | bookId="{{bookDetail.id}}" |
| | | isshowDrawBtn="{{isshowDrawBtn}}" |
| | | successOrderNumber="{{successOrderNumber}}" |
| | | isGoBuyResource="{{isGoBuyResource}}" |
| | | isShowBuyCloundMenu="{{isShowBuyCloundMenu}}" |
| | | ></learn-resource> |
| | | |
| | | <tree id="tree" openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" buyIds="{{buyIdList}}" openLearnids="{{openLearnids}}" bind:updateShoppingCartHidden="updateShoppingCartHidden" bind:updateCloudLearning="updateCloudLearning"></tree> |
| | | <tree |
| | | id="tree" |
| | | openIds="{{openLearnids}}" |
| | | bookInfo="{{bookDetail}}" |
| | | tab="{{tabValue}}" |
| | | treeList="{{learn}}" |
| | | buyIds="{{buyIdList}}" |
| | | openLearnids="{{openLearnids}}" |
| | | cloundMenuIsBuy="{{cloundMenuIsBuy}}" |
| | | bind:updateShoppingCartHidden="updateShoppingCartHidden" |
| | | bind:updateCloudLearning="updateCloudLearning" |
| | | bind:getCloundIsBuy="getCloundIsBuy" |
| | | ></tree> |
| | | </view> |
| | | <view wx:if="{{noResources && !loading}}" class="noData"> |
| | | <!-- <t-empty icon="folder-open" description="暂无数据" /> --> |
| | | <empty /> |
| | | </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 id="test-resource" list="{{test}}" bookInfo="{{bookDetail}}" openIds="{{openLearnids}}" mockData="{{mockData}}" tab="{{tabValue}}" storeInfo="{{options.storeInfo}}" jslx="{{jslx}}" bind:buyMock="buyMock"></test-resource> |
| | | <test-resource |
| | | id="test-resource" |
| | | list="{{test}}" |
| | | bookInfo="{{bookDetail}}" |
| | | openIds="{{openLearnids}}" |
| | | mockData="{{mockData}}" |
| | | tab="{{tabValue}}" |
| | | storeInfo="{{options.storeInfo}}" |
| | | jslx="{{jslx}}" |
| | | 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-tab-panel label="相关图书" icon="{{tabValue == 'related_books' ? linkClickIcon: linkIcon}}" value="related_books" style="{{tabPanelstyle}}"> |
| | | <related-books relatedBookData="{{relatedBookData}}" relatedBookLoading="{{relatedBookLoading}}" noRelatedBookData="{{noRelatedBookData}}" bind:goBookDetails="goBookDetails"></related-books> |
| | | <t-tab-panel |
| | | label="相关图书" |
| | | icon="{{tabValue == 'related_books' ? linkClickIcon: linkIcon}}" |
| | | value="related_books" |
| | | style="{{tabPanelstyle}}" |
| | | > |
| | | <related-books |
| | | relatedBookData="{{relatedBookData}}" |
| | | relatedBookLoading="{{relatedBookLoading}}" |
| | | noRelatedBookData="{{noRelatedBookData}}" |
| | | bind:goBookDetails="goBookDetails" |
| | | ></related-books> |
| | | </t-tab-panel> |
| | | </t-tabs> |
| | | </view> |
| | |
| | | <movable-view class="movable-view" :x="{{x}}" :y="{{y}}" direction="all"> |
| | | <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> |
| | | </movable-view> |
| | | </movable-area> |
| | | <!-- 我要建议弹窗 --> |
| | | <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="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="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}" bind:tap="goRead" wx:if="{{!bookBuy || applicationState == 'overdue'}}"> |
| | | <view |
| | | class="{{!bookBuy && bookDetail.isSell ? 'bottom-btn tryRead' : 'bottom-btn try'}}" |
| | | bind:tap="goRead" |
| | | wx:if="{{!bookBuy || applicationState == 'overdue'}}" |
| | | > |
| | | <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" wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}">加入购物车</view> |
| | | <view class="buy buyColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}">立即购买</view> |
| | | <view class="buy receiveColor" bind:tap="buyBtn" wx:if="{{!bookBuy && bookDetail.price == '0.00' && bookDetail.isSell == '1'}}">免费领取</view> |
| | | <view class="buy read" bind:tap="goRead" wx:if="{{bookBuy || applicationState == 'Normal'}}">立即查看</view> |
| | | <view |
| | | class="shopCar shopCarColor" |
| | | bind:tap="addBookShopcCar" |
| | | wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}" |
| | | >加入购物车</view |
| | | > |
| | | <view |
| | | class="buy buyColor" |
| | | bind:tap="buyBtn" |
| | | wx:if="{{!bookBuy && bookDetail.price !== '0.00' && bookDetail.isSell == '1'}}" |
| | | >立即购买</view |
| | | > |
| | | <view |
| | | class="buy receiveColor" |
| | | bind:tap="buyBtn" |
| | | wx:if="{{!bookBuy && bookDetail.price == '0.00' && bookDetail.isSell == '1'}}" |
| | | >免费领取</view |
| | | > |
| | | <view |
| | | class="buy read" |
| | | bind:tap="goRead" |
| | | wx:if="{{bookBuy || applicationState == 'Normal'}}" |
| | | >立即查看</view |
| | | > |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{dialogBox}}"> |
| | |
| | | <view class="row-info"> |
| | | <view class="body"> |
| | | <view class="dialog-title">文件上传</view> |
| | | <view style="width: 100%; height: 2rpx; background-color: #f4f4f4"></view> |
| | | <view |
| | | style="width: 100%; height: 2rpx; background-color: #f4f4f4" |
| | | ></view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="icon">*</text>资源名称: </view> |
| | | <view class="item-content"> |
| | | <view class="inputBox1"> |
| | | <t-input placeholder="输入资源名称" borderless value="{{resourceInfo.resourceName}}" bindchange="onNameInput" /> |
| | | <t-input |
| | | placeholder="输入资源名称" |
| | | borderless |
| | | value="{{resourceInfo.resourceName}}" |
| | | bindchange="onNameInput" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- <view class="inputBox1"> |
| | | <t-input placeholder="输入资源类型" borderless value="{{resourceInfo.fileType}}" bindchange="onFileTypeInput" /> |
| | | </view> --> |
| | | <t-cell class="mb-16" title="" arrow hover note="{{resourceInfo.fileType}}" bind:click="onResourcePicker" /> |
| | | <t-picker visible="{{resourceVisible}}" value="{{resourceValue}}" data-key="resource" title="选择资源类型" cancelBtn="取消" confirmBtn="确认" usingCustomNavbar bindchange="onPickerChange" bindcancel="onPickerCancel"> |
| | | <t-cell |
| | | class="mb-16" |
| | | title="" |
| | | arrow |
| | | hover |
| | | note="{{resourceInfo.fileType}}" |
| | | bind:click="onResourcePicker" |
| | | /> |
| | | <t-picker |
| | | visible="{{resourceVisible}}" |
| | | value="{{resourceValue}}" |
| | | data-key="resource" |
| | | title="选择资源类型" |
| | | cancelBtn="取消" |
| | | confirmBtn="确认" |
| | | usingCustomNavbar |
| | | bindchange="onPickerChange" |
| | | bindcancel="onPickerCancel" |
| | | > |
| | | <t-picker-item options="{{fileTypeList}}" /> |
| | | </t-picker> |
| | | </view> |
| | |
| | | <view class="label">文件描述:</view> |
| | | <view class="item-content"> |
| | | <view class="inputBox1"> |
| | | <t-textarea placeholder="请输入文件描述" value="{{resourceInfo.description}}" disableDefaultPadding="{{true}}" autosize="{{true}}" maxlength="300" indicator bind:change="textareaChange" /> |
| | | <t-textarea |
| | | placeholder="请输入文件描述" |
| | | value="{{resourceInfo.description}}" |
| | | disableDefaultPadding="{{true}}" |
| | | autosize="{{true}}" |
| | | maxlength="300" |
| | | indicator |
| | | bind:change="textareaChange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="icon">*</text>上传文件: </view> |
| | | <view class="item-content"> |
| | | <t-button size="small" class="right-btn" bind:tap="uploadPicture" wx:if="{{isShowUp}}">点击上传</t-button> |
| | | <view wx:if="{{!isShowUp && fileList.length > 0}}" class="fileList"> |
| | | <t-button |
| | | size="small" |
| | | class="right-btn" |
| | | bind:tap="uploadPicture" |
| | | wx:if="{{isShowUp}}" |
| | | >点击上传</t-button |
| | | > |
| | | <view |
| | | wx:if="{{!isShowUp && fileList.length > 0}}" |
| | | class="fileList" |
| | | > |
| | | <text>{{fileList[0].name}}</text> |
| | | <image src="/static/images/bookService/detail/deleteHover.png" class="deleteBtn" data-md5="{{fileList[0].md5}}" bind:tap="handleRemove" /> |
| | | <image |
| | | src="/static/images/bookService/detail/deleteHover.png" |
| | | class="deleteBtn" |
| | | data-md5="{{fileList[0].md5}}" |
| | | bind:tap="handleRemove" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="tip">注:文件大小不得超过50MB</view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="protocolBox"> |
| | | <t-checkbox label="同意" icon="rectangle" checked="{{resourceInfo.agree}}" bind:change="onChange" /> |
| | | <t-checkbox |
| | | label="同意" |
| | | icon="rectangle" |
| | | checked="{{resourceInfo.agree}}" |
| | | bind:change="onChange" |
| | | /> |
| | | <text class="wait" bind:tap="getAgreement">《授权同意书》</text> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <view class="popupBox"> |
| | | <t-popup visible="{{protocolShow}}" bind:visible-change="onVisibleChange" placement="center"> |
| | | <t-popup |
| | | visible="{{protocolShow}}" |
| | | bind:visible-change="onVisibleChange" |
| | | placement="center" |
| | | > |
| | | <view class="block"> |
| | | <view class="protocol"> |
| | | <rich-text space="emsp" nodes="{{protocolTxt}}" class="content" /> |
| | | </view> |
| | | <t-icon t-class="close-btn" name="close-circle" size="32" color="#fff" bind:tap="onCloseProtocol" /> |
| | | <t-icon |
| | | t-class="close-btn" |
| | | name="close-circle" |
| | | size="32" |
| | | color="#fff" |
| | | bind:tap="onCloseProtocol" |
| | | /> |
| | | </view> |
| | | </t-popup> |
| | | </view> |
| | |
| | | }, |
| | | phoneError: false, |
| | | emailError: false, |
| | | loading: false |
| | | loading: false, |
| | | isKeyboard: false |
| | | }, |
| | | |
| | | /** |
| | |
| | | onUnload() { |
| | | |
| | | }, |
| | | |
| | | scroll() { |
| | | // 监听视图滚动,手动收起键盘 |
| | | if (this.data.isKeyboard) { |
| | | console.log(1); |
| | | wx.hideKeyboard() |
| | | } |
| | | }, |
| | | // 监听键盘弹起和收起 |
| | | bindkeyboardheightchange(e) { |
| | | // 键盘高度 |
| | | const height = e.detail.height; |
| | | this.setData({ |
| | | isKeyboard: height ? true : false |
| | | }) |
| | | }, |
| | | //获取字段 |
| | | getType() { |
| | | app.MG.resource.getCmsTypeByRefCode({ |
| | |
| | | <view class="container" style="height:calc(100vh + {{keyboardHeight ? (keyboardHeight + 'px'):'0'}});padding-bottom:calc(180rpx + {{keyboardHeight ? 120 + 'px':0}}) "> |
| | | <scroll-view class="scroll content" scroll-y> |
| | | <view class="tips"> 诚挚的欢迎您投稿出书,并郑重承诺:我们将认真审阅所有的来稿,以令人信服的效率、质量和稿酬择优出版! </view> |
| | | <view class="container"> |
| | | <scroll-view class="scroll content" scroll-y="{{true}}" bindscroll="scroll"> |
| | | <view class="tips"> |
| | | 诚挚的欢迎您投稿出书,并郑重承诺:我们将认真审阅所有的来稿,以令人信服的效率、质量和稿酬择优出版! |
| | | </view> |
| | | <view class="page-body"> |
| | | <view class=" baseInfoBox"> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="icon">*</text>选题名称: </view> |
| | | <view class="item-content"> |
| | | <t-textarea placeholder="丛书要列出总名称和各本书的名称" value="{{teacherInfo.topicName}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTopicNameInput" /> |
| | | <t-textarea |
| | | placeholder="丛书要列出总名称和各本书的名称" |
| | | value="{{teacherInfo.topicName}}" |
| | | disableDefaultPadding="{{true}}" |
| | | autosize="{{autosize}}" |
| | | bindchange="onTopicNameInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="icon">*</text>申报人: </view> |
| | | <view class="item-content"> |
| | | <t-input placeholder="请输入申报人姓名" borderless value="{{teacherInfo.declarer}}" bindchange="onDeclarerInput" /> |
| | | <t-input |
| | | placeholder="请输入申报人姓名" |
| | | borderless |
| | | value="{{teacherInfo.declarer}}" |
| | | bindchange="onDeclarerInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="icon">*</text>申报单位: </view> |
| | | <view class="item-content"> |
| | | <t-input placeholder="请输入申报单位" borderless value="{{teacherInfo.declarationUnit}}" bindchange="ondeclarationUnitInput" /> |
| | | <t-input |
| | | placeholder="请输入申报单位" |
| | | borderless |
| | | value="{{teacherInfo.declarationUnit}}" |
| | | bindchange="ondeclarationUnitInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="icon">*</text>学科专业: </view> |
| | | <view class="item-content"> |
| | | <t-input placeholder="请输入学科专业" borderless value="{{teacherInfo.disciplineMajor}}" bindchange="onDisciplineMajorInput" /> |
| | | <t-input |
| | | placeholder="请输入学科专业" |
| | | borderless |
| | | value="{{teacherInfo.disciplineMajor}}" |
| | | bindchange="onDisciplineMajorInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="icon">*</text>作者基本情况: </view> |
| | | <view class="item-content"> |
| | | <t-textarea placeholder="姓名、职务、研究领域、思想倾向、师德师风、学术水平、研究成果等" value="{{teacherInfo.authorBasicInformation}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onAuthorBasicInfoInput" /> |
| | | <t-textarea |
| | | placeholder="姓名、职务、研究领域、思想倾向、师德师风、学术水平、研究成果等" |
| | | value="{{teacherInfo.authorBasicInformation}}" |
| | | disableDefaultPadding="{{true}}" |
| | | autosize="{{autosize}}" |
| | | bindchange="onAuthorBasicInfoInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="icon">*</text>手机号: </view> |
| | | <view class="item-content"> |
| | | <t-input placeholder="输入手机号码" borderless value="{{teacherInfo.phone}}" type="number" tips="{{phoneError ? '手机号输入不正确' : ''}}" bindchange="onPhoneInput" /> |
| | | <t-input |
| | | placeholder="输入手机号码" |
| | | borderless |
| | | value="{{teacherInfo.phone}}" |
| | | type="number" |
| | | tips="{{phoneError ? '手机号输入不正确' : ''}}" |
| | | bindchange="onPhoneInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="icon">*</text>邮箱: </view> |
| | | <view class="item-content"> |
| | | <t-input placeholder="输入邮箱" borderless value="{{teacherInfo.email}}" tips="{{emailError ? '邮箱输入不正确' : ''}}" bindchange="onEmailInput" /> |
| | | <t-input |
| | | placeholder="输入邮箱" |
| | | borderless |
| | | value="{{teacherInfo.email}}" |
| | | tips="{{emailError ? '邮箱输入不正确' : ''}}" |
| | | bindchange="onEmailInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="icon">*</text>读者对象: </view> |
| | | <view class="item-content"> |
| | | <t-input placeholder="定位、范围、数量等" borderless value="{{teacherInfo.targetReaders}}" bindchange="onTargetReadersInput" /> |
| | | <t-input |
| | | placeholder="定位、范围、数量等" |
| | | borderless |
| | | value="{{teacherInfo.targetReaders}}" |
| | | bindchange="onTargetReadersInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="icon">*</text>选题特色: </view> |
| | | <view class="item-content"> |
| | | <t-textarea placeholder="选题背景、主要内容、出版价值等" value="{{teacherInfo.topicFeatures}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTopicFeaturesInput" /> |
| | | <t-textarea |
| | | placeholder="选题背景、主要内容、出版价值等" |
| | | value="{{teacherInfo.topicFeatures}}" |
| | | disableDefaultPadding="{{true}}" |
| | | autosize="{{autosize}}" |
| | | bindchange="onTopicFeaturesInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="empty"></text>选题学术影响与预期社会效益: </view> |
| | | <view class="label"> |
| | | <text class="empty"></text>选题学术影响与预期社会效益: |
| | | </view> |
| | | <view class="item-content"> |
| | | <t-textarea placeholder="选题学术影响与预期社会效益" value="{{teacherInfo.topicImpactAndExpected}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTopicImpactAndExpectedInput" /> |
| | | <t-textarea |
| | | placeholder="选题学术影响与预期社会效益" |
| | | value="{{teacherInfo.topicImpactAndExpected}}" |
| | | disableDefaultPadding="{{true}}" |
| | | autosize="{{autosize}}" |
| | | bindchange="onTopicImpactAndExpectedInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="empty"></text>选题的进度安排: </view> |
| | | <view class="label"> |
| | | <text class="empty"></text>选题的进度安排: |
| | | </view> |
| | | <view class="item-content"> |
| | | <t-textarea placeholder="预计来稿时间、出版时间等" value="{{teacherInfo.topicProgress}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTopicProgressInput" /> |
| | | <t-textarea |
| | | placeholder="预计来稿时间、出版时间等" |
| | | value="{{teacherInfo.topicProgress}}" |
| | | disableDefaultPadding="{{true}}" |
| | | autosize="{{autosize}}" |
| | | bindchange="onTopicProgressInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="empty"></text>市场分析: </view> |
| | | <view class="item-content"> |
| | | <t-textarea placeholder="市场需求、与同类书的差异和优势、定价标准、预计销量、盈亏分析等,是否有出版资助费" value="{{teacherInfo.marketAnalysis}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onMarketAnalysisInput" /> |
| | | <t-textarea |
| | | placeholder="市场需求、与同类书的差异和优势、定价标准、预计销量、盈亏分析等,是否有出版资助费" |
| | | value="{{teacherInfo.marketAnalysis}}" |
| | | disableDefaultPadding="{{true}}" |
| | | autosize="{{autosize}}" |
| | | bindchange="onMarketAnalysisInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="empty"></text>营销与宣传推广计划: </view> |
| | | <view class="label"> |
| | | <text class="empty"></text>营销与宣传推广计划: |
| | | </view> |
| | | <view class="item-content"> |
| | | <t-textarea placeholder="市场需求、与同类书的差异和优势、定价标准、预计销量、盈亏分析等,是否有出版资助费" value="{{teacherInfo.marketingAndPromotionPlan}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onMarketingAndPromotionPlanInput" /> |
| | | <t-textarea |
| | | placeholder="市场需求、与同类书的差异和优势、定价标准、预计销量、盈亏分析等,是否有出版资助费" |
| | | value="{{teacherInfo.marketingAndPromotionPlan}}" |
| | | disableDefaultPadding="{{true}}" |
| | | autosize="{{autosize}}" |
| | | bindchange="onMarketingAndPromotionPlanInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="empty"></text>配套数字资源开发方案: </view> |
| | | <view class="label"> |
| | | <text class="empty"></text>配套数字资源开发方案: |
| | | </view> |
| | | <view class="item-content"> |
| | | <t-textarea placeholder="配套数字资源名称、类型、内容、经费预算、效益分析等" value="{{teacherInfo.digitalResourceDevelopmentPlan}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="ondigitalResourceInput" /> |
| | | <t-textarea |
| | | placeholder="配套数字资源名称、类型、内容、经费预算、效益分析等" |
| | | value="{{teacherInfo.digitalResourceDevelopmentPlan}}" |
| | | disableDefaultPadding="{{true}}" |
| | | autosize="{{autosize}}" |
| | | bindchange="ondigitalResourceInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="from-item"> |
| | | <view class="label"> <text class="empty"></text>存在的其他问题: </view> |
| | | <view class="label"> |
| | | <text class="empty"></text>存在的其他问题: |
| | | </view> |
| | | <view class="item-content"> |
| | | <t-textarea placeholder="请输入其他问题" value="{{teacherInfo.otherExistingIssues}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onOtherExistingIssuesInput" /> |
| | | <t-textarea |
| | | placeholder="请输入其他问题" |
| | | value="{{teacherInfo.otherExistingIssues}}" |
| | | disableDefaultPadding="{{true}}" |
| | | autosize="{{autosize}}" |
| | | bindchange="onOtherExistingIssuesInput" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="btn-area"> |
| | | <button class="submit" bindtap="submit" loading="{{loading}}">提交</button> |
| | | <button class="submit" bindtap="submit" loading="{{loading}}"> |
| | | 提交 |
| | | </button> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | |
| | | |
| | | .container { |
| | | width: 100vw; |
| | | height: 100vh; |
| | | height: 100%; |
| | | } |
| | | |
| | | .content { |
| | |
| | | myAudioDuration: '00:00', // 视频时间 |
| | | myAudioCurrent: '00:00', // 当前播放进度 |
| | | isplay: false, //是否默认播放, |
| | | selectId: '', |
| | | speed: 1.0, |
| | | myAudioPos: '', |
| | | startTime: "", //进入页面当前时间 |
| | |
| | | * 生命周期函数--监听页面隐藏 |
| | | */ |
| | | onHide() { |
| | | // this.setData({ |
| | | // pauseTime: Date.now() |
| | | // }) |
| | | // if (wx.getStorageSync(app.config.tokenKey)) { |
| | | // let duration = this.data.pauseTime - this.data.startTime |
| | | // this.count(duration) |
| | | // } |
| | | // this.setPlayerList() |
| | | this.setData({ |
| | | pauseTime: Date.now() |
| | | isplay: true |
| | | }) |
| | | if (wx.getStorageSync(app.config.tokenKey)) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | this.setPlayerList() |
| | | }, |
| | | |
| | | /** |
| | |
| | | * |
| | | */ |
| | | onUnload() { |
| | | // this.setData({ |
| | | // pauseTime: Date.now() |
| | | // }) |
| | | // if (wx.getStorageSync(app.config.tokenKey)) { |
| | | // let duration = this.data.pauseTime - this.data.startTime |
| | | // this.count(duration) |
| | | // } |
| | | |
| | | |
| | | // myAudio.src = '' |
| | | // myAudio.destroy() |
| | | this.setData({ |
| | | // myAudioPos: '', |
| | | isplay: false, //是否默认播放, |
| | | myAudioCurrent: '00:00', // 当前播放进度 |
| | | showData: '', |
| | | speed: 1.0, |
| | | pauseTime: Date.now() |
| | | }); |
| | | myAudio.playbackRate = this.data.speed; |
| | | // 停止音频播放 |
| | | myAudio.stop(); |
| | | // 销毁 InnerAudioContext 实例 |
| | | // myAudio.destroy(); |
| | | // 统计学习时长 |
| | | if (wx.getStorageSync(app.config.tokenKey)) { |
| | | let duration = this.data.pauseTime - this.data.startTime |
| | | this.count(duration) |
| | | } |
| | | this.setPlayerList() |
| | | }, |
| | | count(timeStr) { |
| | |
| | | if (this.data.cmsId) { |
| | | data.cmsItemId = this.data.cmsId |
| | | } |
| | | console.log('统计', data) |
| | | app.MG.job.newJobWithApiNewEvent(data).then((res) => {}) |
| | | }, |
| | | /** |
| | |
| | | if (this.data.showData != '') { |
| | | this.setData({ |
| | | titleName: item.name, |
| | | selectId: item.id, |
| | | selectedId: e.currentTarget.dataset.index, |
| | | showData: '', |
| | | activeId: item.id |
| | | |
| | | }) |
| | | if (item.selectType == "audio" || item.learnSelectType === "audio") { |
| | | if (this.data.formPath == 'jsek_cloudLearning') { |
| | |
| | | myAudioCurrent: '00:00', |
| | | myAudioPos: '', |
| | | }) |
| | | |
| | | |
| | | |
| | | }); |
| | | |
| | | //进度条变化 |
| | |
| | | }); |
| | | }, |
| | | |
| | | //右切换 |
| | | onLeftSwitch() { |
| | | this.setData({ |
| | | speed: 1.0, |
| | | myAudioCurrent: '00:00' |
| | | }) |
| | | const index = this.data.threeLeveData.findIndex((item) => item.id == this.data.selectId) |
| | | if (this.data.threeLeveData[index - 1]) { |
| | | this.changeItem(this.data.threeLeveData[index - 1]) |
| | | this.setData({ |
| | | selectedId: index - 1, |
| | | }) |
| | | } else { |
| | | console.log('已经是第一首了'); |
| | | } |
| | | }, |
| | | //右切换 |
| | | onRightSwitch() { |
| | | this.setData({ |
| | | speed: 1.0, |
| | | myAudioCurrent: '00:00' |
| | | }) |
| | | const index = this.data.threeLeveData.findIndex((item) => item.id == this.data.selectId) |
| | | if (this.data.threeLeveData[index + 1]) { |
| | | this.changeItem(this.data.threeLeveData[index + 1]) |
| | | this.setData({ |
| | | selectedId: index + 1, |
| | | }) |
| | | } else { |
| | | console.log('已经是最后一首了'); |
| | | } |
| | | }, |
| | | |
| | | // 左右切换 |
| | | changeItem(item) { |
| | | if (this.data.showData != '') { |
| | | this.setData({ |
| | | showData: '' |
| | | }) |
| | | } |
| | | this.setData({ |
| | | titleName: item.name, |
| | | selectId: item.id |
| | | }) |
| | | if (item.selectType == "audio") { |
| | | this.setData({ |
| | | showData: app.config.requestCtx + '/file/api/ApiDownload?md5=' + item.file |
| | | }) |
| | | this.pubulicPlayFun() |
| | | } |
| | | }, |
| | | // 播放倍速 |
| | | onSpeed() { |
| | | let c = this.data.speed; |
| | |
| | | setPlayerList() { |
| | | let that = this |
| | | if (that.data.progress > 0) { |
| | | let index = that.data.playerList.findIndex((itemData) => itemData.cmsItemId == that.data.selectId) |
| | | let index = that.data.playerList.findIndex((itemData) => itemData.cmsItemId == that.data.activeId) |
| | | if (index > -1) { |
| | | that.data.playerList.splice(index, 1) |
| | | } |
| | | that.data.playerList.push({ |
| | | cmsItemId: that.data.selectId, |
| | | cmsItemId: that.data.activeId, |
| | | progress: that.data.progress |
| | | }) |
| | | app.MG.identity |
| | |
| | | <!-- 视频播放的按钮 --> |
| | | <view class="bigFunctionBox"> |
| | | <view class="functionBox"> |
| | | <!-- 左切换 --> |
| | | <!-- <view class="leftSwitchBox color" bind:tap="onLeftSwitch"> |
| | | <t-icon name="previous" size="24" /> |
| | | </view> --> |
| | | |
| | | |
| | | <!-- 暂停播放 --> |
| | | <view class="audioIconBox color" style="margin-left: 30rpx; margin-right: 10rpx"> |
| | |
| | | </view> |
| | | </view> |
| | | <slider style="width: 300rpx" activeColor="#FF6C00" class="mp-slider-bar" block-size="16" value="{{myAudioPos}}" bindchange="hanle_slider_change"></slider> |
| | | <!-- 右切换 --> |
| | | <!-- <view class="rightSwitchBox color" bind:tap="onRightSwitch"> |
| | | <t-icon name="next" size="24" /> |
| | | </view> --> |
| | | |
| | | |
| | | <!-- 时间 --> |
| | | <view class="timeBox"> |
| | |
| | | // 监听页面软键盘弹起手动推动页面 |
| | | scrollToInput(keyboardHeight, scrollTop) { |
| | | this.setData({ |
| | | keyboardHeight, |
| | | keyboardHeight: keyboardHeight ? keyboardHeight + 300 : 0, |
| | | }); |
| | | if (scrollTop) { |
| | | try { |
| | | this.getScrollOffset().then((lastScrollTop) => { |
| | | wx.pageScrollTo({ |
| | | // 如果已经存在滚动,在此基础上继续滚 |
| | | scrollTop: lastScrollTop ? lastScrollTop + scrollTop : scrollTop, |
| | | scrollTop: lastScrollTop ? lastScrollTop + scrollTop + 100 : scrollTop + 200, |
| | | duration: 300, |
| | | }); |
| | | }); |
| | |
| | | <view class="container" style="height:calc(100vh + {{keyboardHeight ? (keyboardHeight + 'px'):'0'}});padding-bottom:calc(180rpx+ {{keyboardHeight ? 120 + 'px':0}})"> |
| | | <t-tabs t-class="t-tabs" defaultValue="{{active}}" split="{{false}}" bind:change="tabClick" show-bottom-line="false"> |
| | | <view class="tab"> |
| | | <t-tabs |
| | | t-class="t-tabs" |
| | | defaultValue="{{active}}" |
| | | split="{{false}}" |
| | | bind:change="tabClick" |
| | | show-bottom-line="false" |
| | | > |
| | | <t-tab-panel label="纸质样书" value="0" /> |
| | | <t-tab-panel label="电子样书" value="1" /> |
| | | </t-tabs> |
| | | <view class="page-content"> |
| | | <view class="con-bg"></view> |
| | | <scroll-view class="scroll content" scroll-y> |
| | | </view> |
| | | <view class="bookListBox"> |
| | | <view class="tips"> |
| | | <rich-text space="emsp" nodes="{{description}}" class="content" /> |
| | | </view> |
| | | <view class="bookList"> |
| | | <view wx:if="{{bookList.length > 0}}"> |
| | | <view wx:for="{{bookList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="textbooksItemBox"> |
| | | <view |
| | | wx:for="{{bookList}}" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | wx:key="index" |
| | | class="textbooksItemBox" |
| | | > |
| | | <t-swipe-cell> |
| | | <t-cell title="左滑单操作" note="辅助信息" bordered="{{false}}"> |
| | | <view class="listItem flex"> |
| | | <view class="specialSubject-img"> |
| | | <image src="{{item.icon}}" mode="aspectFill" class="img" wx:if="{{item.icon}}" /> |
| | | <image src="/static/images/default-book-img.png" mode="aspectFill" class="img" wx:else="" /> |
| | | <image |
| | | src="{{item.icon}}" |
| | | mode="aspectFill" |
| | | class="img" |
| | | wx:if="{{item.icon}}" |
| | | /> |
| | | <image |
| | | src="/static/images/default-book-img.png" |
| | | mode="aspectFill" |
| | | class="img" |
| | | wx:else="" |
| | | /> |
| | | </view> |
| | | <view class="body-info"> |
| | | <view class="name">{{item.title}}</view> |
| | | <view class="author">作者:{{item.author}}</view> |
| | | <view class="author">ISBN:{{item.isbn}}</view> |
| | | <view class="author" wx:if="{{item.publicationDate}}">出版时间:{{item.publicationDate}}</view> |
| | | <view class="author" wx:if="{{item.publicationDate}}" |
| | | >出版时间:{{item.publicationDate}}</view |
| | | > |
| | | </view> |
| | | </view> |
| | | </t-cell> |
| | | <view slot="right" class="btn delete-btn" bind:tap="onDelete" data-book="{{item}}">删除</view> |
| | | <view |
| | | slot="right" |
| | | class="btn delete-btn" |
| | | bind:tap="onDelete" |
| | | data-book="{{item}}" |
| | | >删除</view |
| | | > |
| | | </t-swipe-cell> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="item form-input-1"> |
| | | <text class="label"><text class="icon">*</text>姓名:</text> |
| | | <view class="item-content"> |
| | | <t-input placeholder="请输入真实姓名" borderless value="{{contactInfo.user}}" bindchange="onFullNameInput" adjust-position="{{isIos?false:true}}" bindkeyboardheightchange="bindkeyboardheightchange" bindblur="changeParam" data-class="form-input-1" /> |
| | | <t-input |
| | | placeholder="请输入真实姓名" |
| | | borderless |
| | | value="{{contactInfo.user}}" |
| | | bindchange="onFullNameInput" |
| | | adjust-position="{{false}}" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | bindblur="changeParam" |
| | | data-class="form-input-1" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="item form-input-2"> |
| | | <text class="label"><text class="icon">*</text>联系电话:</text> |
| | | <view class="item-content"> |
| | | <t-input placeholder="输入联系电话" borderless value="{{contactInfo.phone}}" type="number" tips="{{phoneError ? '手机号输入不正确' : ''}}" bindchange="onPhoneInput" adjust-position="{{isIos?false:true}}" bindkeyboardheightchange="bindkeyboardheightchange" bindblur="changeParam" data-class="form-input-2" /> |
| | | <t-input |
| | | placeholder="输入联系电话" |
| | | borderless |
| | | value="{{contactInfo.phone}}" |
| | | type="number" |
| | | tips="{{phoneError ? '手机号输入不正确' : ''}}" |
| | | bindchange="onPhoneInput" |
| | | adjust-position="{{false}}" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | bindblur="changeParam" |
| | | data-class="form-input-2" |
| | | /> |
| | | </view> |
| | | </view> |
| | | <view class="item form-input-3"> |
| | | <text class="label"><text class="icon">*</text>详细地址:</text> |
| | | <view class="item-content"> |
| | | <t-input placeholder="请输入详细地址" borderless value="{{contactInfo.address}}" bindchange="onAddressInput" adjust-position="{{isIos?false:true}}" bindkeyboardheightchange="bindkeyboardheightchange" bindblur="changeParam" data-class="form-input-3" /> |
| | | <t-input |
| | | placeholder="请输入详细地址" |
| | | borderless |
| | | value="{{contactInfo.address}}" |
| | | bindchange="onAddressInput" |
| | | adjust-position="{{false}}" |
| | | bindkeyboardheightchange="bindkeyboardheightchange" |
| | | bindblur="changeParam" |
| | | data-class="form-input-3" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="btn-area"> |
| | | <view |
| | | class="btn-area" |
| | | style="padding-bottom: {{keyboardHeight ? keyboardHeight + 'rpx' : '60rpx'}}" |
| | | > |
| | | <button class="submit" bindtap="submit">提交</button> |
| | | </view> |
| | | </scroll-view> |
| | | </view> |
| | | </view> |
| | |
| | | page { |
| | | background-color: #f0f2f5 !important; |
| | | overflow-y: auto !important; |
| | | position: relative; |
| | | background-color: #F2F3F8 !important; |
| | | } |
| | | |
| | | .container { |
| | | width: 100%; |
| | | height: 100vh; |
| | | height: 100%; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | .t-tabs { |
| | | .tab { |
| | | width: 100%; |
| | | position: fixed !important; |
| | | top: 0; |
| | | left: 0; |
| | | padding-top: 20rpx; |
| | | background-color: #F2F3F8 !important; |
| | | } |
| | | |
| | | .t-tabs { |
| | | background: none !important; |
| | | width: 100%; |
| | | position: fixed; |
| | | top: 0rpx; |
| | | left: 0; |
| | | z-index: 1 |
| | | } |
| | | |
| | |
| | | background: #fff; |
| | | min-height: 200rpx; |
| | | border-radius: 10rpx; |
| | | |
| | | padding: 60rpx 40rpx 40rpx 40rpx; |
| | | padding: 180rpx 40rpx 40rpx 40rpx; |
| | | } |
| | | |
| | | .tips { |
| | |
| | | num: 0, |
| | | x: 280, |
| | | y: 300, |
| | | scrollTop: 0 |
| | | }, |
| | | |
| | | /** |
| | |
| | | } |
| | | that.getBookList(false); |
| | | }, |
| | | onHide() { |
| | | const query = wx.createSelectorQuery() |
| | | query.select('#scrollView').scrollOffset(res => { |
| | | console.log(1, res); |
| | | this.setData({ |
| | | scrollTop: res.scrollTop |
| | | }) |
| | | console.log('隐藏', this.data.scrollTop); |
| | | }).exec() |
| | | |
| | | }, |
| | | goBack() { |
| | | wx.navigateBack(); |
| | | }, |
| | |
| | | <!-- model:scroll-top="{{setScrollValue}}" --> |
| | | <scroll-view |
| | | class="scroll content" |
| | | id="scrollView" |
| | | bind:scroll="onPageScroll" |
| | | scroll-y |
| | | enable-passive="{{true}}" |
| | | refresher-enabled="{{true}}" |
| | | lower-threshold="{{200}}" |
| | | lower-threshold="{{100}}" |
| | | refresher-threshold="{{180}}" |
| | | refresher-default-style="none" |
| | | refresher-triggered="{{triggered}}" |
| | |
| | | margin-left: 10rpx; |
| | | } |
| | | |
| | | movable-area { |
| | | pointer-events: auto; |
| | | } |
| | | |
| | | .movable-area { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | movable-view { |
| | | pointer-events: auto; |
| | | } |
| | | |
| | | .movable-view { |
| | |
| | | .t-search__input-box { |
| | | height: 70rpx !important; |
| | | } |
| | | |
| | |
| | | searchList: [] |
| | | }; |
| | | app.MG.store.getShoppingCartProductList(query).then(res => { |
| | | console.log(res); |
| | | console.log(res.datas); |
| | | this.setData({ |
| | | totalSize: res.totalSize |
| | | }) |
| | |
| | | item.type = type; // 将type设置为item对象的属性,而不是使用setData |
| | | item.name = item.linkCmsItems[0].name ? item.productMonWithLinkDto.product.name + ':' + item.linkCmsItems[0].name : item.productMonWithLinkDto.product.name |
| | | item.saleMethod.price = this.numFormat(item.saleMethod.price) |
| | | |
| | | // |
| | | if (item.productMonWithLinkDto.links[0].storeRefCode == 'jsek_digitalTextbooks') { |
| | | item.typeTxt = '数字教材' |
| | | item.productType = "数字教材" |
| | |
| | | item.typeTxt = '电子书' |
| | | item.productType = "图书服务-电子书" |
| | | |
| | | if (item.saleMethod.type == 'createProductItemSaleMethod') { |
| | | if (item.saleMethod.type == 'createProductItemSaleMethod' || item.saleMethod.type == 'createProductFolderSaleMethod') { |
| | | item.typeTxt = '云学习' |
| | | item.productType = "图书服务-云学习" |
| | | } |
| | |
| | | <!-- loading |
| | | hidden --> |
| | | <view hidden="{{hidden}}"> |
| | | <scroll-view scroll-y="{{true}}" class="outsideContentBox" bindscrolltolower="onScrollToLower"> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="outsideContentBox" |
| | | bindscrolltolower="onScrollToLower" |
| | | > |
| | | <view> |
| | | <!-- <checkbox-group bindchange="HandelItemChange"> --> |
| | | <view wx:if="{{shoppingCartData.length <= 0}}" class="noDataBox"> |
| | |
| | | <empty /> |
| | | </view> |
| | | <!-- <button bind:tap="onLogin"> 去登录</button> --> |
| | | <t-swipe-cell wx:for="{{shoppingCartData}}" wx:key="index" wx:for-item="item" wx:for-index="index" opened="{{swipeOpened}}"> |
| | | <t-swipe-cell |
| | | wx:for="{{shoppingCartData}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | opened="{{swipeOpened}}" |
| | | > |
| | | <view class="itemWarp"> |
| | | <t-cell bordered="{{false}}"> |
| | | <view slot="title" class="titleBox"> |
| | |
| | | </view> |
| | | <view slot="description" class="descriptionBox"> |
| | | <view> |
| | | <view class="textBox" wx:if="{{item.type == 'product'}}">图书服务-电子书</view> |
| | | <view class="textBox" wx:if="{{item.type == 'item'}}">图书服务-云学习</view> |
| | | <!-- <view class="textBox" wx:if="{{item.type == 'product'}}">图书服务-电子书</view> |
| | | <view class="textBox" wx:if="{{item.type == 'item'}}">图书服务-云学习</view> --> |
| | | <view class="textBox"> {{item.productType}} </view> |
| | | </view> |
| | | <view wx:if="{{item.saleMethod.price != 0}}" class="price-box"> |
| | | ¥{{item.saleMethod.price }} |
| | |
| | | </view> |
| | | <view slot="left-icon" class="left-icon"> |
| | | <view class="contentCheckbox"> |
| | | <t-checkbox icon="rectangle" value=" {{item.id}}" data-item="{{item}}" checked="{{item.checked}}" bindchange="HandelItemChange" /> |
| | | <t-checkbox |
| | | icon="rectangle" |
| | | value=" {{item.id}}" |
| | | data-item="{{item}}" |
| | | checked="{{item.checked}}" |
| | | bindchange="HandelItemChange" |
| | | /> |
| | | </view> |
| | | <view class="left-image" data-item="{{item}}" bind:tap="onBook"> |
| | | <image wx:if="{{item.imgUrl}}" src="{{item.imgUrl}}" class="imageStyle" mode="aspectFit" /> |
| | | <image wx:else src="/static/images/default-book-img.png" class="imageStyle" mode="aspectFit" /> |
| | | <image |
| | | wx:if="{{item.imgUrl}}" |
| | | src="{{item.imgUrl}}" |
| | | class="imageStyle" |
| | | mode="aspectFit" |
| | | /> |
| | | <image |
| | | wx:else |
| | | src="/static/images/default-book-img.png" |
| | | class="imageStyle" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </t-cell> |
| | | </view> |
| | | <view slot="right" class="btn delete-btn" bind:tap="onDelete" data-item="{{item}}">删除</view> |
| | | <view |
| | | slot="right" |
| | | class="btn delete-btn" |
| | | bind:tap="onDelete" |
| | | data-item="{{item}}" |
| | | >删除</view |
| | | > |
| | | </t-swipe-cell> |
| | | <view wx:if="{{shoppingCartData.length > 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="bottomBox"> |
| | | <view class="checkGroupBox"> |
| | | <checkbox-group bindchange="bottomChange"> |
| | | <checkbox disabled="{{onDisabled}}" value="全选" checked="{{checkAll}}">全选</checkbox> |
| | | <checkbox disabled="{{onDisabled}}" value="全选" checked="{{checkAll}}" |
| | | >全选</checkbox |
| | | > |
| | | </checkbox-group> |
| | | </view> |
| | | <view class="settlementBox"> |
| | | <view class="totalPrice">总价:<text class="totalPriceText">¥{{totalPrice}}</text></view> |
| | | <view class="totalPrice" |
| | | >总价:<text class="totalPriceText">¥{{totalPrice}}</text></view |
| | | > |
| | | <view class="buttonBox"> |
| | | <t-button class="tButtonBox" size="small" shape="round" bind:tap="goPaymentPage"> |
| | | <t-button |
| | | class="tButtonBox" |
| | | size="small" |
| | | shape="round" |
| | | bind:tap="goPaymentPage" |
| | | > |
| | | <view>去结算({{selectedCount}})</view> |
| | | </t-button> |
| | | </view> |
| | |
| | | this.digitalCoursesDetailsGet(options.id) |
| | | this.getPlayerList() |
| | | this.getType() |
| | | // this.setData({ |
| | | // userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name, |
| | | // }) |
| | | this.setData({ |
| | | userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).name, |
| | | }) |
| | | console.log('1', options.id); |
| | | }, |
| | | |
| | | /** |
| | |
| | | * 生命周期函数--监听页面显示 |
| | | */ |
| | | onShow() { |
| | | if (this.data.tabValue == 2) { |
| | | this.getPlayerList() |
| | | this.getResource() |
| | | } |
| | | |
| | | }, |
| | | |
| | |
| | | res.datas.cmsDatas[0].datas.forEach((item) => { |
| | | if (item.type == 'questionBankFolder' || item.type == 'questionBankItem') { |
| | | test.push(item) |
| | | |
| | | } else if (item.type != "resourceItem") { |
| | | this.data.playerList.forEach(pItem => { |
| | | if (pItem.cmsItemId == item.id) { |
| | |
| | | if (item.type == 'productItem') { |
| | | learnItemList.push(item) |
| | | } |
| | | |
| | | }) |
| | | |
| | | if (this.data.selectActive === 'learn') { |
| | | let list = [] |
| | | // 测试 6位// 正式 5位// 测试调用传20,内部7 正式调用传17 内部传6 |
| | |
| | | learnList: list, |
| | | openTeachids: result, |
| | | }); |
| | | console.log(1, this.data.learnList, this.data.playerList) |
| | | } |
| | | } else { |
| | | const data = test.filter( |
| | |
| | | }) |
| | | .then((res) => { |
| | | if (res) { |
| | | this.digitalCoursesDetailsGet(this.data.digitalsData.id); |
| | | wx.showToast({ |
| | | title: "领取成功", |
| | | icon: "none", |
| | |
| | | height: 68rpx; |
| | | line-height: 68rpx; |
| | | text-align: center; |
| | | |
| | | color: #ff6c00; |
| | | flex: 1; |
| | | } |
| | | |
| | |
| | | activeItem: null, |
| | | loading: false, |
| | | contentLoading: false, |
| | | noData:false, |
| | | shoppingCartGetId: [], |
| | | sorter: { |
| | | value: "*", |
| | |
| | | }, |
| | | getCourseTypeListList() { |
| | | this.setData({ |
| | | loading: true |
| | | loading: true, |
| | | }) |
| | | const data = { |
| | | path: '*', |
| | |
| | | } |
| | | } |
| | | app.MG.store.getProductList(obj).then((res) => { |
| | | if(!res.datas.length) { |
| | | return this.setData({ |
| | | noData:true, |
| | | contentLoading:false |
| | | }) |
| | | } |
| | | res.datas.forEach(item => { |
| | | item.price = item.price.toFixed(2) |
| | | item.productLinkInfo = JSON.parse(item.productLinkInfo) |
| | |
| | | <view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> |
| | | <view class="back-icon"> |
| | | <!-- <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> --> |
| | | <image src="/static/images/digitalTextbooks/chevron-left.png" bind:tap="goBack" mode="aspectFit" /> |
| | | <image |
| | | src="/static/images/digitalTextbooks/chevron-left.png" |
| | | bind:tap="goBack" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | <t-search model:value="{{searchValue}}" shape="round" placeholder="请输入课程名称/ISBN/课程负责人" class="navBar-search" style="width: 464rpx" bind:submit="searchBook" /> |
| | | <t-search |
| | | model:value="{{searchValue}}" |
| | | shape="round" |
| | | placeholder="请输入课程名称/ISBN/课程负责人" |
| | | class="navBar-search" |
| | | style="width: 464rpx" |
| | | bind:submit="searchBook" |
| | | /> |
| | | </view> |
| | | <view class="heardTab"> |
| | | <view class="tabBox"> |
| | | <t-tabs defaultValue="{{active}}" bind:change="onTabsChange" t-class="custom-tabs"> |
| | | <t-tab-panel wx:for="{{tabList}}" wx:key="index" wx:for-item="item" label="{{item.name}}" value="{{index}}"> |
| | | <t-tabs |
| | | defaultValue="{{active}}" |
| | | bind:change="onTabsChange" |
| | | t-class="custom-tabs" |
| | | > |
| | | <t-tab-panel |
| | | wx:for="{{tabList}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | label="{{item.name}}" |
| | | value="{{index}}" |
| | | > |
| | | </t-tab-panel> |
| | | </t-tabs> |
| | | </view> |
| | | <view class="dropdown"> |
| | | <t-dropdown-menu> |
| | | <t-dropdown-item options="{{sorter.options}}" default-value="{{sorter.value}}" bindchange="onSort" /> |
| | | <t-dropdown-item |
| | | options="{{sorter.options}}" |
| | | default-value="{{sorter.value}}" |
| | | bindchange="onSort" |
| | | /> |
| | | </t-dropdown-menu> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="titleBox"> |
| | | <view class="frameBox"></view> |
| | | <view class="titleTextBox"> |
| | | <image src="/static/images/digitalCourses/zhuantitaolun@2x.png" mode="aspectFit" /> |
| | | <image |
| | | src="/static/images/digitalCourses/zhuantitaolun@2x.png" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | </view> |
| | | |
| | | </view> |
| | | <t-skeleton theme="paragraph" animation="gradient" loading="{{contentLoading}}" class="content-loading" wx:if="{{contentLoading}}"></t-skeleton> |
| | | <scroll-view scroll-y="{{true}}" class="outsideContentBox" bindscrolltolower="onScrollToLower" wx:if="{{!contentLoading}}"> |
| | | <t-skeleton |
| | | theme="paragraph" |
| | | animation="gradient" |
| | | loading="{{contentLoading}}" |
| | | class="content-loading" |
| | | wx:if="{{contentLoading}}" |
| | | ></t-skeleton> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="outsideContentBox" |
| | | bindscrolltolower="onScrollToLower" |
| | | wx:if="{{!contentLoading}}" |
| | | > |
| | | <view class="ExternalInformationBox"> |
| | | <view class="informationBox" wx:for="{{courseList}}" wx:key="index" wx:for-item="item" data-item="{{item}}"> |
| | | <view |
| | | class="informationBox" |
| | | wx:for="{{courseList}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | data-item="{{item}}" |
| | | > |
| | | <view class="book-img" bind:tap="courseDetail" data-item="{{item}}"> |
| | | <image src="{{item.icon ? item.icon : 'https://jsek.bnuic.com/home/image/courseIcon.png'}}" mode="aspectFit" /> |
| | | <image |
| | | src="{{item.icon ? item.icon : 'https://jsek.bnuic.com/home/image/courseIcon.png'}}" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | <view class="book-Info"> |
| | | <view class="book-name" bind:tap="courseDetail" data-item="{{item}}"> |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{courseList.length <= 0 && !contentLoading}}" class="noDataBox"> |
| | | <view wx:if="{{noData}}" class="noDataBox"> |
| | | <t-empty icon="folder-open" description="暂无数据" font-size="80" /> |
| | | </view> |
| | | </scroll-view> |
| | |
| | | <view class="outsideRetrievalPageBox" hidden="{{hidden}}"> |
| | | <view class="retrievalPageBox"> |
| | | <view class="example-search"> |
| | | <t-search bind:submit="onSearchSubmit" class="searchBox" model:value="{{searchVal}}" placeholder="请输入关键词/书名/ISBN/作者" /> |
| | | <t-search |
| | | bind:submit="onSearchSubmit" |
| | | class="searchBox" |
| | | model:value="{{searchVal}}" |
| | | placeholder="请输入关键词/书名/ISBN/作者/项目负责人" |
| | | /> |
| | | <view class="cancellation" bind:tap="onCancellation">取消</view> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- Tab布局 --> |
| | | <scroll-view scroll-x="{{true}}" class="scroll-x"> |
| | | <view class="navBox"> |
| | | <view class="titleBox" wx:for="{{tabList}}" bindtap="tabsOn" data-idx="{{item.index}}"> |
| | | <view |
| | | class="titleBox" |
| | | wx:for="{{tabList}}" |
| | | bindtap="tabsOn" |
| | | data-idx="{{item.index}}" |
| | | > |
| | | <view class="tabIndexBox"> |
| | | <text class="{{item.index == tabsId ? 'fontColorBox' : ''}}">{{item.title}} ({{item.bookTotal}}) |
| | | <text class="{{item.index == tabsId ? 'fontColorBox' : ''}}" |
| | | >{{item.title}} ({{item.bookTotal}}) |
| | | </text> |
| | | </view> |
| | | <hr class="{{item.index == tabsId ? 'lineBox' : ''}}" /> |
| | |
| | | </view> |
| | | </scroll-view> |
| | | <!-- 内容布局 --> |
| | | <swiper class="swiperTtemBox" bindchange="slideOn" current="{{tabsId}}" circular> |
| | | <swiper |
| | | class="swiperTtemBox" |
| | | bindchange="slideOn" |
| | | current="{{tabsId}}" |
| | | circular |
| | | > |
| | | <!-- circular 启用循环滑动 --> |
| | | <swiper-item> |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="scrollViewBox" |
| | | bindscrolltolower="onScrollToLower" |
| | | > |
| | | <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="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 wx:if="{{item.icon}}" src="{{item.icon}}" mode="aspectFit" /> |
| | | <image wx:if="{{!item.icon}}" src="/static/images/default-book-img.png" mode="" /> |
| | | <image |
| | | wx:if="{{item.icon}}" |
| | | src="{{item.icon}}" |
| | | mode="aspectFit" |
| | | /> |
| | | <image |
| | | wx:if="{{!item.icon}}" |
| | | src="/static/images/default-book-img.png" |
| | | mode="" |
| | | /> |
| | | </view> |
| | | <view class="bookDataNmae"> {{item.name}} </view> |
| | | <view class="bookDataAuthor">{{item.author}}</view> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{bookData.length}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | <view wx:if="{{bookData.length <= 0}}" class="noDataBox"> |
| | |
| | | </scroll-view> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="scrollViewBox" |
| | | bindscrolltolower="onScrollToLower" |
| | | > |
| | | <view class="listBox1"> |
| | | <view> |
| | | <view wx:for="{{courseData}}" wx:for-item="item" wx:for-index="index" wx:key="index" bindtap="toList" data-info="{{item}}" class="listItemBox"> |
| | | <view class="listItem flex" data-item="{{item}}" bind:tap="underConstruction"> |
| | | <view |
| | | wx:for="{{courseData}}" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | wx:key="index" |
| | | bindtap="toList" |
| | | data-info="{{item}}" |
| | | class="listItemBox" |
| | | > |
| | | <view |
| | | class="listItem flex" |
| | | data-item="{{item}}" |
| | | bind:tap="underConstruction" |
| | | > |
| | | <view class="specialSubject-img-box"> |
| | | <image src="{{item.icon}}" mode="aspectFill" /> |
| | | </view> |
| | |
| | | <text>{{item.classHours}}课时</text> |
| | | </view> |
| | | <view class="priceBox flex jc-sb"> |
| | | <text class="price" wx:if="{{item.price == 0}}">免费</text> |
| | | <text class="price" wx:if="{{item.price !== 0}}">¥{{item.price}}</text> |
| | | <image src="/static/images/home/home-cart.png" mode="aspectFill" class="addCartImg" /> |
| | | <text class="price" wx:if="{{item.price == 0}}" |
| | | >免费</text |
| | | > |
| | | <text class="price" wx:if="{{item.price !== 0}}" |
| | | >¥{{item.price}}</text |
| | | > |
| | | <image |
| | | src="/static/images/home/home-cart.png" |
| | | mode="aspectFill" |
| | | class="addCartImg" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{courseData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | <view wx:if="{{courseData.length <= 0}}" class="noDataBox"> |
| | |
| | | </scroll-view> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="scrollViewBox" |
| | | bindscrolltolower="onScrollToLower" |
| | | > |
| | | <view class="bookDataBox"> |
| | | <view class="bookDataForBox" wx:for="{{digitalTextbooksData}}" wx:key="index" wx:for-item="item" wx:for-index="index" data-item="{{item}}" bind:tap="underConstruction"> |
| | | <view |
| | | class="bookDataForBox" |
| | | wx:for="{{digitalTextbooksData}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | data-item="{{item}}" |
| | | bind:tap="underConstruction" |
| | | > |
| | | <view class="imageBox"> |
| | | <image src="{{item.icon}}" mode="" /> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <view wx:if="{{digitalTextbooksData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | <view wx:if="{{digitalTextbooksData.length <= 0}}" class="noDataBox"> |
| | |
| | | </scroll-view> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="scrollViewBox" |
| | | bindscrolltolower="onScrollToLower" |
| | | > |
| | | <view class="listBox"> |
| | | <view wx:for="{{seminarData}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="listItemBox" data-item="{{item}}" bind:tap="underConstruction"> |
| | | <view class="listItem" bindtap="goSubjectDetail" data-book="{{item}}"> |
| | | <view |
| | | wx:for="{{seminarData}}" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | wx:key="index" |
| | | class="listItemBox" |
| | | data-item="{{item}}" |
| | | bind:tap="underConstruction" |
| | | > |
| | | <view |
| | | class="listItem" |
| | | bindtap="goSubjectDetail" |
| | | data-book="{{item}}" |
| | | > |
| | | <view class="specialSubject-img"> |
| | | <image src="{{item.icon}}" mode="aspectFill" class="img" /> |
| | | </view> |
| | | <view class="body-info"> |
| | | <view class="name">{{item.name}}</view> |
| | | <view class="time" wx:if="{{item.liveTime}}">直播时间:{{item.liveTime}}</view> |
| | | <view class="time" wx:if="{{item.startTime}}">开播时间:{{ item.startTime }}</view> |
| | | <view class="time" wx:if="{{!item.liveTime && !item.startTime}}">开播时间:<text class="grey">待定</text></view> |
| | | <view class="time" wx:if="{{item.liveTime}}" |
| | | >直播时间:{{item.liveTime}}</view |
| | | > |
| | | <view class="time" wx:if="{{item.startTime}}" |
| | | >开播时间:{{ item.startTime }}</view |
| | | > |
| | | <view |
| | | class="time" |
| | | wx:if="{{!item.liveTime && !item.startTime}}" |
| | | >开播时间:<text class="grey">待定</text></view |
| | | > |
| | | <view class="flex jc-sb"> |
| | | <text class="author">{{item.lecturer}} {{item.position}}</text> |
| | | <text class="author" |
| | | >{{item.lecturer}} {{item.position}}</text |
| | | > |
| | | <text class="price" wx:if="{{item.price == 0}}">免费</text> |
| | | <text class="price" wx:if="{{item.price !== 0}}">¥{{item.price}}</text> |
| | | <text class="price" wx:if="{{item.price !== 0}}" |
| | | >¥{{item.price}}</text |
| | | > |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{seminarData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | <view wx:if="{{seminarData.length <= 0}}" class="noDataBox"> |
| | |
| | | </scroll-view> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="scrollViewBox" |
| | | bindscrolltolower="onScrollToLower" |
| | | > |
| | | <view class="outsideHigherBox"> |
| | | <view class="higherBox" wx:for="{{bookFairData}}" wx:key="index" wx:for-item="item" wx:for-index="index"> |
| | | <view |
| | | class="higherBox" |
| | | wx:for="{{bookFairData}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | > |
| | | <view class="outsideHigherImageBox"> |
| | | <view class="higherImageBox" bind:tap="openBookFair" data-item="{{item}}"> |
| | | <view |
| | | class="higherImageBox" |
| | | bind:tap="openBookFair" |
| | | data-item="{{item}}" |
| | | > |
| | | <image src="{{item.icon}}" mode="aspectFill" /> |
| | | <view class="downloadIcon" data-item="{{item}}" data-key="showWithInput" catch:tap="mailbox"> |
| | | <image wx:if="{{determine}}" class="download" src="/static/images/bibliographyList/email-click.png" mode="aspectFit" /> |
| | | <image wx:else="" class="downloadshiftin" src="/static/images/bibliographyList/email.png" mode="aspectFit" /> |
| | | <view |
| | | class="downloadIcon" |
| | | data-item="{{item}}" |
| | | data-key="showWithInput" |
| | | catch:tap="mailbox" |
| | | > |
| | | <image |
| | | wx:if="{{determine}}" |
| | | class="download" |
| | | src="/static/images/bibliographyList/email-click.png" |
| | | mode="aspectFit" |
| | | /> |
| | | <image |
| | | wx:else="" |
| | | class="downloadshiftin" |
| | | src="/static/images/bibliographyList/email.png" |
| | | mode="aspectFit" |
| | | /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | |
| | | <view wx:if="{{bookFairData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | <view wx:if="{{bookFairData.length <= 0 }}" class="noDataBox"> |
| | |
| | | </scroll-view> |
| | | </swiper-item> |
| | | <swiper-item> |
| | | <scroll-view scroll-y="{{true}}" class="scrollViewBox" bindscrolltolower="onScrollToLower"> |
| | | <scroll-view |
| | | scroll-y="{{true}}" |
| | | class="scrollViewBox" |
| | | bindscrolltolower="onScrollToLower" |
| | | > |
| | | <view class="outside"> |
| | | <view class="contentBox" wx:for="{{biblioClassificationData}}" wx:key="index" wx:for-item="item" wx:for-index="index" bindtap="onBookExhibitionDetails" data-item="{{item}}"> |
| | | <image class="bookFairImage" wx:if="{{item.icon}}" src="{{item.icon}}" mode="" /> |
| | | <image class="bookFairImage" wx:else="" src="/static/images/bookExhibitionList/banner.png" mode="" /> |
| | | <view |
| | | class="contentBox" |
| | | wx:for="{{biblioClassificationData}}" |
| | | wx:key="index" |
| | | wx:for-item="item" |
| | | wx:for-index="index" |
| | | bindtap="onBookExhibitionDetails" |
| | | data-item="{{item}}" |
| | | > |
| | | <image |
| | | class="bookFairImage" |
| | | wx:if="{{item.icon}}" |
| | | src="{{item.icon}}" |
| | | mode="" |
| | | /> |
| | | <image |
| | | class="bookFairImage" |
| | | wx:else="" |
| | | src="/static/images/bookExhibitionList/banner.png" |
| | | mode="" |
| | | /> |
| | | <view class="textBox" title="{{item.name}}"> |
| | | <text>{{item.subtitleName}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view wx:if="{{biblioClassificationData.length != 0}}" class="bottom-box"> |
| | | <t-loading theme="circular" size="40rpx" class="wrapper" wx:if="{{isMore == true}}" /> |
| | | <view |
| | | wx:if="{{biblioClassificationData.length != 0}}" |
| | | class="bottom-box" |
| | | > |
| | | <t-loading |
| | | theme="circular" |
| | | size="40rpx" |
| | | class="wrapper" |
| | | wx:if="{{isMore == true}}" |
| | | /> |
| | | <text wx:if="{{isMore == false}}">没有更多了</text> |
| | | </view> |
| | | <view wx:if="{{biblioClassificationData.length <= 0}}" class="noDataBox"> |
| | | <view |
| | | wx:if="{{biblioClassificationData.length <= 0}}" |
| | | class="noDataBox" |
| | | > |
| | | <!-- <t-empty icon="folder-open" description="暂无数据" /> --> |
| | | <empty /> |
| | | </view> |