You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

199 lines
3.9 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>test</title>
<link rel="stylesheet" href="./grid.css">
<link rel="shortcut icon" href="./favicon.ico" type="image/x-icon">
<!-- <script src="https://unpkg.com/unfetch/polyfill"></script> -->
<script src="./utils.js"></script>
<script src="./vue@2.js"></script>
</head>
<script>
</script>
<style>
/* @font-face {
font-family: 'DIN';
src: url('/dashboard/styles/DIN-BOLD-2.TTF');
font-style: normal;
font-weight: normal;
} */
body {
font-size: 12px;
font-family: DIN;
}
#main {
/* padding-right: 50px !important;
padding-left: 50px !important; */
margin-top: 12px;
margin-left: auto;
margin-right: auto;
}
.fz-22 {
font-size: 22px;
}
.z {
color: #E75A25;
}
.d {
color: #5EAD7D;
}
.info {
color: #343240;
}
/* loading */
#loading-mask {
width: 100vw;
height: 100vh;
background-color: #00000099;
position: fixed;
left: 0;
top: 0;
display: flex
}
.lds-facebook {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
margin: auto
}
.lds-facebook div {
display: inline-block;
position: absolute;
left: 8px;
width: 16px;
background: #fff;
animation: lds-facebook 1.2s cubic-bezier(0, .5, .5, 1) infinite
}
.lds-facebook div:nth-child(1) {
left: 8px;
animation-delay: -.24s
}
.lds-facebook div:nth-child(2) {
left: 32px;
animation-delay: -.12s
}
.lds-facebook div:nth-child(3) {
left: 56px;
animation-delay: 0
}
@keyframes lds-facebook {
0% {
top: 8px;
height: 64px
}
100%,
50% {
top: 24px;
height: 32px
}
}
/* end loading */
</style>
<body>
<input id="debug" type="checkbox" />
<label for="debug">Show grid lines</label>
<div class="content">
<div>Content</div>
<div class="popout">Popout</div>
<div class="feature">Feature</div>
<div class="full">Full</div>
</div>
<div class="content debug">
<div class="full"></div>
<div class="feature"></div>
<div class="popout"></div>
<div></div>
</div>
<div class="container-fluid" id="main">
<template>
<div v-for="(item, i) in feedbackItemList" :key="item.id">
<div>{{item.name}}</div>
</div>
</template>
<div id="loading-mask" v-if="loading">
<div class="lds-facebook">
<div></div>
<div></div>
<div></div>
</div>
</div>
</div>
<script defer>
// const HOST = `http://discovery.mycht.cn/api/index.php`;
const HOST = `http://localhost:3001/api/index.php`;
const defaultHeaders = { mode: 'no-cors', 'Sec-Fetch-Mode': 'no-cors' };
const rateList = [
{ name: 'Excellent', value: 5 },
{ name: 'Very Good', value: 4 },
{ name: 'Fair', value: 3 },
{ name: 'Poor', value: 2 },
{ name: 'Unacceptable', value: 1 }
];
const rateListMapped = rateList.reduce((r, v) => ({...r, [v.value + '']: v.name}), {});
console.log(rateListMapped);
/**
*
*/
const index = new Vue({
el: '#main',
data() {
return {
timer: null,
loading: false,
feedbackItemList: [],
};
},
created() {
console.log('invoke vue', typeof this);
this.initData();
},
methods: {
initData() {
this.loading = true;
this.getData();
},
getData() {
const that = this;
postForm(
`${HOST}/feedback/customer_feedback`,
// {group_id: 348323, tour_guide_id: 141},
{ group_id: 69291, tour_guide_id: 730 },
{ headers: { ...{} } }
).then((res) => {
that.loading = false;
that.feedbackItemList = res.feedbackItemList;
console.log(res)
});
},
},
});
</script>
</body>
</html>