作者 谢百川

全部完成

... ... @@ -75,7 +75,6 @@ class Article extends Api
public function getArticleList()
{
$myId = $this->auth->id;
$myId = 1;
$universityId = $this->request->param('university_id', 0, 'int');
... ... @@ -98,29 +97,23 @@ class Article extends Api
$this->error('您的提交有误');
}
$type = 1;
if($type) { // 学校限制
if(!in_array($type, [1, 2, 3])) {
$this->error('您的提交有误');
}
$schoolIds = [];
// 获取学长
if($type = 1) {
$schoolIds = [$studentInfo['school_id']];
} elseif ($type = 2) {
$school = new School();
$schoolInfo = $school->infoById($studentInfo['school_id']);
$schoolIds = $school->listByCityId($schoolInfo['city_id']);
} elseif ($type = 3) {
$school = new School();
$schoolInfo = $school->infoById($studentInfo['school_id']);
$schoolIds = $school->listByProvinceId($schoolInfo['province_id']);
}
$type = bcadd($studentInfo['vip_level'], 1, 0);
$schoolIds = [];
// 获取学长
if($type = 1) {
$schoolIds = [$studentInfo['school_id']];
} elseif ($type = 2) {
$school = new School();
$schoolInfo = $school->infoById($studentInfo['school_id']);
$schoolIds = $school->listByCityId($schoolInfo['city_id']);
} elseif ($type = 3) {
$school = new School();
$schoolInfo = $school->infoById($studentInfo['school_id']);
$schoolIds = $school->listByProvinceId($schoolInfo['province_id']);
}
if($schoolIds) {
$where['b.school_id'] = ['in', $schoolIds];
}
if($schoolIds) {
$where['b.school_id'] = ['in', $schoolIds];
}
if($universityId) {
... ... @@ -227,7 +220,6 @@ class Article extends Api
public function getArticleInfo()
{
$userId = $this->auth->id;
$userId = 1;
$articleId = $this->request->param('article_id', 0, 'int');
if(!$articleId) {
... ... @@ -299,7 +291,6 @@ class Article extends Api
public function likeArticle()
{
$userId = $this->auth->id;
$userId = 1;
$articleId = $this->request->param('article_id', 0, 'int');
if(!$articleId) {
... ... @@ -344,7 +335,6 @@ class Article extends Api
public function delLookArticle()
{
$userId = $this->auth->id;
$userId = 1;
$lookArticle = new LookArticle();
$res = $lookArticle->updateSomeByUserId($userId, ['deletetime' => time()]);
... ... @@ -413,7 +403,6 @@ class Article extends Api
public function getMyLikeArticle()
{
$userId = $this->auth->id;
$userId = 2;
$page = $this->request->param('page', 0, 'int');
$size = $this->request->param('size', 0, 'int');
... ... @@ -493,7 +482,6 @@ class Article extends Api
public function addArticle()
{
$userId = $this->auth->id;
$userId = 1;
$title = $this->request->param('title', '', 'string');
if(!$title) {
... ... @@ -600,7 +588,6 @@ class Article extends Api
public function getMyArticle()
{
$userId = $this->auth->id;
$userId = 1;
$page = $this->request->param('page', 1, 'int');
$size = $this->request->param('size', 10, 'int');
... ...
... ... @@ -39,7 +39,6 @@ class Mes extends Api
public function sendMes()
{
$useraId = $this->auth->id;
$useraId = 1;
$userbId = $this->request->param('userb_id', 0, 'int');
$desContent = $this->request->param('des_content', '', 'string');
... ... @@ -121,7 +120,6 @@ class Mes extends Api
public function getMyMes()
{
$userId = $this->auth->id;
$userId = 1;
$page = $this->request->param('page', 1, 'int');
$size = $this->request->param('size', 10, 'int');
... ... @@ -168,7 +166,6 @@ class Mes extends Api
public function isReadMes()
{
$userId = $this->auth->id;
$userId = 1;
$useraId = $this->request->param('usera_id', 0, 'int');
if(!$useraId) {
... ...
... ... @@ -39,7 +39,6 @@ class Money extends Api
public function getStudentMoney()
{
$userId = $this->auth->id;
$userId = 1;
$user = new UserModel();
$userInfo = $user->infoById($userId);
... ... @@ -83,7 +82,6 @@ class Money extends Api
public function listMoneyLog()
{
$userId = $this->auth->id;
$userId = 1;
$page = $this->request->param('page', 1, 'int');
$size = $this->request->param('size', 10, 'int');
... ... @@ -118,7 +116,6 @@ class Money extends Api
public function gotMoney()
{
$userId = $this->auth->id;
$userId = 1;
$money = $this->request->param('money', 0, 'float');
$money = bcmul($money, 1, 2);
... ...
... ... @@ -37,7 +37,6 @@ class Register extends Api
public function isRegister()
{
$userId = $this->auth->id;
$userId = 1;
$student = new Student();
$studentInfo = $student->infoByUserId($userId);
... ... @@ -80,7 +79,6 @@ class Register extends Api
public function register()
{
$userId = $this->auth->id;
$userId = 2;
$student = new Student();
$studentInfo = $student->infoByUserId($userId);
... ...
... ... @@ -79,7 +79,6 @@ class Student extends Api
public function getStudentList()
{
$userId = $this->auth->id;
$userId = 1;
$page = $this->request->param('page', 1, 'int');
$size = $this->request->param('size', 10, 'int');
... ... @@ -104,13 +103,19 @@ class Student extends Api
$schoolIds = [];
// 获取学长
if($type = 1) {
if($type == 1) {
$schoolIds = [$studentInfo['school_id']];
} elseif ($type = 2) {
} elseif ($type == 2) {
if(bcadd($studentInfo['vip_level'], 1, 0) < $type) {
$this->error('需要买市卡');
}
$school = new School();
$schoolInfo = $school->infoById($studentInfo['school_id']);
$schoolIds = $school->listByCityId($schoolInfo['city_id']);
} elseif ($type = 3) {
} elseif ($type == 3) {
if(bcadd($studentInfo['vip_level'], 1, 0) < $type) {
$this->error('需要买省卡');
}
$school = new School();
$schoolInfo = $school->infoById($studentInfo['school_id']);
$schoolIds = $school->listByProvinceId($schoolInfo['province_id']);
... ... @@ -269,7 +274,6 @@ class Student extends Api
public function getStudentInfo()
{
$myId = $this->auth->id;
$myId = 1;
$userId = $this->request->param('user_id', 0, 'int');
if(!$userId) {
... ... @@ -364,7 +368,6 @@ class Student extends Api
public function likeStudent()
{
$useraId = $this->auth->id;
$useraId = 1;
$userbId = $this->request->param('userb_id', 0, 'int');
if(!$userbId) {
... ... @@ -436,7 +439,6 @@ class Student extends Api
public function getMyInfo()
{
$userId = $this->auth->id;
$userId = 1;
$student = new StudentModel();
$studentInfo = $student->infoByUserIdCanShow($userId);
... ... @@ -497,7 +499,6 @@ class Student extends Api
*/
public function getMyLikeStudent(){
$userId = $this->auth->id;
$userId = 1;
$page = $this->request->param('page', 0, 'int');
$size = $this->request->param('size', 0, 'int');
... ...
... ... @@ -47,7 +47,6 @@ class Thank extends Api
}
$userId = $this->auth->id;
$userId = 1;
//open_id
$third = new Third();
... ...
... ... @@ -145,7 +145,6 @@ class University extends Api
public function getMyLikeUniversity()
{
$userId = $this->auth->id;
$userId = 1;
$page = $this->request->param('page', 1, 'int');
$size = $this->request->param('size', 10, 'int');
... ... @@ -176,7 +175,6 @@ class University extends Api
public function likeUniversity()
{
$userId = $this->auth->id;
$userId = 1;
$universityId = $this->request->param('university_id', 0, 'int');
if(!$universityId) {
... ... @@ -334,7 +332,6 @@ class University extends Api
public function getUniversityInfo()
{
$userId = $this->auth->id;
$userId = 1;
$universityId = $this->request->param('university_id', 0, 'int');
if(!$universityId) {
... ...
... ... @@ -55,7 +55,6 @@ class Vip extends Api
public function getVipConf()
{
$userId = $this->auth->id;
$userId = 1;
$student = new StudentModel();
$studentInfo = $student->infoByUserIdCanShow($userId);
... ... @@ -92,7 +91,6 @@ class Vip extends Api
public function buyVip()
{
$userId = $this->auth->id;
$userId = 1;
$vipId = $this->request->param('vip_id', 0, 'int');
if(!$vipId) {
... ...
... ... @@ -10878,7 +10878,7 @@
<div class="row mt0 footer">
<div class="col-md-6" align="left">
Generated on 2020-04-14 14:50:42 </div>
Generated on 2020-04-14 15:18:01 </div>
<div class="col-md-6" align="right">
<a href="./" target="_blank">我的网站</a>
</div>
... ...