Skip to content

Commit

Permalink
细节优化
Browse files Browse the repository at this point in the history
  • Loading branch information
ccizm committed Feb 20, 2024
1 parent e10878c commit f794edb
Show file tree
Hide file tree
Showing 16 changed files with 318 additions and 72 deletions.
4 changes: 2 additions & 2 deletions project/pages/checkout.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ <h4 class="modal-title" id="PreviewModalLabel">打印预览</h4>
<label for="CheckoutType">结账单样式选择</label>
<div>
<label class="radio-inline">
<input type="radio" name="Checkoutradio" id="CheckoutA" value="a"> 旧版(不建议使用)
<input type="radio" name="Checkoutradio" id="CheckoutB" value="b" checked> B 样式
</label>
<label class="radio-inline">
<input type="radio" name="Checkoutradio" id="CheckoutB" value="b" checked> 新版
<input type="radio" name="Checkoutradio" id="CheckoutA" value="a"> A 样式
</label>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion project/pages/checkout/b.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
tr.el-table__row:hover,
.header-hotel:hover,
#checkout>div>div.declaration:hover,
#checkout>div>div.seal>div:hover {
#checkout>div>div.seal>div:hover,
.header .header-title:hover
{
background-color: #337ab7;
color: #fff;
border-color: #66afe9;
Expand Down
26 changes: 20 additions & 6 deletions project/pages/checkout/css/b.css
Original file line number Diff line number Diff line change
Expand Up @@ -48941,7 +48941,7 @@ li[data-v-5d69e186] {

.footer span[data-v-0078adbe] {
bottom: 5mm;
font-size: 6px;
font-size: 12px;
width: 50%;
color: rgb(16, 16, 16);
}
Expand Down Expand Up @@ -48976,7 +48976,7 @@ li[data-v-5d69e186] {

.footer span[data-v-0dec4ce4] {
bottom: 5mm;
font-size: 6px;
font-size: 12px;
width: 50%;
color: rgb(16, 16, 16);
}
Expand Down Expand Up @@ -56635,6 +56635,14 @@ li[data-v-5d69e186] {
}

@media print {
#checkout {
padding: 0!important;
}

.Legal {
-webkit-box-shadow: none!important;
box-shadow: none!important;
}

@page {
margin: 0px;
Expand Down Expand Up @@ -56878,10 +56886,16 @@ tr.solid:nth-child(2n) {
font-weight: 800;
}

#checkout {
padding: 16px;
}

.Legal[data-v-5085e2e2] {
width: 72mm;
padding: 20px 10px 5px;
margin: auto;
-webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%), 0 0 8px rgba(99 99 100 / 60%);
box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%), 0 0 8px rgb(99 99 100 / 60%);
}

.Legal .bottom-line[data-v-5085e2e2] {
Expand All @@ -56905,7 +56919,7 @@ tr.solid:nth-child(2n) {
}

.Legal .info[data-v-5085e2e2] {
font-size: 6px;
font-size: 12px;
color: rgb(16, 16, 16);
}

Expand All @@ -56915,7 +56929,7 @@ tr.solid:nth-child(2n) {

.Legal[data-v-5085e2e2] .el-table .cell {
padding: 0px;
font-size: 6px;
font-size: 12px;
color: rgb(0, 0, 0);
word-break: break-word;
height: auto;
Expand Down Expand Up @@ -56952,7 +56966,7 @@ tr.solid:nth-child(2n) {
}

.Legal .info[data-v-3d748466] {
font-size: 6px;
font-size: 12px;
color: rgb(16, 16, 16);
}

Expand All @@ -56962,7 +56976,7 @@ tr.solid:nth-child(2n) {

.Legal[data-v-3d748466] .el-table .cell {
padding: 0px;
font-size: 6px;
font-size: 12px;
color: rgb(0, 0, 0);
word-break: break-word;
height: auto;
Expand Down
7 changes: 1 addition & 6 deletions project/pages/checkout/js/a.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,4 @@ chrome.storage.sync.get('options', (data) => {
document.querySelector("body > div > div.Print-footer > div:nth-child(2) > span").innerHTML = options.Hotel[0].HotelPhone;
document.querySelector("body > div > div.Print-footer > div:nth-child(3) > span").innerHTML = options.Hotel[0].HotelZip;
document.querySelector("body > div > div.Print-footer > div:nth-child(4) > span").innerHTML = options.Hotel[0].HotelFax;
});

document.onselectstart=function(){return false}
document.oncontextmenu=function(){return false}
document.ondragstart=function(){return false}
document.onselect=function(){return false}
});
7 changes: 1 addition & 6 deletions project/pages/checkout/js/b.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,4 @@ chrome.storage.sync.get('options', (data) => {
document.querySelector("#checkout > div > div:nth-child(7) > div > div:nth-child(2) > span").innerHTML = '电话:' + options.Hotel[0].HotelPhone;
document.querySelector("#checkout > div > div:nth-child(7) > div > div:nth-child(3) > span").innerHTML = '邮编:' + options.Hotel[0].HotelZip;
document.querySelector("#checkout > div > div:nth-child(7) > div > div:nth-child(4) > span").innerHTML = '传真:' + options.Hotel[0].HotelFax;
});

document.onselectstart=function(){return false}
document.oncontextmenu=function(){return false}
document.ondragstart=function(){return false}
document.onselect=function(){return false}
});
21 changes: 21 additions & 0 deletions project/pages/muyu-master/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link href="./static/css/index.css" rel="stylesheet" />
<title>木鱼-功德版</title>
</head>

<body>
<div class="muyu">
<div class="gongde">
<!-- 功德+1 -->
</div>
<img id="muyu-img" src="./static/img/muyubai.png" />
</div>
</body>
<script src="./static/js/index.js"></script>
</html>
Binary file added project/pages/muyu-master/static/audio.mp3
Binary file not shown.
70 changes: 70 additions & 0 deletions project/pages/muyu-master/static/css/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
* {
margin: 0;
padding: 0;
}

body {
background-color: black;
width: 100vw;
height: 100vh;
overflow: hidden;
}

.muyu {
position: absolute;
margin: auto 0;
display: flex;
bottom: 0px;
top: 0px;
width: 100%;
height: 300px;
justify-content: center;
align-items: center;
flex-direction: column;
}

.muyu>img {
width: 150px;
height: 100px;
user-select: none;
transition: all 0.2s;
}

.gongde {
position: relative;
color: #fff;
height: 10px;
}

.gongde-item {
position: absolute;
left: -50vw;
width: 100vw;
font-size: 18px;
font-weight: 600;
text-align: center;
transform: translateY(0px);
animation: move 2s;
}

@keyframes move {
0% {
transform: translateY(0px);
opacity: 1;
}

100% {
transform: translateY(-100px);
opacity: 0;
}
}

.setting {
position: relative;
left: 15px;
top: 15px;
}

.clickDown {
transform: scale(0.9);
}
Binary file added project/pages/muyu-master/static/img/muyubai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions project/pages/muyu-master/static/js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* @description:
* @Date: 2022-09-30 13:10:46
* @LastEditTime: 2022-09-30 13:27:10
*/
const muyu = document.querySelector("#muyu-img");
const listBox = document.querySelector(".gongde");
const setting = document.querySelector(".setting");
var gd = 1;
//声音素材
const audio = new Audio();
audio.src = "./static/audio.mp3"
audio.volume = 1;

//动态创建功德弹窗
const createAlert = () => {
audio.pause()
audio.play()
const div = document.createElement("div");
div.className = "gongde-item"
div.innerText = `功德 ${gd > 0 ? '+' : ''}${gd}`
setTimeout(() => {
listBox.removeChild(div);
}, 1900);
listBox.append(div)
}

//木鱼点击后的效果
const muyuScale = () => {
muyu.className = 'clickDown'
setTimeout(_ => {
muyu.className = ''
}, 200)
}

let lastTime = new Date().getTime();

//木鱼图片按下事件
muyu.onclick = () => {
if (new Date().getTime() - 500 > lastTime) {
createAlert()
muyuScale();
lastTime = new Date().getTime();
}
}
//监听空格键按下事件
window.addEventListener("keydown", function (event) {
const { code } = event;
if (code == 'Space') {
if (new Date().getTime() - 500 > lastTime) {
muyuScale();
createAlert()
lastTime = new Date().getTime();
}
}
})

//设置按钮
setting.onclick = () => {
const gdNumber = prompt("请输入功德值:")
gd = Number(gdNumber)
}
65 changes: 65 additions & 0 deletions project/pages/muyu-master/static/less/index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
* {
margin: 0;
padding: 0;
}
body {
background-color: black;
width: 100vw;
height: 100vh;
overflow: hidden;
}
.muyu {
position: absolute;
margin: auto 0;
display: flex;
bottom: 0px;
top: 0px;
width: 100%;
height: 300px;
justify-content: center;
align-items: center;
flex-direction: column;
> img {
width: 300px;
height: 200px;
user-select: none;
transition: all 0.3s;
}
}

.gongde {
position: relative;
color: #fff;
height: 10px;
}
.gongde-item {
position: absolute;
left: -50vw;
width: 100vw;
font-size: 18px;
font-weight: 600;
text-align: center;
transform: translateY(0px);
animation: move 2s;
}

@keyframes move {
0% {
transform: translateY(0px);
opacity: 1;
}
100% {
transform: translateY(-100px);
opacity: 0;
}
}

.setting {
position: relative;
left: 15px;
top: 15px;
}

.clickDown{
transform: scale(0.9);
}
Loading

0 comments on commit f794edb

Please sign in to comment.