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
32bb00c8
Commit
32bb00c8
authored
Aug 30, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序2
# Conflicts: # application/api_broker/service/LookShopService.php
parent
89b19110
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
WxSdk.php
application/api/controller/WxSdk.php
+39
-1
No files found.
application/api/controller/WxSdk.php
View file @
32bb00c8
...
@@ -15,6 +15,7 @@ use app\api\extend\Basic;
...
@@ -15,6 +15,7 @@ use app\api\extend\Basic;
use
app\api\service\RegisterService
;
use
app\api\service\RegisterService
;
use
app\api\service\WxSdkService
;
use
app\api\service\WxSdkService
;
use
app\api\untils\JwtUntils
;
use
app\api\untils\JwtUntils
;
use
app\model\TLookShopUser
;
use
app\model\Users
;
use
app\model\Users
;
use
app\model\UWxInfo
;
use
app\model\UWxInfo
;
use
think\Exception
;
use
think\Exception
;
...
@@ -177,7 +178,7 @@ class WxSdk extends Basic
...
@@ -177,7 +178,7 @@ class WxSdk extends Basic
}
}
/**
/**
* 保存微信登录信息
*
小程序
保存微信登录信息
* @return \think\Response
* @return \think\Response
*/
*/
public
function
saveWXInfoByPortableProgram
()
public
function
saveWXInfoByPortableProgram
()
...
@@ -214,6 +215,7 @@ class WxSdk extends Basic
...
@@ -214,6 +215,7 @@ class WxSdk extends Basic
}
}
if
(
$id
>
0
)
{
if
(
$id
>
0
)
{
$this
->
addUserLookShopV2
(
$id
,
$params
[
'house_id'
],
$params
[
'source'
],
1
);
return
$this
->
response
(
"200"
,
"request success"
);
return
$this
->
response
(
"200"
,
"request success"
);
}
else
{
}
else
{
return
$this
->
response
(
"101"
,
"request exception"
);
return
$this
->
response
(
"101"
,
"request exception"
);
...
@@ -221,4 +223,40 @@ class WxSdk extends Basic
...
@@ -221,4 +223,40 @@ class WxSdk extends Basic
}
}
/**
* 保存看铺数据
* @param $user_id
* @param $house_id
* @param $type
* @param $source
* @return bool
*/
public
function
addUserLookShopV2
(
$user_id
,
$house_id
,
$type
,
$source
)
{
$day
=
date
(
"Y-m-d"
,
time
());
$tModel
=
new
TLookShopUser
();
$params
[
"user_id"
]
=
$user_id
;
$params
[
"type"
]
=
$type
;
$params
[
"house_id"
]
=
$house_id
;
$params
[
"look_day"
]
=
$day
;
$params
[
"source"
]
=
$day
;
$result
=
$tModel
->
getList
(
$params
,
"a.id"
,
1
,
1
);
if
(
count
(
$result
)
>
0
)
{
return
false
;
}
$arr
=
array
(
"user_id"
=>
$user_id
,
"type"
=>
$type
,
"house_id"
=>
$house_id
,
"look_day"
=>
$day
,
"source"
=>
$day
,
"create_time"
=>
date
(
"Y-m-d H:i:s"
,
time
()),
"update_time"
=>
date
(
"Y-m-d H:i:s"
,
time
()),
);
$tModel
->
addLookShop
(
$arr
);
return
true
;
}
}
}
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