You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
719 B
33 lines
719 B
<?php
|
|
|
|
namespace app\base\logic\user;
|
|
|
|
use app\base\model\user\UserAddress;
|
|
|
|
class Address extends Base
|
|
{
|
|
|
|
/**
|
|
* 更换手机号第二步--绑定新手机号
|
|
* @date 2022-10-13
|
|
*/
|
|
public function getDefaultAddress()
|
|
{
|
|
$address_model = new UserAddress();
|
|
|
|
$where = [
|
|
['user_id', '=', $this->userId],
|
|
['is_default', '=', 1]
|
|
];
|
|
$data = $address_model->getOneData($where, 'id,user_id,linkman,mobile_phone,province_id,city_id,area_id,province,city,area,address,is_default');
|
|
|
|
// 返回数据
|
|
$r_data = [
|
|
// 默认地址
|
|
'address' => $data
|
|
];
|
|
|
|
return sendSuccessArray($r_data);
|
|
}
|
|
}
|