123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <?php
- namespace Main\Src;
- use Dever;
- use Main\Lib\Core;
- class User extends Core
- {
- //protected $checkUser = true;
- # 我的页面
- public function my()
- {}
- # 分享
- public function submit_share()
- {
- $id = Dever::input('id');
- if (!$id) {
- Dever::alert('错误的ID');
- }
- $type = Dever::input('type');
- if (!$type) {
- Dever::alert('错误的类型');
- }
- Dever::load('act/lib/share')->submit($this->data['uid'], $id, $type);
- return array('id' => $id, 'type' => $type);
- }
- # 回流
- public function submit_share_reflux()
- {
- $source_signature = Dever::input('source_signature');
- if (!$source_signature) {
- Dever::alert('错误的来源uid');
- }
- $user = Dever::loginResult($source_signature, false);
- if (!isset($user['uid'])) {
- //Dever::alert('错误的来源uid');
- }
- $source_uid = $user['uid'];
- $source_uid = 1;
- $id = Dever::input('id');
- if (!$id) {
- Dever::alert('错误的ID');
- }
- $type = Dever::input('type');
- if (!$type) {
- Dever::alert('错误的类型');
- }
- Dever::load('act/lib/share')->submit_reflux($source_uid, $id, $type, $this->data['uid']);
- return array('id' => $id, 'type' => $type);
- }
- # 点赞
- public function submit_up()
- {
- $id = Dever::input('id');
- if (!$id) {
- Dever::alert('错误的ID');
- }
- $type = Dever::input('type');
- if (!$type) {
- Dever::alert('错误的类型');
- }
- Dever::load('act/lib/like')->submit($this->data['uid'], $id, $type);
- return array('id' => $id, 'type' => $type);
- }
- # 预约提醒
- public function submit_note()
- {
- $id = Dever::input('id');
- if (!$id) {
- Dever::alert('错误的ID');
- }
- $type = Dever::input('type');
- if (!$type) {
- Dever::alert('错误的类型');
- }
- Dever::load('act/lib/note')->submit($this->data['uid'], $id, $type);
- return array('id' => $id, 'type' => $type);
- }
- # 发布评论
- public function submit_comment()
- {
- $id = Dever::input('id');
- if (!$id) {
- Dever::alert('错误的ID');
- }
- $type = Dever::input('type');
- if (!$type) {
- Dever::alert('错误的类型');
- }
- $content = Dever::input('content');
- if (!$content) {
- Dever::alert('错误的内容');
- }
- Dever::load('act/lib/comment')->submit($this->data['uid'], $id, $type, $content);
- return array('id' => $id, 'type' => $type);
- }
- }
|