Merge branch 'feature/branchOptmztn' of http://git.dev.yoho.cn/web/yohobuywap in…
…to feature/branchOptmztn # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Showing
2 changed files
with
3 additions
and
24 deletions
@@ -19,28 +19,8 @@ lazyLoad({ | @@ -19,28 +19,8 @@ lazyLoad({ | ||
19 | }); | 19 | }); |
20 | 20 | ||
21 | function downCount(options) { | 21 | function downCount(options) { |
22 | - var settings = new Date(options), | ||
23 | - targetDateFunction = function() { | ||
24 | - var orderDate = new Date(settings), | ||
25 | - utc = orderDate.getTime(), | ||
26 | - newDate = new Date(utc); | ||
27 | - | ||
28 | - return newDate; | ||
29 | - }, | ||
30 | - | ||
31 | - difference = targetDateFunction(),// difference of dates | 22 | + var difference = options,// difference of dates |
32 | interval; | 23 | interval; |
33 | - | ||
34 | - // Throw error if date is not set | ||
35 | - if (!settings) { | ||
36 | - $.error('Date is not defined.'); | ||
37 | - } | ||
38 | - | ||
39 | - // Throw error if date is set incorectly | ||
40 | - if (!Date.parse(settings)) { | ||
41 | - $.error('Incorrect date format, it should look like this, 12/24/2012 12:00:00.'); | ||
42 | - } | ||
43 | - | ||
44 | /** | 24 | /** |
45 | * Main downCount function that calculates everything | 25 | * Main downCount function that calculates everything |
46 | */ | 26 | */ |
@@ -207,8 +207,8 @@ class OrderModel | @@ -207,8 +207,8 @@ class OrderModel | ||
207 | $result['orderNum'] = $orderDetail['data']['order_code']; | 207 | $result['orderNum'] = $orderDetail['data']['order_code']; |
208 | $result['orderTime'] = date('Y-m-d H:i:s', $orderDetail['data']['create_time']); | 208 | $result['orderTime'] = date('Y-m-d H:i:s', $orderDetail['data']['create_time']); |
209 | //倒计时时间 | 209 | //倒计时时间 |
210 | - if (isset($orderDetail['counter_flag']) && $orderDetail['counter_flag'] == 'Y') { | ||
211 | - $result['leftTime'] = $orderDetail['data']['pay_lefttime']; | 210 | + if (isset($orderDetail['data']['counter_flag']) && $orderDetail['data']['counter_flag'] == 'Y') { |
211 | + $result['leftTime'] = $orderDetail['data']['pay_lefttime']*1000; | ||
212 | } | 212 | } |
213 | $result['goods'] = Helpers::formatOrderGoods($orderDetail['data']['order_goods'], $count, true); | 213 | $result['goods'] = Helpers::formatOrderGoods($orderDetail['data']['order_goods'], $count, true); |
214 | $result['sumPrice'] = $orderDetail['data']['goods_total_amount']; // 商品总金额 | 214 | $result['sumPrice'] = $orderDetail['data']['goods_total_amount']; // 商品总金额 |
@@ -226,7 +226,6 @@ class OrderModel | @@ -226,7 +226,6 @@ class OrderModel | ||
226 | $result['isPay'] = $orderDetail['data']['payment_status'] === 'Y'; | 226 | $result['isPay'] = $orderDetail['data']['payment_status'] === 'Y'; |
227 | } | 227 | } |
228 | } | 228 | } |
229 | - | ||
230 | return $result; | 229 | return $result; |
231 | } | 230 | } |
232 | 231 |
-
Please register or login to post a comment