123456789101112131415161718192021222324252627282930313233343536373839404142 |
- ;
- layui.define(['form','flow','element'], function (e) {
- var s = layui.$,
- flow = layui.flow,
- element = layui.element,
- form = layui.form;
- element.on('tab(profit)', function(data){
- var account = s(this).attr('lay-id');
- s('.profit-list').empty();
- flow.load({
- elem: '.profit-list'
- ,done: function(page, next){
- var lis = [];
- s.post('load.html',{page:page,account:account},function(res){
- var lis = [];
- layui.each(res.data, function(index, item){
- var li = ['<li>',
- '<p>',
- '<span class="type_text">'+item['type_text']+'</span>',
- '<span class="value">发生额:'+item['value']+'</span>',
- '</p>',
- '<p>',
- '<span class="create_time">'+item['create_time']+'</span>',
- '<span class="value">余额:'+item['amount']+'</span>',
- '</p>',
- '</li>'];
- lis.push(li.join(''));
- });
- next(lis.join(''), page < res.pages);
- });
- }
- });
- });
- var bill = function(){
- if (s('.profit-list').length > 0) {
- element.tabChange('profit', 'coin')
- }
- }
- e('bill',new bill())
- })
|