diff --git a/view/molistar/modules/firstRechargeBonus/First_Bonus.html b/view/molistar/modules/firstRechargeBonus/First_Bonus.html new file mode 100644 index 00000000..5af9cd68 --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/First_Bonus.html @@ -0,0 +1,49 @@ + + + + + + + + + + + + +
+ +
+
+ +
+
Recharge Now
+ + + + + + + + + + + + + + + + diff --git a/view/molistar/modules/firstRechargeBonus/css/.sass-cache/1ba79c304c731985f563dc80f33d178b19fc9404/index.scssc b/view/molistar/modules/firstRechargeBonus/css/.sass-cache/1ba79c304c731985f563dc80f33d178b19fc9404/index.scssc new file mode 100644 index 00000000..99a26e95 Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/css/.sass-cache/1ba79c304c731985f563dc80f33d178b19fc9404/index.scssc differ diff --git a/view/molistar/modules/firstRechargeBonus/css/.sass-cache/1d5690c1d66d96bc453bfe923d9c743ff6a7b559/index.scssc b/view/molistar/modules/firstRechargeBonus/css/.sass-cache/1d5690c1d66d96bc453bfe923d9c743ff6a7b559/index.scssc new file mode 100644 index 00000000..f15513ba Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/css/.sass-cache/1d5690c1d66d96bc453bfe923d9c743ff6a7b559/index.scssc differ diff --git a/view/molistar/modules/firstRechargeBonus/css/First_Bonus.css b/view/molistar/modules/firstRechargeBonus/css/First_Bonus.css new file mode 100644 index 00000000..3916c21f --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/css/First_Bonus.css @@ -0,0 +1,109 @@ +html, +body { + width: 100%; + background-color: #F06A3F; +} + +.header { + background-image: url("../images/header_two.png"); + background-size: 100% 100%; + height: 11.6266666667rem; +} +.header .top_img { + padding-top: 2rem; +} + +.rewards_list .reward_box { + background-image: url("../images/rewards_bg_two.png"); + background-size: 100% 100%; + margin: 0.3333333333rem; + padding-bottom: 0.2666666667rem; +} +.rewards_list .reward_box .title { + font-family: PingFang SC; + font-weight: 600; + font-size: 0.4533333333rem; + color: #130D00; + text-align: center; + padding-top: 0.2666666667rem; +} +.rewards_list .reward_box .title_txt { + font-family: PingFang SC; + font-weight: 500; + font-size: 0.5333333333rem; + color: #130D00; + line-height: 0.56rem; + padding-top: 0.6666666667rem; + text-align: center; + position: relative; + z-index: 99; +} +.rewards_list .reward_box .title_txt::after { + content: ""; + position: absolute; + left: 50%; + transform: translateX(-50%); + bottom: 0.0666666667rem; + height: 0.1733333333rem; + background-color: #FFD162; + border-radius: 0.0933333333rem; + width: 8.36rem; + z-index: -1; +} +.rewards_list .reward_box .title_txt span { + font-size: 0.4rem; + font-weight: 500; +} +.rewards_list .reward_box .img_top { + text-align: center; + margin-top: 0.3066666667rem; +} +.rewards_list .reward_box .img_top img { + width: 4.4rem; + height: 1.0133333333rem; +} +.rewards_list .reward_box .reward_content { + display: flex; + flex-wrap: wrap; + gap: 0.5333333333rem; + margin: 0.4933333333rem 0.6666666667rem 0; +} +.rewards_list .reward_box .reward_content .reward_item .reward_img { + background-image: url("../images/rewards_bg_big.png"); + background-size: 100% 100%; + width: 3.0666666667rem; + height: 3.0666666667rem; + padding: 0.2933333333rem; +} +.rewards_list .reward_box .reward_content .reward_item .reward_img img { + width: 100%; + height: 100%; + object-fit: contain; +} +.rewards_list .reward_box .reward_content .reward_item .rewards_txt { + font-family: PingFang SC; + font-weight: 500; + font-size: 0.4rem; + color: #130D00; + line-height: 0.56rem; + margin-top: 0.16rem; + text-align: center; + white-space: normal; + word-wrap: break-word; + overflow-wrap: break-word; + max-width: 3.6533333333rem; +} + +.bottom { + background-image: url("../images/bottom_btn.png"); + background-size: 100% 100%; + height: 1.3333333333rem; + margin: 0.4rem 0.4666666667rem; + font-family: PingFang SC; + font-weight: 600; + font-size: 0.5066666667rem; + color: #130D00; + display: flex; + align-items: center; + justify-content: center; +} \ No newline at end of file diff --git a/view/molistar/modules/firstRechargeBonus/css/First_Bonus.scss b/view/molistar/modules/firstRechargeBonus/css/First_Bonus.scss new file mode 100644 index 00000000..2c74d0c8 --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/css/First_Bonus.scss @@ -0,0 +1,126 @@ +@function px2rem($px) { + @return $px / 75+rem; +} + +html, +body { + width: 100%; + background-color: #F06A3F; + // padding: px2rem(26); +} + +.header { + background-image: url("../images/header_two.png"); + background-size: 100% 100%; + height: px2rem(872); + + .top_img { + padding-top: px2rem(150); + } +} + +.rewards_list { + .reward_box { + background-image: url("../images/rewards_bg_two.png"); + background-size: 100% 100%; + margin: px2rem(25); + // border-radius: px2rem(26); + // height: px2rem(1016); + padding-bottom: px2rem(20); + .title { + font-family: PingFang SC; + font-weight: 600; + font-size: px2rem(34); + color: #130D00; + text-align: center; + padding-top: px2rem(20); + } + .title_txt { + font-family: PingFang SC; + font-weight: 500; + font-size: px2rem(40); + color: #130D00; + line-height: px2rem(42); + padding-top: px2rem(50); + text-align: center; + position: relative; // 添加相对定位 + z-index: 99; + + // 下划线样式 + &::after { + content: ''; + position: absolute; + left: 50%; + transform: translateX(-50%); + bottom: px2rem(5); // 调整下划线与文本的距离 + height: px2rem(13); // 下划线高度(可以根据需要调整) + background-color: #FFD162; + ; // 下划线颜色(可以根据需要调整) + border-radius: px2rem(7); + width: px2rem(627); + z-index: -1; + } + span{ + font-size: px2rem(30); + font-weight: 500; + } + } + .img_top { + text-align: center; + margin-top: px2rem(23); + + img { + width: px2rem(330); + height: px2rem(76); + } + } + .reward_content{ + display: flex; + flex-wrap: wrap; + gap: px2rem(40); + margin: px2rem(37) px2rem(50) 0; + .reward_item{ + .reward_img { + background-image: url("../images/rewards_bg_big.png"); + background-size: 100% 100%; + width: px2rem(230); + height: px2rem(230); + padding: px2rem(22); + img { + width: 100%; + height: 100%; + object-fit: contain; + } + } + .rewards_txt { + font-family: PingFang SC; + font-weight: 500; + font-size: px2rem(30); + color: #130D00; + line-height: px2rem(42); + margin-top: px2rem(12); + text-align: center; + // 允许文字自动换行 + white-space: normal; + word-wrap: break-word; + overflow-wrap: break-word; + // 可选:设置最大宽度以限制换行范围 + max-width: px2rem(274); + } + } + } + } +} +.bottom { + background-image: url("../images/bottom_btn.png"); + background-size: 100% 100%; + height: px2rem(100); + margin: px2rem(30) px2rem(35); + font-family: PingFang SC; + font-weight: 600; + font-size: px2rem(38); + color: #130D00; + display: flex; + align-items: center; + justify-content: center; + } \ No newline at end of file diff --git a/view/molistar/modules/firstRechargeBonus/css/index.css b/view/molistar/modules/firstRechargeBonus/css/index.css new file mode 100644 index 00000000..5719bcbf --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/css/index.css @@ -0,0 +1,115 @@ +@charset "UTF-8"; +html, +body { + width: 100%; + background-color: transparent; +} + +.header { + background-image: url("../images/header.png"); + background-size: 100% 100%; + height: 10.7466666667rem; + width: 100%; + padding-bottom: 0.4666666667rem; +} +.header .top_img { + padding-top: 1.7333333333rem; +} +.header .title { + font-family: PingFang SC; + font-weight: 500; + font-size: 0.4533333333rem; + color: #130D00; + line-height: 0.56rem; + padding-top: 0.6666666667rem; + text-align: center; + position: relative; + z-index: 99; +} +.header .title::after { + content: ""; + position: absolute; + left: 1.6rem; + right: 0; + bottom: 0.0666666667rem; + height: 0.1733333333rem; + background-color: #FFD162; + border-radius: 0.0933333333rem; + width: 6.8133333333rem; + z-index: -1; +} +.header .title span { + font-weight: 500; + font-size: 0.3733333333rem; +} +.header .img_top { + text-align: center; + margin-top: 0.3066666667rem; +} +.header .img_top img { + width: 4.4rem; + height: 1.0133333333rem; +} +.header .rewards_list { + display: flex; + gap: 0.2133333333rem; + margin: 0.2933333333rem 0.2933333333rem 0; + overflow-x: auto; + /* 隐藏滚动条 */ + /* 对于 Firefox 浏览器 */ + scrollbar-width: none; + /* 隐藏滚动条宽度 */ + -ms-overflow-style: none; + /* IE 和 Edge 的滚动条隐藏 */ +} +.header .rewards_list ::-webkit-scrollbar { + display: none; +} +.header .rewards_list .rewards_box { + display: flex; + flex-direction: column; + align-items: center; +} +.header .rewards_list .rewards_box .reward_img { + background-image: url("../images/rewards_bg.png"); + background-size: 100% 100%; + width: 2.0266666667rem; + height: 2.0266666667rem; + padding: 0.1733333333rem; +} +.header .rewards_list .rewards_box .reward_img img { + width: 100%; + height: 100%; + object-fit: contain; +} +.header .rewards_list .rewards_box .rewards_txt { + font-family: PingFang SC; + font-weight: 500; + font-size: 0.3733333333rem; + color: #130D00; + line-height: 0.4266666667rem; + margin-top: 0.16rem; + text-align: center; + white-space: normal; + word-wrap: break-word; + overflow-wrap: break-word; + max-width: 2.0266666667rem; +} +.header .bottom { + background-image: url("../images/bottom_btn.png"); + background-size: 100% 100%; + height: 1.3333333333rem; + margin: 0.4rem 0.4666666667rem 0; + font-family: PingFang SC; + font-weight: 600; + font-size: 0.5066666667rem; + color: #130D00; + display: flex; + align-items: center; + justify-content: center; +} + +.arabic .header .title::after { + left: 0; + right: 1.6rem; +} \ No newline at end of file diff --git a/view/molistar/modules/firstRechargeBonus/css/index.scss b/view/molistar/modules/firstRechargeBonus/css/index.scss new file mode 100644 index 00000000..92f5cf80 --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/css/index.scss @@ -0,0 +1,141 @@ +@function px2rem($px) { + @return $px / 75+rem; +} + +html, +body { + width: 100%; + background-color: transparent; + // padding: px2rem(26); +} + +.header { + background-image: url("../images/header.png"); + background-size: 100% 100%; + height: px2rem(806); + width: 100%; + padding-bottom: px2rem(35); + .top_img{ + padding-top: px2rem(130); + } + .title { + font-family: PingFang SC; + font-weight: 500; + font-size: px2rem(34); + color: #130D00; + line-height: px2rem(42); + padding-top: px2rem(50); + text-align: center; + position: relative; // 添加相对定位 + z-index: 99; + + // 下划线样式 + &::after { + content: ''; + position: absolute; + left: px2rem(120); + right: 0; + bottom: px2rem(5); // 调整下划线与文本的距离 + height: px2rem(13); // 下划线高度(可以根据需要调整) + background-color: #FFD162; + ; // 下划线颜色(可以根据需要调整) + border-radius: px2rem(7); + width: px2rem(511); + z-index: -1; + } + span{ + font-weight: 500; + font-size: px2rem(28); + } + } + + .img_top { + text-align: center; + margin-top: px2rem(23); + + img { + width: px2rem(330); + height: px2rem(76); + } + } + + .rewards_list { + display: flex; + gap: px2rem(16); + margin: px2rem(22) px2rem(22) 0; + overflow-x: auto; + + // overflow-y: hidden; + /* 隐藏滚动条 */ + ::-webkit-scrollbar { + display: none; + } + + /* 对于 Firefox 浏览器 */ + scrollbar-width: none; + /* 隐藏滚动条宽度 */ + -ms-overflow-style: none; + + /* IE 和 Edge 的滚动条隐藏 */ + .rewards_box { + display: flex; + flex-direction: column; + align-items: center; + + .reward_img { + background-image: url("../images/rewards_bg.png"); + background-size: 100% 100%; + width: px2rem(152); + height: px2rem(152); + padding: px2rem(13); + + img { + width: 100%; + height: 100%; + object-fit: contain; + } + } + + + .rewards_txt { + font-family: PingFang SC; + font-weight: 500; + font-size: px2rem(28); + color: #130D00; + line-height: px2rem(32); + margin-top: px2rem(12); + text-align: center; + // 允许文字自动换行 + white-space: normal; + word-wrap: break-word; + overflow-wrap: break-word; + // 可选:设置最大宽度以限制换行范围 + max-width: px2rem(152); + } + } + } + + .bottom { + background-image: url("../images/bottom_btn.png"); + background-size: 100% 100%; + height: px2rem(100); + margin: px2rem(30) px2rem(35) 0; + font-family: PingFang SC; + font-weight: 600; + font-size: px2rem(38); + color: #130D00; + display: flex; + align-items: center; + justify-content: center; + } +} +.arabic{ + .header{ + .title{ + &::after { + left: 0; + right: px2rem(120); + } + } + } +} \ No newline at end of file diff --git a/view/molistar/modules/firstRechargeBonus/images/bottom_btn.png b/view/molistar/modules/firstRechargeBonus/images/bottom_btn.png new file mode 100644 index 00000000..dacc5a10 Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/bottom_btn.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/header.png b/view/molistar/modules/firstRechargeBonus/images/header.png new file mode 100644 index 00000000..22bc58cb Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/header.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/header_two.png b/view/molistar/modules/firstRechargeBonus/images/header_two.png new file mode 100644 index 00000000..ad3f2d3e Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/header_two.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/rewards_bg.png b/view/molistar/modules/firstRechargeBonus/images/rewards_bg.png new file mode 100644 index 00000000..ca90bed4 Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/rewards_bg.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/rewards_bg_big.png b/view/molistar/modules/firstRechargeBonus/images/rewards_bg_big.png new file mode 100644 index 00000000..647db2d1 Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/rewards_bg_big.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/rewards_bg_two.png b/view/molistar/modules/firstRechargeBonus/images/rewards_bg_two.png new file mode 100644 index 00000000..dd42695d Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/rewards_bg_two.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/tit-ar.png b/view/molistar/modules/firstRechargeBonus/images/tit-ar.png new file mode 100644 index 00000000..4904ebef Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/tit-ar.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/tit-en.png b/view/molistar/modules/firstRechargeBonus/images/tit-en.png new file mode 100644 index 00000000..077f3006 Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/tit-en.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/tit-tr.png b/view/molistar/modules/firstRechargeBonus/images/tit-tr.png new file mode 100644 index 00000000..6dddea88 Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/tit-tr.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/tit-zh.png b/view/molistar/modules/firstRechargeBonus/images/tit-zh.png new file mode 100644 index 00000000..b74c3897 Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/tit-zh.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/top_1.png b/view/molistar/modules/firstRechargeBonus/images/top_1.png new file mode 100644 index 00000000..7851417b Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/top_1.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/top_2.png b/view/molistar/modules/firstRechargeBonus/images/top_2.png new file mode 100644 index 00000000..2016dcb0 Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/top_2.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/top_3.png b/view/molistar/modules/firstRechargeBonus/images/top_3.png new file mode 100644 index 00000000..e8e61c7f Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/top_3.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/top_4.png b/view/molistar/modules/firstRechargeBonus/images/top_4.png new file mode 100644 index 00000000..cb1c8b51 Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/top_4.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/top_img-ar.png b/view/molistar/modules/firstRechargeBonus/images/top_img-ar.png new file mode 100644 index 00000000..60e5ca1b Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/top_img-ar.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/top_img-en.png b/view/molistar/modules/firstRechargeBonus/images/top_img-en.png new file mode 100644 index 00000000..8b6bca8a Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/top_img-en.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/top_img-tr.png b/view/molistar/modules/firstRechargeBonus/images/top_img-tr.png new file mode 100644 index 00000000..f4608fb6 Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/top_img-tr.png differ diff --git a/view/molistar/modules/firstRechargeBonus/images/top_img-zh.png b/view/molistar/modules/firstRechargeBonus/images/top_img-zh.png new file mode 100644 index 00000000..487c18e3 Binary files /dev/null and b/view/molistar/modules/firstRechargeBonus/images/top_img-zh.png differ diff --git a/view/molistar/modules/firstRechargeBonus/index.html b/view/molistar/modules/firstRechargeBonus/index.html new file mode 100644 index 00000000..c7461d56 --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/index.html @@ -0,0 +1,37 @@ + + + + + + + + + + + + +
+ +
1 USD = 7,000 Gold + 24,350 Gift
+
+ +
+
+
1USD
+
+ + + + + + + + + + + + + + + + diff --git a/view/molistar/modules/firstRechargeBonus/js/First_Bonus.js b/view/molistar/modules/firstRechargeBonus/js/First_Bonus.js new file mode 100644 index 00000000..65ba87cb --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/js/First_Bonus.js @@ -0,0 +1,145 @@ +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) + } + }; + fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言 + langReplace = window.lang.replace; + localLang = window.lang; + translateFun(); + getData() + }, 100) + +}) +var expObj; +function translateFun() { + var langReplace = window.lang.replace; + var localLang = window.lang; + $('.top_img').attr('src', langReplace(localLang.demoModule.top_img_two)) + $('.First_Bonus').text(langReplace(localLang.demoModule.First_Bonus)); + $('.First_Recharge_NowBonus').text(langReplace(localLang.demoModule.Recharge_Now)); + expObj = { + "7000": { + title_txt: langReplace(localLang.demoModule.title_txt_1), + num: 1, + img: './images/top_1.png' + }, + 70000: { + title_txt: langReplace(localLang.demoModule.title_txt_2), + num: 10, + img: './images/top_2.png' + }, + 140000: { + title_txt: langReplace(localLang.demoModule.title_txt_3), + num: 20, + img: './images/top_3.png' + }, + 350000: { + title_txt: langReplace(localLang.demoModule.title_txt_4), + num: 50, + img: './images/top_4.png' + }, + } +} +function getData() { + showLoading(); + networkRequest({ + type: "GET", + url: urlPrefix + "/firstcharge/rewards", + data: { + pageType: 1, + uid: pubInfo.uid, + // uid: 3203, + }, + success: function (res) { + hideLoading(layerIndex); + if (res.code == 200) { + let result = res.data.slice(0, -2).reverse();// 删除最后两个元素后倒序 + $('.rewards_list .reward_box').remove(); + let str = ''; + result.forEach(item => { + let str_two ='' + item.rewards.forEach(itemTwo => { + str_two += ` + +
+
+ +
+
${itemTwo.rewardName}*${itemTwo.awardNum}${itemTwo.unit ? itemTwo.unit : ''}
+
+ + ` + }); + str += ` +
+
${langReplace(localLang.demoModule.First_Recharge(expObj[item.exp].num))}
+
${expObj[item.exp].title_txt}
+
+ +
+
${str_two}
+
+ ` + }); + $('.rewards_list').append(str) + } else { + toastMsg(res.message) + } + }, + error: function (res) { + hideLoading(layerIndex); + }, + }) +} +$('.bottom').click(function () { + if (browser.app) { + if (browser.android) { + // window.androidJsObj.openChargePage() + tools.nativeUtils.jumpAppointPage('RECHARGE_PAGE') + } else if (browser.ios) { + window.webkit.messageHandlers.openChargePage.postMessage(null) + } + } else { + toastMsg('请在app内打开') + } + }) + \ No newline at end of file diff --git a/view/molistar/modules/firstRechargeBonus/js/index.js b/view/molistar/modules/firstRechargeBonus/js/index.js new file mode 100644 index 00000000..31429acc --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/js/index.js @@ -0,0 +1,130 @@ +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) + } + }; + fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言 + langReplace = window.lang.replace; + localLang = window.lang; + translateFun(); + getData() + }, 100) + +}) +var expObj; +function translateFun() { + var langReplace = window.lang.replace; + var localLang = window.lang; + $('.top_img').attr('src',langReplace(localLang.demoModule.top_img),) + expObj = { + "7000": { + title_txt: langReplace(localLang.demoModule.title_txt_1), + num: 1, + img: './images/top_1.png' + }, + 70000: { + title_txt: langReplace(localLang.demoModule.title_txt_2), + num: 10, + img: './images/top_2.png' + }, + 140000: { + title_txt: langReplace(localLang.demoModule.title_txt_3), + num: 20, + img: './images/top_3.png' + }, + 350000: { + title_txt: langReplace(localLang.demoModule.title_txt_4), + num: 50, + img: './images/top_4.png' + }, + } +} +function getData() { + showLoading(); + networkRequest({ + type: "GET", + url: urlPrefix + "/firstcharge/rewards", + data: { + pageType: 0, + uid: pubInfo.uid, + // uid: 3203, + }, + success: function (res) { + hideLoading(layerIndex); + if (res.code == 200) { + const exp = res.data[0].exp; + $('.header .title').html(expObj[exp].title_txt); + $('.header .img_top img').attr('src', expObj[exp].img_top) + $('.header .bottom').text(expObj[exp].num + langReplace(localLang.demoModule.USD)); + let str = ''; + $('.header .rewards_list .reward_box').remove(); + res.data[0].rewards.forEach(item => { + str += ` +
+
+ +
+
${item.rewardName}*${item.awardNum}${item.unit ? item.unit : ''}
+
+ ` + }); + $('.rewards_list').append(str) + } else { + toastMsg(res.message) + } + }, + error: function (res) { + hideLoading(layerIndex); + }, + }) +} +$('.header .bottom').click(function () { + if (browser.app) { + if (browser.android) { + // window.androidJsObj.openChargePage() + tools.nativeUtils.jumpAppointPage('RECHARGE_PAGE') + } else if (browser.ios) { + window.webkit.messageHandlers.openChargePage.postMessage(null) + } + } else { + toastMsg('请在app内打开') + } +}) diff --git a/view/molistar/modules/firstRechargeBonus/local/ar.js b/view/molistar/modules/firstRechargeBonus/local/ar.js new file mode 100644 index 00000000..e3633c4b --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/local/ar.js @@ -0,0 +1,20 @@ +// 阿拉伯 +langAr = { + // 模块 + demoModule: { + title_txt_1:'1 دولار = 7,000ذهب + 24,350 هدية', + title_txt_2:'10 دولار = 44,200ذهب + 70,000 هدية', + title_txt_3:'20 دولار = 65,800ذهب + 140,000 هدية', + title_txt_4:'50 دولار = 125,250ذهب + 350,000 هدية', + USD:' دولار', + top_img:'./images/top_img-ar.png', + First_Bonus:'مكافأة الشحن الأولى', + top_img_two:'./images/tit-ar.png', + First_Recharge:function(num){ + return `الشحن الأول ${num} دولار` + }, + Recharge_Now:'اشحن الآن', + + } + +} \ No newline at end of file diff --git a/view/molistar/modules/firstRechargeBonus/local/en.js b/view/molistar/modules/firstRechargeBonus/local/en.js new file mode 100644 index 00000000..c283a4a1 --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/local/en.js @@ -0,0 +1,17 @@ +langEn = { + demoModule: { + title_txt_1:'1 USD = 7,000 Gold + 24,350 Gift', + title_txt_2:'10 USD = 70,000 Gold + 44,200 Gift', + title_txt_3:'20 USD = 140,000 Gold + 65,800 Gift', + title_txt_4:'50 USD = 350,000 Gold + 125,250 Gift', + USD:'USD', + top_img:'./images/top_img-en.png', + First_Bonus:'First Recharge Bonus', + top_img_two:'./images/tit-en.png', + First_Recharge:function(num){ + return `First Recharge ${num} USD` + }, + Recharge_Now:'Recharge Now', + + }, +} diff --git a/view/molistar/modules/firstRechargeBonus/local/tr.js b/view/molistar/modules/firstRechargeBonus/local/tr.js new file mode 100644 index 00000000..ab926de7 --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/local/tr.js @@ -0,0 +1,18 @@ +langTr = { + demoModule: { + title_txt_1:'1 USD = 7,000 Altın + 24,350 Hediye', + title_txt_2:'10 USD = 70,000 Altın + 44,200 Hediye', + title_txt_3:'20 USD = 140,000 Altın + 65,800 Hediye', + title_txt_4:'50 USD = 350,000 Altın + 125,250 Hediye', + USD:'USD', + top_img:'./images/top_img-tr.png', + First_Bonus:'İlk Şarj Bonusu', + top_img_two:'./images/tit-tr.png', + First_Recharge:function(num){ + return `İlk Şarj ${num} USD` + }, + Recharge_Now:'Hemen Şarj Et', + + } + +} \ No newline at end of file diff --git a/view/molistar/modules/firstRechargeBonus/local/zh.js b/view/molistar/modules/firstRechargeBonus/local/zh.js new file mode 100644 index 00000000..eaeea854 --- /dev/null +++ b/view/molistar/modules/firstRechargeBonus/local/zh.js @@ -0,0 +1,19 @@ +// 中文 +langZh = { + // 模塊 + demoModule: { + title_txt_1:'1 USD = 7,000 金幣 + 24,350 贈禮', + title_txt_2:'10 USD = 70,000 金幣 + 44,200 贈禮', + title_txt_3:'20 USD = 140,000 金幣 + 65,800 贈禮', + title_txt_4:'50 USD = 350,000 金幣 + 125,250 贈禮', + USD:'USD', + top_img:'./images/top_img-zh.png', + First_Bonus:'首充好禮', + top_img_two:'./images/tit-zh.png', + First_Recharge:function(num){ + return `首充 ${num} USD` + }, + Recharge_Now:'立即儲值', + } + +} \ No newline at end of file