diff --git a/view/molistar/activity/act-nameplate/images/delay-btn-ar.png b/view/molistar/activity/act-nameplate/images/delay-btn-ar.png
new file mode 100644
index 00000000..00c638b5
Binary files /dev/null and b/view/molistar/activity/act-nameplate/images/delay-btn-ar.png differ
diff --git a/view/molistar/activity/act-nameplate/images/delay-btn-en.png b/view/molistar/activity/act-nameplate/images/delay-btn-en.png
new file mode 100644
index 00000000..6a61fdb0
Binary files /dev/null and b/view/molistar/activity/act-nameplate/images/delay-btn-en.png differ
diff --git a/view/molistar/activity/act-nameplate/images/delay-btn.png b/view/molistar/activity/act-nameplate/images/delay-btn.png
index 1aea494f..d31c62a3 100644
Binary files a/view/molistar/activity/act-nameplate/images/delay-btn.png and b/view/molistar/activity/act-nameplate/images/delay-btn.png differ
diff --git a/view/molistar/activity/act-nameplate/js/public.js b/view/molistar/activity/act-nameplate/js/public.js
index c2e8e045..45add9d9 100644
--- a/view/molistar/activity/act-nameplate/js/public.js
+++ b/view/molistar/activity/act-nameplate/js/public.js
@@ -56,13 +56,7 @@ $(function () {
$('.text2').html(langReplace(localLang.demoModule.text2));
$('.text3').html(langReplace(localLang.demoModule.text3));
$('.text4').html(langReplace(localLang.demoModule.text4));
- $('.text5').attr('placeholder', partitionId == 1 ? '請輸入4個字' : partitionId == 2) ? `يرجى إدخال 13 أحرف` : `Enter 13 characters`;
- if (partitionId == 1 || partitionId == 2) {
- $('.text5').attr('maxlength', 13);
- } else {
- $('.text5').attr('maxlength', 4);
- }
-
+ $('.text5').attr('placeholder', langReplace(localLang.demoModule.text5));
}
if (browser.app) {
_hmt.push(['_trackEvent', 'client', 'click', "act_nameplate"]);
@@ -182,7 +176,8 @@ $(function () {
// 申請新銘牌彈窗 確定申請 按鈕點擊事件
$('.shade-mask-new').on('click', '.apply-btn', function () {
let content = $(this).parent();
- let ipt = content.find('input.new-nameplate-desc').val()
+ // let ipt = content.find('input.new-nameplate-desc').val()
+ let ipt = $('.text5').val();
if (!newNameplateId) {
toastMsg(langReplace(localLang.demoModule.text8));
return
@@ -243,12 +238,17 @@ const userGet = () => {
type: 'GET',
url: urlPrefix + '/user/get',
data: {
- uid: 2615
+ 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)
@@ -321,13 +321,13 @@ const renderNameplateList = () => {
userNameplateList.map(item => {
str += `
- 剩余${item.expireDays}${langReplace(localLang.demoModule.text3)}
+ ${langReplace(localLang.demoModule.text13)}${item.expireDays}${langReplace(localLang.demoModule.text3)}
${item.word}
-

+
`
diff --git a/view/molistar/activity/act-nameplate/js/record.js b/view/molistar/activity/act-nameplate/js/record.js
index 6ccabbbe..6c91cd74 100644
--- a/view/molistar/activity/act-nameplate/js/record.js
+++ b/view/molistar/activity/act-nameplate/js/record.js
@@ -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 += `
${item.text}
- ${item.applyType === 1 ? '申请' : '延长'}${item.applyDay}天
+ ${item.applyType === 1 ? langReplace(localLang.demoModule.text16) : langReplace(localLang.demoModule.text17)}${item.applyDay}${langReplace(localLang.demoModule.text3)}
${dateFormat(item.createTime, "yyyy-MM-dd")}
-
${item.auditType === 0 ? '申请中' : (item.auditType === 1 ? '不通过' : '已通过')}
- ${
- item.remark ? (item.remark.length > 8 ? `
${item.remark.slice(0, 8) + '...'}
` : `
${item.remark}
`) : ''
- }
+
${item.auditType === 0 ? langReplace(localLang.demoModule.text18) : (item.auditType === 1 ? langReplace(localLang.demoModule.text19) : langReplace(localLang.demoModule.text20))}
+ ${item.remark ? (item.remark.length > 8 ? `
${item.remark.slice(0, 8) + '...'}
` : `
${item.remark}
`) : ''
+ }
@@ -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
}
diff --git a/view/molistar/activity/act-nameplate/local/ar.js b/view/molistar/activity/act-nameplate/local/ar.js
index 602e50f8..43512344 100644
--- a/view/molistar/activity/act-nameplate/local/ar.js
+++ b/view/molistar/activity/act-nameplate/local/ar.js
@@ -12,12 +12,13 @@ langAr = {
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: `يرجى إدخال 13 أحرف`,
+ text5: `الرجاء إدخال...`,
text55: `13`,
text6: `يجب تطبيق اللوحة لمدة 7 أيام على الأقل`,
text7: `تم بلوغ أقصى مدة للتطبيق`,
@@ -26,6 +27,14 @@ langAr = {
text10: `يرجى إضافة نص اللوحة من 4 أحرف`,
text11: `لا توجد لوحات متاحة حالياً`,
text12: `تم التطبيق بنجاح`,
+ text13: 'متبقٍ',
+ text14: 'سجل الطلبات',
+ text15: 'لا توجد سجلات للطلبات',
+ text16: 'تقديم الطلب',
+ text17: 'تمديد',
+ text18: 'قيد الطلب',
+ text19: 'لم يتم القبول',
+ text20: 'تم القبول'
}
}
\ No newline at end of file
diff --git a/view/molistar/activity/act-nameplate/local/en.js b/view/molistar/activity/act-nameplate/local/en.js
index f41d8c17..bec2b42c 100644
--- a/view/molistar/activity/act-nameplate/local/en.js
+++ b/view/molistar/activity/act-nameplate/local/en.js
@@ -12,12 +12,13 @@ langEn = {
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: `Enter 13 characters`,
+ text5: `please enter...`,
text55: `13`,
text6: `Minimum 7 days required`,
text7: `Maximum duration reached`,
@@ -26,6 +27,14 @@ langEn = {
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',
}
}
\ No newline at end of file
diff --git a/view/molistar/activity/act-nameplate/local/zh.js b/view/molistar/activity/act-nameplate/local/zh.js
index 78041526..8cffc989 100644
--- a/view/molistar/activity/act-nameplate/local/zh.js
+++ b/view/molistar/activity/act-nameplate/local/zh.js
@@ -12,6 +12,7 @@ langZh = {
img2: `./images/disabled-btn.png`,
img3: `./images/apply-btn-basics.png`,
img6: `./images/record.png`,
+ img7: `./images/delay-btn.png`,
title_t: `私人訂製`,
text1: `銘牌樣式:`,
text2: `申請時長:`,
@@ -26,5 +27,13 @@ langZh = {
text10: `請添加4個字的銘牌文字`,
text11: `暫時沒有銘牌可申請`,
text12: `申請成功`,
+ text13: `剩余`,
+ text14: `申请记录`,
+ text15: `暂无申请记录`,
+ text16: `申请`,
+ text17: `延长`,
+ text18: `申请中`,
+ text19: `不通过`,
+ text20: `已通过`,
}
}
\ No newline at end of file
diff --git a/view/molistar/activity/act-nameplate/record.html b/view/molistar/activity/act-nameplate/record.html
index 6d2762f3..e5434701 100644
--- a/view/molistar/activity/act-nameplate/record.html
+++ b/view/molistar/activity/act-nameplate/record.html
@@ -9,7 +9,8 @@
- 申请记录
+
+
@@ -23,13 +24,17 @@

-
暂无申请记录
+
+
+
+
+