-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/njison/b2bmall
- Loading branch information
Showing
7 changed files
with
42 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
<router-link to="/home"> | ||
<div class="headerLeft clear-fix"> | ||
<div class="logo-box"> | ||
<img src="/static/images/CMlogo.png" alt=""> | ||
<img src="../../static/images/CMlogo.png" alt=""> | ||
</div> | ||
<div class="logo-text"> | ||
<h1> 辽宁移动零售库存系统</h1> | ||
|
@@ -210,7 +210,13 @@ | |
}) | ||
} | ||
}, | ||
message (m) { | ||
messageSuccess (m) { | ||
this.$message({ | ||
message: m, | ||
type: 'success' | ||
}) | ||
}, | ||
messageError (m) { | ||
this.$message.error({ | ||
message: m | ||
}) | ||
|
@@ -311,10 +317,10 @@ | |
cartDel(cartDelParams).then(res => { | ||
if (res.code=='success') { | ||
this.message('删除成功!') | ||
this.messageSuccess('删除成功!') | ||
this.EDIT_CART({goodsId}) | ||
} else { | ||
this.message('删除失败!') | ||
this.messageError('删除失败!') | ||
} | ||
}) | ||
|
@@ -533,7 +539,7 @@ | |
/*display: flex;*/ | ||
align-items: center; | ||
a { | ||
background: url(/static/images/[email protected]) no-repeat 50%; | ||
background: url(../../static/images/[email protected]) no-repeat 50%; | ||
background-size: cover; | ||
display: block; | ||
@include wh(50px, 40px); | ||
|
@@ -645,7 +651,7 @@ | |
left: 8px; | ||
top: 0; | ||
@include wh(20px); | ||
background: url(/static/images/[email protected]) -155px 0; | ||
background: url(../../static/images/[email protected]) -155px 0; | ||
background-size: 240px 107px; | ||
transition: none; | ||
} | ||
|
@@ -744,7 +750,7 @@ | |
display: block; | ||
@include wh(30px, 100%); | ||
content: " "; | ||
background: url(/static/images/[email protected]) 0 -22px; | ||
background: url(../../static/images/[email protected]) 0 -22px; | ||
background-size: 240px 107px; | ||
background-position: -150px -22px; | ||
} | ||
|
@@ -990,7 +996,7 @@ | |
&:before { | ||
position: absolute; | ||
content: " "; | ||
background: url(/static/images/[email protected]) no-repeat -49px -43px; | ||
background: url(../../static/images/[email protected]) no-repeat -49px -43px; | ||
background-size: 240px 107px; | ||
@include wh(20px, 8px); | ||
top: -8px; | ||
|
@@ -1115,7 +1121,7 @@ | |
top: 50%; | ||
width: 76px; | ||
height: 62px; | ||
background: url("/static/images/cart-empty-new.png") no-repeat; | ||
background: url("../../static/images/cart-empty-new.png") no-repeat; | ||
background-size: cover; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,9 @@ | |
<div class="cart-top-items"> | ||
<div class="cart-items clearfix"> | ||
<!--勾选--> | ||
<div class="items-choose" @click="editCart('check',item)"> | ||
<span class="blue-checkbox-new " v-if="item.checked==0"></span> | ||
<span class="blue-checkbox-new checkbox-on" v-if="item.checked==1"></span> | ||
<div class="items-choose"> | ||
<span class="blue-checkbox-new " :class="{'checkbox-on':item.checked === '1'}" | ||
@click="editCart('check',item)"></span> | ||
</div> | ||
<!--图片--> | ||
<div class="items-thumb fl"> | ||
|
@@ -172,9 +172,9 @@ | |
checkPrice () { | ||
var totalPrice = 0 | ||
this.cartList && this.cartList.forEach(item => { | ||
if (item.checked == '1' && this.chanelType===4) { | ||
if (item.checked == '1' && this.chanelType === 4) { | ||
totalPrice += (item.goodsNum * item.goodsShipPrice) | ||
}else if (item.checked == '1' && this.chanelType!=4) { | ||
} else if (item.checked == '1' && this.chanelType != 4) { | ||
totalPrice += (item.goodsNum * item.goodsSettlePrice) | ||
} | ||
}) | ||
|
@@ -192,7 +192,13 @@ | |
} | ||
}, | ||
methods: { | ||
message (m) { | ||
messageSuccess (m) { | ||
this.$message({ | ||
message: m, | ||
type: 'success' | ||
}) | ||
}, | ||
messageError (m) { | ||
this.$message.error({ | ||
message: m | ||
}) | ||
|
@@ -206,9 +212,9 @@ | |
// 全选 | ||
editCheckAll () { | ||
let checkAll = !this.checkAllFlag | ||
editCheckAll({userId: this.userId, checked: checkAll}).then(res => { | ||
// editCheckAll({userId: this.userId, checked: checkAll}).then(res => { | ||
this.EDIT_CART({checked: checkAll}) | ||
}) | ||
// }) | ||
}, | ||
// 修改购物车 | ||
_cartEdit (cartParams, goodsId, goodsNum, checked) { | ||
|
@@ -227,21 +233,13 @@ | |
// 修改购物车 | ||
editCart (type, item) { | ||
item.checked=!item.checked | ||
if (type && item) { | ||
let checked = item.checked | ||
let goodsId = item.goodsId | ||
let goodsNum = item.goodsNum | ||
// console.log('checked='+ checked) | ||
// 勾选 | ||
if (type === 'check') { | ||
let newChecked = '' | ||
if(checked==false){ | ||
newChecked ='0' | ||
}else{ | ||
newChecked ='1' | ||
} | ||
// let newChecked = checked === '1' ? '0' : '1' | ||
let newChecked = checked === '1' ? '0' : '1' | ||
let cartParams = { | ||
cartDto : { | ||
userId: getStore('userId'), | ||
|
@@ -250,8 +248,7 @@ | |
checked: newChecked | ||
} | ||
} | ||
// console.log(newChecked) | ||
this._cartEdit(cartParams, goodsId, goodsNum, checked) | ||
this._cartEdit(cartParams, goodsId, goodsNum, newChecked) | ||
} | ||
} else { | ||
console.log('缺少所需参数') | ||
|
@@ -267,6 +264,7 @@ | |
checked: checked | ||
} | ||
} | ||
console.log(checked) | ||
this._cartEdit(cartParams, goodsId, goodsNum, checked) | ||
}, | ||
// 删除整条购物车 | ||
|
@@ -280,9 +278,9 @@ | |
cartDel(cartDelParams).then(res => { | ||
if (res.code=='success') { | ||
this.EDIT_CART({goodsId}) | ||
this.message('删除成功!') | ||
this.messageSuccess('删除成功!') | ||
} else { | ||
this.message('删除失败!') | ||
this.messageError('删除失败!') | ||
} | ||
}) | ||
|
@@ -599,7 +597,7 @@ | |
.cart-e { | ||
margin: 0 auto; | ||
background: url("/static/images/[email protected]") no-repeat; | ||
background: url("../../../static/images/[email protected]") no-repeat; | ||
width: 275px; | ||
height: 300px; | ||
color: #8d8d8d; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters