浏览代码

Merge branch 'goods' of 121.43.114.153:/home/git/repositories/shopnc into goods

songjiyuan 9 年之前
父节点
当前提交
6c02f6496c

+ 14 - 10
data/logic/payment.logic.php

@@ -2,8 +2,8 @@
 /**
 /**
  * 支付行为
  * 支付行为
  *
  *
-
  */
  */
+
 defined('InShopNC') or exit('Access Invalid!');
 defined('InShopNC') or exit('Access Invalid!');
 
 
 class paymentLogic
 class paymentLogic
@@ -42,9 +42,11 @@ class paymentLogic
         $model_pd = Model('predeposit');
         $model_pd = Model('predeposit');
         $member_id = intval($member_info['member_id']);
         $member_id = intval($member_info['member_id']);
 
 
-        try {
+        try
+        {
             DB::beginTransaction();
             DB::beginTransaction();
-            foreach ($order_list as $order_info) {
+            foreach ($order_list as $order_info)
+            {
                 // 使用全部预存款(红包逻辑)
                 // 使用全部预存款(红包逻辑)
                 $data_order = array();
                 $data_order = array();
                 $change_type = '';
                 $change_type = '';
@@ -67,16 +69,22 @@ class paymentLogic
                 $data_pd['order_sn'] = $order_info['order_sn'];
                 $data_pd['order_sn'] = $order_info['order_sn'];
                 //预存款立即支付,订单支付完成
                 //预存款立即支付,订单支付完成
                 $ret = $model_pd->changePd($change_type, $data_pd);
                 $ret = $model_pd->changePd($change_type, $data_pd);
-                if (0 == $ret) throw new Exception("订单更新失败");
+                if (0 == $ret) {
+                    throw new Exception("订单更新失败");
+                }
 
 
                 // 修改订单
                 // 修改订单
                 $data_order["pd_amount"] = $order_info['pd_amount'];
                 $data_order["pd_amount"] = $order_info['pd_amount'];
                 $ret = $model_order->editOrder($data_order, array('order_id' => $order_info['order_id']));
                 $ret = $model_order->editOrder($data_order, array('order_id' => $order_info['order_id']));
-                if (0 == $ret) throw new Exception("订单更新失败");
+
+                if (0 == $ret) {
+                    throw new Exception("订单更新失败");
+                }
+
                 DB::commit();
                 DB::commit();
                 return 0;
                 return 0;
             }
             }
-        }catch (Exception $e) {
+        } catch (Exception $e) {
             DB::rollback();
             DB::rollback();
         }
         }
     }
     }
