首页 > 代码库 > avalon列表循环调接口以及更多例子
avalon列表循环调接口以及更多例子
<style>
body{font-family: "微软雅黑";
}
.message1{
width: 100%;
padding-top:23px;
background-color: #FFFFFF;
}
.message1 .zuo{
width: 35%;
height: 103px;
margin-left: 0px;
position: absolute;
right: 0;
}
.message1 .zuo img{
width: 111px;
height: 84px;
padding-left: 7px;
}
.message1 .you{
width: 70%;
height: 103px;
padding-left:24px;
margin-right: 0px;
position: absolute;
left:0;
}
.message1 .you p{
line-height: 28px;
}
nav{
display:-webkit-box;
display:-webkit-flex;
display:flex;
-webkit-box-orient:horizontal;
-webkit-flex-flow:row;
flex-flow:row;
position: relative;
width: 100%;
height: 40px;
/*background-color: #FFFFFF;*/
margin-top: 7px;
}
nav .menu{
-webkit-box-flex:1;
-webkti-flex:1;
flex:1;
width: 100%;
height: 40px;
line-height: 40px;
font-size: 13px;
text-align: center;
color: #000000;
}
</style>
</head>
<div style="background-color: #f5f5f5" ms-controller="new_collage9">
<div id="head" class="pr tc bgcfefefe">
<div class="headbox h49 lh49">
<img class="pa left10 top15 h18 cp zi2 wback" src="http://www.mamicode.com/images/back.png" onclick="back();"/>
<span class="f18 c070707">订单明细</span>
</div>
<div class="bbhhd"></div>
</div>
<div style="background-color: #f5f5f5;-webkit-overflow-scrolling:touch; overflow-y: auto;
margin: 0 auto;
height: 100%;
padding-bottom: 100px;"" >
<table ms-repeat="my" class="wp100 " style="background-color: #FFFFFF;border-bottom:1px solid #f5f5f5" border="0" cellspacing="10" cellpadding="0" tapmode="tapover" ms-click="toxiaxia(xianxia.id)">
<tr>
<td style="width: 107px;">
<img src="http://www.mamicode.com/images/collage/tu1.png" ms-src="http://www.mamicode.com/{{el.img}}" style="width:100px;height: 100px" />
</td>
<td class="vt pr" tapmode="tapover">
<div class="f16 c222 mb5"></div>
<div style="width:100%;">
<div class="f14 c#000000 mb5">
<p style="color: #000000;margin-left:-7px">【{{el.type}}】{{el.name}}</p>
<div style="position: relative">
<div style="position: absolute;left:-1%;top:14px;font-size: 13px">下单时间:{{el.cTime}}</div>
<div style="position: absolute;left:-1%;top: 46px;font-size: 13px">用户昵称:{{el.uname}}</div>
<div style="position: absolute;right: 0;top: 46px;font-size: 13px;color: red">¥{{el.order_money}}</div>
</div>
</div>
</div>
</td>
</tr>
</table>
<div class="h30 ml5 mt10 pl5 pr5 mr5 mb30" style="width: 98%;line-height: 27px;font-size: 15px;" ms-click="getgoodstop()">
<span style="display: inherit;text-align:center;color: #333333">查看更多订单</span>
</div>
<!-- <table class="wp100 " style="background-color: #FFFFFF" border="0" cellspacing="10" cellpadding="0" tapmode="tapover" ms-click="toxiaxia(xianxia.id)">
<tr>
<td>
<img src="http://www.mamicode.com/images/collage/tu1.png" style="width:100px;height: 100px" />
</td>
<td class="vt pr" tapmode="tapover">
<div class="f16 c222 mb5"></div>
<div style="width:100%;">
<div class="f14 c#000000 mb5">
<p style="color: #000000;">【7月8号】创新零售沈阳站线下落地方案视频/杨华为您解读</p>
<div style="position: relative">
<div style="position: absolute;left:-1%;top:8px;font-size: 13px">下单时间:2017.08.03 11:00</div>
<div style="position: absolute;left:-1%;top: 29px;font-size: 13px">用户昵称:扎堆儿</div>
<div style="position: absolute;right: 0;top: 29px;font-size: 13px;color: red">¥19.9 x1</div>
</div>
</div>
</div>
</td>
</tr>
</table>
<table class="wp100 " style="background-color: #FFFFFF" border="0" cellspacing="10" cellpadding="0" tapmode="tapover" ms-click="toxiaxia(xianxia.id)">
<tr>
<td>
<img src="http://www.mamicode.com/images/collage/tu1.png" style="width:100px;height: 100px" />
</td>
<td class="vt pr" tapmode="tapover">
<div class="f16 c222 mb5"></div>
<div style="width:100%;">
<div class="f14 c#000000 mb5">
<p style="color: #000000;">【7月8号】创新零售沈阳站线下落地方案视频/杨华为您解读</p>
<div style="position: relative">
<div style="position: absolute;left:-1%;top:8px;font-size: 13px">下单时间:2017.08.03 11:00</div>
<div style="position: absolute;left:-1%;top: 29px;font-size: 13px">用户昵称:扎堆儿</div>
<div style="position: absolute;right: 0;top: 29px;font-size: 13px;color: red">¥19.9 x1</div>
</div>
</div>
</div>
</td>
</tr>
</table> -->
</div>
</div>
<script type="text/javascript">
(function(name) {
//avalon 开始
if(Main.ava[name] == undefined) {
Main.ava[name] = avalon.define({
$id: name,
id:0,
//配置开始
name: name,
zhuanlan:[],
gou:[],
//订丹明细
my:[],
//我购买的课
mai: function() {
towin(‘new_collage5‘, false, {});
},
getgoodstop:function()
{
var info = Main.ava[‘new_collage9‘];
info.top_p = (info.top_p)+1;
row1 = ((info.top_p)*2)+4;
// addajaxlist(‘shop_goodslists‘, {p:info.top_p,row:row1}, function(data) {
addajaxlist(‘order_mx‘, {p:1,row:row1}, function(data) {
if(data.status) {
var obj = data.data;
if(obj) {
info.my = obj;
} else {
$msg(data.msg);
}
} else {
$msg(data.msg);
}
});
ajaxgo();
},
});
}
//avalon 结束
//class 开始
var info = Main.ava[name];
var Cls = {
createNew: function() {
//实例化ajax类
var ajax_obj = ajaxCls.createNew();
var addajaxlist = ajax_obj.addajaxlist;
var ajaxgo = ajax_obj.ajaxgo;
//实例化ajax类 --结束
var Class = {}; //类
//模拟类开始-----------------------------------------------------------------start
var info = Main.ava[name];
//公有属性---------------------------------------------
var win_name = name;
Class.setbase = function() {
};
Class.go = function(objgo) {
//列表
addajaxlist(‘order_mx‘, {
}, function(data) {
if(data.status) {
var obj = data.data;
// 列表
if(obj) {
info.my = obj;
} else {
info.my = [];
}
} else {
info.my = [];
$msg(data.msg);
}
});
ajaxgo(objgo);
p(name + ‘go‘);
};
//私有属性---------------------------------------------
//模拟类结束-----------------------------------------------------------------end
return Class;
}
}
Main.obj[name] = Cls.createNew();
Main.obj[name].setbase();
Main.obj[name].go();
//class 结束
//附加预先运行函数
})(‘new_collage9‘);
</script>
avalon列表循环调接口以及更多例子