您好,登錄后才能下訂單哦!
```javascri[t
mui.init({
pullRefresh: {
container: "#refreshContainer",//待刷新區(qū)域標(biāo)識,querySelector能定位的css選擇器均可,比如:id、.class等
up: {
auto: true,//可選,默認(rèn)false.自動上拉加載一次
contentrefresh: "正在加載...",//可選,正在加載狀態(tài)時,上拉加載控件上顯示的標(biāo)題內(nèi)容
contentnomore: '沒有更多數(shù)據(jù)了',//可選,請求完畢若沒有更多數(shù)據(jù)時顯示的提醒內(nèi)容;
callback: pulldownRefresh //必選,刷新函數(shù),根據(jù)具體業(yè)務(wù)來編寫,比如通過ajax從服務(wù)器獲取新數(shù)據(jù);
}
}
});
function pulldownRefresh() {
var flag = false;
mui.getJSON("/StoreMobile/StoreMember/get_member_data", {
start: $("#viplistUl li").length,
count: 20,
member: 2,
search: $("#seainput").val()
}, function (resp) {
if (resp.code==1) {
LoadPage(resp.data);
} else {
if ($("#viplistUl").children().last().text() == "沒有更多數(shù)據(jù)了") {
return
}
$("#viplistUl").append("<li style='text-align: center'>沒有更多數(shù)據(jù)了</li>");
}
});
this.endPullupToRefresh(flag);
}
function LoadPage(data) {
data.forEach(function (ele, index) {
var listText = '<li onclick="member_detail(' + ele.member_id + ')" class="mui-table-view-cell mui-media" data-mid="' + ele.member_id + '">\ ' +
'<div>\ ' +
'<img class="mui-media-object mui-pull-left" alt=" " src="' + ele.head_image + '">\ ' +
'<div class="mui-media-body">' + ele.truename + ' <p class="mui-ellipsis">' + ele.login_account + '</p> </div> </div> </li>';
viplistUl.append(listText);
});
band();
}
function InnerPage(data) {
var listText = "";
data.forEach(function (ele, index) {
listText += '<li class="mui-table-view-cell mui-media" id="vip-click" data-mid="' + ele.member_id + '">\ ' +
'<a href="javascript:;">\ ' +
'<img class="mui-media-object mui-pull-left" alt=" " src="' + ele.head_image + '">\ ' +
'<div class="mui-media-body">' + ele.truename + ' <p class="mui-ellipsis">' + ele.login_account + '</p> </div> </a> </li>';
})
viplistUl.html(listText);
band();
}
function band() {
mui('#viplistUl').on('tap', "li", function () {
_id = $(this).data("mid");
window.location.href = "vip_list_xq.html?" + _id
})
}
以上可以去mui官網(wǎng)進(jìn)行尋找
```php
// 獲取會員的信息,下拉加載
function get_member_data()
{
$member_data = I("get.");
$store_id = $_SESSION["admin"]["store_id"];
$member = $member_data["member"];
$count = $member_data["count"];
$start = $member_data["start"];
$map["store_id"] = $store_id;
$map["is_member"] = $member;
$map["is_disabled"] = 1;
if ($member_data["search"]) {
$map["login_account|truename"] = array("like", "%" . $member_data["search"] . "%");
}
// 查找對應(yīng)的會員
$memberInfo = M("member")->where($map)->limit($start, $count)->order("register_time desc")->field("member_id, login_account,head_image,sex,truename")->select();
if ($memberInfo) {
$this->successMsg("獲取成功", 1, $memberInfo);
} else {
$this->errorMsg("獲取失敗", 0);
}
}
以上可以獲取到對應(yīng)路由的信息
如果發(fā)現(xiàn)手機端劃不動可以在html中加上
* {
touch-action: pan-y;
}
.mui-scroll {
position: relative;
}
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。