修复了滚动栏的bug,消息未解决
This commit is contained in:
@@ -29,9 +29,9 @@ class AdminController extends Controller
|
||||
$data['users'] = User::orderby('id', 'asc')->get();
|
||||
$data['cats'] = GoodCat::orderby('cat_name', 'asc')->get();
|
||||
$data['announcements'] = Announcement::orderby('id', 'dsc')->get();
|
||||
$data['reports'] = Ticket::where('type', '2')->orderby('id', 'dsc')->paginate(16);
|
||||
$data['users'] = User::orderby('id', 'asc')->paginate(16);
|
||||
$data['trans'] = Transaction::orderby('id', 'asc')->paginate(16);
|
||||
$data['reports'] = Ticket::where('type', '2')->orderby('id', 'dsc')->paginate(40);
|
||||
$data['users'] = User::orderby('id', 'asc')->paginate(40);
|
||||
$data['trans'] = Transaction::orderby('id', 'asc')->paginate(40);
|
||||
return View::make('admin.index')->with($data);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,16 @@ class MessageController extends Controller
|
||||
{
|
||||
public function showMessageView(Request $request)
|
||||
{
|
||||
$user_id = $request->session()->get('user_id');
|
||||
$post_data = 'user_id='.$user_id.'';
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, '127.0.0.1:6565/notify');
|
||||
curl_setopt($ch, CURLOPT_HEADER, 1);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
|
||||
$output = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return View::make('message.message');
|
||||
}
|
||||
|
||||
@@ -39,16 +49,6 @@ class MessageController extends Controller
|
||||
MessageContact::where('user_id', $user_id)
|
||||
->where('contact_id', $contact_id)
|
||||
->update(['unread_count' => 0]);
|
||||
$user_id = $request->session()->get('user_id');
|
||||
$post_data = 'user_id='.$user_id.'';
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, '127.0.0.1:6565/notify');
|
||||
curl_setopt($ch, CURLOPT_HEADER, 1);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
|
||||
$output = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
return json_encode($messages);
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@ class Transaction extends Model
|
||||
|
||||
public function getSellerIdAttribute()
|
||||
{
|
||||
return $this->good->user_id;
|
||||
if($this->good != NULL)
|
||||
return $this->good->user_id;
|
||||
}
|
||||
|
||||
public function seller()
|
||||
|
||||
+2
-2
@@ -38,9 +38,9 @@ class User extends Model
|
||||
{
|
||||
$len=strlen($this->stuid);
|
||||
$ans = "";
|
||||
$ans = $ans . ($this->stuid)[0];
|
||||
$ans = $ans . substr($this->stuid, 0, 1);
|
||||
for($i=1; $i<($len-1); $i++) $ans = $ans . '*';
|
||||
$ans = $ans . ($this->stuid)[$len-1];
|
||||
$ans = $ans . substr($this->stuid, -1);
|
||||
return $ans;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user