You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
49
hyhproject/wechat2/view/default/users/userscores/list.html
Executable file
49
hyhproject/wechat2/view/default/users/userscores/list.html
Executable file
@ -0,0 +1,49 @@
|
||||
{extend name="default/base" /}
|
||||
{block name="title"}我的积分 - {__block__}{/block}
|
||||
{block name="css"}
|
||||
<link rel="stylesheet" href="__WECHAT__/css/userscores.css?v={$v}">
|
||||
{/block}
|
||||
{block name="header"}
|
||||
{php}$Title = "我的积分"{/php}
|
||||
{include file="default/header" /}
|
||||
{/block}
|
||||
{block name="main"}
|
||||
<input type="hidden" name="" value="" id="currPage" autocomplete="off">
|
||||
<input type="hidden" name="" value="" id="totalPage" autocomplete="off">
|
||||
<section class="ui-container">
|
||||
<div class="ui-row-flex ui-whitespace ui-row-flex-ver head">
|
||||
<div class="user_scores">
|
||||
<p>我的积分</p>
|
||||
<p id="userMoney" >{$object['userScore']}<span> 个</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/html" id="scoreList">
|
||||
<ul class="ui-row score-detail">
|
||||
{{# for(var i=0;i<d.length;i++){ }}
|
||||
<li class="ui-col ui-col-75 wst-re-info">
|
||||
<p>{{d[i].dataRemarks}}</p>
|
||||
<span class="score-time">{{d[i].createTime}}</span>
|
||||
</li>
|
||||
<li class="ui-col ui-col-25 {{(d[i].scoreType==1)?'score-plus':'score-reduce'}}">{{(d[i].scoreType==1)?'+':'-'}} {{d[i].score}}</li>
|
||||
<div class="wst-clear"></div>
|
||||
<div class="score-line"></div>
|
||||
{{# } }}
|
||||
</ul>
|
||||
</script>
|
||||
<li class="score-detail-title">积分明细</li>
|
||||
<div id="score-list"></div>
|
||||
</section>
|
||||
{/* 遮盖层 */}
|
||||
<div class="wst-cover" id="cover"></div>
|
||||
{/* 分类层 */}
|
||||
<div class="wst-fr-box" id="frame">
|
||||
<div class="title"><span>积分使用规则</span><i class="ui-icon-close-page" onclick="javascript:dataHide();"></i><div class="wst-clear"></div></div>
|
||||
<div class="content" id="content">
|
||||
积分使用规则
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
{block name="js"}
|
||||
<script type='text/javascript' src='__WECHAT__/js/jquery.min.js'></script>
|
||||
<script type='text/javascript' src='__WECHAT__/users/userscores/userscores.js?v={$v}'></script>
|
||||
{/block}
|
67
hyhproject/wechat2/view/default/users/userscores/userscores.js
Executable file
67
hyhproject/wechat2/view/default/users/userscores/userscores.js
Executable file
@ -0,0 +1,67 @@
|
||||
jQuery.noConflict();
|
||||
// 获取订单列表
|
||||
function getScoreList(){
|
||||
$('#Load').show();
|
||||
loading = true;
|
||||
var param = {};
|
||||
param.type = $('#type').val() || -1;
|
||||
param.pagesize = 10;
|
||||
param.page = Number( $('#currPage').val() ) + 1;
|
||||
$.post(WST.U('wechat/userscores/pageQuery'), param, function(data){
|
||||
var json = WST.toJson(data.data);
|
||||
var html = '';
|
||||
if(json && json.Rows && json.Rows.length>0){
|
||||
var gettpl = document.getElementById('scoreList').innerHTML;
|
||||
laytpl(gettpl).render(json.Rows, function(html){
|
||||
$('#score-list').append(html);
|
||||
});
|
||||
|
||||
$('#currPage').val(json.CurrentPage);
|
||||
$('#totalPage').val(json.TotalPage);
|
||||
}else{
|
||||
html += '<div class="wst-prompt-icon"><img src="'+ window.conf.WECHAT +'/img/nothing-relevant.png"></div>';
|
||||
html += '<div class="wst-prompt-info">';
|
||||
html += '<p>暂无相关信息</p>';
|
||||
html += '</div>';
|
||||
$('#score-list').html(html);
|
||||
}
|
||||
loading = false;
|
||||
$('#Load').hide();
|
||||
echo.init();//图片懒加载
|
||||
});
|
||||
}
|
||||
var currPage = totalPage = 0;
|
||||
var loading = false;
|
||||
$(document).ready(function(){
|
||||
getScoreList();
|
||||
WST.initFooter('user');
|
||||
// 弹出层
|
||||
var w = WST.pageWidth();
|
||||
var h = WST.pageHeight();
|
||||
$('#frame .content').css('overflow-y','scroll').css('height',h-48);
|
||||
$("#frame").css('right',-w);
|
||||
|
||||
$(window).scroll(function(){
|
||||
if (loading) return;
|
||||
if ((5 + $(window).scrollTop()) >= ($(document).height() - screen.height)) {
|
||||
currPage = Number( $('#currPage').val() );
|
||||
totalPage = Number( $('#totalPage').val() );
|
||||
if( totalPage > 0 && currPage < totalPage ){
|
||||
getScoreList();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//弹框
|
||||
function dataShow(){
|
||||
jQuery('#cover').attr("onclick","javascript:dataHide();").show();
|
||||
jQuery('#frame').animate({"right": 0}, 500);
|
||||
}
|
||||
function dataHide(){
|
||||
var dataHeight = $("#frame").css('height');
|
||||
var dataWidth = $("#frame").css('width');
|
||||
jQuery('#frame').animate({'right': '-'+dataWidth}, 500);
|
||||
jQuery('#cover').hide();
|
||||
}
|
Reference in New Issue
Block a user