Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
Compass
Overview
Overview
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
zong
Compass
Commits
f41164b5
Commit
f41164b5
authored
Feb 23, 2020
by
biao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
66b2110c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
93 additions
and
3 deletions
+93
-3
compass_db_schema.xlsx
doc/DB/compass_db_schema.xlsx
+0
-0
小程序文件命名以及接口调用说明.xlsx
doc/小程序文件命名以及接口调用说明.xlsx
+0
-0
接口文档 V1.0.xls
doc/接口文档 V1.0.xls
+0
-0
settings.inc
src/settings/settings.inc
+1
-0
ajax_get_top_dat.php
src/user/if/ajax_get_top_dat.php
+37
-3
ajax_social_user_register1.php
src/user/if/ajax_social_user_register1.php
+24
-0
ajax_test_lbs_api.php
src/user/if/ajax_test_lbs_api.php
+31
-0
No files found.
doc/DB/compass_db_schema.xlsx
View file @
f41164b5
No preview for this file type
doc/小程序文件命名以及接口调用说明.xlsx
View file @
f41164b5
No preview for this file type
doc/接口文档 V1.0.xls
View file @
f41164b5
No preview for this file type
src/settings/settings.inc
View file @
f41164b5
...
@@ -57,6 +57,7 @@ define("WECHAT_PAY_KEY","a1b2c3defghijKlmnopqrstuvwx4y5z6");
...
@@ -57,6 +57,7 @@ define("WECHAT_PAY_KEY","a1b2c3defghijKlmnopqrstuvwx4y5z6");
//腾讯lbs
//腾讯lbs
define
(
"LBS_KEY"
,
"TMJBZ-MTX3G-MPFQT-INGZP-VQVTK-WLFM3"
);
define
(
"LBS_KEY"
,
"TMJBZ-MTX3G-MPFQT-INGZP-VQVTK-WLFM3"
);
define
(
"LBS_SECRET"
,
"BYLkXP9bZaQhI1ELr6HWkHRuKm1YPU"
);
// 固定テンプレート用ディレクトリ
// 固定テンプレート用ディレクトリ
define
(
"SCHOOL_TEMPLATE_DIR"
,
COMPASS_ROOT
.
"/school/templates"
);
define
(
"SCHOOL_TEMPLATE_DIR"
,
COMPASS_ROOT
.
"/school/templates"
);
...
...
src/user/if/ajax_get_top_dat.php
View file @
f41164b5
...
@@ -51,8 +51,6 @@ if($userMst->role == 1) {
...
@@ -51,8 +51,6 @@ if($userMst->role == 1) {
$param
[
'original_source'
]
=
$userMst
->
school_no
;
$param
[
'original_source'
]
=
$userMst
->
school_no
;
$param
[
'delete_flg'
]
=
false
;
$param
[
'delete_flg'
]
=
false
;
$familyEventList
=
FamilyEventDat
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
$familyEventList
=
FamilyEventDat
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
}
}
//[2:家校用户]
//[2:家校用户]
...
@@ -66,7 +64,43 @@ if($userMst->role == 1) {
...
@@ -66,7 +64,43 @@ if($userMst->role == 1) {
$param
[
'delete_flg'
]
=
false
;
$param
[
'delete_flg'
]
=
false
;
$socialEventList
=
SocialEventDat
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
$socialEventList
=
SocialEventDat
::
getList
(
$param
,
'id'
,
'desc'
,
0
,
1
);
//亲子活动
//亲子活动【家校用户无亲子活动】
//公益课堂
}
//[3:高职用户]
if
(
$userMst
->
role
==
1
)
{
//志愿者活动
//社会实践【高职用户无亲子活动】
//亲子活动【高职用户无亲子活动】
//公益课堂
}
//[4:教育局领导]
if
(
$userMst
->
role
==
1
)
{
//志愿者活动
//社会实践【高职用户无亲子活动】
//亲子活动【高职用户无亲子活动】
//公益课堂
}
//[5:社会用户]
if
(
$userMst
->
role
==
1
)
{
//志愿者活动
//社会实践【高职用户无亲子活动】
//亲子活动【高职用户无亲子活动】
//公益课堂
}
//[6:机构用户]
if
(
$userMst
->
role
==
1
)
{
//志愿者活动
//社会实践【高职用户无亲子活动】
//亲子活动【高职用户无亲子活动】
//公益课堂
//公益课堂
}
}
...
...
src/user/if/ajax_social_user_register1.php
View file @
f41164b5
...
@@ -11,6 +11,8 @@ $legalPerson = ParamUtil::getRequestString("legalPerson");
...
@@ -11,6 +11,8 @@ $legalPerson = ParamUtil::getRequestString("legalPerson");
$organizationContact
=
ParamUtil
::
getRequestNumber
(
"organizationContact"
);
$organizationContact
=
ParamUtil
::
getRequestNumber
(
"organizationContact"
);
$openId
=
ParamUtil
::
getRequestString
(
"openId"
);
$openId
=
ParamUtil
::
getRequestString
(
"openId"
);
$unionId
=
ParamUtil
::
getRequestString
(
"unionId"
);
$unionId
=
ParamUtil
::
getRequestString
(
"unionId"
);
$longitude
=
ParamUtil
::
getRequestString
(
"longitude"
);
//用户位置的经度
$latitude
=
ParamUtil
::
getRequestString
(
"latitude"
);
//用户位置的纬度
ErrorLogger
::
doOutput
(
"Compass...ajax_social_user_register1.php....name="
.
$name
,
0
);
ErrorLogger
::
doOutput
(
"Compass...ajax_social_user_register1.php....name="
.
$name
,
0
);
ErrorLogger
::
doOutput
(
"Compass...ajax_social_user_register1.php....mobile="
.
$mobile
,
0
);
ErrorLogger
::
doOutput
(
"Compass...ajax_social_user_register1.php....mobile="
.
$mobile
,
0
);
...
@@ -35,6 +37,21 @@ if(!empty($userList)) {
...
@@ -35,6 +37,21 @@ if(!empty($userList)) {
responseOK
(
$result
);
responseOK
(
$result
);
}
}
//调用腾讯LGS服务解析用户地址信息
$tmpUrl
=
'/ws/geocoder/v1?key='
.
LBS_KEY
.
'&location='
.
$latitude
.
','
.
$longitude
.
LBS_SECRET
;
$md5Str
=
md5
(
$tmpUrl
);
$lbsUrl
=
'https://apis.map.qq.com/ws/geocoder/v1?key='
.
LBS_KEY
.
'&location='
.
$latitude
.
','
.
$longitude
.
'&sig='
.
$md5Str
;
$lbsObj
=
file_get_contents
(
$lbsUrl
);
$jsonObj
=
json_decode
(
$lbsObj
);
//对JSON格式的字符串进行编码
$lbsArray
=
get_object_vars
(
$jsonObj
);
//转换成数组
$resultObj
=
$lbsArray
[
'result'
];
if
(
$lbsArray
[
'status'
]
==
"0"
&&
$resultObj
->
ad_info
->
nation_code
==
156
)
{
print_r
(
$resultObj
->
address_component
->
city
);
print_r
(
$resultObj
->
address_component
->
province
);
print_r
(
$resultObj
->
address_component
->
district
);
}
//用户数据插入
//用户数据插入
$userMst
=
new
UserMst
();
$userMst
=
new
UserMst
();
$userMst
->
school_no
=
$schoolNo
;
$userMst
->
school_no
=
$schoolNo
;
...
@@ -45,6 +62,13 @@ if(empty($legalPerson)) {
...
@@ -45,6 +62,13 @@ if(empty($legalPerson)) {
$userMst
->
role
=
6
;
//社会用户[机构]
$userMst
->
role
=
6
;
//社会用户[机构]
}
}
//地理位置获取正常的情况下设定。 156:中国代码
if
(
$lbsArray
[
'status'
]
==
"0"
&&
$resultObj
->
ad_info
->
nation_code
==
156
)
{
$userMst
->
province
=
$resultObj
->
address_component
->
province
;
$userMst
->
city
=
$resultObj
->
address_component
->
city
;
$userMst
->
district
=
$resultObj
->
address_component
->
district
;
}
$userMst
->
openid
=
$openId
;
$userMst
->
openid
=
$openId
;
$userMst
->
unionid
=
$unionId
;
$userMst
->
unionid
=
$unionId
;
$userMst
->
name
=
$name
;
$userMst
->
name
=
$name
;
...
...
src/user/if/ajax_test_lbs_api.php
0 → 100644
View file @
f41164b5
<?
// 社会用户注册1【非机构】
require_once
(
"../user_include.inc"
);
ErrorLogger
::
doOutput
(
"Compass...ajax_social_user_register1.php....Start."
,
0
);
$longitude
=
"121.54409"
;
//用户位置的经度
$latitude
=
"31.22114"
;
//用户位置的纬度
//调用腾讯LGS服务解析用户地址信息
$tmpUrl
=
'/ws/geocoder/v1?key='
.
LBS_KEY
.
'&location='
.
$latitude
.
','
.
$longitude
.
LBS_SECRET
;
$md5Str
=
md5
(
$tmpUrl
);
$lbsUrl
=
'https://apis.map.qq.com/ws/geocoder/v1?key='
.
LBS_KEY
.
'&location='
.
$latitude
.
','
.
$longitude
.
'&sig='
.
$md5Str
;
$lbsObj
=
file_get_contents
(
$lbsUrl
);
$jsonObj
=
json_decode
(
$lbsObj
);
//对JSON格式的字符串进行编码
$lbsArray
=
get_object_vars
(
$jsonObj
);
//转换成数组
$resultObj
=
$lbsArray
[
'result'
];
$userMst
=
new
UserMst
();
if
(
$lbsArray
[
'status'
]
==
"0"
&&
$resultObj
->
ad_info
->
nation_code
==
156
)
{
$userMst
->
province
=
$resultObj
->
address_component
->
province
;
$userMst
->
city
=
$resultObj
->
address_component
->
city
;
$userMst
->
district
=
$resultObj
->
address_component
->
district
;
}
print_r
(
$userMst
);
?>
\ 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