From cd92db66e451bb8c21b27d151ee934f667b655c7 Mon Sep 17 00:00:00 2001 From: Spark <2666652@gmail.com> Date: Sat, 12 Oct 2024 17:07:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E7=82=B9=E5=90=8D?= =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RollCallClient/src/assets/icons/iconfont.css | 18 +++- RollCallClient/src/assets/icons/iconfont.js | 2 +- RollCallClient/src/assets/icons/iconfont.json | 21 +++++ RollCallClient/src/assets/icons/iconfont.ttf | Bin 1972 -> 3488 bytes RollCallClient/src/assets/icons/iconfont.woff | Bin 1280 -> 2172 bytes .../src/assets/icons/iconfont.woff2 | Bin 912 -> 1688 bytes RollCallClient/src/views/RollCall.vue | 79 +++++++++++++++++- 7 files changed, 112 insertions(+), 8 deletions(-) diff --git a/RollCallClient/src/assets/icons/iconfont.css b/RollCallClient/src/assets/icons/iconfont.css index fd6fecd..594582f 100644 --- a/RollCallClient/src/assets/icons/iconfont.css +++ b/RollCallClient/src/assets/icons/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 4702540 */ - src: url('iconfont.woff2?t=1728542908069') format('woff2'), - url('iconfont.woff?t=1728542908069') format('woff'), - url('iconfont.ttf?t=1728542908069') format('truetype'); + src: url('iconfont.woff2?t=1728720001607') format('woff2'), + url('iconfont.woff?t=1728720001607') format('woff'), + url('iconfont.ttf?t=1728720001607') format('truetype'); } .iconfont { @@ -13,6 +13,18 @@ -moz-osx-font-smoothing: grayscale; } +.yaya-touzi:before { + content: "\e674"; +} + +.yaya-touzi1:before { + content: "\e601"; +} + +.yaya-touzi2:before { + content: "\e635"; +} + .yaya-xmark:before { content: "\e649"; } diff --git a/RollCallClient/src/assets/icons/iconfont.js b/RollCallClient/src/assets/icons/iconfont.js index 2d04634..8f5fffd 100644 --- a/RollCallClient/src/assets/icons/iconfont.js +++ b/RollCallClient/src/assets/icons/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_4702540='',(n=>{var t=(e=(e=document.getElementsByTagName("script"))[e.length-1]).getAttribute("data-injectcss"),e=e.getAttribute("data-disable-injectsvg");if(!e){var o,i,a,c,s,d=function(t,e){e.parentNode.insertBefore(t,e)};if(t&&!n.__iconfont__svg__cssinject__){n.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}o=function(){var t,e=document.createElement("div");e.innerHTML=n._iconfont_svg_string_4702540,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?d(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(o,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),o()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(a=o,c=n.document,s=!1,r(),c.onreadystatechange=function(){"complete"==c.readyState&&(c.onreadystatechange=null,l())})}function l(){s||(s=!0,a())}function r(){try{c.documentElement.doScroll("left")}catch(t){return void setTimeout(r,50)}l()}})(window); \ No newline at end of file +window._iconfont_svg_string_4702540='',(e=>{var t=(c=(c=document.getElementsByTagName("script"))[c.length-1]).getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var a,o,n,i,l,s=function(t,c){c.parentNode.insertBefore(t,c)};if(t&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(t){console&&console.log(t)}}a=function(){var t,c=document.createElement("div");c.innerHTML=e._iconfont_svg_string_4702540,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(t=document.body).firstChild?s(c,t.firstChild):t.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(a,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),a()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(n=a,i=e.document,l=!1,m(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,d())})}function d(){l||(l=!0,n())}function m(){try{i.documentElement.doScroll("left")}catch(t){return void setTimeout(m,50)}d()}})(window); \ No newline at end of file diff --git a/RollCallClient/src/assets/icons/iconfont.json b/RollCallClient/src/assets/icons/iconfont.json index bc745e7..bc1f8d3 100644 --- a/RollCallClient/src/assets/icons/iconfont.json +++ b/RollCallClient/src/assets/icons/iconfont.json @@ -5,6 +5,27 @@ "css_prefix_text": "yaya-", "description": "", "glyphs": [ + { + "icon_id": "2119065", + "name": "骰子", + "font_class": "touzi", + "unicode": "e674", + "unicode_decimal": 58996 + }, + { + "icon_id": "11868243", + "name": "骰子", + "font_class": "touzi1", + "unicode": "e601", + "unicode_decimal": 58881 + }, + { + "icon_id": "30016060", + "name": "骰子", + "font_class": "touzi2", + "unicode": "e635", + "unicode_decimal": 58933 + }, { "icon_id": "35012394", "name": "xmark", diff --git a/RollCallClient/src/assets/icons/iconfont.ttf b/RollCallClient/src/assets/icons/iconfont.ttf index 60c2e49fac87392e87cbc24c64a31d6624c18c13..9dc81d106c4d1f0537335062ba7ed8149f73b28d 100644 GIT binary patch literal 3488 zcmd^C?QdIG8GoMp>iAyU*S_|(>%^|@#7>)bPJ5F$s4rR8msF7^4XtZ55m@IX&P(x| z9A`@hY(WF1?IsOv0#Q{$NaF(_kPsh0NQez2U=ndyfGDK!J7O;n110=T2mv%|8i%A0zgm2hI+g$BgMyBtJ*; zqjR-#bNVM=XaI0N;(otay}0n+f6CVZ_*($dKb9)x`Tb9AcFFcFYNaJ2w_-o@g~WA)y7;|`nKdS%ip<{PI5p09EhyP;RvXNY$ z7LfluDSSY8w=brZ;XR1j5@Y@J0btp&i|PGv2qu6#HFf_(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!ItINqRUF-C%qU2d9<11DK^SI-WY7o5hFz*D4R1hY(ic!0_8;_rx)t)%^;ro` z8LJ~WofcJZM29pCt@kA^skBvR7$*s~EvVA5V?*$xxmh{&c$JRUv76XqY@H#G6mp4@^EC*Lj#s2mdeD+rAdcW5e90s zd!u1G8k{VH2BA@p%cjNjTs~|6BK08i9=j>!E={D!QKE`Enm}fCpBdjYGK3ZY001|hF@gX9 delta 897 zcmV-{1AhFN4Uh*IcTYw#00961000A!01E&B000NH0009)kr*C-914PDf;5vVHvaO(DXg+uCj=?Y94GS|C+cocHQS zcz^u26d^c`5-0CsZM0W@CZ4+Z?+t9TjJQ)mQx{V+}y9T8UqNHT*hR z83JrwCVzQkNf6a=dm~s8N||4nF0nU&M*{mvFg!q40kxi}<)MU^!2Ft*2AO?&rt)`g61UoVpOcb$vEmG?v;|&yc~pOL~1FbwjJJUCv9SSa`HOXZ~LL zZ;LgxGAoE(><~Y@>D+TRf5zt;oV(or$#wn3{Mg-pgg0gJtUcD02Z(C!!dD)S%S6x% zbv;vGiQ|B$@KO0->J#KI=>wGt^6sztj^~?We3tf%h629NP8tJ4H@jD@@2vYV_G=x9 z#ZFO5m5CXCc4-eVx9Cw%g8Ydp?Y^gQb=+<_)apo()EGckYlte`6sj~>LbY0ZQE!@S zd4mprS!q$~Fs6kNTFsF(`-rU76;-$|RO$AMYOVfI??N -import {onMounted, ref, watch} from 'vue' +import {onMounted, ref, watch, reactive} from 'vue' import {ElMessage, ElNotification} from 'element-plus' import {listStudent, rollCall, updatePoints} from "@/api/student.js"; @@ -9,11 +9,28 @@ const cards = ref([]) const canSelect = ref(true) const isResetting = ref(false) const dialogVisible = ref(false) +const dialogVisible2 = ref(false) const cardResult = ref({}) const studentTable = ref([]) const avatarUrl = ref('https://api.aspark.cc') const avatarKey = ref(0) const pointChange = ref(0) +const pointChange2 = ref(0) +const randomEvents = ref([ + { + title: "放他一马", + content: "有时候,放他一马,不是因为不在乎,而是因为明白,强求的结果只会让彼此更痛。放手的瞬间,心中隐隐作痛,却只能默默接受这无法改变的结局。(放过该同学,本次点名无效,请重新点名)" + }, + { + title: "天选之子", + content: "成为天选之子,看似幸运加身,实则背负孤独。所有人羡慕你的光环,却无人懂得你走过的黑暗。被命运选中,不是因为强大,而是因为只能独自面对那些无人能解的重担。(同学化身天选之子,本次点名积分 +10 )" + } +]) + +const currentRandomEvent = ref({ + title: '', + content: '' +}) // 洗牌 @@ -84,6 +101,7 @@ const selectCard = (index) => { const handleRestart = () => { dialogVisible.value = false + dialogVisible2.value = false if (isResetting.value) return isResetting.value = true canSelect.value = false @@ -184,17 +202,36 @@ onMounted(() => { }); const handlePointsChange = async () => { - if (pointChange.value === 0) { + if (pointChange.value === 0 && pointChange2.value === 0) { dialogVisible.value = false return } - const response = await updatePoints(cardResult.value.id, pointChange.value) + let response; + console.log(pointChange.value + ' ' + pointChange2.value) + if(pointChange2.value !== 0){ + response = await updatePoints(cardResult.value.id, pointChange2.value) + pointChange2.value = 0 + }else{ + response = await updatePoints(cardResult.value.id, pointChange.value) + } + if (response.code === 0) { ElMessage.error('失败,原因:' + response.msg) } dialogVisible.value = false } + +const luckThing = () => { + const lens = randomEvents.value.length + const randomIndex = Math.floor(Math.random() * lens); + currentRandomEvent.value = randomEvents.value[randomIndex] + if (randomIndex === 1) { + pointChange2.value = 10 + } + dialogVisible2.value = true; +}; + @@ -278,6 +315,14 @@ const handlePointsChange = async () => { > + + + { Coding the World. + + + + {{ currentRandomEvent.title }} + + + {{ currentRandomEvent.content }} + + + + + + + +
OG!4uO z*z>0QFaA2;2XQz6N8mJ^qupu3XW&`52H$}1!VlnOcolvNe}cE+Cfs4aAX;WwGT8c? zwC>}j!Z6Yv$Yz{4gJ~JTwq!)k(GJDQZhQgu5viOw% zQ86m;fXYT$;<+AK2!>@(=a=K;#he4GCHVqH4`Zp+P%8B|pQ>uA`a5TM#35s@^bwYPA1aq3`N)9wj^4H6XD*nD+Z=`C+y|(3yk$zEk@Z&O_E}zLcjgPWG}P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|B$@KO0->J#KI=>wGt^6sztj^~?We3tf%h629NP8tJ4H@jD@@2vYV_G=x9 z#ZFO5m5CXCc4-eVx9Cw%g8Ydp?Y^gQb=+<_)apo()EGckYlte`6sj~>LbY0ZQE!@S zd4mprS!q$~Fs6kNTFsF(`-rU76;-$|RO$AMYOVfI??N -import {onMounted, ref, watch} from 'vue' +import {onMounted, ref, watch, reactive} from 'vue' import {ElMessage, ElNotification} from 'element-plus' import {listStudent, rollCall, updatePoints} from "@/api/student.js"; @@ -9,11 +9,28 @@ const cards = ref([]) const canSelect = ref(true) const isResetting = ref(false) const dialogVisible = ref(false) +const dialogVisible2 = ref(false) const cardResult = ref({}) const studentTable = ref([]) const avatarUrl = ref('https://api.aspark.cc') const avatarKey = ref(0) const pointChange = ref(0) +const pointChange2 = ref(0) +const randomEvents = ref([ + { + title: "放他一马", + content: "有时候,放他一马,不是因为不在乎,而是因为明白,强求的结果只会让彼此更痛。放手的瞬间,心中隐隐作痛,却只能默默接受这无法改变的结局。(放过该同学,本次点名无效,请重新点名)" + }, + { + title: "天选之子", + content: "成为天选之子,看似幸运加身,实则背负孤独。所有人羡慕你的光环,却无人懂得你走过的黑暗。被命运选中,不是因为强大,而是因为只能独自面对那些无人能解的重担。(同学化身天选之子,本次点名积分 +10 )" + } +]) + +const currentRandomEvent = ref({ + title: '', + content: '' +}) // 洗牌 @@ -84,6 +101,7 @@ const selectCard = (index) => { const handleRestart = () => { dialogVisible.value = false + dialogVisible2.value = false if (isResetting.value) return isResetting.value = true canSelect.value = false @@ -184,17 +202,36 @@ onMounted(() => { }); const handlePointsChange = async () => { - if (pointChange.value === 0) { + if (pointChange.value === 0 && pointChange2.value === 0) { dialogVisible.value = false return } - const response = await updatePoints(cardResult.value.id, pointChange.value) + let response; + console.log(pointChange.value + ' ' + pointChange2.value) + if(pointChange2.value !== 0){ + response = await updatePoints(cardResult.value.id, pointChange2.value) + pointChange2.value = 0 + }else{ + response = await updatePoints(cardResult.value.id, pointChange.value) + } + if (response.code === 0) { ElMessage.error('失败,原因:' + response.msg) } dialogVisible.value = false } + +const luckThing = () => { + const lens = randomEvents.value.length + const randomIndex = Math.floor(Math.random() * lens); + currentRandomEvent.value = randomEvents.value[randomIndex] + if (randomIndex === 1) { + pointChange2.value = 10 + } + dialogVisible2.value = true; +}; + @@ -278,6 +315,14 @@ const handlePointsChange = async () => { > + + + { Coding the World. + + + + {{ currentRandomEvent.title }} + + + {{ currentRandomEvent.content }} + + + + + + + +
Coding the World.
{{ currentRandomEvent.content }}