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
Email Patches
Plain Diff
Browse Files
Authored by
周少峰
9 years ago
Commit
d4d18b95dd59edbc4c58e9c781d5279cc155d7cb
1 parent
37ecb0ec
remove tickets pay success
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
9 deletions
library/Configs/TicketsConfig.php
library/LibModels/Wap/Home/CartData.php
library/Plugin/Helpers.php
static/js/cart/chose-panel.js
static/js/cart/order-ensure.js
template/m.yohobuy.com/actions/shopping/pay/tickets.phtml
yohobuy/m.yohobuy.com/application/models/Home/Order.php
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
library/Configs/TicketsConfig.php
0 → 100644
View file @
d4d18b9
<?php
namespace
Configs
;
/**
* 门票配置文件
*/
class
TicketsConfig
{
//展览票skn
const
SINGLE_TICKETS_SKN
=
51257528
;
//套票skn
const
PACKAGE_TICKETS_SKN
=
51257524
;
}
...
...
library/LibModels/Wap/Home/CartData.php
View file @
d4d18b9
...
...
@@ -486,8 +486,7 @@ class CartData
$param
[
'buy_number'
]
=
$buyNumber
;
$param
[
'use_yoho_coin'
]
=
$useYohoCoin
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
// return Yohobuy::get(API_URL, $param);
return
Yohobuy
::
get
(
'http://devapi.yoho.cn:58078'
,
$param
);
return
Yohobuy
::
get
(
API_URL
,
$param
);
}
/**
...
...
@@ -511,7 +510,6 @@ class CartData
$param
[
'use_yoho_coin'
]
=
$useYohoCoin
;
$param
[
'qhy_union'
]
=
$qhyUnion
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
// return Yohobuy::get(API_URL, $param);
return
Yohobuy
::
get
(
'http://devapi.yoho.cn:58078'
,
$param
);
return
Yohobuy
::
get
(
API_URL
,
$param
);
}
}
...
...
library/Plugin/Helpers.php
View file @
d4d18b9
...
...
@@ -2,6 +2,7 @@
namespace
Plugin
;
use
Configs\TicketsConfig
;
/**
* 辅助类
*/
...
...
@@ -651,6 +652,11 @@ class Helpers
//门票
if
(
$tickets
)
{
//展览票不显示区域
if
(
$vo
[
'product_skn'
]
==
TicketsConfig
::
SINGLE_TICKETS_SKN
)
{
unset
(
$arr
[
$key
][
'size'
]);
}
$arr
[
$key
][
'tickets'
]
=
true
;
}
}
...
...
static/js/cart/chose-panel.js
View file @
d4d18b9
...
...
@@ -372,7 +372,7 @@ $yohoPage.on('touchstart', '.color-list .block', function() {
//展览票
if
(
ticketsLimit
&&
single
)
{
//选中日期
$curSizeBlock
=
$
(
'.size-list .size-row .block'
).
eq
(
1
);
$curSizeBlock
=
$
(
'.size-list .size-row .block'
).
eq
(
index
+
1
);
$curSizeBlock
.
addClass
(
'chosed'
);
// 显示剩余数量
displayGoodNum
(
$curColorBlock
.
data
(
'num'
));
...
...
static/js/cart/order-ensure.js
View file @
d4d18b9
...
...
@@ -278,7 +278,7 @@ $('.dispatch-time').on('touchend', 'li', function() {
$
(
'.coin'
).
on
(
'touchend'
,
function
()
{
var
$this
=
$
(
this
);
if
(
$this
.
find
(
'.checkbox'
).
hasClass
(
'icon-cb-radio'
))
{
orderInfo
(
'yohoCoin'
,
$this
.
data
(
'yoho-coin'
));
$this
.
find
(
'.can-use'
).
hide
();
...
...
template/m.yohobuy.com/actions/shopping/pay/tickets.phtml
0 → 100644
View file @
d4d18b9
yohobuy/m.yohobuy.com/application/models/Home/Order.php
View file @
d4d18b9
...
...
@@ -66,6 +66,7 @@ class OrderModel
$result
=
array
();
//调用接口获得数据
$data
=
OrderData
::
getOrderData
(
$type
,
$page
,
$limit
,
$gender
,
$yh_channel
,
$uid
);
// 判断是否还有数据, 没有数据则返回空
if
(
isset
(
$data
[
'data'
][
'page_total'
])
&&
$page
>
$data
[
'data'
][
'page_total'
])
{
return
$result
;
...
...
@@ -87,7 +88,8 @@ class OrderModel
$result
[
$key
][
'shippingCost'
]
=
$vo
[
'shipping_cost'
];
}
//类内调用格式化订单商品数据方法
$result
[
$key
][
'goods'
]
=
Helpers
::
formatOrderGoods
(
$vo
[
'order_goods'
],
$count
);
$tickets
=
isset
(
$vo
[
'virtual_type'
])
&&
$vo
[
'virtual_type'
]
==
3
?
true
:
false
;
$result
[
$key
][
'goods'
]
=
Helpers
::
formatOrderGoods
(
$vo
[
'order_goods'
],
$count
,
false
,
$tickets
);
$result
[
$key
][
'detailUrl'
]
=
Helpers
::
url
(
'/home/orderdetail'
,
array
(
'order_code'
=>
$vo
[
'order_code'
]));
$result
[
$key
][
'count'
]
=
$count
;
//倒计时时间
...
...
yohobuy/m.yohobuy.com/application/models/Index/Cart.php
View file @
d4d18b9
...
...
@@ -7,6 +7,7 @@ use LibModels\Wap\Home\OrderData;
use
Plugin\Helpers
;
use
Plugin\Images
;
use
Plugin\UdpLog
;
use
Configs\TicketsConfig
;
/**
...
...
@@ -1125,7 +1126,7 @@ class CartModel
//商品数据
//门票skn
$ticketsSkn
=
array
(
'single'
=>
51257528
,
'package'
=>
51257524
);
$ticketsSkn
=
array
(
'single'
=>
TicketsConfig
::
SINGLE_TICKETS_SKN
,
'package'
=>
TicketsConfig
::
PACKAGE_TICKETS_SKN
);
$goodsPrice
=
0
;
foreach
(
$data
[
'data'
][
'goods_list'
]
as
$key
=>
$single
)
{
$oneGoods
=
array
();
...
...
yohobuy/m.yohobuy.com/application/models/Product/Detail.php
View file @
d4d18b9
...
...
@@ -6,6 +6,7 @@ use LibModels\Wap\Product\DetailData;
use
Plugin\DataProcess\CouponFloorProcess
;
use
Plugin\Helpers
;
use
Plugin\Images
;
use
Configs\TicketsConfig
;
/**
* 商品详情页模板相关的数据模型
...
...
@@ -365,7 +366,7 @@ class DetailModel
$result
[
'id'
]
=
$productId
;
//虚拟商品(门票)
$ticketsSkn
=
array
(
'single'
=>
51257528
,
'package'
=>
51257524
);
$ticketsSkn
=
array
(
'single'
=>
TicketsConfig
::
SINGLE_TICKETS_SKN
,
'package'
=>
TicketsConfig
::
PACKAGE_TICKETS_SKN
);
if
(
$baseInfo
[
'attribute'
]
==
3
&&
in_array
(
$baseInfo
[
'productPriceBo'
][
'productSkn'
],
$ticketsSkn
))
{
$result
[
'tickets'
]
=
true
;
$result
[
'ticketsConfirm'
]
=
Helpers
::
url
(
'/cart/index/ticketsConfirm'
);
...
...
Please
register
or
login
to post a comment