Commit 16f30c827e62b62e4fbd110b50f1858e87fe3b36
1 parent
cce87061
test页面
Showing
4 changed files
with
380 additions
and
2 deletions
src/main.js
src/pages/test/test.less
0 → 100644
| 1 | +@charset "UTF-8"; | |
| 2 | + | |
| 3 | +.search-box { | |
| 4 | + background-color: #ffffff; | |
| 5 | + min-height: 100vh; | |
| 6 | + .nav { | |
| 7 | + position: fixed; | |
| 8 | + top: 0; | |
| 9 | + background-color: #FAFBFD; | |
| 10 | + } | |
| 11 | + .pl { | |
| 12 | + background-color: transparent; | |
| 13 | + width: 750px; | |
| 14 | + height: 104px; | |
| 15 | + } | |
| 16 | + .pages-box { | |
| 17 | + .infinite-box { | |
| 18 | + .list-com + .list-com { | |
| 19 | + /deep/ .spacing-box { | |
| 20 | + background-color: #F9F9F9; | |
| 21 | + width: 100%; | |
| 22 | + height: 14px; | |
| 23 | + } | |
| 24 | + } | |
| 25 | + } | |
| 26 | + } | |
| 27 | +} | ... | ... |
src/pages/test/test.vue
0 → 100644
| 1 | +<template> | |
| 2 | +<div> | |
| 3 | + <!-- 搜索 --> | |
| 4 | + <div class="search_box"> | |
| 5 | + <div class="search"> | |
| 6 | + <div class="left"> | |
| 7 | + 供给 | |
| 8 | + <span @click="dropDownMenuShow=true" class="icon_triangle"> | |
| 9 | + </span> | |
| 10 | + <!-- 下拉选项 --> | |
| 11 | + <div v-show="dropDownMenuShow" @click="dropDownMenuShow=false" class="drop_down_menu"> | |
| 12 | + <span class="up_triangle"> | |
| 13 | + </span> | |
| 14 | + <div class="box"> | |
| 15 | + <div class="item"> | |
| 16 | + 求购 | |
| 17 | + </div> | |
| 18 | + <div class="item"> | |
| 19 | + 供给 | |
| 20 | + </div> | |
| 21 | + </div> | |
| 22 | + </div> | |
| 23 | + </div> | |
| 24 | + <!--分割线 --> | |
| 25 | + <div class="line"> </div> | |
| 26 | + <!--搜索框--> | |
| 27 | + <div class="right"> | |
| 28 | + <input @focus="handleFocus" | |
| 29 | + @blur="handleblur" | |
| 30 | + placeholder="请输入货品关键字" | |
| 31 | + type="text" /> | |
| 32 | + </div> | |
| 33 | + </div> | |
| 34 | + <div class="cancel">取消</div> | |
| 35 | + </div> | |
| 36 | + <!-- 分类 --> | |
| 37 | + <div class="classification_box"> | |
| 38 | + <div class="item"> | |
| 39 | + 品类 | |
| 40 | + <span class="icon_triangle"> | |
| 41 | + </span> | |
| 42 | + </div> | |
| 43 | + <!--分割线 --> | |
| 44 | + <div class="line"> </div> | |
| 45 | + <div class="item"> | |
| 46 | + 供货期 | |
| 47 | + <span class="icon_triangle"> | |
| 48 | + </span> | |
| 49 | + </div> | |
| 50 | + <!--分割线 --> | |
| 51 | + <div class="line"> </div> | |
| 52 | + <div class="item"> | |
| 53 | + 地区 | |
| 54 | + <span class="icon_triangle"> | |
| 55 | + </span> | |
| 56 | + </div> | |
| 57 | + </div> | |
| 58 | + <!-- item --> | |
| 59 | + <div class="item_box"> | |
| 60 | + <!-- 用户信息 --> | |
| 61 | + <div class="user_info"> | |
| 62 | + <img class="pic" src="http://wjjtest.ys2.cnliveimg.com/802/shop/img/2020/05/18/158978851853674726863.jpg" alt=""/> | |
| 63 | + <div class="name">陕西省-张三-20100759</div> | |
| 64 | + </div> | |
| 65 | + <!-- 描述 --> | |
| 66 | + <div class="desc"> | |
| 67 | + 纯天然无污染无添加,一年取一次原生态放养土蜂蜜百花蜜纯天然无污染无添加 | |
| 68 | + </div> | |
| 69 | + <!-- 图片库 --> | |
| 70 | + <div class="img_box"> | |
| 71 | + <van-image | |
| 72 | + class="img" | |
| 73 | + fit="cover" | |
| 74 | + lazy-load | |
| 75 | + src="http://wjjtest.ys2.cnliveimg.com/802/shop/img/2020/05/18/158978851853674726863.jpg"/> | |
| 76 | + <van-image | |
| 77 | + class="img" | |
| 78 | + fit="cover" | |
| 79 | + lazy-load | |
| 80 | + src="http://wjjtest.ys2.cnliveimg.com/802/shop/img/2020/05/18/158978851853674726863.jpg"/> | |
| 81 | + <van-image | |
| 82 | + class="img" | |
| 83 | + fit="cover" | |
| 84 | + lazy-load | |
| 85 | + src="http://wjjtest.ys2.cnliveimg.com/802/shop/img/2020/05/18/158978851853674726863.jpg"/> | |
| 86 | + </div> | |
| 87 | + <!-- 地址信息 --> | |
| 88 | + <div class="address_info"> | |
| 89 | + <div class="left"> | |
| 90 | + <img src="http://wjjtest.ys2.cnliveimg.com/802/shop/img/2020/05/18/158978851853674726863.jpg" alt=""/> | |
| 91 | + 陕西省 西安市 西安区 | |
| 92 | + </div> | |
| 93 | + <div class="right"> | |
| 94 | + 2020-09-23 | |
| 95 | + </div> | |
| 96 | + </div> | |
| 97 | + </div> | |
| 98 | +</div> | |
| 99 | +</template> | |
| 100 | + | |
| 101 | +<script> | |
| 102 | +export default { | |
| 103 | + data(){ | |
| 104 | + return{ | |
| 105 | + dropDownMenuShow:false, | |
| 106 | + } | |
| 107 | + }, | |
| 108 | +//部件 | |
| 109 | + components: { | |
| 110 | + }, | |
| 111 | +//静态 | |
| 112 | + props: [ | |
| 113 | +], | |
| 114 | +//对象内部的属性监听,也叫深度监听 | |
| 115 | + watch: { | |
| 116 | + }, | |
| 117 | +//属性的结果会被缓存,除非依赖的响应式属性变化才会重新计算。主要当作属性来使用; | |
| 118 | + computed: { | |
| 119 | + }, | |
| 120 | +//方法表示一个具体的操作,主要书写业务逻辑; | |
| 121 | + methods: { | |
| 122 | + /* 使文本框出现在视野内 */ | |
| 123 | + // 键盘弹起 | |
| 124 | + handleFocus(event) { | |
| 125 | + clearTimeout(this.timer); | |
| 126 | + }, | |
| 127 | + // 键盘回落 | |
| 128 | + handleblur() { | |
| 129 | + this.timer = setTimeout(() => { | |
| 130 | + document.body.scrollTop = 0; | |
| 131 | + window.pageXOffset = 0; | |
| 132 | + document.documentElement.scrollTop = 0; | |
| 133 | + }, 100); | |
| 134 | + }, | |
| 135 | + // 安卓手机下弹起和收起 | |
| 136 | + androidkeyboardOn() { | |
| 137 | + const innerHeight = window.innerHeight; | |
| 138 | + window.addEventListener("resize", () => { | |
| 139 | + const newInnerHeight = window.innerHeight; | |
| 140 | + if (innerHeight > newInnerHeight) { | |
| 141 | + this.androidKeyBoard = true; | |
| 142 | + } else { | |
| 143 | + this.androidKeyBoard = false; | |
| 144 | + } | |
| 145 | + }); | |
| 146 | + }, | |
| 147 | + }, | |
| 148 | +//请求数据 | |
| 149 | + created() { | |
| 150 | +}, | |
| 151 | + mounted() { | |
| 152 | +} | |
| 153 | +} | |
| 154 | +</script> | |
| 155 | + | |
| 156 | +<style scoped lang="less" rel="stylesheet/less"> | |
| 157 | +.icon_triangle{ | |
| 158 | + display: block; | |
| 159 | + width: 0; | |
| 160 | + height: 0; | |
| 161 | + border-left: 8px solid transparent; | |
| 162 | + border-right: 8px solid transparent; | |
| 163 | + border-top: 8px solid #4A4A4A; | |
| 164 | + margin-left: 10px; | |
| 165 | +} | |
| 166 | +.search_box{ | |
| 167 | + display: flex; | |
| 168 | + .search{ | |
| 169 | + width: 604px; | |
| 170 | + height: 58px; | |
| 171 | + background: #F9F9F9; | |
| 172 | + border-radius: 32px; | |
| 173 | + display: flex; | |
| 174 | + margin: 20px 30px; | |
| 175 | + .left{ | |
| 176 | + height: 37px; | |
| 177 | + font-size: 26px; | |
| 178 | + font-weight: 400; | |
| 179 | + color: #333333; | |
| 180 | + line-height: 37px; | |
| 181 | + margin:11px 10px 11px 30px; | |
| 182 | + display: flex; | |
| 183 | + align-items: center; | |
| 184 | + position: relative; | |
| 185 | + .drop_down_menu{ | |
| 186 | + position: absolute; | |
| 187 | + top: 50px; | |
| 188 | + left: -36px; | |
| 189 | + .up_triangle{ | |
| 190 | + display: block; | |
| 191 | + width: 0; | |
| 192 | + height: 0; | |
| 193 | + border-left: 12px solid transparent; | |
| 194 | + border-right: 12px solid transparent; | |
| 195 | + border-bottom: 12px solid rgba(0, 0, 0, 0.5); | |
| 196 | + margin-left: 40px; | |
| 197 | + } | |
| 198 | + .box{ | |
| 199 | + width: 160px; | |
| 200 | + height: 160px; | |
| 201 | + background: rgba(0, 0, 0, 0.5); | |
| 202 | + border-radius: 18px; | |
| 203 | + .item{ | |
| 204 | + height: 40px; | |
| 205 | + font-size: 28px; | |
| 206 | + font-weight: 400; | |
| 207 | + color: #FFFFFF; | |
| 208 | + line-height: 40px; | |
| 209 | + padding: 20px 0; | |
| 210 | + text-align: center; | |
| 211 | + } | |
| 212 | + .item:first-child{ | |
| 213 | + margin: 0 20px; | |
| 214 | + border-bottom: solid 4px #999999; | |
| 215 | + } | |
| 216 | + } | |
| 217 | + } | |
| 218 | + } | |
| 219 | + .line{ | |
| 220 | + width: 1px; | |
| 221 | + height: 22px; | |
| 222 | + background-color: #858585; | |
| 223 | + margin: 18px 20px 18px 15px; | |
| 224 | + } | |
| 225 | + .right{ | |
| 226 | + flex: 1; | |
| 227 | + input{ | |
| 228 | + width: 100%; | |
| 229 | + line-height: 58px; | |
| 230 | + outline-style: none; | |
| 231 | + border:0; | |
| 232 | + border-radius: 32px; | |
| 233 | + background: #F9F9F9; | |
| 234 | + font-weight: 400; | |
| 235 | + color: #333; | |
| 236 | + font-weight: 400; | |
| 237 | + font-size: 26px; | |
| 238 | + } | |
| 239 | + } | |
| 240 | + } | |
| 241 | + .cancel{ | |
| 242 | + height: 58px; | |
| 243 | + line-height: 58px; | |
| 244 | + font-size: 28px; | |
| 245 | + font-weight: 400; | |
| 246 | + color: #F5A623; | |
| 247 | + margin: 20px 30px 20px 0; | |
| 248 | + } | |
| 249 | +} | |
| 250 | +.classification_box{ | |
| 251 | + display: flex; | |
| 252 | + align-items: center; | |
| 253 | + .item{ | |
| 254 | + flex: 1; | |
| 255 | + display: flex; | |
| 256 | + align-items: center; | |
| 257 | + justify-content: center; | |
| 258 | + } | |
| 259 | + .line{ | |
| 260 | + width: 1px; | |
| 261 | + height: 24px; | |
| 262 | + background-color: #DCDCDC; | |
| 263 | + } | |
| 264 | +} | |
| 265 | +// 页面信息 | |
| 266 | +.item_box{ | |
| 267 | + margin: 20px; | |
| 268 | + padding: 30px 20px 20px 20px; | |
| 269 | + background-color: #fff; | |
| 270 | + border-radius: 16px; | |
| 271 | + .user_info{ | |
| 272 | + display:flex; | |
| 273 | + .pic{ | |
| 274 | + display:block; | |
| 275 | + width:80px; | |
| 276 | + height:80px; | |
| 277 | + border-radius: 50%; | |
| 278 | + margin-right: 90px; | |
| 279 | + } | |
| 280 | + .name{ | |
| 281 | + flex: 1; | |
| 282 | + height: 80px; | |
| 283 | + font-size: 30px; | |
| 284 | + font-family: PingFangSC-Regular, PingFang SC; | |
| 285 | + font-weight: 400; | |
| 286 | + color: #333333; | |
| 287 | + line-height: 80px; | |
| 288 | + overflow: hidden; | |
| 289 | + text-overflow:ellipsis; | |
| 290 | + white-space: nowrap; | |
| 291 | + } | |
| 292 | + } | |
| 293 | + .desc{ | |
| 294 | + height: 74px; | |
| 295 | + font-size: 26px; | |
| 296 | + font-weight: 400; | |
| 297 | + color: #666660; | |
| 298 | + line-height: 37px; | |
| 299 | + margin-top: 30px; | |
| 300 | + display: -webkit-box; | |
| 301 | + -webkit-box-orient: vertical; | |
| 302 | + -webkit-line-clamp: 2; | |
| 303 | + overflow: hidden; | |
| 304 | + } | |
| 305 | + .img_box{ | |
| 306 | + width: 100%; | |
| 307 | + display: -ms-flexbox; | |
| 308 | + display: flex; | |
| 309 | + -ms-flex-wrap: wrap; | |
| 310 | + flex-wrap: wrap; | |
| 311 | + list-style: none; | |
| 312 | + .img{ | |
| 313 | + padding: 5px; | |
| 314 | + flex:1 | |
| 315 | + } | |
| 316 | + } | |
| 317 | + .address_info{ | |
| 318 | + margin-top:30px; | |
| 319 | + font-size:24px; | |
| 320 | + font-weight: 300; | |
| 321 | + color: #9A9A9A; | |
| 322 | + line-height: 33px; | |
| 323 | + .left{ | |
| 324 | + display:flex; | |
| 325 | + align-items: center; | |
| 326 | + float:left; | |
| 327 | + img{ | |
| 328 | + display:block; | |
| 329 | + width:22px; | |
| 330 | + height:22px; | |
| 331 | + margin-right: 10px; | |
| 332 | + } | |
| 333 | + } | |
| 334 | + .right{ | |
| 335 | + float:right; | |
| 336 | + } | |
| 337 | + } | |
| 338 | +} | |
| 339 | +</style> | |
| 340 | + | ... | ... |
src/router/index.js
| ... | ... | @@ -158,7 +158,18 @@ const router = new Router({ |
| 158 | 158 | meta: { |
| 159 | 159 | requireAuth: false |
| 160 | 160 | } |
| 161 | - } | |
| 161 | + }, | |
| 162 | + { | |
| 163 | + // 暂未开通 | |
| 164 | + path: "/test", | |
| 165 | + name: "test", | |
| 166 | + component: resolve => { | |
| 167 | + require(["@/pages/test/test"], resolve); | |
| 168 | + }, | |
| 169 | + meta: { | |
| 170 | + requireAuth: false | |
| 171 | + } | |
| 172 | + } | |
| 162 | 173 | ] |
| 163 | 174 | }, |
| 164 | 175 | { | ... | ... |