Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
U
User
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangjun
User
Commits
1db0e3f4
Commit
1db0e3f4
authored
Nov 08, 2024
by
yanghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
我的订单
parent
e4dc78fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
8 deletions
+36
-8
user.php
center/controllers/user.php
+11
-8
myorder.php
center/views/myorder.php
+13
-0
user_model.php
esf_core/models/user_model.php
+12
-0
No files found.
center/controllers/user.php
View file @
1db0e3f4
...
@@ -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
);
}
}
...
...
center/views/myorder.php
View file @
1db0e3f4
...
@@ -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>
...
...
esf_core/models/user_model.php
View file @
1db0e3f4
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment