From 19c4fa5ecff748bf187390e60c82846489e6600c Mon Sep 17 00:00:00 2001 From: chenruiye <862859104@qq.com> Date: Wed, 14 May 2025 11:00:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=B4=BB=E5=8A=A8=E6=A8=A1?= =?UTF-8?q?=E5=9D=97-=E8=AF=A6=E6=83=85=E5=92=8C=E5=88=86=E4=BA=AB?= =?UTF-8?q?=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/eventDetails/css/index.css | 33 ++- .../modules/eventDetails/css/index.scss | 81 ++++-- .../modules/eventDetails/css/shareIndex.css | 18 ++ .../modules/eventDetails/css/shareIndex.scss | 17 ++ .../modules/eventDetails/images/boy.png | Bin 0 -> 457 bytes .../modules/eventDetails/images/sub.png | Bin 0 -> 1077 bytes .../modules/eventDetails/images/woman.png | Bin 0 -> 468 bytes view/molistar/modules/eventDetails/index.html | 77 +++--- .../molistar/modules/eventDetails/js/index.js | 246 +++++++++++++++++- .../modules/eventDetails/js/shareIndex.js | 54 +++- .../molistar/modules/eventDetails/local/ar.js | 13 + .../molistar/modules/eventDetails/local/en.js | 14 +- .../molistar/modules/eventDetails/local/tr.js | 14 + .../molistar/modules/eventDetails/local/zh.js | 14 + .../modules/eventDetails/shareIndex.html | 17 +- 15 files changed, 520 insertions(+), 78 deletions(-) create mode 100644 view/molistar/modules/eventDetails/images/boy.png create mode 100644 view/molistar/modules/eventDetails/images/sub.png create mode 100644 view/molistar/modules/eventDetails/images/woman.png diff --git a/view/molistar/modules/eventDetails/css/index.css b/view/molistar/modules/eventDetails/css/index.css index 25c8958..4071908 100644 --- a/view/molistar/modules/eventDetails/css/index.css +++ b/view/molistar/modules/eventDetails/css/index.css @@ -39,6 +39,7 @@ body { height: 0.5866666667rem; position: absolute; right: 0.24rem; + display: none; } .user_info { @@ -54,6 +55,7 @@ body { .user_info .left .felx_box .avatar img { width: 0.9333333333rem; height: 0.9333333333rem; + border-radius: 50%; } .user_info .left .felx_box .box_right { margin-left: 0.16rem; @@ -78,7 +80,7 @@ body { text-transform: none; line-height: 0.4533333333rem; } -.user_info .right { +.user_info .right_btn .right { background: #FFFFFF; border-radius: 0.4533333333rem; border: 0.0266666667rem solid #D9D9D9; @@ -87,11 +89,11 @@ body { align-items: center; justify-content: center; } -.user_info .right img { +.user_info .right_btn .right img { width: 0.48rem; height: 0.48rem; } -.user_info .right .Unsub { +.user_info .right_btn .right .txt { font-family: PingFang SC, PingFang SC; font-weight: 500; font-size: 0.3466666667rem; @@ -102,6 +104,9 @@ body { text-transform: none; margin-left: 0.1066666667rem; } +.user_info .right_btn .right_Unsub, .user_info .right_btn .right_Sub, .user_info .right_btn .right_Participate { + display: none; +} .banner { margin: 0.2666666667rem 0.4rem 0; @@ -203,6 +208,7 @@ body { .sub_list .sub_box .info .avatar img { width: 0.9333333333rem; height: 0.9333333333rem; + border-radius: 50%; } .sub_list .sub_box .info .box_right { margin-left: 0.16rem; @@ -216,6 +222,12 @@ body { font-style: normal; text-transform: none; line-height: 0.5333333333rem; + display: flex; + align-items: center; +} +.sub_list .sub_box .info .box_right .userLevelVo img { + width: 0.7733333333rem; + height: 0.3466666667rem; } .sub_list .sub_box .time { font-family: PingFang SC, PingFang SC; @@ -226,4 +238,19 @@ body { text-align: right; font-style: normal; text-transform: none; +} + +.gender { + width: 0.3733333333rem; + height: 0.3733333333rem; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + background: #6BB3FF; + margin: 0 0.08rem; +} +.gender img { + width: 0.2133333333rem; + height: 0.2133333333rem; } \ No newline at end of file diff --git a/view/molistar/modules/eventDetails/css/index.scss b/view/molistar/modules/eventDetails/css/index.scss index f8a988a..3e4f6ad 100644 --- a/view/molistar/modules/eventDetails/css/index.scss +++ b/view/molistar/modules/eventDetails/css/index.scss @@ -49,6 +49,7 @@ body { height: px2rem(44); position: absolute; right: px2rem(18); + display: none; } } @@ -67,6 +68,7 @@ body { img { width: px2rem(70); height: px2rem(70); + border-radius: 50%; } } @@ -98,32 +100,39 @@ body { } } - .right { - background: #FFFFFF; - border-radius: px2rem(34); - border: px2rem(2) solid #D9D9D9; - padding: px2rem(8) px2rem(18); - display: flex; - align-items: center; - justify-content: center; - - img { - width: px2rem(36); - height: px2rem(36); + .right_btn{ + .right { + background: #FFFFFF; + border-radius: px2rem(34); + border: px2rem(2) solid #D9D9D9; + padding: px2rem(8) px2rem(18); + display: flex; + align-items: center; + justify-content: center; + img { + width: px2rem(36); + height: px2rem(36); + } + + .txt { + font-family: PingFang SC, PingFang SC; + font-weight: 500; + font-size: px2rem(26); + color: #313131; + line-height: px2rem(36); + text-align: left; + font-style: normal; + text-transform: none; + margin-left: px2rem(8); + } } - - .Unsub { - font-family: PingFang SC, PingFang SC; - font-weight: 500; - font-size: px2rem(26); - color: #313131; - line-height: px2rem(36); - text-align: left; - font-style: normal; - text-transform: none; - margin-left: px2rem(8); + .right_Unsub,.right_Sub,.right_Participate{ + display: none; } } + + + } .banner { @@ -233,12 +242,13 @@ margin-bottom: px2rem(20); img { width: px2rem(70); height: px2rem(70); + border-radius: 50%; } } .box_right { margin-left: px2rem(12); - + .name { font-family: PingFang SC, PingFang SC; font-weight: 400; @@ -248,6 +258,14 @@ margin-bottom: px2rem(20); font-style: normal; text-transform: none; line-height: px2rem(40); + display: flex; + align-items: center; + } + .userLevelVo{ + img{ + width: px2rem(58); + height: px2rem(26); + } } } } @@ -262,4 +280,19 @@ font-style: normal; text-transform: none; } } +} +.gender{ + width: px2rem(28); +height: px2rem(28); +border-radius: 50%; +display: flex; +align-items: center; +justify-content: center; +background: #6BB3FF; +margin: 0 px2rem(6); +img{ + width: px2rem(16); + height: px2rem(16); +} + // background: #FF80CC; } \ No newline at end of file diff --git a/view/molistar/modules/eventDetails/css/shareIndex.css b/view/molistar/modules/eventDetails/css/shareIndex.css index c372073..cdacf30 100644 --- a/view/molistar/modules/eventDetails/css/shareIndex.css +++ b/view/molistar/modules/eventDetails/css/shareIndex.css @@ -26,6 +26,9 @@ body { font-style: normal; text-transform: none; margin-top: 0.24rem; + display: flex; + align-items: center; + justify-content: center; } .user_info .id_num { font-family: PingFang SC, PingFang SC; @@ -140,4 +143,19 @@ body { justify-content: center; padding: 0.24rem 1.1733333333rem; margin: 0.5333333333rem 1.8666666667rem; +} + +.gender { + width: 0.3733333333rem; + height: 0.3733333333rem; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + background: #6BB3FF; + margin: 0 0.08rem; +} +.gender img { + width: 0.2133333333rem; + height: 0.2133333333rem; } \ No newline at end of file diff --git a/view/molistar/modules/eventDetails/css/shareIndex.scss b/view/molistar/modules/eventDetails/css/shareIndex.scss index 3958cad..343d4ec 100644 --- a/view/molistar/modules/eventDetails/css/shareIndex.scss +++ b/view/molistar/modules/eventDetails/css/shareIndex.scss @@ -32,6 +32,9 @@ text-align: center; font-style: normal; text-transform: none; margin-top: px2rem(18); +display: flex; +align-items: center; +justify-content: center; } .id_num{ font-family: PingFang SC, PingFang SC; @@ -152,4 +155,18 @@ align-items: center; justify-content: center; padding: px2rem(18) px2rem(88); margin: px2rem(40) px2rem(140); +} +.gender{ + width: px2rem(28); +height: px2rem(28); +border-radius: 50%; +display: flex; +align-items: center; +justify-content: center; +background: #6BB3FF; +margin: 0 px2rem(6); +img{ + width: px2rem(16); + height: px2rem(16); +} } \ No newline at end of file diff --git a/view/molistar/modules/eventDetails/images/boy.png b/view/molistar/modules/eventDetails/images/boy.png new file mode 100644 index 0000000000000000000000000000000000000000..290a14454d9bdf485b396b7e13e2ab0e10273c2c GIT binary patch literal 457 zcmV;)0XF`LP)Px$gGod|R5(wi(@%&`Q5eSY&r_n1NTmFW1=%PTLP}yGl+tWW$yO9eHlmOz3kz&) zSt&*-%0k)6Sg@u^q%0&mD+{mAxW;eB?>83Sx}AGF=YD(M=Xp>3XJw}Ut7;gl2b>vC zGCB}YRg3WjgUiF^&yMn!8h~s%GJBXXtV~!j`7E0rsOAbu-DSL32@6t*v9& z)y>AnBxf4nARgjclCv`aZs24~BS~v{q8ea5-ZT@Fw7&XQRlUZhW^9u8lYlOTS7@Ps4VhDFIw~YqAVSaZP z+WV0t&8sOjeUw+?G};|#qx>09aXrbWe&+lHZ*+uad{beO00000NkvXXu0mjfx(v_M literal 0 HcmV?d00001 diff --git a/view/molistar/modules/eventDetails/images/sub.png b/view/molistar/modules/eventDetails/images/sub.png new file mode 100644 index 0000000000000000000000000000000000000000..fd662c527ffc92a79d747baab1ce6371bc437b8a GIT binary patch literal 1077 zcmV-51j_q~P)Px&?@2^KR9HvNmQQFDcO1pv`^~y;j0qbe8X)IH%Qpjq-lZ%Vh@U_ zXu+}w1uq^vMDQZ47%|B%nhX%(RhGKhpUlo=XJ%*T z-$v1#mMlB-`M&qQ@Ao4E;7}oDT{W2k)9U^fUcGW$^ayoZay%3G6<9}(8B1BuZt3M zBx9EF>Mu3`te?vYm0(OOr4Xmr{c!87ACxDMmYLNph5IBwH!LVyQY|}HyPRqvFBIjQ zrorDmYrzv}A+z(aEXu4FTALbvc2!tch7&?<8vL!_OC?XB-002+AirGBi*3Dq?Wz`h z0m!8-P5ad+Zcwg3|7H@cij@C^39o5uWeu1?r@-;}z|GOnK)Gy3H>I3$gtuguFxT6% z>b^?q8#)pnxbb6Xpr_fyF$sJ5Xz}Xql$1>Sca2p&OLp9QN^RVGy%wO(6eQBl=Jg0{kj(>D00fbC zEjyR436M3lq5oP93QZ(alr$9z15n;PGdrfzP#gLt!vj5^NT!Nbg{vJwsjqE>{j~mh4B4Q0sfI zga>*t`Q0f=oU4Ay`xT{2lWXt-cj|ktbcQO%SChS;y`}sUWZeIhw={VGE42X?isP~F zv8v~pqZo5nyEaFo(R%<|O}osA!xg2QlA<7l?2C1c%~mR91A2b#+g5PZJ%IYXIl#o# zHp%_BW~q|MLy7doI)`stp=>}ee(9Z(;9&U@?^ti=ec2gad-qf=O0z;1V#!Mz-GQdQ zKLyDlkP-jv=!a%ig}er_^ppVaM3cj|fIBj@cq6fP)$4e~=54&vX~#eO?(P-e$ALJ| z)RBJanW3Ohy?Z7R+1|G4S8a!dFlN%O7@8FVh)51ad$NB8eV(gjVIJ_GdhkAoHv2uO zWMP5-zui{XKkj;OuKAMh^~2Y<4t7h58AsNL;Wc|QKZP0Yy(pwTBtLT~xdbspunpi7 v2#(a%J-Wb-xxz;Qs`aHG#Ig?oqdoH-z~9>?vPx$j!8s8R5(w4(@Ut0Q5eSY-y<=g9OjB5>KMxzDxqXTk}@O{q)sj=C7FoaMlNGg zB#L6hL}8#LiDV*W;u6Kc<<&ZU`?NduK5O*#erx^L^FHshVwzP|3$Y2y@dwXwGs&mk zu?#w2RWooD2QYieo^P$5>$8r%*V1MZ-xL`EA67Eg8)tXOe{$9We8v;p5WC4 zpsGfaeC@v9VKG)Gc{l{H6PKF7sj9u5DF>6Bs;YBnwdVYqB!8!vI2X^b6nh$A8?JOC zZF9ehmzalJ4VL76r*0INF@~meMX!Z%oa}>4Bo1@X6uj+nu&7h>5o?pYm^87f+Q^P| z8=8{4IDz$@sqNQKT*u)gA10GnRV`&Vu(7Y-{hcQxSkk?P*GYc#d(vy+d@}^!(L%DL zYi9y7-Gl1^4t3ezp5#$g^?Ndw
Namename
-
ID:4451212
+
ID:
-
- -
Unsub
+
+
+
+ +
Unsub
+
+
+
+
+ +
Sub
+
+
+
+
+ +
Participate
+
+
-
Singing competition. Welcome to participate!!
+
- Start Time:2025-02-12 21:00 + Start Time :
- Room ID:9854522 + Room ID :
- With songs as wings, sing out the future! Seek the brightest stars and let - the world hear your voice! With songs as wings, sing out the future! Seek - the brightest stars and let the world hear your voice!
-
Sub (321)
-
+
Sub()
+
+
diff --git a/view/molistar/modules/eventDetails/js/index.js b/view/molistar/modules/eventDetails/js/index.js index beb55f1..905684e 100644 --- a/view/molistar/modules/eventDetails/js/index.js +++ b/view/molistar/modules/eventDetails/js/index.js @@ -1,5 +1,6 @@ let urlPrefix = getUrlPrefix() let browser = checkVersion() +const urlData = getQueryString(); let env = EnvCheck(); if (env == 'test') { new VConsole(); @@ -53,25 +54,68 @@ $(function () { langReplace = window.lang.replace; localLang = window.lang; translateFun(); - // getData() - + getData() + getSubList(); }, 100) }) function translateFun() { var langReplace = window.lang.replace; var localLang = window.lang; - $('.Confirm').html(langReplace(localLang.demoModule.Confirm)); + $('.page_title').html(langReplace(localLang.demoModule.page_title)); + $('.active_info .time .Start_Time').html(langReplace(localLang.demoModule.Start_Time)); + $('.active_info .room .Room_ID').html(langReplace(localLang.demoModule.Room_ID)); + $('.Unsub').html(langReplace(localLang.demoModule.Unsub)); + $('.Sub').html(langReplace(localLang.demoModule.Sub)); + $('.Participate').html(langReplace(localLang.demoModule.Participate)); + } function getData() { showLoading(); networkRequest({ type: "GET", - url: urlPrefix + "/bdGuild/center", + url: urlPrefix + "/userevent/detail", data: { + eventId: urlData.eventId, + uid: pubInfo.uid + // uid:3203 }, success: function (res) { hideLoading(layerIndex); + if (res.code == 200) { + $('.user_info .left .felx_box .avatar img').attr('src', res.data.avatar) + $('.user_info .left .felx_box .box_right .name').text(res.data.nick) + $('.user_info .left .felx_box .box_right .roomErbanNo').text(res.data.erbanNo) + $('.banner img').attr('src', res.data.eventBanner) + $('.erbanNo').text(res.data.erbanNo) + $('.eventStartTimeStr').text(res.data.eventStartTimeStr) + $('.title_name').text(res.data.eventTopic) + $('.content_description').text(res.data.eventDetail) + $('.subNum').text(res.data.subNum) + $('.right_Participate').attr('roomUid',res.data.roomUid) + if (res.data.eventStatus == 1) { + if (res.data.liveStatus == 1 || res.data.liveStatus == 2) { + $('.back .share').show() + } + if(res.data.liveStatus == 1 || res.data.liveStatus == 3){ + if(res.data.subStatus){ + $('.right_Sub').show(); + $('.right_Unsub').hide(); + }else{ + $('.right_Unsub').show(); + $('.right_Sub').hide(); + } + }else{ + $('.right_Sub').hide(); + $('.right_Unsub').hide(); + $('.right_Participate').show(); + } + } else { + $('.user_info .right_btn').hide() + } + } else { + toastMsg(res.message) + } }, error: function (res) { console.log(res, "报错啦"); @@ -79,7 +123,195 @@ function getData() { }, }) } +var page = 1; +var pageSize = 20; +var canNext = true; +var subList = []; +var resPageLength; +function getSubList() { + showLoading(); + networkRequest({ + type: "GET", + url: urlPrefix + "/userevent/subList", + data: { + eventId: urlData.eventId, + uid: pubInfo.uid, + // uid: 3838, + page, + pageSize + }, + success: function (res) { + hideLoading(layerIndex); + if (res.code == 200) { + $('.sub_content .sub_box').remove(); + let str = '' + resPageLength = res.data.subUser.length; + subList = [...subList, ...res.data.subUser] + subList.forEach((item, i) => { + str += ` +
+
+
+ +
+
+
${item.nick} +
+ +
+
+
+ +
+
+
+
${item.subTimeStr}
+
+ ` + + }) + $('.sub_content').append(str) + } else { + toastMsg(res.message) + } + }, + error: function (res) { + hideLoading(layerIndex); + }, + }) +} +function subSun(subStatus) { + showLoading(); + networkRequest({ + type: "POST", + url: urlPrefix + "/userevent/sub", + data: { + eventId: urlData.eventId, + // uid: 3203, + subStatus, + uid: pubInfo.uid + }, + success: function (res) { + hideLoading(layerIndex); + if (res.code == 200) { + if (subStatus == 1) { + toastMsg(langReplace(localLang.demoModule.Sub_successful)) + + } else { + toastMsg(langReplace(localLang.demoModule.Cancel_successful)) + + } + page = 1; + canNext = true; + subList = []; + resPageLength = 0; + getSubList(); + getData(); + } else { + toastMsg(res.message) + } + }, + error: function (res) { + hideLoading(layerIndex); + }, + }) +} +// 订阅 +$('.right_Unsub').click(function () { + subSun(1); +}) +// 取消订阅 +$('.right_Sub').click(function () { + subSun(0); +}) $('.share').click(function () { - window.location.href = `./shareIndex.html` - return -}) \ No newline at end of file + genLink(); + shareData(); + // window.location.href = `./shareIndex.html` + // return +}) +function genLink(){ + showLoading(); + networkRequest({ + type: "POST", + url: urlPrefix + "/userevent/genLink", + data: { + eventId: urlData.eventId, + // pub_uid: 3838, + pub_uid: pubInfo.uid + }, + success: function (res) { + hideLoading(layerIndex); + if (res.code == 200) { + let text = res.data; + if (navigator.clipboard) { + // 使用 navigator.clipboard API + navigator.clipboard.writeText(text) + .then(function () { + toastMsg(langReplace(localLang.demoModule.Copy_Successfully)) + }) + .catch(function (error) { + }); + } else { + // 使用 document.execCommand("copy") 作为备用方案 + var $temp = $("