Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
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
hujun
tl_estate
Commits
271ae4a8
Commit
271ae4a8
authored
Dec 15, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二维码路径和域名修改,取当前网址
parent
a5ceac4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Member.php
application/api/controller/Member.php
+2
-2
GenerateCode.php
application/api/untils/GenerateCode.php
+1
-1
No files found.
application/api/controller/Member.php
View file @
271ae4a8
...
@@ -338,9 +338,9 @@ class Member extends Basic
...
@@ -338,9 +338,9 @@ class Member extends Basic
if
(
$result
)
{
if
(
$result
)
{
$code
=
new
\app\api\untils\GenerateCode
();
$code
=
new
\app\api\untils\GenerateCode
();
$url
=
config
(
'url'
)
.
'
test.html?referrer_source=0&id='
.
$result
->
id
;
$url
=
$this
->
request
->
domain
()
.
'/
test.html?referrer_source=0&id='
.
$result
->
id
;
$path
=
$code
->
getCode
(
$url
,
$result
->
id
);
$path
=
$code
->
getCode
(
$url
,
$result
->
id
);
$data
[
'data'
]
=
[
'path'
=>
config
(
'url'
)
.
$path
];
$data
[
'data'
]
=
[
'path'
=>
$this
->
request
->
domain
()
.
'/'
.
$path
];
$data
[
'status'
]
=
200
;
$data
[
'status'
]
=
200
;
}
else
{
}
else
{
$data
[
'msg'
]
=
'没有该用户'
;
$data
[
'msg'
]
=
'没有该用户'
;
...
...
application/api/untils/GenerateCode.php
View file @
271ae4a8
...
@@ -21,7 +21,7 @@ class GenerateCode {
...
@@ -21,7 +21,7 @@ class GenerateCode {
$qrCode
->
setForegroundColor
([
'r'
=>
0
,
'g'
=>
0
,
'b'
=>
0
]);
$qrCode
->
setForegroundColor
([
'r'
=>
0
,
'g'
=>
0
,
'b'
=>
0
]);
$qrCode
->
setBackgroundColor
([
'r'
=>
255
,
'g'
=>
255
,
'b'
=>
255
]);
$qrCode
->
setBackgroundColor
([
'r'
=>
255
,
'g'
=>
255
,
'b'
=>
255
]);
$qrCode
->
setValidateResult
(
false
);
$qrCode
->
setValidateResult
(
false
);
$path
=
'
.
/qrcode/'
.
$file_name
.
'.png'
;
$path
=
'
resource
/qrcode/'
.
$file_name
.
'.png'
;
$qrCode
->
writeFile
(
$path
);
$qrCode
->
writeFile
(
$path
);
return
$path
;
return
$path
;
}
}
...
...
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