Browse Source

log out option

541469799@qq.com 1 năm trước cách đây
mục cha
commit
f2d01078d0
1 tập tin đã thay đổi với 10 bổ sung1 xóa
  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;
+    }
 }