cl 6 年之前
父节点
当前提交
3fc0771f94
共有 2 个文件被更改,包括 455 次插入13 次删除
  1. 271 3
      src/views/About.vue
  2. 184 10
      src/views/News.vue

+ 271 - 3
src/views/About.vue

@@ -1,10 +1,278 @@
 <template>
-  <div class="about">
-    
+  <div class="about" style="overflow:hidden">
+    <div class="imgarea">
+      <img :src="img1" alt class="widthimg" />
+      <div class="imgtext">
+        <h1>专注</h1>
+        <div class="righttext">
+          <h2>互联网项目技术服务</h2>
+        </div>
+      </div>
+    </div>
+    <div class="aboutus">
+      <div class="head">
+        <p>关于我们</p>
+        <hr />
+      </div>
+      <div class="content">
+        <div class="leftmenu" :class="navBarFixed == true ? 'navBarWrap' :''">
+          <img :src="img2" alt />
+          <div class="leftbutton">
+            <a href="#block1">
+              <button>公司概述</button>
+            </a>
+            <a href="#block2">
+              <button>发展历程</button>
+            </a>
+            <a href="#block3">
+              <button>公司荣誉</button>
+            </a>
+          </div>
+        </div>
+        <div class="rightcontent">
+          <div class="block1" id="block1">
+            <div class="row">
+              <img :src="img3" />
+              <div class="imgright">
+                <div class="headline">
+                  <p>西安芝麻开花网络科技有限公司</p>
+                </div>
+                <div>
+                  <ul>
+                    <li v-for="(item,index)  in list" :key="index">
+                      <p class="listtext">{{item}}</p>
+                    </li>
+                  </ul>
+                </div>
+              </div>
+            </div>
+            <div class="imgrow">
+              <img :src="img4" />
+              <img :src="img5" />
+              <img :src="img6" />
+            </div>
+          </div>
+          <div class="block2" id="block2">
+            <div class="headline short">
+              <p>发展历程</p>
+            </div>
+            <img :src="img7" alt />
+          </div>
+          <div class="block3" id="block3">
+            <div class="headline short">
+              <p>公司荣誉</p>
+            </div>
+            <img :src="img8" alt />
+            <img :src="img9" alt />
+            <img :src="img10" alt />
+          </div>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 
+
 <script>
- 
+import img1 from "./images/u431.jpg";
+import img2 from "./images/20190830132652.png";
+import img3 from "./images/u472.png";
+import img4 from "./images/u473.png";
+import img5 from "./images/u474.png";
+import img6 from "./images/u475.png";
+import img7 from "./images/u462.png";
+import img8 from "./images/u466.jpg";
+import img9 from "./images/u467.jpg";
+import img10 from "./images/u468.jpg";
+export default {
+  name: "About",
+  //   props: {
+  //     msg: String
+  //   }
+  data() {
+    return {
+      img1: img1,
+      img2: img2,
+      img3: img3,
+      img4: img4,
+      img5: img5,
+      img6: img6,
+      img7: img7,
+      img8: img8,
+      img9: img9,
+      img10: img10,
+      navBarFixed: false,
+      list: [
+        "西安芝麻开花网络科技有限公司成立于2016年,多年来专注于互联网技术开发和数据服务。",
+        "我们的服务分为四大部分:为创业企业提供互联网技术支持;为传统企业互联网转型提供专业的全程解决方案;为政府事业单位提供信息化策略支持,为硬件技术企业提供互联网技术结合方案。",
+        "公司采用全职+兼职+实习的管理模式,办公环境良好,位于西安曲江新区顶级写字楼。"
+      ]
+    };
+  },
+  mounted() {
+    // 事件监听滚动条
+    window.addEventListener("scroll", this.watchScroll);
+  },
+  methods: {
+    watchScroll() {
+      var scrollTop =
+        window.pageYOffset ||
+        document.documentElement.scrollTop ||
+        document.body.scrollTop;
+      //  当滚动超过 50 时,实现吸顶效果
+      if (scrollTop > 549) {
+        this.navBarFixed = true;
+      } else {
+        this.navBarFixed = false;
+      }
+    }
+  }
+};
 </script>
