From 892efc9976feb68ce1a3a4d759317e2585d67ebe Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期六, 07 九月 2024 18:16:18 +0800 Subject: [PATCH] bug修改 --- packageBookService/pages/bookServices/examination/examination.wxss | 9 ++ packageBookService/pages/bookServices/examination/examination.js | 19 +++- packageBookService/pages/bookServices/examination/questionOptions/index.js | 9 ++ packagePersonal/pages/myOrder/index.js | 6 + packageDomain/pages/resourceDetails/myVideo/index.js | 11 +- packageBookService/pages/bookServices/detail/index.js | 11 +- packageBookService/pages/bookServices/examination/examination.wxml | 148 +++++++++++++++--------------------- packageBookService/pages/bookServices/examination/questionOptions/index.wxml | 4 8 files changed, 112 insertions(+), 105 deletions(-) diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js index c12d8c6..e8b3f6f 100644 --- a/packageBookService/pages/bookServices/detail/index.js +++ b/packageBookService/pages/bookServices/detail/index.js @@ -193,19 +193,16 @@ bookId: options.id + "", barHeight: systInfo.statusBarHeight, navBarHeight: navBarHeight, - }); - this.setData({ options: { id: options.id, - name: options.name, + name: decodeURI(options.name), storeInfo: options.storeInfo, - }, }); wx.setNavigationBarTitle({ - title: options.name, + title: decodeURI(options.name), }) - const token = wx.getStorageSync(app.config.tokenKey) + let token = wx.getStorageSync(app.config.tokenKey) if (!token) { loginInfo(app, (data) => { if (data) {} else {} @@ -213,7 +210,7 @@ } this.getBookInfo(options.id); // this.getResourceClass(); // 鑾峰彇璧勬簮鎵�灞炲垎绫� - + token = wx.getStorageSync(app.config.tokenKey) if (token) { this.getShoppingCartProductGet(); this.getApplyInfo(options.id); diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js index 2c9ab29..b75af1a 100644 --- a/packageBookService/pages/bookServices/examination/examination.js +++ b/packageBookService/pages/bookServices/examination/examination.js @@ -53,7 +53,8 @@ startTime: "", //杩涘叆椤甸潰褰撳墠鏃堕棿 pauseTime: 0, //鏆傚仠鏃堕棿 showDialog: false, // 鏈彁浜ら��鍑烘嫤鎴脊绐� - showId: '' + showId: '', + isShowDialog: false, // 娴嬭瘯鎶ュ憡寮圭獥鏄惁鏄剧ず }, /** @@ -549,7 +550,8 @@ submitStatus: true, loading: true, }); - const child = this.selectComponent("#question-options"); + const child = this.selectComponent('#question-options'); + if ( this.data.answerType == "option" || this.data.answerType == "errorQuestion" || @@ -565,7 +567,11 @@ if (this.data.answerType == "option") { this.toggleCountdown(); this.recordAnswerData(); - child.openTestReportDialog(); + // this.selectComponent 鎷夸笉鍒� 缁勪欢浜嗭紝 鏀逛负鐩戝惉缁勪欢浼犲�� 鎵撳紑寮圭獥 + // child.openTestReportDialog(); + this.setData({ + isShowDialog: true + }) } else if ( this.data.answerType == "collectQuestion" || this.data.answerType == "errorQuestion" @@ -608,7 +614,10 @@ }), }, ], }); - child.openTestReportDialog(); + // child.openTestReportDialog(); + this.setData({ + isShowDialog: true + }) } this.setData({ loading: false, @@ -1112,7 +1121,7 @@ // 绠�绛� 缈昏瘧 questionList[index].isRight = null; } else if (item.questionType == "completion") { - if (item.answer == "string") { + if (typeof item.answer == "string") { item.isRight = item.answer == item.userAnswer[0]; } else { if (item.answer.length != item.userAnswer.length) { diff --git a/packageBookService/pages/bookServices/examination/examination.wxml b/packageBookService/pages/bookServices/examination/examination.wxml index 667b280..fffff18 100644 --- a/packageBookService/pages/bookServices/examination/examination.wxml +++ b/packageBookService/pages/bookServices/examination/examination.wxml @@ -3,95 +3,73 @@ <import src="examination.skeleton.wxml" /> <template is="skeleton" wx:if="{{loading}}" /> -<!--瀵艰埅鍖哄煙 --> -<!-- <view - style="width: 100%; height: {{barHeight}}px;background-color: {{isNight ? '#191919' : '#fff'}} " -></view> <view - class="nacigationBar" - style="width: 100%; height: {{navBarHeight}}px; background-color: {{isNight ? '#191919' : '#fff'}}" + class="page" + wx:if="{{!loading}}" + style="background-color:{{isNight ? '#222' : ''}}" > - <view> - <t-icon - name="chevron-left" - size="30" - data-name="{{item}}" - bind:click="goBack" - color="{{isNight ? '#fff' : '#000'}}" - /> + <view class="page-content" style="background-color:{{isNight ? '#222' : ''}}"> + <question-schedule + wx:if="{{!loading}}" + id="countDownRef" + isNight="{{isNight}}" + answerType="{{answerType}}" + countdownTime="{{countdownTime}}" + currentIndex="{{currentIndex}}" + questionList="{{questionDataList}}" + submitStatus="{{submitStatus}}" + subjectiveGrade="{{subjectiveGrade}}" + subjectiveNum="{{subjectiveNum}}" + ></question-schedule> + <question-list + wx:if="{{!loading}}" + sliderValue="{{sliderValue}}" + isNight="{{isNight}}" + answerType="{{answerType}}" + currentIndex="{{currentIndex}}" + questionList="{{questionDataList}}" + submitStatus="{{submitStatus}}" + noData="{{noData}}" + bind:onChangeRadio="onChangeRadio" + bind:onChangeInput="onChangeInput" + bind:changeSwiper="changeSwiper" + bind:viewParsing="viewParsing" + ></question-list> </view> - <view class="navbar-title" style="color: {{isNight ? '#fff' : '#000'}};" - >{{answerTitle}}</view + + <!-- 搴曢儴鍖哄煙--> + + <view + class="page-bottom" + style="background-color:{{isNight ? '#202020' : ''}}" + wx:if="{{answerType !== 'errorQuestion' || (answerType == 'errorQuestion' && !loading)}}" > -</view> --> - -<view class="page-content" style="background-color:{{isNight ? '#222' : ''}}"> - <question-schedule - wx:if="{{!loading}}" - id="countDownRef" - isNight="{{isNight}}" - answerType="{{answerType}}" - countdownTime="{{countdownTime}}" - currentIndex="{{currentIndex}}" - questionList="{{questionDataList}}" - submitStatus="{{submitStatus}}" - subjectiveGrade="{{subjectiveGrade}}" - subjectiveNum="{{subjectiveNum}}" - ></question-schedule> - <question-list - wx:if="{{!loading}}" - sliderValue="{{sliderValue}}" - isNight="{{isNight}}" - answerType="{{answerType}}" - currentIndex="{{currentIndex}}" - questionList="{{questionDataList}}" - submitStatus="{{submitStatus}}" - noData="{{noData}}" - bind:onChangeRadio="onChangeRadio" - bind:onChangeInput="onChangeInput" - bind:changeSwiper="changeSwiper" - bind:viewParsing="viewParsing" - ></question-list> - <!-- <view class="lodaing-box" wx:if="{{loading}}"> - <t-loading - theme="circular" - size="80rpx" - class="wrapper" - loading="{{loading}}" - /></view> --> -</view> - -<!-- 搴曢儴鍖哄煙--> - -<view - class="page-bottom" - style="background-color:{{isNight ? '#202020' : ''}}" - wx:if="{{answerType !== 'errorQuestion' || (answerType == 'errorQuestion' && !loading)}}" -> - <question-options - id="question-options" - isNight="{{isNight}}" - submitStatus="{{submitStatus}}" - answerType="{{answerType}}" - countdownTime="{{countdownTime}}" - currentIndex="{{currentIndex}}" - questionDataList="{{questionDataList}}" - cardList="{{cardList}}" - subjectiveTotal="{{subjectiveTotal}}" - subjectiveNum="{{subjectiveNum}}" - subjectiveGrade="{{subjectiveGrade}}" - correctNum="{{correctNum}}" - mockSumTime="{{mockData.sumTime}}" - showId="{{showId}}" - bind:setCollect="setCollect" - bind:submitPaper="submitPaper" - bind:restart="restart" - bind:goQuestion="goQuestion" - bind:changeBGColor="changeBGColor" - bind:onChangeSlider="onChangeSlider" - bind:changeLoadingState="changeLoadingState" - bind:changeNavBarColor="changeNavBarColor" - ></question-options> + <question-options + id="question-options" + isShowDialog="{{isShowDialog}}" + isNight="{{isNight}}" + submitStatus="{{submitStatus}}" + answerType="{{answerType}}" + countdownTime="{{countdownTime}}" + currentIndex="{{currentIndex}}" + questionDataList="{{questionDataList}}" + cardList="{{cardList}}" + subjectiveTotal="{{subjectiveTotal}}" + subjectiveNum="{{subjectiveNum}}" + subjectiveGrade="{{subjectiveGrade}}" + correctNum="{{correctNum}}" + mockSumTime="{{mockData.sumTime}}" + showId="{{showId}}" + bind:setCollect="setCollect" + bind:submitPaper="submitPaper" + bind:restart="restart" + bind:goQuestion="goQuestion" + bind:changeBGColor="changeBGColor" + bind:onChangeSlider="onChangeSlider" + bind:changeLoadingState="changeLoadingState" + bind:changeNavBarColor="changeNavBarColor" + ></question-options> + </view> </view> <page-container diff --git a/packageBookService/pages/bookServices/examination/examination.wxss b/packageBookService/pages/bookServices/examination/examination.wxss index 6af52ac..34312a0 100644 --- a/packageBookService/pages/bookServices/examination/examination.wxss +++ b/packageBookService/pages/bookServices/examination/examination.wxss @@ -1,6 +1,15 @@ /* pages/examination/examination.wxss */ @import "./examination.skeleton.wxss"; +page { + padding: 0 !important; +} + +.page { + width: 100%; + height: 100vh; +} + .nacigationBar { display: flex; align-items: center; diff --git a/packageBookService/pages/bookServices/examination/questionOptions/index.js b/packageBookService/pages/bookServices/examination/questionOptions/index.js index f807034..7c7ab59 100644 --- a/packageBookService/pages/bookServices/examination/questionOptions/index.js +++ b/packageBookService/pages/bookServices/examination/questionOptions/index.js @@ -54,6 +54,9 @@ }, showId: { type: String + }, + isShowDialog: { + type: Boolean } }, @@ -93,6 +96,12 @@ this.timeout(); } }, + isShowDialog: function (newValue, oldValue) { + if (newValue) + this.setData({ + testReportState: newValue, + }); + } }, created() {}, diff --git a/packageBookService/pages/bookServices/examination/questionOptions/index.wxml b/packageBookService/pages/bookServices/examination/questionOptions/index.wxml index 1c50948..4ce5819 100644 --- a/packageBookService/pages/bookServices/examination/questionOptions/index.wxml +++ b/packageBookService/pages/bookServices/examination/questionOptions/index.wxml @@ -172,7 +172,7 @@ style="margin: 0px" > <view class="card {{radioItem == 'daytime' ? 'card--active' : ''}}"> - <t-radio value="daytime" icon="none" borderless> + <t-radio value="daytime" icon="none" borderless style="height: 100%"> <view class="radio-content" slot="content"> <image src="{{ radioItem == 'daytime' ? '/static/images/bookService/examination/rijian-click.png' : '/static/images/bookService/examination/rijian.png'}}" @@ -184,7 +184,7 @@ </t-radio> </view> <view class="card {{radioItem == 'night' ? 'card--active' : ''}}"> - <t-radio value="night" icon="none" borderless> + <t-radio value="night" icon="none" borderless style="height: 100%"> <view class="radio-content" slot="content"> <image src="{{ radioItem == 'night' ? '/static/images/bookService/examination/yejian-click.png' : '/static/images/bookService/examination/yejian.png'}}" diff --git a/packageDomain/pages/resourceDetails/myVideo/index.js b/packageDomain/pages/resourceDetails/myVideo/index.js index 94d8d8d..67ed12b 100644 --- a/packageDomain/pages/resourceDetails/myVideo/index.js +++ b/packageDomain/pages/resourceDetails/myVideo/index.js @@ -32,7 +32,7 @@ selectedId: null, topicId: '', titleName: '', - submitTitle: "", + submitTitle: "1", inputStyle: 'border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx; padding:16rpx', textvalue: '', style: 'height: 248rpx', @@ -66,6 +66,7 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { + console.log('璧勬簮', options); wx.setNavigationBarTitle({ title: '璧勬簮璇︽儏-瑙嗛' }); @@ -83,7 +84,7 @@ parentProductLinkPath: options.parentProductLinkPath, productLinkPath: options.productLinkPath, formPath: options.formPath, - flag: false + flag: false, }) if (options.parentName !== "鏁欏璧勬簮" && options.parentName !== "浜戝涔�") { this.setData({ @@ -263,13 +264,12 @@ if (this.data.productLinkPath == items.productLinkPath) { if (this.data.formPath === "jsek_cloudLearning") { let file - items.protectedFile || item.file ? file = items.protectedFile || item.file : file = items.freeFile + items.protectedFile || items.file ? file = items.protectedFile || items.file : file = items.freeFile this.setData({ showData: app.config.requestCtx + '/file/api/ApiDownloadForAuthorize?md5=' + file + '&token=' + wx.getStorageSync(app.config.tokenKey), titleName: items.name }) this.aliVod(file, this.data.showData) - } else { this.setData({ showData: items.file ? app.config.requestCtx + '/file/api/ApiDownload?md5=' + items.file : app.config.requestCtx + '/file/api/ApiDownload?md5=' + items.freeFile, @@ -285,7 +285,7 @@ }); this.setData({ loading: false, - hidden: false + hidden: false, }) }) }, @@ -332,6 +332,7 @@ showDataVod: res, }) } + this.setData({}) } else if (currentVideo) { this.setData({ showDataVod: currentVideo, diff --git a/packagePersonal/pages/myOrder/index.js b/packagePersonal/pages/myOrder/index.js index c23d093..075570e 100644 --- a/packagePersonal/pages/myOrder/index.js +++ b/packagePersonal/pages/myOrder/index.js @@ -49,7 +49,6 @@ * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇 */ onLoad(options) { - console.log(options); this.getDataList(false) }, @@ -155,6 +154,10 @@ loading: false }) } else { + wx.showToast({ + icon: 'error', + title: '鏆傛棤鏁版嵁', + }) this.setData({ skeletonLoding: false, loading: false @@ -166,6 +169,7 @@ }) }, onSearchOrder(e) { + console.log(e.detail.value); this.setData({ searchText: e.detail.value, }) -- Gitblit v1.9.1