替换铭牌

This commit is contained in:
Dragon
2023-12-06 17:05:20 +08:00
parent b1bdaea5b7
commit e6bb70b29c
6 changed files with 35 additions and 35 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 KiB

After

Width:  |  Height:  |  Size: 650 KiB

View File

@@ -3,7 +3,7 @@ let urlPrefix = getUrlPrefix();
var browser = checkVersion();
var info = {};
if (EnvCheck() === 'test') new VConsole
// 封layer消息提醒框
// 封layer消息提醒框
let layerIndex
const showLoading = (content = '加載中...') => {
layer.open({
@@ -29,7 +29,7 @@ const toastMsg = (content = '操作完成', time = 2) => {
let delayLock = false, newApplyLock = false
let btnStatus = []
// 取用户铭牌状态
// 取用戶銘牌狀態
const getUserNameplateInfo = () => {
showLoading()
networkRequest({
@@ -54,11 +54,11 @@ const getUserNameplateInfo = () => {
})
}
// 渲染首页按钮状态
// 渲染首頁按鈕狀態
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', () => {
@@ -66,7 +66,7 @@ const renderBtnStatus = () => {
})
}
}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', () => {
@@ -78,7 +78,7 @@ const renderBtnStatus = () => {
}
let userNameplateList = []
// 取用已有牌列
// 取用已有牌列
const getUserNameplateList = (type) => {
showLoading()
networkRequest({
@@ -108,7 +108,7 @@ const getUserNameplateList = (type) => {
})
}
// 渲染牌列表(选择弹窗)
// 渲染牌列錶(選擇彈窗)
const renderNameplateList = () => {
let str = ''
userNameplateList.map( item => {
@@ -133,7 +133,7 @@ const renderNameplateList = () => {
let newNameplateList = []
// 取新牌列
// 取新牌列
const getNewNameplateList = (type) => {
showLoading()
networkRequest({
@@ -147,7 +147,7 @@ const getNewNameplateList = (type) => {
hideLoading(layerIndex)
if(res.code === 200){
if(!res.data.length){
toastMsg('暂时没有铭牌可申')
toastMsg('暫時沒有銘牌可申')
return
}
newNameplateList = res.data
@@ -163,8 +163,8 @@ const getNewNameplateList = (type) => {
})
}
let newNameplateId //只有一个可选时,默认选
// 渲染申请新铭牌弹
let newNameplateId //只有一個可選時,默認選
// 渲染申請新銘牌彈
const renderNewNameplateList = () => {
let str = '';
newNameplateList.map( item => {
@@ -187,7 +187,7 @@ const renderNewNameplateList = () => {
$('body').css('overflow', 'hidden')
}
// 确认延长期限
// 確認延長期限
const delayNamaplateConfirm = (params) => {
showLoading()
networkRequest({
@@ -204,7 +204,7 @@ const delayNamaplateConfirm = (params) => {
success(res){
hideLoading(layerIndex)
if(res.code === 200){
toastMsg('申成功')
toastMsg('申成功')
$('.shade-mask-delay').hide()
$('body').css('overflow', 'auto')
delayLock = false
@@ -222,7 +222,7 @@ const delayNamaplateConfirm = (params) => {
})
}
// 确认申请新铭
// 確認申請新銘
const applyNewNamaplateConfirm = (params) => {
showLoading()
networkRequest({
@@ -239,7 +239,7 @@ const applyNewNamaplateConfirm = (params) => {
success(res){
hideLoading(layerIndex)
if(res.code === 200){
toastMsg('申成功')
toastMsg('申成功')
$('.shade-mask-new').hide()
$('body').css('overflow', 'auto')
newApplyLock = false
@@ -268,12 +268,12 @@ $(function () {
_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')
@@ -290,7 +290,7 @@ $(function () {
})
let maxApplyDay, nameplateId, type, text
// 监听期限 按钮点击事件
// 監聽期限 按鈕點擊事件
$('.select-ul').on('click', '.delay-btn', function() {
let li = $(this).parent();
let src = li.find('.nameplate img').attr('src');
@@ -307,29 +307,29 @@ $(function () {
$('.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天')
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('已最大申请时长')
toastMsg('已最大申請時長')
}else{
applyDay += 7;
}
$('.shade-mask-delay .delay-time p span').html(applyDay);
})
// 监听申请延期定按钮点击事件
// 監聽申請延期定按鈕點擊事件
$('.shade-mask-delay').on('click', '.apply-btn', function(){
// applyType 1申请新铭2延
// applyType 1申請新銘2延
if(!delayLock){
delayLock = true
let params = {
@@ -345,59 +345,59 @@ $(function () {
/************************* ******************************/
// 监听 申请新铭牌 按钮点击事件
// 監聽 申請新銘牌 按鈕點擊事件
$('.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天')
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('已最大申请时长')
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('请选择样式');
toastMsg('請選擇樣式');
return
}
if(!ipt){
toastMsg('添加牌文字');
toastMsg('添加牌文字');
return
}else{
if(ipt.length !== 4){
toastMsg('添加4字的牌文字');
toastMsg('添加4字的牌文字');
return
}
}
// applyType 1申请新铭2延
// applyType 1申請新銘2延
if(!newApplyLock){
newApplyLock = true
let params = {