index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <section class="bid">
  3. <div class="search">
  4. <input type="text" placeholder="请输入搜索内容">
  5. <span @click="Subscribe">我的订阅</span>
  6. </div>
  7. <div class="select">
  8. <div class="region" @click="regions(0)">
  9. 地区
  10. <img src="../static/img/open.png" v-if="!region[0]" alt>
  11. <img src="../static/img/hide.png" v-else alt>
  12. </div>
  13. <div class="region" @click="regions(1)">
  14. 类别
  15. <img src="../static/img/open.png" v-if="!region[1]" alt>
  16. <img src="../static/img/hide.png" v-else alt>
  17. </div>
  18. <areaone class="regions" v-on:province="province" :regiont="regiont" v-if="region[0]"/>
  19. <ul id="category" v-if="region[1]">
  20. <li v-for="v in bid" :key="v.id" @click="biding(v.id)">{{v.name}}</li>
  21. </ul>
  22. <div class="bg" v-if="region[0]||region[1]"></div>
  23. </div>
  24. <ul class="bidlist">
  25. <nuxt-link to="/me/chooseArea">
  26. <li>
  27. <h2>喷口内径测量规招标公告</h2>
  28. <p class="p1">
  29. 喷口内径测量规招标公告。信息来源:中国招标投标公共服务
  30. 平台。招标信息概览占位占位占位占位,占位占位。招标信息
  31. 概览占位占位占位占位,占位占位。
  32. </p>
  33. <p class="p2">
  34. <span class="label">2000万</span>
  35. <span class="time">2019-05-20</span>
  36. </p>
  37. </li>
  38. </nuxt-link>
  39. <nuxt-link to="/bidding">
  40. <li>
  41. <h2>喷口内径测量规招标公告</h2>
  42. <p class="p1">
  43. 喷口内径测量规招标公告。信息来源:中国招标投标公共服务
  44. 平台。招标信息概览占位占位占位占位,占位占位。招标信息
  45. 概览占位占位占位占位,占位占位。
  46. </p>
  47. <p class="p2">
  48. <span class="label">2000万</span>
  49. <span class="time">2019-05-20</span>
  50. </p>
  51. </li>
  52. </nuxt-link>
  53. <nuxt-link to="/bidding">
  54. <li>
  55. <h2>喷口内径测量规招标公告</h2>
  56. <p class="p1">
  57. 喷口内径测量规招标公告。信息来源:中国招标投标公共服务
  58. 平台。招标信息概览占位占位占位占位,占位占位。招标信息
  59. 概览占位占位占位占位,占位占位。
  60. </p>
  61. <p class="p2">
  62. <span class="label">2000万</span>
  63. <span class="time">2019-05-20</span>
  64. </p>
  65. </li>
  66. </nuxt-link>
  67. <nuxt-link to="/bidding">
  68. <li>
  69. <h2>喷口内径测量规招标公告</h2>
  70. <p class="p1">
  71. 喷口内径测量规招标公告。信息来源:中国招标投标公共服务
  72. 平台。招标信息概览占位占位占位占位,占位占位。招标信息
  73. 概览占位占位占位占位,占位占位。
  74. </p>
  75. <p class="p2">
  76. <span class="label">2000万</span>
  77. <span class="time">2019-05-20</span>
  78. </p>
  79. </li>
  80. </nuxt-link>
  81. <nuxt-link to="/bidding">
  82. <li>
  83. <h2>喷口内径测量规招标公告</h2>
  84. <p class="p1">
  85. 喷口内径测量规招标公告。信息来源:中国招标投标公共服务
  86. 平台。招标信息概览占位占位占位占位,占位占位。招标信息
  87. 概览占位占位占位占位,占位占位。
  88. </p>
  89. <p class="p2">
  90. <span class="label">2000万</span>
  91. <span class="time">2019-05-20</span>
  92. </p>
  93. </li>
  94. </nuxt-link>
  95. </ul>
  96. </section>
  97. </template>
  98. <script>
  99. import '~/assets/select.scss'
  100. import areaone from '~/components/areaSelect.vue'
  101. export default {
  102. components: {
  103. areaone
  104. },
  105. data() {
  106. return {
  107. region: [false, false], //选择项切换
  108. img: ['open', 'hide'], //图片切换
  109. regiont: [], //区域列表
  110. bid: [
  111. { id: 0, name: '全部' },
  112. { id: 1, name: '招标预告' },
  113. { id: 2, name: '招标公告' },
  114. { id: 3, name: '招标变更' },
  115. { id: 4, name: '中标公告' }
  116. ], //类别列表
  117. cd: '', //区域的值
  118. b: '' //类别的值
  119. }
  120. },
  121. fetch({ app }) {
  122. //console.log(app.$axios)
  123. },
  124. asyncData({ app }) {
  125. //this.http=app
  126. // app.$axios.get('/province.html').then((response)=>{
  127. // console.log(response)
  128. // }).catch((response)=>{
  129. // //console.log(response.response);
  130. // })
  131. },
  132. created() {
  133. //获取区域列表
  134. this.$axios
  135. .get('/province.html')
  136. .then(response => {
  137. this.regiont = this.regiont.concat(response.data)
  138. console.log(this.regiont)
  139. })
  140. .catch(response => {})
  141. },
  142. methods: {
  143. regions(e) {
  144. //切换选择项
  145. const region = [false, false]
  146. region[e] = true
  147. const img = ['open', 'hide']
  148. img[e] = 'hide'
  149. this.img = img
  150. this.region = [].concat(region)
  151. },
  152. province: function(somedata) {
  153. //接收区域的值
  154. this.close()
  155. },
  156. Subscribe(e) {
  157. this.$router.push({ path: '/bidding/subList' })
  158. },
  159. close: function(e) {
  160. //关闭选择项
  161. const region = [false, false]
  162. this.region = [].concat(region)
  163. },
  164. biding: function(e) {
  165. if (e > 0) {
  166. this.b = 'b' + e
  167. } else {
  168. this.b = false
  169. }
  170. console.log(this.b)
  171. this.close()
  172. }
  173. }
  174. }
  175. </script>
  176. <style>
  177. .bid {
  178. height: 100%;
  179. }
  180. body div {
  181. height: 100%;
  182. }
  183. .p1 {
  184. display: -webkit-box;
  185. /* -webkit-box-orient: vertical; */
  186. /*! autoprefixer: ignore next */
  187. -webkit-box-orient: vertical;
  188. -webkit-line-clamp: 3;
  189. overflow: hidden;
  190. }
  191. </style>