• 【VUE】vue网站设计-----字节招聘网站设计


    1、引言

    设计结课作业,课程设计无处下手,网页要求的总数量太多?没有合适的模板?数据库,java,python,vue,html作业复杂工程量过大?毕设毫无头绪等等一系列问题。你想要解决的问题,在微信公众号“coding加油站”中全部会得到解决

    2、作品介绍

    字节招聘网站系统采用vue,node技术来实现,符合所学知识体系,适用于常见的作业以及课程设计,需要获取更多的作品,请关注微信公众号:coding加油站,获取,如需更多资料,可在微信后台留言。欢迎大家来提问,交流学习。

    2.1、作品简介方面 

    字节招聘网站系统采用常规方式来实现,符合绝大部分的要求。代码配置有相关文档讲解,如需从代码中学到知识点,那么这个作品将是你的不二之选

    2.2、作品二次开发工具

    此作品代码相对简单,基本使用课堂中所学知识点来完成,只需要修改相关的介绍文字,一些图片,就可以改为自己独一无二的代码,网页作品下载后可使用任意编辑软件(例如:DW、HBuilder、NotePAD 、Vscode 、Sublime 、Webstorm 所有编辑器均可使用)。

    2.3、作品技术介绍

    html网页作品技术方面:使用CSS制作了网页背景图、鼠标经过及选中导航变色效果、下划线等相关技术来美化相关界面,部分采用了javascript来做校验。 使用html5,以及css3等相关技术完成技术的布局,在本作品中,会使用常见的布局,常见的浮动布局,flex布局都会有使用到哦。同时在操作方面上运用了html5和css3,采用了div+css结构、表单、超链接、浮动、绝对定位、相对定位、字体样式、引用视频等基础知识,同时使用了一些js的相关知识。例如使用到了dom,和bom来获取浏览器的相关api,同时使用css对样式进行相关的美化,使得界面更加符合网页设计

    vue作品技术方面:使用vue技术开发的网站,涉及常见的vue指令,如v-for,v-if,v-show,v-html等的使用,包含watch,计算属性等常见功能的开发,以及组件的使用,使用vue相关全家桶的使用,运用了v-router来作为路由,完全符合常见的网站开发技术。同时也会使用html5,以及css3等相关技术完成技术的布局,在本作品中,会使用常见的布局,常见的浮动布局,flex布局都会有使用到哦。

    3、作品演示

    【coding加油站】vue网站设计---模仿字节招聘网站设计

    3.1、首页

    相关代码:

    1. <div class="main">
    2. <div ref="product" class="product content-item-block">
    3. <h1 class="title">Inspire creativity, enrich lifeh1>
    4. <div class="desc">截至目前,字节跳动产品已覆盖超过 150 个国家和地区,75 个语种div>
    5. <ul class="product-list">
    6. <li
    7. class="product-item"
    8. v-for="(item, key) in products"
    9. :key="key"
    10. @click="jumpToDetail(item)"
    11. >
    12. <img :src="item.logo" alt />
    13. <div>{{ item.title }}div>
    14. li>
    15. ul>
    16. <router-link to="/products">
    17. <div class="more">
    18. <bytedance-button size="large">了解更多bytedance-button>
    19. div>
    20. router-link>
    21. div>
    22. <div class="job-category content-item-block">
    23. <h2 class="job-category-title title">探索你感兴趣的职位h2>
    24. <ul class="job-category-list clearfix">
    25. <li v-for="item in jobCategories" :key="item.id" class="job-category-item">
    26. <router-link :to="{ name: 'jobs', params: { job_category_id: item.id } }">
    27. <div class="image" :style="`backgroundImage:url(${item.image})`">
    28. <span class="overlay" v-if="!item.id">{{ item.zh_name }}span>
    29. div>
    30. <div v-if="item.id" class="name">{{ item.zh_name }}div>
    31. router-link>
    32. li>
    33. ul>
    34. div>
    35. <div class="byteStandard content-item-block">
    36. <h1 class="title">字节范h1>
    37. <div class="desc">字节范是字节跳动企业文化的重要组成部分,是我们共同认可的行为准则div>
    38. <div class="content">
    39. <div class="image">
    40. <span
    41. v-show="productLayerVisible"
    42. class="layer"
    43. @animationend="onScrollRightAnimationEnd"
    44. >span>
    45. <img
    46. v-if="byteStandards[byteStandardActiveIndex]"
    47. width="100%"
    48. height="100%"
    49. :src="byteStandards[byteStandardActiveIndex].image"
    50. alt
    51. />
    52. div>
    53. <div class="indicator">
    54. <ul>
    55. <li class="indicator-item" v-for="(item, index) in byteStandards" :key="index">
    56. <h3
    57. :class="{ active: byteStandardActiveIndex === index }"
    58. @click="
    59. () => {
    60. byteStandardActiveIndex = index;
    61. productLayerVisible = true;
    62. }
    63. "
    64. >{{ item.title }}h3>
    65. <p v-html="item.content" v-show="byteStandardActiveIndex === index">p>
    66. li>
    67. ul>
    68. div>
    69. div>
    70. div>
    71. <div class="byteLife content-item-block">
    72. <h1 class="byteLife-title">字节生活h1>
    73. <div class="block-item block-item-one">
    74. <div class="block-item-column block-item-column-text">
    75. <h2 class="block-item-column-title">在扁平开放的氛围 里工作h2>
    76. <div class="content">
    77. <div class="content-item">
    78. <h2 class="content-item-title">务实扁平的工作氛围h2>
    79. <p class="content-item-desc">不讲 title 和层级,敢于授权新人,专注完成业务目标,没有领地意识p>
    80. div>
    81. <div class="content-item">
    82. <h2 class="content-item-title">务实扁平的工作氛围h2>
    83. <p class="content-item-desc">不讲 title 和层级,敢于授权新人,专注完成业务目标,没有领地意识p>
    84. div>
    85. <div class="content-item">
    86. <h2 class="content-item-title">务实扁平的工作氛围h2>
    87. <p class="content-item-desc">不讲 title 和层级,敢于授权新人,专注完成业务目标,没有领地意识p>
    88. div>
    89. div>
    90. div>
    91. <div class="block-item-column block-item-column-image">
    92. <img src="https://sf3-ttcdn-tos.pstatp.com/obj/ttfe/ATSX/mainland/life_1.png" alt />
    93. div>
    94. div>
    95. <div class="block-item block-item-one">
    96. <div class="block-item-column block-item-column-text">
    97. <h2 class="block-item-column-title">在扁平开放的氛围 里工作h2>
    98. <div class="content">
    99. <div class="content-item">
    100. <h2 class="content-item-title">务实扁平的工作氛围h2>
    101. <p class="content-item-desc">不讲 title 和层级,敢于授权新人,专注完成业务目标,没有领地意识p>
    102. div>
    103. <div class="content-item">
    104. <h2 class="content-item-title">务实扁平的工作氛围h2>
    105. <p class="content-item-desc">不讲 title 和层级,敢于授权新人,专注完成业务目标,没有领地意识p>
    106. div>
    107. <div class="content-item">
    108. <h2 class="content-item-title">务实扁平的工作氛围h2>
    109. <p class="content-item-desc">不讲 title 和层级,敢于授权新人,专注完成业务目标,没有领地意识p>
    110. div>
    111. div>
    112. div>
    113. <div class="block-item-column block-item-column-image">
    114. <img src="https://sf3-ttcdn-tos.pstatp.com/obj/ttfe/ATSX/mainland/life_1.png" alt />
    115. div>
    116. div>
    117. div>
    118. <div class="staffStory content-item-block">
    119. <h2 class="title">员工故事h2>
    120. <ul class="staffStory-list clearfix">
    121. <router-link
    122. tag="li"
    123. :to="`/staff-stories/${item.id}`"
    124. v-for="item in staffStories"
    125. :key="item.id"
    126. class="staffStory-item"
    127. >
    128. <div class="avatar">
    129. <img width="100%" :src="item.avatar" alt srcset />
    130. div>
    131. <div class="text">
    132. <h2 class="title">{{ item.title }}h2>
    133. <div class="desc">{{ item.name }} | {{ item.department }}div>
    134. <p class="remark">{{ item.remark }}p>
    135. div>
    136. <div class="circular-button">div>
    137. router-link>
    138. ul>
    139. div>
    140. div>

     3.2、职位列表页

    相关代码:

    1. <template>
    2. <div class="jobs">
    3. <div class="banner">和优秀的人,做有挑战的事div>
    4. <div ref="searchBar" :class="{ fixedTop: searchBarFixedTop }" class="search-wrapper">
    5. <input-search
    6. :size="searchBarFixedTop ? 'small' : 'medium'"
    7. placeholder="搜索职位"
    8. v-model="searchKeyword"
    9. >input-search>
    10. div>
    11. <div class="main clearfix">
    12. <div class="clearfix aside-filter">
    13. <div class="header">
    14. <span>选择span>
    15. <span :class="{ clearable }" class="clear" @click="clearFilter">清空span>
    16. div>
    17. <div class="job-category job-filter-block">
    18. <div class="title">div>
    19. <checkbox-transfer
    20. title="职位"
    21. ref="jobCategory"
    22. v-model="job_category_id_list"
    23. :props="{ key: 'id', label: 'name' }"
    24. :data="jobCategories"
    25. >checkbox-transfer>
    26. div>
    27. <div class="job-city job-filter-block">
    28. <div class="title">div>
    29. <checkbox-transfer
    30. title="城市"
    31. ref="location"
    32. v-model="location_code_list"
    33. :props="{ key: 'code', label: 'name' }"
    34. :data="jobCities"
    35. >checkbox-transfer>
    36. div>
    37. div>
    38. <div class="content" v-loading:#ffffff7d.scrollFixed="loading">
    39. <h2 class="content-title">开启新的职位 ({{ results.count }})h2>
    40. <ul class="content-list">
    41. <li class="content-item" v-for="item in results.job_post_list" :key="item.id">
    42. <router-link :to="`/jobs/${item.id}`">
    43. <h3 class="title">{{ item.title }}h3>
    44. <div class="subTitle">
    45. <span class="city">{{ item.city_info.name }}span> |
    46. <span class="job_category">{{ item.job_category.name }}span> |
    47. <span class="recruitment_channel">社招span>
    48. div>
    49. <p class="desc">{{ item.description }}p>
    50. router-link>
    51. li>
    52. ul>
    53. <div v-show="!loading" class="pagination-wrapper">
    54. <pagination :current-page.sync="currentPage" :total="results.count">pagination>
    55. div>
    56. div>
    57. div>
    58. div>
    59. template>
    60. <script>
    61. import { getOffsetTop } from "@/helper/utilities";
    62. let positionY = 0;
    63. let searchBarClientHeight = 0;
    64. export default {
    65. name: "job",
    66. data() {
    67. const { keyword, job_category_id } = this.$route.params;
    68. return {
    69. searchKeyword: keyword || "",
    70. currentPage: 1,
    71. job_category_id_list: job_category_id ? [job_category_id] : [],
    72. jobCategories: [],
    73. jobCities: [],
    74. location_code_list: [],
    75. cityList: [],
    76. cities: [],
    77. results: [],
    78. searchBarFixedTop: false,
    79. loading: false
    80. };
    81. },
    82. created() {
    83. const jobConfigRequest = this.request
    84. .get("/job-filters")
    85. .then(response => {
    86. this.jobCities = response.city_list;
    87. this.jobCategories = response.job_type_list;
    88. })
    89. .catch();
    90. const dataRequest = this.fetchList();
    91. this.loadingIns = this.$loading();
    92. Promise.all([jobConfigRequest, dataRequest]).then(() => {
    93. this.loadingIns.close();
    94. });
    95. },
    96. mounted() {
    97. this.$nextTick(() => {
    98. positionY = getOffsetTop(document.body, this.$refs.searchBar);
    99. searchBarClientHeight = this.$refs.searchBar.clientHeight;
    100. });
    101. const onPageScroll = () => {
    102. const top = this.$refs.searchBar.getBoundingClientRect().top;
    103. this.searchBarFixedTop =
    104. window.scrollY > positionY - searchBarClientHeight / 2;
    105. };
    106. window.addEventListener("scroll", onPageScroll);
    107. this.$on("hook:destroyed", () => {
    108. window.removeEventListener("scroll", onPageScroll);
    109. });
    110. },
    111. computed: {
    112. queryFilter() {
    113. return {
    114. job_category_id_list: this.job_category_id_list,
    115. location_code_list: this.location_code_list,
    116. keyword: this.searchKeyword,
    117. offset: Math.max(0, this.currentPage - 1) * 10
    118. };
    119. },
    120. clearable() {
    121. return (
    122. this.job_category_id_list.length !== 0 ||
    123. this.location_code_list.length !== 0
    124. );
    125. }
    126. },
    127. watch: {
    128. queryFilter: function(newVal, oldVal) {
    129. this.searchBarFixedTop && window.scrollTo(0, positionY);
    130. this.fetchList();
    131. }
    132. },
    133. methods: {
    134. clearFilter() {
    135. if (this.job_category_id_list.length) {
    136. this.job_category_id_list = [];
    137. }
    138. if (this.location_code_list.length) {
    139. this.location_code_list = [];
    140. }
    141. },
    142. fetchList() {
    143. this.loading = true;
    144. return this.request
    145. .post("/jobs", this.queryFilter)
    146. .then(response => {
    147. if (this.results.count !== response.count) {
    148. this.currentPage = 1;
    149. }
    150. this.results = response;
    151. this.loading = false;
    152. })
    153. .catch(() => {
    154. this.loading = false;
    155. });
    156. }
    157. }
    158. };
    159. script>

     3.3、职位详情

    相关代码:

    1. <template>
    2. <div class="product">
    3. <ul class="product-fullpage-indicator">
    4. <li
    5. v-for="(item, index) in products"
    6. :key="item.id"
    7. class="product-fullpage-indicator-item"
    8. :class="{ active: activeIndex === index }"
    9. @click="activeIndex = index"
    10. >
    11. <img :src="item.logo" alt />
    12. li>
    13. ul>
    14. <transition :duration="duration" :name="transitionName">
    15. <div
    16. :key="activeIndex"
    17. class="view-wrapper"
    18. v-if="!loading"
    19. :style="`backgroundImage:url(${item.cover})`"
    20. >
    21. <div class="content">
    22. <div class="logo">
    23. <img :src="item.logo" width="100%" height="100%" alt />
    24. div>
    25. <h2>{{ item.title }}h2>
    26. <div class="description">{{ item.description }}div>
    27. <div class="subDescription">{{ item.subDescription }}div>
    28. <div class="link">
    29. 更多信息,请访问:
    30. <br />
    31. <span>{{ item.link }}span>
    32. div>
    33. div>
    34. div>
    35. transition>
    36. div>
    37. template>
    38. <script>
    39. export default {
    40. name: "product",
    41. data() {
    42. return {
    43. products: [],
    44. activeIndex: 0,
    45. transitionName: "",
    46. scrolling: false,
    47. duration: 1000,
    48. loading: false
    49. };
    50. },
    51. watch: {
    52. activeIndex(newIndex, oldIndex) {
    53. if (this.scrolling) {
    54. return;
    55. }
    56. if (this.$route.params.id) {
    57. delete this.$route.params.id;
    58. return;
    59. }
    60. this.transitionName = newIndex < oldIndex ? "move-down" : "move-up";
    61. }
    62. },
    63. created() {
    64. this.loading = true;
    65. const loading = this.$loading({
    66. position: { top: 60 }
    67. });
    68. this.request
    69. .get("/products")
    70. .then(response => {
    71. this.products = response;
    72. this.loading = false;
    73. loading.close();
    74. if (this.$route.params.id) {
    75. this.activeIndex = this.products.findIndex(
    76. item => item.id === this.$route.params.id
    77. );
    78. }
    79. })
    80. .catch();
    81. },
    82. mounted() {
    83. window.addEventListener("mousewheel", this.mousewheelHandler);
    84. },
    85. destroyed() {
    86. window.removeEventListener("mousewheel", this.mousewheelHandler);
    87. },
    88. computed: {
    89. item() {
    90. return this.products[this.activeIndex] || {};
    91. }
    92. },
    93. methods: {
    94. mousewheelHandler(e) {
    95. if (this.scrolling) {
    96. return;
    97. }
    98. this.scrolling = true;
    99. if (e.wheelDelta > 0) {
    100. this.transitionName = "move-down";
    101. this.activeIndex =
    102. this.activeIndex === 0
    103. ? this.products.length - 1
    104. : this.activeIndex - 1;
    105. } else {
    106. this.transitionName = "move-up";
    107. this.activeIndex = (this.activeIndex + 1) % this.products.length;
    108. }
    109. setTimeout(() => {
    110. this.scrolling = false;
    111. }, this.duration);
    112. }
    113. }
    114. };
    115. script>

    4、代码结构图

    总结

    以上就是本次项目的全部内容,需要交流或者获取代码请关注微信公众号:coding加油站获取

  • 相关阅读:
    Redis常见题型
    Cheat Engine 修改器获取内存数据心路历程, THREADSTACK0 C# .NET VB 获取基址 CE修改器
    【ArcGIS绘图系列1】在ArcGIS中制作柱状图与饼状图
    NiFi中缓存组件的运行机制及增删改缓存数据
    网络和Linux网络_2(套接字编程)socket+UDP网络通信代码
    vim常用命令
    JS 错误捕获
    InnoDB和MyISAM区别
    深入理解 Java 对象的内存布局
    数据库 PolarDB 开源之路该如何走?听听他们怎么说
  • 原文地址:https://blog.csdn.net/pandas23/article/details/126436651