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

master
赵鹏 11 months ago
commit b689adea83

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

@ -29,24 +29,27 @@
<div class="selectionMemo"> <div class="selectionMemo">
US$199 US$199
</div> </div>
<div id='premium_khomloy_left' class="dynamic-label" style="font-size: 18px;">Sold out</div>
</label> </label>
</div> </div>
<div class="optionLable" id="ticket_type_vip_khomloy"> <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;"> <label for="vip_khomloy" style="font-size:18px;">
VIP+Transfer+Dinner VIP+Transfer+Dinner
<div class="selectionMemo"> <div class="selectionMemo">
US$179 US$179
</div> </div>
<div id='vip_khomloy_left' class="dynamic-label" style="font-size: 18px;">93 left</div>
</label> </label>
</div> </div>
<div class="optionLable" id="ticket_type_standard_khomloy"> <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;"> <label for="standard_khomloy" style="font-size:18px;">
Standard+Transfer+Dinner Standard+Transfer+Dinner
<div class="selectionMemo"> <div class="selectionMemo">
US$139 US$139
</div> </div>
<div id='standard_khomloy_left' class="dynamic-label" style="font-size: 18px;">Sold out</div>
</label> </label>
</div> </div>
@ -412,101 +415,53 @@
document.addEventListener('DOMContentLoaded', function () { document.addEventListener('DOMContentLoaded', function () {
function initDefaultSelection() { var premium_khomloy_left = document.getElementById("premium_khomloy_left");
// 初始化时添加默认的余量信息 var vip_khomloy_left = document.getElementById("vip_khomloy_left");
addStyledLabel("ticket_type_premium_khomloy", "Sold out", "dynamic-label"); var standard_khomloy_left = document.getElementById("standard_khomloy_left");
addStyledLabel("ticket_type_vip_khomloy", "93 tickets left", "dynamic-label");
addStyledLabel("ticket_type_standard_khomloy", "Sold out", "dynamic-label");
}
// 初始化默认显示 var premium_khomloy_input = document.getElementById("premium_khomloy");
initDefaultSelection(); 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_november15th = document.getElementById("ticket_date_november15th");
var ticket_date_november16th = document.getElementById("ticket_date_november16th"); 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 () { ticket_date_november15th.addEventListener('click', function () {
console.log("ticket_date_november15th clicked"); premium_khomloy_left.innerText ='Sold out'
// 先移除旧的标签 vip_khomloy_left.innerText ='93 left'
removeExistingLabels("ticket_type_premium_khomloy", "dynamic-label"); standard_khomloy_left.innerText ='Sold out'
removeExistingLabels("ticket_type_vip_khomloy", "dynamic-label");
removeExistingLabels("ticket_type_standard_khomloy", "dynamic-label"); premium_khomloy_input.disabled = true;
vip_khomloy_input.disabled = false;
// 添加新的余量标签 standard_khomloy_input.disabled = true;
addStyledLabel("ticket_type_premium_khomloy", "Sold out", "dynamic-label");
addStyledLabel("ticket_type_vip_khomloy", "93 left", "dynamic-label"); vip_khomloy_input.checked = true;
addStyledLabel("ticket_type_standard_khomloy", "Sold out", "dynamic-label"); var dataPrice = parseInt(vip_khomloy_input.getAttribute('data-price'));
adultNumberValue = parseInt(adultNumberNode.value);
// 设置standard_khomloy为disabled calcTotalPrice(dataPrice, adultNumberValue);
var standardInput = document.getElementById("standard_khomloy");
if (standardInput) {
standardInput.disabled = true;
}
var premiumInput = document.getElementById("premium_khomloy");
if (premiumInput) {
premiumInput.disabled = true;
}
}); });
ticket_date_november16th.addEventListener('click', function () { ticket_date_november16th.addEventListener('click', function () {
console.log("ticket_date_november16th clicked"); premium_khomloy_left.innerText ='240 left'
// 先移除旧的标签 vip_khomloy_left.innerText ='149 left'
removeExistingLabels("ticket_type_premium_khomloy", "dynamic-label"); standard_khomloy_left.innerText ='19 left'
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_input.disabled = false;
function addStyledLabel(targetId, text, labelClass) { vip_khomloy_input.disabled = false;
var target = document.getElementById(targetId); standard_khomloy_input.disabled = false;
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);
}
}
// 移除旧的余量标签
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']"); var venueList = document.querySelectorAll("input[name='Venue']");

Loading…
Cancel
Save