Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
ylc.llewan.com
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
llewan
ylc.llewan.com
Commits
781c0147
Commit
781c0147
authored
Sep 19, 2018
by
734642908@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存forid
parent
2f348ca5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
1 deletion
+57
-1
AuctionController.class.php
Application/Home/Controller/AuctionController.class.php
+1
-1
EntryController.class.php
Application/Home/Controller/EntryController.class.php
+42
-0
WechatController.class.php
Application/Home/Controller/WechatController.class.php
+14
-0
No files found.
Application/Home/Controller/AuctionController.class.php
View file @
781c0147
...
@@ -78,7 +78,7 @@ class AuctionController extends BaseController
...
@@ -78,7 +78,7 @@ class AuctionController extends BaseController
,
'initial_price'
=>
10
,
'initial_price'
=>
10
,
'bid_price'
=>
10
,
'bid_price'
=>
10
,
'enroll_price'
=>
10
,
'enroll_price'
=>
10
,
'start_time'
=>
'2018-09-19
20:00
'
,
'start_time'
=>
'2018-09-19
19:15
'
,
'end_time'
=>
''
,
'end_time'
=>
''
,
'status'
=>
'1'
,
'status'
=>
'1'
)
)
...
...
Application/Home/Controller/EntryController.class.php
View file @
781c0147
...
@@ -58,7 +58,49 @@ class EntryController extends BaseController
...
@@ -58,7 +58,49 @@ class EntryController extends BaseController
echo
$this
->
formatRes
(
$result
);
echo
$this
->
formatRes
(
$result
);
}
}
//保存模板消息formid
public
function
templateFormid
(){
$token
=
decryptToken
(
I
(
'token'
));
$formid
=
I
(
'formid'
);
if
(
$token
==
false
)
{
$result
=
array
(
'c'
=>
2
,
'msg'
=>
'token不正确'
);
echo
$this
->
formatRes
(
$result
);
exit
;
}
else
if
(
empty
(
$formid
))
{
$result
=
array
(
'c'
=>
2
,
'msg'
=>
'formid参数不存在'
);
echo
$this
->
formatRes
(
$result
);
exit
;
}
$uid
=
$token
[
'uid'
];
//获取用户昵称
// $sql = "select user_nickname from ".get_table("game_member")." where uid=$userid";
// $result = $GLOBALS["conn"]->Query($sql);
// $userArr = $GLOBALS["conn"]->getOne($result);
$userArr
=
M
(
"game_member"
,
""
,
C
(
"LEWAN_HEZI"
))
->
where
(
array
(
'uid'
=>
$uid
))
->
field
(
'user_nickname'
)
->
find
();
$addArr
=
array
(
'uid'
=>
$uid
,
'openid'
=>
$token
[
'openid'
]
,
'nick_name'
=>
$userArr
[
'user_nickname'
]
,
'form_id'
=>
$formid
,
'add_time'
=>
date
(
'Y-m-d H:i:s'
)
);
// add_record($GLOBALS["conn"],"template_formid",$addArr,true);
M
(
"yl_template_formid"
,
""
,
C
(
"LEWAN_HEZI"
))
->
add
(
$addArr
);
$result
=
array
(
'c'
=>
1
,
'msg'
=>
'保存成功'
);
echo
$this
->
formatRes
(
$result
);
exit
;
}
}
}
...
...
Application/Home/Controller/WechatController.class.php
View file @
781c0147
...
@@ -58,6 +58,20 @@ class WechatController extends BaseController
...
@@ -58,6 +58,20 @@ class WechatController extends BaseController
}
}
}
}
public
function
uploadMedia
()
{
$token
=
$this
->
getToekn
();
$token
=
json_decode
(
$token
,
true
)[
'access_token'
];
$posturl
=
'https://api.weixin.qq.com/cgi-bin/media/upload?type=image&access_token='
.
$token
;
$obj
=
new
\CURLFile
(
'uploadfile/lw.jpg'
);
//var_dump($obj);exit;
$data
=
array
(
'media'
=>
$obj
);
//$data = json_encode($data);
$re
=
$this
->
curlPost
(
$posturl
,
$data
,
true
);
var_dump
(
$re
);
}
public
function
getToekn
()
public
function
getToekn
()
{
{
$filepath
=
'http://ylc.test.llewan.com/wechat/retToekn'
;
$filepath
=
'http://ylc.test.llewan.com/wechat/retToekn'
;
...
...
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