├── .gitignore ├── README.md ├── babel.config.js ├── docs └── static │ ├── card.png │ ├── category.png │ ├── index.png │ ├── login.png │ ├── order_info.png │ ├── order_list.png │ ├── product_detail.png │ ├── product_list.png │ ├── qrcode.png │ ├── show1.jpg │ ├── show2.jpg │ ├── show3.jpg │ └── submit_order.png ├── package-lock.json ├── package.json ├── public ├── favicon.ico └── index.html └── src ├── App.vue ├── api ├── page.js └── user.js ├── assets ├── images │ └── notice.png ├── logo.png └── style │ ├── common.css │ └── index.css ├── components ├── common │ └── productcard.vue ├── footer │ └── navigate.vue ├── header │ └── nav.vue ├── page │ ├── cube.vue │ ├── imageAd.vue │ ├── imageText.vue │ ├── line.vue │ ├── notice.vue │ ├── product.vue │ ├── search.vue │ ├── text.vue │ ├── title.vue │ └── whitespace.vue └── search │ └── searchtop.vue ├── config ├── components.js ├── env.js ├── rem.js ├── request.js └── router.js ├── data ├── area.js ├── common │ └── success.json ├── data.js ├── page │ ├── GetPage.json │ └── Product.json ├── sku.js └── user │ ├── GetAddressById.json │ ├── GetAddressList.json │ ├── GetCoupon.json │ ├── GetFavorite.json │ ├── GetUserIndex.json │ └── SaveAddress ├── main.js └── page ├── account ├── login.vue ├── password.vue ├── phonelogin.vue └── register.vue ├── activity └── index.vue ├── cart └── index.vue ├── category └── index.vue ├── index.vue ├── page └── page.vue ├── product ├── detail.vue └── list.vue ├── shipping └── order.vue └── user ├── address ├── edit.vue └── list.vue ├── aftersale ├── apply.vue ├── detail.vue ├── list.vue └── track.vue ├── coupon └── list.vue ├── favorite └── list.vue ├── index.vue ├── info └── detail.vue └── order ├── info.vue ├── list.vue └── logistics.vue /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 基于Vue实现开箱即用移动端商城的单页应用 2 | 3 | >这是开箱即用移动端商城的框架。只需要后端返回标准接口数据,前端配置接口地址等信息,标准商城的页面不需要做任何调整。 4 | 5 | 6 | ## 特性 7 | - 开箱即用,集成后台接口格式,前端可做二次开发以实现自有业务 8 | - 首页是由图片广告、图文导航、商品、公告、搜索、文本、标题、辅助空白、辅助线、方格等组件根据后端接口数据动态渲染,可根据后端返回的数据渲染出N种首页效果 9 | - 定制主题 10 | 11 | ## 手机预览 12 | 13 | 可以手机扫码以下二维码访问手机端 demo: 14 | 15 | ![](./docs/static/qrcode.png) 16 | 17 | ![](./docs/static/show1.jpg) 18 | 19 | ![](./docs/static/show2.jpg) 20 | 21 | ![](./docs/static/show3.jpg) 22 | 23 | 24 | ## 技术栈 25 | 26 | - vue 27 | - [vue cli 3](https://cli.vuejs.org/zh/guide/installation.html) 28 | - [vant](https://github.com/youzan/vant) 29 | - less 30 | - [vue-router](https://router.vuejs.org/zh/installation.html) 31 | - [axios](https://github.com/axios/axios) 32 | - [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) 33 | 34 | 35 | ## 快速上手 36 | 37 | ``` 38 | # 安装 Vue Cli 3 39 | npm install -g @vue/cli 40 | 41 | npm install 42 | 43 | npm run dev 44 | 45 | npm run build 46 | ``` 47 | 48 | 调整src/config/env.js的配置信息 49 | ``` 50 | baseUrl: 域名地址 51 | dataSources:数据源(local=本地) 52 | ``` 53 | ## 进度 54 | - [x] 界面样式 55 | - [ ] 数据通过接口绑定 56 | - [ ] 定制主题 57 | - [ ] 代码重构优化 58 | 59 | ## 页面 60 | ``` 61 | - 首页 62 | - 分类 63 | - 商品 64 | - 详情 65 | - 列表 66 | - 购物车 67 | - 提交订单 68 | - 会员 69 | - 会员中心 70 | - 账户管理 71 | - 订单 72 | - 列表 73 | - 详情 74 | - 追踪 75 | - 售后 76 | - 申请 77 | - 列表 78 | - 详情 79 | - 进度详情 80 | - 我的优惠券 81 | - 我的收藏 82 | - 收货地址 83 | - 列表 84 | - 编辑 85 | - 手机登录 86 | - 手机注册 87 | 88 | 89 | ``` 90 | 91 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['@vue/app'], 3 | plugins: [ 4 | [ 5 | 'import', 6 | { libraryName: 'vant', libraryDirectory: 'es', style: true }, 7 | 'vant' 8 | ] 9 | ] 10 | }; 11 | -------------------------------------------------------------------------------- /docs/static/card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/card.png -------------------------------------------------------------------------------- /docs/static/category.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/category.png -------------------------------------------------------------------------------- /docs/static/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/index.png -------------------------------------------------------------------------------- /docs/static/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/login.png -------------------------------------------------------------------------------- /docs/static/order_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/order_info.png -------------------------------------------------------------------------------- /docs/static/order_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/order_list.png -------------------------------------------------------------------------------- /docs/static/product_detail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/product_detail.png -------------------------------------------------------------------------------- /docs/static/product_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/product_list.png -------------------------------------------------------------------------------- /docs/static/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/qrcode.png -------------------------------------------------------------------------------- /docs/static/show1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/show1.jpg -------------------------------------------------------------------------------- /docs/static/show2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/show2.jpg -------------------------------------------------------------------------------- /docs/static/show3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/show3.jpg -------------------------------------------------------------------------------- /docs/static/submit_order.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/docs/static/submit_order.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shop-vue", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.18.0", 12 | "vant": "^1.3.1", 13 | "vue": "^2.5.17", 14 | "vue-router": "^3.0.1" 15 | }, 16 | "devDependencies": { 17 | "@vue/cli-plugin-babel": "^3.0.3", 18 | "@vue/cli-plugin-eslint": "^3.0.3", 19 | "@vue/cli-service": "^3.0.3", 20 | "babel-plugin-import": "^1.8.0", 21 | "less": "^3.8.1", 22 | "less-loader": "^4.1.0", 23 | "vue-lazyload": "^1.2.6", 24 | "vue-template-compiler": "^2.5.17" 25 | }, 26 | "eslintConfig": { 27 | "root": true, 28 | "env": { 29 | "node": true 30 | }, 31 | "extends": [ 32 | "plugin:vue/essential", 33 | "eslint:recommended" 34 | ], 35 | "rules": {}, 36 | "parserOptions": { 37 | "parser": "babel-eslint" 38 | } 39 | }, 40 | "postcss": { 41 | "plugins": { 42 | "autoprefixer": {} 43 | } 44 | }, 45 | "browserslist": [ 46 | "Android >= 4.0", 47 | "iOS >= 7" 48 | ] 49 | } 50 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/api/page.js: -------------------------------------------------------------------------------- 1 | import request from "../config/request"; 2 | 3 | 4 | export function GetPage() { 5 | return request({ 6 | url: '/Page/GetPage', 7 | method: 'get', 8 | }) 9 | } 10 | 11 | export function getProduct(id) { 12 | return request({ 13 | url: '/Page/Product', 14 | method: 'get', 15 | params: { id } 16 | }) 17 | } -------------------------------------------------------------------------------- /src/api/user.js: -------------------------------------------------------------------------------- 1 | import request from "../config/request"; 2 | 3 | 4 | export function GetUserIndex() { 5 | return request({ 6 | url: '/User/GetUserIndex', 7 | method: 'get', 8 | }) 9 | } 10 | 11 | export function GetFavorite(data){ 12 | return request({ 13 | url: '/User/GetFavorite', 14 | method: 'post', 15 | params: { data } 16 | }) 17 | } 18 | 19 | export function DelFavorite(id){ 20 | return request({ 21 | url: '/User/DelFavorite', 22 | method: 'get', 23 | params: { id:id } 24 | }) 25 | } 26 | 27 | export function GetAddressList(){ 28 | return request({ 29 | url: '/User/GetAddressList', 30 | method: 'get', 31 | }) 32 | } 33 | 34 | export function GetAddressById(id){ 35 | return request({ 36 | url: '/User/GetAddressById', 37 | method: 'get', 38 | params: { id } 39 | }) 40 | } 41 | 42 | export function SaveAddress(data){ 43 | return request({ 44 | url: '/User/SaveAddress', 45 | method: 'post', 46 | params: { data } 47 | }) 48 | } 49 | export function DelAddress(data){ 50 | return request({ 51 | url: '/User/DelAddress', 52 | method: 'post', 53 | params: { data } 54 | }) 55 | } 56 | 57 | 58 | export function GetCoupon(data){ 59 | return request({ 60 | url: '/User/GetCoupon', 61 | method: 'Post', 62 | params: { data } 63 | }) 64 | } 65 | 66 | export function ExchangeCoupon(code){ 67 | return request({ 68 | url: '/User/ExchangeCoupon', 69 | method: 'Post', 70 | params: { code:code } 71 | }) 72 | } 73 | 74 | 75 | -------------------------------------------------------------------------------- /src/assets/images/notice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/src/assets/images/notice.png -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/src/assets/logo.png -------------------------------------------------------------------------------- /src/assets/style/common.css: -------------------------------------------------------------------------------- 1 | body {margin:0px; padding:0px; color:rgb(34, 34, 34); font-family:Helvetica,"Hiragino Sans GB","Microsoft YaHei",Simsun,"Droid Sans Fallback",sans-serif; text-decoration:none; background:#fff;-webkit-tap-highlight-color:rgba(0,0,0,0); } 2 | body,div,dl,dt,dd,ol,ul,li,h1,h2,h3,h4,h5,h6,h7,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0px; padding:0px;} 3 | ul{list-style:none;} 4 | li{list-style:none;} 5 | img {border:0px currentColor;vertical-align:top;} 6 | ol {list-style:none; margin:0px; padding:0px;} 7 | a{color:rgb(0, 0, 0); text-decoration:none;} -------------------------------------------------------------------------------- /src/assets/style/index.css: -------------------------------------------------------------------------------- 1 |  2 | 3 | .tt-header, #ttkey {max-width:640px;} 4 | /*倒计时begin*/ 5 | .countdown { 6 | text-align: center; 7 | height: 42px; 8 | line-height: 42px; 9 | font-size: 12px; 10 | background-size: cover; 11 | background-position: 50%; 12 | background-repeat: no-repeat; 13 | } 14 | 15 | .fontweight_300 { 16 | font-weight: 300; 17 | } 18 | 19 | .countdown b { 20 | color: red; 21 | } 22 | 23 | .countdown b { 24 | margin: 5px; 25 | font-size: 16px; 26 | font-weight: 300 27 | } 28 | /*倒计时end*/ 29 | /*魔方begin*/ 30 | .cap-cube { 31 | width: 100%; 32 | position: relative; 33 | } 34 | 35 | .cap-cube__item { 36 | float: left; 37 | background-repeat: no-repeat; 38 | background-size: cover; 39 | background-position: 50%; 40 | overflow: hidden; 41 | } 42 | 43 | .cap-cube__table-image--invisible { 44 | position: absolute; 45 | left: 0; 46 | top: 0; 47 | width: 100%; 48 | height: 100%; 49 | opacity: 0; 50 | } 51 | /*魔方end*/ 52 | /*图片广告begin*/ 53 | .swiper-container { 54 | width: 100%; 55 | height: 100%; 56 | } 57 | 58 | .swiper-slide img { 59 | width: 100%; 60 | } 61 | .cap-image-ad__content { 62 | position: relative; 63 | } 64 | 65 | .cap-image-ad__content .image-wrapper { 66 | position: relative; 67 | } 68 | 69 | .cap-image-ad__image { 70 | width: 100%; 71 | } 72 | .swiper-slide { 73 | text-align: center; 74 | font-size: 18px; 75 | background: #fff; 76 | /* Center slide text vertically */ 77 | display: -webkit-box; 78 | display: -ms-flexbox; 79 | display: -webkit-flex; 80 | } 81 | .cap-image-ad__slide { 82 | width: 100%; 83 | overflow-x: scroll; 84 | overflow-y: hidden; 85 | -webkit-overflow-scrolling: touch; 86 | white-space: nowrap; 87 | } 88 | 89 | .cap-image-ad__slide .image-wrapper { 90 | display: inline-block; 91 | height: 100%; 92 | position: relative; 93 | } 94 | 95 | .cap-image-ad__slide .cap-image-ad__image { 96 | height: 100%; 97 | width: 100%; 98 | margin-right: 0; 99 | margin-left: 0; 100 | } 101 | /*图片广告end*/ 102 | /*图文导航begin*/ 103 | 104 | h3 { 105 | margin: 0; 106 | padding: 0; 107 | border: 0; 108 | font: inherit; 109 | font-size: 100%; 110 | vertical-align: baseline; 111 | } 112 | 113 | a { 114 | text-decoration: none; 115 | color: #000; 116 | } 117 | 118 | .cap-image-ad__image-nav { 119 | white-space: nowrap; 120 | -webkit-overflow-scrolling: touch; 121 | background-color: #fff; 122 | font-size: 0; 123 | } 124 | 125 | .cap-image-ad__image-nav .image-wrapper { 126 | display: inline-block; 127 | vertical-align: middle; 128 | } 129 | 130 | .cap-image-ad__link--image-nav { 131 | font-size: 0; 132 | } 133 | 134 | .cap-image-ad__link { 135 | display: block; 136 | position: relative; 137 | height: 100%; 138 | } 139 | 140 | .cap-image-ad__image-nav .cap-image-ad__image { 141 | background-size: cover; 142 | background-position: 50%; 143 | } 144 | 145 | .cap-image-ad__image-nav .cap-image-ad__nav-title { 146 | padding-bottom: 9px; 147 | height: 33px; 148 | line-height: 24px; 149 | } 150 | 151 | .cap-image-ad__nav-title { 152 | font-size: 12px; 153 | height: 20px; 154 | line-height: 20px; 155 | width: 100%; 156 | padding-left: 5px; 157 | padding-right: 5px; 158 | font-weight: inherit; 159 | } 160 | 161 | .cap-image-ad__nav-title, .cap-image-ad__title { 162 | text-align: center; 163 | overflow: hidden; 164 | -webkit-box-sizing: border-box; 165 | -moz-box-sizing: border-box; 166 | box-sizing: border-box; 167 | } 168 | 169 | .cap-image-ad__text-nav .text-nav-wrapper { 170 | display: inline-block; 171 | padding: 15px 0; 172 | } 173 | 174 | .cap-image-ad__text-nav .cap-image-ad__nav-title { 175 | position: relative; 176 | height: 12px; 177 | line-height: 12px; 178 | font-size: 12px; 179 | text-align: center; 180 | } 181 | 182 | /*图文导航end*/ 183 | /*商品begin*/ 184 | body, div, dl, dt, dd, ol, ul, li, h1, h2, h3, h4, h5, h6, h7, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td { 185 | margin: 0px; 186 | padding: 0px; 187 | } 188 | 189 | ol, ul { 190 | margin: 0; 191 | padding: 0; 192 | list-style: none; 193 | } 194 | 195 | .cap-goods-list__item--big { 196 | margin: 15px; 197 | } 198 | 199 | .cap-goods-list__item { 200 | display: block; 201 | position: relative; 202 | min-height: 100px; 203 | color: #333; 204 | background-color: #fff; 205 | -webkit-box-sizing: border-box; 206 | -moz-box-sizing: border-box; 207 | box-sizing: border-box; 208 | } 209 | 210 | .cap-goods-list__item.simple { 211 | background-color: inherit; 212 | } 213 | 214 | .cap-goods-list__container--big .cap-goods-list__wrapper:first-child .cap-goods-list__item, .cap-goods-list__container--list .cap-goods-list__wrapper:first-child .cap-goods-list__item { 215 | margin-top: 5px; 216 | } 217 | 218 | .cap-goods-list__item--big.cap-goods-list__item--ratio-1-1 .cap-goods-list__photo, .cap-goods-list__item--big.cap-goods-list__item--ratio-3-2 .cap-goods-list__photo { 219 | min-height: 0; 220 | height: 0; 221 | } 222 | 223 | .cap-goods-list__item--big.cap-goods-list__item--ratio-3-2 .cap-goods-list__photo { 224 | padding-top: 100%; 225 | } 226 | 227 | .cap-goods-list__item--big.cap-goods-list__item--ratio-1-1 .cap-goods-list__img, .cap-goods-list__item--big.cap-goods-list__item--ratio-3-2 .cap-goods-list__img { 228 | position: absolute; 229 | } 230 | 231 | .cap-goods-list__img, .cap-goods-list__photo--soldout:after { 232 | position: absolute; 233 | top: 0; 234 | left: 0; 235 | right: 0; 236 | bottom: 0; 237 | margin: auto; 238 | width: 100%; 239 | } 240 | 241 | .cap-goods-list__img { 242 | vertical-align: bottom; 243 | height: auto; 244 | } 245 | 246 | .cap-goods-list__item--big .cap-goods-list__img { 247 | position: relative; 248 | display: block; 249 | } 250 | 251 | .cap-goods-list__item--padding .cap-goods-list__img { 252 | width: 100%; 253 | height: auto; 254 | } 255 | 256 | .cap-goods-list__photo { 257 | text-align: center; 258 | overflow: hidden; 259 | position: relative; 260 | min-height: 100px; 261 | max-height: 500px; 262 | z-index: 0; 263 | } 264 | 265 | .cap-goods-list__info { 266 | position: relative; 267 | overflow: hidden; 268 | } 269 | 270 | .cap-goods-list__item--big .cap-goods-list__info { 271 | padding: 10px; 272 | } 273 | 274 | .cap-goods-list__item.simple .cap-goods-list__info.has-price, .cap-goods-list__item.simple .cap-goods-list__info.has-title { 275 | text-align: center; 276 | } 277 | 278 | .cap-goods-list__info .title { 279 | font-size: 14px; 280 | line-height: 18px; 281 | overflow: hidden; 282 | word-break: break-all; 283 | font-weight: initial; 284 | } 285 | 286 | .cap-goods-list__item--big .cap-goods-list__info .title { 287 | width: 100%; 288 | overflow: hidden; 289 | text-overflow: ellipsis; 290 | display: -webkit-box; 291 | -webkit-line-clamp: 1; 292 | -webkit-box-orient: vertical; 293 | } 294 | 295 | .cap-goods-list__item.simple .cap-goods-list__info .title { 296 | height: 36px; 297 | overflow: hidden; 298 | text-overflow: ellipsis; 299 | display: -webkit-box; 300 | -webkit-line-clamp: 2; 301 | -webkit-box-orient: vertical; 302 | } 303 | 304 | .cap-goods-list__item.simple .cap-goods-list__info.has-title.has-price .title, .cap-goods-list__item.simple .cap-goods-list__info.has-title.has-subtitle .title { 305 | margin-bottom: 6px; 306 | } 307 | 308 | .cap-goods-list__info .sale-info { 309 | color: #e50f3d; 310 | font-size: 16px; 311 | line-height: 1; 312 | } 313 | 314 | .has-title.has-price.has-btn .sale-info { 315 | position: absolute; 316 | bottom: 10px; 317 | left: 10px; 318 | } 319 | 320 | .cap-goods-list__info.has-title.has-price.has-btn { 321 | padding-bottom: 36px; 322 | } 323 | 324 | .has-title.has-price.has-btn .title { 325 | height: 36px; 326 | } 327 | 328 | .card .cap-goods-list__buy-btn-wrapper { 329 | right: 10px; 330 | bottom: 10px; 331 | } 332 | .title { 333 | color: #333; 334 | text-align: left; 335 | } 336 | /*小图样式*/ 337 | .cap-goods-list__container--small { 338 | overflow: hidden; 339 | padding: 0 12px; 340 | } 341 | 342 | .cap-goods-list__container--small .cap-goods-list__wrapper { 343 | float: left; 344 | width: 50%; 345 | } 346 | 347 | .cap-goods-list__item.simple { 348 | background-color: inherit; 349 | } 350 | 351 | .cap-goods-list__item--small { 352 | margin: 3px; 353 | } 354 | 355 | .cap-goods-list__item--small .cap-goods-list__photo { 356 | min-height: 0; 357 | padding-top: 100%; 358 | height: 0; 359 | } 360 | 361 | .cap-goods-list__item--small .cap-goods-list__info.has-price .sale-info { 362 | line-height: 1; 363 | } 364 | 365 | 366 | /*一大两小样式*/ 367 | .cap-goods-list__container--hybrid, .cap-goods-list__container--waterfall { 368 | overflow: hidden; 369 | padding: 0 12px; 370 | } 371 | 372 | .cap-goods-list__container--hybrid .cap-goods-list__wrapper--hybrid-big { 373 | width: 100%; 374 | } 375 | 376 | .cap-goods-list__item--hybrid-big { 377 | margin: 5px 3px; 378 | } 379 | 380 | .cap-goods-list__container--hybrid .cap-goods-list__wrapper--hybrid-small { 381 | width: 50%; 382 | } 383 | 384 | .cap-goods-list__container--hybrid .cap-goods-list__wrapper { 385 | float: left; 386 | overflow: hidden; 387 | } 388 | 389 | 390 | 391 | /*详细列表样式*/ 392 | .cap-goods-list__container--list.cap-goods-list__container--simple { 393 | padding-left: 15px; 394 | background-color: #fff; 395 | position: relative; 396 | } 397 | 398 | .cap-goods-list__container--list.cap-goods-list__container--simple .cap-goods-list__wrapper { 399 | padding: 10px 15px 10px 0; 400 | position: relative; 401 | } 402 | 403 | .cap-goods-list__item.simple.cap-goods-list__item--list { 404 | min-height: auto; 405 | } 406 | 407 | .cap-goods-list__item.simple.cap-goods-list__item--list .cap-goods-list__photo { 408 | margin-right: 15px; 409 | width: 98px; 410 | height: 98px; 411 | min-height: auto; 412 | } 413 | 414 | .cap-goods-list__item--list .cap-goods-list__photo { 415 | float: left; 416 | } 417 | 418 | .cap-goods-list__item.simple.cap-goods-list__item--list .cap-goods-list__info { 419 | margin-left: 113px; 420 | height: 98px; 421 | text-align: left; 422 | } 423 | 424 | .cap-goods-list__info { 425 | position: relative; 426 | overflow: hidden; 427 | } 428 | 429 | .cap-goods-list__item.simple.cap-goods-list__item--list .cap-goods-list__info .title { 430 | height: auto; 431 | max-height: 36px; 432 | overflow: hidden; 433 | text-overflow: ellipsis; 434 | display: -webkit-box; 435 | -webkit-line-clamp: 2; 436 | -webkit-box-orient: vertical; 437 | } 438 | 439 | .cap-goods-list__item.simple.cap-goods-list__item--list .cap-goods-list__info .sale-info { 440 | bottom: 0; 441 | } 442 | 443 | .cap-goods-list__item--list.cap-goods-list__item--btn1 .cap-goods-list__info .sale-info { 444 | line-height: 24px; 445 | } 446 | 447 | .cap-goods-list__item--list .cap-goods-list__info .sale-info { 448 | position: absolute; 449 | left: 0; 450 | bottom: 10px; 451 | } 452 | 453 | .cap-goods-list__item.simple.cap-goods-list__item--list .cap-goods-list__buy-btn-wrapper { 454 | right: 5px; 455 | bottom: 0; 456 | } 457 | 458 | .cap-goods-list__buy-btn-wrapper { 459 | position: absolute; 460 | } 461 | 462 | .cap-goods-list__buy-btn-wrapper .cap-goods-list__buy-btn-4 { 463 | font-size: 14px; 464 | line-height: 24px; 465 | height: 26px; 466 | border-color: #f44; 467 | color: #f44; 468 | min-width: 48px; 469 | cursor: pointer; 470 | border-radius: 2px; 471 | border: 1px solid; 472 | background-color: #fff; 473 | } 474 | 475 | .cap-goods-list__container--list.cap-goods-list__container--simple .cap-goods-list__wrapper:after { 476 | content: ""; 477 | position: absolute; 478 | top: 0; 479 | left: 0; 480 | width: 200%; 481 | height: 200%; 482 | -webkit-transform: scale(.5); 483 | -moz-transform: scale(.5); 484 | -ms-transform: scale(.5); 485 | transform: scale(.5); 486 | -webkit-transform-origin: 0 0; 487 | -moz-transform-origin: 0 0; 488 | -ms-transform-origin: 0 0; 489 | transform-origin: 0 0; 490 | pointer-events: none; 491 | -webkit-box-sizing: border-box; 492 | -moz-box-sizing: border-box; 493 | box-sizing: border-box; 494 | border: 0 solid #e5e5e5; 495 | border-bottom-width: 1px; 496 | } 497 | 498 | .cap-goods-list__item--list.card2:after, .cap-goods-list__item--list.card:after { 499 | content: ""; 500 | position: absolute; 501 | top: 0; 502 | left: 0; 503 | width: 200%; 504 | height: 200%; 505 | -webkit-transform: scale(.5); 506 | -moz-transform: scale(.5); 507 | -ms-transform: scale(.5); 508 | transform: scale(.5); 509 | -webkit-transform-origin: 0 0; 510 | -moz-transform-origin: 0 0; 511 | -ms-transform-origin: 0 0; 512 | transform-origin: 0 0; 513 | pointer-events: none; 514 | -webkit-box-sizing: border-box; 515 | -moz-box-sizing: border-box; 516 | box-sizing: border-box; 517 | border: 1px solid #e5e5e5; 518 | } 519 | 520 | .cap-goods-list__item--list.card2 .cap-goods-list__photo, .cap-goods-list__item--list.card .cap-goods-list__photo { 521 | margin-right: 10px; 522 | width: 118px; 523 | height: 118px; 524 | min-height: auto; 525 | } 526 | 527 | .cap-goods-list__item--list.card, .cap-goods-list__item--list.card2 { 528 | min-height: auto; 529 | margin: 15px; 530 | } 531 | 532 | .cap-goods-list__item--list.card2 .cap-goods-list__info, .cap-goods-list__item--list.card .cap-goods-list__info { 533 | margin-left: 128px; 534 | height: 118px; 535 | margin-right: 10px; 536 | } 537 | 538 | .cap-goods-list__item--list.card2 .cap-goods-list__info .title, .cap-goods-list__item--list.card .cap-goods-list__info .title { 539 | padding-top: 10px; 540 | } 541 | 542 | .cap-goods-list__item--list .cap-goods-list__info .title { 543 | padding-top: 2px; 544 | margin-bottom: 12px; 545 | overflow: hidden; 546 | text-overflow: ellipsis; 547 | display: -webkit-box; 548 | -webkit-line-clamp: 2; 549 | -webkit-box-orient: vertical; 550 | } 551 | 552 | .cap-goods-list__item--list.cap-goods-list__item--btn4 .cap-goods-list__info .sale-info { 553 | line-height: 26px; 554 | } 555 | 556 | .cap-goods-list__item--list.card2 .cap-goods-list__buy-btn-wrapper, .cap-goods-list__item--list.card .cap-goods-list__buy-btn-wrapper { 557 | right: 15px; 558 | bottom: 10px; 559 | } 560 | 561 | .cap-goods-list__item--list .cap-goods-list__info.has-title.has-price.has-btn { 562 | padding-bottom: 0; 563 | } 564 | 565 | /*一行三个样式*/ 566 | .cap-goods-list__container--three { 567 | padding: 0 12px; 568 | } 569 | 570 | .cap-goods-list__item--three { 571 | margin: 5px 3px; 572 | } 573 | 574 | .cap-goods-list__item--three .cap-goods-list__photo { 575 | min-height: 0; 576 | padding-top: 100%; 577 | height: 0; 578 | } 579 | 580 | .cap-goods-list__container--three .cap-goods-list__wrapper { 581 | float: left; 582 | width: 33.33%; 583 | } 584 | 585 | .simple.cap-goods-list__item--three .cap-goods-list__info .sale-info { 586 | font-size: 14px; 587 | } 588 | 589 | /*横向滑动样式*/ 590 | .cap-goods-list__container--three.nowrap { 591 | overflow-x: auto; 592 | overflow-y: hidden; 593 | display: -webkit-box; 594 | display: -webkit-flex; 595 | display: -moz-box; 596 | display: -ms-flexbox; 597 | display: flex; 598 | -webkit-flex-wrap: nowrap; 599 | -ms-flex-wrap: nowrap; 600 | flex-wrap: nowrap; 601 | -webkit-overflow-scrolling: touch; 602 | padding-bottom: 10px; 603 | margin-bottom: -10px; 604 | } 605 | 606 | .cap-goods-list__container--three.nowrap .cap-goods-list__wrapper { 607 | -webkit-box-flex: 0; 608 | -webkit-flex: 0 0 30%; 609 | -moz-box-flex: 0; 610 | -ms-flex: 0 0 30%; 611 | flex: 0 0 30%; 612 | width: 30%; 613 | float: none; 614 | } 615 | /*商品end*/ 616 | /*标题begin*/ 617 | .cap-title { 618 | padding: 10px; 619 | -webkit-box-sizing: border-box; 620 | -moz-box-sizing: border-box; 621 | box-sizing: border-box; 622 | overflow: hidden; 623 | word-break: break-all; 624 | position: relative; 625 | background: #F9F9F9; 626 | } 627 | 628 | .cap-title__main { 629 | margin: 0; 630 | font-size: 18px; 631 | line-height: 22px; 632 | } 633 | 634 | .cap-title__sub { 635 | font-size: 11px; 636 | color: #8c8c8c; 637 | margin: 5px 0 0; 638 | } 639 | /*标题end*/ 640 | /*商品搜索begin*/ 641 | .search-box, .search-box__view { 642 | width: 100%; 643 | height: 50px; 644 | } 645 | 646 | .search-box__view { 647 | padding: 0 15px; 648 | -webkit-box-sizing: border-box; 649 | -moz-box-sizing: border-box; 650 | box-sizing: border-box; 651 | display: -webkit-box; 652 | display: -webkit-flex; 653 | display: -moz-box; 654 | display: -ms-flexbox; 655 | display: flex; 656 | -webkit-box-align: center; 657 | -webkit-align-items: center; 658 | -moz-box-align: center; 659 | -ms-flex-align: center; 660 | align-items: center; 661 | -webkit-transition: top .3s linear; 662 | -moz-transition: top .3s linear; 663 | transition: top .3s linear; 664 | } 665 | 666 | .search { 667 | display: -webkit-box; 668 | display: -webkit-flex; 669 | display: -moz-box; 670 | display: -ms-flexbox; 671 | display: flex; 672 | -webkit-box-align: center; 673 | -webkit-align-items: center; 674 | -moz-box-align: center; 675 | -ms-flex-align: center; 676 | align-items: center; 677 | -webkit-box-flex: 1; 678 | -webkit-flex: 1; 679 | -moz-box-flex: 1; 680 | -ms-flex: 1; 681 | flex: 1; 682 | -webkit-box-sizing: border-box; 683 | -moz-box-sizing: border-box; 684 | box-sizing: border-box; 685 | position: relative; 686 | } 687 | 688 | .search .cell { 689 | -webkit-box-flex: 1; 690 | -webkit-flex: 1; 691 | -moz-box-flex: 1; 692 | -ms-flex: 1; 693 | flex: 1; 694 | padding: 0 10px; 695 | height: 40px; 696 | background: transparent; 697 | } 698 | 699 | .cell { 700 | width: 100%; 701 | display: -webkit-box; 702 | display: -webkit-flex; 703 | display: -moz-box; 704 | display: -ms-flexbox; 705 | display: flex; 706 | padding: 10px 15px; 707 | -webkit-box-sizing: border-box; 708 | -moz-box-sizing: border-box; 709 | box-sizing: border-box; 710 | line-height: 24px; 711 | position: relative; 712 | background-color: #fff; 713 | color: #333; 714 | font-size: 14px; 715 | overflow: hidden; 716 | } 717 | 718 | .field .cell__value { 719 | position: relative; 720 | } 721 | 722 | .cell__value--alone { 723 | text-align: left; 724 | } 725 | 726 | .cell__value { 727 | overflow: hidden; 728 | text-align: right; 729 | vertical-align: middle; 730 | } 731 | 732 | .cell__title, .cell__value { 733 | -webkit-box-flex: 1; 734 | -webkit-flex: 1; 735 | -moz-box-flex: 1; 736 | -ms-flex: 1; 737 | flex: 1; 738 | } 739 | 740 | .field__body { 741 | display: -webkit-box; 742 | display: -webkit-flex; 743 | display: -moz-box; 744 | display: -ms-flexbox; 745 | display: flex; 746 | -webkit-box-align: center; 747 | -webkit-align-items: center; 748 | -moz-box-align: center; 749 | -ms-flex-align: center; 750 | align-items: center; 751 | } 752 | 753 | .field__control { 754 | border: 0; 755 | margin: 0; 756 | padding: 0; 757 | width: 100%; 758 | resize: none; 759 | display: block; 760 | line-height: normal; 761 | -webkit-box-sizing: border-box; 762 | -moz-box-sizing: border-box; 763 | box-sizing: border-box; 764 | background-color: transparent; 765 | } 766 | 767 | .search .icon-search { 768 | position: relative; 769 | display: inline-block; 770 | font-size: inherit; 771 | text-rendering: auto; 772 | color: #666; 773 | font-size: 16px; 774 | margin-left: 10px; 775 | } 776 | 777 | .search__filed { 778 | display: -webkit-box; 779 | display: -webkit-flex; 780 | display: -moz-box; 781 | display: -ms-flexbox; 782 | display: flex; 783 | -webkit-box-flex: 1; 784 | -webkit-flex: 1; 785 | -moz-box-flex: 1; 786 | -ms-flex: 1; 787 | flex: 1; 788 | -webkit-box-align: center; 789 | -webkit-align-items: center; 790 | -moz-box-align: center; 791 | -ms-flex-align: center; 792 | align-items: center; 793 | border-radius: 4px; 794 | } 795 | 796 | .search__filed--center { 797 | -webkit-box-pack: center; 798 | -webkit-justify-content: center; 799 | -moz-box-pack: center; 800 | -ms-flex-pack: center; 801 | justify-content: center; 802 | } 803 | 804 | .search__filed--center .cell { 805 | -webkit-box-flex: 0; 806 | -webkit-flex: none; 807 | -moz-box-flex: 0; 808 | -ms-flex: none; 809 | flex: none; 810 | } 811 | 812 | .search .cell__value .field__control { 813 | background: transparent; 814 | font-size: 12px; 815 | } 816 | 817 | .search .field__body { 818 | -webkit-box-flex: 1; 819 | -webkit-flex: 1; 820 | -moz-box-flex: 1; 821 | -ms-flex: 1; 822 | flex: 1; 823 | } 824 | 825 | .search .cell__value { 826 | display: -webkit-box; 827 | display: -webkit-flex; 828 | display: -moz-box; 829 | display: -ms-flexbox; 830 | display: flex; 831 | -webkit-box-align: center; 832 | -webkit-align-items: center; 833 | -moz-box-align: center; 834 | -ms-flex-align: center; 835 | align-items: center; 836 | } 837 | .search__filed--circle { 838 | border-radius: 20px; 839 | overflow: hidden; 840 | } 841 | 842 | /*商品搜索end*/ 843 | /*公告begin*/ 844 | .notice-bar__left-icon { 845 | height: 18px; 846 | min-width: 20px; 847 | padding-top: 1px; 848 | -webkit-box-sizing: border-box; 849 | -moz-box-sizing: border-box; 850 | box-sizing: border-box; 851 | } 852 | 853 | .notice-bar__wrap { 854 | -webkit-box-flex: 1; 855 | -webkit-flex: 1; 856 | -moz-box-flex: 1; 857 | -ms-flex: 1; 858 | flex: 1; 859 | height: 18px; 860 | overflow: hidden; 861 | position: relative; 862 | } 863 | 864 | .notice-bar__content { 865 | position: absolute; 866 | white-space: nowrap; 867 | } 868 | 869 | .notice-bar { 870 | display: -webkit-box; 871 | display: -webkit-flex; 872 | display: -moz-box; 873 | display: -ms-flexbox; 874 | display: flex; 875 | color: #f60; 876 | padding: 9px 15px; 877 | font-size: 12px; 878 | line-height: 1.5; 879 | position: relative; 880 | background-color: #fff7cc; 881 | } 882 | 883 | .notice-bar__left-icon img { 884 | width: 16px; 885 | height: 16px; 886 | vertical-align: baseline; 887 | } 888 | /*公告end*/ -------------------------------------------------------------------------------- /src/components/common/productcard.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 43 | 44 | 107 | -------------------------------------------------------------------------------- /src/components/footer/navigate.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 22 | 23 | -------------------------------------------------------------------------------- /src/components/header/nav.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 27 | 28 | 31 | -------------------------------------------------------------------------------- /src/components/page/cube.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 183 | 184 | -------------------------------------------------------------------------------- /src/components/page/imageAd.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 61 | 62 | 65 | -------------------------------------------------------------------------------- /src/components/page/imageText.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 33 | 34 | 37 | -------------------------------------------------------------------------------- /src/components/page/line.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 30 | 31 | -------------------------------------------------------------------------------- /src/components/page/notice.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 25 | 26 | 29 | 30 | -------------------------------------------------------------------------------- /src/components/page/product.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 78 | 79 | 82 | -------------------------------------------------------------------------------- /src/components/page/search.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 57 | 58 | 61 | -------------------------------------------------------------------------------- /src/components/page/text.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 25 | 26 | -------------------------------------------------------------------------------- /src/components/page/title.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 25 | 26 | 29 | -------------------------------------------------------------------------------- /src/components/page/whitespace.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 20 | 21 | -------------------------------------------------------------------------------- /src/components/search/searchtop.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 45 | 46 | 68 | -------------------------------------------------------------------------------- /src/config/components.js: -------------------------------------------------------------------------------- 1 | 2 | import headerNav from '../components/header/nav'; 3 | 4 | import navigate from '../components/footer/navigate.vue' 5 | import productcard from '../components/common/productcard.vue' 6 | import { 7 | Tag, 8 | Col, 9 | Icon, 10 | Cell, 11 | CellGroup, 12 | Swipe, 13 | Toast, 14 | SwipeItem, 15 | GoodsAction, 16 | GoodsActionBigBtn, 17 | GoodsActionMiniBtn, 18 | Actionsheet, 19 | Sku, 20 | Card,Button,SwipeCell,Dialog,Tab, Tabs,Row,Checkbox, CheckboxGroup, SubmitBar,NavBar,Tabbar, TabbarItem,Panel,List,Step, Steps,Field , 21 | Badge, BadgeGroup,Popup,Stepper,RadioGroup, Radio,Picker,Uploader,Info 22 | } from 'vant'; 23 | 24 | const components=[ 25 | Tag, 26 | Col, 27 | Icon, 28 | Cell, 29 | CellGroup, 30 | Swipe, 31 | SwipeItem, 32 | GoodsAction, 33 | GoodsActionBigBtn, 34 | GoodsActionMiniBtn, 35 | Actionsheet, 36 | Sku, 37 | Card, 38 | Button, 39 | SwipeCell , 40 | Dialog , 41 | headerNav, 42 | Tab, Tabs,Toast,Row,Checkbox, CheckboxGroup, SubmitBar,NavBar ,Tabbar, TabbarItem,navigate,Panel,List ,Step, Steps,Field , 43 | Badge, BadgeGroup,Popup,productcard,Stepper,RadioGroup, Radio,Picker,Uploader,Info 44 | ] 45 | 46 | 47 | export default (Vue)=>{ 48 | components.forEach(Component => { 49 | Vue.component(Component.name, Component) 50 | }); 51 | } 52 | -------------------------------------------------------------------------------- /src/config/env.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 配置编译环境和线上环境之间的切换 3 | * 4 | * baseUrl: 域名地址 5 | * routerMode: 路由模式 6 | * dataSources:数据源 7 | */ 8 | 9 | let baseUrl = ''; 10 | let routerMode = 'hash'; 11 | let dataSources='local';//local=本地,其他值代表非本地 12 | 13 | 14 | if (process.env.NODE_ENV == 'development') { 15 | baseUrl=''; 16 | 17 | }else if(process.env.NODE_ENV == 'production'){ 18 | baseUrl = ''; 19 | } 20 | 21 | export { 22 | baseUrl, 23 | routerMode, 24 | dataSources, 25 | } -------------------------------------------------------------------------------- /src/config/rem.js: -------------------------------------------------------------------------------- 1 | (function(d, w) { 2 | const doc = d.documentElement; 3 | function rem() { 4 | const width = Math.min(doc.getBoundingClientRect().width, 768); 5 | doc.style.fontSize = width / 7.5 + 'px'; 6 | } 7 | rem(); 8 | w.addEventListener('resize', rem); 9 | })(document, window); 10 | -------------------------------------------------------------------------------- /src/config/request.js: -------------------------------------------------------------------------------- 1 | 2 | import axios from 'axios' 3 | import {baseUrl,dataSources} from './env'; 4 | import datas from '../data/data'; 5 | 6 | 7 | const service =axios.create({ 8 | baseURL: baseUrl, // api 的 base_url 9 | timeout: 5000, // request timeout 10 | }); 11 | 12 | 13 | const servicef =function(parameter){ 14 | if(dataSources=='local'){ 15 | //定义回调函数和axios一致 16 | const promist = new Promise(function(resolve,reject){ 17 | var data=datas[parameter.url]; 18 | if(typeof data=='string'){ 19 | data= JSON.parse(data); 20 | } 21 | resolve(data); 22 | }) 23 | return promist; 24 | } 25 | return service(parameter); 26 | } 27 | 28 | 29 | service.interceptors.request.use( 30 | config => { 31 | // Do something before request is sent 32 | // if (store.getters.token) { 33 | // // 让每个请求携带token-- ['X-Token']为自定义key 请根据实际情况自行修改 34 | // config.headers['X-Token'] = getToken() 35 | // } 36 | 37 | return config 38 | }, 39 | error => { 40 | // Do something with request error 41 | console.log(error) // for debug 42 | Promise.reject(error) 43 | } 44 | ) 45 | 46 | // response interceptor 47 | service.interceptors.response.use( 48 | //response => response, 49 | /** 50 | * 下面的注释为通过在response里,自定义code来标示请求状态 51 | * 当code返回如下情况则说明权限有问题,登出并返回到登录页 52 | * 如想通过 xmlhttprequest 来状态码标识 逻辑可写在下面error中 53 | * 以下代码均为样例,请结合自生需求加以修改,若不需要,则可删除 54 | */ 55 | response => { 56 | const res = response.data; 57 | if (res.ResultCode !== 200) { 58 | // Message({ 59 | // message: res.message, 60 | // type: 'error', 61 | // duration: 5 * 1000 62 | // }) 63 | // // 50008:非法的token; 50012:其他客户端登录了; 50014:Token 过期了; 64 | // if (res.code === 50008 || res.code === 50012 || res.code === 50014) { 65 | // // 请自行在引入 MessageBox 66 | // // import { Message, MessageBox } from 'element-ui' 67 | // MessageBox.confirm('你已被登出,可以取消继续留在该页面,或者重新登录', '确定登出', { 68 | // confirmButtonText: '重新登录', 69 | // cancelButtonText: '取消', 70 | // type: 'warning' 71 | // }).then(() => { 72 | // store.dispatch('FedLogOut').then(() => { 73 | // location.reload() // 为了重新实例化vue-router对象 避免bug 74 | // }) 75 | // }) 76 | // } 77 | console.log(1); 78 | return Promise.reject('error') 79 | } else { 80 | if(typeof response.data.Tag=='string'){ 81 | return JSON.parse(response.data.Tag); 82 | }else{ 83 | return response.data.Tag; 84 | } 85 | } 86 | }, 87 | error => { 88 | 89 | return Promise.reject(error) 90 | } 91 | ) 92 | 93 | 94 | export default servicef -------------------------------------------------------------------------------- /src/config/router.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import Router from 'vue-router'; 3 | 4 | Vue.use(Router); 5 | 6 | const routes = [ 7 | { 8 | path: '*', 9 | redirect: '/home' 10 | }, 11 | { 12 | name: 'home', 13 | component: () => import('../page/index'), 14 | meta: { 15 | title: '首页' 16 | } 17 | }, 18 | { 19 | path: '/login', 20 | component: () => import('../page/account/login'), 21 | meta: { 22 | title: '登录' 23 | } 24 | }, 25 | { 26 | path: '/login/password', 27 | component: () => import('../page/account/password'), 28 | meta: { 29 | title: '登录' 30 | } 31 | }, 32 | { 33 | path: '/login/phone', 34 | component: () => import('../page/account/phonelogin'), 35 | meta: { 36 | title: '手机号登录' 37 | } 38 | }, 39 | { 40 | path: '/login/register', 41 | component: () => import('../page/account/register'), 42 | meta: { 43 | title: '注册' 44 | } 45 | }, 46 | { 47 | path: '/user/index', 48 | component: () => import('../page/user/index'), 49 | name: 'user', 50 | meta: { 51 | title: '会员中心' 52 | } 53 | }, 54 | { 55 | path: '/user/info', 56 | component: () => import('../page/user/info/detail'), 57 | name: 'user', 58 | meta: { 59 | title: '账号管理' 60 | } 61 | }, 62 | { 63 | path: '/user/address', 64 | component: () => import('../page/user/address/list'), 65 | meta: { 66 | title: '我的地址' 67 | } 68 | }, 69 | { 70 | path: '/user/address/edit', 71 | component: () => import('../page/user/address/edit'), 72 | meta: { 73 | title: '修改地址' 74 | } 75 | }, 76 | { 77 | path: '/user/favorite', 78 | component: () => import('../page/user/favorite/list'), 79 | meta: { 80 | title: '我的收藏' 81 | } 82 | }, 83 | { 84 | path: '/user/coupon', 85 | component: () => import('../page/user/coupon/list'), 86 | meta: { 87 | title: '我的优惠券' 88 | } 89 | }, 90 | { 91 | path: '/user/order', 92 | component: () => import('../page/user/order/list'), 93 | meta: { 94 | title: '我的订单' 95 | } 96 | }, 97 | { 98 | path: '/user/order/:id', 99 | component: () => import('../page/user/order/list'), 100 | meta: { 101 | title: '我的订单' 102 | } 103 | }, 104 | { 105 | path: '/user/order/info/:id', 106 | component: () => import('../page/user/order/info'), 107 | meta: { 108 | title: '我的订单' 109 | } 110 | }, 111 | { 112 | path: '/user/order/logistics/:id', 113 | component: () => import('../page/user/order/logistics'), 114 | meta: { 115 | title: '订单追踪' 116 | } 117 | }, 118 | { 119 | path: '/user/aftersale', 120 | component: () => import('../page/user/aftersale/list'), 121 | meta: { 122 | title: '售后' 123 | } 124 | }, 125 | { 126 | path: '/user/aftersale/apply', 127 | component: () => import('../page/user/aftersale/apply'), 128 | meta: { 129 | title: '申请售后' 130 | } 131 | }, 132 | { 133 | path: '/user/aftersale/detail', 134 | component: () => import('../page/user/aftersale/detail'), 135 | meta: { 136 | title: '服务单详情' 137 | } 138 | }, 139 | { 140 | path: '/user/aftersale/track/:id', 141 | component: () => import('../page/user/aftersale/track'), 142 | meta: { 143 | title: '进度详情' 144 | } 145 | }, 146 | { 147 | path: '/product/:id', 148 | component: () => import('../page/product/detail'), 149 | meta: { 150 | title: '商品详情' 151 | } 152 | }, 153 | { 154 | path: '/search', 155 | component: () => import('../page/product/list'), 156 | meta: { 157 | title: '商品列表' 158 | } 159 | }, 160 | { 161 | name: 'cart', 162 | component: () => import('../page/cart/index'), 163 | meta: { 164 | title: '购物车' 165 | } 166 | }, 167 | { 168 | path: '/order', 169 | component: () => import('../page/shipping/order'), 170 | meta: { 171 | title: '确认订单' 172 | } 173 | }, 174 | { 175 | name: 'category', 176 | component: () => import('../page/category/index'), 177 | meta: { 178 | title: '分类' 179 | } 180 | }, 181 | ]; 182 | 183 | // add route path 184 | routes.forEach(route => { 185 | route.path = route.path || '/' + (route.name || ''); 186 | }); 187 | 188 | const router = new Router({ routes }); 189 | 190 | router.beforeEach((to, from, next) => { 191 | const title = to.meta && to.meta.title; 192 | if (title) { 193 | document.title = title; 194 | } 195 | next(); 196 | }); 197 | 198 | export { 199 | router 200 | }; 201 | -------------------------------------------------------------------------------- /src/data/common/success.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | } -------------------------------------------------------------------------------- /src/data/data.js: -------------------------------------------------------------------------------- 1 | 2 | import success from './common/success.json' 3 | 4 | import GetPage from './page/GetPage.json' 5 | import PageProduct from './page/Product.json' 6 | 7 | import GetUserIndex from './user/GetUserIndex.json' 8 | import GetFavorite from './user/GetFavorite.json' 9 | 10 | import GetAddressList from './user/GetAddressList.json' 11 | import GetAddressById from './user/GetAddressById.json' 12 | 13 | import GetCoupon from './user/GetCoupon.json' 14 | 15 | export default { 16 | '/Page/GetPage':GetPage, 17 | 18 | '/Page/Product':PageProduct, 19 | 20 | 21 | 22 | '/User/GetUserIndex':GetUserIndex, 23 | '/User/GetFavorite':GetFavorite, 24 | '/User/DelFavorite':success, 25 | 26 | '/User/GetAddressList':GetAddressList, 27 | '/User/GetAddressById':GetAddressById, 28 | 29 | '/User/SaveAddress':success, 30 | '/User/DelAddress':success, 31 | 32 | '/User/GetCoupon':GetCoupon, 33 | '/User/ExchangeCoupon':success, 34 | } -------------------------------------------------------------------------------- /src/data/page/GetPage.json: -------------------------------------------------------------------------------- 1 | { 2 | "PageId": 11, 3 | "Name": "仿考拉", 4 | "BackgroundColor": "", 5 | "Sections": [ 6 | { 7 | "PageSectionId": 2511, 8 | "Code": "Search", 9 | "ParameterDictionary": { 10 | "keyword": "搜索商品", 11 | "position": "fixed", 12 | "backgroundcolor": "#f9f9f9", 13 | "color": "#999999", 14 | "textalign": "center", 15 | "boxcolor": "#ffffff", 16 | "boxtype": "2" 17 | } 18 | }, 19 | { 20 | "PageSectionId": 2512, 21 | "Code": "ImageAd", 22 | "ParameterDictionary": { 23 | "type": "1", 24 | "imagegap": "0", 25 | "shownumber": "4", 26 | "imagelist": [ 27 | { 28 | "link": "/#/search?categoryid=12", 29 | "src": "https://haitao.nos.netease.com/6BXWTT4KF3v2CCD1KVT1809182052_960_480.jpg" 30 | }, 31 | { 32 | "link": "/#/product/4", 33 | "src": "https://haitao.nosdn2.127.net/ThUbIr9WnE7TbTwTapp-kvAiT1809190053_960_480.jpg" 34 | }, 35 | { 36 | "link": "/#/product/4", 37 | "src": "https://haitao.nos.netease.com/f3kJUUtkrDbsiU1LtopkHcBGgT1809182243_960_480.jpg" 38 | }, 39 | { 40 | "link": "/#/product/4", 41 | "src": "https://haitao.nosdn2.127.net/EWQ1UI83HQ03U2TLaeShRtEhK19n7175ceTT1809191639_960_480.jpg" 42 | } 43 | ] 44 | } 45 | }, 46 | { 47 | "PageSectionId": 2513, 48 | "Code": "ImageAd", 49 | "ParameterDictionary": { 50 | "type": "2", 51 | "imagegap": "0", 52 | "shownumber": "4", 53 | "imagelist": [ 54 | { 55 | "link": "", 56 | "linkname": "", 57 | "src": "https://haitao.nos.netease.com/gr4TfN5hhFhFg1CaUgya1mdkPDLpE4WTT1806271501_1125_144.png", 58 | "title": "" 59 | } 60 | ] 61 | } 62 | }, 63 | { 64 | "PageSectionId": 2514, 65 | "Code": "ImageText", 66 | "ParameterDictionary": { 67 | "type": "1", 68 | "showtype": "1", 69 | "shownumber": "4", 70 | "color": "", 71 | "backgroundcolor": "", 72 | "imagelist": [ 73 | { 74 | "link": "", 75 | "src": "https://haitao.nos.netease.com/gefNTDIqyQsSAEtSpy222T1808221621_192_220.jpg", 76 | "title": "" 77 | }, 78 | { 79 | "link": "", 80 | "src": "https://haitao.nosdn2.127.net/NVSMWxQKvHyakuP6WruN3T1809031519_192_220.jpg", 81 | "title": "" 82 | }, 83 | { 84 | "link": "", 85 | "src": "https://haitao.nosdn1.127.net/2dWeQg9FCfC8whIZWhac4T1809031520_192_220.jpg", 86 | "title": "" 87 | }, 88 | { 89 | "link": "", 90 | "src": "https://haitao.nosdn1.127.net/kZZ6h45lVQhRZLOJPHJd1T1808171739_192_220.jpg", 91 | "title": "" 92 | }, 93 | { 94 | "link": "", 95 | "src": "https://haitao.nosdn1.127.net/VNeftDVe3h9rgEq7MtfDT1809061111_192_220.jpg", 96 | "title": "" 97 | } 98 | ] 99 | } 100 | }, 101 | { 102 | "PageSectionId": 2515, 103 | "Code": "ImageText", 104 | "ParameterDictionary": { 105 | "type": "1", 106 | "showtype": "1", 107 | "shownumber": "4", 108 | "color": "", 109 | "backgroundcolor": "", 110 | "imagelist": [ 111 | { 112 | "link": "", 113 | "src": "https://haitao.nosdn2.127.net/GvpaR0ThVvgBkgT7Vf0yxk2T1809181557_192_220.jpg", 114 | "title": "" 115 | }, 116 | { 117 | "link": "", 118 | "src": "https://haitao.nos.netease.com/EqTdbMtyfOtDzr0DtcTD90hr2T1809031521_192_220.jpg", 119 | "title": "" 120 | }, 121 | { 122 | "link": "", 123 | "src": "https://haitao.nosdn2.127.net/Bkbtx8pB7u6B5S9OCU4Eir2f1T1808171744_192_220.jpg", 124 | "title": "" 125 | }, 126 | { 127 | "link": "", 128 | "src": "https://haitao.nosdn2.127.net/PnANhp9RpFloeI9VhfPXg8T1808171745_192_220.png", 129 | "title": "" 130 | }, 131 | { 132 | "link": "", 133 | "src": "https://haitao.nos.netease.com/HT4D5CRc3ZZRsuRkeCnTT1808171746_192_220.jpg", 134 | "title": "" 135 | } 136 | ] 137 | } 138 | }, 139 | { 140 | "PageSectionId": 2516, 141 | "Code": "ImageAd", 142 | "ParameterDictionary": { 143 | "type": "2", 144 | "imagegap": "0", 145 | "shownumber": "4", 146 | "imagelist": [ 147 | { 148 | "link": "", 149 | "linkname": "", 150 | "src": "https://haitao.nosdn1.127.net/rzvfEZzFfvTgcrpb08mQgM8w5BpTwC_02T1809190045_960_251.gif", 151 | "title": "" 152 | } 153 | ] 154 | } 155 | }, 156 | { 157 | "PageSectionId": 2517, 158 | "Code": "Cube", 159 | "ParameterDictionary": { 160 | "type": "5", 161 | "imagegap": "0", 162 | "imagelist": [ 163 | { 164 | "link": "", 165 | "src": "https://haitao.nosdn2.127.net/UgGLMbgT8N2UfcbFeTw41p6TpSBEVC_03T1809190112_480_480.gif", 166 | "title": "" 167 | }, 168 | { 169 | "link": "", 170 | "src": "https://haitao.nos.netease.com/qOKOCqh4eAamM9PDxgl7tKEz8g-04-1T1809181138_480_240.jpg", 171 | "title": "" 172 | }, 173 | { 174 | "link": "", 175 | "src": "https://haitao.nos.netease.com/APF1FTPcSWKGBg42uc064xW5kR_05T1809182215_480_240.jpg", 176 | "title": "" 177 | } 178 | ] 179 | } 180 | }, 181 | { 182 | "PageSectionId": 2519, 183 | "Code": "Cube", 184 | "ParameterDictionary": { 185 | "type": "1", 186 | "imagegap": "0", 187 | "imagelist": [ 188 | { 189 | "link": "", 190 | "src": "https://haitao.nos.netease.com/b65wuwPeNGKwoKeccKhkqD6R1m_01T1809182202_480_355.gif", 191 | "title": "" 192 | }, 193 | { 194 | "link": "", 195 | "src": "https://haitao.nos.netease.com/saDSBpfhpS27uHOrPOAHH7ErSv_02T1809182202_480_355.gif", 196 | "title": "" 197 | } 198 | ] 199 | } 200 | }, 201 | { 202 | "PageSectionId": 2520, 203 | "Code": "Cube", 204 | "ParameterDictionary": { 205 | "type": "4", 206 | "imagegap": "0", 207 | "imagelist": [ 208 | { 209 | "link": "", 210 | "linkname": "", 211 | "src": "https://haitao.nosdn1.127.net/QlMddWV2hDkmMUtU919dmtkwCvQKFWTT0qf-206BcFSZ7F_19T1809191525_480_228.jpg", 212 | "title": "" 213 | }, 214 | { 215 | "link": "", 216 | "linkname": "", 217 | "src": "https://haitao.nos.netease.com/yUAxhIA12tWlsl5v919lN6CEX6A84TTy6No-20VLH2mLet_20T1809191525_480_228.jpg", 218 | "title": "" 219 | }, 220 | { 221 | "link": "", 222 | "src": "https://haitao.nos.netease.com/7Ukzzw7E0rcAv06O919w4K3DWhs0nGV5HsN-191LuUSSQQ_33T1809191353_480_305.jpg", 223 | "title": "" 224 | }, 225 | { 226 | "link": "", 227 | "linkname": "", 228 | "src": "https://haitao.nosdn1.127.net/TcWBRJmHKdW7t7oy919fSHnqbHeHcB7U3EN-191akaZTSf_34T1809191354_480_305.jpg", 229 | "title": "" 230 | } 231 | ] 232 | } 233 | }, 234 | { 235 | "PageSectionId": 2521, 236 | "Code": "ImageAd", 237 | "ParameterDictionary": { 238 | "type": "2", 239 | "imagegap": "0", 240 | "shownumber": "4", 241 | "imagelist": [ 242 | { 243 | "link": "", 244 | "src": "https://haitao.nosdn2.127.net/8v8Qd4gikpeGTMgcjingxuan_huodong111T170101801048_960_190.png", 245 | "title": "" 246 | }, 247 | { 248 | "link": "", 249 | "src": "https://haitao.nosdn1.127.net/hx0gzgVHpyeT41gmk9kURttb-960-480-7ZhaNcOET1809182240_960_480.jpg", 250 | "title": "" 251 | } 252 | ] 253 | } 254 | }, 255 | { 256 | "PageSectionId": 2521, 257 | "Code": "ImageAd", 258 | "ParameterDictionary": { 259 | "type": "2", 260 | "imagegap": "0", 261 | "shownumber": "4", 262 | "imagelist": [ 263 | { 264 | "link": "", 265 | "src": "https://haitao.nosdn1.127.net/61556274-32ef-44bf-84af-b3d4485ac157.png", 266 | "title": "" 267 | } 268 | ] 269 | } 270 | }, 271 | { 272 | "PageSectionId": 2522, 273 | "Code": "Product", 274 | "ParameterDictionary": { 275 | "type": "2", 276 | "source": "1", 277 | "showsort": "0", 278 | "shownumber": "6", 279 | "tag": "0", 280 | "showtype": "simple", 281 | "buttonvalue": "购买", 282 | "productids": "4,1,3", 283 | "productcategoryid": "", 284 | "producttagid": "" 285 | } 286 | } 287 | ] 288 | } -------------------------------------------------------------------------------- /src/data/page/Product.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 4, 4 | "title": "Naturie imju 薏仁美白保湿防晒化妆水 500毫升 我是大美人强推 ", 5 | "price": "55.00", 6 | "imageURL": "https://haitao.nos.netease.com/50c2fafd909f489e9ebd3418cd90a1711533208260850jkcgm1fq10072.jpg" 7 | }, 8 | { 9 | "id": 1, 10 | "title": "Ryo 吕 棕吕(原黄吕)防脱固发滋养 洗发水*2+护发素*1 500毫升/瓶", 11 | "price": "105.00", 12 | "imageURL": "https://haitao.nosdn2.127.net/bc977ba46ed74158b6b3386eaf27f7f81530241584513jizebvc810863.jpg" 13 | }, 14 | { 15 | "id": 3, 16 | "title": "【维持泌尿健康】Swisse 高浓度蔓越莓 30粒/瓶 2瓶", 17 | "price": "158.00", 18 | "imageURL": "https://haitao.nosdn1.127.net/onlineic1jqd6p10155.jpg" 19 | }, 20 | { 21 | "id": 5, 22 | "title": "【真正的有机糙米】EARTH'S BEST 有机纯米粉 227克", 23 | "price": "35.00", 24 | "imageURL": "https://haitao.nos.netease.com/31f78c55a2114eb5a287b38b6475e5fd1513067124727jb3d3lcr19243.jpg" 25 | }, 26 | { 27 | "id": 6, 28 | "title": "SK-II 嫩肤清莹露 160毫升", 29 | "price": "358.00", 30 | "imageURL": "https://haitao.nosdn2.127.net/insm5qxq58_800_800.jpg" 31 | }, 32 | { 33 | "id": 7, 34 | "title": "【领券立减100】SK-II小灯泡30ml套装 (小灯泡30ml+神仙水10ml+清莹露10ml+精华霜2.5g)", 35 | "price": "1286.00", 36 | "imageURL": "https://pop.nosdn.127.net/d336d1f7-670d-40b6-ab58-921012c6b176" 37 | }, 38 | { 39 | "id": 8, 40 | "title": "Apple 苹果 iPhone X 64GB 移动联通4G手机 港版", 41 | "price": "6799.00", 42 | "imageURL": "https://pop.nosdn.127.net/7936968b-3db1-441d-822b-e9616d01c0f6" 43 | }, 44 | { 45 | "id": 9, 46 | "title": "【不伤宝宝初生牙龈】HAPPY BABY 禧贝婴幼儿温和有机磨牙饼干 香蕉甘薯 48克/盒", 47 | "price": "56.00", 48 | "imageURL": "https://haitao.nos.netease.com/485c149f5ceb4d6a837a67910236048715354385972231.jpg" 49 | }, 50 | { 51 | "id": 10, 52 | "title": "Dior 迪奥 粉漾魅惑变色润唇膏 04#橘色 3.5克", 53 | "price": "179.00", 54 | "imageURL": "https://haitao.nosdn2.127.net/ix7gkb6581_800_800.jpg" 55 | }, 56 | { 57 | "id": 10, 58 | "title": "ÍpsΛ 茵芙莎 流金岁月美肤水 200毫升", 59 | "price": "328.00", 60 | "imageURL": "https://haitao.nosdn2.127.net/0938e26c883f451b9387b9daf6b5ed9d1537025125829jm3l2par10687.jpg" 61 | } 62 | ] -------------------------------------------------------------------------------- /src/data/sku.js: -------------------------------------------------------------------------------- 1 | export default { 2 | kdt_id: 55, 3 | user_id: 4674509, 4 | offline_id: 0, 5 | activity_alias: '', 6 | sku: { 7 | tree: [ 8 | { 9 | k: '颜色', 10 | k_id: '1', 11 | v: [ 12 | { 13 | id: '30349', 14 | name: '天蓝色', 15 | imgUrl: 16 | 'https://img.yzcdn.cn/upload_files/2017/02/21/FjKTOxjVgnUuPmHJRdunvYky9OHP.jpg!100x100.jpg' 17 | } 18 | ], 19 | k_s: 's1', 20 | count: 2 21 | }, 22 | { 23 | k: '尺寸', 24 | k_id: '2', 25 | v: [ 26 | { 27 | id: '1193', 28 | name: '1' 29 | }, 30 | { 31 | id: '1194', 32 | name: '2' 33 | } 34 | ], 35 | k_s: 's2', 36 | count: 2 37 | } 38 | ], 39 | list: [ 40 | { 41 | id: 2259, 42 | price: 100, 43 | discount: 100, 44 | code: '', 45 | s1: '1215', 46 | s2: '1193', 47 | s3: '0', 48 | s4: '0', 49 | s5: '0', 50 | extend: null, 51 | kdt_id: 55, 52 | discount_price: 0, 53 | stock_num: 110, 54 | stock_mode: 0, 55 | is_sell: null, 56 | combin_sku: false, 57 | goods_id: 946755 58 | }, 59 | { 60 | id: 2260, 61 | price: 100, 62 | discount: 100, 63 | code: '', 64 | s1: '1215', 65 | s2: '1194', 66 | s3: '0', 67 | s4: '0', 68 | s5: '0', 69 | extend: null, 70 | kdt_id: 55, 71 | discount_price: 0, 72 | stock_num: 0, 73 | stock_mode: 0, 74 | is_sell: null, 75 | combin_sku: false, 76 | goods_id: 946755 77 | }, 78 | { 79 | id: 2257, 80 | price: 100, 81 | discount: 100, 82 | code: '', 83 | s1: '30349', 84 | s2: '1193', 85 | s3: '0', 86 | s4: '0', 87 | s5: '0', 88 | extend: null, 89 | kdt_id: 55, 90 | discount_price: 0, 91 | stock_num: 111, 92 | stock_mode: 0, 93 | is_sell: null, 94 | combin_sku: false, 95 | goods_id: 946755 96 | }, 97 | { 98 | id: 2258, 99 | price: 100, 100 | discount: 100, 101 | code: '', 102 | s1: '30349', 103 | s2: '1194', 104 | s3: '0', 105 | s4: '0', 106 | s5: '0', 107 | extend: null, 108 | kdt_id: 55, 109 | discount_price: 0, 110 | stock_num: 6, 111 | stock_mode: 0, 112 | is_sell: null, 113 | combin_sku: false, 114 | goods_id: 946755 115 | } 116 | ], 117 | price: '1.00', 118 | market_price:'10.00', 119 | stock_num: 227, 120 | collection_id: 2261, 121 | collection_price: 0, 122 | none_sku: false, 123 | sold_num: 0, 124 | min_price: '1.00', 125 | max_price: '1.00', 126 | messages: [ 127 | ], 128 | hide_stock: false 129 | }, 130 | goods_id: '946755', 131 | alias: '2oml0r0n5vytj', 132 | quota: 15, 133 | is_virtual: '0', 134 | quota_used: 0, 135 | goods_info: { 136 | title: '测试商品', 137 | picture: 138 | 'https://img.yzcdn.cn/upload_files/2017/03/16/Fs_OMbSFPa183sBwvG_94llUYiLa.jpeg?imageView2/2/w/100/h/100/q/75/format/jpg', 139 | price: 1, 140 | origin: '' 141 | } 142 | }; -------------------------------------------------------------------------------- /src/data/user/GetAddressById.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "id": "2", 4 | "name": "李四", 5 | "tel": "13108826530", 6 | "areaCode": "712899", 7 | "addressDetail": "浙江省杭州市拱墅区莫干山路 50 号", 8 | "isDefault": false 9 | } -------------------------------------------------------------------------------- /src/data/user/GetAddressList.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": "1", 4 | "name": "张三", 5 | "tel": "13000000000", 6 | "address": "浙江省杭州市西湖区文三路 138 号东方通信大厦 7 楼 501 室" 7 | }, 8 | { 9 | "id": "2", 10 | "name": "李四", 11 | "tel": "1310000000", 12 | "address": "浙江省杭州市拱墅区莫干山路 50 号" 13 | } 14 | ] -------------------------------------------------------------------------------- /src/data/user/GetCoupon.json: -------------------------------------------------------------------------------- 1 | { 2 | "TotalPage":5, 3 | "List":[ 4 | { 5 | "Id":12, 6 | "Name":"仅可购买自营图书文娱商品", 7 | "BeginDate":"2018.09.05", 8 | "EndDate":"2018.09.28", 9 | "Condition":"满199元可用", 10 | "SignPosition":"right", 11 | "Coupon":"75", 12 | "Sign":"折", 13 | "Info":"限品类:仅可购买自营图书文娱商品" 14 | }, 15 | { 16 | "Id":13, 17 | "Name":"全品类(特例商品除外)", 18 | "BeginDate":"2018.09.05", 19 | "EndDate":"2018.09.28", 20 | "Condition":"满200元可用", 21 | "SignPosition":"left", 22 | "Coupon":"10", 23 | "Sign":"¥", 24 | "Info":"" 25 | }, 26 | { 27 | "Id":14, 28 | "Name":"运费券:京东部分自营商品", 29 | "BeginDate":"2018.09.05", 30 | "EndDate":"2018.09.28", 31 | "Condition":"部分特殊商品运费除外", 32 | "SignPosition":"left", 33 | "Coupon":"6", 34 | "Sign":"¥", 35 | "Info":"1、运费券仅可用于抵减京东自营商品订单运费,即用户下单结算时,可选择该优惠券按券面值抵减每笔结算订单中的运费;2、虚拟商品及部分特殊购物流程不可用,特殊流程如秒杀等;" 36 | } 37 | ] 38 | } -------------------------------------------------------------------------------- /src/data/user/GetFavorite.json: -------------------------------------------------------------------------------- 1 | { 2 | "TotalPage":5, 3 | "list":[ 4 | { 5 | "id":12, 6 | "imageURL":"https://pop.nosdn.127.net/19e33c9b-6c22-4a4b-96da-1cb7afb32712", 7 | "title":"BEYOND博洋家纺 床上套件 秋冬保暖纯棉床单被套 双人被罩 磨毛全棉印花床品四件套", 8 | "price":"499" 9 | }, 10 | { 11 | "id":13, 12 | "imageURL":"https://pop.nosdn.127.net/19e33c9b-6c22-4a4b-96da-1cb7afb32712", 13 | "title":"BEYOND博洋家纺 床上套件 秋冬保暖纯棉床单被套 双人被罩 磨毛全棉印花床品四件套", 14 | "price":"499" 15 | }, 16 | { 17 | "id":14, 18 | "imageURL":"https://pop.nosdn.127.net/19e33c9b-6c22-4a4b-96da-1cb7afb32712", 19 | "title":"BEYOND博洋家纺 床上套件 秋冬保暖纯棉床单被套 双人被罩 磨毛全棉印花床品四件套", 20 | "price":"499" 21 | }, 22 | { 23 | "id":15, 24 | "imageURL":"https://pop.nosdn.127.net/19e33c9b-6c22-4a4b-96da-1cb7afb32712", 25 | "title":"BEYOND博洋家纺 床上套件 秋冬保暖纯棉床单被套 双人被罩 磨毛全棉印花床品四件套", 26 | "price":"499" 27 | }, 28 | { 29 | "id":16, 30 | "imageURL":"https://pop.nosdn.127.net/19e33c9b-6c22-4a4b-96da-1cb7afb32712", 31 | "title":"BEYOND博洋家纺 床上套件 秋冬保暖纯棉床单被套 双人被罩 磨毛全棉印花床品四件套", 32 | "price":"499" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /src/data/user/GetUserIndex.json: -------------------------------------------------------------------------------- 1 | { 2 | "UserName":"Yrin", 3 | "Avatar":"http://haitao.nos.netease.com/ZnB0PM5xDzXZ2FeVlmT170102401021_150_150.png", 4 | "UnPayTotal":1, 5 | "UnRecieveTotal":2, 6 | "AfterSaleTotal":3 7 | } -------------------------------------------------------------------------------- /src/data/user/SaveAddress: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yrinleung/openshopping-vue/b2f51c0ab9a246a61ff93ac2302259c976164fd9/src/data/user/SaveAddress -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | 2 | import Vue from 'vue'; 3 | import { router } from './config/router'; 4 | import './config/rem'; 5 | import App from './App.vue'; 6 | import VueLazyload from 'vue-lazyload' 7 | import components from './config/components.js'; 8 | Vue.use(components); 9 | 10 | Vue.use(VueLazyload) 11 | 12 | new Vue({ 13 | router, 14 | el: '#app', 15 | render: h => h(App) 16 | }); -------------------------------------------------------------------------------- /src/page/account/login.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 32 | 33 | 68 | -------------------------------------------------------------------------------- /src/page/account/password.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 28 | 29 | 32 | -------------------------------------------------------------------------------- /src/page/account/phonelogin.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 31 | 32 | 35 | -------------------------------------------------------------------------------- /src/page/account/register.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 35 | 36 | 39 | -------------------------------------------------------------------------------- /src/page/activity/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/page/cart/index.vue: -------------------------------------------------------------------------------- 1 | 90 | 91 | 152 | 153 | -------------------------------------------------------------------------------- /src/page/category/index.vue: -------------------------------------------------------------------------------- 1 | 74 | 75 | 101 | 102 | 181 | -------------------------------------------------------------------------------- /src/page/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/page/page/page.vue: -------------------------------------------------------------------------------- 1 | 28 | 74 | -------------------------------------------------------------------------------- /src/page/product/detail.vue: -------------------------------------------------------------------------------- 1 | 165 | 166 | 256 | 257 | -------------------------------------------------------------------------------- /src/page/product/list.vue: -------------------------------------------------------------------------------- 1 | 171 | 172 | 248 | 249 | 405 | -------------------------------------------------------------------------------- /src/page/shipping/order.vue: -------------------------------------------------------------------------------- 1 | 56 | 57 | 114 | 115 | 185 | -------------------------------------------------------------------------------- /src/page/user/address/edit.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 59 | 60 | 65 | -------------------------------------------------------------------------------- /src/page/user/address/list.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 58 | 59 | 66 | -------------------------------------------------------------------------------- /src/page/user/aftersale/apply.vue: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 31 | 32 | 33 | 34 | 35 |
36 | 37 | 38 |
39 |
40 | 41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 提交 50 | 51 | 53 | 54 |
55 | 56 | 57 | 123 | 124 | 144 | -------------------------------------------------------------------------------- /src/page/user/aftersale/detail.vue: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 提交申请 6 | 客服审核 7 | 客户确认 8 | 仓库收货 9 | 完成 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 |
18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 |
31 | 32 | 33 | 57 | 58 | 61 | -------------------------------------------------------------------------------- /src/page/user/aftersale/list.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 88 | 89 | 100 | -------------------------------------------------------------------------------- /src/page/user/aftersale/track.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 31 | 32 | 35 | -------------------------------------------------------------------------------- /src/page/user/coupon/list.vue: -------------------------------------------------------------------------------- 1 | 138 | 139 | 233 | 234 | 359 | -------------------------------------------------------------------------------- /src/page/user/favorite/list.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 72 | 73 | 88 | -------------------------------------------------------------------------------- /src/page/user/index.vue: -------------------------------------------------------------------------------- 1 | 83 | 84 | 102 | 103 | -------------------------------------------------------------------------------- /src/page/user/info/detail.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /src/page/user/order/info.vue: -------------------------------------------------------------------------------- 1 | 48 | 49 | 73 | 74 | 111 | -------------------------------------------------------------------------------- /src/page/user/order/list.vue: -------------------------------------------------------------------------------- 1 | 44 | 45 | 135 | 136 | 177 | -------------------------------------------------------------------------------- /src/page/user/order/logistics.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 41 | 42 | 45 | --------------------------------------------------------------------------------