代码拉取完成,页面将自动刷新
<!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" />
</head>
<body style="background:#F8F8F8;">
<div id="HUI_Header" style="height: 47px;">
<h1>用户中心</h1>
<div id="HUI_Back"></div>
</div>
<div class="HUI_Wrap">
<div class="center" style="background: #DC143C;padding: 4rem 0 1rem 0;">
<img src="img/146770147952.png" alt="" style="width: 20%;margin: 0 auto;display: block;border-radius: 5rem;border: 1px solid #999999;" />
<div class="text">
<p style="text-align: center;margin: 2rem;"><a href="javascript:login();" style="font-size: 1.3rem;color: #CCCCCC">注册或登陆</a></p>
</div>
<ul>
<li class="HUI_FL" id="unpay"><a href="javascript:void(0);">待付款</a></li>
<li class="HUI_FL" id="unrecive"><a href="javascript:void(0);">待收货</a></li>
<li class="HUI_FL" id="complete"><a href="javascript:void(0);">已完成</a></li>
</ul>
</div>
<div class="HUI_List" style="background:#FFFFFF;">
<ul>
<li id="allList"><a href="javascript:void(0);" class="HUI_Arrow"> 全部订单</a></li>
<li><a href="javascript:void(0);" class="HUI_Arrow"> 收货地址</a></li>
<li><a href="javascript:void(0);" class="HUI_Arrow"> 设置</a></li>
</ul>
</div>
<div style="height:20px;"></div>
<div class="HUI_List out" style="background:#FFFFFF; padding:0px 10px;display: none;">
<ul>
<li><a href="javascript:void(0);" class="HUI_Arrow HUI_Icons HUI_Icons_exit"> 退出登录</a></li>
</ul>
</div>
</div>
<script type="text/javascript" src="js/hui.js"></script>
<script type="text/javascript">
hui.Back = function(){
var parentWebview = plus.webview.getLaunchWebview();
parentWebview.evalJS('hui.Back()');
}
function login () {
var children = hui.create('login.html',{top:'0px',bottom:'55px'});
plus.webview.open('login.html',{})
}
function setUserInfo () {
if (plus.storage.getItem('id')) {
hui('img').Attr('src',plus.storage.getItem('face'));
hui('.text').html('<p style="text-align: center;margin: 2rem;font-size: 1.3rem;color: #CCCCCC">'+plus.storage.getItem('username')+'</p>');
hui('.out').show();
}
}
hui('.HUI_Icons_exit').click(function(){
hui.confirm('您确定要这样做吗?',['取消','确定'], function(){
plus.storage.removeItem('id');
plus.storage.removeItem('username');
plus.storage.removeItem('face');
hui('.text').html('<p style="text-align: center;margin: 2rem;"><a href="javascript:login();" style="font-size: 1.3rem;color: #CCCCCC">注册或登陆</a></p>');
hui('img').Attr('src','img/146770147952.png');
});
})
hui.plusReady(function () {
setUserInfo();
})
hui('#unpay').click(function() {
var uid = plus.storage.getItem('id');
console.log(uid);
if (uid) {
var self = plus.webview.currentWebview();
var children = hui.create('unpay.html',{top:'0px',bottom:'0px'},true,{uid:uid});
plus.webview.show(children)
} else{
login();
}
})
hui('#allList').click(function() {
var uid = plus.storage.getItem('id');
console.log(uid);
if (uid) {
var children = hui.create('allList.html',{top:'0px',bottom:'0px'},true,{uid:uid});
plus.webview.show(children)
} else{
login();
}
})
hui('#unrecive').click(function() {
var uid = plus.storage.getItem('id');
if (uid) {
var children = hui.create('unrecive.html',{top:'0px',bottom:'0px'},true,{uid:uid});
plus.webview.show(children)
} else{
login();
}
})
hui('#complete').click(function() {
var uid = plus.storage.getItem('id');
if (uid) {
var children = hui.create('complete.html',{top:'0px',bottom:'0px'},true,{uid:uid});
plus.webview.show(children)
} else{
login();
}
})
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。