Browse Source

fix up image

stanley-king 8 years ago
parent
commit
070b9967e2
2 changed files with 11 additions and 2 deletions
  1. 1 1
      helper/account_helper.php
  2. 10 1
      mobile/control/member_info.php

+ 1 - 1
helper/account_helper.php

@@ -661,7 +661,7 @@ class account_helper
     //在支付成功之后,可以提醒用户收到货后,可以收到红包奖励。
     public static function onPaySuccess($pay_sn)
     {
-        Log::record("account_helper::onOrderSuccess pay_sn={$pay_sn}",Log::DEBUG);
+        Log::record("account_helper::onPaySuccess pay_sn={$pay_sn}",Log::DEBUG);
         $mod = Model('order');
         $info = $mod->getOrderInfo(array('pay_sn' => $pay_sn));
         $buyer_id = intval($info['buyer_id']);

+ 10 - 1
mobile/control/member_info.php

@@ -88,9 +88,18 @@ class member_infoControl extends mbMemberControl
         }
     }
 
-    public function upavatarOp()
+    private function file_path()
     {
         $file_path = $_POST["file_path"];
+        if(file_exists($file_path) == false) {
+            $file_path = BASE_ROOT_PATH . '/data/upload/uploadtmp' . $file_path;
+        }
+        return $file_path;
+    }
+
+    public function upavatarOp()
+    {
+        $file_path = $this->file_path();
         $member_id = $_SESSION['member_id'];
         $file_name = $this->upfile($file_path,$err);
         if($file_name == false) {