充值暂存

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 http-equiv="X-UA-Compatible" content="IE=edge">
<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/flex.css">
<link rel="stylesheet" href="./css/index.css?v=1.1">
@@ -18,11 +19,11 @@
<div class="box">
<div class="left">
<img src="./images/logo.png" alt="" class="logo">
<b>MoliStar儲值中心</b>
<b class="text2"></b>
</div>
<div class="right">
<img src="./images/ddianicon.png" alt="" class="didianIcon">
<i>台湾</i>
<i></i>
<img src="./images/moreIcon.png" alt="" class="moreIcon">
</div>
</div>
@@ -30,8 +31,8 @@
<!-- 绑定输入框 -->
<div class="bindingBox">
<div class="binding">
<input type="number" placeholder="請輸入要儲值的molistar ID">
<div class="but">確定</div>
<input class="text3" type="number" placeholder="">
<div class="but text4"></div>
</div>
</div>
<!-- 绑定完成后用户信息 -->
@@ -39,7 +40,7 @@
<img src="./images/logo.png" alt="" class="tx">
<div class="name">昵称</div>
<div class="id">molistar ID: 123456</div>
<div class="but">切換ID</div>
<div class="but text5"></div>
</div>
<!-- tab -->
<div class="tab tab1">
@@ -171,4 +172,8 @@
<script src="../../common/js/common2.js"></script>
<script src="../../common/js/layer.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();
// 封裝layer消息提醒框
let layerIndex
const showLoading = (content = '加載中...') => {
var langReplace;
var localLang;
const showLoading = (content = langReplace(localLang.demoModule.layerIndex1)) => {
layer.open({
type: 2,
shadeClose: false,
content,
success (e) {
success(e) {
layerIndex = $(e).attr('index')
}
})
@@ -16,7 +18,7 @@ const showLoading = (content = '加載中...') => {
const hideLoading = (index) => {
layer.close(index)
}
const toastMsg = (content = '操作完成', time = 2) => {
const toastMsg = (content = langReplace(localLang.demoModule.layerIndex2), time = 2) => {
layer.open({
content,
time,
@@ -43,6 +45,7 @@ $(function () {
new VConsole();
}
getInfoFromClient();//请求依赖
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(function () {
if (browser.app) {
erbanNo = null;
@@ -52,14 +55,41 @@ $(function () {
} else {
}
channelType = getUrl.channelType;
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
langReplace = window.lang.replace;
localLang = window.lang;
translateFun();
getArea();
}, 100)
setTimeout(function () {
$('.box_box').show()
}, 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();
$('.selectAddress .selectAddress_in .list_in p').remove();
showLoading();
@@ -102,9 +132,9 @@ function getArea () {
toastMsg(res.message);
}
},
error (err) {
error(err) {
hideLoading(layerIndex);
toastMsg('網絡錯誤');
toastMsg(langReplace(localLang.demoModule.layerIndex3));
}
});
}
@@ -142,7 +172,7 @@ $('.guidd').click(function () {
bodyScroolFun(false);
})
// 渲染档位列表
function getChargePageInfoForH5 () {
function getChargePageInfoForH5() {
showLoading();
networkRequest({
type: 'GET',
@@ -161,14 +191,14 @@ function getChargePageInfoForH5 () {
}
hideLoading(layerIndex);
},
error (err) {
error(err) {
hideLoading(layerIndex);
toastMsg('網絡錯誤');
toastMsg(langReplace(localLang.demoModule.layerIndex3));
}
});
}
// 渲染h5
function getChargePageInfoForH5Html (res, id, bool) {
function getChargePageInfoForH5Html(res, id, bool) {
// 处理充值方式
if (bool) {
$('.page1 .way div').remove();
@@ -218,7 +248,7 @@ $('.page1 .position').on('click', 'div', function () {
chargeProdId = $(this).attr('chargeProdId');
})
// 充值接口
function apply2New () {
function apply2New() {
apply2NewLock = false;
showLoading();
networkRequest({
@@ -234,9 +264,9 @@ function apply2New () {
hideLoading(layerIndex);
}
},
error (err) {
error(err) {
hideLoading(layerIndex);
toastMsg('網絡錯誤');
toastMsg(langReplace(localLang.demoModule.layerIndex3));
apply2NewLock = true;
}
@@ -291,7 +321,7 @@ $('.bindingBox .binding .but').click(function () {
getSimpleUser($('.bindingBox .binding input').val());
})
// 确认绑定接口
function getSimpleUser (erbanNo) {
function getSimpleUser(erbanNo) {
showLoading();
networkRequest({
type: 'GET',
@@ -312,15 +342,15 @@ function getSimpleUser (erbanNo) {
}
hideLoading(layerIndex);
},
error (err) {
error(err) {
hideLoading(layerIndex);
toastMsg('網絡錯誤');
toastMsg(langReplace(localLang.demoModule.layerIndex3));
}
});
}
// 自动绑定接口
function getSimpleUserByUid (uid) {
function getSimpleUserByUid(uid) {
showLoading();
networkRequest({
type: 'GET',
@@ -346,9 +376,9 @@ function getSimpleUserByUid (uid) {
}
hideLoading(layerIndex);
},
error (err) {
error(err) {
hideLoading(layerIndex);
toastMsg('網絡錯誤');
toastMsg(langReplace(localLang.demoModule.layerIndex3));
}
});
@@ -384,7 +414,7 @@ $('.userNull .userNull_in .but').click(function () {
$('.userNull').hide();
})
// 代充列表接口
function rechargeUserList (regionCode) {
function rechargeUserList(regionCode) {
showLoading();
networkRequest({
type: 'GET',
@@ -419,9 +449,9 @@ function rechargeUserList (regionCode) {
}
hideLoading(layerIndex);
},
error (err) {
error(err) {
hideLoading(layerIndex);
toastMsg('網絡錯誤');
toastMsg(langReplace(localLang.demoModule.layerIndex3));
}
});
@@ -432,7 +462,7 @@ $('.page2 ul').on('click', 'li .copy', function () {
copyToClipboard(erbanNo);
})
// 关注接口
function fansLike (likedUid) {
function fansLike(likedUid) {
// showLoading();
networkRequest({
type: 'POST',
@@ -452,9 +482,9 @@ function fansLike (likedUid) {
}
hideLoading(layerIndex);
},
error (err) {
error(err) {
hideLoading(layerIndex);
toastMsg('網絡錯誤');
toastMsg(langReplace(localLang.demoModule.layerIndex3));
}
});
@@ -483,7 +513,7 @@ $('.toastMasge .toastMasge_in .but').click(function () {
bodyScroolFun(false);
})
//复制方法
function copyToClipboard (text) {
function copyToClipboard(text) {
if (text.indexOf('-') !== -1) {
let arr = text.split('-');
text = arr[0] + arr[1];

View File

@@ -2,20 +2,5 @@
langAr = {
// 模块
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 = {
// 模块
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:``,
}
}