1
0
Files
2020-08-06 14:58:51 +08:00

77 lines
2.1 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +------------------------------------------------+
// |http://www.cjango.com |
// +------------------------------------------------+
// | 修复BUG不是一朝一夕的事情等我喝醉了再说吧 |
// +------------------------------------------------+
// | Author: 小陈叔叔 <Jason.Chen> |
// +------------------------------------------------+
namespace app\mobile\controller;
use app\common\model\MemberInfo as MemberInfoModel;
use app\common\service\Member as MemberService;
use app\common\service\Message as MessageService;
class Qrcode extends Center
{
public function index()
{
if (UID == $this->shareUser['uid']) {
$this->info = $this->user->info;
} else {
$this->info = $this->shareUser;
$user = MemberInfoModel::where('uid', $this->shareUser['uid'])->find();
$user->setInc('click');
}
return $this->fetch();
}
/**
* 留言
* @param string $uid [description]
* @return [type] [description]
*/
public function comment($uid = '')
{
if (IS_POST) {
$data = $this->request->post();
$res = MessageService::send($data, UID);
return $this->back($res);
} else {
$this->list = MessageService::getList($uid);
return $this->fetch();
}
}
// 点赞
public function tags($uid)
{
$res = MessageService::tags($uid);
if ($res === true) {
return $this->success();
} else {
return $this->error($res);
}
}
// 写签名
public function signature()
{
$signature = $this->request->post('signature');
$res = MemberService::editInfo(UID, ['signature' => $signature], 'signature');
if ($res === true) {
return $this->success('添加成功');
} else {
return $this->error($res);
}
}
//删除
public function del($id)
{
$res = MessageService::del($id);
return $this->back($res);
}
}