123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- <template>
- <div id="guide" @click="openContactInfo">
- <img id="background1" src="@/assets/images/background.png" />
- <div id="contact">
- <img
- id="contactButton"
- @click="isShowContact = !isShowContact"
- src="@/assets/images/contactbutton.png"
- />
- <div id="info" v-show="isShowContact">
- <img id="contactInfo" src="@/assets/images/contactinfo.png" />
- <div id="phone">
- <div class="contact-title">
- <img class="img-contact" src="@/assets/images/phoneIcon.png" />
- 商务合作电话:
- </div>
- <div
- class="contact-content"
- v-for="(phoneNumber, index) of phones"
- :key="index"
- >
- {{ phoneNumber }}
- </div>
- </div>
- <div id="email">
- <div class="contact-title">
- <img class="img-contact" src="@/assets/images/emailIcon.png" />
- 商务合作邮箱:
- </div>
- <div class="contact-content">{{ email }}</div>
- </div>
- <div id="weChat">
- <div class="contact-title">
- <img class="img-contact" src="@/assets/images/wechatIcon.png" />
- 商务合作微信:
- </div>
- <div class="qrcode"><img class="img-qrcode" src="@/assets/images/qrcode.png" /></div>
- </div>
- </div>
- </div>
- <guide-button></guide-button>
- </div>
- </template>
- <script>
- import GuideButton from "./GuideButton.vue";
- export default {
- components: { GuideButton },
- name: "GuidePage",
- data() {
- return {
- isShowContact: false,
- phones: ["13581625033(黎先生)", "15733737800(刘小姐)"],
- email: "sales@4dage.com",
- buttoInGuidePage: {
- titles: ["点击看展", "参加云展", "往届博博会"],
- },
- };
- },
- methods: {
- openContactInfo(event) {
- let contactId = [
- "contactButton",
- "contactInfo",
- "phone",
- "email",
- "weChat",
- ];
- if (
- !contactId.includes(event.target.id) &&
- ![].slice.call(event.target.classList).includes("contact-content") &&
- ![].slice.call(event.target.classList).includes("contact-title") &&
- ![].slice.call(event.target.classList).includes("img-qrcode")
- ) {
- this.isShowContact = false;
- //TODO:测试下点击其他组件时能不能收回
- }
- },
- },
- };
- </script>
- <!-- Add "scoped" attribute to limit CSS to this component only -->
- <style scoped>
- #guide {
- position: relative;
- font-size: 16px;
- }
- #background1 {
- width: 100%;
- opacity: 0.5;
- }
- #contact {
- position: fixed;
- right: 0.5rem;
- top: 1rem;
- width: 3.6rem;
- height: 3.6rem;
- }
- @media screen and (min-width: 780px) {
- #contact {
- position: absolute;
- right: 0.5rem;
- top: 1rem;
- width: 3.6rem;
- height: 3.6rem;
- }
- }
- #contactButton {
- width: 3.6rem;
- height: 3.6rem;
- }
- #info {
- position: absolute;
- right: 1rem;
- top: 3.6rem;
- width: 20.7rem;
- height: 27.3rem;
- }
- #contactInfo {
- width: 100%;
- height: 100%;
- opacity: 0.8;
- }
- #phone {
- position: absolute;
- top: 2rem;
- left: 50%;
- transform: translateX(-50%);
- width: 13.3rem;
- height: 4.4rem;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- }
- #info .contact-title {
- width: 9.8rem;
- height: 1.3rem;
- font-size: 1rem;
- font-family: Microsoft YaHei;
- font-weight: 400;
- color: #d06814;
- opacity: 1;
- }
- .contact-content {
- position: relative;
- left: 2.5rem;
- color: #ffffff;
- font-size: 0.9rem;
- text-align: left;
- }
- #email {
- position: absolute;
- top: 11rem;
- left: 50%;
- transform: translateX(-50%);
- width: 13.3rem;
- height: 3.1rem;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- }
- div.qrcode {
- width: 4.6rem;
- height: 4.6rem;
- }
- .qrcode > img {
- position: relative;
- width: 100%;
- left: 2.5rem;
- top: 1.3rem;
- }
- #weChat {
- position: absolute;
- top: 18rem;
- left: 50%;
- transform: translateX(-50%);
- width: 13.3rem;
- }
- img.img-contact {
- width: 1.4rem;
- height: 1.4rem;
- vertical-align: sub;
- margin-right: 0.3rem;
- pointer-events: none;
- }
- #guide-button {
- position: absolute;
- top: 38.1rem;
- left: 50%;
- width: 18.9rem;
- height: 9.4rem;
- transform: translateX(-50%);
- }
- </style>
|