+<style>
+.navBarWrap {
+  position: fixed;
+  top: 0;
+  z-index: 999;
+}
+
+.imgarea {
+  position: relative;
+  width: 100%;
+  height: 400px;
+}
+.block1,
+.block2,
+.block3 {
+  padding-left: 30px;
+  padding-top: 30px;
+  padding-right: 30px;
+  padding-bottom: 30px;
+  border: 1px solid rgb(242, 242, 242);
+  margin-bottom: 30px;
+}
+.short {
+  width: 150px;
+  margin: auto;
+}
+.headline {
+  border-bottom: 1px solid rgb(0, 102, 153);
+}
+.listtext {
+  font-size: 16px;
+  color: rgb(154, 154, 154);
+}
+.headline p {
+  color: rgb(0, 102, 153);
+  font-weight: 600;
+  margin-top: 0px;
+  margin-bottom: 15px;
+  text-align: center;
+}
+.imgright {
+  margin-left: 20px;
+  width: 50%;
+}
+.block3 img {
+  display: block;
+  width: 450px;
+  height: 300px;
+  text-align: center;
+  margin: auto;
+}
+.block2 img {
+  margin: auto;
+  display: block;
+}
+.block2 img,
+.block3 img {
+  margin-top: 25px;
+}
+.content {
+  display: flex;
+  flex-direction: row;
+}
+.widthimg {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+}
+.imgrow {
+  margin-top: 30px;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+}
+.row {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+}
+.row img {
+  width: 322px;
+  height: 310px;
+}
+.leftmenu {
+  width: 20%;
+  margin-left: 20px;
+  margin-top: 60px;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-evenly;
+}
+.rightcontent {
+  padding-left: 50px;
+  margin-top: 60px;
+  margin-left: 60px;
+  width: 70%;
+  position: absolute;
+  margin-left: 25%;
+}
+.leftmenu img {
+  height: 200px;
+}
+.leftbutton {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+p {
+  font-size: 21px;
+  padding-left: 10px;
+  padding-right: 10px;
+}
+.imgrow img {
+  width: 200px;
+  height: 250px;
+}
+.imgtext {
+  position: absolute;
+  text-align: center;
+  vertical-align: middle;
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+button {
+  margin-top: 10px;
+}
 
+h1 {
+  color: rgb(0, 102, 255);
+  font-size: 50px;
+}
+h2 {
+  color: rgb(22, 102, 255);
+  font-weight: 100;
+  font-size: 40px;
+}
+.righttext {
+  padding-left: 400px;
+  margin-top: -32px;
+}
+hr {
+  color: rgb(154, 154, 154);
+}
+</style>

+ 184 - 10
src/views/News.vue

@@ -1,17 +1,191 @@
 <template>
- <div class="news" style="overflow:hidden"></div>
+  <div class="news" style="overflow:hidden">
+    <div class="imgarea">
+      <img :src="img1" alt class="widthimg" />
+      <div class="imgtext">
+        <h1>新闻中心</h1>
+        <h2>NEWS CENTER</h2>
+      </div>
+    </div>
+    <div class="newscenter">
+      <div class="newscenterhead">
+        <p>新闻中心</p>
+        <hr />
+      </div>
+      <div class="newsblock">
+        <div class="block">
+          <img :src="img2" />
+          <p>心中有code,在哪儿都能改变世界</p>
+          <p class="day">2019-7-23</p>
+        </div>
+        <div class="block">
+          <img :src="img3" />
+          <p>两年时间赚了19w,他究竟对芝麻开发做了什么</p>
+          <p class="day">2019-7-23</p>
+        </div>
+        <div class="block">
+          <img :src="img4" />
+          <p>数说芝麻开发的2016</p>
+          <p class="day">2019-7-23</p>
+        </div>
+      </div>
+    </div>
+    <div class="listcontent">
+      <div v-for="(item,index) in listnews" :key="index">
+        <div class="newslist">
+          <div class="newslistdays">
+            <p class="days">06-23</p>
+            <p>2019</p>
+          </div>
+          <div class="eachnews">
+            <p>{{item.head}}</p>
+            <p class="newscontent">{{item.content}}</p>
+          </div>
+          <div>
+            <p>MORE</p>
+          </div>
+        </div>
+        <hr />
+      </div>
+    </div>
+  </div>
 </template>
 
 
 <script>
+import img1 from "../components/img/u305.jpg";
+import img2 from "../components/img/u313.png";
+import img3 from "../components/img/u314.png";
+import img4 from "../components/img/u315.png";
 export default {
-  name: 'News',
-//   props: {
-//     msg: String
-//   }
-   data() {
-      return {
-      };
-    }
-}
+  name: "News",
+  //   props: {
+  //     msg: String
+  //   }
+  data() {
+    return {
+      img1: img1,
+      img2: img2,
+      img3: img3,
+      img4: img4,
+      listnews: [
+        {
+          head: "芝麻开发想项目服务透明化,用“工时制”取代“项目制“",
+          content:
+            "芝麻开发是一个以提供项目服务为导向的平台。项目服务有 IT 项目,包括网站建设、业务..."
+        },
+        {
+          head: "心中有code,在哪都能改变世界!",
+          content:
+            "芝麻开发是一个以提供项目服务为导向的平台。项目服务有 IT 项目,包括网站建设、业务..."
+        },
+        {
+          head: "2年业余时间赚了19w,他究竟在(dui)芝麻开发做了什么?",
+          content:
+            "芝麻开发是一个以提供项目服务为导向的平台。项目服务有 IT 项目,包括网站建设、业务..."
+        },
+        {
+          head: "数说芝麻开发的2016",
+          content:
+            "芝麻开发是一个以提供项目服务为导向的平台。项目服务有 IT 项目,包括网站建设、业务..."
+        },
+        {
+          head: "【芝麻Discovery】之芝麻勋章",
+          content:
+            "芝麻开发是一个以提供项目服务为导向的平台。项目服务有 IT 项目,包括网站建设、业务..."
+        }
+      ]
+    };
+  }
+};
 </script>
+<style>
+.imgarea {
+  position: relative;
+  width: 100%;
+  height: 400px;
+}
+.widthimg {
+  position: absolute;
+  width: 100%;
+  height: 100%;
+}
+.newslistdays{
+  color:rgb(204, 204, 204);
+  font-weight: 600;
+}
+.newslistdays p{
+  margin-top: 0px;
+  margin-bottom: 0px;
+}
+.listcontent{
+  margin-top: 30px;
+  margin-left: 50px;
+}
+p {
+  font-size: 19px;
+  padding-left: 10px;
+}
+.newscontent{
+  color: rgb(107,107,107);
+  font-size: 17px;
+}
+.newslist {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  padding-right: 20px;
+}
+.eachnews p{
+  margin-bottom: 0px;
+}
+.days{
+  color: rgb(174, 174, 174);
+  font-size: 35px;
+  margin-top: 15px!important;
+  margin-bottom: 0px
+}
+.imgtext {
+  position: absolute;
+  text-align: center;
+  vertical-align: middle;
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  justify-content: center;
+}
+.newscenter {
+  position: relative;
+  margin-top: 0%;
+}
+.newsblock {
+  position: relative;
+  margin-top: 20px;
+  display: flex;
+  flex-direction: row;
+  justify-content: space-around;
+}
+.block {
+  width: 285px;
+  height: 350px;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  border: 1px solid rgb(154, 154, 154);
+  border-top: none;
+}
+.block img {
+  width: 285px;
+  height: 188px;
+}
+.imgtext h1 {
+  color: black;
+}
+.imgtext h2 {
+  color: rgb(102, 102, 102);
+}
+hr {
+  color: rgb(154, 154, 154);
+}
+</style>