当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
2 Star 2 Fork 0

潇尘渊/wepApp
暂停

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
unpay_ext.html 5.14 KB
一键复制 编辑 原始数据 按行查看 历史
潇尘渊 提交于 2017-02-03 12:36 . fix
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title></title>
<link type="text/css" rel="stylesheet" href="css/hui.css" />
<style type="text/css">
.HUI_Wrap li{background: #ffffff;list-style: none;}
.HUI_Wrap li+li{margin-top: 0.2rem;border-top: 2px solid #CCCCCC;}
.HUI_Wrap li::after{content: '';display: block;clear: both;}
</style>
</head>
<body style="background: none;">
<div class="HUI_Wrap" id="list">
</div>
<script type="text/javascript" src="js/hui.js"></script>
<script src="js/huiSlide.js" type="text/javascript" charset="utf-8"></script>
<script>
page = 1;
more = 1;
hui.plusReady(function () {
hui.refresh(ref);
hui.centerLoading();
getlist();
hui.loadMore(loadMore);
})
function ref () {
page = 1;
more = 1;
getlist();
}
function getlist () {
hui.getJSON(
'http://jkfree.space/index.php/app/order/unpay/uid/'+plus.storage.getItem('id')+'/page/'+page,
function (data) {
hui('#list').html('');
hui.endRefresh();
hui.endLoadMore();
hui.centerLoading(true);
var str = "";
var data = data.data;
console.log(JSON.stringify(data))
if(data != ''){
for (var i = 0,count = data.length; i < count; i++) {
str += '<li style="padding-top: 1rem;" onclick="pay('+data[i].id+','+data[i].good_id+')">'
str += '<div>'
str += '<div class="HUI_FL"">'
str += '&nbsp;&nbsp;订单号:<span id="chargeNum">'+data[i].order+'</span>'
str += '</div>'
str += '<span class="HUI_Icons HUI_Icons_enter HUI_FR" style="margin-right: 1rem;font-size: 1.2rem;"></span>'
str += '</div>'
str += '<div class="HUI_FL" style="width: 60%;padding:1rem 0;">'
str += '<div>'
str += '<div class="HUI_FL" style="width: 48%;text-indent: 2rem;">'
str += '<img src="'+data[i].pic+'" style="width: 60%;" id="pic"/>'
str += '</div>'
str += '<div class="HUI_FL" style="width: 48%;padding-top: 0.5rem;">'
str += '<p id="goodname">'+data[i].good_name+'</p>'
str += '<p style="font-size: 1rem;color: #9E9E9E;" id="desc">'+data[i].desc+'</p>'
str += '<p style="font-size: 1rem;color: #9E9E9E;">数量<span id="num" style="font-size: 1rem;color: #9E9E9E;">1</span></p>'
str += '</div>'
str += '</div>'
str += '</div>'
str += '<div class="HUI_FL" style="width: 40%;line-height: 7rem;">'
str += '<span class="HUI_FR" style="color: #FF0000;margin-right: 1rem;">¥<span class="price" style="color: #FF0000;" id="price">'+data[i].price+'.00</span></span>'
str += '</div>'
str += '</li>'
}
}else if(more == 1){
str = '<li style="text-align:center;background:none;">已全部加载</li>';
more = 0;
}
var ul = document.createElement('ul');
ul.innerHTML = str;
hui(ul).appendTo('#list');
page++;
},
function () {
hui.toast('连接服务器失败!')
}
);
}
function loadMore () {
console.log(page)
hui.getJSON(
'http://jkfree.space/index.php/app/order/unpay/uid/'+plus.storage.getItem('id')+'/page/'+page,
function (data) {
hui.endRefresh();
hui.endLoadMore();
hui.centerLoading(true);
var str = "";
var data = data.data;
console.log(JSON.stringify(data))
if(data != ''){
for (var i = 0,count = data.length; i < count; i++) {
str += '<li style="padding-top: 1rem;" onclick="pay('+data[i].id+','+data[i].good_id+')">'
str += '<div>'
str += '<div class="HUI_FL"">'
str += '&nbsp;&nbsp;订单号:<span id="chargeNum">'+data[i].order+'</span>'
str += '</div>'
str += '<span class="HUI_Icons HUI_Icons_enter HUI_FR" style="margin-right: 1rem;font-size: 1.2rem;"></span>'
str += '</div>'
str += '<div class="HUI_FL" style="width: 60%;padding:1rem 0;">'
str += '<div>'
str += '<div class="HUI_FL" style="width: 48%;text-indent: 2rem;">'
str += '<img src="'+data[i].pic+'" style="width: 60%;" id="pic"/>'
str += '</div>'
str += '<div class="HUI_FL" style="width: 48%;padding-top: 0.5rem;">'
str += '<p id="goodname">'+data[i].good_name+'</p>'
str += '<p style="font-size: 1rem;color: #9E9E9E;" id="desc">'+data[i].desc+'</p>'
str += '<p style="font-size: 1rem;color: #9E9E9E;">数量<span id="num" style="font-size: 1rem;color: #9E9E9E;">1</span></p>'
str += '</div>'
str += '</div>'
str += '</div>'
str += '<div class="HUI_FL" style="width: 40%;line-height: 7rem;">'
str += '<span class="HUI_FR" style="color: #FF0000;margin-right: 1rem;">¥<span class="price" style="color: #FF0000;" id="price">'+data[i].price+'.00</span></span>'
str += '</div>'
str += '</li>'
}
}else if(more == 1){
str = '<li style="text-align:center">已全部加载</li>';
more = 0;
}
var ul = document.createElement('ul');
ul.innerHTML = str;
hui(ul).appendTo('#list');
page++;
},
function () {
hui.toast('连接服务器失败!')
}
);
}
hui.Back = function(){
var parentWebview = plus.webview.getWebviewById('unpay.html');
parentWebview.evalJS('hui.Back()');
}
function pay(order_id, good_id) {
hui.open('charge.html',{top:'0px',bottom:'0px'},true,{good_id:good_id,order_id:order_id,uid:plus.storage.getItem('id')});
}
</script>
</body>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/623466433/wepApp.git
git@gitee.com:623466433/wepApp.git
623466433
wepApp
wepApp
master

搜索帮助