Compare commits

...

4 Commits

Author SHA1 Message Date
dragon
d553fa35a0 修改bug-爱的告白 2024-06-25 19:30:59 +08:00
dragon
734d2539d8 国际化铭牌申请 2024-06-25 11:00:07 +08:00
dragon
e1e9f97ae1 替换logo暂存 2024-06-24 16:11:55 +08:00
dragon
03dd7e47a6 修复榜单异常问题 2024-06-21 17:07:23 +08:00
42 changed files with 531 additions and 330 deletions

View File

@@ -12,7 +12,7 @@
.max {
width: 10rem;
height: 30.84rem;
height: 34.02667rem;
background: url("../images/max.png?v=1.0") no-repeat;
background-size: 100% 100%;
font-family: 'pingfang-bold';
@@ -21,10 +21,10 @@
.max .record {
position: absolute;
position: absolute;
top: 5.9rem;
top: 6.61333rem;
right: 0;
width: 1.5rem;
height: 1.4rem;
width: 1.64rem;
height: 0.57333rem;
}
.max .record img {
@@ -34,23 +34,23 @@
.max .btn {
position: absolute;
top: 15.8rem;
left: 1.68rem;
width: 2.53333rem;
height: 1.01333rem;
top: 16.1rem;
left: 1.61rem;
width: 2.94667rem;
height: 1.46667rem;
}
.max .btn.basics-receive {
left: 5.6rem;
left: 5rem;
}
.max .btn.advance-send {
top: 22.34667rem;
top: 23.34667rem;
}
.max .btn.advance-receive {
top: 22.34667rem;
left: 5.6rem;
top: 23.34667rem;
left: 5rem;
}
.max .btn img {
@@ -257,8 +257,8 @@
.max .shade-mask-new .shade-content .apply-btn,
.max .shade-mask-new .shade-content-delay .apply-btn,
.max .shade-mask-new .shade-content-new .apply-btn {
width: 4.90667rem;
height: 1.2rem;
width: 6.37333rem;
height: 0.82667rem;
background: url("../images/apply-new.png") no-repeat 0 0/100% 100%;
margin: 0.64rem auto 0;
}
@@ -367,9 +367,9 @@
}
.max .shade-mask-delay .shade-content-delay .apply-btn {
width: 4.90667rem;
height: 1.2rem;
background: url("../images/confirm.png") no-repeat 0 0/100% 100%;
width: 6.37333rem;
height: 0.82667rem;
background: url("../images/apply-new.png") no-repeat 0 0/100% 100%;
margin: 0.85333rem auto 0;
}
@@ -484,9 +484,9 @@
}
.max .shade-mask-new .shade-content-new .apply-btn {
width: 4.90667rem;
height: 1.2rem;
background: url("../images/confirm.png") no-repeat 0 0/100% 100%;
width: 6.37333rem;
height: 0.82667rem;
background: url("../images/apply-new.png") no-repeat 0 0/100% 100%;
margin: 0.61333rem auto 0;
}
@@ -510,3 +510,7 @@
::-webkit-scrollbar {
display: none;
}
.english .max {
height: 35.76rem;
}

View File

@@ -21,7 +21,7 @@
// @import '../../../common/css/flex.scss';
.max {
width: px2rem(750);
height: px2rem(2313);
height: px2rem(2552);
background: url('../images/max.png?v=1.0') no-repeat;
background-size: 100% 100%;
font-family: 'pingfang-bold';
@@ -29,10 +29,10 @@
.record {
position: absolute;
position: absolute;
top: 5.9rem;
top: px2rem(496);
right: 0;
width: 1.5rem;
height: 1.4rem;
width: px2rem(123);
height: px2rem(43);
img {
width: 100%;
@@ -42,22 +42,22 @@
.btn {
position: absolute;
top: 15.8rem;
left: px2rem(126);
width: px2rem(190);
height: px2rem(76);
top: 16.1rem;
left: 1.61rem;
width: px2rem(221);
height: px2rem(110);
&.basics-receive {
left: 5.6rem;
left: 5rem;
}
&.advance-send {
top: 22.34667rem;
top: 23.34667rem;
}
&.advance-receive {
top: 22.34667rem;
left: 5.6rem;
top: 23.34667rem;
left: 5rem;
}
img {
@@ -181,8 +181,8 @@
}
.apply-btn {
width: px2rem(368);
height: px2rem(90);
width: px2rem(478);
height: px2rem(62);
background: url('../images/apply-new.png') no-repeat 0 0/100% 100%;
margin: px2rem(48) auto 0;
}
@@ -277,9 +277,9 @@
}
.apply-btn {
width: px2rem(368);
height: px2rem(90);
background: url('../images/confirm.png') no-repeat 0 0/100% 100%;
width: px2rem(478);
height: px2rem(62);
background: url('../images/apply-new.png') no-repeat 0 0/100% 100%;
margin: px2rem(64) auto 0;
}
}
@@ -397,9 +397,9 @@
}
.apply-btn {
width: px2rem(368);
height: px2rem(90);
background: url('../images/confirm.png') no-repeat 0 0/100% 100%;
width: px2rem(478);
height: px2rem(62);
background: url('../images/apply-new.png') no-repeat 0 0/100% 100%;
margin: px2rem(46) auto 0;
}
}
@@ -425,4 +425,10 @@
::-webkit-scrollbar {
display: none;
}
.english{
.max{
height: px2rem(2682);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 412 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -17,7 +17,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no, viewport-fit=cover" />
<title>精美铭牌送不停</title>
<title class="title_t"></title>
<!-- 私人訂製 -->
<link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/index.css?v=11">
@@ -28,7 +29,7 @@
<body>
<div class="max">
<div class="record">
<!-- <img src="./images/record.png" alt=""> -->
<img src="./images/record.png" alt="">
</div>
<div class="btn basics-send"><img src="./images/disabled-btn.png" alt=""></div>
@@ -62,7 +63,7 @@
<div class="shade-content-delay">
<!-- <div class="top">延期期限</div> -->
<div class="nameplate-style">
<span>铭牌样式:</span>
<span class="text1">铭牌样式:</span>
<div>
<p>
<img alt="">
@@ -71,10 +72,10 @@
</div>
</div>
<div class="delay-time">
<span>申请时长:</span>
<span class="text2">申请时长:</span>
<div>
<img src="./images/decrease.png" alt="" class="decrease">
<p><span></span></p>
<p><span></span><b class="text3"></b></p>
<img src="./images/increase.png" alt="" class="increase">
</div>
</div>
@@ -88,20 +89,20 @@
<div class="shade-content-new">
<!-- <div class="top">申请新铭牌</div> -->
<div class="nameplate-style">
<span>铭牌样式:</span>
<span class="text1"></span>
<ul class="apply-new-ul">
</ul>
</div>
<div class="new-nameplate-desc-wrap">
<span>铭牌文字:</span>
<input type="text" class="new-nameplate-desc" placeholder="请输入4个字" maxlength="4">
<span class="text4"></span>
<input class="text5" type="text" class="new-nameplate-desc" placeholder="" maxlength="">
</div>
<div class="delay-time">
<span>申请时长:</span>
<span class="text2"></span>
<div>
<img src="./images/decrease.png" alt="" class="decrease">
<p><span></span></p>
<p><span></span><b class="text3"></b></p>
<img src="./images/increase.png" alt="" class="increase">
</div>
</div>
@@ -114,7 +115,11 @@
<script src="../../common/js/common2.js"></script>
<script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script>
<script src="./local/en.js"></script>
<script src="./local/zh.js"></script>
<script src="./local/ar.js"></script>
<script src="./js/public.js?v=10"></script>
<script src="../../common/local/langHandler.js"></script>
</body>
</html>

View File

@@ -4,31 +4,210 @@ var browser = checkVersion();
var info = {};
if (EnvCheck() === 'test') new VConsole
// 封裝layer消息提醒框
let layerIndex
const showLoading = (content = '加載中...') => {
layer.open({
type: 2,
shadeClose: false,
content,
success(e) {
layerIndex = $(e).attr('index')
}
})
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)
layer.close(index)
}
const toastMsg = (content = '操作完成', time = 2) => {
layer.open({
content,
time,
skin: 'msg'
})
const toastMsg = (content = langReplace(localLang.demoModule.layerIndex2), time = 2) => {
layer.open({
content,
time,
skin: 'msg'
})
}
let delayLock = false, newApplyLock = false
let btnStatus = []
var partitionId = null;
$(function () {
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(() => {
langReplace = window.lang.replace;
localLang = window.lang;
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
translateFun();
getUserNameplateInfo()
userGet()
}, 50)
function translateFun() {
var langReplace = window.lang.replace;
var localLang = window.lang;
$('.max').attr('style', langReplace(localLang.demoModule.max))
$('.max .shade-mask-new .shade-content-new').attr('style', langReplace(localLang.demoModule.img4))
$('.max .shade-mask .shade-content, .max .shade-mask-delay .shade-content-delay').attr('style', langReplace(localLang.demoModule.img44))
$('.apply-btn').attr('style', langReplace(localLang.demoModule.img5))
$('.max .btn img').attr('src', langReplace(localLang.demoModule.img2))
$('.max .record img').attr('src', langReplace(localLang.demoModule.img6))
$('.title_t').html(langReplace(localLang.demoModule.title_t));
$('.text1').html(langReplace(localLang.demoModule.text1));
$('.text2').html(langReplace(localLang.demoModule.text2));
$('.text3').html(langReplace(localLang.demoModule.text3));
$('.text4').html(langReplace(localLang.demoModule.text4));
$('.text5').attr('placeholder', langReplace(localLang.demoModule.text5));
}
if (browser.app) {
_hmt.push(['_trackEvent', 'client', 'click', "act_nameplate"]);
}
// 點擊申請記錄按鈕
$('.record').on('click', function () {
window.location.href = './record.html'
})
// 關閉彈窗
$('.shade-mask .close').on('click', () => {
$('.shade-mask').hide()
$('body').css('overflow', 'auto')
})
$('.shade-mask-delay .close').on('click', () => {
$('.shade-mask-delay').hide()
$('body').css('overflow', 'auto')
})
$('.shade-mask-new .close').on('click', () => {
$('.shade-mask-new').hide()
$('body').css('overflow', 'auto')
newNameplateId = ''
$(this).find('input').val('')
})
let maxApplyDay, nameplateId, type, text
// 監聽 延長期限 按鈕點擊事件
$('.select-ul').on('click', '.delay-btn', function () {
let li = $(this).parent();
let src = li.find('.nameplate img').attr('src');
let desc = li.find('.nameplate span').html();
maxApplyDay = li.data('applyDay');
nameplateId = li.data('nameplateId');
type = li.data('type');
text = li.data('text');
$('.shade-mask-delay .nameplate-style img').attr('src', src);
$('.shade-mask-delay .nameplate-style p span').html(desc);
$('.shade-mask-delay .delay-time p span').html(maxApplyDay);
$('.shade-mask-delay').show().siblings('.shade-mask, .shade-mask-new').hide()
})
// 延期彈窗 點擊減按鈕
$('.shade-mask-delay').on('click', '.decrease', function () {
let applyDay = parseInt($(this).parent().find('span').html());
if (applyDay > 7) {
applyDay -= 7;
} else {
toastMsg(langReplace(localLang.demoModule.text6))
}
$('.shade-mask-delay .delay-time p span').html(applyDay);
})
//延期彈窗 點擊加按鈕
$('.shade-mask-delay').on('click', '.increase', function () {
let applyDay = parseInt($(this).parent().find('span').html());
if (applyDay >= maxApplyDay) {
toastMsg(langReplace(localLang.demoModule.text7))
} else {
applyDay += 7;
}
$('.shade-mask-delay .delay-time p span').html(applyDay);
})
// 監聽申請延期確定按鈕點擊事件
$('.shade-mask-delay').on('click', '.apply-btn', function () {
// applyType 1申請新銘牌2延長
if (!delayLock) {
delayLock = true
let params = {
type,
nameplateId,
applyDay: parseInt($(this).parent().find('.delay-time div p span').html()),
applyType: 2,
text
};
delayNamaplateConfirm(params)
}
})
/************************* ******************************/
// 監聽 申請新銘牌 按鈕點擊事件
$('.shade-mask').on('click', '.apply-btn', function () {
let type = $(this).parent().find('.select-ul li').eq(0).data('type');
getNewNameplateList(type)
})
// 申請新銘牌彈窗 點擊減按鈕
$('.shade-mask-new').on('click', '.decrease', function () {
let applyDay = parseInt($(this).parent().find('span').html());
if (applyDay > 7) {
applyDay -= 7;
} else {
toastMsg(langReplace(localLang.demoModule.text6))
}
$('.shade-mask-new .delay-time p span').html(applyDay);
})
// 申請新銘牌彈窗 點擊加按鈕
$('.shade-mask-new').on('click', '.increase', function () {
let applyDay = parseInt($(this).parent().find('span').html());
let maxApplyDay = parseInt($(this).parent().parent().parent().find('.apply-new-ul li').eq(0).data('applyDay'));
if (applyDay >= maxApplyDay) {
toastMsg(langReplace(localLang.demoModule.text7))
} else {
applyDay += 7;
}
$('.shade-mask-new .delay-time p span').html(applyDay);
})
// 申請新銘牌彈窗 點擊銘牌列錶事件
$('.shade-mask-new').on('click', 'li', function () {
$(this).addClass('active').siblings('li').removeClass('active');
newNameplateId = $(this).data('nameplateId');
})
// 申請新銘牌彈窗 確定申請 按鈕點擊事件
$('.shade-mask-new').on('click', '.apply-btn', function () {
let content = $(this).parent();
// let ipt = content.find('input.new-nameplate-desc').val()
let ipt = $('.text5').val();
if (!newNameplateId) {
toastMsg(langReplace(localLang.demoModule.text8));
return
}
if (!ipt) {
toastMsg(langReplace(localLang.demoModule.text9));
return
}
// else {
// if (ipt.length !== 4) {
// toastMsg(langReplace(localLang.demoModule.text10));
// return
// }
// }
// applyType 1申請新銘牌2延長
if (!newApplyLock) {
newApplyLock = true
let params = {
applyType: 1,
nameplateId: newNameplateId,
text: ipt,
type: parseInt(content.find('ul.apply-new-ul li').eq(0).data('type')),
applyDay: parseInt(content.find('.delay-time div p span').html())
}
applyNewNamaplateConfirm(params)
}
})
});
// 獲取用戶銘牌狀態
const getUserNameplateInfo = () => {
showLoading()
@@ -38,42 +217,70 @@ const getUserNameplateInfo = () => {
data: {
uid: pubInfo.uid
},
success(res){
success(res) {
hideLoading(layerIndex);
if(res.code === 200){
if (res.code === 200) {
btnStatus = res.data
renderBtnStatus()
}else{
} else {
toastMsg(res.message)
}
},
error(){
error() {
hideLoading(layerIndex);
toastMsg('網絡錯誤')
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
const userGet = () => {
showLoading()
networkRequest({
type: 'GET',
url: urlPrefix + '/user/get',
data: {
uid: pubInfo.uid
},
success(res) {
hideLoading(layerIndex);
if (res.code === 200) {
partitionId = res.data.partitionId
if (partitionId == 1 || partitionId == 2) {
$('.text5').attr('maxlength', 13);
} else {
$('.text5').attr('maxlength', 4);
}
renderBtnStatus()
} else {
toastMsg(res.message)
}
},
error() {
hideLoading(layerIndex);
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
// 渲染首頁按鈕狀態
const renderBtnStatus = () => {
btnStatus.map( (item,index) => {
if(index > 1){
// 進階款式
$('.btn').eq(index).find('img').attr('src', `${item > 0 ? './images/apply-btn-basics.png' : './images/disabled-btn.png'}`)
if(item > 0){
$('.btn').eq(index).on('click', () => {
getUserNameplateList(index+1)
})
}
}else{
// 基礎款式
$('.btn').eq(index).find('img').attr('src', `${item > 0 ? './images/apply-btn-basics.png' : './images/disabled-btn.png'}`)
if(item > 0){
$('.btn').eq(index).on('click', () => {
getUserNameplateList(index+1)
})
}
btnStatus.map((item, index) => {
if (index > 1) {
// 進階款式
$('.btn').eq(index).find('img').attr('src', `${item > 0 ? langReplace(localLang.demoModule.img3) : langReplace(localLang.demoModule.img2)}`)
if (item > 0) {
$('.btn').eq(index).on('click', () => {
getUserNameplateList(index + 1)
})
}
} else {
// 基礎款式
$('.btn').eq(index).find('img').attr('src', `${item > 0 ? langReplace(localLang.demoModule.img3) : langReplace(localLang.demoModule.img2)}`)
if (item > 0) {
$('.btn').eq(index).on('click', () => {
getUserNameplateList(index + 1)
})
}
}
})
}
@@ -88,22 +295,22 @@ const getUserNameplateList = (type) => {
uid: pubInfo.uid,
type
},
success(res){
success(res) {
hideLoading(layerIndex)
if(res.code === 200){
if(!res.data.length){
if (res.code === 200) {
if (!res.data.length) {
getNewNameplateList(type)
}else{
} else {
userNameplateList = res.data
renderNameplateList()
}
}else{
} else {
toastMsg(res.message)
}
},
error(){
error() {
hideLoading(layerIndex);
toastMsg('網絡錯誤')
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
@@ -111,16 +318,16 @@ const getUserNameplateList = (type) => {
// 渲染銘牌列錶(選擇彈窗)
const renderNameplateList = () => {
let str = ''
userNameplateList.map( item => {
userNameplateList.map(item => {
str += `
<li data-apply-day=${item.applyDay} data-nameplate-id=${item.nameplateId} data-type=${item.type} data-text=${item.fixedWord}>
<p>剩余${item.expireDays}</p>
<p>${langReplace(localLang.demoModule.text13)}${item.expireDays}${langReplace(localLang.demoModule.text3)}</p>
<div class="nameplate">
<img src="${item.nameplateImage}" alt="">
<span>${item.word}</span>
</div>
<div class="delay-btn">
<img src="./images/delay-btn.png" alt="">
<img src="${langReplace(localLang.demoModule.img7)}" alt="">
</div>
</li>
`
@@ -143,22 +350,22 @@ const getNewNameplateList = (type) => {
uid: pubInfo.uid,
type
},
success(res){
success(res) {
hideLoading(layerIndex)
if(res.code === 200){
if(!res.data.length){
toastMsg('暫時沒有銘牌可申請')
if (res.code === 200) {
if (!res.data.length) {
toastMsg(langReplace(localLang.demoModule.text11))
return
}
newNameplateList = res.data
renderNewNameplateList()
}else{
} else {
toastMsg(res.message)
}
},
error(){
error() {
hideLoading(layerIndex);
toastMsg('網絡錯誤')
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
@@ -167,7 +374,7 @@ let newNameplateId //只有一個可選時,默認選中
// 渲染申請新銘牌彈窗
const renderNewNameplateList = () => {
let str = '';
newNameplateList.map( item => {
newNameplateList.map(item => {
str += `
<li data-apply-day=${item.applyDay} data-nameplate-id=${item.id} data-type=${item.type}>
<div>
@@ -177,7 +384,7 @@ const renderNewNameplateList = () => {
`
})
$('.apply-new-ul').html(str)
if(newNameplateList.length === 1){
if (newNameplateList.length === 1) {
let onlyLi = $('.apply-new-ul').find('li').eq(0);
newNameplateId = onlyLi.data('nameplateId');
onlyLi.addClass('active')
@@ -201,23 +408,23 @@ const delayNamaplateConfirm = (params) => {
applyType: params.applyType,
text: params.text
},
success(res){
success(res) {
hideLoading(layerIndex)
if(res.code === 200){
toastMsg('申請成功')
if (res.code === 200) {
toastMsg(langReplace(localLang.demoModule.text12))
$('.shade-mask-delay').hide()
$('body').css('overflow', 'auto')
delayLock = false
setTimeout(()=>{
setTimeout(() => {
location.reload()
}, 500)
}else{
} else {
toastMsg(res.message)
}
},
error(){
error() {
hideLoading(layerIndex);
toastMsg('網絡錯誤')
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
@@ -236,180 +443,26 @@ const applyNewNamaplateConfirm = (params) => {
applyType: params.applyType,
text: params.text
},
success(res){
success(res) {
hideLoading(layerIndex)
if(res.code === 200){
toastMsg('申請成功')
if (res.code === 200) {
toastMsg(langReplace(localLang.demoModule.text12))
$('.shade-mask-new').hide()
$('body').css('overflow', 'auto')
newApplyLock = false
setTimeout(()=>{
newApplyLock = false
setTimeout(() => {
location.reload()
}, 500)
}else{
newApplyLock = false
} else {
newApplyLock = false
toastMsg(res.message)
}
},
error(){
error() {
hideLoading(layerIndex);
toastMsg('網絡錯誤,請退出重進')
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
$(function () {
getInfoFromClient()
setTimeout( () => {
getUserNameplateInfo()
}, 50)
if (browser.app) {
_hmt.push(['_trackEvent', 'client', 'click', "act_nameplate"]);
}
// 點擊申請記錄按鈕
$('.record').on('click', function(){
window.location.href = './record.html'
})
// 關閉彈窗
$('.shade-mask .close').on('click', () => {
$('.shade-mask').hide()
$('body').css('overflow', 'auto')
})
$('.shade-mask-delay .close').on('click', () => {
$('.shade-mask-delay').hide()
$('body').css('overflow', 'auto')
})
$('.shade-mask-new .close').on('click', () => {
$('.shade-mask-new').hide()
$('body').css('overflow', 'auto')
newNameplateId = ''
$(this).find('input').val('')
})
let maxApplyDay, nameplateId, type, text
// 監聽 延長期限 按鈕點擊事件
$('.select-ul').on('click', '.delay-btn', function() {
let li = $(this).parent();
let src = li.find('.nameplate img').attr('src');
let desc = li.find('.nameplate span').html();
maxApplyDay = li.data('applyDay');
nameplateId = li.data('nameplateId');
type = li.data('type');
text = li.data('text');
$('.shade-mask-delay .nameplate-style img').attr('src', src);
$('.shade-mask-delay .nameplate-style p span').html(desc);
$('.shade-mask-delay .delay-time p span').html(maxApplyDay);
$('.shade-mask-delay').show().siblings('.shade-mask, .shade-mask-new').hide()
})
// 延期彈窗 點擊減按鈕
$('.shade-mask-delay').on('click', '.decrease', function(){
let applyDay = parseInt( $(this).parent().find('span').html() );
if(applyDay > 7){
applyDay -= 7;
}else{
toastMsg('銘牌至少申請7天')
}
$('.shade-mask-delay .delay-time p span').html(applyDay);
})
//延期彈窗 點擊加按鈕
$('.shade-mask-delay').on('click', '.increase', function(){
let applyDay = parseInt( $(this).parent().find('span').html() );
if(applyDay >= maxApplyDay){
toastMsg('已達最大申請時長')
}else{
applyDay += 7;
}
$('.shade-mask-delay .delay-time p span').html(applyDay);
})
// 監聽申請延期確定按鈕點擊事件
$('.shade-mask-delay').on('click', '.apply-btn', function(){
// applyType 1申請新銘牌2延長
if(!delayLock){
delayLock = true
let params = {
type,
nameplateId,
applyDay: parseInt( $(this).parent().find('.delay-time div p span').html() ),
applyType: 2,
text
};
delayNamaplateConfirm(params)
}
})
/************************* ******************************/
// 監聽 申請新銘牌 按鈕點擊事件
$('.shade-mask').on('click', '.apply-btn', function(){
let type = $(this).parent().find('.select-ul li').eq(0).data('type');
getNewNameplateList(type)
})
// 申請新銘牌彈窗 點擊減按鈕
$('.shade-mask-new').on('click', '.decrease', function(){
let applyDay = parseInt( $(this).parent().find('span').html() );
if(applyDay > 7){
applyDay -= 7;
}else{
toastMsg('銘牌至少申請7天')
}
$('.shade-mask-new .delay-time p span').html(applyDay);
})
// 申請新銘牌彈窗 點擊加按鈕
$('.shade-mask-new').on('click', '.increase', function(){
let applyDay = parseInt( $(this).parent().find('span').html() );
let maxApplyDay = parseInt( $(this).parent().parent().parent().find('.apply-new-ul li').eq(0).data('applyDay') );
if(applyDay >= maxApplyDay){
toastMsg('已達最大申請時長')
}else{
applyDay += 7;
}
$('.shade-mask-new .delay-time p span').html(applyDay);
})
// 申請新銘牌彈窗 點擊銘牌列錶事件
$('.shade-mask-new').on('click', 'li', function(){
$(this).addClass('active').siblings('li').removeClass('active');
newNameplateId = $(this).data('nameplateId');
})
// 申請新銘牌彈窗 確定申請 按鈕點擊事件
$('.shade-mask-new').on('click', '.apply-btn', function(){
let content = $(this).parent();
let ipt = content.find('input.new-nameplate-desc').val()
if(!newNameplateId){
toastMsg('請選擇樣式');
return
}
if(!ipt){
toastMsg('請添加銘牌文字');
return
}else{
if(ipt.length !== 4){
toastMsg('請添加4個字的銘牌文字');
return
}
}
// applyType 1申請新銘牌2延長
if(!newApplyLock){
newApplyLock = true
let params = {
applyType: 1,
nameplateId: newNameplateId,
text: ipt,
type: parseInt( content.find('ul.apply-new-ul li').eq(0).data('type') ),
applyDay: parseInt( content.find('.delay-time div p span').html() )
}
applyNewNamaplateConfirm(params)
}
})
});

View File

@@ -1,9 +1,11 @@
let urlPrefix = getUrlPrefix();
if (EnvCheck() === 'test') new VConsole
// 封layer消息提醒框
let layerIndex
const showLoading = (content = '加載中...') => {
// 封layer消息提醒框
let layerIndex;
var langReplace;
var localLang;
const showLoading = (content = langReplace(localLang.demoModule.layerIndex1)) => {
layer.open({
type: 2,
shadeClose: false,
@@ -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,
@@ -40,53 +42,52 @@ const getUserApplyRecord = () => {
pageNumber,
pageSize
},
success(res){
success(res) {
hideLoading(layerIndex)
if(res.code === 200){
if(!res.data.length){
if (res.code === 200) {
if (!res.data.length) {
$('.max').hide()
}else{
} else {
$('.no-record-wrap').hide()
}
if(res.data.length === pageSize){
if (res.data.length === pageSize) {
// 能够继续请求下一页
canNext = true
}else{
} else {
canNext = false
}
recordList.push(...res.data)
renderRecord()
isLock = true
}else{
toastMsg(res.message)
} else {
toastMsg(res.message)
}
},
error(){
},
error() {
hideLoading(layerIndex);
toastMsg('網絡錯誤')
}
toastMsg(langReplace(localLang.demoModule.layerIndex3))
}
})
}
// 渲染申请记录
const renderRecord = () => {
let str = '';
recordList.map( item => {
recordList.map(item => {
str += `
<li>
<div class="nameplate-style"><img src="${item.iconPic}" alt=""></div>
<div class="nameplate-desc-wrap">
<span class="nameplate-desc">${item.text}</span>
<p>
<span>${item.applyType === 1 ? '申请' : '延长'}${item.applyDay}</span>
<span>${item.applyType === 1 ? langReplace(localLang.demoModule.text16) : langReplace(localLang.demoModule.text17)}${item.applyDay}${langReplace(localLang.demoModule.text3)}</span>
<span>${dateFormat(item.createTime, "yyyy-MM-dd")}</span>
</p>
</div>
<div class="isPass">
<p class='${item.auditType === 1 ? 'not-pass' : ''}'>${item.auditType === 0 ? '申请中' : (item.auditType === 1 ? '不通过' : '已通过')}</p>
${
item.remark ? (item.remark.length > 8 ? `<p class="result">${item.remark.slice(0, 8) + '...'}</p>` : `<p class="result">${item.remark}</p>`) : ''
}
<p class='${item.auditType === 1 ? 'not-pass' : ''}'>${item.auditType === 0 ? langReplace(localLang.demoModule.text18) : (item.auditType === 1 ? langReplace(localLang.demoModule.text19) : langReplace(localLang.demoModule.text20))}</p>
${item.remark ? (item.remark.length > 8 ? `<p class="result">${item.remark.slice(0, 8) + '...'}</p>` : `<p class="result">${item.remark}</p>`) : ''
}
</div>
</li>
@@ -95,21 +96,32 @@ const renderRecord = () => {
$('.max').html(str)
}
$(function(){
$(function () {
getInfoFromClient()
setTimeout( () => {
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(() => {
langReplace = window.lang.replace;
localLang = window.lang;
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
translateFun();
getUserApplyRecord()
}, 50)
function translateFun() {
var langReplace = window.lang.replace;
var localLang = window.lang;
$('.text14').text(langReplace(localLang.demoModule.text14));
$('.text15').text(langReplace(localLang.demoModule.text15));
}
// 监听滚动
$('ul').scroll(function(){
$('ul').scroll(function () {
let scrollTop = $(this).scrollTop()
let scrollHeight = $('ul')[0].scrollHeight
let ulHeight = $(this).innerHeight()
if(scrollTop + ulHeight + 100 >= scrollHeight){
if(isLock){
if (scrollTop + ulHeight + 100 >= scrollHeight) {
if (isLock) {
// 请求下一页
if(canNext){
if (canNext) {
getUserApplyRecord(pageNumber++)
isLock = false
}

View File

@@ -0,0 +1,40 @@
// 阿拉伯
langAr = {
// 模块
demoModule: {
layerIndex1: `التحميل...`,
layerIndex2: `اكتمال العملية`,
layerIndex3: `خطأ في الشبكة`,
max: `background:url("./images/max-ar.png") no-repeat;background-size:100% 100%;`,
img4: `background-image: url(./images/new-bg-ar.png);`,
img44: `background-image: url(./images/select-bg-ar.png);`,
img5: `background: url('./images/apply-new-ar.png') no-repeat 0 0/100% 100%;`,
img2: `./images/disabled-btn-ar.png`,
img3: `./images/apply-btn-basics-ar.png`,
img6: `./images/record-ar.png`,
img7: `./images/delay-btn-ar.png`,
title_t: `مخصص`,
text1: `نمط اللوحة:`,
text2: `مدة التطبيق:`,
text3: `أيام`,
text4: `نص اللوحة:`,
text5: `الرجاء إدخال...`,
text55: `13`,
text6: `يجب تطبيق اللوحة لمدة 7 أيام على الأقل`,
text7: `تم بلوغ أقصى مدة للتطبيق`,
text8: `يرجى اختيار نمط`,
text9: `يرجى إضافة نص اللوحة`,
text10: `يرجى إضافة نص اللوحة من 4 أحرف`,
text11: `لا توجد لوحات متاحة حالياً`,
text12: `تم التطبيق بنجاح`,
text13: 'متبقٍ',
text14: 'سجل الطلبات',
text15: 'لا توجد سجلات للطلبات',
text16: 'تقديم الطلب',
text17: 'تمديد',
text18: 'قيد الطلب',
text19: 'لم يتم القبول',
text20: 'تم القبول'
}
}

View File

@@ -0,0 +1,40 @@
// 英文
langEn = {
// 模块
demoModule: {
layerIndex1: `Loading...`,
layerIndex2: `Operation completed`,
layerIndex3: `Network error`,
max: `background:url("./images/max-en.png") no-repeat;background-size:100% 100%;`,
img4: `background-image: url(./images/new-bg-en.png);`,
img44: `background-image: url(./images/select-bg-en.png);`,
img5: `background: url('./images/apply-new-en.png') no-repeat 0 0/100% 100%;`,
img2: `./images/disabled-btn-en.png`,
img3: `./images/apply-btn-basics-en.png`,
img6: `./images/record-en.png`,
img7: `./images/delay-btn-en.png`,
title_t: `Customized`,
text1: `Style: `,
text2: `Duration: `,
text3: `days`,
text4: `Text: `,
text5: `please enter...`,
text55: `13`,
text6: `Minimum 7 days required`,
text7: `Maximum duration reached`,
text8: `Select a style`,
text9: `Add text`,
text10: `Add 4 characters of text`,
text11: `No nameplates available`,
text12: `Successful`,
text13: 'Remaining',
text14: 'Application Records',
text15: 'No Application Records',
text16: 'Apply',
text17: 'Extend',
text18: 'In Progress',
text19: 'Rejected',
text20: 'Approved',
}
}

View File

@@ -0,0 +1,39 @@
// 中文
langZh = {
// 模塊
demoModule: {
layerIndex1: `加載中...`,
layerIndex2: `操作完成`,
layerIndex3: `網路錯誤`,
max: `background:url("./images/max.png") no-repeat;background-size:100% 100%;`,
img4: `background-image: url(./images/new-bg.png);`,
img44: `background-image: url(./images/select-bg.png);`,
img5: `background: url('./images/apply-new.png') no-repeat 0 0/100% 100%;`,
img2: `./images/disabled-btn.png`,
img3: `./images/apply-btn-basics.png`,
img6: `./images/record.png`,
img7: `./images/delay-btn.png`,
title_t: `私人訂製`,
text1: `銘牌樣式:`,
text2: `申請時長:`,
text3: ``,
text4: `銘牌文字:`,
text5: `請輸入4個字`,
text55: `4`,
text6: `銘牌至少申請7天`,
text7: `已達最大申請時長`,
text8: `請選擇樣式`,
text9: `請添加銘牌文字`,
text10: `請添加4個字的銘牌文字`,
text11: `暫時沒有銘牌可申請`,
text12: `申請成功`,
text13: `剩余`,
text14: `申请记录`,
text15: `暂无申请记录`,
text16: `申请`,
text17: `延长`,
text18: `申请中`,
text19: `不通过`,
text20: `已通过`,
}
}

View File

@@ -9,7 +9,8 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no, viewport-fit=cover" />
<title>申请记录</title>
<title class="text14"></title>
<!-- 申请记录 -->
<link rel="stylesheet" href="../../common/css/reset.css">
<link rel="stylesheet" href="./css/record.css">
@@ -23,13 +24,17 @@
</ul>
<div class="no-record-wrap">
<img src="./images/default.png" alt="">
<span>暂无申请记录</span>
<span class="text15"></span>
</div>
<script src="../../common/js/jquery-3.2.1.min.js"></script>
<script src="../../common/js/common2.js"></script>
<script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script>
<script src="./local/en.js"></script>
<script src="./local/zh.js"></script>
<script src="./local/ar.js"></script>
<script src="./js/record.js"></script>
<script src="../../common/local/langHandler.js"></script>
</body>
</html>

View File

@@ -261,7 +261,7 @@ function convert(_url) {
// 根据域名适配环境
function EnvCheck() {
if (window.location.href) {
if(window.location.pathname.match(/payAr/)){
if (window.location.pathname.match(/payAr/)) {
pubInfo['Accept-Language'] = "ar";
}
var _url = window.location.host;
@@ -838,9 +838,11 @@ function langCodeFun(langCode) {
document.documentElement.setAttribute("dir", "rtl");
document.body.classList.add('arabic');
if (window.location.href.match(/guildAr/)) {
document.documentElement.setAttribute("dir", "ltr");
}
}else if(langCode == "en"){
document.body.classList.add('english');
}
if (window.location.href.match(/guildAr/)) {
document.documentElement.setAttribute("dir", "ltr");
}
}
// 获取整条url

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 KiB

After

Width:  |  Height:  |  Size: 255 KiB

View File

@@ -178,7 +178,7 @@ function getRecord() {
success(res) {
if (res.code === 200) {
var str = '';
if (res.data.length == 0 && pageNumPk == 1) {
if (res.data.length == 0) {
lockPk = false;
} else {
res.data.forEach((res, i) => {

View File

@@ -59,5 +59,5 @@
<script src="./local/en.js"></script>
<script src="./local/zh.js"></script>
<script src="./local/ar.js"></script>
<script src="./js/hourRankLicense.js"></script>
<script src="./js/hourRankLicense.js?v=1.0"></script>
<script src="../../common/local/langHandler.js"></script>

View File

@@ -88,9 +88,6 @@ const renderLastHourThree = () => {
}
let str = ''
lastHourRank.map((item, index) => {
if (item.score > 10000) {
item.score = (Math.floor(item.score / 1000)) / 10 + 'W'
}
str += `
<div class="top_three_item">
<div class="avatar" data-uid=${item.uid}>
@@ -101,7 +98,7 @@ const renderLastHourThree = () => {
<div class="num" style="display:${item.score === '' ? 'none' : 'block'}">
${index == 0 ?
'<img src="./images/single/first-icon.png" alt=""></img>' :
`<span>${item.score}</span><br>${langReplace(localLang.demoModule.hour_text8)}`
`<span>${unitProcessingAr(item.score,1)}</span><br>${langReplace(localLang.demoModule.hour_text8)}`
}
</div>
</div>
@@ -156,9 +153,6 @@ const renderCurrentList = () => {
}
let str = ''
currHourRank.map((item, index) => {
if (item.score > 10000) {
item.score = (Math.floor(item.score / 1000)) / 10 + 'W'
}
str += `
<li>
<div class="index">${index + 1}</div>
@@ -169,7 +163,7 @@ const renderCurrentList = () => {
<div class="others_num" style="display:${item.score === '' ? 'none' : 'block'}">
${index === 0 ?
`${langReplace(localLang.demoModule.hour_text10)}` :
`${langReplace(localLang.demoModule.hour_text8)}<br><span>${item.score}</span>`
`${langReplace(localLang.demoModule.hour_text8)}<br><span>${unitProcessingAr(item.score,1)}</span>`
}
</div>
</li>
@@ -184,11 +178,12 @@ const renderCurrentRoomInfo = () => {
currHourRank.forEach((item, index) => {
if (item.uid == currRoomInfo.uid) {
rank = index + 1
if (item.score > 10000) {
score = (Math.floor(item.score / 1000)) / 10 + 'W'
} else {
score = item.score
}
// if (item.score > 10000) {
// score = (Math.floor(item.score / 1000)) / 10 + 'W'
// } else {
// score = item.score
// }
score = unitProcessingAr(item.score,1)
}
})
$('.mine_index').html(rank ? rank : `${langReplace(localLang.demoModule.hour_text11)}`)

View File

@@ -26,8 +26,8 @@ langAr = {
// =============================房间榜==============================
roomImg1: './images/title-ar.png',
room_title: 'قائمة الغرفة',
room_text1: 'قائمة الحب',
room_text2: 'قائمة السحر',
room_text1: 'قائمة الأغنياء',
room_text2: 'قائمة الجاذبية',
room_text3: 'القائمة اليومية',
room_text4: 'القائمة الأسبوعية',
room_text5: 'القائمة الشهرية',