Browse Source

首页适配移动端

old
bemege 4 years ago
parent
commit
5f22b5bd21
  1. 3
      package.json
  2. 1
      public/index.html
  3. 37
      src/App.vue
  4. 5
      src/main.js
  5. 865
      src/views/official/index.vue
  6. 508
      src/views/official/indexbak.vue

3
package.json

@ -13,6 +13,7 @@
}, },
"dependencies": { "dependencies": {
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"aos": "^2.3.4",
"axios": "^0.21.0", "axios": "^0.21.0",
"core-js": "^3.6.4", "core-js": "^3.6.4",
"crypto-js": "^4.0.0", "crypto-js": "^4.0.0",
@ -39,7 +40,6 @@
"@vue/cli-service": "^4.5.8", "@vue/cli-service": "^4.5.8",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-plugin-dynamic-import-node": "^2.3.3", "babel-plugin-dynamic-import-node": "^2.3.3",
"script-ext-html-webpack-plugin": "^2.1.5",
"eslint": "^7.12.1", "eslint": "^7.12.1",
"eslint-plugin-vue": "^7.1.0", "eslint-plugin-vue": "^7.1.0",
"html-webpack-plugin": "^4.5.0", "html-webpack-plugin": "^4.5.0",
@ -49,6 +49,7 @@
"sass": "~1.32.1", "sass": "~1.32.1",
"sass-loader": "^10.0.4", "sass-loader": "^10.0.4",
"sass-resources-loader": "^2.1.1", "sass-resources-loader": "^2.1.1",
"script-ext-html-webpack-plugin": "^2.1.5",
"svg-sprite-loader": "^5.0.0", "svg-sprite-loader": "^5.0.0",
"svgo": "^1.3.0", "svgo": "^1.3.0",
"vue-template-compiler": "^2.6.12" "vue-template-compiler": "^2.6.12"

1
public/index.html

@ -3,6 +3,7 @@
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title><%= htmlWebpackPlugin.options.title %></title>
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %> <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>

37
src/App.vue

@ -39,3 +39,40 @@ export default {
} }
} }
</script> </script>
<style lang="scss">
.github-btn {
a {
font-weight: bold;
color: #303133;
padding: 4px 12px;
border: solid 1px #DCDFE6;
margin-left: 8px;
position: relative;
border-radius: 4px;
}
a:hover{
color: #2C67E3;
}
a:last-child:before {
position: absolute;
display: inline-block;
border-width: 7px;
border-style: solid;
border-color: transparent rgba(255, 255, 255, 0.4) transparent transparent;
left: -15px;
top: 25%;
content: '';
}
/* 小角的背景填充*/
a:last-child:after {
position: absolute;
display: inline-block;
border-width: 6px;/*与before的三角形重叠差1px,和元素边框是边框宽度一致*/
border-style: solid;
border-color: transparent #eee transparent transparent;/*边框颜色(小角的填充色)要与整体元素背景一致*/
left: -12px;
top: 25%;
content: '';
}
}
</style>

5
src/main.js

@ -18,6 +18,9 @@ import '@/components/autoRegister'
import VueClipboard from 'vue-clipboard2' import VueClipboard from 'vue-clipboard2'
import Process from '@/components/HandleProcess/process' import Process from '@/components/HandleProcess/process'
import AOS from 'aos'
import 'aos/dist/aos.css'
Vue.prototype.$api = api Vue.prototype.$api = api
Vue.prototype.$dayjs = dayjs Vue.prototype.$dayjs = dayjs
Vue.prototype.$store = store Vue.prototype.$store = store
@ -38,6 +41,7 @@ Vue.prototype.$process = Process
Vue.use(VueClipboard) Vue.use(VueClipboard)
Vue.use(meta) Vue.use(meta)
Vue.use(Element, {size: 'small', zIndex: 3000}) Vue.use(Element, {size: 'small', zIndex: 3000})
Vue.use(AOS)
Vue.config.productionTip = false Vue.config.productionTip = false
@ -46,3 +50,4 @@ new Vue({
store, store,
render: h => h(App) render: h => h(App)
}).$mount('#app') }).$mount('#app')
AOS.init()

