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
a3a55e6db96114a77c917764f711b0fd55f8d5d2
1 parent
6cadc3c8
虚拟商品,在次购买去除
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
40 deletions
template/m.yohobuy.com/actions/index/home/order-detail.phtml
template/m.yohobuy.com/partials/me/order/order.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Home/Order.php
template/m.yohobuy.com/actions/index/home/order-detail.phtml
View file @
a3a55e6
...
...
@@ -104,33 +104,37 @@
<div
class=
"opt block"
>
{
{#unless
unreceived
}
}
{
{#unless
unpaid
}
}
<span
class=
"btn btn-del"
>删除订单</span>
<span
class=
"btn btn-rebuy"
>再次购买</span>
{
{/unless
}
}
{
{#unless
unpaid
}
}
<span
class=
"btn btn-del"
>删除订单</span>
{
{#if
isVirtual
}
}
<!--虚拟商品-->
{
{else
}
}
<span
class=
"btn btn-rebuy"
>再次购买</span>
{
{/if
}
}
{
{/unless
}
}
{
{/unless
}
}
{
{#if
unpaid
}
}
<ul
class=
"count-down hide"
>
<li>
<span
class=
"iconfont count-down-icon"
>
64
a;</span>
</li>
<li>
<span
class=
"hours"
>
{
{leftTime
}
}</span>
</li>
</ul>
<span
class=
"btn btn-cancel"
>取消订单</span>
{
{#if
payUrl
}
}
<a
href=
"{{payUrl}}"
>
<span
class=
"btn btn-pay"
>立即付款</span>
</a>
{
{/if
}
}
<ul
class=
"count-down hide"
>
<li>
<span
class=
"iconfont count-down-icon"
>
64
a;</span>
</li>
<li>
<span
class=
"hours"
>
{
{leftTime
}
}</span>
</li>
</ul>
<span
class=
"btn btn-cancel"
>取消订单</span>
{
{#if
payUrl
}
}
<a
href=
"{{payUrl}}"
>
<span
class=
"btn btn-pay"
>立即付款</span>
</a>
{
{/if
}
}
{
{/if
}
}
{
{#if
logisticsUrl
}
}
<a
href=
"{{logisticsUrl}}"
>
<span
class=
"btn btn-check-logistics"
>查看物流</span>
</a>
<a
href=
"{{logisticsUrl}}"
>
<span
class=
"btn btn-check-logistics"
>查看物流</span>
</a>
{
{/if
}
}
{
{#if
qrcode
}
}
...
...
template/m.yohobuy.com/partials/me/order/order.phtml
View file @
a3a55e6
...
...
@@ -17,12 +17,22 @@
{{!-- 完成和取消订单显示删除按钮 --}}
{{#unless unpaid}}
{{#unless unreceived}}
<div class="order-opt">
<span class="btn del">删除订单</span>
<span class="btn rebuy">再次购买</span>
</div>
{{/unless}}
<div class="order-opt">
{{#unless unreceived}}
<span class="btn del">删除订单</span>
{{#if isVirtual}}
<!--虚拟商品-->
{{else}}
<span class="btn rebuy">再次购买</span>
{{/if}}
{{/unless}}
{{#if qrcode}}
<a class="locHref" href="{{qrcode}}">
<span class="btn check-logistics">查看二维码</span>
</a>
{{/if}}
</div>
{{/unless}}
{{#if unpaid}}
...
...
@@ -53,12 +63,6 @@
</a>
</div>
{{/if}}
{{/if}}
{{#if qrcode}}
<div class="order-opt">
<a class="locHref" href="{{qrcode}}">
<span class="btn check-logistics">查看二维码</span>
</a>
</div>
{{/if}}
</div>
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
a3a55e6
...
...
@@ -1096,8 +1096,7 @@ class HomeController extends AbstractAction
/* 判断订单信息是否存在 */
$orderDetail
=
OrderModel
::
orderDetail
(
$orderCode
,
$this
->
_uid
,
$this
->
_usession
);
// $readd = OrderData::reAddData($this->_uid, 1611143210);
// print_r($readd);
if
(
empty
(
$orderDetail
))
{
$this
->
error
();
}
...
...
yohobuy/m.yohobuy.com/application/models/Home/Order.php
View file @
a3a55e6
...
...
@@ -88,7 +88,11 @@ class OrderModel
$result
[
$key
][
'shippingCost'
]
=
$vo
[
'shipping_cost'
];
}
//类内调用格式化订单商品数据方法
$tickets
=
isset
(
$vo
[
'virtual_type'
])
&&
$vo
[
'virtual_type'
]
==
3
?
true
:
false
;
$tickets
=
false
;
if
(
isset
(
$vo
[
'virtual_type'
])
&&
$vo
[
'virtual_type'
]
*
1
==
3
)
{
$tickets
=
true
;
$result
[
$key
][
'isVirtual'
]
=
true
;
//虚拟商品
}
$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
;
...
...
@@ -204,15 +208,14 @@ class OrderModel
$orderDetail
=
OrderData
::
viewOrderData
(
$orderCode
,
$uid
,
$sessionKey
);
if
(
isset
(
$orderDetail
[
'data'
][
'order_code'
]))
{
$count
=
0
;
$orderDetail
[
'data'
][
'virtual_type'
]
=
empty
(
$orderDetail
[
'data'
][
'virtual_type'
])
?
''
:
$orderDetail
[
'data'
][
'virtual_type'
]
*
1
;
$result
=
self
::
getOrderStatus
(
$orderDetail
[
'data'
],
true
);
// 订单状态
//门票
if
(
isset
(
$orderDetail
[
'data'
][
'virtual_type'
])
&&
$orderDetail
[
'data'
][
'virtual_type'
]
==
3
)
{
//手机号
$result
[
'
v
irtual'
]
=
true
;
$result
[
'
isV
irtual'
]
=
true
;
$result
[
'mobile'
]
=
isset
(
$orderDetail
[
'data'
][
'mobile'
])
?
$orderDetail
[
'data'
][
'mobile'
]
:
''
;
//二维码
$result
[
'qrcode'
]
=
Helpers
::
url
(
'/home/qrcode/'
.
$orderDetail
[
'data'
][
'order_code'
]);
}
$result
[
'name'
]
=
$orderDetail
[
'data'
][
'user_name'
];
$result
[
'phoneNum'
]
=
$orderDetail
[
'data'
][
'mobile'
];
...
...
@@ -300,6 +303,9 @@ class OrderModel
break
;
}
//转数字
$order
[
'virtual_type'
]
=
empty
(
$order
[
'virtual_type'
])
?
''
:
$order
[
'virtual_type'
]
*
1
;
// 先判断订单付款方式,根据不同的付款方式计算订单状态。(注:货到付款没有待付款状态)
// 支付方式为非货到付款时,计算订单状态。
if
(
$order
[
'payment_type'
]
!=
2
)
{
...
...
Please
register
or
login
to post a comment