|
@@ -22,6 +22,28 @@ class Order extends Base
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * @title 获取最近一次售货地址
|
|
|
|
+ * @desc 获取最近一次售货地址
|
|
|
|
+ * @author qc
|
|
|
|
+ * @url /api/Order/getAddress
|
|
|
|
+ * @method GET
|
|
|
|
+ * @header name:Authorization require:1 desc:Tokenid
|
|
|
|
+ * @return name:pro_name type:string default:-- desc:收货地址--省
|
|
|
|
+ * @return name:city_name type:string default:-- desc:收货地址--市
|
|
|
|
+ * @return name:county_name type:string default:-- desc:收货地址--区
|
|
|
|
+ * @return name:add_detail type:string default:-- desc:收货地址--详情
|
|
|
|
+ * @return name:user_name type:string default:-- desc:收货人
|
|
|
|
+ * @return name:phone type:string default:-- desc:收货人联系方式
|
|
|
|
+ */
|
|
|
|
+ public function getAddress()
|
|
|
|
+ {
|
|
|
|
+ $detail = GoodsOrder::field('pro_name,city_name,county_name,add_detail,user_name,phone')->where('user_id',$this->user_id)->order('id desc ')
|
|
|
|
+ ->limit(1,1)->select()->toArray();
|
|
|
|
+ $address = empty($detail) ? null : $detail[0];
|
|
|
|
+ $this->success('ok',$address);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
* @title 创建订单
|
|
* @title 创建订单
|
|
* @desc 创建订单
|
|
* @desc 创建订单
|
|
* @author qc
|
|
* @author qc
|