Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
konukk committed Jan 12, 2015
1 parent 7e46ea5 commit 5009096
Show file tree
Hide file tree
Showing 6 changed files with 1,368 additions and 1,311 deletions.
1,309 changes: 13 additions & 1,296 deletions Im.html

Large diffs are not rendered by default.

Binary file added image/component.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 23 additions & 14 deletions rosters.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
<?php

$res = array(
'me' => array('id'=>1, 'image'=>'./image/user/1.jpg', 'name'=>'kink'),
'rosters' => array(
array('id'=>2, 'image'=>'./image/user/2.jpg', 'name'=>'用户2'),
array('id'=>3, 'image'=>'./image/user/3.jpg', 'name'=>'用户3'),
array('id'=>4, 'image'=>'./image/user/4.jpg', 'name'=>'用户4'),
array('id'=>5, 'image'=>'./image/user/5.jpg', 'name'=>'用户5'),
array('id'=>6, 'image'=>'./image/user/6.jpg', 'name'=>'用户6'),
array('id'=>7, 'image'=>'./image/user/7.jpg', 'name'=>'用户7'),
array('id'=>8, 'image'=>'./image/user/8.jpg', 'name'=>'用户8'),
array('id'=>9, 'image'=>'./image/user/9.jpg', 'name'=>'用户9')
)
$id = empty($_GET['id']) ? 1 : $_GET['id'];

$rosters = array(
'1' => array('id'=>1, 'image'=>'./image/user/1.jpg', 'name'=>'艾伦', 'watch'=>'2,3,4,5,6,7,8,9'),
'2' => array('id'=>2, 'image'=>'./image/user/2.jpg', 'name'=>'毕维斯', 'watch'=>'1,4,7,8'),
'3' => array('id'=>3, 'image'=>'./image/user/3.jpg', 'name'=>'拜伦', 'watch'=>'1,2,6,5'),
'4' => array('id'=>4, 'image'=>'./image/user/4.jpg', 'name'=>'道格拉斯', 'watch'=>'7,8,9'),
'5' => array('id'=>5, 'image'=>'./image/user/5.jpg', 'name'=>'爱德华', 'watch'=>'4,6,8,9'),
'6' => array('id'=>6, 'image'=>'./image/user/6.jpg', 'name'=>'加布力尔', 'watch'=>'1,3,5,7,9'),
'7' => array('id'=>7, 'image'=>'./image/user/7.jpg', 'name'=>'雨果', 'watch'=>'2,4,5,8'),
'8' => array('id'=>8, 'image'=>'./image/user/8.jpg', 'name'=>'里斯特', 'watch'=>'1,4,6,7,9'),
'9' => array('id'=>9, 'image'=>'./image/user/9.jpg', 'name'=>'玛希', 'watch'=>'2,3,4,5,6,7,8')
);

echo json_encode($res);

$len = $id;

$res = array();
$res['me'] = $rosters[$id];

$ids = explode(',', $rosters[$id]['watch']);
foreach( $ids as $k=>$v ) {
$res['rosters'][] = $rosters[$v];
}

echo json_encode($res);
1,320 changes: 1,320 additions & 0 deletions script/green.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions script/green.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion signature.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

$watchs = explode(":", $watchIds);
sort($watchs, SORT_STRING);
$watchIds = $watchs;//explode(':', '2:20:25:28:4:5:7:8');
$watchIds = $watchs;

$ts = time();
$nonce = randomString();
Expand Down

0 comments on commit 5009096

Please sign in to comment.