orderv2 get add get_down-type-1
This commit is contained in:
@@ -1389,8 +1389,9 @@ class Orders extends HD_Controller
|
||||
public function get_down(){
|
||||
require_once COMMPATH.'/third_party/TCPDF/tcpdf.php';
|
||||
$id = $this->input->get('id');
|
||||
$type = intval($this->input->get('type'));
|
||||
$row = $this->receiver_orders_v2_model->get(['id'=>$id],'id,sid,owner_mobile,owner_name');
|
||||
$contract = $this->order_contracts_model->get(['o_id'=>$row['id'],'type'=>0],'id,o_id,file,imgs,type');
|
||||
$contract = $this->order_contracts_model->get(['o_id'=>$row['id'],'type'=>$type],'id,o_id,file,imgs,type');
|
||||
if(!$row || !$contract){
|
||||
return false;
|
||||
}
|
||||
@@ -1408,7 +1409,7 @@ class Orders extends HD_Controller
|
||||
$imgs = json_decode($contract['imgs'],true);
|
||||
if(!$imgs){
|
||||
file_get_contents("https://api.liche.cn/wxapp/licheb/protocol/pdf_img?id={$contract['id']}");
|
||||
$contract = $this->order_contracts_model->get(['o_id'=>$row['o_id'],'type'=>0],'id,o_id,file,imgs,type');
|
||||
$contract = $this->order_contracts_model->get(['o_id'=>$row['o_id'],'type'=>$type],'id,o_id,file,imgs,type');
|
||||
$imgs = json_decode($contract['imgs'],true);
|
||||
}
|
||||
if (!file_exists($path)) {
|
||||
|
||||
@@ -256,6 +256,12 @@
|
||||
下载汽车购车协议
|
||||
</a><br>
|
||||
</div>
|
||||
<div class="am-form-group" v-if="info.contract_data[1]">
|
||||
<a :href="'/receiver/orderv2/orders/get_down?type=1&id='+info.id" target="_blank"
|
||||
class="am-btn am-btn-primary am-btn-sm">
|
||||
下载委托服务协议
|
||||
</a><br>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user