Commit 1cdc6935 by biao

1

parent 314b3f66
...@@ -168,35 +168,37 @@ Create INDEX circle_dat_title_idx ON circle_dat(title); ...@@ -168,35 +168,37 @@ Create INDEX circle_dat_title_idx ON circle_dat(title);
Create INDEX circle_dat_owner_id_idx ON circle_dat(owner_id); Create INDEX circle_dat_owner_id_idx ON circle_dat(owner_id);
##----circle_member_dat create ##----circle_notice_dat create
DROP TABLE IF EXISTS circle_member_dat; DROP TABLE IF EXISTS circle_notice_dat;
CREATE TABLE IF NOT EXISTS circle_member_dat( CREATE TABLE IF NOT EXISTS circle_notice_dat(
id bigint unsigned NOT NULL PRIMARY KEY auto_increment, id bigint unsigned NOT NULL PRIMARY KEY auto_increment,
registration_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, registration_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
circle_id int8 NOT NULL DEFAULT '0', circle_id int8 NOT NULL DEFAULT '0',
user_id int8 NOT NULL DEFAULT '0', title varchar(128) NOT NULL,
name varchar(64), comment text,
image text,
delete_flg tinyint(1) NOT NULL DEFAULT '0' delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4; ) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX circle_member_dat_circle_id_idx ON circle_member_dat(circle_id); Create INDEX circle_notice_dat_circle_id_idx ON circle_notice_dat(circle_id);
Create INDEX circle_member_dat_user_id_idx ON circle_member_dat(user_id);
##----circle_notice_dat create
DROP TABLE IF EXISTS circle_notice_dat; ##----circle_member_dat create
CREATE TABLE IF NOT EXISTS circle_notice_dat(
DROP TABLE IF EXISTS circle_member_dat;
CREATE TABLE IF NOT EXISTS circle_member_dat(
id bigint unsigned NOT NULL PRIMARY KEY auto_increment, id bigint unsigned NOT NULL PRIMARY KEY auto_increment,
registration_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, registration_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
circle_id int8 NOT NULL DEFAULT '0', circle_id int8 NOT NULL DEFAULT '0',
title varchar(128) NOT NULL, user_id int8 NOT NULL DEFAULT '0',
comment text, name varchar(64),
image text,
delete_flg tinyint(1) NOT NULL DEFAULT '0' delete_flg tinyint(1) NOT NULL DEFAULT '0'
) ENGINE = INNODB DEFAULT CHARSET=utf8mb4; ) ENGINE = INNODB DEFAULT CHARSET=utf8mb4;
Create INDEX circle_notice_dat_circle_id_idx ON circle_notice_dat(circle_id); Create INDEX circle_member_dat_circle_id_idx ON circle_member_dat(circle_id);
Create INDEX circle_member_dat_user_id_idx ON circle_member_dat(user_id);
##----user_mst create ##----user_mst create
...@@ -210,6 +212,7 @@ CREATE TABLE IF NOT EXISTS user_mst( ...@@ -210,6 +212,7 @@ CREATE TABLE IF NOT EXISTS user_mst(
openid varchar(64) NOT NULL, openid varchar(64) NOT NULL,
unionid varchar(64) NOT NULL, unionid varchar(64) NOT NULL,
name varchar(64), name varchar(64),
header_img text,
mobile varchar(32), mobile varchar(32),
account_id int8 NOT NULL DEFAULT '0', account_id int8 NOT NULL DEFAULT '0',
child_age int8 NOT NULL DEFAULT '1', child_age int8 NOT NULL DEFAULT '1',
......
1. 小程序开发者账号 1. 小程序开发者账号
1. 小程序开发者账号 1. 小程序开发者账号
2.小程序开发者后台开通地图插件 2.小程序开发者后台开通地图插件
4.小程序后台需要加服务器ip白名单,生成二维码用 4.小程序后台需要加服务器ip白名单,生成二维码用
3.腾讯lbs账号,设定为 ip白名单的验证方式 3.腾讯lbs账号,设定为 ip白名单的验证方式
4.阿里云oss key 4.阿里云oss key
5.小程序绑定对应公众号 5.小程序绑定对应公众号
...@@ -14,6 +14,7 @@ class UserMst extends CompassDynamicData ...@@ -14,6 +14,7 @@ class UserMst extends CompassDynamicData
var $openid; var $openid;
var $unionid; var $unionid;
var $name; var $name;
var $header_img;
var $mobile; var $mobile;
var $account_id; var $account_id;
var $child_age; var $child_age;
...@@ -56,6 +57,7 @@ class UserMst extends CompassDynamicData ...@@ -56,6 +57,7 @@ class UserMst extends CompassDynamicData
$this->openid = $record["openid"]; $this->openid = $record["openid"];
$this->unionid = $record["unionid"]; $this->unionid = $record["unionid"];
$this->name = $record["name"]; $this->name = $record["name"];
$this->header_img = $record["header_img"];
$this->mobile = $record["mobile"]; $this->mobile = $record["mobile"];
$this->account_id = $record["account_id"]; $this->account_id = $record["account_id"];
$this->child_age = $record["child_age"]; $this->child_age = $record["child_age"];
...@@ -150,6 +152,7 @@ class UserMst extends CompassDynamicData ...@@ -150,6 +152,7 @@ class UserMst extends CompassDynamicData
ParamUtil::copyObj2Array($v_param, $this, "openid"); ParamUtil::copyObj2Array($v_param, $this, "openid");
ParamUtil::copyObj2Array($v_param, $this, "unionid"); ParamUtil::copyObj2Array($v_param, $this, "unionid");
ParamUtil::copyObj2ArrayNullField($v_param, $this, "name"); ParamUtil::copyObj2ArrayNullField($v_param, $this, "name");
ParamUtil::copyObj2ArrayNullField($v_param, $this, "header_img");
ParamUtil::copyObj2ArrayNullField($v_param, $this, "mobile"); ParamUtil::copyObj2ArrayNullField($v_param, $this, "mobile");
ParamUtil::copyObj2Array($v_param, $this, "account_id"); ParamUtil::copyObj2Array($v_param, $this, "account_id");
ParamUtil::copyObj2Array($v_param, $this, "child_age"); ParamUtil::copyObj2Array($v_param, $this, "child_age");
......
<?php
// 获取用户本人参加的志愿者活动列表
require_once ("../user_include.inc");
ErrorLogger::doOutput("Compass...ajax_get_my_event_list.php....Start.", 0);
//获取参数
$unionId = ParamUtil::getRequestString("unionId");
$result = array();
//参数检查
if(empty($unionId)) {
$result["message"] = "参数错误!";
responseNG($result);
}
//判断用户是否存在
$param = array();
$param['unionid'] = $unionId;
$param['delete_flg'] = false;
$userList = UserMst::getList($param,'id','desc', 0, 1);
if(empty($userList)) {
$result["message"] = "用户不存在!";
responseNG($result);
}
$userMst = $userList[0];
//查询用户参加的活动列表
$myEventList = array();
$param = array();
$param['user_id'] = $userMst->id;
$param['delete_flg'] = false;
$volunteerEventMemberList = VolunteerEventMemberDat::getList($param,'id','desc');
if(!empty($volunteerEventMemberList)) {
foreach($volunteerEventMemberList as $tmp) {
$volunteerEventDat = VolunteerEventDat::getById($tmp->volunteer_event_id);
if(!empty($volunteerEventDat)) {
$myEventList[] = $volunteerEventDat;
}
}
}
//组装返回数据
$result["myEventList"] = $myEventList;
ErrorLogger::doOutput("Compass...ajax_get_my_event_list.php....End.", 0);
//返回结果
responseOK($result);
function responseNG($result) {
$result = array("status"=>"NG", "result"=>$result);
print json_encode($result);
exit;
}
function responseOK($result) {
$result = array("status"=>"OK", "result"=>$result);
print json_encode($result);
exit;
}
?>
\ No newline at end of file
<?php
// 获取用户首页的数据
require_once ("../user_include.inc");
ErrorLogger::doOutput("Compass...ajax_get_my_top_dat.php....Start.", 0);
//获取参数
$unionId = ParamUtil::getRequestString("unionId");
$result = array();
//参数检查
if(empty($unionId)) {
$result["message"] = "参数错误!";
responseNG($result);
}
//判断用户是否存在
$param = array();
$param['unionid'] = $unionId;
$param['delete_flg'] = false;
$userList = UserMst::getList($param,'id','desc', 0, 1);
if(empty($userList)) {
$result["message"] = "用户不存在!";
responseNG($result);
}
$userMst = $userList[0];
//组装返回数据
$result["name"] = $userMst->name;
$result["headerImg"] = $userMst->header_img;
$result["abilityPoint"] = $userMst->ability_point;
$result["servicePoint"] = $userMst->service_point;
ErrorLogger::doOutput("Compass...ajax_get_my_top_dat.php....End.", 0);
//返回结果
responseOK($result);
function responseNG($result) {
$result = array("status"=>"NG", "result"=>$result);
print json_encode($result);
exit;
}
function responseOK($result) {
$result = array("status"=>"OK", "result"=>$result);
print json_encode($result);
exit;
}
?>
\ No newline at end of file
<?php
// 根据圈子名称检索圈子
require_once ("../user_include.inc");
ErrorLogger::doOutput("Compass...ajax_get_search_circle_list.php....Start.", 0);
//获取参数
$unionId = ParamUtil::getRequestString("unionId");
$keywords = ParamUtil::getRequestString("keywords");//关键词
$result = array();
//参数检查
if(empty($unionId) || empty($keywords)) {
$result["message"] = "参数错误!";
responseNG($result);
}
//判断用户是否存在
$param = array();
$param['unionid'] = $unionId;
$param['delete_flg'] = false;
$userList = UserMst::getList($param,'id','desc', 0, 1);
if(empty($userList)) {
$result["message"] = "用户不存在!";
responseNG($result);
}
$userMst = $userList[0];
//根据关键词 查询圈子
$circleList = array();
//查询圈子列表
$param = array();
$param['title_ALT'] = "%" . $keywords . "%";
$param['delete_flg'] = false;
$circleList = CircleDat::getList($param,'id','desc');
//组装返回数据
$result["circleList"] = $circleList;
ErrorLogger::doOutput("Compass...ajax_get_search_circle_list.php....End.", 0);
//返回结果
responseOK($result);
function responseNG($result) {
$result = array("status"=>"NG", "result"=>$result);
print json_encode($result);
exit;
}
function responseOK($result) {
$result = array("status"=>"OK", "result"=>$result);
print json_encode($result);
exit;
}
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment