<section class="aui-centent aui-margin-t-10">
<ul class="aui-list aui-media-list">
<li class="aui-list-item aui-list-item-middle" id="id-1-content" onclick="opendetailtextwin()">
<div class="aui-media-list-item-inner">
<div class="aui-list-item-inner">
<div class="aui-list-item-text aui-margin-b-10">
<div class="aui-list-item-title aui-font-size-14 aui-ellipsis">公司第一届抖音短视频大赛开始啦!
</div>
</div>
<div class="aui-list-item-text">
2017-12-22 16:30
</div>
</div>
<div class="aui-list-item-inner" style="width: 3rem" onclick="fndelete(this,'id-1')">
<span class="delete-btn"><img src="../../image/my/icon-delete.png"></span>
</div>
</div>
</li>
<li class="aui-list-item aui-list-item-middle" id="id-2-content" onclick="opendetailtextwin()">
<div class="aui-media-list-item-inner">
<div class="aui-list-item-inner">
<div class="aui-list-item-text aui-margin-b-10">
<div class="aui-list-item-title aui-font-size-14 aui-ellipsis">公司第一届抖音短视频大赛开始啦!
</div>
</div>
<div class="aui-list-item-text">
2017-12-22 16:30
</div>
</div>
<div class="aui-list-item-inner" style="width: 3rem" onclick="fndelete(this,'id-2')">
<span class="delete-btn"><img src="../../image/my/icon-delete.png"></span>
</div>
</div>
</li>
</ul>
</section>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/aui-dialog.js"></script>
<script type="text/javascript" src="../../script/loading.js"></script>
<script type="text/javascript">
var delay;
apiready = function(){
delay = api.systemType != 'ios' ? 300 : 0;
api.parseTapmode();
fndeleteList();
};
function opendetailtextwin(){
api.openWin({
name: 'post_detail_text_win',
url: '../post/post_detail_text_win.html',
});
}
// 删除收藏
function fndelete(obj,listid){
event.stopPropagation(); //阻止冒泡
var actionType= 'delete';
var actionTit = '删除提示';
var actionMsg = '您是否要删除该收藏?';
var actionNum = listid;
userConfirm(actionTit,actionType,actionMsg,actionNum);传值
}
// 删除列表内容
function fndeleteList(){
api.addEventListener({
name: 'deleteSuccess',
}, function(ret, err) {
if (ret) {
hideProgress();//隐藏菊花圈
showProgress();
var listid = ret.value.actionNum;
setTimeout(function() {
hideProgress();
var command =document.getElementById(listid+'-content');
command.parentNode.removeChild(command);
}, 1000);
} else {
api.toast({
msg: err.msg,
location: "middle"
});
}
});
}
</script>
</html>