<?php
function counttime($time){
$now = time();
$time = strtotime($time);
$subtime = $now - $time;
$return = "刚刚";
if($subtime < 60){
} elseif($subtime < 3600) {
//显示分钟
$return = floor($subtime/(60*1)) . "分钟前";
} elseif($subtime < (3600*24)) {
//显示小时
$return = floor($subtime/(3600*1)) . "小时前";
} elseif($subtime < (3600*24*30)) {
//显示天
$return = floor($subtime/(3600*24)) . "天前";
} elseif($subtime < (3600*24*365)) {
//显示月
$return = floor($subtime/(3600*24*30)) . "个月前";
} elseif($subtime < (3600*24*365*1000)) {
//显示年
$return = floor($subtime/(3600*24*365)) . "年前";
}
return $return;
}
?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0">
<title>朋友圈</title>
<link rel="stylesheet" href="./css/app.css">
<link rel="stylesheet" href="./css/weui.min.css">
<link rel="stylesheet" href="./css/jquery-weui.min.css">
<script type="text/javascript" src="./js/iscroll-probe.js"></script>
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/jquery-weui.min.js"></script>
<!-- <script type="text/javascript" src="./js/jquery-weui-preload.js"></script> -->
<script type="text/javascript">
var items_per_page = 10;
var scroll_in_progress = false;
var myScroll;
var auto_increament = 1;
load_content = function(refresh, next_page) {
// This is a DEMO function which generates DEMO content into the scroller.
// Here you should place your AJAX request to fetch the relevant content (e.g. $.post(...))
console.log(refresh, next_page);
var time = 1000;
if (next_page == undefined || next_page == "undefined" || next_page == null)
{
time = 100;
}
setTimeout(function() {
// This immitates the CALLBACK of your AJAX function
if (!refresh) {
// Loading the initial content
for (var i=0; i<2; i++)
{
//$('#wrapper > #scroller > ul').append('<li class="temp_li">初始化的数据'+(auto_increament+i)+'</li>');
$('#wrapper > #scroller > ul').append('<li></li>');
auto_increament++;
}
} else if (refresh && !next_page) {
// Refreshing the content
/*
$('#wrapper > #scroller > ul').html('');
for (var i=0; i<10; i++)
{
$('#wrapper > #scroller > ul').append('<li>下拉刷新的数据'+(auto_increament+i)+'</li>');
auto_increament++;
}
*/
} else if (refresh && next_page) {
// Loading the next-page content and refreshing
for (var i=0; i<10; i++)
{
$('#wrapper > #scroller > ul').append('<li style="text-align:center;line-height: 40px;font-size: 14px;"><a href="http://weibo.com/208630004">点击打开我的微博</a>'+(auto_increament+i)+'</li>');
auto_increament++;
}
}
if (refresh) {
myScroll.refresh();
pullActionCallback();
} else {
if (myScroll) {
myScroll.destroy();
$(myScroll.scroller).attr('style', '');
// Required since the styles applied by IScroll might conflict with transitions of parent layers.
myScroll = null;
}
trigger_myScroll();
}
},
time);
};
function pullDownAction() {
load_content('refresh');
$('#wrapper > #scroller > ul').data('page', 1);
// Since "topOffset" is not supported with iscroll-5
$('#wrapper > .scroller').css({
top: 0
});
}
function pullUpAction(callback) {
if ($('#wrapper > #scroller > ul').data('page')) {
var next_page = parseInt($('#wrapper > #scroller > ul').data('page'), 10) + 1;
} else {
var next_page = 2;
}
load_content('refresh', next_page);
$('#wrapper > #scroller > ul').data('page', next_page);
if (callback) {
callback();
}
}
function pullActionCallback() {
if (pullDownEl && pullDownEl.className.match('loading')) {
pullDownEl.className = 'pullDown';
//pullDownEl.querySelector('.pullDownLabel').innerHTML = 'Pull down to refresh';
myScroll.scrollTo(0, parseInt(pullUpOffset) * ( - 1), 200);
} else if (pullUpEl && pullUpEl.className.match('loading')) {
$('.pullUp').removeClass('loading').html('');
}
}
var pullActionDetect = {
count: 0,
limit: 10,
check: function(count) {
if (count) {
pullActionDetect.count = 0;
}
// Detects whether the momentum has stopped,and if it has reached the end - 200px of the scroller - it trigger the pullUpAction
setTimeout(function() {
if (myScroll.y <= (myScroll.maxScrollY + 200) && pullUpEl && !pullUpEl.className.match('loading')) {
$('.pullUp').addClass('loading').html('<span class="pullUpIcon"> </span><span class="pullUpLabel">加载中……</span>');
pullUpAction();
} else if (pullActionDetect.count < pullActionDetect.limit) {
pullActionDetect.check();
pullActionDetect.count++;
}
},
200);
}
}
function trigger_myScroll(offset) {
pullDownEl = document.querySelector('#wrapper .pullDown');
if (pullDownEl) {
pullDownOffset = pullDownEl.offsetHeight;
} else {
pullDownOffset = 0;
}
pullUpEl = document.querySelector('#wrapper .pullUp');
if (pullUpEl) {
pullUpOffset = pullUpEl.offsetHeight;
} else {
pullUpOffset = 0;
}
if ($('#wrapper ul > li').length < items_per_page) {
// If we have only 1 page of result - we hide the pullup and pulldown indicators.
$('#wrapper .pullDown').hide();
$('#wrapper .pullUp span').hide();
offset = 0;
} else if (!offset) {
// If we have more than 1 page of results and offset is not manually defined - we set it to be the pullUpOffset.
offset = pullUpOffset;
}
myScroll = new IScroll('#wrapper', {
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载HTML5仿微信朋友圈UI界面,免费下载
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![txt](https://img-home.csdnimg.cn/images/20210720083642.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/HTML.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/PNG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/JPG.png)
共 43 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/33723068e9b34e98b4379941623f560d_xiaoyao_studio.jpg!1)
程序员SUMER
- 粉丝: 872
- 资源: 163
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)