865
src/views/official/index.vue

File diff suppressed because it is too large

508
src/views/official/indexbak.vue

@ -0,0 +1,508 @@
<template>
<div class="official-container">
<div class="header-container">
<div class="background">
<img src="@/assets/images/official/background.svg">
</div>
<div id="headerNav" :class="{'is-fixed' : isFixed}" class="top-header">
<img class="logo" src="@/assets/images/official/TDUCK@2x.png" @click="$router.push({path:'/'})">
<div>
<span class="menu-item" @click="$router.push({path:'/'})">首页</span>
<a class="menu-item" href="https://gitee.com/TDuckApp/tduck-platform" target="_blank">开源项目</a>
<a class="menu-item" href="https://doc.tduckapp.com/" target="_blank">开发文档</a>
<span class="menu-item" @click="$router.push({path:'/payService'})">付费服务</span>
<span class="menu-item add-contact-me">加入社群
<div>
<img src="@/assets/images/official/contact_me_qr.png">
</div>
</span>
</div>
<div>
<el-button v-if="isLogin" @click="$router.push({path:'/home'})"> </el-button>
<el-button v-if="!isLogin" @click="$router.push({path:'/login'})">
</el-button>
</div>
</div>
<div class="content-header">
<div class="left">
<p class="slogan animate__animated animate__fadeInLeftBig">
让企业轻松拥有问卷系统
</p>
<p class="slogan-desc animate__animated animate__fadeInLeftBig">
TDuck - Have what you want,
get you income.
</p>
<el-button @click="$router.push({path:'/home'})">立即体验</el-button>
</div>
<div class="right">
<img
class="image"
:src="require('@/assets/images/official/banner02.svg')"
fit="scale-down"
>
</div>
</div>
</div>
<div class="introduction">
<p class="en-title">OUR STRENGTHS</p>
<div class="features">
<div>
<p> 无保留全开源</p>
<p> 遵循阿里巴巴Java开发手册编码规范代码全量开源</p>
</div>
<div>
<p> 简洁不失强大</p>
<p> 基于 Element + VUE 前端框架界面简洁独特美感</p>
</div>
<div>
<p> 所见即所得</p>
<p> 无需编程拖拽可视化模板或组件即可生成精美问卷</p>
</div>
</div>
<img class="img1" src="@/assets/images/official/desc1.png">
</div>
<p class="title">我们的解决方案</p>
<div class="solutions">
<div class="solution-item">
<p class="title">客户体验</p>
<img src="@/assets/images/official/solution1.png">
<p class="desc">客户满意度 宾馆服务满意度 </p>
<p class="desc"> 餐厅满意度调查 公共服务满意度</p>
<p class="desc">旅游服务满意度 经销商满意度 </p>
<p @click="$router.push({path:'/home'})">前往体验 ></p>
</div>
<div class="solution-item">
<p class="title">市场调研</p>
<img src="@/assets/images/official/solution2.png">
<p class="desc">餐饮市场调查 手机市场调查 </p>
<p class="desc"> 培训市场调查 消费者调查 </p>
<p class="desc">APP市场调查 女性消费者偏好调查 </p>
<p @click="$router.push({path:'/home'})">前往体验 ></p>
</div>
<div class="solution-item">
<p class="title">报名登记</p>
<img src="@/assets/images/official/solution3.png">
<p class="desc">才艺比赛报名 粉丝活动报名 </p>
<p class="desc"> 聚餐出游报名 活动/会务微信报名 </p>
<p class="desc"> 讲座公开课报名 商品订单 </p>
<p @click="$router.push({path:'/home'})">前往体验 ></p>
</div>
</div>
<div class="use-company">
<p class="title">他们都在使用</p>
<img src="@/assets/images/official/use-commony.png">
</div>
<div class="footer">
<div class="top">
<div>
<p class="title">关于我们</p>
<p class="desc">
TDuck 是一款能够帮助
你进行信息收集市场开拓
客户挖掘并展开持续营销活 动的管理平台
</p>
</div>
<div>
<p class="title">项目地址</p>
<a href="https://gitee.com/TDuckApp/tduck-platform" target="_blank">Gitee码云</a>
<a href="https://github.com/TDuckCloud/tduck-platform" target="_blank">Github</a>
</div>
<div>
<p class="title">联系方式</p>
<p class="desc">pr@tduckapp.com</p>
<p class="desc">+86 15080929435</p>
<p class="desc"> 加入团队 mama@tduckapp.com</p>
</div>
<div>
<p class="title">友情地址</p>
<a href="https://element.eleme.cn/#/zh-CN/" target="_blank">ElementUI</a>
<a href="https://gitee.com/mrhj/form-generator" target="_blank"> form-generator</a>
</div>
<div class="qrcode">
<div>
<img src="@/assets/images/official/wxmpqrcode.png">
<p class="desc">填鸭-公众号</p>
</div>
<div>
<img src="@/assets/images/official/contact_me_qr.png">
<p class="desc">官方社群</p>
</div>
</div>
</div>
<div class="bottom">
<p>本站由 ucloud 提供云服务器</p>
<p>本站由 又拍云 提供CDN加速/云储存服务</p>
<p>Copyright © 2021 TDuckApp. All Rights Reserved. 湘ICP备18023961号-2 版权所有</p>
</div>
</div>
</div>
</template>
<script>
import store from '@/store'
export default {
name: 'Official',
data() {
return {
isFixed: false,
offsetTop: 0
}
},
computed: {
getStore() {
return store
},
isLogin() {
return this.getStore.getters['user/isLogin']
}
},
mounted() {
window.addEventListener('scroll', this.initHeight)
let that = this
this.$nextTick(() => {
// offsetTop
that.offsetTop = document.querySelector('#headerNav').offsetTop
})
},
//
destroyed() {
window.removeEventListener('scroll', this.handleScroll)
},
methods: {
initHeight() {
// ()
let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
//
this.isFixed = scrollTop > this.offsetTop
}
}
}
</script>
<style lang="scss" scoped>
html,
body {
height: 100%;
}
.official-container {
min-width: 1280px;
height: 100%;
//overflow-x: hidden;
}
.header-container {
position: relative;
.background {
position: absolute;
z-index: 1;
img {
width: 100%;
}
}
.top-header {
width: 100%;
height: 72px;
line-height: 72px;
display: flex;
flex-direction: row;
justify-content: space-around;
align-content: center;
align-items: center;
* {
z-index: 20;
}
.logo {
width: 182px;
height: 28px;
}
.menu-item {
font-size: 17px;
font-weight: 300;
cursor: pointer;
color: #fff;
margin-right: 73px;
line-height: 72px;
}
.add-contact-me {
position: relative;
div {
margin-top: 20px;
position: absolute;
right: 0%;
top: 100%;
visibility: hidden;
opacity: 0;
transform: translateY(100px);
transition: 0.3s;
}
img {
width: 100px;
height: 100px;
}
}
.add-contact-me:hover {
div {
visibility: visible;
opacity: 1;
transform: translateY(0);
}
}
.login-btn {
width: 95px;
height: 37px;
background: #fff;
border-radius: 11px;
}
}
.content-header {
display: flex;
flex-direction: row;
justify-content: center;
align-content: center;
align-items: center;
* {
z-index: 20;
}
.slogan {
font-size: 59px;
font-weight: bold;
color: #fff;
line-height: 18px;
}
.slogan-desc {
font-size: 37px;
font-weight: bold;
color: #fff;
line-height: 43px;
}
.right{
position: relative;
height: 700px;
width: 700px;
.image {
padding-top: 30px;
height: 840px;
width: 700px;
}
}
}
}
.title {
text-align: center;
font-size: 23px;
font-weight: bold;
color: #232323;
line-height: 76px;
}
.introduction {
margin-top: 217px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.en-title {
font-size: 101px;
font-weight: bold;
color: #fff;
line-height: 97px;
letter-spacing: 15px;
background: linear-gradient(-32deg, rgba(32, 84, 241, 0.51) 0%, rgba(34, 78, 243, 0.51) 0%, rgba(56, 234, 255, 0.51) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
animation: show 0.5s forwards;
}
.features {
display: flex;
div {
margin: 0 20px;
text-align: center;
}
:first-child {
font-size: 25px;
font-weight: bold;
color: #222;
line-height: 68px;
}
:last-child {
font-size: 10px;
font-weight: 300;
color: #222;
line-height: 22px;
}
}
.img1 {
min-width: 515px;
height: 438px;
}
}
.solutions {
width: 80%;
margin: 0 auto;
display: flex;
justify-content: space-evenly;
.solution-item {
width: 250px;
height: 390px;
background: linear-gradient(-12deg, rgba(32, 84, 241, 0.08), rgba(34, 78, 243, 0.08), rgba(56, 234, 255, 0.08));
border-radius: 15px;
text-align: center;
cursor: pointer;
&:hover {
box-shadow: 0 2px 49px 0 rgba(105, 119, 168, 0.54);
}
img {
width: 197px;
height: 147px;
}
.title {
font-size: 16px;
font-weight: bold;
color: #276ef6;
line-height: 69px;
}
.desc {
font-size: 9px;
font-weight: 300;
color: #222;
line-height: 15px;
}
:last-child {
font-size: 10px;
font-weight: 300;
color: #276ef6;
line-height: 69px;
}
}
}
.use-company {
display: flex;
flex-direction: column;
align-content: center;
align-items: center;
justify-content: flex-start;
margin-top: 200px;
}
.footer {
margin-top: 227px;
width: 100%;
height: 464px;
background: linear-gradient(163deg, rgba(32, 84, 241, 0.67), rgba(34, 78, 243, 0.67), rgba(56, 234, 255, 0.67));
display: flex;
flex-direction: column;
justify-content: space-between;
.top {
display: flex;
flex-direction: row;
justify-content: space-evenly;
text-align: left;
.title {
font-size: 20px;
font-weight: bold;
color: #fff;
line-height: 60px;
text-align: left;
}
.desc {
font-size: 12px;
font-weight: 300;
color: #fff;
line-height: 20px;
max-width: 292px;
}
a {
font-size: 12px;
font-weight: 300;
color: #fff;
cursor: pointer;
line-height: 30px;
display: block;
}
.qrcode {
display: flex;
div {
margin: 10px;
}
img {
margin-top: 30px;
width: 115px;
height: 114px;
}
}
}
.bottom {
position: relative;
bottom: 0;
p {
text-align: center;
font-size: 16px;
font-weight: 300;
color: #fff;
line-height: 20px;
}
}
}
.top-header {
animation: stickyMenu1 0.4s ease-in-out;
}
.is-fixed {
position: fixed;
z-index: 999;
animation: stickyMenu 0.5s ease-in-out;
top: 0;
background: linear-gradient(-67deg, rgba(32, 84, 241, 1), rgba(51, 201, 253, 1), rgba(35, 86, 244, 1));
}
@keyframes stickyMenu1 {
0% {
opacity: 0;
background: rgba(32, 84, 241, 1);
}
50% {
opacity: 0.5;
background: rgba(32, 84, 241, 1);
}
100% {
background-color: transparent;
opacity: 1;
}
}
@keyframes stickyMenu {
0% {
margin-top: -120px;
opacity: 0;
}
50% {
margin-top: -64px;
opacity: 0;
}
100% {
margin-top: 0;
opacity: 1;
}
}
@media only screen and (max-width: 1580px) {
.content-header {
.slogan-desc {
font-size: 25px !important;
}
}
}
@media only screen and (max-width: 1280px) {
.content-header {
.slogan {
font-size: 39px !important;
}
.slogan-desc {
font-size: 20px !important;
}
}
}
::v-deep .el-button {
border: none;
}
::v-deep .el-button span {
font-weight: 400;
color: #2667f5;
}
</style>
Loading…
Cancel
Save