Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
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
Plain Diff
Browse Files
Authored by
uedxwg
9 years ago
Commit
8637dda71b7b4ab0732b69a37da0c00218e188f7
2 parents
9541de21
9c67f7c3
Merge branch 'develop' of
http://git.dev.yoho.cn/web/yohobuy
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
30 additions
and
21 deletions
library/Action/AbstractAction.php
library/Plugin/Helpers.php
static/js/cart/cart.js
static/js/cart/chose-panel.js
static/js/cart/order-ensure.js
static/sass/cart/_index.scss
template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
template/m.yohobuy.com/partials/cart/cart-content.phtml
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Reg.php
library/Action/AbstractAction.php
View file @
8637dda
...
...
@@ -376,8 +376,8 @@ class AbstractAction extends Controller_Abstract
* 设置网站SEO的描述内容
*
* @param string $description 描述内容
* @param string $sign 连接的字符串
* @param bool $showMore 是否显示更多内容
* @param string $sign 连接的字符串
* @return void
*/
protected
function
setDescription
(
$description
,
$showMore
=
true
,
$sign
=
' '
)
...
...
library/Plugin/Helpers.php
View file @
8637dda
...
...
@@ -579,7 +579,8 @@ class Helpers
$oneGoods
[
'color'
]
=
$value
[
'color_name'
];
$oneGoods
[
'size'
]
=
$value
[
'size_name'
];
$oneGoods
[
'checked'
]
=
$value
[
'selected'
]
===
'Y'
;
$oneGoods
[
'price'
]
=
self
::
transPrice
(
$value
[
'sales_price'
]);
$oneGoods
[
'price'
]
=
self
::
transPrice
(
$value
[
'last_vip_price'
]);
$oneGoods
[
'isVipPrice'
]
=
$value
[
'sales_price'
]
!==
$value
[
'last_vip_price'
];
$oneGoods
[
'count'
]
=
$value
[
'buy_number'
];
if
(
$isValid
)
{
// 库存不足
...
...
static/js/cart/cart.js
View file @
8637dda
...
...
@@ -65,6 +65,11 @@ $('.freebie').on('touchend', function() {
});
$
(
'.btn-balance'
).
on
(
'touchend'
,
function
()
{
if
(
$
(
'.low-stocks'
).
length
>
0
)
{
tip
.
show
(
'请先删除库存不足商品'
);
return
false
;
}
if
(
hasChecked
)
{
window
.
location
.
href
=
'/cart/index/orderEnsure?cartType='
+
cartType
;
}
else
{
...
...
static/js/cart/chose-panel.js
View file @
8637dda
...
...
@@ -119,7 +119,7 @@ function resetColorZeroStock($siblingBlock) {
// 选择了颜色切换商品图片
function
changeGoodImgWhenClickColor
()
{
if
(
hasChooseColor
&&
curColorIndex
)
{
if
(
hasChooseColor
&&
curColorIndex
>=
0
)
{
$imgsThumb
.
addClass
(
'hide'
).
eq
(
curColorIndex
).
removeClass
(
'hide'
);
}
}
...
...
static/js/cart/order-ensure.js
View file @
8637dda
...
...
@@ -93,8 +93,7 @@ function orderCompute() {
}).
then
(
function
(
res
)
{
var
priceHtml
;
if
(
!
res
)
{
tip
.
show
(
'网络出错'
);
if
(
!
res
.
length
)
{
window
.
location
.
reload
();
}
else
{
/*if (res.order_amount) {
...
...
@@ -106,8 +105,12 @@ function orderCompute() {
if
(
res
.
last_order_amount
)
{
res
.
last_order_amount
=
(
+
res
.
last_order_amount
).
toFixed
(
2
);
}
$coinCheck
.
find
(
'em'
).
html
(
'- ¥ '
+
res
.
use_yoho_coin
);
$coinUsed
.
html
(
'已抵¥'
+
res
.
use_yoho_coin
);
if
(
res
.
use_yoho_coin
)
{
$coinCheck
.
find
(
'em'
).
html
(
'- ¥ '
+
res
.
use_yoho_coin
);
$coinUsed
.
html
(
'已抵¥'
+
res
.
use_yoho_coin
);
$coinCheck
.
find
(
'em'
).
show
();
$coinUsed
.
show
();
}
priceHtml
=
priceTmpl
({
cartPayData
:
res
.
promotion_formula_list
,
price
:
res
.
last_order_amount
...
...
@@ -116,7 +119,6 @@ function orderCompute() {
$price
.
html
(
priceHtml
);
}
}).
fail
(
function
()
{
tip
.
show
(
'网络出错'
);
window
.
location
.
reload
();
});
}
...
...
@@ -163,7 +165,6 @@ function submitOrder() {
var
url
;
if
(
!
res
)
{
loading
.
hideLoadingMask
();
tip
.
show
(
'网络出错'
);
return
;
}
...
...
@@ -177,13 +178,13 @@ function submitOrder() {
}
window
.
setCookie
(
'order-info'
,
''
);
window
.
location
.
href
=
url
;
}
else
{
loading
.
hideLoadingMask
();
tip
.
show
(
res
.
message
||
'网络出错'
);
}
else
if
(
res
.
message
)
{
tip
.
show
(
res
.
message
);
}
}).
fail
(
function
()
{
loading
.
hideLoadingMask
();
tip
.
show
(
'网络出错'
);
}).
always
(
function
()
{
loading
.
hideLoadingMask
();
});
}
...
...
@@ -215,9 +216,7 @@ $('.coin').on('touchend', function() {
if
(
$this
.
find
(
'.checkbox'
).
hasClass
(
'icon-cb-checked'
))
{
orderInfo
(
'yohoCoin'
,
$this
.
data
(
'yoho-coin'
));
$this
.
find
(
'.coin-check em'
).
show
();
$this
.
find
(
'.can-use'
).
hide
();
$this
.
find
(
'.used'
).
show
();
}
else
{
orderInfo
(
'yohoCoin'
,
0
);
$this
.
find
(
'.coin-check em'
).
hide
();
...
...
static/sass/cart/_index.scss
View file @
8637dda
...
...
@@ -120,7 +120,7 @@
.freebie-and-advance-buy
{
padding
:
20rem
/
$pxConvertRem
;
font-size
:
24rem
/
$pxConvertRem
;
border-bottom
:
1px
solid
#e0e0e0
;
//
border-bottom: 1px solid #e0e0e0;
>
li
{
box-sizing
:
border-box
;
...
...
@@ -152,6 +152,7 @@
}
.activity-title
{
border-top
:
1px
solid
#e0e0e0
;
font-size
:
32rem
/
$pxConvertRem
;
padding
:
20rem
/
$pxConvertRem
20rem
/
$pxConvertRem
0
;
}
...
...
template/m.yohobuy.com/actions/cart/index/order-ensure.phtml
View file @
8637dda
...
...
@@ -110,7 +110,7 @@
</ul>
<form
id=
"msg"
action=
""
method=
"post"
>
<
textarea
name=
"msg"
rows=
"2"
maxlength=
"40"
placeholder=
"留言"
>
{
{msg
}
}</textarea
>
<
input
type=
"text"
name=
"msg"
value=
"{{msg}}"
maxlength=
"40"
placeholder=
"留言"
>
</form>
</section>
...
...
template/m.yohobuy.com/partials/cart/cart-content.phtml
View file @
8637dda
...
...
@@ -42,6 +42,7 @@
{{/if}}
{{/ promotionInfo}}
{{#if promotionInfo}}
<div class="activity">
<ul>
{{# promotionInfo}}
...
...
@@ -49,6 +50,7 @@
{{/ promotionInfo}}
</ul>
</div>
{{/if}}
<div class="price-compute">
<p>
...
...
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
8637dda
...
...
@@ -413,6 +413,7 @@ class CartModel
//gift=>是否赠品,advanceBuy=>是否加价购;
if
(
$single
[
'goods_type'
]
==
'gift'
&&
!
isset
(
$single
[
'isAdvanceBuy'
]))
{
$oneGoods
[
'gift'
]
=
true
;
$oneGoods
[
'price'
]
=
Helpers
::
transPrice
(
$single
[
'sale_price'
]);
}
elseif
(
$single
[
'goods_type'
]
==
'price_gift'
)
{
$oneGoods
[
'advanceBuy'
]
=
true
;
$oneGoods
[
'price'
]
=
Helpers
::
transPrice
(
$single
[
'sale_price'
]);
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Login.php
View file @
8637dda
...
...
@@ -26,7 +26,7 @@ class LoginController extends AbstractAction
$data
=
array
(
'loginIndex'
=>
true
,
// 模板中使用JS的标识
'backUrl'
=>
'
/
'
,
// 返回的URL链接
'backUrl'
=>
'
javascript:history.go(-1)
'
,
// 返回的URL链接
'showHeaderImg'
=>
true
,
// 控制显示头部图片
'isPassportPage'
=>
true
,
// 模板中模块标识
'registerUrl'
=>
'/reg.html'
,
// 注册的URL链接
...
...
@@ -56,7 +56,7 @@ class LoginController extends AbstractAction
$data
=
array
();
$data
[
'loginInternational'
]
=
true
;
// 模板中使用JS的标识
$data
[
'backUrl'
]
=
'
/
'
;
// 返回的URL链接
$data
[
'backUrl'
]
=
'
javascript:history.go(-1)
'
;
// 返回的URL链接
$data
[
'headerText'
]
=
'登录'
;
// 头部信息
$data
[
'isPassportPage'
]
=
true
;
// 模板中模块标识
$data
[
'areaCode'
]
=
'+86'
;
// 默认区号
...
...
yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Reg.php
View file @
8637dda
...
...
@@ -19,7 +19,7 @@ class RegController extends AbstractAction
$data
=
array
();
$data
[
'regIndex'
]
=
true
;
// 模板中使用JS的标识
$data
[
'backUrl'
]
=
'
/
'
;
// 返回的URL链接
$data
[
'backUrl'
]
=
'
javascript:history.go(-1)
'
;
// 返回的URL链接
$data
[
'headerText'
]
=
'注册'
;
// 头部信息
$data
[
'isPassportPage'
]
=
true
;
// 模板中模块标识
$data
[
'areaCode'
]
=
'+86'
;
// 默认的区号
...
...
@@ -56,7 +56,7 @@ class RegController extends AbstractAction
$data
=
array
(
'regCode'
=>
true
,
// 模板中使用JS的标识
'backUrl'
=>
'/
'
,
// 返回的URL链接
'backUrl'
=>
SITE_MAIN
.
'/?go=1
'
,
// 返回的URL链接
'headerText'
=>
'注册'
,
// 头部信息
'isPassportPage'
=>
true
,
// 模板中模块标识
'areaCode'
=>
'+'
.
$area
,
// 地区编号
...
...
Please
register
or
login
to post a comment