@@ -130,7 +138,6 @@ class paymentLogic
      */
      */
     public function getVrOrderInfo($order_sn, $member_id = null)
     public function getVrOrderInfo($order_sn, $member_id = null)
     {
     {
-
         //验证订单信息
         //验证订单信息
         $model_order = Model('vr_order');
         $model_order = Model('vr_order');
         $condition = array();
         $condition = array();
@@ -164,7 +171,6 @@ class paymentLogic
      */
      */
     public function getPdOrderInfo($pdr_sn, $member_id = null)
     public function getPdOrderInfo($pdr_sn, $member_id = null)
     {
     {
-
         $model_pd = Model('predeposit');
         $model_pd = Model('predeposit');
         $condition = array();
         $condition = array();
         $condition['pdr_sn'] = $pdr_sn;
         $condition['pdr_sn'] = $pdr_sn;
@@ -241,7 +247,6 @@ class paymentLogic
      */
      */
     public function updatePdOrder($out_trade_no, $trade_no, $payment_info, $recharge_info)
     public function updatePdOrder($out_trade_no, $trade_no, $payment_info, $recharge_info)
     {
     {
-
         $condition = array();
         $condition = array();
         $condition['pdr_sn'] = $recharge_info['pdr_sn'];
         $condition['pdr_sn'] = $recharge_info['pdr_sn'];
         $condition['pdr_payment_state'] = 0;
         $condition['pdr_payment_state'] = 0;
@@ -273,7 +278,6 @@ class paymentLogic
             $model_pd->changePd('recharge', $data);
             $model_pd->changePd('recharge', $data);
             $model_pd->commit();
             $model_pd->commit();
             return callback(true);
             return callback(true);
-
         } catch (Exception $e) {
         } catch (Exception $e) {
             $model_pd->rollback();
             $model_pd->rollback();
             return callback(false, $e->getMessage());
             return callback(false, $e->getMessage());

+ 1 - 1
data/model/cache.model.php

@@ -88,7 +88,7 @@ class cacheModel extends Model {
 	 * @return array
 	 * @return array
 	 */
 	 */
 	private function _express(){
 	private function _express(){
-	    $fields = 'id,e_name,e_code,e_letter,e_order,e_url,e_zt_state';
+	    $fields = 'id,e_name,e_code,e_kdn_code,e_letter,e_order,e_url,e_zt_state';
 		$list = $this->table('express')->field($fields)->order('e_order,e_letter')->where(array('e_state'=>1))->limit(false)->select();
 		$list = $this->table('express')->field($fields)->order('e_order,e_letter')->where(array('e_state'=>1))->limit(false)->select();
 		if (!is_array($list)) return null;
 		if (!is_array($list)) return null;
 		$array = array();
 		$array = array();

+ 1 - 1
wap/css/express.css

@@ -107,7 +107,7 @@ article {
     width: 300px;
     width: 300px;
     height: 100px;
     height: 100px;
     margin-left: -150px;
     margin-left: -150px;
-    background: url("../images/empty.png") no-repeat;
+    background: url("../../../../wap/images/empty.png") no-repeat;
     background-size: 100% 100%;
     background-size: 100% 100%;
     margin-top: 16%;
     margin-top: 16%;
 }
 }

文件差异内容过多而无法显示
+ 2 - 0
data/resource/js/mobile/zepto.min.js


+ 3 - 0
fcgi_run.php

@@ -11,6 +11,7 @@ require_once (BASE_ROOT_PATH . '/helper/func.php');
 function pays_execute($file)
 function pays_execute($file)
 {
 {
     static $exfiles = array('wxnotify.php','alipay_notify_url.php','dispatch_notify.php','test.php');
     static $exfiles = array('wxnotify.php','alipay_notify_url.php','dispatch_notify.php','test.php');
+
     $name = basename($file);
     $name = basename($file);
 
 
     return in_array($name,$exfiles);
     return in_array($name,$exfiles);
@@ -70,6 +71,8 @@ function run_fcgi()
         $contents = ob_get_clean();
         $contents = ob_get_clean();
         fcgi_echo($contents);
         fcgi_echo($contents);
 
 
+        Log::record($contents,Log::DEBUG);
+
         fcgi_finish();
         fcgi_finish();
     }
     }
 
 

+ 2 - 4
helper/http_header.php

@@ -231,8 +231,6 @@ class http_header
         return $code;
         return $code;
     }
     }
 
 
-
-
     private function special_line($header_line,$http_response_code)
     private function special_line($header_line,$http_response_code)
     {
     {
         $len = strlen($header_line);
         $len = strlen($header_line);
@@ -248,7 +246,7 @@ class http_header
             $colon_offset = strchr($header_line, ':');
             $colon_offset = strchr($header_line, ':');
             if($colon_offset)
             if($colon_offset)
             {
             {
-                if (!strcasecmp($header_line, "Location",strlen("Location")))
+                if (!strncasecmp($header_line, "Location",strlen("Location")))
                 {
                 {
                     if( ($this->mStatusCode < 300 || $this->mStatusCode > 399) && $this->mStatusCode != 201)
                     if( ($this->mStatusCode < 300 || $this->mStatusCode > 399) && $this->mStatusCode != 201)
                     {
                     {
@@ -262,7 +260,7 @@ class http_header
                         }
                         }
                     }
                     }
                 }
                 }
-                else if(!strcasecmp($header_line, "WWW-Authenticate",strlen("WWW-Authenticate"))) {
+                else if(!strncasecmp($header_line, "WWW-Authenticate",strlen("WWW-Authenticate"))) {
                     $this->mStatusCode = 401;
                     $this->mStatusCode = 401;
                 }
                 }
             }
             }

+ 5 - 11
mobile/control/member_order.php

@@ -14,7 +14,6 @@ defined('InShopNC') or exit('Access Invalid!');
 
 
 class member_orderControl extends mbMemberControl
 class member_orderControl extends mbMemberControl
 {
 {
-
     public function __construct()
     public function __construct()
     {
     {
         parent::__construct();
         parent::__construct();
@@ -213,9 +212,7 @@ class member_orderControl extends mbMemberControl
         if ($order_id <= 0) {
         if ($order_id <= 0) {
             return joutput_error(errcode::ErrOrder, '订单不存在');
             return joutput_error(errcode::ErrOrder, '订单不存在');
         }
         }
-        /*
-         * TODO:后台有合适的订单后,开启此注释进行调试
-         *
+
         $model_order = Model('order');
         $model_order = Model('order');
         $condition['order_id'] = $order_id;
         $condition['order_id'] = $order_id;
         $condition['buyer_id'] = $this->member_info['member_id'];
         $condition['buyer_id'] = $this->member_info['member_id'];
@@ -226,25 +223,22 @@ class member_orderControl extends mbMemberControl
         }
         }
 
 
         $express = rkcache('express', true);
         $express = rkcache('express', true);
-        $e_code = $express[$order_info['extend_order_common']['shipping_express_id']]['e_code'];
+        $e_code = $express[$order_info['extend_order_common']['shipping_express_id']]['e_kdn_code'];
         $e_name = $express[$order_info['extend_order_common']['shipping_express_id']]['e_name'];
         $e_name = $express[$order_info['extend_order_common']['shipping_express_id']]['e_name'];
 
 
         $key = "express_" . $order_info['shipping_code'];
         $key = "express_" . $order_info['shipping_code'];
         $deliver_info = rkcache($key);
         $deliver_info = rkcache($key);
         if(empty($deliver_info))
         if(empty($deliver_info))
         {
         {
-            $deliver_info = $this->_get_express($e_code, $order_info['shipping_code']);
+            $deliver_info = $this->getOrderTracesByJson('STO', '3304699247030');
+            //$deliver_info = $this->_get_express($e_code, $order_info['shipping_code']);
+            //$deliver_info = $this->getOrderTracesByJson($e_code,$order_info['shipping_code']);
             if ($deliver_info === false) {
             if ($deliver_info === false) {
                 return;
                 return;
             }
             }
             wkcache($key,$deliver_info,3600);
             wkcache($key,$deliver_info,3600);
         }
         }
-       */
 
 
-        /*
-         * TODO: 需要将shopnc后台的物流公司简称与快递鸟中物流公司的简称进行一一映射
-         */
-        $deliver_info = $this->getOrderTracesByJson('STO', '3304699247030');
         $deliver_info = json_decode($deliver_info, true);
         $deliver_info = json_decode($deliver_info, true);
         $routes = $deliver_info['Traces'];
         $routes = $deliver_info['Traces'];
         krsort($routes);
         krsort($routes);

+ 12 - 8
mobile/templates/default/express_info.php

@@ -8,7 +8,7 @@
     <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
     <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
     <meta content="email=no" name="format-detection" />
     <meta content="email=no" name="format-detection" />
     <meta name="format-detection" content="telephone=no" />
     <meta name="format-detection" content="telephone=no" />
-    <link rel="stylesheet" type="text/css" href="/wap/css/express.css">
+    <link rel="stylesheet" type="text/css" href="<?php echo RESOURCE_SITE_URL; ?>/css/mobile/express.css">
 </head>
 </head>
 <body>
 <body>
 <header>
 <header>
@@ -32,18 +32,22 @@
     </div>
     </div>
 </article>
 </article>
 
 
-    <script src="js/zepto.min.js"></script>
+    <script src="<?php echo RESOURCE_SITE_URL; ?>/js/mobile/zepto.min.js"></script>
     <script type="text/javascript">
     <script type="text/javascript">
         $(function(){
         $(function(){
             var bottom_html='<div class="bottom_rote"></div>',
             var bottom_html='<div class="bottom_rote"></div>',
-                    twinkle='<div class="twinkle" dateAnimate="twinkle_1"></div>';
+                twinkle='<div class="twinkle" dateAnimate="twinkle_1"></div>';
             $('.msg').first().addClass("this").append(twinkle);
             $('.msg').first().addClass("this").append(twinkle);
             $('.msg').last().append(bottom_html);
             $('.msg').last().append(bottom_html);
-            setTimeout(function(){
-                var Animate=$(".twinkle").attr('dateAnimate');
-                $(".twinkle").addClass(Animate);
-            },1000)
-
+            function width(id,sex){
+                var object=$('.rote').offset(),
+                    width=object.width;
+                margin=-width-sex+"px";
+                $(id).css("margin-left",margin);
+            }
+            width(".dian",10);
+            width(".bottom_rote",10);
+            width(".twinkle",14);
         })
         })
     </script>
     </script>
 </body>
 </body>