From 8f9242a0cfc60fa3718c93123282fcb2b8dbf7fa Mon Sep 17 00:00:00 2001 From: 闫增涛 <1829501689@qq.com> Date: 星期一, 25 三月 2024 18:00:53 +0800 Subject: [PATCH] 答题器bug修改,设置功能 --- packageBookService/pages/bookServices/examination/questionList/index.js | 3 packageBookService/pages/bookServices/examination/questionList/index.wxss | 12 + packageBookService/pages/bookServices/examination/questionList/index.wxml | 59 ++++++-- packageBookService/pages/bookServices/detail/buyResource/index.js | 65 ++++++++- packageBookService/pages/bookServices/detail/index.wxml | 2 packageBookService/pages/bookServices/examination/questionOptions/index.js | 8 packageBookService/pages/bookServices/detail/index.wxss | 2 packageBookService/pages/bookServices/examination/examination.wxml | 16 + packageBookService/pages/bookServices/examination/questionOptions/index.wxml | 19 +- /dev/null | 1 packageBookService/pages/bookServices/detail/components/tree/index.wxml | 16 +- packageBookService/pages/bookServices/examination/examination.js | 16 ++ packageBookService/pages/bookServices/examination/questionSchedule/index.wxml | 6 packageBookService/pages/bookServices/detail/components/tree/index.js | 104 +++++--------- packageBookService/pages/bookServices/detail/buyResource/index.wxml | 7 pages/bookServices/assort/index.wxml | 2 packageBookService/pages/bookServices/detail/index.js | 23 ++- pages/bookServices/assort/index.wxss | 2 18 files changed, 232 insertions(+), 131 deletions(-) diff --git a/packageBookService/pages/bookServices/buyResource/index.json b/packageBookService/pages/bookServices/buyResource/index.json deleted file mode 100644 index 8835af0..0000000 --- a/packageBookService/pages/bookServices/buyResource/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/packageBookService/pages/bookServices/buyResource/index.wxss b/packageBookService/pages/bookServices/buyResource/index.wxss deleted file mode 100644 index df43765..0000000 --- a/packageBookService/pages/bookServices/buyResource/index.wxss +++ /dev/null @@ -1 +0,0 @@ -/* packageBookService/pages/bookServices/buyResource/index.wxss */ \ No newline at end of file diff --git a/packageBookService/pages/bookServices/detail/buyResource/index.js b/packageBookService/pages/bookServices/detail/buyResource/index.js index dc40f65..39062f7 100644 --- a/packageBookService/pages/bookServices/detail/buyResource/index.js +++ b/packageBookService/pages/bookServices/detail/buyResource/index.js @@ -218,16 +218,67 @@ } }) 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.resourceIsBuy(item) - item.isShopCar = this.isShoppingCart(item) - } + item.checked = false + item.isbuy = this.resourceIsBuy(item) + item.isShopCar = this.isShoppingCart(item) }) return data.datas.cmsDatas[0].datas }, + getBookInfo(id) { + this.setData({ + "mockData'.id": 0, + "mockData.price": 0, + "mockData.count": 0 + }) + const query = { + path: '*', + queryType: '*', + productId: id, + favoriteTypes: 'FavoriteBookCity', + itemFields: { + 'SysType=': 'CmsFolder', + }, + coverSize: { + height: 300, + }, + fields: { + seriesName: [], + author: [], + isbn: [], + publicationDate: [], + bookClassification: [], + paperPrice: [], + JDLink: [], + tmallLink: [], + dangdangLink: [], + weidianLink: [], + content: [], + authorIntroduction: [], + isApplyBook: [], + isSell: [], + pdf: [], + protectedEpub: [], + probationPage: [], //pdf璇曡椤垫暟 + freeEpubPage: [], //epub璇曡鐧惧垎姣� + }, + }; + app.MG.store.getProductDetail(query).then(async (res) => { + this.setData({ + bookDetail: res.datas, + buyIdList: res.datas.purchasedSaleMethodIdList + }); + }); + + }, + // 鍒ゆ柇璧勬簮鏄惁璐拱 + resourceIsBuy(data) { + if (data.saleMethod && data.saleMethod.length) { + const isSHow = this.data.buyIdList.some((item) => item == data.saleMethod[0].Id) + return !isSHow + } else { + return false + } + }, // 鑾峰彇灞曞紑椤� findChildIds(data, result) { let index = 0 diff --git a/packageBookService/pages/bookServices/detail/buyResource/index.wxml b/packageBookService/pages/bookServices/detail/buyResource/index.wxml index e628055..24a654e 100644 --- a/packageBookService/pages/bookServices/detail/buyResource/index.wxml +++ b/packageBookService/pages/bookServices/detail/buyResource/index.wxml @@ -19,7 +19,12 @@ <!-- 鍐呭 --> <view class="buy-resource" wx:if="{{!loading}}"> - <tree treeList="{{learn}}" tab="{{'jsek_cloudLearning'}}" /> + <tree + treeList="{{learn}}" + tab="{{'jsek_cloudLearning'}}" + isShowCheck="{{true}}" + openIds="{{openLearnids}}" + /> </view> <view class="noData" wx:if="{{loading}}"> diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.js b/packageBookService/pages/bookServices/detail/components/tree/index.js index 6a672a3..85c10dc 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.js +++ b/packageBookService/pages/bookServices/detail/components/tree/index.js @@ -26,22 +26,22 @@ type: String, value: '' }, - openTeachids: { + openIds: { type: Array, - value: '' - }, - openLearnids: { - type: Array, - value: "" + value: [], + } + , + isShowCheck: { + type: Boolean, + value: false, } }, data: { - activeValues: [0], + activeValues: [1, 2], webpageSrc: '', cloudShoppingCart: [] }, onShow() { - }, @@ -78,7 +78,8 @@ // 鍒ゆ柇璧勬簮鏄惁璐拱 resourceIsBuy(data) { if (data.saleMethod && data.saleMethod.length) { - const isSHow = buyIdList.value.some((item) => item == data.saleMethod[0].Id) + if (data.saleMethod[0].State == 'Disable') return false + const isSHow = this.properties.buyIds.some((item) => item == data.saleMethod[0].Id) return !isSHow } else { return false @@ -86,22 +87,23 @@ }, // 璺宠浆闊宠棰戞挱鏀惧櫒 goPlayer(e) { - console.log(e); - // debugger + if (this.properties.isShowCheck) return true const item = e.currentTarget.dataset.item const parent = e.currentTarget.dataset.parent let url - if (item.selectType == 'video') { + if (item.selectType == 'video' || item.learnSelectType == 'video') { url = '/packageDomain/pages/resourceDetails/myVideo/index' - } else if (item.selectType == 'audio') { + } else if (item.selectType == 'audio' || item.learnSelectType == 'audio') { url = '/packageDomain/pages/resourceDetails/myAudio/index' } else if (item.selectType == 'picture' || item.selectType == 'zip') { url = '/packageDomain/pages/resourceDetails/document/index' } - - // else { - // - // } + if (this.properties.tab == 'jsek_cloudLearning' && this.resourceIsBuy(item)) { + return wx.showToast({ + icon: 'error', + title: '璇峰厛璐拱璇ヨ祫婧�', + }) + } wx.navigateTo({ url: `${url}?productLinkPath=${item.productLinkPath}&parentProductLinkPath=${parent.productLinkPath}&parentName=${parent.name}&activeId=${item.id}&bookId=${this.properties.bookInfo.id}&bookName=${this.properties.bookInfo.name}&cmsId=${this.properties.bookInfo.rootCmsItemId}`, }) @@ -202,35 +204,9 @@ return result }, - - - findAndUpdateItemById(tree, id) { - function findAndUpdate(node) { - if (node.id === id) { - node.check = true; // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true - return true; // 杩斿洖 true 琛ㄧず鎵惧埌浜嗙洰鏍囬」 - } - if (node.children && node.children.length > 0) { - for (let child of node.children) { - if (findAndUpdate(child)) { - return true; // 濡傛灉鍦ㄥ瓙鑺傜偣涓壘鍒颁簡鐩爣椤癸紝鍒欑洿鎺ヨ繑鍥� true - } - } - } - return false; // 琛ㄧず鏈壘鍒扮洰鏍囬」 - } - - for (let node of tree) { - if (findAndUpdate(node)) { - break; // 濡傛灉鍦ㄩ《灞傝妭鐐逛腑鎵惧埌浜嗙洰鏍囬」锛岀洿鎺ラ��鍑哄惊鐜� - } - } - }, // 鍙樹负true findAndUpdateItemsByIds(tree, ids) { - function findAndUpdate(node) { - if (ids.includes(node.id)) { // console.log(node, 'node'); node.checked = !node.checked // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true @@ -250,26 +226,38 @@ 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") { + debugger + node.checked = !node.checked // 灏嗙洰鏍囬」鐨� check 灞炴�ц缃负 true + } + } + for (let node of tree) { + findAndUpdate(node); // 瀵规瘡涓《灞傝妭鐐规墽琛屾煡鎵惧拰鏇存柊鎿嶄綔 + } + return tree; // 杩斿洖淇敼鍚庣殑瀹屾暣鏁扮粍 + }, + // 绔犺妭鍕鹃�� checkResourceTitle(e) { // 杩欎釜鏃跺�檆hecked鐨勫�兼槸fals const item = e.currentTarget.dataset.item - let list = this.flattenTree([item]) - - let ids = [] list.forEach(item => { ids.push(item.id) }) - const updatedTreeList = this.findAndUpdateItemsByIds(this.properties.treeList, ids); - // console.log(updatedTreeList, 'updatedTreeList'); //杩欎釜鏃跺�檆hecked鐨勫�煎氨鍙樻垚浜唗rue - this.setData({ treeList: updatedTreeList // 鏇存柊 treeList 鏁版嵁 }); - console.log(list, 'list'); list.forEach(items => { console.log(items.checked, 'itesasd'); @@ -279,27 +267,15 @@ }) } }) - this.onCloudShoppingCart() }, // 瀛愰」鍕鹃�� checkResource(e) { - const item = e.currentTarget.dataset.item - - - // let list = this.flattenTree([item]) - // console.log(list, 'list121'); - // let ids = [] - // list.forEach(items => { - // console.log(items.id, 'itemsId'); - // ids.push(items.id) - // }) + const citem = e.currentTarget.dataset.item + this.checkResoucrceInfo(this.properties.treeList, citem.id) }, // 鍔犲叆璐墿杞� async onCloudShoppingCart() { - - - let requests = [] const item = this.data.cloudShoppingCart console.log(item, 'item'); diff --git a/packageBookService/pages/bookServices/detail/components/tree/index.wxml b/packageBookService/pages/bookServices/detail/components/tree/index.wxml index 3820ca8..c415f21 100644 --- a/packageBookService/pages/bookServices/detail/components/tree/index.wxml +++ b/packageBookService/pages/bookServices/detail/components/tree/index.wxml @@ -1,16 +1,16 @@ <view class="tree"> - <t-collapse default-value="{{activeValues}}" bind:change="handleChange"> + <t-collapse default-value="{{openIds}}" bind:change="handleChange"> <t-collapse-panel wx:for="{{treeList}}" wx:for-item="item" wx:for-index="index" wx:key="id" - value="{{index}}" + value="{{item.id}}" expandIcon - disabled="{{!item.children}}" + disabled="{{!item.children.length}}" > <view slot="header" class="header-title"> - <view wx:if="{{tab == 'jsek_cloudLearning'}}"> + <view wx:if="{{isShowCheck}}"> <t-checkbox icon="rectangle" checked="{{item.checked}}" @@ -50,7 +50,7 @@ class="box-image" style="{{ tab == 'jsek_teachingResources' ? 'width: 350rpx;' : 'width: 450rpx;'}}" > - <view class="checkBox" wx:if="{{tab == 'jsek_cloudLearning'}}"> + <view class="checkBox" wx:if="{{isShowCheck}}"> <!-- 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 @@ -63,12 +63,12 @@ <!-- 鏁欏璧勬簮鍥炬爣 --> <view class="teach-icon"> <image - wx:if="{{citem.selectType == 'audio'}}" + wx:if="{{citem.selectType == 'audio' || citem.learnSelectType == 'audio'}}" src="/static/images/bookService/detail/audioIcon.png" mode="aspectFill" /> <image - wx:if="{{citem.selectType == 'video'}}" + wx:if="{{citem.selectType == 'video' || citem.learnSelectType == 'video'}}" src="/static/images/bookService/detail/video.png" mode="aspectFill" /> @@ -159,10 +159,12 @@ <!-- // 鍒ゆ柇 涓嶆槸鍟嗗搧 鏈夊瓙椤� 閫掑綊缁勪欢 --> <tree wx:else + isShowCheck="{{isShowCheck}}" bookInfo="{{bookInfo}}" treeList="{{[citem]}}" itemId="{{itemId}}" tab="{{tab}}" + buyIds="{{buyIds}}" openTeachids="{{openTeachids}}" openLearnids="{{openLearnids}}" ></tree> diff --git a/packageBookService/pages/bookServices/detail/index.js b/packageBookService/pages/bookServices/detail/index.js index bc9ec6c..9f8eae4 100644 --- a/packageBookService/pages/bookServices/detail/index.js +++ b/packageBookService/pages/bookServices/detail/index.js @@ -589,22 +589,26 @@ item.checked = false }) const list = await this.getAllResource(res.datas.cmsDatas[0].datas) + let result = [] if (type.refCode == 'jsek_teachingResources') { + this.findChildIds(list, result) this.setData({ teach: list, - loading: false + loading: false, + openTeachids: result }) - this.findChildIds(this.data.teach, this.data.openTeachids = []) + console.log('鏁欏璧勬簮', this.data.teach); } else if (type.refCode == 'jsek_cloudLearning') { - res.datas.cmsDatas[0].datas.forEach(item => { - item.checked = false - }) - const list = await this.getAllResource(res.datas.cmsDatas[0].datas) + // res.datas.cmsDatas[0].datas.forEach(item => { + // item.checked = false + // }) + // const list = await this.getAllResource(res.datas.cmsDatas[0].datas) + this.findChildIds(list, result) this.setData({ learn: list, - loading: false + loading: false, + openLearnids: result }) - this.findChildIds(this.data.learn, this.data.openLearnids = []) } } else { // 鏃犳暟鎹� @@ -654,7 +658,8 @@ isDownload: [], jsek_resourceBrief: [], jsek_link: [], - accessType: [] + accessType: [], + learnSelectType: [] }, pading: { start: 0, diff --git a/packageBookService/pages/bookServices/detail/index.wxml b/packageBookService/pages/bookServices/detail/index.wxml index 63fca54..1f5f776 100644 --- a/packageBookService/pages/bookServices/detail/index.wxml +++ b/packageBookService/pages/bookServices/detail/index.wxml @@ -190,6 +190,7 @@ applyResourceLoading="{{applyResourceLoading}}" ></teach-resource> <tree + openIds="{{openTeachids}}" bookInfo="{{bookDetail}}" treeList="{{teach}}" tab="{{tabValue}}" @@ -224,6 +225,7 @@ ></learn-resource> <tree id="tree" + openIds="{{openLearnids}}" bookInfo="{{bookDetail}}" tab="{{tabValue}}" treeList="{{learn}}" diff --git a/packageBookService/pages/bookServices/detail/index.wxss b/packageBookService/pages/bookServices/detail/index.wxss index abbb481..8d22fbe 100644 --- a/packageBookService/pages/bookServices/detail/index.wxss +++ b/packageBookService/pages/bookServices/detail/index.wxss @@ -204,7 +204,7 @@ /* 鍥句功璧勬簮 */ .book-resource { /* min-height: 640rpx; */ - min-height: calc(100vh - 960rpx); + min-height: calc(100vh - 900rpx); margin-top: 20rpx; background-color: #fff !important; } diff --git a/packageBookService/pages/bookServices/examination/examination.js b/packageBookService/pages/bookServices/examination/examination.js index e444433..495bbee 100644 --- a/packageBookService/pages/bookServices/examination/examination.js +++ b/packageBookService/pages/bookServices/examination/examination.js @@ -41,7 +41,8 @@ answer: [] }, saveTime: 20, - isNight: false + isNight: false, + sliderValue: 0, // 瀛椾綋婊戝潡 }, /** @@ -169,7 +170,12 @@ } }); }, - + onChangeSlider(e) { + this.setData({ + sliderValue: e.detail.value + }) + console.log(e.detail.value); + }, // 杩斿洖 goBack() { console.log(this.data.submitStatus); @@ -437,9 +443,15 @@ await this.getCollectIdList() // 鑾峰彇鏀惰棌id鍒楄〃 await this.getErrorList() // 鑾峰彇閿欓id鍒楄〃 } else if (this.data.answerType == 'collectQuestion') { + this.setData({ + submitStatus: true + }) // 鎴戠殑鏀惰棌 await this.getcollectId() // 鑾峰彇鏀惰棌棰樼洰 } else if (this.data.answerType == 'errorQuestion') { + this.setData({ + submitStatus: true + }) // 鎴戠殑閿欓 // loadings.value = true await this.getErrorIdList() diff --git a/packageBookService/pages/bookServices/examination/examination.wxml b/packageBookService/pages/bookServices/examination/examination.wxml index 9b02607..2f050dc 100644 --- a/packageBookService/pages/bookServices/examination/examination.wxml +++ b/packageBookService/pages/bookServices/examination/examination.wxml @@ -1,16 +1,24 @@ <!--pages/examination/examination.wxml--> <!--瀵艰埅鍖哄煙 --> -<view style="width: 100%; height: {{barHeight}}px; "></view> -<view class="nacigationBar" style="width: 70%; height: {{navBarHeight}}px;"> +<view + style="width: 100%; height: {{barHeight}}px;background-color: {{isNight ? '#191919' : '#fff'}} " +></view> +<view + class="nacigationBar" + style="width: 75%; height: {{navBarHeight}}px; background-color: {{isNight ? '#191919' : '#fff'}}" +> <view> <t-icon name="chevron-left" size="30" data-name="{{item}}" bind:click="goBack" + color="{{isNight ? '#fff' : '#000'}}" /> </view> - <view class="navbar-title">{{answerTitle}}</view> + <view class="navbar-title" style="color: {{isNight ? '#fff' : '#000'}};" + >{{answerTitle}}</view + > </view> <!-- <view class="lodaing-box" wx:if="{{loaidng}}"> @@ -37,6 +45,7 @@ ></question-schedule> <question-list wx:if="{{!loading}}" + sliderValue="{{sliderValue}}" isNight="{{isNight}}" answerType="{{answerType}}" currentIndex="{{currentIndex}}" @@ -77,5 +86,6 @@ bind:restart="restart" bind:goQuestion="goQuestion" bind:changeBGColor="changeBGColor" + bind:onChangeSlider="onChangeSlider" ></question-options> </view> diff --git a/packageBookService/pages/bookServices/examination/questionList/index.js b/packageBookService/pages/bookServices/examination/questionList/index.js index 7cd9c3e..ec3a161 100644 --- a/packageBookService/pages/bookServices/examination/questionList/index.js +++ b/packageBookService/pages/bookServices/examination/questionList/index.js @@ -23,6 +23,9 @@ answerType: { type: String, value: '' + }, + sliderValue: { + type: Number, } }, observers: { diff --git a/packageBookService/pages/bookServices/examination/questionList/index.wxml b/packageBookService/pages/bookServices/examination/questionList/index.wxml index 73af0ce..654cac3 100644 --- a/packageBookService/pages/bookServices/examination/questionList/index.wxml +++ b/packageBookService/pages/bookServices/examination/questionList/index.wxml @@ -16,11 +16,11 @@ </view> <!-- 棰樼洰鍒楄〃 --> <swiper class="swiper" bind:change="changeSwiper" current="{{currentIndex}}"> - <swiper-item wx:for="{{questionList}}" wx:key="{{id}}"> + <swiper-item wx:for="{{questionList}}" wx:key="id"> <!-- 棰樺共 --> <view class="question-stem title-score" - style="color: {{isNight ? '#fff' : '#000'}};" + style="color: {{isNight ? '#fff' : '#000'}}; font-size: {{sliderValue || 32}}rpx;" > <!-- 棰樺彿 --> <text>{{item.number}}.</text> @@ -64,7 +64,7 @@ data-id="{{item.id}}" data-index="{{inputItem.num}}" class="title-input" - style="{{inputstyle}}" + style="border: 2rpx solid rgba(220,220,220,1);border-radius: 12rpx;background-color:{{isNight ? '#000' : '#fff'}}; " placeholder-style="{{placeholderstyle}}" wx:if="{{inputItem.data == 'input'}}" placeholder="璇疯緭鍏ユ枃瀛�" @@ -97,9 +97,11 @@ icon="none" placement="right" borderless + style="background-color: {{isNight ? '#222' : '#fff'}}" > <view - class="radio-item {{(answerType == 'option' || answerType == 'mock' ) && !submitStatus && item.userAnswer == contentItem.value ? 'radio-active' : ''}} {{ (item.answer == contentItem.value && item.answer == item.userAnswer && submitStatus) ? 'radio-correct' : (item.userAnswer == contentItem.value && item.userAnswer != item.answer && submitStatus) ?'radio-error' :'' }}" + style="font-size: {{sliderValue || 32}}rpx;" + class="radio-item {{(answerType == 'option' || answerType == 'mock' ) && !submitStatus && item.userAnswer == contentItem.value ? 'radio-active' : isNight ? 'night' :''}} {{ (item.answer == contentItem.value && item.answer == item.userAnswer && submitStatus) ? 'radio-correct' : (item.userAnswer == contentItem.value && item.userAnswer != item.answer && submitStatus) ?'radio-error' :'' }}" > <!-- 浠呮枃瀛� --> <text wx:if="{{item.optionStyle == 'Txt'}}" @@ -154,9 +156,15 @@ wx:for-index="contentIndex" wx:key="contentIndex" > - <t-checkbox block="{{false}}" value="{{contentItem.value}}"> + <t-checkbox + block="{{false}}" + value="{{contentItem.value}}" + style="background-color:{{isNight ? '#000' :'#fff'}}; " + > <!-- 浠呮枃瀛� --> - <text wx:if="{{item.optionStyle == 'Txt'}}" + <text + wx:if="{{item.optionStyle == 'Txt'}}" + style="color:{{ isNight ? '#fff' : '#000'}}" >{{contentItem.value}}銆亄{contentItem.txt}}</text > <!-- 浠呭浘鐗� --> @@ -196,7 +204,7 @@ maxlength="500" disableDefaultPadding="{{true}}" indicator - style="{{style}}" + style="background-color:{{isNight ? '#000' : '#fff'}}; " /> </view> <!-- 鍗曢�夈�佸閫夎В鏋� --> @@ -205,19 +213,29 @@ wx:if="{{item.isComplete && (item.questionType == 'singleChoice' || item.questionType == 'judge' || item.questionType == 'multipleChoice')}}" > <view class="analysis-answer"> - <view class="answer-correct answer-center"> + <view + class="answer-correct answer-center" + style="font-size: {{sliderValue || 32}}rpx;" + > <text class="analysis-title-box">姝g‘绛旀锛�</text> <rich-text nodes="{{item.answer}}" - style="font-size: 40rpx" + style="font-size: {{sliderValue || 40}}rpx;" ></rich-text> </view> <view class="answer-center marginL {{item.isRight ? 'answer-correct' : 'answer-error'}}" wx:if="{{item.questionType !== 'shortAnswer'}}" > - <text class="analysis-title-box">鎮ㄧ殑绛旀锛�</text - ><text class="answer-text">{{item.userAnswer}}</text> + <text + class="analysis-title-box" + style="font-size: {{sliderValue || 32}}rpx;" + >鎮ㄧ殑绛旀锛�</text + ><text + class="answer-text" + style="font-size: {{sliderValue || 40}}rpx;" + >{{item.userAnswer}}</text + > </view> </view> <view @@ -225,7 +243,9 @@ wx:if="{{item.analysisCon}}" style="color: {{isNight ? '#fff' : '#000'}};" > - 绛旀瑙f瀽锛�<rich-text + <text style="font-size: {{sliderValue || 32}}rpx;">绛旀瑙f瀽锛�</text + ><rich-text + style="font-size: {{sliderValue || 32}}rpx;" nodes="{{item.analysisCon}}" class="analysis-content" ></rich-text> @@ -242,21 +262,24 @@ <text wx:if="{{item.questionType == 'completion'}}" class="short-answer-fz answer-correct" + style="font-size:{{sliderValue || 32}}rpx;" >姝g‘绛旀:</text > <text wx:if="{{item.questionType == 'shortAnswer'}}" class="short-answer-fz" + style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;" > 鍙傝�冪瓟妗堬細 </text> <rich-text wx:if="{{item.questionType == 'shortAnswer'}}" nodes="{{item.answer}}" - style="font-size: 28rpx; color:{{item.questionType == 'completion' ? '#1FBC1F' : '#000'}}" + style="font-size:{{sliderValue || 28}}rpx; color:{{item.questionType == 'completion' ? '#1FBC1F' : isNight ? '#fff' : '#000'}}" ></rich-text> <view wx:if="{{item.questionType == 'completion'}}" + style="font-size:{{sliderValue || 28}}rpx;" class="short-answer-fz answer-correct" >{{item.answer}}</view > @@ -268,18 +291,24 @@ > <text class="short-answer-fz {{item.isRight ? 'answer-correct' : 'answer-error'}}" + style="font-size:{{sliderValue || 28}}rpx;" >鎮ㄧ殑绛旀锛�</text > <view class="short-answer-fz {{item.isRight ? 'answer-correct' : 'answer-error'}}" + style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;" >{{item.userAnswer}}</view > </view> <view class="short-answer-mr"> - <text class="short-answer-fz">绛旀瑙f瀽锛�</text> + <text + class="short-answer-fz;" + style="color:{{isNight ? '#fff' : '#000'}};font-size:{{sliderValue || 28}}rpx;" + >绛旀瑙f瀽锛�</text + > <rich-text nodes="{{item.analysisCon}}" - style="font-size: 28rpx" + style="font-size:{{sliderValue || 28}}rpx;;color:{{isNight ? '#fff' : '#000'}}" ></rich-text> </view> </view> diff --git a/packageBookService/pages/bookServices/examination/questionList/index.wxss b/packageBookService/pages/bookServices/examination/questionList/index.wxss index 0e45e42..f6efb94 100644 --- a/packageBookService/pages/bookServices/examination/questionList/index.wxss +++ b/packageBookService/pages/bookServices/examination/questionList/index.wxss @@ -51,16 +51,21 @@ background-color: #F9F9F9; } +.night { + background-color: #000; + color: #ffffff; +} + .radio-active { background-color: #fff0e6; } .radio-correct { - background-color: #EAF7EE; + background-color: #EAF7EE !important; } .radio-error { - background-color: #FFEBEB; + background-color: #FFEBEB !important; } .question-stem image { @@ -148,8 +153,7 @@ .analysis-title-box { display: inline-block; - width: 160rpx; - height: 52rpx; + /* width: 160rpx; */ white-space: nowrap; } diff --git a/packageBookService/pages/bookServices/examination/questionOptions/index.js b/packageBookService/pages/bookServices/examination/questionOptions/index.js index 1aeb95a..15acec1 100644 --- a/packageBookService/pages/bookServices/examination/questionOptions/index.js +++ b/packageBookService/pages/bookServices/examination/questionOptions/index.js @@ -64,7 +64,7 @@ questionCardState: false, setUpPopup: false, testReportState: false, - sliderValue: 28, + sliderValue: 36, useTime: '', radioItem: 'daytime' }, @@ -166,10 +166,8 @@ }, // 婊戝潡鍙樺寲 onChangeSlider(e) { - this.setData({ - sliderValue: e.detail.value - }) - console.log(e.detail.value); + const value = e.detail.value + this.triggerEvent('onChangeSlider', { value }) }, // 璁剧疆閬僵灞傜偣鍑� onSetUpChange(e) { diff --git a/packageBookService/pages/bookServices/examination/questionOptions/index.wxml b/packageBookService/pages/bookServices/examination/questionOptions/index.wxml index 6262100..e857080 100644 --- a/packageBookService/pages/bookServices/examination/questionOptions/index.wxml +++ b/packageBookService/pages/bookServices/examination/questionOptions/index.wxml @@ -115,21 +115,22 @@ <view class="brightness"> <text>A-</text> <view class="brightness-slider"> - <t-slider + <!-- <t-slider value="{{sliderValue}}" theme="capsule" - min="{{14}}" + min="{{24}}" max="{{100}}" step="{{7}}" bind:change="onChangeSlider" - /> - <!-- <slider - value="{{sliderValue}}" - min="{{10}}" - step="{{10}}" - activeColor="#ff6c00" - bind:chang="onChangeSlider" /> --> + <slider + value="{{sliderValue}}" + min="{{28}}" + max="{{48}}" + step="{{7}}" + activeColor="#ff6c00" + bind:changing="onChangeSlider" + /> </view> <text>A+</text> diff --git a/packageBookService/pages/bookServices/examination/questionSchedule/index.wxml b/packageBookService/pages/bookServices/examination/questionSchedule/index.wxml index 9d5f617..6b9891a 100644 --- a/packageBookService/pages/bookServices/examination/questionSchedule/index.wxml +++ b/packageBookService/pages/bookServices/examination/questionSchedule/index.wxml @@ -31,7 +31,11 @@ </view> <!-- 缁冧範銆佺粍鍗� 鎻愪氦鍚� --> -<view wx:else class="schedule submit-message"> +<view + wx:else + class="schedule submit-message" + style="background-color:{{isNight ? '#1a1a1a' : '#fff'}};color: {{isNight ? '#fff' : '#000'}}; " +> <view> 瀹㈣棰樺緱鍒嗭細<text class="parimary-color">{{subjectiveNum}}鍒�</text> / {{subjectiveGrade}}鍒� diff --git a/pages/bookServices/assort/index.wxml b/pages/bookServices/assort/index.wxml index b2a5581..86fdbe9 100644 --- a/pages/bookServices/assort/index.wxml +++ b/pages/bookServices/assort/index.wxml @@ -70,7 +70,7 @@ <view wx:for="{{startList}}" wx:for-item="item" - wx:key="item.id" + wx:key="id" id="{{ 'list' + item.id}}" class="class-box" wx:if="{{!listLoading}}" diff --git a/pages/bookServices/assort/index.wxss b/pages/bookServices/assort/index.wxss index 9f30850..ac6364c 100644 --- a/pages/bookServices/assort/index.wxss +++ b/pages/bookServices/assort/index.wxss @@ -83,7 +83,7 @@ .myScroll .row:last-child { /* 閫夋嫨鏈�鍚庝竴涓瓙浠� 娓呴浂杈硅窛 */ - margin-right: 0; + margin-right: 240rpx; } .class-list { -- Gitblit v1.9.1