充值暂存

This commit is contained in:
dragon
2024-05-31 16:28:15 +08:00
parent 3f31e78976
commit 4bbf91e941
8 changed files with 96 additions and 126 deletions

View File

@@ -5,7 +5,8 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>充值</title> <title class="text1"></title>
<!-- 充值 -->
<link rel="stylesheet" href="../../common/css/reset.css"> <link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="../../common/css/flex.css"> <link rel="stylesheet" href="../../common/css/flex.css">
<link rel="stylesheet" href="./css/index.css?v=1.1"> <link rel="stylesheet" href="./css/index.css?v=1.1">
@@ -18,11 +19,11 @@
<div class="box"> <div class="box">
<div class="left"> <div class="left">
<img src="./images/logo.png" alt="" class="logo"> <img src="./images/logo.png" alt="" class="logo">
<b>MoliStar儲值中心</b> <b class="text2"></b>
</div> </div>
<div class="right"> <div class="right">
<img src="./images/ddianicon.png" alt="" class="didianIcon"> <img src="./images/ddianicon.png" alt="" class="didianIcon">
<i>台湾</i> <i></i>
<img src="./images/moreIcon.png" alt="" class="moreIcon"> <img src="./images/moreIcon.png" alt="" class="moreIcon">
</div> </div>
</div> </div>
@@ -30,8 +31,8 @@
<!-- 绑定输入框 --> <!-- 绑定输入框 -->
<div class="bindingBox"> <div class="bindingBox">
<div class="binding"> <div class="binding">
<input type="number" placeholder="請輸入要儲值的molistar ID"> <input class="text3" type="number" placeholder="">
<div class="but">確定</div> <div class="but text4"></div>
</div> </div>
</div> </div>
<!-- 绑定完成后用户信息 --> <!-- 绑定完成后用户信息 -->
@@ -39,7 +40,7 @@
<img src="./images/logo.png" alt="" class="tx"> <img src="./images/logo.png" alt="" class="tx">
<div class="name">昵称</div> <div class="name">昵称</div>
<div class="id">molistar ID: 123456</div> <div class="id">molistar ID: 123456</div>
<div class="but">切換ID</div> <div class="but text5"></div>
</div> </div>
<!-- tab --> <!-- tab -->
<div class="tab tab1"> <div class="tab tab1">
@@ -171,4 +172,8 @@
<script src="../../common/js/common2.js"></script> <script src="../../common/js/common2.js"></script>
<script src="../../common/js/layer.js"></script> <script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script> <script src="../../common/js/vconsole.min.js"></script>
<script src="./js/index.js?v=1.2"></script> <script src="./local/en.js"></script>
<script src="./local/zh.js"></script>
<script src="./local/ar.js"></script>
<script src="./js/index.js?v=1.2"></script>
<script src="../../common/local/langHandler.js"></script>

View File

