From 2dfe58ec96a3ec0a560a9bd38e04f363d938bbdc Mon Sep 17 00:00:00 2001 From: unknown <qq1940665526@163.com> Date: 星期四, 13 六月 2024 14:12:57 +0800 Subject: [PATCH] 优化 --- src/books/math/view/components/chapter001.vue | 96 +++++++++++++++++++++++++---------------------- 1 files changed, 51 insertions(+), 45 deletions(-) diff --git a/src/books/math/view/components/chapter001.vue b/src/books/math/view/components/chapter001.vue index 94fe450..814a932 100644 --- a/src/books/math/view/components/chapter001.vue +++ b/src/books/math/view/components/chapter001.vue @@ -90,15 +90,7 @@ <p class="center openImgBox"> <img class="img-c" alt="" src="../../assets/images/0100-3.jpg" /> </p> - <p class="img fl al-cn ju-cn"> - <span>鍥�3-14 </span - ><img - :src="chapterData.isCollectImg ? collectCheck : collectImg" - alt="" - class="collect-btn" - @click="handleCollect('img')" - /> - </p> + <p class="img">鍥�3-14</p> <p> 瑙傚療鍥�3-14锛�1锛� 鍙戠幇锛屽嚱鏁�<i>f</i>锛�<i>x</i>锛�=|<i>x</i>|鐨勫畾涔夊煙鏄紙-鈭烇紝+鈭烇級锛屽嚱鏁板浘鍍忓叧浜�<i>y</i>杞村绉�.浠庤〃3-11涓繕鍙戠幇锛屽綋鑷彉閲忓彇涓�瀵圭浉鍙嶆暟鏃讹紝瀵瑰簲鐨勫嚱鏁板�肩浉绛夛紝濡�<i>f</i>锛�-1锛�=<i>f</i>锛�1锛�=1锛�<i>f</i>锛�-2锛�=<i>f</i>锛�2锛�=2锛�<i>f</i>锛�-3锛�=<i>f</i>锛�3锛�=3锛屸�﹀疄闄呬笂锛屽浠绘剰<i>x</i>鈭堬紙-鈭烇紝+鈭烇級锛岄兘鏈�<i>f</i>锛�-<i>x</i>锛�=|-<i>x</i>|=|<i>x</i>|=<i>f</i>锛�<i>x</i>锛夛紝鍗�<i>f</i>锛�-<i>x</i>锛�=<i>f</i>锛�<i>x</i>锛�. @@ -146,7 +138,15 @@ style="width: 40%" /> </p> - <p class="img">鍥�3-15</p> + <p class="img fl al-cn ju-cn"> + <span>鍥�3-15</span> + <img + :src="chapterData.isCollectImg ? collectCheck : collectImg" + alt="" + class="collect-btn" + @click="handleCollect('img')" + /> + </p> <video :src="videoPath" webkit-playsinline="true" @@ -307,6 +307,32 @@ /> </svg> </span> + <span class="btn-box" @click="stepDialog = true"> + <svg + xmlns="http://www.w3.org/2000/svg" + width="19.28" + height="20.563" + viewBox="0 0 19.28 20.563" + > + <g transform="translate(-109.056 -82.941)"> + <path + class="a" + d="M3439.656-15185.7h-12.643a1.815,1.815,0,0,1-1.816-1.81v-16.944a1.83,1.83,0,0,1,1.816-1.809h15.674a1.8,1.8,0,0,1,1.79,1.809v13.93h-4.217a.6.6,0,0,0-.6.6v4.217h0Zm-9.819-2.764a.5.5,0,0,0-.5.5.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5.5.5,0,0,0-.5-.5Zm0-2a.5.5,0,0,0-.5.5.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5.5.5,0,0,0-.5-.5Zm1.393-8.525a2.416,2.416,0,0,0-2.416,2.411,2.421,2.421,0,0,0,2.416,2.42h.111a1.8,1.8,0,0,0,1.1,1.1,1.809,1.809,0,0,0,.6.107,1.808,1.808,0,0,0,1.7-1.206h4.072l-.172.172a.635.635,0,0,0-.179.454.569.569,0,0,0,.179.4.637.637,0,0,0,.435.176.6.6,0,0,0,.424-.176l1.2-1.214a.618.618,0,0,0,0-.858l-1.2-1.187a.619.619,0,0,0-.431-.176.6.6,0,0,0-.427.176.615.615,0,0,0,0,.854l.172.176h-4.072a1.8,1.8,0,0,0-1.1-1.1,1.755,1.755,0,0,0-.6-.1,1.808,1.808,0,0,0-1.7,1.206h-.111a.554.554,0,0,1-.145-.016,1.2,1.2,0,0,1-.84-.4,1.217,1.217,0,0,1-.3-.878,1.2,1.2,0,0,1,1.206-1.137.407.407,0,0,1,.069,0h3.729a1.807,1.807,0,0,0,1.118,1.114,1.816,1.816,0,0,0,.576.091,1.789,1.789,0,0,0,1.7-1.205h.309a2.415,2.415,0,0,0,1.679-.775,2.407,2.407,0,0,0,.637-1.729,2.411,2.411,0,0,0-2.419-2.324h-6.213a1.821,1.821,0,0,0-1.107-1.1,1.8,1.8,0,0,0-.6-.1,1.814,1.814,0,0,0-1.706,1.2,1.8,1.8,0,0,0,.077,1.389,1.787,1.787,0,0,0,1.026.92,1.841,1.841,0,0,0,.6.1,1.807,1.807,0,0,0,1.706-1.2h6.266a1.179,1.179,0,0,1,.836.4,1.22,1.22,0,0,1,.305.874,1.213,1.213,0,0,1-1.214,1.146h-.172a1.8,1.8,0,0,0-1.118-1.118,1.711,1.711,0,0,0-.576-.1,1.8,1.8,0,0,0-1.706,1.214Z" + transform="translate(-3316.14 15289.201)" + /> + <path + class="a" + d="M316.806,239.727a.6.6,0,1,0,.6-.6A.6.6,0,0,0,316.806,239.727Zm-5.421-4.207a.6.6,0,1,0,.6.6A.587.587,0,0,0,311.385,235.52Zm2.4,8.438a.607.607,0,1,0-.6-.613A.621.621,0,0,0,313.789,243.958Z" + transform="translate(-196.896 -148.921)" + /> + <path + class="a" + d="M763.392,793.79l3.262-3.262h-3.262Z" + transform="translate(-638.661 -690.634)" + /> + </g> + </svg> + </span> <span class="btn-box" @click="openMathDiaolog"> <svg xmlns="http://www.w3.org/2000/svg" @@ -330,32 +356,6 @@ class="a" d="M14.936,7.489l.693,2.251a5.154,5.154,0,0,0,.236.61c.083.159.18.242.3.242a.82.82,0,0,0,.533-.457,4.849,4.849,0,0,0,.339-.817H17.8a4.849,4.849,0,0,1-.693,1.51,2.813,2.813,0,0,1-.873.852,1.766,1.766,0,0,1-.88.27,1.178,1.178,0,0,1-1.018-.464,4.357,4.357,0,0,1-.623-1.309l-.326-1.067a6.4,6.4,0,0,0-.222-.8L12.747,7c-.083-.27-.152-.478-.2-.6a1.136,1.136,0,0,0-.194-.312.4.4,0,0,0-.284-.118c-.326,0-.6.423-.817,1.261h-.769a6.671,6.671,0,0,1,.6-1.5,3.034,3.034,0,0,1,.81-.873,1.663,1.663,0,0,1,.942-.312,1.344,1.344,0,0,1,1.067.471,3.692,3.692,0,0,1,.644,1.268l.139.436C14.672,6.7,14.936,7.489,14.936,7.489Z" transform="translate(398 948)" - /> - </g> - </svg> - </span> - <span class="btn-box" @click="stepDialog = true"> - <svg - xmlns="http://www.w3.org/2000/svg" - width="19.28" - height="20.563" - viewBox="0 0 19.28 20.563" - > - <g transform="translate(-109.056 -82.941)"> - <path - class="a" - d="M3439.656-15185.7h-12.643a1.815,1.815,0,0,1-1.816-1.81v-16.944a1.83,1.83,0,0,1,1.816-1.809h15.674a1.8,1.8,0,0,1,1.79,1.809v13.93h-4.217a.6.6,0,0,0-.6.6v4.217h0Zm-9.819-2.764a.5.5,0,0,0-.5.5.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5.5.5,0,0,0-.5-.5Zm0-2a.5.5,0,0,0-.5.5.5.5,0,0,0,.5.5h4a.5.5,0,0,0,.5-.5.5.5,0,0,0-.5-.5Zm1.393-8.525a2.416,2.416,0,0,0-2.416,2.411,2.421,2.421,0,0,0,2.416,2.42h.111a1.8,1.8,0,0,0,1.1,1.1,1.809,1.809,0,0,0,.6.107,1.808,1.808,0,0,0,1.7-1.206h4.072l-.172.172a.635.635,0,0,0-.179.454.569.569,0,0,0,.179.4.637.637,0,0,0,.435.176.6.6,0,0,0,.424-.176l1.2-1.214a.618.618,0,0,0,0-.858l-1.2-1.187a.619.619,0,0,0-.431-.176.6.6,0,0,0-.427.176.615.615,0,0,0,0,.854l.172.176h-4.072a1.8,1.8,0,0,0-1.1-1.1,1.755,1.755,0,0,0-.6-.1,1.808,1.808,0,0,0-1.7,1.206h-.111a.554.554,0,0,1-.145-.016,1.2,1.2,0,0,1-.84-.4,1.217,1.217,0,0,1-.3-.878,1.2,1.2,0,0,1,1.206-1.137.407.407,0,0,1,.069,0h3.729a1.807,1.807,0,0,0,1.118,1.114,1.816,1.816,0,0,0,.576.091,1.789,1.789,0,0,0,1.7-1.205h.309a2.415,2.415,0,0,0,1.679-.775,2.407,2.407,0,0,0,.637-1.729,2.411,2.411,0,0,0-2.419-2.324h-6.213a1.821,1.821,0,0,0-1.107-1.1,1.8,1.8,0,0,0-.6-.1,1.814,1.814,0,0,0-1.706,1.2,1.8,1.8,0,0,0,.077,1.389,1.787,1.787,0,0,0,1.026.92,1.841,1.841,0,0,0,.6.1,1.807,1.807,0,0,0,1.706-1.2h6.266a1.179,1.179,0,0,1,.836.4,1.22,1.22,0,0,1,.305.874,1.213,1.213,0,0,1-1.214,1.146h-.172a1.8,1.8,0,0,0-1.118-1.118,1.711,1.711,0,0,0-.576-.1,1.8,1.8,0,0,0-1.706,1.214Z" - transform="translate(-3316.14 15289.201)" - /> - <path - class="a" - d="M316.806,239.727a.6.6,0,1,0,.6-.6A.6.6,0,0,0,316.806,239.727Zm-5.421-4.207a.6.6,0,1,0,.6.6A.587.587,0,0,0,311.385,235.52Zm2.4,8.438a.607.607,0,1,0-.6-.613A.621.621,0,0,0,313.789,243.958Z" - transform="translate(-196.896 -148.921)" - /> - <path - class="a" - d="M763.392,793.79l3.262-3.262h-3.262Z" - transform="translate(-638.661 -690.634)" /> </g> </svg> @@ -750,20 +750,26 @@ if (oldAnswer) { oldAnswer = JSON.parse(oldAnswer); console.log("鏃ф暟鎹�", oldAnswer); - if(oldAnswer[9]) { + if (oldAnswer[9]) { for (let index = 0; index < res.data.data.length; index++) { const item = res.data.data[index]; - if(item.infoList.length) { - for (let cindex = 0; cindex < item.infoList.length; cindex++) { - const citem = item.infoList[cindex]; - const question = oldAnswer[9].find(ditem => ditem.id == citem.id) - if(question) { - citem.userAnswer = question.userAnswer + if (item.infoList.length) { + for ( + let cindex = 0; + cindex < item.infoList.length; + cindex++ + ) { + const citem = item.infoList[cindex]; + const question = oldAnswer[9].find( + (ditem) => ditem.id == citem.id + ); + if (question) { + citem.userAnswer = question.userAnswer; + } } } - } } - } + } } this.questionData = res.data.data; }); -- Gitblit v1.9.1