Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
lijing
8 years ago
Commit
5e58c3a86934d04e410be3fc955629551eebc8b8
1 parent
589659f0
开发完成
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
12 deletions
apps/cart/models/index.js
apps/cart/views/action/index.hbs
package.json
public/build/webpack.dev.config.js
public/hbs/cart/index/cart-content.hbs
utils/cart-process.js
apps/cart/models/index.js
View file @
5e58c3a
...
...
@@ -21,7 +21,8 @@ const indexData = (uid, shoppingKey, saleChannel, cartType) => {
method
:
'app.Shopping.queryCart'
,
uid
:
uid
,
shopping_key
:
shoppingKey
,
sale_channel
:
saleChannel
sale_channel
:
saleChannel
,
is_support_mlp
:
'Y'
}).
then
((
data
)
=>
{
return
data
.
code
===
200
?
cartProcess
.
processData
(
data
,
cartType
)
:
void
0
;
});
...
...
@@ -40,7 +41,8 @@ const selectGood = (uid, sku, shoppingKey, cartType) => {
method
:
'app.Shopping.selectedAndQryCart'
,
product_sku_list
:
sku
,
uid
:
uid
,
shopping_key
:
shoppingKey
shopping_key
:
shoppingKey
,
is_support_mlp
:
'Y'
}).
then
((
data
)
=>
{
return
data
.
code
===
200
?
cartProcess
.
processData
(
data
,
cartType
)
:
void
0
;
});
...
...
@@ -59,7 +61,8 @@ const removeFromCart = (uid, sku, shoppingKey, cartType) => {
method
:
'app.Shopping.removeAndQryCart'
,
product_sku_list
:
sku
,
uid
:
uid
,
shopping_key
:
shoppingKey
shopping_key
:
shoppingKey
,
is_support_mlp
:
'Y'
}).
then
((
data
)
=>
{
return
data
.
code
===
200
?
cartProcess
.
processData
(
data
,
cartType
)
:
void
0
;
});
...
...
@@ -170,7 +173,8 @@ const addToFav = (uid, sku, shoppingKey, cartType) => {
method
:
'app.Shopping.addfavoriteAndQryCart'
,
product_sku_list
:
sku
,
uid
:
uid
,
shopping_key
:
shoppingKey
shopping_key
:
shoppingKey
,
is_support_mlp
:
'Y'
}).
then
((
data
)
=>
{
return
data
.
code
===
200
?
cartProcess
.
processData
(
data
,
cartType
)
:
void
0
;
});
...
...
apps/cart/views/action/index.hbs
View file @
5e58c3a
...
...
@@ -8,8 +8,8 @@
</p>
{{/
unless
}}
<div
class=
"cart-box"
>
</div>
<div
class=
"recommend-for-you box hide"
></div>
<div
class=
"recommend-for-you box hide"
></div>
<div
id=
"chose-panel"
></div>
</div>
...
...
package.json
View file @
5e58c3a
...
...
@@ -50,7 +50,7 @@
"xml2js"
:
"^0.4.17"
,
"yoho-express-session"
:
"^2.0.0"
,
"yoho-md5"
:
"^2.0.0"
,
"yoho-node-lib"
:
"=0.2.2
2
"
,
"yoho-node-lib"
:
"=0.2.2
5
"
,
"yoho-zookeeper"
:
"^1.0.8"
},
"devDependencies"
:
{
...
...
@@ -95,7 +95,7 @@
"vue-loader"
:
"^11.3.4"
,
"vue-template-compiler"
:
"^2.2.6"
,
"webpack"
:
"^2.3.3"
,
"webpack-dev-server"
:
"^2.4.
2
"
,
"webpack-dev-server"
:
"^2.4.
5
"
,
"webpack-uglify-parallel"
:
"^0.1.3"
,
"yoho-cookie"
:
"^1.2.0"
,
"yoho-fastclick"
:
"^1.0.6"
,
...
...
public/build/webpack.dev.config.js
View file @
5e58c3a
...
...
@@ -27,7 +27,7 @@ _.mergeWith(baseConfig, {
}]
},
devServer
:
{
host
:
'0.0.0.0'
,
host
:
devInfo
.
host
,
port
:
devInfo
.
port
,
publicPath
:
devInfo
.
publicPath
,
contentBase
:
[
path
.
join
(
__dirname
,
'./bundle/'
),
path
.
join
(
__dirname
,
'../'
)],
...
...
public/hbs/cart/index/cart-content.hbs
View file @
5e58c3a
...
...
@@ -99,7 +99,7 @@
{{#
offShelveGoods
}}
{{>
cart-good
}}
{{/
offShelveGoods
}}
<div
class=
"remove-all"
>
<button
class=
"btn btn-remove"
>
清空失效商品
</button>
</div>
...
...
@@ -139,4 +139,4 @@
</div>
<button
class=
"btn btn-red btn-balance"
>
结算
</button>
</div>
</div>
\ No newline at end of file
</div>
...
...
utils/cart-process.js
View file @
5e58c3a
...
...
@@ -219,7 +219,7 @@ const formatPromotion = (promo) => {
conditionUnit
:
promo
.
condition_unit
,
conditionValue
:
promo
.
condition_value
,
giftPrice
:
promo
.
gift_price
,
promotionId
:
promo
.
promotion_id
,
promotionId
:
_
.
get
(
promo
,
'ts_promotion_ids[0]'
,
0
)
,
promotionOriginTitle
:
promo
.
promotion_title
,
promotionTitle
:
formatPromotionTitle
(
promo
),
promotionType
:
promo
.
promotion_type
,
...
...
Please
register
or
login
to post a comment