@@ -3,12 +3,14 @@ const urlPrefix = getUrlPrefix();
var getUrl = getQueryString(); var getUrl = getQueryString();
// 封裝layer消息提醒框 // 封裝layer消息提醒框
let layerIndex let layerIndex
const showLoading = (content = '加載中...') => { var langReplace;
var localLang;
const showLoading = (content = langReplace(localLang.demoModule.layerIndex1)) => {
layer.open({ layer.open({
type: 2, type: 2,
shadeClose: false, shadeClose: false,
content, content,
success (e) { success(e) {
layerIndex = $(e).attr('index') layerIndex = $(e).attr('index')
} }
}) })
@@ -16,7 +18,7 @@ const showLoading = (content = '加載中...') => {
const hideLoading = (index) => { const hideLoading = (index) => {
layer.close(index) layer.close(index)
} }
const toastMsg = (content = '操作完成', time = 2) => { const toastMsg = (content = langReplace(localLang.demoModule.layerIndex2), time = 2) => {
layer.open({ layer.open({
content, content,
time, time,
@@ -43,6 +45,7 @@ $(function () {
new VConsole(); new VConsole();
} }
getInfoFromClient();//请求依赖 getInfoFromClient();//请求依赖
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(function () { setTimeout(function () {
if (browser.app) { if (browser.app) {
erbanNo = null; erbanNo = null;
@@ -52,14 +55,41 @@ $(function () {
} else { } else {
} }
channelType = getUrl.channelType; channelType = getUrl.channelType;
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();
getArea(); getArea();
}, 100) }, 100)
setTimeout(function () { setTimeout(function () {
$('.box_box').show() $('.box_box').show()
}, 800) }, 800)
}) })
function translateFun() {
var langReplace = window.lang.replace;
var localLang = window.lang;
$('.text1').text(langReplace(localLang.demoModule.text1));
$('.text2').text(langReplace(localLang.demoModule.text2));
$('.text3').attr("placeholder", langReplace(localLang.demoModule.text3));
$('.text4').text(langReplace(localLang.demoModule.text4));
$('.text5').text(langReplace(localLang.demoModule.text5));
$('.text6').text(langReplace(localLang.demoModule.text6));
$('.text7').text(langReplace(localLang.demoModule.text7));
$('.text8').text(langReplace(localLang.demoModule.text8));
$('.text9').text(langReplace(localLang.demoModule.text9));
$('.text10').text(langReplace(localLang.demoModule.text10));
$('.text11').text(langReplace(localLang.demoModule.text11));
$('.text12').text(langReplace(localLang.demoModule.text12));
$('.text13').text(langReplace(localLang.demoModule.text13));
$('.text14').text(langReplace(localLang.demoModule.text14));
$('.text15').text(langReplace(localLang.demoModule.text15));
$('.text16').text(langReplace(localLang.demoModule.text16));
$('.text17').text(langReplace(localLang.demoModule.text17));
$('.text18').text(langReplace(localLang.demoModule.text18));
$('.text19').text(langReplace(localLang.demoModule.text19));
}
// 请求地区列表 // 请求地区列表
function getArea () { function getArea() {
$('.area .area_in p').remove(); $('.area .area_in p').remove();
$('.selectAddress .selectAddress_in .list_in p').remove(); $('.selectAddress .selectAddress_in .list_in p').remove();
showLoading(); showLoading();
@@ -102,9 +132,9 @@ function getArea () {
toastMsg(res.message); toastMsg(res.message);
} }
}, },
error (err) { error(err) {
hideLoading(layerIndex); hideLoading(layerIndex);
toastMsg('網絡錯誤'); toastMsg(langReplace(localLang.demoModule.layerIndex3));
} }
}); });
} }
@@ -142,7 +172,7 @@ $('.guidd').click(function () {
bodyScroolFun(false); bodyScroolFun(false);
}) })
// 渲染档位列表 // 渲染档位列表
function getChargePageInfoForH5 () { function getChargePageInfoForH5() {
showLoading(); showLoading();
networkRequest({ networkRequest({
type: 'GET', type: 'GET',
@@ -161,14 +191,14 @@ function getChargePageInfoForH5 () {
} }
hideLoading(layerIndex); hideLoading(layerIndex);
}, },
error (err) { error(err) {
hideLoading(layerIndex); hideLoading(layerIndex);
toastMsg('網絡錯誤'); toastMsg(langReplace(localLang.demoModule.layerIndex3));
} }
}); });
} }
// 渲染h5 // 渲染h5
function getChargePageInfoForH5Html (res, id, bool) { function getChargePageInfoForH5Html(res, id, bool) {
// 处理充值方式 // 处理充值方式
if (bool) { if (bool) {
$('.page1 .way div').remove(); $('.page1 .way div').remove();
@@ -218,7 +248,7 @@ $('.page1 .position').on('click', 'div', function () {
chargeProdId = $(this).attr('chargeProdId'); chargeProdId = $(this).attr('chargeProdId');
}) })
// 充值接口 // 充值接口
function apply2New () { function apply2New() {
apply2NewLock = false; apply2NewLock = false;
showLoading(); showLoading();
networkRequest({ networkRequest({
@@ -234,9 +264,9 @@ function apply2New () {
hideLoading(layerIndex); hideLoading(layerIndex);
} }
}, },
error (err) { error(err) {
hideLoading(layerIndex); hideLoading(layerIndex);
toastMsg('網絡錯誤'); toastMsg(langReplace(localLang.demoModule.layerIndex3));
apply2NewLock = true; apply2NewLock = true;
} }
@@ -291,7 +321,7 @@ $('.bindingBox .binding .but').click(function () {
getSimpleUser($('.bindingBox .binding input').val()); getSimpleUser($('.bindingBox .binding input').val());
}) })
// 确认绑定接口 // 确认绑定接口
function getSimpleUser (erbanNo) { function getSimpleUser(erbanNo) {
showLoading(); showLoading();
networkRequest({ networkRequest({
type: 'GET', type: 'GET',
@@ -312,15 +342,15 @@ function getSimpleUser (erbanNo) {
} }
hideLoading(layerIndex); hideLoading(layerIndex);
}, },
error (err) { error(err) {
hideLoading(layerIndex); hideLoading(layerIndex);
toastMsg('網絡錯誤'); toastMsg(langReplace(localLang.demoModule.layerIndex3));
} }
}); });
} }
// 自动绑定接口 // 自动绑定接口
function getSimpleUserByUid (uid) { function getSimpleUserByUid(uid) {
showLoading(); showLoading();
networkRequest({ networkRequest({
type: 'GET', type: 'GET',
@@ -346,9 +376,9 @@ function getSimpleUserByUid (uid) {
} }
hideLoading(layerIndex); hideLoading(layerIndex);
}, },
error (err) { error(err) {
hideLoading(layerIndex); hideLoading(layerIndex);
toastMsg('網絡錯誤'); toastMsg(langReplace(localLang.demoModule.layerIndex3));
} }
}); });
@@ -384,7 +414,7 @@ $('.userNull .userNull_in .but').click(function () {
$('.userNull').hide(); $('.userNull').hide();
}) })
// 代充列表接口 // 代充列表接口
function rechargeUserList (regionCode) { function rechargeUserList(regionCode) {
showLoading(); showLoading();
networkRequest({ networkRequest({
type: 'GET', type: 'GET',
@@ -419,9 +449,9 @@ function rechargeUserList (regionCode) {
} }
hideLoading(layerIndex); hideLoading(layerIndex);
}, },
error (err) { error(err) {
hideLoading(layerIndex); hideLoading(layerIndex);
toastMsg('網絡錯誤'); toastMsg(langReplace(localLang.demoModule.layerIndex3));
} }
}); });
@@ -432,7 +462,7 @@ $('.page2 ul').on('click', 'li .copy', function () {
copyToClipboard(erbanNo); copyToClipboard(erbanNo);
}) })
// 关注接口 // 关注接口
function fansLike (likedUid) { function fansLike(likedUid) {
// showLoading(); // showLoading();
networkRequest({ networkRequest({
type: 'POST', type: 'POST',
@@ -452,9 +482,9 @@ function fansLike (likedUid) {
} }
hideLoading(layerIndex); hideLoading(layerIndex);
}, },
error (err) { error(err) {
hideLoading(layerIndex); hideLoading(layerIndex);
toastMsg('網絡錯誤'); toastMsg(langReplace(localLang.demoModule.layerIndex3));
} }
}); });
@@ -483,7 +513,7 @@ $('.toastMasge .toastMasge_in .but').click(function () {
bodyScroolFun(false); bodyScroolFun(false);
}) })
//复制方法 //复制方法
function copyToClipboard (text) { function copyToClipboard(text) {
if (text.indexOf('-') !== -1) { if (text.indexOf('-') !== -1) {
let arr = text.split('-'); let arr = text.split('-');
text = arr[0] + arr[1]; text = arr[0] + arr[1];

View File

@@ -2,20 +2,5 @@
langAr = { langAr = {
// 模块 // 模块
demoModule: { demoModule: {
wx_skip_img: './images/wx_skip_en.png',
// 国际化内容对应的数据项:
pay_title: `recharge`,
pay_header_t_l: `HABU Recharge Center`,
pay_header_t_r: `Taiwan`,
pay_method_p: `Please select a recharge method:`,
pay_number_sd: `Please select your recharge amount:`,
pay_but: `Pay now`,
pop_up_in_b: `Please select a recharge area`,
pop_up_in_p1: `Taiwan`,
pop_up_in_p2: `China`,
pay_stance_picture: `The recharge service is about to open, please be patient`,
wait_a_minute: 'Please wait',
gold_id: 'gold coins',
pay_user_id: 'Please enter your HABU account ID',
} }
} }

View File

@@ -2,20 +2,5 @@
langEn = { langEn = {
// 模块 // 模块
demoModule: { demoModule: {
wx_skip_img: './images/wx_skip_en.png',
// 国际化内容对应的数据项:
pay_title: `recharge`,
pay_header_t_l: `HABU Recharge Center`,
pay_header_t_r: `Taiwan`,
pay_method_p: `Please select a recharge method:`,
pay_number_sd: `Please select your recharge amount:`,
pay_but: `Pay now`,
pop_up_in_b: `Please select a recharge area`,
pop_up_in_p1: `Taiwan`,
pop_up_in_p2: `China`,
pay_stance_picture: `The recharge service is about to open, please be patient`,
wait_a_minute: 'Please wait',
gold_id: 'gold coins',
pay_user_id: 'Please enter your HABU account ID',
} }
} }

View File

@@ -1,21 +0,0 @@
// 印尼语
langIn = {
// 模块
demoModule: {
wx_skip_img: './images/wx_skip_en.png',
// 国际化内容对应的数据项:
pay_title: `recharge`,
pay_header_t_l: `HABU Recharge Center`,
pay_header_t_r: `Taiwan`,
pay_method_p: `Please select a recharge method:`,
pay_number_sd: `Please select your recharge amount:`,
pay_but: `Pay now`,
pop_up_in_b: `Please select a recharge area`,
pop_up_in_p1: `Taiwan`,
pop_up_in_p2: `China`,
pay_stance_picture: `The recharge service is about to open, please be patient`,
wait_a_minute: 'Please wait',
gold_id: 'gold coins',
pay_user_id: 'Please enter your HABU account ID',
}
}

View File

@@ -1,21 +0,0 @@
// 简体中文
langZhCN = {
// 模块
demoModule: {
wx_skip_img: './images/wx_skip_en.png',
// 国际化内容对应的数据项:
pay_title: `recharge`,
pay_header_t_l: `HABU Recharge Center`,
pay_header_t_r: `Taiwan`,
pay_method_p: `Please select a recharge method:`,
pay_number_sd: `Please select your recharge amount:`,
pay_but: `Pay now`,
pop_up_in_b: `Please select a recharge area`,
pop_up_in_p1: `Taiwan`,
pop_up_in_p2: `China`,
pay_stance_picture: `The recharge service is about to open, please be patient`,
wait_a_minute: 'Please wait',
gold_id: 'gold coins',
pay_user_id: 'Please enter your HABU account ID',
}
}

View File

@@ -1,21 +0,0 @@
// 繁体中文
langZhTW = {
// 模块
demoModule: {
wx_skip_img: './images/wx_skip_en.png',
// 国际化内容对应的数据项:
pay_title: `recharge`,
pay_header_t_l: `HABU Recharge Center`,
pay_header_t_r: `Taiwan`,
pay_method_p: `Please select a recharge method:`,
pay_number_sd: `Please select your recharge amount:`,
pay_but: `Pay now`,
pop_up_in_b: `Please select a recharge area`,
pop_up_in_p1: `Taiwan`,
pop_up_in_p2: `China`,
pay_stance_picture: `The recharge service is about to open, please be patient`,
wait_a_minute: 'Please wait',
gold_id: 'gold coins',
pay_user_id: 'Please enter your HABU account ID',
}
}

View File

@@ -0,0 +1,28 @@
// 简体中文
langZh = {
// 模块
demoModule: {
layerIndex1:`加载中...`,
layerIndex2:`操作完成`,
layerIndex3:`網絡錯誤`,
text1:`充值`,
text2:`MoliStar儲值中心`,
text3:`請輸入要儲值的molistar ID`,
text4:`確定`,
text5:`切換ID`,
text6:``,
text7:``,
text7:``,
text9:``,
text10:``,
text11:``,
text12:``,
text13:``,
text14:``,
text15:``,
text16:``,
text17:``,
text18:``,
text19:``,
}
}