Skip to content

Commit

Permalink
goods
Browse files Browse the repository at this point in the history
  • Loading branch information
yucccc committed Jul 12, 2017
1 parent 2559703 commit 2894933
Show file tree
Hide file tree
Showing 22 changed files with 559 additions and 338 deletions.
3 changes: 2 additions & 1 deletion build/webpack.base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ module.exports = {
'/page': resolve('src/page'),
'/common': resolve('src/common'),
'/assets': resolve('src/assets'),
'/api': resolve('src/api')
'/api': resolve('src/api'),
'/utils': resolve('src/utils')
}
},
module: {
Expand Down
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<head>
<meta charset="utf-8">
<title>电子商城</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="wap-font-scale" content="no">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
</head>
<body>
<div id="app"></div>
Expand Down
4 changes: 4 additions & 0 deletions src/api/goods.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ import http from './public'
export const getComputer = (params) => {
return http.fetchGet('/goods/computer', params)
}
// 未登录获取购物车
export const getCartList = (params) => {
return http.fetchPost('/users/cartList', params)
}
14 changes: 14 additions & 0 deletions src/assets/style/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,17 @@
text-overflow: ellipsis;
white-space: nowrap;
}

// 删除按钮
.del-btn {
display: block;
cursor: pointer;
width: 20px;
height: 20px;
background: url(/static/images/[email protected]) -50px -60px no-repeat;
background-size: 240px 107px;
text-indent: -9999em;
&:hover {
background-position: -75px -60px;
}
}
2 changes: 1 addition & 1 deletion src/assets/style/mixin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
justify-content: center;
}

@mixin wh($w,$h) {
@mixin wh($w,$h:$w) {
width: $w;
height: $h;
}
Loading

0 comments on commit 2894933

Please sign in to comment.