Commit 1db0e3f4 authored by yanghui's avatar yanghui

我的订单

parent e4dc78fd
...@@ -2405,19 +2405,22 @@ class User extends MY_Controller ...@@ -2405,19 +2405,22 @@ class User extends MY_Controller
$data['conf_where'] = 'myorder'; $data['conf_where'] = 'myorder';
$data['title'] = '我的订单'; $data['title'] = '我的订单';
$data['qrImg'] = $this->user_model->getBuyQrImg($this->user_id);
$data['pagesize'] = 10;//记录每页的条数 if(1==2) {
$data['page'] = $this->uri->segment(3) ? intval($this->uri->segment(3)) :1 ; // 获取当前页数 $data['pagesize'] = 10;//记录每页的条数
$data['page'] = $this->uri->segment(3) ? intval($this->uri->segment(3)) : 1; // 获取当前页数
$data['totalsize'] = $this->user_model->myorder_count($this->user_id);//记录总数 $data['totalsize'] = $this->user_model->myorder_count($this->user_id);//记录总数
$data['totalpage'] = ceil($data['totalsize']/$data['pagesize']); $data['totalpage'] = ceil($data['totalsize'] / $data['pagesize']);
$orderdata = $this->user_model->myorder_list($this->user_id,$data['page'],$data['pagesize']); $orderdata = $this->user_model->myorder_list($this->user_id, $data['page'], $data['pagesize']);
$invoiceUrlArr = $this->user_model->getInvoiceUrlArr( $orderdata ); $invoiceUrlArr = $this->user_model->getInvoiceUrlArr($orderdata);
$data['orders'] = $orderdata; $data['orders'] = $orderdata;
$data['invoice_url_arr'] = $invoiceUrlArr; $data['invoice_url_arr'] = $invoiceUrlArr;
}
$this->load->view('myorder',$data); $this->load->view('myorder',$data);
} }
......
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
.user-nav a.nav7 {background-position: 13px -695px;} .user-nav a.nav7 {background-position: 13px -695px;}
.user-nav-mod.on a.nav7{background-position: 13px -763px;background-color: #fff;} .user-nav-mod.on a.nav7{background-position: 13px -763px;background-color: #fff;}
.mt10{ margin-top: 10px;} .mt10{ margin-top: 10px;}
/** 二维码 **/
.qr_code{width: 100%;text-align: center;margin-top: 20px;}
.qr_code .title{font-size: 15px;color: #333333;margin-bottom: 30px;font-weight: bold;}
.qr_code .content img{width: 210px;}
</style> </style>
<div class="w960 clearfix mt10 pepcenterBox"> <div class="w960 clearfix mt10 pepcenterBox">
<?php require APPPATH_MVC.'views/left.php'; ?> <?php require APPPATH_MVC.'views/left.php'; ?>
...@@ -21,6 +26,13 @@ ...@@ -21,6 +26,13 @@
<div class="user-main user-main03 mt10"> <div class="user-main user-main03 mt10">
<div class="mod-list statistical"> <div class="mod-list statistical">
<div class="qr_code">
<div class="title">请使用微信扫描下方二维码</div>
<div class="content">
<img src="<?=$qrImg?>"/>
</div>
</div>
<?php if(1==2){?>
<?php if(count($orders)>0){ ?> <?php if(count($orders)>0){ ?>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-style-a acenter"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-style-a acenter">
<tr> <tr>
...@@ -66,6 +78,7 @@ ...@@ -66,6 +78,7 @@
<div class="no-result">目前您还没有订单哦。</div> <div class="no-result">目前您还没有订单哦。</div>
</div> </div>
<?php }?> <?php }?>
<?php } ?>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -6384,4 +6384,15 @@ if($searcharr['infotype']==4){ ...@@ -6384,4 +6384,15 @@ if($searcharr['infotype']==4){
return $res; return $res;
} }
//获取用户购买二维码
public function getBuyQrImg($uid){
$url = 'http://newrentlocal.house365.com/api/tf-app-ext/get-order-qrimg?user_id='.$uid;
$result = curl_get_contents($url);
$result = $result ? json_decode($result,1) : array();
if(empty($result) || empty($result['data'])){
return '';
}
return $result['data']['qrimg'];
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment