xuechunyuan 3 years ago
parent a31d00fbdd
commit d3b34e6af8
  1. 2
      package.json
  2. 67
      public/index.html
  3. 21
      src/App.vue
  4. 104
      src/components/Guidance.vue
  5. 5
      src/main.js
  6. 71
      src/views/HomeView.vue
  7. 1
      vue.config.js
  8. 35
      yarn.lock

@ -9,7 +9,9 @@
},
"dependencies": {
"core-js": "^3.8.3",
"vant": "^2.12.53",
"vue": "^2.6.14",
"vue-axios": "^3.5.2",
"vue-router": "^3.5.1",
"vuex": "^3.6.2"
},

@ -1,17 +1,54 @@
<!DOCTYPE html>
<html lang="">
<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">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
<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">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<style>
* {
padding: 0;
margin: 0;
}
html,
body {
height: 100%;
overflow: hidden;
}
</style>
<script src="https://isdapp.shandong.gov.cn/jmopen/jssdk/index.js"></script>
<script>
(function (doc, win) {
var docEl = doc.documentElement,
resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
if (clientWidth >= 750) {
docEl.style.fontSize = '100px'; //1rem = 100px
} else {
docEl.style.fontSize = 100 * (clientWidth / 375) + 'px';
}
};
if (!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);
</script>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

@ -1,32 +1,17 @@
<template>
<div id="app">
<nav>
<router-link to="/">Home</router-link> |
<router-link to="/about">About</router-link>
</nav>
<router-view />
</div>
</template>
<style lang="scss">
#app {
width:100%;
height:100%;
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
nav {
padding: 30px;
a {
font-weight: bold;
color: #2c3e50;
&.router-link-exact-active {
color: #42b983;
}
}
font-size: 0.14rem;
}
</style>

@ -0,0 +1,104 @@
<template>
<div class="guidance">
<div class="guide_title">海慈医院体检预约须知</div>
<div class="guide_contant" ref="scrollView" id="scroll-view" @scroll="scroll">
<p>尊敬的驾驶员</p>
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p>
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p>
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p>
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p>
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p>
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p>
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p>
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p>
<p> 海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知海慈医院体检预约须知</p>
</div>
<div class="guide_btn">
<van-button size="small" @click="doCancel">取消</van-button>
<van-button @click="doRead" type="info" size="small" :disabled="this.isFlag ? false : true">已阅读</van-button>
</div>
</div>
</template>
<script>
export default {
name: "Guidance",
props: {
msg: String,
},
data() {
return {
isFlag: false,//
}
},
methods: {
//
doCancel() {
this.$emit('doCancelGuide','');
},
//
doRead() {
if (!this.isFlag) {
//
lightAppJssdk.notification.alert({
message: "还有内容没有阅读完,请滑动屏幕阅读完全",
title: "",//
buttonName: "确定",
success: function (data) {
//onSuccessbutton
/*回调*/
},
fail: function (data) { //
}
});
}
else {
//
this.$router.push({ name: '', params: {} })
}
},
//
scroll(e) {
if (this.isFlag) {
return;
}
const { scrollTop, clientHeight, scrollHeight } = e.target;
if (scrollTop + clientHeight === scrollHeight) {
this.isFlag = true;
console.log('阅读完成')
}
},
}
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.guidance {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: #fff;
.guide_title {
font-size: 0.22rem;
text-align: center;
padding: 0.15rem 0;
}
.guide_contant {
height: 5rem;
line-height: 0.22rem;
overflow-y: auto;
margin: 0.1rem 0;
padding: 0 0.3rem;
}
.guide_btn {
text-align: center;
margin-top: 0.15rem;
}
}
</style>

@ -3,6 +3,11 @@ import App from "./App.vue";
import router from "./router";
import store from "./store";
import vant from "vant";
import "vant/lib/index.css";
Vue.use(vant);
Vue.config.productionTip = false;
new Vue({

@ -1,18 +1,75 @@
<template>
<div class="home">
<img alt="Vue logo" src="../assets/logo.png" />
<HelloWorld msg="Welcome to Your Vue.js App" />
<div class="act_title">医院选择</div>
<div class="act_shoose">
<van-button @click="doGuidance" block>海慈医院</van-button>
<van-button @click="doGuidance" block>即墨人民医院</van-button>
<van-button @click="doGuidance" block>平度人民医院</van-button>
<van-button @click="doGuidance" block>胶州医院</van-button>
<van-button @click="doGuidance" block>莱西市立医院</van-button>
</div>
<div class="act_box">
<van-button type="info" block>我的预约</van-button>
</div>
<!-- 阅读须知 -->
<GuidanceVue @doCancelGuide="doCancelGuide" v-if="guideShow"></GuidanceVue>
</div>
</template>
<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";
import GuidanceVue from '@/components/Guidance.vue';
export default {
name: "HomeView",
components: {
HelloWorld,
GuidanceVue,
},
data() {
return {
guideShow: false
}
},
methods: {
testAlert() {
lightAppJssdk.notification.alert({
message: "这是一个弹窗",
title: "提示",//
buttonName: "收到",
success: function (data) {
//onSuccessbutton
/*回调*/
},
fail: function (data) { //
}
});
},
//
doCancelGuide() {
this.guideShow = false;
},
//
doGuidance() {
this.guideShow = true;
},
}
};
</script>
<style scoped lang="scss">
.home{
.act_title{
font-size: 0.22rem;
text-align: center;
padding:0.15rem 0;
}
.act_shoose{
margin: 0.1rem 0;
padding: 0 0.3rem;
.van-button{
margin-bottom: 0.12rem;
}
}
.act_box{
width: 2rem;
text-align: center;
margin:0.15rem auto 0;
}
}
</style>

@ -1,4 +1,5 @@
const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
lintOnSave: false,
transpileDependencies: true,
});

@ -925,7 +925,7 @@
"@babel/types" "^7.4.4"
esutils "^2.0.2"
"@babel/runtime@^7.12.13", "@babel/runtime@^7.8.4":
"@babel/runtime@7.x", "@babel/runtime@^7.12.13", "@babel/runtime@^7.8.4":
version "7.20.13"
resolved "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.20.13.tgz#7055ab8a7cff2b8f6058bf6ae45ff84ad2aded4b"
integrity sha512-gt3PKXs0DBoL9xCvOIIZ2NEqAGZqHjAnmVbfQtB620V0uReIQutpel14KcneZuer7UioY8ALKZ7iocavvzTNFA==
@ -1298,7 +1298,17 @@
dependencies:
"@types/node" "*"
"@vue/babel-helper-vue-jsx-merge-props@^1.4.0":
"@vant/icons@^1.7.1":
version "1.8.0"
resolved "https://registry.npmmirror.com/@vant/icons/-/icons-1.8.0.tgz#36b13f2e628b533f6523a93a168cf02f07056674"
integrity sha512-sKfEUo2/CkQFuERxvkuF6mGQZDKu3IQdj5rV9Fm0weJXtchDSSQ+zt8qPCNUEhh9Y8shy5PzxbvAfOOkCwlCXg==
"@vant/popperjs@^1.1.0":
version "1.3.0"
resolved "https://registry.npmmirror.com/@vant/popperjs/-/popperjs-1.3.0.tgz#e0eff017124b5b2352ef3b36a6df06277f4400f2"
integrity sha512-hB+czUG+aHtjhaEmCJDuXOep0YTZjdlRR+4MSmIFnkCQIxJaXLQdSsR90XWvAI2yvKUI7TCGqR8pQg2RtvkMHw==
"@vue/babel-helper-vue-jsx-merge-props@^1.0.0", "@vue/babel-helper-vue-jsx-merge-props@^1.4.0":
version "1.4.0"
resolved "https://registry.npmmirror.com/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.4.0.tgz#8d53a1e21347db8edbe54d339902583176de09f2"
integrity sha512-JkqXfCkUDp4PIlFdDQ0TdXoIejMtTHP67/pvxlgeY+u5k3LEdKuWZ3LK6xkxo52uDoABIVyRwqVkfLQJhk7VBA==
@ -5721,11 +5731,27 @@ validate-npm-package-license@^3.0.1:
spdx-correct "^3.0.0"
spdx-expression-parse "^3.0.0"
vant@^2.12.53:
version "2.12.53"
resolved "https://registry.npmmirror.com/vant/-/vant-2.12.53.tgz#d8cc479a044c415b2e3d216a41ee3b7857730770"
integrity sha512-f/wSWMCm/fd8bvm2QfPkpPqYUn8gwmBGw3DxAUPSTd/5prc1cRn23HEak8LDMJ5FmfW9mp7G5vdGlnEYCtww8Q==
dependencies:
"@babel/runtime" "7.x"
"@vant/icons" "^1.7.1"
"@vant/popperjs" "^1.1.0"
"@vue/babel-helper-vue-jsx-merge-props" "^1.0.0"
vue-lazyload "1.2.3"
vary@~1.1.2:
version "1.1.2"
resolved "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
vue-axios@^3.5.2:
version "3.5.2"
resolved "https://registry.npmmirror.com/vue-axios/-/vue-axios-3.5.2.tgz#28637524cca550a9e97197e85a41930ec63604d5"
integrity sha512-GP+dct7UlAWkl1qoP3ppw0z6jcSua5/IrMpjB5O8bh089iIiJ+hdxPYH2NPEpajlYgkW5EVMP95ttXWdas1O0g==
vue-eslint-parser@^8.0.1:
version "8.3.0"
resolved "https://registry.npmmirror.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz#5d31129a1b3dd89c0069ca0a1c88f970c360bd0d"
@ -5744,6 +5770,11 @@ vue-hot-reload-api@^2.3.0:
resolved "https://registry.npmmirror.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz#532955cc1eb208a3d990b3a9f9a70574657e08f2"
integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==
vue-lazyload@1.2.3:
version "1.2.3"
resolved "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.2.3.tgz#901f9ec15c7e6ca78781a2bae4a343686bdedb2c"
integrity sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g==
vue-loader@^17.0.0:
version "17.0.1"
resolved "https://registry.npmmirror.com/vue-loader/-/vue-loader-17.0.1.tgz#c0ee8875e0610a0c2d13ba9b4d50a9c8442e7a3a"

Loading…
Cancel
Save