Merge branch 'master' of github.com:hainatravel/information-system

master
赵鹏 11 months ago
commit b689adea83

@ -6,8 +6,8 @@ on:
branches: [ master ]
jobs:
gh-win-us-deploy:
name: 🎉 Deploy InfoSys to US
gh-win-cn-deploy:
name: 🎉 Deploy InfoSys to CN
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
@ -16,13 +16,14 @@ jobs:
- name: 📂 Sync files to CHT
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
server: ${{ secrets.US_FTP_SERVER }}
username: ${{ secrets.US_FTP_USER }}
password: ${{ secrets.US_FTP_PASSWORD }}
port: ${{ secrets.US_FTP_PORT }}
server: ${{ secrets.CN_FTP_SERVER }}
username: ${{ secrets.CN_FTP_USER }}
password: ${{ secrets.CN_FTP_PASSWORD }}
port: ${{ secrets.CN_FTP_PORT }}
local-dir: ./
server-dir: /information-system/
server-dir: /wwwroot/origin-cht.mycht.cn/
# dry-run: true
# log-level: verbose
exclude: |
**/.git*
**/.git*/**
@ -36,7 +37,16 @@ jobs:
*.exe
*.docx
.ftp-deploy-sync-state.json
- name: 📂 Sync files to CT
gh-win-us-deploy:
needs: gh-win-cn-deploy
name: 🎉 Deploy InfoSys to US
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- name: 📂 Sync files to CHT
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
server: ${{ secrets.US_FTP_SERVER }}
@ -44,7 +54,7 @@ jobs:
password: ${{ secrets.US_FTP_PASSWORD }}
port: ${{ secrets.US_FTP_PORT }}
local-dir: ./
server-dir: /origin-ct.mycht.cn/
server-dir: /information-system/
# dry-run: true
exclude: |
**/.git*
@ -59,26 +69,16 @@ jobs:
*.exe
*.docx
.ftp-deploy-sync-state.json
gh-win-cn-deploy:
needs: gh-win-us-deploy
name: 🎉 Deploy InfoSys to CN
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v3
- name: 📂 Sync files to CHT
- name: 📂 Sync files to CT
uses: SamKirkland/FTP-Deploy-Action@v4.3.4
with:
server: ${{ secrets.CN_FTP_SERVER }}
username: ${{ secrets.CN_FTP_USER }}
password: ${{ secrets.CN_FTP_PASSWORD }}
port: ${{ secrets.CN_FTP_PORT }}
server: ${{ secrets.US_FTP_SERVER }}
username: ${{ secrets.US_FTP_USER }}
password: ${{ secrets.US_FTP_PASSWORD }}
port: ${{ secrets.US_FTP_PORT }}
local-dir: ./
server-dir: /wwwroot/origin-cht.mycht.cn/
server-dir: /origin-ct.mycht.cn/
# dry-run: true
# log-level: verbose
exclude: |
**/.git*
**/.git*/**
@ -93,6 +93,8 @@ jobs:
*.docx
.ftp-deploy-sync-state.json
hn-notification:
needs: gh-win-cn-deploy
name: 🔔 Send notificaiton

@ -29,24 +29,27 @@
<div class="selectionMemo">
US$199
</div>
<div id='premium_khomloy_left' class="dynamic-label" style="font-size: 18px;">Sold out</div>
</label>
</div>
<div class="optionLable" id="ticket_type_vip_khomloy">
<input type="radio" value="VIP+Transfer+Dinner" id="vip_khomloy" data-price="179" name="ticket_type" checked>
<input type="radio" value="VIP+Transfer+Dinner" checked id="vip_khomloy" data-price="179" name="ticket_type">
<label for="vip_khomloy" style="font-size:18px;">
VIP+Transfer+Dinner
<div class="selectionMemo">
US$179
</div>
<div id='vip_khomloy_left' class="dynamic-label" style="font-size: 18px;">93 left</div>
</label>
</div>
<div class="optionLable" id="ticket_type_standard_khomloy">
<input type="radio" disabled ="Standard+Transfer+Dinner" id="standard_khomloy" data-price="139" name="ticket_type" value="Standard+Transfer+Dinner">
<input type="radio" id="standard_khomloy" data-price="139" name="ticket_type" value="Standard+Transfer+Dinner">
<label for="standard_khomloy" style="font-size:18px;">
Standard+Transfer+Dinner
<div class="selectionMemo">
US$139
</div>
<div id='standard_khomloy_left' class="dynamic-label" style="font-size: 18px;">Sold out</div>
</label>
</div>
@ -412,101 +415,53 @@
document.addEventListener('DOMContentLoaded', function () {
function initDefaultSelection() {
// 初始化时添加默认的余量信息
addStyledLabel("ticket_type_premium_khomloy", "Sold out", "dynamic-label");
addStyledLabel("ticket_type_vip_khomloy", "93 tickets left", "dynamic-label");
addStyledLabel("ticket_type_standard_khomloy", "Sold out", "dynamic-label");
}
var premium_khomloy_left = document.getElementById("premium_khomloy_left");
var vip_khomloy_left = document.getElementById("vip_khomloy_left");
var standard_khomloy_left = document.getElementById("standard_khomloy_left");
// 初始化默认显示
initDefaultSelection();
var premium_khomloy_input = document.getElementById("premium_khomloy");
var vip_khomloy_input = document.getElementById("vip_khomloy");
var standard_khomloy_input = document.getElementById("standard_khomloy");
var ticket_date_november15th = document.getElementById("ticket_date_november15th");
var ticket_date_november16th = document.getElementById("ticket_date_november16th");
vip_khomloy_input.checked = true;
premium_khomloy_input.disabled = true;
vip_khomloy_input.disabled = false;
standard_khomloy_input.disabled = true;
ticket_date_november15th.addEventListener('click', function () {
console.log("ticket_date_november15th clicked");
// 先移除旧的标签
removeExistingLabels("ticket_type_premium_khomloy", "dynamic-label");
removeExistingLabels("ticket_type_vip_khomloy", "dynamic-label");
removeExistingLabels("ticket_type_standard_khomloy", "dynamic-label");
// 添加新的余量标签
addStyledLabel("ticket_type_premium_khomloy", "Sold out", "dynamic-label");
addStyledLabel("ticket_type_vip_khomloy", "93 left", "dynamic-label");
addStyledLabel("ticket_type_standard_khomloy", "Sold out", "dynamic-label");
// 设置standard_khomloy为disabled
var standardInput = document.getElementById("standard_khomloy");
if (standardInput) {
standardInput.disabled = true;
}
var premiumInput = document.getElementById("premium_khomloy");
if (premiumInput) {
premiumInput.disabled = true;
}
premium_khomloy_left.innerText ='Sold out'
vip_khomloy_left.innerText ='93 left'
standard_khomloy_left.innerText ='Sold out'
premium_khomloy_input.disabled = true;
vip_khomloy_input.disabled = false;
standard_khomloy_input.disabled = true;
vip_khomloy_input.checked = true;
var dataPrice = parseInt(vip_khomloy_input.getAttribute('data-price'));
adultNumberValue = parseInt(adultNumberNode.value);
calcTotalPrice(dataPrice, adultNumberValue);
});
ticket_date_november16th.addEventListener('click', function () {
console.log("ticket_date_november16th clicked");
// 先移除旧的标签
removeExistingLabels("ticket_type_premium_khomloy", "dynamic-label");
removeExistingLabels("ticket_type_vip_khomloy", "dynamic-label");
removeExistingLabels("ticket_type_standard_khomloy", "dynamic-label");
// 添加新的余量标签
addStyledLabel("ticket_type_premium_khomloy", "240 left", "dynamic-label");
addStyledLabel("ticket_type_vip_khomloy", "149 left", "dynamic-label");
addStyledLabel("ticket_type_standard_khomloy", "19 left", "dynamic-label");
var standardInput = document.getElementById("standard_khomloy");
if (standardInput) {
standardInput.disabled = false;
}
var premiumInput = document.getElementById("premium_khomloy");
if (premiumInput) {
premiumInput.disabled = false;
}
});
});
premium_khomloy_left.innerText ='240 left'
vip_khomloy_left.innerText ='149 left'
standard_khomloy_left.innerText ='19 left'
// 添加新的余量信息标签
function addStyledLabel(targetId, text, labelClass) {
var target = document.getElementById(targetId);
if (target) {
removeExistingLabels(targetId, labelClass);
var existingLabel = target.querySelector('label[for]');
if (existingLabel) {
var selectionMemo = existingLabel.querySelector('.selectionMemo');
if (selectionMemo) {
var newLabel = document.createElement('label');
newLabel.style.fontSize = '18px';
newLabel.textContent = text;
newLabel.classList.add(labelClass);
selectionMemo.parentNode.insertBefore(newLabel, selectionMemo.nextSibling);
} else {
console.error('SelectionMemo element not found within label.');
}
} else {
console.error('Existing label not found within target ID:', targetId);
}
} else {
console.error('Element not found for ID:', targetId);
}
}
premium_khomloy_input.disabled = false;
vip_khomloy_input.disabled = false;
standard_khomloy_input.disabled = false;
// 移除旧的余量标签
function removeExistingLabels(targetId, labelClass) {
var target = document.getElementById(targetId);
if (target) {
var existingLabels = target.querySelectorAll('.' + labelClass);
existingLabels.forEach(function(label) {
label.parentNode.removeChild(label);
premium_khomloy_input.checked = true;
var dataPrice = parseInt(premium_khomloy_input.getAttribute('data-price'));
adultNumberValue = parseInt(adultNumberNode.value);
calcTotalPrice(dataPrice, adultNumberValue);
});
});
}
}
var venueList = document.querySelectorAll("input[name='Venue']");

Loading…
Cancel
Save