APP注意事项
//跳转页面
jumpgoods: function(id) {
// alert(id);
api.openWin({
name: 'buy',
url: 'buy_index6.html',
slidBackEnabled: false,
bounces: false,
bgColor: 'rgba(244,244,244,0)',
pageParam:{
id: id,
}
});
},
//location.reload(); //刷新页面666
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
function back() {
api.closeFrame({
name: "index"
});
setTimeout(function() {
api.closeWin({animation:{type:'fade',subType:'from_right', duration:300 }});
}, 100);
}
//apiready 附加函数 用于在apiready后处理的函数
function showsele(){
$('.showsele').toggle();
}
function setbase() {
}
//avalon
var info = avalon.define({
$id: 'info',
shou:[], //y英文逗号
togoodsinfo: function(id) {
// alert(id);
api.openWin({
name: 'buy',
url: 'buy_index6.html',
slidBackEnabled: false,
bounces: false,
bgColor: 'rgba(244,244,244,0)',
pageParam:{
id: id,
}
});
},
//取消收藏
qu: function(id) {
addajaxlist('shop_collectiondel', {
collection_id:id
}, function(data) {
if(data.status) {
$msg('取消收藏成功');
// $('#'+id).hide();
} else {
$msg(data.msg);
}
location.reload(); //刷新页面666
});
ajaxgo();
//Main.obj['buy_index5'].go();
},
});
//主程序
function go(objgo) {
//收藏列表
addajaxlist('shop_collectionlist', {
}, function(data) {
// console.log(data);
if(data.status) {
//p(data);
var obj = data.data;
// var description = "";
// for(var i in obj){
// var property=obj[i];
// description+=i+" = "+property+"\n";
// }
// alert(description);
//
if(obj) {
info.shou = obj;
} else {
info.shou = [];
}
} else {
info.shou = [];
$msg(data.msg);
}
});
ajaxgo(objgo);
p(name + 'go');
}
</script>
<script src="js/boot.js" type="text/javascript" charset="utf-8"></script>
</script>