瀏覽代碼

log out option

541469799@qq.com 1 年之前
父節點
當前提交
f2d01078d0
共有 1 個文件被更改,包括 10 次插入1 次删除
  1. 10 1
      app/index/model/UserAddress.php

+ 10 - 1
app/index/model/UserAddress.php

@@ -189,10 +189,19 @@ class UserAddress extends UserAddressModel
         $userId = UserService::getCurrentLoginUserId();
         $detail = self::get(['user_id' => $userId, 'address_id' => $addressId]);
         if (empty($detail)) {
-            throwError('未找到该收货地址');
+            throwError('Address Not found.');
             return false;
         }
         return $detail;
     }
 
+    public static function detailInner(int $addressId)
+    {
+        $userId = UserService::getCurrentLoginUserId();
+        $detail = self::get(['user_id' => $userId, 'address_id' => $addressId]);
+        if (empty($detail)) {
+            return null;
+        }
+        return $detail;
+    }
 }