fixes some bugs to gzip css and js
Showing
4 changed files
with
54 additions
and
2 deletions
@@ -143,6 +143,7 @@ class Yohobuy | @@ -143,6 +143,7 @@ class Yohobuy | ||
143 | if (!empty($data)) { | 143 | if (!empty($data)) { |
144 | $url = self::httpBuildQuery($url, $data); | 144 | $url = self::httpBuildQuery($url, $data); |
145 | } | 145 | } |
146 | + echo $url; | ||
146 | 147 | ||
147 | /* 开启缓存的情况 */ | 148 | /* 开启缓存的情况 */ |
148 | if ($cache && USE_CACHE) { | 149 | if ($cache && USE_CACHE) { |
@@ -135,5 +135,20 @@ class OrderData | @@ -135,5 +135,20 @@ class OrderData | ||
135 | //调用接口获得数据 | 135 | //调用接口获得数据 |
136 | return Yohobuy::get(Yohobuy::SERVICE_URL . '/operations/api/v5/resource/get', $param); | 136 | return Yohobuy::get(Yohobuy::SERVICE_URL . '/operations/api/v5/resource/get', $param); |
137 | } | 137 | } |
138 | + | ||
139 | + /* | ||
140 | + * 微信支付签名 | ||
141 | + */ | ||
142 | + public static function weixinPaySign($orderCode) | ||
143 | + { | ||
144 | + //构建必传参数 | ||
145 | + $param['private_key'] = 'adbf5a778175ee757c34d0eba4e932bc'; | ||
146 | + $param['order_code'] = $orderCode; | ||
147 | + $param['payment_code'] = 19; | ||
148 | + $param['app_key'] = 'adbf5a778175ee75'; | ||
149 | + $param['client_secret'] = Sign::getSign($param); | ||
150 | + //调用接口获得数据 | ||
151 | + return Yohobuy::get('http://pay.yohobuy.com/payment/data.html', $param); | ||
152 | + } | ||
138 | 153 | ||
139 | } | 154 | } |
@@ -775,7 +775,6 @@ class HomeController extends AbstractAction | @@ -775,7 +775,6 @@ class HomeController extends AbstractAction | ||
775 | /* | 775 | /* |
776 | * 我的订单-付款跳转页 | 776 | * 我的订单-付款跳转页 |
777 | */ | 777 | */ |
778 | - | ||
779 | public function payAction() | 778 | public function payAction() |
780 | { | 779 | { |
781 | // 审判跳转登录页 | 780 | // 审判跳转登录页 |
@@ -813,6 +812,36 @@ class HomeController extends AbstractAction | @@ -813,6 +812,36 @@ class HomeController extends AbstractAction | ||
813 | 'hasWxShare' => strpos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false | 812 | 'hasWxShare' => strpos($this->server('HTTP_USER_AGENT', ''), 'MicroMessenger') !== false |
814 | )); | 813 | )); |
815 | } | 814 | } |
815 | + | ||
816 | + /** | ||
817 | + * 微信支付 API | ||
818 | + */ | ||
819 | + public function weixinapiAction() | ||
820 | + { | ||
821 | + do { | ||
822 | + if (!$this->isAjax()) { | ||
823 | + break; | ||
824 | + } | ||
825 | + | ||
826 | + $uid = $this->getUid(true); | ||
827 | + if (!$uid) { | ||
828 | + break; | ||
829 | + } | ||
830 | + | ||
831 | + $orderCode = $this->get('order_code'); | ||
832 | + if (empty($orderCode)) { | ||
833 | + break; | ||
834 | + } | ||
835 | + | ||
836 | + $result = OrderData::weixinPaySign($orderCode); | ||
837 | + if (empty($result['data'])) { | ||
838 | + break; | ||
839 | + } | ||
840 | + | ||
841 | + $this->echoJson($result['data']); | ||
842 | + } | ||
843 | + while (false); | ||
844 | + } | ||
816 | 845 | ||
817 | // /* | 846 | // /* |
818 | // * 我的订单-确认收货 | 847 | // * 我的订单-确认收货 |
@@ -159,4 +159,11 @@ routes.cart.type = "rewrite" | @@ -159,4 +159,11 @@ routes.cart.type = "rewrite" | ||
159 | routes.cart.match = "/home/order/detail$" | 159 | routes.cart.match = "/home/order/detail$" |
160 | routes.cart.route.module = Index | 160 | routes.cart.route.module = Index |
161 | routes.cart.route.controller = Home | 161 | routes.cart.route.controller = Home |
162 | -routes.cart.route.action = Homedetail | ||
162 | +routes.cart.route.action = homedetail | ||
163 | + | ||
164 | +; 微信支付接口 | ||
165 | +routes.weixinapi.type = "rewrite" | ||
166 | +routes.weixinapi.match = "/shopping/pay/wechatwapapi$" | ||
167 | +routes.weixinapi.route.module = Index | ||
168 | +routes.weixinapi.route.controller = Home | ||
169 | +routes.weixinapi.route.action = Weixinapi |
-
Please register or login to post a comment