From 87029698607c3f93bec3d027c0e438460dcf89d2 Mon Sep 17 00:00:00 2001 From: chenruiye <862859104@qq.com> Date: Wed, 28 May 2025 15:17:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=97=A5=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../molistar/modules/taskCenter/css/index.css | 49 ++++-- .../modules/taskCenter/css/index.scss | 101 ++++++++---- view/molistar/modules/taskCenter/css/mall.css | 74 ++++++++- .../molistar/modules/taskCenter/css/mall.scss | 82 +++++++++- .../modules/taskCenter/css/pointsDetails.css | 120 ++++++++++++++ .../modules/taskCenter/css/pointsDetails.scss | 142 ++++++++++++++++ view/molistar/modules/taskCenter/index.html | 5 +- view/molistar/modules/taskCenter/js/index.js | 86 +++++----- view/molistar/modules/taskCenter/js/mall.js | 66 +++++++- .../modules/taskCenter/js/pointsDetails.js | 154 ++++++++++++++++++ view/molistar/modules/taskCenter/local/ar.js | 33 ++-- view/molistar/modules/taskCenter/local/en.js | 33 ++-- view/molistar/modules/taskCenter/local/tr.js | 32 ++-- view/molistar/modules/taskCenter/local/zh.js | 33 ++-- view/molistar/modules/taskCenter/mall.html | 11 +- .../modules/taskCenter/pointsDetails.html | 57 +++++++ 16 files changed, 938 insertions(+), 140 deletions(-) create mode 100644 view/molistar/modules/taskCenter/css/pointsDetails.css create mode 100644 view/molistar/modules/taskCenter/css/pointsDetails.scss create mode 100644 view/molistar/modules/taskCenter/js/pointsDetails.js create mode 100644 view/molistar/modules/taskCenter/pointsDetails.html diff --git a/view/molistar/modules/taskCenter/css/index.css b/view/molistar/modules/taskCenter/css/index.css index 6c52bde5..2f9872a6 100644 --- a/view/molistar/modules/taskCenter/css/index.css +++ b/view/molistar/modules/taskCenter/css/index.css @@ -44,7 +44,7 @@ body { .top .info { display: flex; align-items: center; - padding-top: 2.4rem; + padding-top: 2.6666666667rem; margin: 0 0.4rem; } .top .info .goldBean_info { @@ -127,10 +127,10 @@ body { } .top .check_List .signDayList .signDay_box .reward_active { background: linear-gradient(180deg, #FFF8E2 26%, #FFECB0 100%) !important; - border: 0.0266666667rem solid #FFD555; + border: 0.0266666667rem solid #FFD555 !important; } .top .check_List .signDayList .signDay_box .reward_unsigned_active { - border: 0.0266666667rem solid #DCDCDC; + border: 0.0266666667rem solid #DCDCDC !important; } .top .check_List .signDayList .signDay_box .img_box { background: #F2F3F7; @@ -138,11 +138,21 @@ body { width: 1.12rem; height: 1.68rem; text-align: center; + border: 0.0266666667rem solid transparent; } -.top .check_List .signDayList .signDay_box .img_box img { +.top .check_List .signDayList .signDay_box .img_box .img { width: 0.7466666667rem; height: 0.7466666667rem; - margin-top: 0.1066666667rem; + margin: 0.1066666667rem auto 0; + display: flex; + align-items: center; + justify-content: center; +} +.top .check_List .signDayList .signDay_box .img_box img { + width: auto; + height: auto; + max-width: 100%; + max-height: 100%; } .top .check_List .signDayList .signDay_box .img_box .reward_name { font-family: PingFang SC, PingFang SC; @@ -183,9 +193,18 @@ body { align-items: center; justify-content: center; } -.top .check_List .reward_info .reward_box img { +.top .check_List .reward_info .reward_box .img { width: 0.7466666667rem; height: 0.7466666667rem; + display: flex; + align-items: center; + justify-content: center; +} +.top .check_List .reward_info .reward_box .img img { + width: auto; + height: auto; + max-width: 100%; + max-height: 100%; } .top .check_List .reward_info .reward_box .num { font-family: PingFang SC, PingFang SC; @@ -209,7 +228,11 @@ body { text-transform: none; margin: 0 0.1866666667rem; } -.top .check_List .Sign_btn { +.top .check_btn { + display: none; + margin: 0.8533333333rem 0.72rem 0; +} +.top .Sign_btn { background: linear-gradient(270deg, #E29030 0%, #FCC074 100%); border-radius: 0.6666666667rem; font-family: PingFang SC, PingFang SC; @@ -226,13 +249,14 @@ body { padding: 0.2133333333rem; margin: 0.2666666667rem 0 0; } -.top .check_List .sign_btn_active { +.top .sign_btn_active { background: #F2F3F7; color: #AFB1B3; } .Daily_list { margin: 4rem 0.32rem; + padding-bottom: 1.3333333333rem; } .Daily_list .top_box { display: flex; @@ -281,7 +305,6 @@ body { font-size: 0.3466666667rem; color: #313131; line-height: 0.48rem; - text-align: left; font-style: normal; text-transform: none; } @@ -321,9 +344,15 @@ body { display: flex; align-items: center; justify-content: center; - padding: 0.1066666667rem 0.3733333333rem; + padding: 0.1066666667rem 0; + min-width: 1.9466666667rem; } .Daily_list .task_List .task_box .right .Receive_btn_RECEIVED { background: #F2F3F7; color: #AFB1B3; +} + +.arabic .Daily_list .task_List .task_box .right { + margin-left: 0; + margin-right: auto; } \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/css/index.scss b/view/molistar/modules/taskCenter/css/index.scss index 2669139e..b15a693f 100644 --- a/view/molistar/modules/taskCenter/css/index.scss +++ b/view/molistar/modules/taskCenter/css/index.scss @@ -55,7 +55,7 @@ body { .info { display: flex; align-items: center; - padding-top: px2rem(180); + padding-top: px2rem(200); margin: 0 px2rem(30); .goldBean_info { @@ -150,11 +150,11 @@ body { .reward_active { background: linear-gradient(180deg, #FFF8E2 26%, #FFECB0 100%) !important; - border: px2rem(2) solid #FFD555; + border: px2rem(2) solid #FFD555 !important; } .reward_unsigned_active { - border: px2rem(2) solid #DCDCDC; + border: px2rem(2) solid #DCDCDC !important; } .img_box { @@ -164,11 +164,23 @@ body { width: px2rem(84); height: px2rem(126); text-align: center; + border: px2rem(2) solid transparent; - img { + .img { width: px2rem(56); height: px2rem(56); - margin-top: px2rem(8); + margin: px2rem(8) auto 0; + display: flex; + align-items: center; + justify-content: center; + } + + img { + width: auto; // 自适应宽度 + height: auto; // 自适应高度 + max-width: 100%; // 最大宽度不超过容器 + max-height: 100%; // 最大高度不超过容器 + } .reward_name { @@ -198,13 +210,15 @@ body { } .reward_info { - display: none; + display: none; margin-top: px2rem(20); - .flex_box{ + + .flex_box { display: flex; align-items: center; justify-content: center; } + .reward_box { background: linear-gradient(180deg, #FFF8E2 26%, #FFECB0 100%); border-radius: px2rem(16); @@ -214,10 +228,19 @@ body { align-items: center; justify-content: center; - img { + .img { width: px2rem(56); height: px2rem(56); // border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + img{ + width: auto; + height: auto; + max-width: 100%; // 最大宽度不超过容器 + max-height: 100%; // 最大高度不超过容器 + } } .num { @@ -247,33 +270,41 @@ body { } - .Sign_btn { - background: linear-gradient(270deg, #E29030 0%, #FCC074 100%); - border-radius: px2rem(50); - font-family: PingFang SC, PingFang SC; - font-weight: 600; - font-size: px2rem(28); - color: #FFFFFF; - text-align: center; - font-style: normal; - text-transform: none; - line-height: px2rem(40); - display: flex; - align-items: center; - justify-content: center; - padding: px2rem(16); - margin: px2rem(20) 0 0; - } - .sign_btn_active { - background: #F2F3F7; - color: #AFB1B3; - } + } + + .check_btn { + display: none; + margin: px2rem(64) px2rem(54) 0; + } + + .Sign_btn { + background: linear-gradient(270deg, #E29030 0%, #FCC074 100%); + border-radius: px2rem(50); + font-family: PingFang SC, PingFang SC; + font-weight: 600; + font-size: px2rem(28); + color: #FFFFFF; + text-align: center; + font-style: normal; + text-transform: none; + line-height: px2rem(40); + display: flex; + align-items: center; + justify-content: center; + padding: px2rem(16); + margin: px2rem(20) 0 0; + } + + .sign_btn_active { + background: #F2F3F7; + color: #AFB1B3; } } .Daily_list { margin: px2rem(300) px2rem(24); + padding-bottom: px2rem(100); .top_box { display: flex; @@ -327,7 +358,7 @@ body { font-size: px2rem(26); color: #313131; line-height: px2rem(36); - text-align: left; + // text-align: left; font-style: normal; text-transform: none; } @@ -373,7 +404,8 @@ body { display: flex; align-items: center; justify-content: center; - padding: px2rem(8) px2rem(28); + padding: px2rem(8) 0; + min-width: px2rem(146); } .Receive_btn_RECEIVED { @@ -383,4 +415,11 @@ body { } } } +} + +.arabic { + .Daily_list .task_List .task_box .right { + margin-left: 0; + margin-right: auto; + } } \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/css/mall.css b/view/molistar/modules/taskCenter/css/mall.css index c834f210..0077211b 100644 --- a/view/molistar/modules/taskCenter/css/mall.css +++ b/view/molistar/modules/taskCenter/css/mall.css @@ -1,3 +1,4 @@ +@charset "UTF-8"; html, body { height: 100%; @@ -144,9 +145,18 @@ body { box-sizing: border-box; border: 0.0266666667rem solid #FFFFFF; } -.top .Exchange_list .shops_list .shop_box .pic { +.top .Exchange_list .shops_list .shop_box .img { width: 3.6266666667rem; height: 3.6266666667rem; + display: flex; + align-items: center; + justify-content: center; +} +.top .Exchange_list .shops_list .shop_box .img .pic { + width: auto; + height: auto; + max-width: 100%; + max-height: 100%; } .top .Exchange_list .shops_list .shop_box .shopName { font-family: PingFang SC, PingFang SC; @@ -205,4 +215,66 @@ body { font-style: normal; text-transform: none; padding: 0.2666666667rem; +} + +.popup_tip { + display: none; + /* 初始状态下隐藏弹窗 */ + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + z-index: 9999; + /* 确保弹窗在最顶层 */ +} +.popup_tip .popup_content { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 6.6666666667rem; + padding: 0.3733333333rem 0.6133333333rem; + background: #FFFFFF; + border-radius: 0.4266666667rem; +} +.popup_tip .popup_content .title { + font-family: PingFang SC, PingFang SC; + font-weight: 500; + font-size: 0.4rem; + color: #313131; + line-height: 0.56rem; + text-align: center; + font-style: normal; + text-transform: none; +} +.popup_tip .popup_content .content { + font-family: PingFang SC, PingFang SC; + font-weight: 400; + font-size: 0.3466666667rem; + color: #313131; + line-height: 0.48rem; + text-align: center; + font-style: normal; + text-transform: none; + margin-top: 0.32rem; +} +.popup_tip .popup_content .tip_btn { + background: linear-gradient(270deg, #E29030 0%, #FCC074 100%); + border-radius: 0.6666666667rem; + font-family: PingFang SC, PingFang SC; + font-weight: 600; + font-size: 0.3733333333rem; + color: #FFFFFF; + line-height: 0.5333333333rem; + text-align: center; + font-style: normal; + text-transform: none; + padding: 0.2666666667rem; + margin-top: 0.4rem; +} + +.arabic .top .info .right .arrow_left { + transform: rotate(180deg); } \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/css/mall.scss b/view/molistar/modules/taskCenter/css/mall.scss index 57f97352..d24188b2 100644 --- a/view/molistar/modules/taskCenter/css/mall.scss +++ b/view/molistar/modules/taskCenter/css/mall.scss @@ -169,10 +169,21 @@ body { padding: px2rem(20) px2rem(30); box-sizing: border-box; border: px2rem(2) solid #FFFFFF; - .pic { + + .img{ width: px2rem(272); height: px2rem(272); + display: flex; + align-items: center; + justify-content: center; + .pic { + width: auto; // 自适应宽度 + height: auto; // 自适应高度 + max-width: 100%; // 最大宽度不超过容器 + max-height: 100%; // 最大高度不超过容器 + } } + .shopName { font-family: PingFang SC, PingFang SC; @@ -242,4 +253,73 @@ body { text-transform: none; padding: px2rem(20); +} + +.popup_tip { + display: none; + /* 初始状态下隐藏弹窗 */ + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + z-index: 9999; + + // padding: 0 px2rem(50); + // box-sizing: border-box; + /* 确保弹窗在最顶层 */ + .popup_content { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: px2rem(500); + padding: px2rem(28) px2rem(46); + background: #FFFFFF; + border-radius: px2rem(32); + + .title { + font-family: PingFang SC, PingFang SC; + font-weight: 500; + font-size: px2rem(30); + color: #313131; + line-height: px2rem(42); + text-align: center; + font-style: normal; + text-transform: none; + } + + .content { + font-family: PingFang SC, PingFang SC; + font-weight: 400; + font-size: px2rem(26); + color: #313131; + line-height: px2rem(36); + text-align: center; + font-style: normal; + text-transform: none; + margin-top: px2rem(24); + } + + .tip_btn { + background: linear-gradient(270deg, #E29030 0%, #FCC074 100%); + border-radius: px2rem(50); + font-family: PingFang SC, PingFang SC; + font-weight: 600; + font-size: px2rem(28); + color: #FFFFFF; + line-height: px2rem(40); + text-align: center; + font-style: normal; + text-transform: none; + padding: px2rem(20); + margin-top: px2rem(30); + } + } +} +.arabic{ + .top .info .right .arrow_left{ + transform: rotate(180deg); + } } \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/css/pointsDetails.css b/view/molistar/modules/taskCenter/css/pointsDetails.css new file mode 100644 index 00000000..f1d4d318 --- /dev/null +++ b/view/molistar/modules/taskCenter/css/pointsDetails.css @@ -0,0 +1,120 @@ +html, +body { + height: 100%; + background: #FFFFFF; +} + +.back { + width: 100%; + height: 0.5866666667rem; + line-height: 0.5866666667rem; + position: fixed; + left: 0; + top: 0; + padding-top: 1.4666666667rem; + padding-bottom: 0.2933333333rem; + text-align: center; + color: #FFFFFF; + font-size: 0.5066666667rem; + font-weight: bold; + z-index: 10; +} +.back img { + width: 0.5866666667rem; + height: 0.5866666667rem; + position: absolute; + left: 0.24rem; +} +.back p { + font-family: PingFang SC, PingFang SC; + font-weight: 500; + font-size: 0.4266666667rem; + color: #313131; + text-align: center; + font-style: normal; + text-transform: none; +} + +.tab_list { + display: flex; + align-items: center; + justify-content: center; + gap: 1.3333333333rem; + padding-top: 2.6666666667rem; + position: fixed; + top: 0; + width: 100%; + background: #FFFFFF; +} +.tab_list .tab_box { + font-family: PingFang SC, PingFang SC; + font-weight: 500; + font-size: 0.4266666667rem; + color: #AFB1B3; + line-height: 0.5866666667rem; + text-align: center; + font-style: normal; + text-transform: none; +} +.tab_list .tab_active { + color: #313131; + position: relative; +} +.tab_list .tab_active::after { + content: ""; + display: block; + width: 0.3466666667rem; + height: 0.1066666667rem; + background: linear-gradient(270deg, #E29030 0%, #FCC074 100%); + border-radius: 13.44rem; + position: absolute; + left: 50%; + transform: translateX(-50%); +} + +.data_list { + margin: 3.7333333333rem 0.4266666667rem 0; +} +.data_list .data_box { + display: flex; + align-items: center; + justify-content: space-between; + padding-bottom: 0.32rem; + margin-top: 0.32rem; + border-bottom: 0.0133333333rem solid #E4E4E4; +} +.data_list .data_box .left .title { + font-family: PingFang SC, PingFang SC; + font-weight: 600; + font-size: 0.4266666667rem; + color: #313131; + line-height: 0.5866666667rem; + text-align: left; + font-style: normal; + text-transform: none; +} +.data_list .data_box .left .createTime { + font-family: PingFang SC, PingFang SC; + font-weight: 400; + font-size: 0.3466666667rem; + color: #7B7B7D; + line-height: 0.48rem; + font-style: normal; + text-transform: none; + margin-top: 0.2133333333rem; +} +.data_list .data_box .right .operateBean { + font-family: PingFang SC, PingFang SC; + font-weight: 600; + font-size: 0.5333333333rem; + color: #313131; + line-height: 0.7466666667rem; + text-align: right; + font-style: normal; + text-transform: none; +} +.data_list .data_box .right img { + width: 0.6666666667rem; + height: 0.6666666667rem; + margin: 0 0.0533333333rem; +} \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/css/pointsDetails.scss b/view/molistar/modules/taskCenter/css/pointsDetails.scss new file mode 100644 index 00000000..5497d3b9 --- /dev/null +++ b/view/molistar/modules/taskCenter/css/pointsDetails.scss @@ -0,0 +1,142 @@ +@charset "UTF-8"; + +@function px2rem($px) { + @return $px / 75+rem; +} + +html, +body { + // width: 100%; + height: 100%; + background: #FFFFFF; +} + +.back { + width: 100%; + height: px2rem(44); + line-height: px2rem(44); + position: fixed; + left: 0; + top: 0; + padding-top: px2rem(110); + padding-bottom: px2rem(22); + text-align: center; + color: #FFFFFF; + font-size: px2rem(38); + font-weight: bold; + z-index: 10; + // background: #FFFFFF; + + img { + width: px2rem(44); + height: px2rem(44); + position: absolute; + left: px2rem(18); + // top: px2rem(0); + } + + p { + font-family: PingFang SC, PingFang SC; + font-weight: 500; + font-size: px2rem(32); + color: #313131; + text-align: center; + font-style: normal; + text-transform: none; + } +} + +.tab_list { + display: flex; + align-items: center; + justify-content: center; + gap: px2rem(100); + padding-top: px2rem(200); + position: fixed; + top: 0; + width: 100%; + background: #FFFFFF; + .tab_box { + font-family: PingFang SC, PingFang SC; + font-weight: 500; + font-size: px2rem(32); + color: #AFB1B3; + line-height: px2rem(44); + text-align: center; + font-style: normal; + text-transform: none; + } + + .tab_active { + color: #313131; + position: relative; + + &::after { + content: ''; + display: block; + width: px2rem(26); + height: px2rem(8); + background: linear-gradient(270deg, #E29030 0%, #FCC074 100%); + border-radius: px2rem(1008); + position: absolute; + left: 50%; + transform: translateX(-50%); + } + } + +} + +.data_list { + margin: px2rem(280) px2rem(32) 0; + .data_box { + display: flex; + align-items: center; + justify-content: space-between; + padding-bottom: px2rem(24); + margin-top: px2rem(24); + border-bottom: px2rem(1) solid #E4E4E4; + .left { + .title { + font-family: PingFang SC, PingFang SC; + font-weight: 600; + font-size: px2rem(32); + color: #313131; + line-height: px2rem(44); + text-align: left; + font-style: normal; + text-transform: none; + } + + .createTime { + font-family: PingFang SC, PingFang SC; + font-weight: 400; + font-size: px2rem(26); + color: #7B7B7D; + line-height: px2rem(36); + // text-align: left; + font-style: normal; + text-transform: none; + margin-top: px2rem(16); + } + } + + .right { + .operateBean { + font-family: PingFang SC, PingFang SC; + font-weight: 600; + font-size: px2rem(40); + color: #313131; + line-height: px2rem(56); + text-align: right; + font-style: normal; + text-transform: none; + } + img{ + width: px2rem(50); + height: px2rem(50); + margin: 0 px2rem(4); + } + } + + } +} \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/index.html b/view/molistar/modules/taskCenter/index.html index d0562a30..b8403b56 100644 --- a/view/molistar/modules/taskCenter/index.html +++ b/view/molistar/modules/taskCenter/index.html @@ -40,7 +40,7 @@
- +
*30d
Already got it, go check it out~
@@ -48,6 +48,9 @@
+
+
+
diff --git a/view/molistar/modules/taskCenter/js/index.js b/view/molistar/modules/taskCenter/js/index.js index d1196b3c..e4a46383 100644 --- a/view/molistar/modules/taskCenter/js/index.js +++ b/view/molistar/modules/taskCenter/js/index.js @@ -83,28 +83,38 @@ function getCheckData() { $('.goldBean').text(res.data.goldBean) $('.top .check_List .signDayList .signDay_box').remove() signDayData = res.data - let targetIndex = signDayData.signDayList.findIndex(item => item.dateStr === signDayData.todayDate); + if (signDayData.signDayList && signDayData.signDayList.length > 0) { + let targetIndex = signDayData.signDayList.findIndex(item => item.dateStr === signDayData.todayDate); - if (res.data.signStatus == 'SIGNED') { - $('.check_List .reward_info .reward_box img').attr('src', signDayData.signDayList[targetIndex].pic) - $('.check_List .reward_info .reward_box .num').text(`*${signDayData.signDayList[targetIndex].awardNum}`) - $('.check_List .reward_info .reward_txt').text(langReplace(localLang.demoModule.Reward_out)) - $('.check_List .reward_info').show() - } + if (res.data.signStatus == 'SIGNED') { + $('.check_List .reward_info .reward_box img').attr('src', signDayData.signDayList[targetIndex].pic) + $('.check_List .reward_info .reward_box .num').text(`*${signDayData.signDayList[targetIndex].awardNum}`) + $('.check_List .reward_info .reward_txt').text(langReplace(localLang.demoModule.Reward_out)) + $('.check_List .reward_info').show() + $('.Daily_list').css('margin-top', '4.2rem') + }else{ + $('.Daily_list').css('margin-top', '3rem') - let str = ''; - res.data.signDayList.forEach((item, index) => { - str += ` + } + + let str = ''; + res.data.signDayList.forEach((item, index) => { + str += `
- -
*${item.awardNum}
+
+
*${item.awardNum}${item.goldFlag ? '' : 'd'}
${langReplace(localLang.demoModule.Day)}${item.dayNum}
` - }); - $('.top .check_List .signDayList').append(str) + }); + $('.top .check_List .signDayList').append(str) + }else{ + $('.check_List').hide(); + $('.check_btn').show(); + $('.Daily_list').css('margin-top', '-1rem') + } if (res.data.signStatus == 'SIGNED') { $('.Sign_btn').attr('disabled', true) $('.Sign_btn').addClass('sign_btn_active') @@ -115,13 +125,11 @@ function getCheckData() { } else { toastMsg(res.message) } - canNext = true hideLoading(layerIndex); }, error: function (res) { console.log(res, "报错啦"); hideLoading(layerIndex); - canNext = true }, }) } @@ -142,13 +150,11 @@ $('.Sign_btn').click(function () { } else { toastMsg(res.message) } - canNext = true hideLoading(layerIndex); }, error: function (res) { console.log(res, "报错啦"); hideLoading(layerIndex); - canNext = true }, }) }) @@ -171,14 +177,14 @@ function getTaskList() {
-
${funTaskType(item.taskType, item.reachNum)}
+
${funTaskType(item.taskType, item.reachNum,item.standardValue)}
*${item.goldBean}
-
${ item.receiveStatus != 'RECEIVED' ?langReplace(localLang.demoModule.Receive) :langReplace(localLang.demoModule.Received)}
+
${item.receiveStatus != 'RECEIVED' ? langReplace(localLang.demoModule.Receive) : langReplace(localLang.demoModule.Received)}
` @@ -187,25 +193,23 @@ function getTaskList() { } else { toastMsg(res.message) } - canNext = true hideLoading(layerIndex); }, error: function (res) { console.log(res, "报错啦"); hideLoading(layerIndex); - canNext = true }, }) } -function funTaskType(type, num) { +function funTaskType(type, num,standardValue) { let obj = { DAILY_SIGN: langReplace(localLang.demoModule.DAILY_SIGN), - UP_MIC: langReplace(localLang.demoModule.UP_MIC(num)), - UP_MIC_120: langReplace(localLang.demoModule.UP_MIC_120(num)), - PLAY_GAME: langReplace(localLang.demoModule.PLAY_GAME(num)), - CHARGE_GOLD_NUM: langReplace(localLang.demoModule.CHARGE_GOLD_NUM(num)), - CHARGE_GOLD_NUM_5: langReplace(localLang.demoModule.CHARGE_GOLD_NUM_5(num)), - CHARGE_GOLD_NUM_10: langReplace(localLang.demoModule.CHARGE_GOLD_NUM_10(num)), + UP_MIC: langReplace(localLang.demoModule.UP_MIC(num,standardValue)), + UP_MIC_120: langReplace(localLang.demoModule.UP_MIC_120(num,standardValue)), + PLAY_GAME: langReplace(localLang.demoModule.PLAY_GAME(num,standardValue)), + CHARGE_GOLD_NUM: langReplace(localLang.demoModule.CHARGE_GOLD_NUM(num,standardValue)), + CHARGE_GOLD_NUM_5: langReplace(localLang.demoModule.CHARGE_GOLD_NUM_5(num,standardValue)), + CHARGE_GOLD_NUM_10: langReplace(localLang.demoModule.CHARGE_GOLD_NUM_10(num,standardValue)), ROOM_SEND_GIFT: langReplace(localLang.demoModule.ROOM_SEND_GIFT), RECV_LUCKY_GIFT: langReplace(localLang.demoModule.RECV_LUCKY_GIFT), RECV_NOMAL_GIFT: langReplace(localLang.demoModule.RECV_NOMAL_GIFT), @@ -213,10 +217,10 @@ function funTaskType(type, num) { } return obj[type] } -function funTaskTypeImg(type){ +function funTaskTypeImg(type) { let obj = { DAILY_SIGN: './images/DAILY_SIGN.png', - UP_MIC:'./images/UP_MIC.png', + UP_MIC: './images/UP_MIC.png', UP_MIC_120: './images/UP_MIC.png', PLAY_GAME: './images/PLAY_GAME.png', CHARGE_GOLD_NUM: './images/CHARGE_GOLD_NUM.png', @@ -252,13 +256,11 @@ $('.Daily_list').on('click', '.Receive_btn', function () { } else { toastMsg(res.message) } - canNext = true hideLoading(layerIndex); }, error: function (res) { console.log(res, "报错啦"); hideLoading(layerIndex); - canNext = true }, }) }) @@ -274,10 +276,10 @@ $('.signDayList').on('click', '.signDay_box', function () { if (receiveStatus == 'SIGNED') { $(this).find('.img_box').addClass('reward_active'); $('.check_List .reward_info .reward_box img').attr('src', signDayData.signDayList[actIndex].pic) - $('.check_List .reward_info .reward_box .num').text(`*${signDayData.signDayList[actIndex].awardNum}`) + $('.check_List .reward_info .reward_box .num').text(`*${signDayData.signDayList[actIndex].awardNum}${signDayData.signDayList[actIndex].goldFlag ? '' : 'd'}`) $('.check_List .reward_info .reward_txt').text(langReplace(localLang.demoModule.Reward_out)) $('.check_List .reward_info').show() - + $('.Daily_list').css('margin-top', '4.2rem') $('.Sign_btn').attr('disabled', false) $('.Sign_btn').addClass('sign_btn_active') $('.Sign_btn').text(langReplace(localLang.demoModule.Signed_in)) @@ -286,9 +288,10 @@ $('.signDayList').on('click', '.signDay_box', function () { } else { $(this).find('.img_box').addClass('reward_unsigned_active'); $('.check_List .reward_info .reward_box img').attr('src', signDayData.signDayList[actIndex].pic) - $('.check_List .reward_info .reward_box .num').text(`*${signDayData.signDayList[actIndex].awardNum}`) + $('.check_List .reward_info .reward_box .num').text(`*${signDayData.signDayList[actIndex].awardNum}${signDayData.signDayList[actIndex].goldFlag ? '' : 'd'}`) $('.check_List .reward_info .reward_txt').text(langReplace(localLang.demoModule.Expired)) $('.check_List .reward_info').show() + $('.Daily_list').css('margin-top', '4.2rem') $('.Sign_btn').attr('disabled', true) $('.Sign_btn').addClass('sign_btn_active') @@ -301,11 +304,14 @@ $('.signDayList').on('click', '.signDay_box', function () { .removeClass('reward_unsigned_active'); $(this).find('.img_box').addClass('reward_active'); $('.check_List .reward_info').hide() - + $('.Daily_list').css('margin-top', '3rem') + if (signDayData.signStatus == 'SIGNED') { - $('.check_List .reward_info .reward_box .num').text(`*${signDayData.signDayList[actIndex].awardNum}`) + $('.check_List .reward_info .reward_box .num').text(`*${signDayData.signDayList[actIndex].awardNum}${signDayData.signDayList[actIndex].goldFlag ? '' : 'd'}`) $('.check_List .reward_info .reward_txt').text(langReplace(localLang.demoModule.Reward_out)) $('.check_List .reward_info').show() + $('.Daily_list').css('margin-top', '4.2rem') + $('.Sign_btn').attr('disabled', true) $('.Sign_btn').addClass('sign_btn_active') $('.Sign_btn').text(langReplace(localLang.demoModule.Signed_in)) @@ -321,6 +327,6 @@ $('.signDayList').on('click', '.signDay_box', function () { }) $('.Mall_box').click(function () { -window.location.href = `./mall.html` -return + window.location.href = `./mall.html` + return }) \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/js/mall.js b/view/molistar/modules/taskCenter/js/mall.js index 69032f69..a32381dd 100644 --- a/view/molistar/modules/taskCenter/js/mall.js +++ b/view/molistar/modules/taskCenter/js/mall.js @@ -58,6 +58,7 @@ function translateFun() { var localLang = window.lang; $('.page_title').html(langReplace(localLang.demoModule.Mall)); $('.Exchange').html(langReplace(localLang.demoModule.Exchange)); + $('.Understand').html(langReplace(localLang.demoModule.Understand)); } var targetIndex = 0; function getData() { @@ -73,13 +74,21 @@ function getData() { $('.top .info .left .user_name .nick').text(res.data.nick) $('.top .info .left .user_name .erbanNo').text(`ID:${res.data.erbanNo}`) $('.top .info .right .goldBean').text(res.data.goldBean) + $('.Exchange_btn').attr('goldBean', res.data.goldBean) + if(targetIndex == 0){ + $('.Exchange_btn').attr('awardid',res.data.shops[0].awardId) + $('.Exchange_btn').attr('exchangegoldbean',res.data.shops[0].exchangeGoldBean) + +$('.Exchange_btn').attr('shopName',res.data.shops[0].shopName+'*'+res.data.shops[0].awardNum) + } + $('.Exchange_list .shops_list .shop_box').remove() let str = ''; res.data.shops.forEach((item,index) => { str+=` -
- -
${item.shopName}*${item.awardNum}
+
+
+
${item.shopName}*${item.awardNum}${item.unit?item.unit:''}
${item.exchangeGoldBean} @@ -105,4 +114,53 @@ function getData() { $('.shops_list').on('click', '.shop_box', function () { $('.shops_list .shop_box').removeClass('shop_active') $(this).addClass('shop_active'); -}) \ No newline at end of file + $('.Exchange_btn').attr('awardid',$(this).attr('awardid')) + $('.Exchange_btn').attr('exchangegoldbean',$(this).attr('exchangegoldbean')) + $('.Exchange_btn').attr('shopName',$(this).attr('shopName')) + targetIndex = $(this).attr('data-index') +}) + +$('.Exchange_btn').click(function () { +let exchangegoldbean = $(this).attr('exchangegoldbean') +let goldBean = $(this).attr('goldBean') +let awardId = $(this).attr('awardid') +let shopName = $(this).attr('shopName') +if(Number(exchangegoldbean)>Number(goldBean)){ + $('.popup_tip').show() +}else{ + + showLoading(); + networkRequest({ + type: "POST", + url: urlPrefix + "/daily/shopBuy", + data: { + awardId, + num:1 + }, + success: function (res) { + if (res.code == 200) { + toastMsg(langReplace(localLang.demoModule.Exchange_successful)) + getData() + $('.popup_content .title').text(langReplace(localLang.demoModule.Exchange_successful)) + $('.popup_content .content').text(langReplace(localLang.demoModule.You_exchanged(shopName))) + $('.popup_tip').show() + } else { + toastMsg(res.message) + } + hideLoading(layerIndex); + }, + error: function (res) { + console.log(res, "报错啦"); + hideLoading(layerIndex); + }, + }) + +} +}) +$('.tip_btn').click(function () { + $('.popup_tip').hide() +}) +$('.top .info .right').click(function () { + window.location.href = `./pointsDetails.html` + return + }) \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/js/pointsDetails.js b/view/molistar/modules/taskCenter/js/pointsDetails.js new file mode 100644 index 00000000..22e425fc --- /dev/null +++ b/view/molistar/modules/taskCenter/js/pointsDetails.js @@ -0,0 +1,154 @@ +let urlPrefix = getUrlPrefix() +let browser = checkVersion() +let env = EnvCheck(); +if (env == 'test') { + new VConsole(); +} +// 封裝layer消息提醒框 +let layerIndex +var langReplace; +var localLang; +const showLoading = (content = langReplace(localLang.demoModule.layerIndex1)) => { + layer.open({ + type: 2, + shadeClose: false, + content, + success(e) { + layerIndex = $(e).attr('index') + } + }) +} +const hideLoading = (index) => { + layer.close(index) +} +const toastMsg = (content = langReplace(localLang.demoModule.layerIndex2), time = 2) => { + layer.open({ + content, + time, + skin: 'msg' + }) +} +// 初始化函數 +$(function () { + getInfoFromClient(); + fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言 + setTimeout(function () { + // 頁面全屏 + if (browser.app) { + if (browser.android) { + window.androidJsObj.initShowNav(false) + } else { + window.webkit.messageHandlers.initShowNav.postMessage(0) + } + }; + // 頂部返回事件 + $('.back img').click(() => { + window.history.back(); + }) + fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言 + langReplace = window.lang.replace; + localLang = window.lang; + translateFun(); + getData(); + }, 100) + +}) +function translateFun() { + var langReplace = window.lang.replace; + var localLang = window.lang; + $('.page_title').html(langReplace(localLang.demoModule.pointsDetails)); + $('.Increase').html(langReplace(localLang.demoModule.Increase)); + $('.Consumption').html(langReplace(localLang.demoModule.Consumption)); + +} +var billType = 2;//账单类型1-支出, 2-收入 +var pageNo = 1; +var pageSize = 10; +var canNext = true; +var AgencyList = []; +var resPageLength; +function getData() { + showLoading(); + networkRequest({ + type: "POST", + url: urlPrefix + "/daily/bill", + data: { + billType, + pageNo, + pageSize + + }, + success: function (res) { + if (res.code == 200) { + $('.data_list .data_box').remove() + resPageLength = res.data.length + AgencyList = [...AgencyList, ...res.data] + let str = ''; + AgencyList.forEach((item, index) => { + str += ` +
+
+
${item.type == 2?`${langReplace(localLang.demoModule.Exchange)}${item.shopName}*${item.num}`:funTaskType(item.taskType, item.reachNum,item.standardValue)}
+
${item.createTime}
+
+
+ ${item.type == 1 ? '+' : ''}${item.operateBean} + +
+
+ ` + }) + $('.data_list').append(str) + } else { + toastMsg(res.message) + } + canNext = true + hideLoading(layerIndex); + }, + error: function (res) { + console.log(res, "报错啦"); + hideLoading(layerIndex); + canNext = true + }, + }) +} + +function funTaskType(type, num,standardValue) { + let obj = { + DAILY_SIGN: langReplace(localLang.demoModule.DAILY_SIGN), + UP_MIC: langReplace(localLang.demoModule.UP_MIC(num,standardValue)), + UP_MIC_120: langReplace(localLang.demoModule.UP_MIC_120(num,standardValue)), + PLAY_GAME: langReplace(localLang.demoModule.PLAY_GAME(num,standardValue)), + CHARGE_GOLD_NUM: langReplace(localLang.demoModule.CHARGE_GOLD_NUM(num,standardValue)), + CHARGE_GOLD_NUM_5: langReplace(localLang.demoModule.CHARGE_GOLD_NUM_5(num,standardValue)), + CHARGE_GOLD_NUM_10: langReplace(localLang.demoModule.CHARGE_GOLD_NUM_10(num,standardValue)), + ROOM_SEND_GIFT: langReplace(localLang.demoModule.ROOM_SEND_GIFT), + RECV_LUCKY_GIFT: langReplace(localLang.demoModule.RECV_LUCKY_GIFT), + RECV_NOMAL_GIFT: langReplace(localLang.demoModule.RECV_NOMAL_GIFT), + RECV_NOMAL_GIFT_GOLD: langReplace(localLang.demoModule.RECV_NOMAL_GIFT_GOLD), + } + return obj[type] +} + +$('.tab_list .tab_box').click(function () { + billType = $(this).attr('billType') + $(this).addClass('tab_active').siblings().removeClass('tab_active') + pageNo = 1; + pageSize = 10; + canNext = true; + AgencyList = []; + getData(); +}) +// 页面触底 分页加载 +$(window).scroll(function () { + if ($(this).scrollTop() + $(this).height() >= $(document).height() - 5) { + console.log(canNext); + if (canNext && resPageLength == pageSize) { + canNext = false + pageNo++; + getData(); + } else { + // toastMsg("No more~"); + } + } +}); \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/local/ar.js b/view/molistar/modules/taskCenter/local/ar.js index 2b30acd1..c3627e61 100644 --- a/view/molistar/modules/taskCenter/local/ar.js +++ b/view/molistar/modules/taskCenter/local/ar.js @@ -12,23 +12,23 @@ langAr = { Expired:'منتهي الصلاحية', Daily_Tasks:'المهام اليومية', DAILY_SIGN:'سجّل دخولك يوميًا', - UP_MIC:function(num){ - return `دردشة عبر الميكروفون (${num}/60 دقيقة)` + UP_MIC:function(num,standardValue){ + return `دردشة عبر الميكروفون (${num}/${standardValue} دقيقة)` }, - UP_MIC_120:function(num){ - return `دردشة عبر الميكروفون (${num}/120 دقيقة)` + UP_MIC_120:function(num,standardValue){ + return `دردشة عبر الميكروفون (${num}/${standardValue} دقيقة)` }, - PLAY_GAME:function(num){ - return `شارك في ألعاب مصغرة (${num}/3)` + PLAY_GAME:function(num,standardValue){ + return `شارك في ألعاب مصغرة (${num}/${standardValue})` }, - CHARGE_GOLD_NUM:function(num){ - return `شحن (${num}/7000)` + CHARGE_GOLD_NUM:function(num,standardValue){ + return `شحن (${num}/${standardValue})` }, - CHARGE_GOLD_NUM_5:function(num){ - return `شحن (${num}/35000)` + CHARGE_GOLD_NUM_5:function(num,standardValue){ + return `شحن (${num}/${standardValue})` }, - CHARGE_GOLD_NUM_10:function(num){ - return `شحن (${num}/70000)` + CHARGE_GOLD_NUM_10:function(num,standardValue){ + return `شحن (${num}/${standardValue})` }, ROOM_SEND_GIFT:'إرسال هدايا في الغرفة', RECV_LUCKY_GIFT:'استلام هدايا Lucky/Bravo', @@ -40,6 +40,13 @@ langAr = { Sign_arrived:'لم يحن وقت تسجيل الدخول', Received:'تم الاستلام', Exchange:'الاستبدال', - + Exchange_successful:'تم الاستبدال بنجاح', + Understand:'مُتفهم', + You_exchanged:function(name){ + return `لقد استبدلت${name},تم وضعها في حقيبتك بنجاح` + }, + pointsDetails:'تفاصيل النقاط', + Increase:'زيادة', + Consumption:'الاستهلاك', } } \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/local/en.js b/view/molistar/modules/taskCenter/local/en.js index 798987b1..369e74f4 100644 --- a/view/molistar/modules/taskCenter/local/en.js +++ b/view/molistar/modules/taskCenter/local/en.js @@ -12,23 +12,23 @@ langEn = { Expired:'Expired', Daily_Tasks:'Daily Tasks', DAILY_SIGN:'Sign in daily', - UP_MIC:function(num){ - return `Chat on the mic (${num}/60mins)` + UP_MIC:function(num,standardValue){ + return `Chat on the mic (${num}/${standardValue}mins)` }, - UP_MIC_120:function(num){ - return `Chat on the mic (${num}/120mins)` + UP_MIC_120:function(num,standardValue){ + return `Chat on the mic (${num}/${standardValue}mins)` }, - UP_MIC_120:function(num){ - return `Play games (${num}/3)` + PLAY_GAME:function(num,standardValue){ + return `Play games (${num}/${standardValue})` }, - CHARGE_GOLD_NUM:function(num){ - return `Recharge (${num}/7000) Coins` + CHARGE_GOLD_NUM:function(num,standardValue){ + return `Recharge (${num}/${standardValue}) Coins` }, - CHARGE_GOLD_NUM_5:function(num){ - return `Recharge (${num}/35000) Coins` + CHARGE_GOLD_NUM_5:function(num,standardValue){ + return `Recharge (${num}/${standardValue}) Coins` }, - CHARGE_GOLD_NUM_10:function(num){ - return `Recharge (${num}/70000) Coins` + CHARGE_GOLD_NUM_10:function(num,standardValue){ + return `Recharge (${num}/${standardValue}) Coins` }, ROOM_SEND_GIFT:'Send Gifts in the room', RECV_LUCKY_GIFT:'Received Lucky/Bravo gifts', @@ -40,6 +40,13 @@ langEn = { Sign_arrived:'Sign-in time has not arrived', Received:'Received', Exchange:'Exchange', - + Exchange_successful:'Exchange successful', + Understand:'Understand', + You_exchanged:function(name){ + return `You exchanged ${name}, It has been successfully put into your backpack` + }, + pointsDetails:'Points Details', + Increase:'Increase', + Consumption:'Consumption', } } \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/local/tr.js b/view/molistar/modules/taskCenter/local/tr.js index e9f13b89..ff6dc62c 100644 --- a/view/molistar/modules/taskCenter/local/tr.js +++ b/view/molistar/modules/taskCenter/local/tr.js @@ -12,23 +12,23 @@ langTr = { Expired:'Süresi doldu', Daily_Tasks:'Günlük Görevler', DAILY_SIGN:'Günlük oturum açın', - UP_MIC:function(num){ - return `Mikrofonda sohbet edin (${num}/60dk)` + UP_MIC:function(num,standardValue){ + return `Mikrofonda sohbet edin (${num}/${standardValue}dk)` }, - UP_MIC_120:function(num){ - return `Mikrofonda sohbet edin (${num}/120dk)` + UP_MIC_120:function(num,standardValue){ + return `Mikrofonda sohbet edin (${num}/${standardValue}dk)` }, - PLAY_GAME:function(num){ - return `Mini oyunlara katılın (${num}/3)` + PLAY_GAME:function(num,standardValue){ + return `Mini oyunlara katılın (${num}/${standardValue})` }, - CHARGE_GOLD_NUM:function(num){ - return `(${num}/7000)'i yeniden yükleyin` + CHARGE_GOLD_NUM:function(num,standardValue){ + return `(${num}/${standardValue})'i yeniden yükleyin` }, - CHARGE_GOLD_NUM_5:function(num){ - return `(${num}/35000)'i yeniden yükleyin` + CHARGE_GOLD_NUM_5:function(num,standardValue){ + return `(${num}/${standardValue})'i yeniden yükleyin` }, - CHARGE_GOLD_NUM_10:function(num){ - return `(${num}/70000)'i yeniden yükleyin` + CHARGE_GOLD_NUM_10:function(num,standardValue){ + return `(${num}/${standardValue})'i yeniden yükleyin` }, ROOM_SEND_GIFT:'Odada hediye gönderin', RECV_LUCKY_GIFT:'Şanslı/Bravo hediyeleri alındı', @@ -40,5 +40,13 @@ langTr = { Sign_arrived:'Giriş zamanı gelmedi', Received:'Alındı', Exchange:'Değişim', + Exchange_successful:'Değişim başarılı', + Understand:'Anlayın', + You_exchanged:function(name){ + return `değiştirdiniz${name},Başarılı bir şekilde sırt çantanıza konuldu` + }, + pointsDetails:'Puan ayrıntıları', + Increase:'Artır', + Consumption:'Tüketim', } } \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/local/zh.js b/view/molistar/modules/taskCenter/local/zh.js index 2db8f871..be930896 100644 --- a/view/molistar/modules/taskCenter/local/zh.js +++ b/view/molistar/modules/taskCenter/local/zh.js @@ -12,23 +12,23 @@ langZh = { Expired:'已過期', Daily_Tasks:'日常任務', DAILY_SIGN:'每日簽到', - UP_MIC:function(num){ - return `上麥聊天(${num}/60mins)`; + UP_MIC:function(num,standardValue){ + return `上麥聊天(${num}/${standardValue}mins)`; }, - UP_MIC_120:function(num){ - return `上麥聊天(${num}/120mins)`; + UP_MIC_120:function(num,standardValue){ + return `上麥聊天(${num}/${standardValue}mins)`; }, - PLAY_GAME:function(num){ - return `參與小遊戲(${num}/3)`; + PLAY_GAME:function(num,standardValue){ + return `參與小遊戲(${num}/${standardValue})`; }, - CHARGE_GOLD_NUM:function(num){ - return `儲值(${num}/7000)`; + CHARGE_GOLD_NUM:function(num,standardValue){ + return `儲值(${num}/${standardValue})`; }, - CHARGE_GOLD_NUM_5:function(num){ - return `儲值(${num}/35000)`; + CHARGE_GOLD_NUM_5:function(num,standardValue){ + return `儲值(${num}/${standardValue})`; }, - CHARGE_GOLD_NUM_10:function(num){ - return `儲值(${num}/70000)`; + CHARGE_GOLD_NUM_10:function(num,standardValue){ + return `儲值(${num}/${standardValue})`; }, ROOM_SEND_GIFT:'房間送禮', RECV_LUCKY_GIFT:'收到Lucky/Bravo禮物', @@ -40,6 +40,13 @@ langZh = { Sign_arrived:'未到簽到時間', Received:'已收到', Exchange:'兌換', - + Exchange_successful:'兌換成功', + Understand:'我知道了', + You_exchanged:function(name){ + return `你兌換${name},已經成功放入你的背包` + }, + pointsDetails:'積分明細', + Increase:'增加', + Consumption:'消耗', } } \ No newline at end of file diff --git a/view/molistar/modules/taskCenter/mall.html b/view/molistar/modules/taskCenter/mall.html index 2634c990..1498f95a 100644 --- a/view/molistar/modules/taskCenter/mall.html +++ b/view/molistar/modules/taskCenter/mall.html @@ -55,10 +55,19 @@
-
+
+ + + diff --git a/view/molistar/modules/taskCenter/pointsDetails.html b/view/molistar/modules/taskCenter/pointsDetails.html new file mode 100644 index 00000000..793ce712 --- /dev/null +++ b/view/molistar/modules/taskCenter/pointsDetails.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + +
+ +

Points Details

+
+ +
+
Increase
+
Consumption
+
+ +
+
+
+
Sign in daily
+
2025-01-01 12:00:00
+
+
+ + +
+
+
+ + + + + + + + + + + + + + + + + +