From 366de5b4636679392a1e3d2984fc23bd5eaa5ac3 Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期二, 27 八月 2024 17:48:03 +0800 Subject: [PATCH] wenti --- packageBookService/pages/bookServices/list/index.wxml | 2 pages/digitalTextbooks/index.wxml | 2 pages/home/home.js | 60 +- pages/bookExhibitionList/index.js | 5 packageBookService/pages/components/webView/index.js | 13 services/home/home.js | 17 pages/digitalCourses/index.js | 21 pages/personalCenter/index.wxml | 28 + packageDomain/pages/publickBookForm/index.json | 12 packageDomain/pages/resourceDetails/myVideo/index.wxml | 4 packageBookService/pages/bookServices/detail/components/tree/index.js | 2 pages/personalCenter/index.wxss | 59 ++ packageBookService/pages/bookServices/list/index.js | 1 pages/bookServices/assort/index.wxml | 91 --- pages/home/home.wxml | 69 +- pages/personalCenter/index.js | 71 +++ pages/retrievalPage/index.js | 6 packageDomain/pages/publickBookForm/index.wxss | 84 +++ packageDomain/pages/publickBookForm/index.wxml | 103 ++++ pages/personalCenter/index.json | 1 pages/bookExhibitionList/index.wxss | 4 pages/bookExhibitionList/index.wxml | 1 packagePersonal/pages/publishBooks/index.wxss | 122 +++++ packagePersonal/pages/publishBooks/index.wxml | 72 +++ packageDomain/pages/publickBookForm/index.js | 313 +++++++++++++ pages/digitalCourses/index.wxml | 2 pages/home/home.skeleton.wxml | 2 pages/test/testCover.js | 2 app.json | 3 pages/cart/index.js | 1 packagePersonal/pages/publishBooks/index.json | 11 packagePersonal/pages/publishBooks/index.js | 143 +++++ pages/specialDiscussion/index.js | 2 assets/js/middleGround/api/app.js | 22 34 files changed, 1,166 insertions(+), 185 deletions(-) diff --git a/app.json b/app.json index 2bc31b4..f60ef29 100644 --- a/app.json +++ b/app.json @@ -37,7 +37,8 @@ "pages/resourceDetails/document/index", "pages/sampleBookList/index", "pages/sampleBookList/applicationForm/index", - "pages/teacherCertification/index" + "pages/teacherCertification/index", + "pages/publickBookForm/index" ], "plugins": { "t-video": { diff --git a/assets/js/middleGround/api/app.js b/assets/js/middleGround/api/app.js index 20baa26..0713760 100644 --- a/assets/js/middleGround/api/app.js +++ b/assets/js/middleGround/api/app.js @@ -25,11 +25,11 @@ data }); }, - + //浣跨敤鍑瘉 useTicket(data) { return request({ - url: "/app/api/ApiUseTicket", + url: "/app/api/ApiUseTicket", method: "post", data }); @@ -52,6 +52,22 @@ data }); }, + // 鏂板缓鐢ㄦ埛琛屼负 + creatUserBehavior(data) { + return request({ + url: '/app/api/NewUserBehavior', + method: 'post', + data + }) + }, + // 鑾峰彇鐢ㄦ埛琛屼负璁板綍 + getUserBehaviorList(data) { + return request({ + url: '/app/api/GetUserBehaviorList', + method: 'post', + data + }) + } }; -export default appApi; +export default appApi; \ No newline at end of file diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js index 981c95f..73c2b7a 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.js +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -169,7 +169,7 @@ item.learnSelectType == "audio" ) { url = "/packageDomain/pages/resourceDetails/myAudio/index"; - } else if (item.selectType == "picture" || item.selectType == "zip") { + } else if (item.selectType == "picture") { url = "/packageDomain/pages/resourceDetails/document/index"; } if ( diff --git a/packageBookService/pages/bookServices/list/index.js b/packageBookService/pages/bookServices/list/index.js index 280fb23..f5a8654 100644 --- a/packageBookService/pages/bookServices/list/index.js +++ b/packageBookService/pages/bookServices/list/index.js @@ -411,6 +411,7 @@ "||author*": this.data.searchValue, "||isbn*": this.data.searchValue, "||seriesName*": this.data.searchValue, + "||projectLeader*": this.data.searchValue }; } const query = { diff --git a/packageBookService/pages/bookServices/list/index.wxml b/packageBookService/pages/bookServices/list/index.wxml index 3363099..63d120f 100644 --- a/packageBookService/pages/bookServices/list/index.wxml +++ b/packageBookService/pages/bookServices/list/index.wxml @@ -9,7 +9,7 @@ <view> <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" /> </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="bookServices-list"> diff --git a/packageBookService/pages/components/webView/index.js b/packageBookService/pages/components/webView/index.js index 0db1d1a..bc293e5 100644 --- a/packageBookService/pages/components/webView/index.js +++ b/packageBookService/pages/components/webView/index.js @@ -21,6 +21,19 @@ */ onLoad(options) { console.log(options) + const token = wx.getStorageSync(app.config.tokenKey) + if (!token) { + loginInfo(app, (data) => { + // 濡傛灉涓嶆槸绗竴娆$櫥褰曪紝浼氭墽琛屽洖璋� + if (data) { + // 鐧诲綍鎴愬姛锛岃嚜鍔ㄨ褰晅oken鍜岀敤鎴蜂俊鎭紝骞惰繑鍥瀟rue + } else { + // 鍑虹幇閿欒锛岃繑鍥瀎alse + } + }) + } else { + // 濡傛灉鏄涓�娆$櫥褰曪紝浼氳烦杞嚦缁戝畾鐢ㄦ埛淇℃伅椤甸潰锛屽~鍐欏畬鐢ㄦ埛淇℃伅鍚庤繘琛岀櫥褰曞苟鍌ㄥ瓨token鍜岀敤鎴蜂俊鎭紝缁撴潫鍚庤烦杞洖褰撳墠椤甸潰锛堟惡甯﹂〉闈㈠弬鏁帮級 + } if (options && options.link) { this.setData({ src: decodeURIComponent(options.link), diff --git a/packageDomain/pages/publickBookForm/index.js b/packageDomain/pages/publickBookForm/index.js new file mode 100644 index 0000000..e0c1a1c --- /dev/null +++ b/packageDomain/pages/publickBookForm/index.js @@ -0,0 +1,313 @@ +// packageDomain/pages/publickBookForm/index.js +const app = getApp(); +import tool from "../../../assets/js/toolClass.js"; +import { + loginInfo +} from '../../../assets/js/login'; +Page({ + + /** + * 椤甸潰鐨勫垵濮嬫暟鎹� + */ + data: { + teacherInfo: { + topicName: '', //閫夐鍚嶇О + declarer: '', //鐢虫姤浜� + declarationUnit: '', //"鐢虫姤鍗曚綅" + disciplineMajor: '', //瀛︾涓撲笟 + authorBasicInformation: '', //"浣滆�呭熀鏈儏鍐� + phone: '', //鑱旂郴鐢佃瘽 + email: '', //鑱旂郴閭 + targetReaders: '', //璇昏�呭璞� + topicFeatures: '', //閫夐鐗硅壊 + topicImpactAndExpected: '', //閫夐瀛︽湳褰卞搷涓庨鏈熺ぞ浼氭晥鐩� + topicProgress: '', //閫夐鐨勮繘搴﹀畨鎺� + marketAnalysis: '', //甯傚満鍒嗘瀽 + marketingAndPromotionPlan: '', //钀ラ攢涓庡浼犳帹骞胯鍒� + digitalResourceDevelopmentPlan: '', //閰嶅鏁板瓧璧勬簮寮�鍙戞柟妗� + otherExistingIssues: '' //瀛樺湪鐨勫叾浠栭棶棰� + }, + worksInfo: [], + keyboardHeight: 0, + autosize: { + maxHeight: 120, + minHeight: 80, + }, + phoneError: false, + emailError: false, + loading: false + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 + */ + onLoad() { + const token = wx.getStorageSync(app.config.tokenKey) + if (!token) { + loginInfo(app, (data) => { + if (data) {} + }) + } else {} + this.getType() + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 + */ + onReady() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず + */ + onShow() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰闅愯棌 + */ + onHide() { + + }, + + /** + * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍗歌浇 + */ + onUnload() { + + }, + //鑾峰彇瀛楁 + getType() { + app.MG.resource.getCmsTypeByRefCode({ + refCodes: ['jsek_publicationApplication'] + }).then((res) => { + this.setData({ + worksInfo: res[0].cmsTypeLinks[0].children, + }) + }) + }, + onTopicNameInput(e) { + this.setData({ + "teacherInfo.topicName": e.detail.value, + }); + }, + onDeclarerInput(e) { + this.setData({ + "teacherInfo.declarer": e.detail.value, + }); + }, + ondeclarationUnitInput(e) { + this.setData({ + "teacherInfo.declarationUnit": e.detail.value, + }); + }, + onDisciplineMajorInput(e) { + this.setData({ + "teacherInfo.disciplineMajor": e.detail.value, + }); + }, + onAuthorBasicInfoInput(e) { + this.setData({ + "teacherInfo.authorBasicInformation": e.detail.value, + }); + }, + //杈撳叆鎵嬫満鍙� + onPhoneInput(e) { + const { + phoneError + } = this.data; + if (e.detail.value) { + const isPhoneNumber = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e.detail.value); + if (phoneError === isPhoneNumber) { + this.setData({ + phoneError: !isPhoneNumber, + "teacherInfo.phone": e.detail.value, + }); + } + } else { + this.setData({ + phoneError: false, + }); + } + }, + + onEmailInput(e) { + const { + emailError + } = this.data; + if (e.detail.value) { + const isPhoneNumber = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(e.detail.value); + if (emailError === isPhoneNumber) { + this.setData({ + emailError: !isPhoneNumber, + "teacherInfo.email": e.detail.value, + }); + } + } else { + this.setData({ + emailError: false, + }); + } + }, + onTargetReadersInput(e) { + this.setData({ + "teacherInfo.targetReaders": e.detail.value, + }); + }, + onTopicFeaturesInput(e) { + this.setData({ + "teacherInfo.topicFeatures": e.detail.value, + }); + }, + onTopicImpactAndExpectedInput(e) { + this.setData({ + "teacherInfo.topicImpactAndExpected": e.detail.value, + }); + }, + onTopicProgressInput(e) { + this.setData({ + "teacherInfo.topicProgress": e.detail.value, + }); + }, + onMarketAnalysisInput(e) { + this.setData({ + "teacherInfo.marketAnalysis": e.detail.value, + }); + }, + onMarketingAndPromotionPlanInput(e) { + this.setData({ + "teacherInfo.marketingAndPromotionPlan": e.detail.value, + }); + }, + ondigitalResourceInput(e) { + this.setData({ + "teacherInfo.digitalResourceDevelopmentPlan": e.detail.value, + }); + }, + onOtherExistingIssuesInput(e) { + this.setData({ + "teacherInfo.otherExistingIssues": e.detail.value, + }); + }, + + submit() { + let that = this; + if (!that.data.teacherInfo.topicName) { + wx.showToast({ + title: "璇峰~鍐欓�夐鍚嶇О锛�", + icon: 'none', + duration: 1000, + }) + return + } + if (!that.data.teacherInfo.declarer) { + wx.showToast({ + title: "璇峰~鍐欑敵鎶ヤ汉濮撳悕锛�", + icon: 'none', + duration: 1000, + }) + return + } + if (!that.data.teacherInfo.declarationUnit) { + wx.showToast({ + title: "璇峰~鍐欑敵鎶ュ崟浣嶏紒", + icon: 'none', + duration: 1000, + }) + return + } + if (!that.data.teacherInfo.disciplineMajor) { + wx.showToast({ + title: "璇峰~鍐欏绉戜笓涓氾紒", + icon: 'none', + duration: 1000, + }) + return + } + if (!that.data.teacherInfo.authorBasicInformation) { + wx.showToast({ + title: "璇峰~鍐欎綔鑰呭熀鏈儏鍐碉紒", + icon: 'none', + duration: 1000, + }) + return + } + if (!that.data.teacherInfo.phone) { + wx.showToast({ + title: "璇峰~鍐欒仈绯荤數璇濓紒", + icon: 'none', + duration: 1000, + }) + return + } + if (!that.data.teacherInfo.email) { + wx.showToast({ + title: "璇峰~鍐欒仈绯婚偖绠憋紒", + icon: 'none', + duration: 1000, + }) + return + } + if (!that.data.teacherInfo.targetReaders) { + wx.showToast({ + title: "璇峰~鍐欒鑰呭璞★紒", + icon: 'none', + duration: 1000, + }) + return + } + if (!that.data.teacherInfo.topicFeatures) { + wx.showToast({ + title: "璇峰~鍐欓�夐鐗硅壊锛�", + icon: 'none', + duration: 1000, + }) + return + } + that.setData({ + loading: true, + }); + const data = { + topicIdOrRefCode: 'bookApplication', + name: that.data.teacherInfo.topicName, + content: '', + state: 'WaitAudit', + type: 'bookApplication', + cmsTypeRefCode: 'jsek_publicationApplication', + newDataListRequest: tool.worksDataBytool(that.data.worksInfo, that.data.teacherInfo) + } + + let basicInfo = JSON.parse(JSON.stringify(that.data.teacherInfo)) + delete basicInfo.worksInfo + delete basicInfo.state + app.MG.ugc.newTopicMessage(data).then((res) => { + console.log(res) + if (res) { + wx.showToast({ + title: "鎻愪氦鎴愬姛锛佽绛夊緟鑱旂郴...", + icon: 'none', + duration: 1000, + }) + that.setData({ + loading: false, + "teacherInfo.topicName": '', + "teacherInfo.declarer": '', + "teacherInfo.declarationUnit": '', + "teacherInfo.disciplineMajor": '', + "teacherInfo.authorBasicInformation": '', + "teacherInfo.phone": '', + "teacherInfo.email": '', + "teacherInfo.targetReaders": '', + "teacherInfo.topicImpactAndExpected": '', + "teacherInfo.topicProgress": '', + "teacherInfo.marketAnalysis": '', + "teacherInfo.marketingAndPromotionPlan": '', + "teacherInfo.digitalResourceDevelopmentPlan": '', + "teacherInfo.otherExistingIssues": '', + }); + } + }) + } +}) \ No newline at end of file diff --git a/packageDomain/pages/publickBookForm/index.json b/packageDomain/pages/publickBookForm/index.json new file mode 100644 index 0000000..94a3e57 --- /dev/null +++ b/packageDomain/pages/publickBookForm/index.json @@ -0,0 +1,12 @@ +{ + "navigationBarTitleText": "鍑轰功鐢宠", + "usingComponents": { + "t-cell": "tdesign-miniprogram/cell/cell", + "t-picker": "tdesign-miniprogram/picker/picker", + "t-picker-item": "tdesign-miniprogram/picker-item/picker-item", + "t-input": "tdesign-miniprogram/input/input", + "t-textarea": "tdesign-miniprogram/textarea/textarea", + "t-icon": "tdesign-miniprogram/icon/icon", + "t-loading": "tdesign-miniprogram/loading/loading" + } +} \ No newline at end of file diff --git a/packageDomain/pages/publickBookForm/index.wxml b/packageDomain/pages/publickBookForm/index.wxml new file mode 100644 index 0000000..a24bfe5 --- /dev/null +++ b/packageDomain/pages/publickBookForm/index.wxml @@ -0,0 +1,103 @@ +<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="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" /> + </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" /> + </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" /> + </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" /> + </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" /> + </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 ? '鎵嬫満鍙疯緭鍏ヤ笉姝g‘' : ''}}" bindchange="onPhoneInput" /> + </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" /> + </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" /> + </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" /> + </view> + </view> + <view class="from-item"> + <view class="label"> <text class="empty"></text>閫夐瀛︽湳褰卞搷涓庨鏈熺ぞ浼氭晥鐩婏細 </view> + <view class="item-content"> + <t-textarea placeholder="閫夐瀛︽湳褰卞搷涓庨鏈熺ぞ浼氭晥鐩�" value="{{teacherInfo.topicImpactAndExpected}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTopicImpactAndExpectedInput" /> + </view> + </view> + <view class="from-item"> + <view class="label"> <text class="empty"></text>閫夐鐨勮繘搴﹀畨鎺掞細 </view> + <view class="item-content"> + <t-textarea placeholder="棰勮鏉ョ鏃堕棿銆佸嚭鐗堟椂闂寸瓑" value="{{teacherInfo.topicProgress}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onTopicProgressInput" /> + </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" /> + </view> + </view> + <view class="from-item"> + <view class="label"> <text class="empty"></text>钀ラ攢涓庡浼犳帹骞胯鍒�: </view> + <view class="item-content"> + <t-textarea placeholder="甯傚満闇�姹傘�佷笌鍚岀被涔︾殑宸紓鍜屼紭鍔裤�佸畾浠锋爣鍑嗐�侀璁¢攢閲忋�佺泩浜忓垎鏋愮瓑锛屾槸鍚︽湁鍑虹増璧勫姪璐�" value="{{teacherInfo.marketingAndPromotionPlan}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onMarketingAndPromotionPlanInput" /> + </view> + </view> + <view class="from-item"> + <view class="label"> <text class="empty"></text>閰嶅鏁板瓧璧勬簮寮�鍙戞柟妗�: </view> + <view class="item-content"> + <t-textarea placeholder="閰嶅鏁板瓧璧勬簮鍚嶇О銆佺被鍨嬨�佸唴瀹广�佺粡璐归绠椼�佹晥鐩婂垎鏋愮瓑" value="{{teacherInfo.digitalResourceDevelopmentPlan}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="ondigitalResourceInput" /> + </view> + </view> + <view class="from-item"> + <view class="label"> <text class="empty"></text>瀛樺湪鐨勫叾浠栭棶棰�: </view> + <view class="item-content"> + <t-textarea placeholder="璇疯緭鍏ュ叾浠栭棶棰�" value="{{teacherInfo.otherExistingIssues}}" disableDefaultPadding="{{true}}" autosize="{{autosize}}" bindchange="onOtherExistingIssuesInput" /> + </view> + </view> + <view class="btn-area"> + <button class="submit" bindtap="submit" loading="{{loading}}">鎻愪氦</button> + </view> + </view> + + </view> + </scroll-view> +</view> \ No newline at end of file diff --git a/packageDomain/pages/publickBookForm/index.wxss b/packageDomain/pages/publickBookForm/index.wxss new file mode 100644 index 0000000..dfa7c4c --- /dev/null +++ b/packageDomain/pages/publickBookForm/index.wxss @@ -0,0 +1,84 @@ +/* packageDomain/pages/publickBookForm/index.wxss */ +page { + background: #F2F3F8; +} + +.container { + width: 100vw; + height: 100vh; +} + +.content { + height: calc(100vh - env(safe-area-inset-bottom)); + box-sizing: border-box; +} + +.tips { + line-height: 24px; + font-size: 28rpx; + padding: 5px; + background: rgba(255, 108, 0, 0.1); + color: #ff6c00; + /* text-align: center; */ + margin: 0 auto 20rpx auto; +} + +.page-body { + font-size: 28rpx; +} + +.baseInfoBox { + background: #fff; + margin-top: 20rpx; + border-radius: 10rpx; + padding: 30rpx; +} + +.baseInfoBox .from-item { + margin-bottom: 20rpx; +} + +.baseInfoBox .from-item .label { + /* height: 68rpx; */ + line-height: 68rpx; +} + +.t-input__tips, +.from-item .label .icon { + color: #f56c6c !important; + margin-right: 5rpx; +} + +.empty { + /* padding: 0 10rpx; */ +} + +.t-input { + padding: 0 !important; +} + +.t-input__content, +.t-textarea { + border: 2rpx solid #D9D9D9 !important; + padding: 10rpx !important; +} + +.from-item .item-content { + width: 100%; +} + +.t-input__placeholder, +.t-textarea__placeholder { + font-size: 28rpx !important +} + +.t-input__wrap .t-input__content, +.t-input__control { + font-size: 28rpx !important; +} + +.submit { + background: #ff6c00; + color: #fff; + border-radius: 50rpx; +} \ No newline at end of file diff --git a/packageDomain/pages/resourceDetails/myVideo/index.wxml b/packageDomain/pages/resourceDetails/myVideo/index.wxml index 8b3c41a..15610a6 100644 --- a/packageDomain/pages/resourceDetails/myVideo/index.wxml +++ b/packageDomain/pages/resourceDetails/myVideo/index.wxml @@ -19,6 +19,7 @@ /> </view> <!-- <video show-center-play-btn="{{false}}" src="{{showData}}" bindloadedmetadata="loadedmetadata" bindtimeupdate="timeUpdate"></video> --> +<<<<<<< Updated upstream <t-video id="tvd" src="{{showData}}" @@ -26,6 +27,9 @@ bindvideoloaded="loadedmetadata" bindtimeupdate="timeUpdate" > +======= + <t-video id="tvd" src="{{showData}}" style="width:100%;" bindvideoloaded="loadedmetadata" bindtimeupdate="timeUpdate" wx:if="{{!videoLoaidng}}"> +>>>>>>> Stashed changes </t-video> </view> diff --git a/packagePersonal/pages/publishBooks/index.js b/packagePersonal/pages/publishBooks/index.js index 6057736..f5d2c07 100644 --- a/packagePersonal/pages/publishBooks/index.js +++ b/packagePersonal/pages/publishBooks/index.js @@ -1,11 +1,28 @@ -// pages/personalCenter/publishBooks/index.js +import moment from 'moment' +const app = getApp(); +import { + getTopicMsgCmsItemFile +} from '../../../assets/js/middleGround/tool.js' Page({ /** * 椤甸潰鐨勫垵濮嬫暟鎹� */ data: { - + list: [], + //鍒嗛〉 + page: 1, + limit: 10, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false, + // 杩斿洖椤堕儴 + isBackTop: false, + setScrollValue: 0, + skeletonLoding: true, + worksInfo: [], + info: {}, + visible: false }, /** @@ -13,8 +30,79 @@ */ onLoad(options) { console.log(options); + this.getType() }, - + getType() { + const data = { + refCodes: ['jsek_publicationApplication'] + } + app.MG.resource.getCmsTypeByRefCode(data).then((res) => { + this.setData({ + worksInfo: res[0].cmsTypeLinks[0].children, + }) + this.getDataList(false) + }) + }, + getDataList(isReachBottom) { + app.MG.ugc.getTopicMessageList({ + appRefCode: app.config.appRefCode, + topicIdOrRefCode: 'bookApplication', + start: this.data.page * this.data.limit - this.data.limit, + size: this.data.limit, + sort: { + type: "Desc", + field: "CreateDate" + } + }) + .then(res => { + try { + if (res.datas.length > 0) { + res.datas.forEach((item) => { + item.createDate = moment(item.createDate).format("YYYY-MM-DD"); + let info = getTopicMsgCmsItemFile(this.data.worksInfo, item.cmsItemDataList) + if (info) { + item.info = info + } + }); + let dataList = res.datas; + //瑙﹀簳鍔犺浇鏂版暟鎹苟淇濈暀鑰佹暟鎹� + if (isReachBottom) { + dataList = [...this.data.list, ...dataList] //灏嗘柊鏁版嵁鍔犲叆鑰佹暟鎹腑 + } + this.setData({ + list: dataList, + pageTotalCount: res.totalSize, + bottomLoading: false, + isMoreData: dataList.length > 0 ? false : true, + skeletonLoding: false, + }) + } else { + this.setData({ + skeletonLoding: false, + }) + } + } catch (error) { + console.log(error) + } + }) + }, + toList(itemData) { + let info = itemData.currentTarget.dataset.info; + this.setData({ + info: info.info, + visible: true + }) + }, + onVisibleChange(e) { + this.setData({ + visible: e.detail.visible, + }); + }, + onClose() { + this.setData({ + visible: false, + }); + }, /** * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚 */ @@ -47,16 +135,59 @@ * 椤甸潰鐩稿叧浜嬩欢澶勭悊鍑芥暟--鐩戝惉鐢ㄦ埛涓嬫媺鍔ㄤ綔 */ onPullDownRefresh() { - + if (this._freshing) return + this.setData({ + page: 1, + limit: 10, + pageTotalCount: 0, + bottomLoading: false, + isMoreData: false + }) + this._freshing = true; + this.setData({ + triggered: false, + }) + this.getDataList(false); + this._freshing = false }, /** * 椤甸潰涓婃媺瑙﹀簳浜嬩欢鐨勫鐞嗗嚱鏁� */ onReachBottom() { - + this.setData({ + bottomLoading: true, + isMoreData: false + }) + let bool = false; + if (this.data.pageTotalCount > this.data.list.length) { + bool = true; + this.setData({ + page: this.data.page + 1, + }) + } else { + setTimeout(() => { + this.setData({ + bottomLoading: false, + isMoreData: true + }) + }, 100) + return false; + } + this.getDataList(bool); }, - + // 鐩戝惉婊氬姩璺濈 + onPageScroll(e) { + if (e && e.scrollTop >= 1000) { + this.setData({ + isBackTop: true + }) + } else { + this.setData({ + isBackTop: false + }) + } + }, /** * 鐢ㄦ埛鐐瑰嚮鍙充笂瑙掑垎浜� */ diff --git a/packagePersonal/pages/publishBooks/index.json b/packagePersonal/pages/publishBooks/index.json index da878a8..dea1602 100644 --- a/packagePersonal/pages/publishBooks/index.json +++ b/packagePersonal/pages/publishBooks/index.json @@ -1,4 +1,13 @@ { "navigationBarTitleText": "鍑轰功鐢宠", - "usingComponents": {} + "usingComponents": { + "t-back-top": "tdesign-miniprogram/back-top/back-top", + "t-image": "tdesign-miniprogram/image/image", + "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh", + "t-loading": "tdesign-miniprogram/loading/loading", + "t-popup": "tdesign-miniprogram/popup/popup", + "t-icon": "tdesign-miniprogram/icon/icon", + "t-empty": "tdesign-miniprogram/empty/empty", + "empty": "/components/empty/index" + } } \ No newline at end of file diff --git a/packagePersonal/pages/publishBooks/index.wxml b/packagePersonal/pages/publishBooks/index.wxml index 0fb8c8b..3f17cff 100644 --- a/packagePersonal/pages/publishBooks/index.wxml +++ b/packagePersonal/pages/publishBooks/index.wxml @@ -1,2 +1,70 @@ -<!--pages/personalCenter/publishBooks/index.wxml--> -<text>pages/personalCenter/publishBooks/index.wxml</text> +<view class="container" wx:if="{{!skeletonLoding}}"> + <scroll-view class="scroll content" bind:scroll="onPageScroll" model:scroll-top="{{setScrollValue}}" scroll-y refresher-enabled="{{true}}" lower-threshold="{{200}}" refresher-threshold="{{80}}" refresher-default-style="none" refresher-triggered="{{triggered}}" bindrefresherpulling="{{refresh.onPulling}}" bindrefresherrefresh="onPullDownRefresh" bindscrolltolower="onReachBottom"> + <view slot="refresher" class="refresh-container"> + <view class="loading"> + <t-loading theme="circular" size="40rpx" text="姝e湪鍒锋柊..." class="wrapper" /> + </view> + </view> + + <view class="pageInfo" wx:if="{{list.length > 0 && !skeletonLoding}}"> + <view class="pageTotalCount">鍏眥{pageTotalCount}}鏉¤褰�</view> + <view class="content-item" wx:for="{{list}}" wx:for-item="item" wx:for-index="index" wx:key="index"> + <view class="item-con" data-info="{{item}}" bindtap="toList"> + <view class="titleBox"> + <view class="item-title">{{item.name}}</view> + </view> + <view class="createDate">{{item.createDate}}</view> + </view> + </view> + </view> + <view wx:if="{{list.length == 0 && !skeletonLoding}}" class="empyt"> + <empty /> + </view> + <view class="bottom-loading" wx:if="{{bottomLoading}}"> + <t-loading theme="circular" size="40rpx" text="鍔犺浇涓�..." class="wrapper" /> + </view> + <view class="bottom-loading" style="color: #ccc;font-size: 28rpx;" wx:if="{{isMoreData}}"> + <text>娌℃湁鏇村浜�</text> + </view> + </scroll-view> + <t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="center"> + <view class="block"> + <scroll-view class="srcolbox" scroll-y scroll-height-animation="true"> + <view class="block-content"> + <view class="label">閫夐鍚嶇О:</view> + <view class="infoCon">{{info.topicName}}</view> + <view class="label">鐢虫姤浜�:</view> + <view class="infoCon">{{info.declarer}}</view> + <view class="label">鐢虫姤鍗曚綅:</view> + <view class="infoCon">{{info.declarationUnit}}</view> + <view class="label">瀛︾涓撲笟:</view> + <view class="infoCon">{{info.disciplineMajor}}</view> + <view class="label">浣滆�呭熀鏈儏鍐�:</view> + <view class="infoCon">{{info.authorBasicInformation}}</view> + <view class="label">鑱旂郴鐢佃瘽:</view> + <view class="infoCon">{{info.phone}}</view> + <view class="label">閭:</view> + <view class="infoCon">{{info.email}}</view> + <view class="label">璇昏�呭璞�:</view> + <view class="infoCon">{{info.targetReaders}}</view> + <view class="label">閫夐鐗硅壊:</view> + <view class="infoCon">{{info.topicFeatures}}</view> + <view class="label">閫夐瀛︽湳褰卞搷涓庨鏈熺ぞ浼氭晥鐩�:</view> + <view class="infoCon">{{info.topicImpactAndExpected || '-'}}</view> + <view class="label">閫夐鐨勮繘搴﹀畨鎺�:</view> + <view class="infoCon">{{info.topicProgress || '-'}}</view> + <view class="label">甯傚満鍒嗘瀽:</view> + <view class="infoCon">{{info.marketAnalysis || '-'}}</view> + <view class="label">钀ラ攢涓庡浼犳帹骞胯鍒�:</view> + <view class="infoCon">{{info.marketingAndPromotionPlan || '-'}}</view> + <view class="label">閰嶅鏁板瓧璧勬簮寮�鍙戞柟妗�:</view> + <view class="infoCon">{{info.digitalResourceDevelopmentPlan|| '-'}}</view> + <view class="label">瀛樺湪鐨勫叾浠栭棶棰�:</view> + <view class="infoCon">{{info.otherExistingIssues || '-'}}</view> + </view> + </scroll-view> + <t-icon t-class="close-btn" name="close-circle" size="64rpx" color="#fff" bind:tap="onClose" /> + </view> + </t-popup> + <t-back-top theme="round" wx:if="{{isBackTop}}" text="椤堕儴" bind:to-top="onToTop"></t-back-top> +</view> \ No newline at end of file diff --git a/packagePersonal/pages/publishBooks/index.wxss b/packagePersonal/pages/publishBooks/index.wxss index a9a43b0..5fc4769 100644 --- a/packagePersonal/pages/publishBooks/index.wxss +++ b/packagePersonal/pages/publishBooks/index.wxss @@ -1 +1,121 @@ -/* pages/personalCenter/publishBooks/index.wxss */ \ No newline at end of file +.container { + width: 100vw; + height: 100vh; + background: #F2F3F8; +} + +.content { + height: calc(100vh - env(safe-area-inset-bottom)); + box-sizing: border-box; +} + +.pageInfo { + padding: 40rpx 20rpx; +} + +.pageTotalCount { + font-size: 28rpx; +} + +.content-item { + padding: 20rpx 0; + background: #fff; + border-radius: 10rpx; + margin: 30rpx 0; +} + +.content-item .icon { + width: 58rpx; + height: 58rpx; +} + +.content-item .icon .img { + width: 100%; + height: 100%; +} + +.item-con { + margin-left: 30rpx; +} + +.titleBox .item-title { + font-weight: bold; + flex: 1; + height: 40rpx; + line-height: 40rpx; + display: -webkit-box; + margin-top: 20rpx; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; + text-overflow: ellipsis; +} + +.createDate { + font-size: 24rpx; + margin: 20rpx 0; +} + +.description { + font-size: 24rpx; + height: 80rpx; + line-height: 40rpx; + display: -webkit-box; + margin-top: 20rpx; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: ellipsis; +} + +.refresh-container { + margin: 0 auto; +} + +.bottom-loading, +.loading { + padding: 20rpx; + text-align: center; +} + +.body-loading { + padding: 200rpx 0; + text-align: center; +} + +.block { + position: relative; + width: 90vw; + height: 80vh; + background: var(--td-bg-color-container); + border-radius: 16rpx; +} + +.srcolbox { + width: 100%; + height: 78vh; + white-space: nowrap; + +} + +.block-content { + padding: 20rpx; +} + +.label { + font-weight: bold; + font-size: 28rpx; +} + +.infoCon { + padding: 10rpx 0; + font-size: 28rpx; + color: #666; +} + +.close-btn { + position: absolute; + left: 50%; + margin-left: -32rpx; + bottom: calc(-1 * (48rpx + 64rpx)); +} \ No newline at end of file diff --git a/pages/bookExhibitionList/index.js b/pages/bookExhibitionList/index.js index 29e5a9a..1fbd64b 100644 --- a/pages/bookExhibitionList/index.js +++ b/pages/bookExhibitionList/index.js @@ -69,11 +69,11 @@ }, { value: "timeAsc", - label: "鍑虹増鏃堕棿姝e簭", + label: "鍒涘缓鏃堕棿姝e簭", }, { value: "timeDesc", - label: "鍑虹増鏃堕棿鍊掑簭", + label: "鍒涘缓鏃堕棿鍊掑簭", }, ], }, @@ -420,7 +420,6 @@ this.setData({ "product.value": e.detail.value, }); - this.bookExhibitionGet(); }, onOpend() {}, diff --git a/pages/bookExhibitionList/index.wxml b/pages/bookExhibitionList/index.wxml index a3122ec..11390fa 100644 --- a/pages/bookExhibitionList/index.wxml +++ b/pages/bookExhibitionList/index.wxml @@ -24,7 +24,6 @@ <view class="menuBox"> <t-dropdown-menu> <t-dropdown-item options="{{product.options}}" default-value="{{product.value}}" bindchange="onChange" /> - <!-- disabled="{{keynoteDisabled}}" --> <t-dropdown-item label=" 閲嶇偣椤圭洰" disabled="{{disbaleProject}}" options="{{multipleSelect.options}}" bindchange="handleMultipleSelect" multiple bind:confirm="handleConfirm" bind:reset="handleReset" value="{{multipleSelect.value}}"> </t-dropdown-item> diff --git a/pages/bookExhibitionList/index.wxss b/pages/bookExhibitionList/index.wxss index a2a4f4d..82ef507 100644 --- a/pages/bookExhibitionList/index.wxss +++ b/pages/bookExhibitionList/index.wxss @@ -149,7 +149,7 @@ .assembleContent { background-color: #F2F3F8; min-height: 90vh; - margin-top: 240rpx; + margin-top: 268rpx; } .t-dropdown-menu:after, @@ -251,7 +251,7 @@ position: fixed; top: 0px; background-color: #fff; - height: 120px; + height: 268rpx; z-index: 999; } diff --git a/pages/bookServices/assort/index.wxml b/pages/bookServices/assort/index.wxml index bc3191a..05991e3 100644 --- a/pages/bookServices/assort/index.wxml +++ b/pages/bookServices/assort/index.wxml @@ -6,21 +6,8 @@ <view class="page-header"> <!-- 鎼滅储妗� --> <view class="search"> - <t-search - t-class-input="t-search__input" - t-class-input-container="t-search__input-container" - placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" - leftIcon="" - bind:submit="navToSearchPage" - placeholder-style="{{placeholderstyle}}" - > - <t-icon - slot="left-icon" - prefix="wr" - name="search" - size="40rpx" - color="#bbb" - /> + <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��/椤圭洰璐熻矗浜�" leftIcon="" bind:submit="navToSearchPage" placeholder-style="{{placeholderstyle}}"> + <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" /> </t-search> </view> </view> @@ -29,13 +16,7 @@ <view class="side-bar-wrapper" wx:if="{{!loading}}"> <view class="tab-left"> <t-side-bar value="{{assortCheck.code}}" bind:change="changeAssort"> - <t-side-bar-item - wx:for="{{assortList}}" - wx:key="id" - value="{{item.refCode}}" - label="{{item.name}}" - badge-props="{{item.badgeProps}}" - /> + <t-side-bar-item wx:for="{{assortList}}" wx:key="id" value="{{item.refCode}}" label="{{item.name}}" badge-props="{{item.badgeProps}}" /> </t-side-bar> </view> <view class="page-right"> @@ -44,76 +25,30 @@ <!-- 涓�绾у垎绫� --> <view class="tab-top"> <view class="myScroll"> - <view - wx:for="{{startList}}" - wx:key="id" - class="row {{startCheck.id == item.id ? 'tab-active' : ''}}" - bind:tap="tabClick" - data-tabData="{{item}}" - >{{item.name}}</view - > + <view wx:for="{{startList}}" wx:key="id" class="row {{startCheck.id == item.id ? 'tab-active' : ''}}" bind:tap="tabClick" data-tabData="{{item}}">{{item.name}}</view> </view> </view> <!-- 鍐呭 --> - <scroll-view - scroll-y="{{true}}" - class="class-list" - scroll-into-view="{{ 'list' + startCheck.id}}" - > - <view - wx:for="{{startList}}" - wx:for-item="item" - wx:key="id" - id="{{ 'list' + item.id}}" - class="class-box" - wx:if="{{!stairListLoading}}" - > + <scroll-view scroll-y="{{true}}" class="class-list" scroll-into-view="{{ 'list' + startCheck.id}}"> + <view wx:for="{{startList}}" wx:for-item="item" wx:key="id" id="{{ 'list' + item.id}}" class="class-box" wx:if="{{!stairListLoading}}"> <view class="class-name">{{item.name}}</view> <view class="class-content"> - <view - wx:for="{{item.children}}" - wx:for-item="citem" - wx:key="id" - class="book-box" - bind:tap="goPageList" - data-stair="{{citem}}" - data-tabData="{{item}}" - wx:if="{{item.children.length}}" - > + <view wx:for="{{item.children}}" wx:for-item="citem" wx:key="id" class="book-box" bind:tap="goPageList" data-stair="{{citem}}" data-tabData="{{item}}" wx:if="{{item.children.length}}"> <view class="assort-img"> - <image - src="{{citem.icon ? citem.icon : '/static/images/default-book-img.png'}}" - mode="aspectFit" - /> + <image src="{{citem.icon ? citem.icon : '/static/images/default-book-img.png'}}" mode="aspectFit" /> </view> <view class="classify">{{citem.name}}</view> </view> - <view - wx:if="{{!item.children.length}}" - class="book-box" - bind:tap="goPageList" - data-tabData="{{item}}" - > + <view wx:if="{{!item.children.length}}" class="book-box" bind:tap="goPageList" data-tabData="{{item}}"> <view class="assort-img"> - <image - src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" - mode="aspectFit" - /> + <image src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" mode="aspectFit" /> </view> <text class="classify">鍏ㄩ儴</text> </view> </view> </view> - <view - wx:if="{{stairListLoading}}" - style="width: 100%; height: min-content" - > - <t-skeleton - row-col="{{rowCol}}" - theme="paragraph" - animation="gradient" - loading="{{stairListLoading}}" - ></t-skeleton> + <view wx:if="{{stairListLoading}}" style="width: 100%; height: min-content"> + <t-skeleton row-col="{{rowCol}}" theme="paragraph" animation="gradient" loading="{{stairListLoading}}"></t-skeleton> </view> <view class="bottom-box"> </view> </scroll-view> @@ -140,4 +75,4 @@ /> </view> --> </view> -</page-meta> +</page-meta> \ No newline at end of file diff --git a/pages/cart/index.js b/pages/cart/index.js index 61b7040..ff80efe 100644 --- a/pages/cart/index.js +++ b/pages/cart/index.js @@ -1,5 +1,4 @@ const app = getApp(); -// import { getPublicImage } from '@/assets/js/middleGround/tool.js' import { loginInfo } from '../../assets/js/login'; diff --git a/pages/digitalCourses/index.js b/pages/digitalCourses/index.js index f4ea7cc..f80d993 100644 --- a/pages/digitalCourses/index.js +++ b/pages/digitalCourses/index.js @@ -17,6 +17,7 @@ tabList: [], courseList: [], searchValue: '', + active: 0, activeItem: null, loading: false, shoppingCartGetId: [] @@ -34,6 +35,11 @@ barHeight: systInfo.statusBarHeight, navBarHeight: navBarHeight, }); + if (options.courseTypeActive) { + this.setData({ + active: JSON.parse(options.courseTypeActive), + }); + } this.getCourseTypeListList() this.getShoppingCartList() }, @@ -96,7 +102,6 @@ wx.navigateBack(); }, getCourseTypeListList() { - this.setData({ loading: true }) @@ -119,15 +124,19 @@ app.MG.store.getStoreChannelList(data).then((res) => { // 鍘婚櫎鏁扮粍鏈�鍚庝竴涓厓绱� const newData = res.datas.slice(0, res.datas.length - 1) - - - this.setData({ tabList: newData, - activeItem: newData[0], loading: false }) - this.getCourseList(newData[0]) + if (this.data.active) { + this.getCourseList(newData[this.data.active]) + } else { + this.setData({ + activeItem: newData[0], + }) + this.getCourseList(newData[0]) + } + }) }, diff --git a/pages/digitalCourses/index.wxml b/pages/digitalCourses/index.wxml index 54a25ce..1977666 100644 --- a/pages/digitalCourses/index.wxml +++ b/pages/digitalCourses/index.wxml @@ -8,7 +8,7 @@ </view> <t-search model:value="{{searchValue}}" shape="round" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" class="navBar-search" style="width: 464rpx" bind:submit="searchBook" /> </view> - <t-tabs defaultValue="{{0}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel"> + <t-tabs defaultValue="{{active}}" bind:change="onTabsChange" t-class="custom-tabs" t-class-content="custom-panel"> <t-tab-panel wx:for="{{tabList}}" wx:key="index" wx:for-item="item" wx:for-index="index" label="{{item.name}}" value="{{index}}"> <view class="contentBox"> <view class="titleBox"> diff --git a/pages/digitalTextbooks/index.wxml b/pages/digitalTextbooks/index.wxml index 3491df1..5d0f106 100644 --- a/pages/digitalTextbooks/index.wxml +++ b/pages/digitalTextbooks/index.wxml @@ -18,7 +18,7 @@ <view class="frameBox"></view> <view class="titleTextBox"> <!-- <image src="/static/images/digitalCourses/zhuantitaolun@2x.png" mode="aspectFit" /> --> - <view>鏁板瓧璇剧▼鍒楄〃</view> + <view>鏁板瓧鏁欐潗鍒楄〃</view> </view> </view> diff --git a/pages/home/home.js b/pages/home/home.js index 7df68cf..b6977fe 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -27,6 +27,7 @@ activeItem: 0, //绮鹃�夎绋嬮粯璁ら�変腑 courseTypeList: [], //绮鹃�夎绋嬪垎绫� courseList: [], + courseTypeActive: [], bookTypeList: [], //鍥句功绫诲瀷 activeItem1: 0, bookTypeData: {}, @@ -73,7 +74,7 @@ } else { // 濡傛灉鏄涓�娆$櫥褰曪紝浼氳烦杞嚦缁戝畾鐢ㄦ埛淇℃伅椤甸潰锛屽~鍐欏畬鐢ㄦ埛淇℃伅鍚庤繘琛岀櫥褰曞苟鍌ㄥ瓨token鍜岀敤鎴蜂俊鎭紝缁撴潫鍚庤烦杞洖褰撳墠椤甸潰锛堟惡甯﹂〉闈㈠弬鏁帮級 } - + this.registe() this.init(); }, onReachBottom() {}, @@ -98,6 +99,12 @@ 'baseRefresh.value': false, }) }, 500); + }, + + registe() { + app.MG.app.creatUserBehavior({ + refCode: "sign" + }).then(res => {}); }, getBannerList() { @@ -271,7 +278,8 @@ tabChangeHandle(item) { let info = this.data.courseTypeList[item.detail.value] this.setData({ - courseList: [] + courseList: [], + courseTypeActive: item.detail.value }) this.getCourseList(info) }, @@ -438,24 +446,19 @@ }); }, goSubjectDetail(e) { - const { - book - } = e.currentTarget.dataset; - wx.showToast({ - title: "寤鸿涓�", - icon: 'none', - duration: 1000 - }) + const item = e.currentTarget.dataset.book + console.log(item); + wx.navigateTo({ + url: '/pages/specialDiscussion/webView/index?link=' + item.jsek_link + }); }, goCourseDetail(e) { const { book } = e.currentTarget.dataset; - wx.showToast({ - title: "寤鸿涓�", - icon: 'none', - duration: 1000 - }) + wx.navigateTo({ + url: '/pages/digitalCourses/digitalCoursesDetails/index?id=' + book.id, + }); }, goReadBookDetail(e) { const { @@ -469,11 +472,9 @@ const { book } = e.currentTarget.dataset; - wx.showToast({ - title: "寤鸿涓�", - icon: 'none', - duration: 1000 - }) + wx.navigateTo({ + url: '/pages/digitalTextbooks/digitalTextbooksDetails/index?id=' + book.id, + }); }, @@ -498,12 +499,6 @@ const { info } = e.currentTarget.dataset; - wx.showToast({ - title: "寤鸿涓�", - icon: 'none', - duration: 1000 - }) - return; if (wx.getStorageSync(app.config.tokenKey)) { let query = { start: 0, @@ -581,6 +576,19 @@ wx.navigateTo({ url: '/pages/home/digitalRead/index' }) + } else if (type == "zhuantitaolun") { + wx.navigateTo({ + url: '/pages/specialDiscussion/index' + }) + + } else if (type == "jingxuankecheng") { + wx.navigateTo({ + url: '/pages/digitalCourses/index?courseTypeActive=' + this.data.courseTypeActive + }) + } else if (type == "shuzijiaocai") { + wx.navigateTo({ + url: '/pages/digitalTextbooks/index' + }) } else { wx.showToast({ title: "寤鸿涓�", diff --git a/pages/home/home.skeleton.wxml b/pages/home/home.skeleton.wxml index 81a4f9f..fc56df3 100644 --- a/pages/home/home.skeleton.wxml +++ b/pages/home/home.skeleton.wxml @@ -135,7 +135,7 @@ </view> <view class="t-grid-item__words item--t-grid-item__words t-grid-item__words--vertical item--t-grid-item__words--vertical" id="b8219551--t_grid_item_24"> <view class="t-grid-item__text item--t-grid-item__text t-grid-item__text--small item--t-grid-item__text--small t-grid-item__text--vertical item--t-grid-item__text--vertical sk-transparent sk-text-22-7273-927 sk-text" style="background-position-x: 50%;"> - 涓撻璁ㄨ + 涓撻娲诲姩 </view> </view> </view> diff --git a/pages/home/home.wxml b/pages/home/home.wxml index b8cc110..ab41099 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -9,7 +9,7 @@ </view> <view class="search"> <image class="icon" src="/static/images/home/nav_icon_scan.png" bindtap="onIconScanTap" /> - <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��" leftIcon="" bind:submit="onRetrievalPage" model:value="{{searchVal}}"> + <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" placeholder="璇疯緭鍏ュ叧閿瘝/涔﹀悕/ISBN/浣滆��/椤圭洰璐熻矗浜�" leftIcon="" bind:submit="onRetrievalPage" model:value="{{searchVal}}"> <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" bind:tap="navToSearchPage" /> </t-search> </view> @@ -62,6 +62,39 @@ </view> <view class="tabCardPublic iconTwo"> <view class="icon"> + <image src="/static/images/home/tushufuwu2.png" mode="aspectFit" class="iconImage" /> + </view> + <view data-info="{{'tushufuwu'}}" bindtap="onMoreGuide" class="flex"> + <text class="more">鏇村</text> + <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> + </view> + </view> + <view class="home-page-tabs"> + <t-tabs t-class="t-tabs" split="{{false}}" position="{{'home'}}" defaultValue="{{activeItem1}}" bind:change="tabBookClick"> + <t-tab-panel wx:for="{{bookTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" /> + </t-tabs> + </view> + <view class="listBox2"> + <view wx:if="{{booksList.length > 0}}" class="flex"> + <view wx:for="{{booksList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox"> + <view class="listItem" bind:tap="goDetail" data-book="{{item}}"> + <view class="specialSubject-img"> + <image src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" mode="aspectFit" class="img" aria-label="{{item.name}}" /> + </view> + <view class="body-info"> + <view class="name">{{item.name}}</view> + <view class="author">{{item.author}}</view> + </view> + </view> + </view> + </view> + <view class="empyt" wx:else> + <!-- <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> --> + <empty /> + </view> + </view> + <view class="tabCardPublic iconTwo"> + <view class="icon"> <image src="/static/images/home/jingxuankecheng2.png" mode="aspectFit" class="iconImage" /> </view> <view data-info="{{'jingxuankecheng'}}" bindtap="onMoreGuide" class="flex"> @@ -101,39 +134,7 @@ <empty /> </view> </view> - <view class="tabCardPublic iconTwo"> - <view class="icon"> - <image src="/static/images/home/tushufuwu2.png" mode="aspectFit" class="iconImage" /> - </view> - <view data-info="{{'tushufuwu'}}" bindtap="onMoreGuide" class="flex"> - <text class="more">鏇村</text> - <t-icon name="chevron-right" size="32rpx" color="#ff6d00" /> - </view> - </view> - <view class="home-page-tabs"> - <t-tabs t-class="t-tabs" split="{{false}}" position="{{'home'}}" defaultValue="{{activeItem1}}" bind:change="tabBookClick"> - <t-tab-panel wx:for="{{bookTypeList}}" wx:for-index="index" wx:key="index" label="{{item.name}}" value="{{index}}" /> - </t-tabs> - </view> - <view class="listBox2"> - <view wx:if="{{booksList.length > 0}}" class="flex"> - <view wx:for="{{booksList}}" wx:for-item="item" wx:for-index="index" wx:key="index" class="booksListItemBox"> - <view class="listItem" bind:tap="goDetail" data-book="{{item}}"> - <view class="specialSubject-img"> - <image src="{{item.icon ? item.icon : '/static/images/default-book-img.png'}}" mode="aspectFit" class="img" aria-label="{{item.name}}" /> - </view> - <view class="body-info"> - <view class="name">{{item.name}}</view> - <view class="author">{{item.author}}</view> - </view> - </view> - </view> - </view> - <view class="empyt" wx:else> - <!-- <t-empty icon="folder-open" description="鏆傛棤鏁版嵁" font-size="80" /> --> - <empty /> - </view> - </view> + <view class="tabCardPublic iconTwo"> <view class="icon"> <image src="/static/images/home/shuziyuedu2.png" mode="aspectFit" class="iconImage" /> diff --git a/pages/personalCenter/index.js b/pages/personalCenter/index.js index b1c172f..930b345 100644 --- a/pages/personalCenter/index.js +++ b/pages/personalCenter/index.js @@ -1,4 +1,5 @@ const app = getApp(); +import moment from 'moment' import { loginInfo } from '../../assets/js/login'; @@ -47,7 +48,7 @@ { title: '鍑轰功鐢宠', icon: '/static/images/personal/chushu.png', - url: '', + url: '/packagePersonal/pages/publishBooks/index', type: 'publishBooks', } ]; @@ -124,6 +125,8 @@ size: '10rpx', }, scrollTop: 0, + visibleIntegral: false, + recordList: [] }, /** * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 @@ -153,6 +156,7 @@ currAuthStep: 2, }); this.getUserInfo() + this.getIntegral() } }) } else { @@ -160,6 +164,7 @@ currAuthStep: 3, }); this.getUserInfo() + this.getIntegral() } }, /** @@ -170,6 +175,7 @@ 'baseRefresh.value': true, }) this.getUserInfo() + this.getIntegral() wx.stopPullDownRefresh() }, /** @@ -331,6 +337,69 @@ }); }, + getIntegral() { + app.MG.store + .getUserWallet({ + type: 'integral' + }) + .then((res) => { + this.setData({ + integral: res.balance, + }); + }) + }, + getIntegralList() { + app.MG.store + .getWalletHistory({ + Size: 999, + Start: 0, + sort: { + type: 'Desc', + field: 'CreateDate' + }, + type: 'integral' + }) + .then((res) => { + if (res.datas.length > 0) { + res.datas.forEach((element) => { + element.createDate = moment(element.createDate).format('YYYY-MM-DD HH:mm:ss') + if (element.refType == 'sign') { + element.type = '姣忔棩鐧诲綍' + } + if (element.refType == 'Reward') { + element.type = '涓婁紶璧勬簮濂栧姳' + } + if (element.refType == 'OrderCoinBonus') { + element.type = '璁㈠崟鏀粯濂栧姳' + } + if (element.refType == 'Order' && element.value < 0) { + element.type = '璁㈠崟鏀粯鎶垫墸' + } + if (element.refType == 'Order' && element.value > 0) { + element.type = '璁㈠崟鍙栨秷閫�鍥�' + } + if (element.refType == 'AdminRecharge') { + element.type = '绠$悊鍛樺厖鍊�' + } + }) + this.setData({ + recordList: res.datas, + visibleIntegral: true + }); + } + }) + }, + onVisibleIntegralChange(e) { + this.setData({ + visibleIntegral: e.detail.visible, + }); + }, + onClose() { + this.setData({ + visibleIntegral: false, + }); + }, + //鐐瑰嚮鐩綍 toPages(item) { let info = item.currentTarget.dataset.info diff --git a/pages/personalCenter/index.json b/pages/personalCenter/index.json index 928aea5..bb7d0ea 100644 --- a/pages/personalCenter/index.json +++ b/pages/personalCenter/index.json @@ -5,6 +5,7 @@ "t-user-center-card": "./components/user-center-card/index", "t-image": "tdesign-miniprogram/image/image", "t-popup": "tdesign-miniprogram/popup/popup", + "t-icon": "tdesign-miniprogram/icon/icon", "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh" }, "enablePullDownRefresh": false diff --git a/pages/personalCenter/index.wxml b/pages/personalCenter/index.wxml index 619f080..29395d8 100644 --- a/pages/personalCenter/index.wxml +++ b/pages/personalCenter/index.wxml @@ -24,7 +24,7 @@ </view> </view> <view class="line"></view> - <view> + <view bindtap="getIntegralList"> <view>{{integral}}</view> <view class="title">绉垎</view> </view> @@ -86,6 +86,32 @@ </view> </view> </t-popup> + <t-popup visible="{{visibleIntegral}}" bind:visible-change="onVisibleIntegralChange" placement="center"> + <view class="blockIntegral"> + <scroll-view class="srcolbox" scroll-y scroll-height-animation="true"> + <view class="block-content"> + <view class="tableHeader"> + <view class="lable">绫诲瀷</view> + <view class="value">鏁伴噺</view> + <view class="createDate">鏃堕棿</view> + </view> + <view class="content-item" wx:for="{{recordList}}" wx:for-item="item" wx:for-index="index" wx:key="index"> + <view class="lable">{{item.type}}</view> + <view class="value yes" wx:if="item.value > 0">{{'+' + item.value}}</view> + <view class="value no" wx:else>{{item.value}}</view> + <view class="createDate">{{item.createDate ? item.createDate : '-'}}</view> + </view> + <view class="content-item"> + <view class="lable">鎬昏</view> + <view class="value totle">{{integral}}</view> + <view class="createDate"></view> + </view> + </view> + </scroll-view> + <t-icon t-class="close-btn" name="close-circle" size="64rpx" color="#fff" bind:tap="onClose" /> + </view> + </t-popup> + </view> </t-pull-down-refresh> </view> \ No newline at end of file diff --git a/pages/personalCenter/index.wxss b/pages/personalCenter/index.wxss index 0b00d20..cbd2c65 100644 --- a/pages/personalCenter/index.wxss +++ b/pages/personalCenter/index.wxss @@ -210,4 +210,63 @@ background: #ff6c00; color: #fff; border-radius: 50rpx; +} + +.blockIntegral { + position: relative; + width: 90vw; + height: 70vh; + background: var(--td-bg-color-container); + border-radius: 16rpx; +} + +.srcolbox { + width: 100%; + height: 70vh; + white-space: nowrap; +} + +.block-content { + padding: 20rpx; + font-size: 28rpx; + color: #606266 +} + +.tableHeader { + display: flex; + background-color: #f3f3f3; + line-height: 48rpx; + padding: 10rpx; + border-bottom: 1px solid #f4f4f4; +} + +.blockIntegral .content-item { + display: flex; + line-height: 48rpx; + padding: 10rpx; + border-bottom: 2rpx solid #f4f4f4; +} + +.blockIntegral .lable { + width: 260rpx; +} + +.blockIntegral .value { + width: 100rpx; +} + +.blockIntegral .totle { + font-weight: bold; + +} + +.blockIntegral .createDate { + flex: 1; +} + +.close-btn { + position: absolute; + left: 50%; + margin-left: -32rpx; + bottom: calc(-1 * (48rpx + 64rpx)); } \ No newline at end of file diff --git a/pages/retrievalPage/index.js b/pages/retrievalPage/index.js index 3b5f105..88055e3 100644 --- a/pages/retrievalPage/index.js +++ b/pages/retrievalPage/index.js @@ -193,7 +193,8 @@ 'Name*': this.data.searchVal.trim(), '||author*': this.data.searchVal.trim(), '||isbn*': this.data.searchVal.trim(), - '||seriesName*': this.data.searchVal.trim() + '||seriesName*': this.data.searchVal.trim(), + '||projectLeader*': this.data.searchVal.trim() } } @@ -235,7 +236,8 @@ 'Name*': this.data.searchVal.trim(), '||author*': this.data.searchVal.trim(), '||isbn*': this.data.searchVal.trim(), - '||seriesName*': this.data.searchVal.trim() + '||seriesName*': this.data.searchVal.trim(), + '||projectLeader*': this.data.searchVal.trim() } } //璇剧▼ diff --git a/pages/specialDiscussion/index.js b/pages/specialDiscussion/index.js index 40429ee..b357128 100644 --- a/pages/specialDiscussion/index.js +++ b/pages/specialDiscussion/index.js @@ -276,8 +276,6 @@ console.log(this.data.searchValue); this.ceShiList() this.specialDiscussionGet(this.data.batList[this.data.batListValue]) - - }, }) \ No newline at end of file diff --git a/pages/test/testCover.js b/pages/test/testCover.js index c62708e..2f26e04 100644 --- a/pages/test/testCover.js +++ b/pages/test/testCover.js @@ -96,7 +96,7 @@ wx.redirectTo({ url: `/packageBookService/pages/bookServices/examination/examination?bookId=${ this.data.bookId - }&productLinkPath=${this.data.productLinkPath}& =${ + }&productLinkPath=${this.data.productLinkPath}&rootCmsItemId=${ this.data.rootCmsItemId }&idPathList=${JSON.stringify(idPathList)}&answerTitle=${ this.data.answerTitle diff --git a/services/home/home.js b/services/home/home.js index e3f82b7..a9919ea 100644 --- a/services/home/home.js +++ b/services/home/home.js @@ -21,22 +21,22 @@ text: '鏁板瓧璇剧▼', key: 2, icon: '/static/images/home/shuzikecheng@2x.png', - // url: '/pages/digitalCourses/index', - url: '' + url: '/pages/digitalCourses/index', + // url: '' }, { text: '鏁板瓧鏁欐潗', key: 3, icon: '/static/images/home/shuzijiaocai@2x.png', - // url: '/pages/digitalTextbooks/index', - url: '' + url: '/pages/digitalTextbooks/index', + // url: '' }, { - text: '涓撻璁ㄨ', + text: '涓撻娲诲姩', key: 4, icon: '/static/images/home/zhuantitaolun@2x.png', - // url: '/pages/specialDiscussion/index', - url: '' + url: '/pages/specialDiscussion/index', + // url: '' }, { text: '绾夸笂涔﹀睍', @@ -66,7 +66,8 @@ text: '鎴戣鍑轰功', key: 9, icon: '/static/images/home/xueshuzhuzuo@2x.png', - url: '', + url: '/packageDomain/pages/publickBookForm/index', + // url: '', }, ], }; -- Gitblit v1.9.1