Browse Source

个人中心-余额明细、积分明细

master
ZLW-PC\Administrator 7 years ago
parent
commit
a224e7e57a
  1. 107
      app/Http/Controllers/Weixin/UserController.php
  2. 4
      public/css/font-awesome.min.css
  3. 16
      public/css/weixin/style.css
  4. BIN
      public/fonts/FontAwesome.otf
  5. BIN
      public/fonts/fontawesome-webfont.eot
  6. 2671
      public/fonts/fontawesome-webfont.svg
  7. BIN
      public/fonts/fontawesome-webfont.ttf
  8. BIN
      public/fonts/fontawesome-webfont.woff
  9. BIN
      public/fonts/fontawesome-webfont.woff2
  10. 5
      resources/views/weixin/common/footer.blade.php
  11. 12
      resources/views/weixin/user/index.blade.php
  12. 30
      resources/views/weixin/user/userAccount.blade.php
  13. 92
      resources/views/weixin/user/userMoneyList.blade.php
  14. 92
      resources/views/weixin/user/userPointList.blade.php
  15. 4
      routes/web.php

107
app/Http/Controllers/Weixin/UserController.php

@ -28,6 +28,113 @@ class UserController extends CommonController
return view('weixin.user.index', $data);
}
//资金管理
public function userAccount(Request $request)
{
$postdata = array(
'access_token' => $_SESSION['weixin_user_info']['access_token']
);
$url = env('APP_API_URL')."/user_info";
$res = curl_request($url,$postdata,'GET');
$data['user_info'] = $res['data'];
return view('weixin.user.userAccount', $data);
}
//余额明细
public function userMoneyList(Request $request)
{
$pagesize = 10;
$offset = 0;
if(isset($_REQUEST['page'])){$offset = ($_REQUEST['page']-1)*$pagesize;}
$postdata = array(
'limit' => $pagesize,
'offset' => $offset,
'access_token' => $_SESSION['weixin_user_info']['access_token']
);
$url = env('APP_API_URL')."/user_money_list";
$res = curl_request($url,$postdata,'GET');
$data['list'] = $res['data']['list'];
$data['totalpage'] = ceil($res['data']['count']/$pagesize);
if(isset($_REQUEST['page_ajax']) && $_REQUEST['page_ajax']==1)
{
$html = '';
if($res['data']['list'])
{
foreach($res['data']['list'] as $k => $v)
{
$html .= '<li>';
if($v['type']==0)
{
$html .= '<span class="green">+ '.$v['money'].'</span>';
}
else
{
$html .= '<span>- '.$v['money'].'</span>';
}
$html .= '<div class="info"><p class="tit">'.$v['des'].'</p>';
$html .= '<p class="time">'.date('Y-m-d H:i:s',$v['add_time']).'</p></div>';
$html .= '</li>';
}
}
exit(json_encode($html));
}
return view('weixin.user.userMoneyList', $data);
}
//积分明细
public function userPointList(Request $request)
{
$pagesize = 10;
$offset = 0;
if(isset($_REQUEST['page'])){$offset = ($_REQUEST['page']-1)*$pagesize;}
$postdata = array(
'limit' => $pagesize,
'offset' => $offset,
'access_token' => $_SESSION['weixin_user_info']['access_token']
);
$url = env('APP_API_URL')."/user_point_list";
$res = curl_request($url,$postdata,'GET');
$data['list'] = $res['data']['list'];
$data['totalpage'] = ceil($res['data']['count']/$pagesize);
if(isset($_REQUEST['page_ajax']) && $_REQUEST['page_ajax']==1)
{
$html = '';
if($res['data']['list'])
{
foreach($res['data']['list'] as $k => $v)
{
$html .= '<li>';
if($v['type']==0)
{
$html .= '<span class="green">+ '.$v['point'].'</span>';
}
else
{
$html .= '<span>- '.$v['point'].'</span>';
}
$html .= '<div class="info"><p class="tit">'.$v['des'].'</p>';
$html .= '<p class="time">'.date('Y-m-d H:i:s',$v['add_time']).'</p></div>';
$html .= '</li>';
}
}
exit(json_encode($html));
}
return view('weixin.user.userPointList', $data);
}
//浏览记录
public function userGoodsHistory(Request $request)
{

4
public/css/font-awesome.min.css
File diff suppressed because it is too large
View File

16
public/css/weixin/style.css

@ -73,7 +73,7 @@ background:none;
.goods_list_small li img{width:100%;height:auto;}.goods_list_small li .goods_price{color:#f23030;}.goods_list_small li .goods_price b{font-size:1rem;font-weight:normal;}
.goods_list_small li:nth-child(even) a{margin-right:0;margin-left:2px;}
.goods_list_s li{color:#333;border-bottom:1px solid #eee;overflow:hidden;margin-left:10px;margin-right:10px;padding-top:10px;padding-bottom:10px;}
.goods_list_s li{color:#333;border-bottom:1px solid #eee;overflow:hidden;margin-left:10px;margin-right:10px;padding:15px 5px 15px 5px;}
.goods_list_s li span{color:#333;display:block;font-size:1rem;}.goods_list_s a:last-child li{border-bottom:0}
.goods_thumb{width:100px;height:100px;float:left;margin-right:10px;display:block;}.goods_thumb img{width:100px;height:100px;border:none;}
.goods_list_s .goods_tit{line-height:24px;overflow:hidden;}
@ -712,7 +712,7 @@ margin:5px 0
height:36px
}
.my .content .floor ul li a h2 {
.my .content .floor ul li a .tit{
font-size:18px;
font-weight: normal;
height:32px;
@ -767,17 +767,7 @@ margin:5px 0
margin:15px 20px
}
.setting .close a {
display: block;
background: #ec5151;
text-align: center;
padding:10px;
color: #fff;
font-size:18px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px
}
.setting .close a{display: block;background: #ec5151;text-align: center;padding:10px;color: #fff;font-size:18px;border-radius:2px;}
h1.arc_tit, h2.arc_tit{font-weight: normal;font-size: 1.4em;padding: 10px;}
.arc_content .ainfo{font-size: 0.875em;color: #999;}

BIN
public/fonts/FontAwesome.otf

Binary file not shown.

BIN
public/fonts/fontawesome-webfont.eot

Binary file not shown.

2671
public/fonts/fontawesome-webfont.svg
File diff suppressed because it is too large
View File

BIN
public/fonts/fontawesome-webfont.ttf

Binary file not shown.

BIN
public/fonts/fontawesome-webfont.woff

Binary file not shown.

BIN
public/fonts/fontawesome-webfont.woff2

Binary file not shown.

5
resources/views/weixin/common/footer.blade.php

@ -2,10 +2,11 @@
<div class="foohi">
<div class="footer">
<ul>
<a href="<?php echo route('weixin'); ?>"><li class="on"><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon2.png"><p>首页</p></li></a>
<?php $current_url = url()->current(); ?>
<a href="<?php echo route('weixin'); ?>"><li<?php if(route('weixin') == $current_url){echo ' class="on"';} ?>><img src="<?php echo env('APP_URL'); ?>/images/weixin/home_icon<?php if(route('weixin') == $current_url){echo '2';} ?>.png"><p>首页</p></li></a>
<a href="categoryList.html"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/brand_icon.png"><p>分类</p></li></a>
<a href="<?php echo route('weixin'); ?>/cart"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/car_icon.png"><p>购物车</p></li></a>
<a href="<?php echo route('weixin'); ?>/user"><li><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon.png"><p>个人中心</p></li></a></ul>
<a href="<?php echo route('weixin_user'); ?>"><li<?php if(route('weixin_user') == $current_url){echo ' class="on"';} ?>><img src="<?php echo env('APP_URL'); ?>/images/weixin/center_icon<?php if(route('weixin_user') == $current_url){echo '2';} ?>.png"><p>个人中心</p></li></a></ul>
</div>
</div>
<!--底部导航-end-->

12
resources/views/weixin/user/index.blade.php

@ -103,7 +103,7 @@
</div>
<div class="fr">
<!--<a href="bankrollmm.html">-->
<a href="/index.php/Mobile/User/account.html">
<a href="<?php echo route('weixin_user_account'); ?>">
<span>资金管理</span>
<i class="Mright"></i>
</a>
@ -114,20 +114,20 @@
<div class="floor w3">
<ul>
<li>
<a href="/index.php/Mobile/User/account.html">
<h2>0.00</h2>
<a href="<?php echo route('weixin_user_money_list'); ?>">
<div class="tit"><?php echo $user_info['money']; ?></div>
<p>余额</p>
</a>
</li>
<li>
<a href="/index.php/Mobile/User/coupon.html">
<h2>0</h2>
<div class="tit">0</div>
<p>优惠券</p>
</a>
</li>
<li>
<a href="/index.php/Mobile/User/points_list.html">
<h2>100</h2>
<a href="<?php echo route('weixin_user_point_list'); ?>">
<div class="tit"><?php echo $user_info['point']; ?></div>
<p>积分</p>
</a>
</li>

30
resources/views/weixin/user/userAccount.blade.php

@ -0,0 +1,30 @@
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>资金管理</title><meta name="keywords" content="关键词"><meta name="description" content="描述"><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
<link href="<?php echo env('APP_URL'); ?>/css/font-awesome.min.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/weixin/mobile.js"></script></head><body>
<div class="classreturn loginsignup">
<div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
<div class="ds-in-bl tit center"><span>资金管理</span></div>
<div class="ds-in-bl nav_menu"><a href="<?php echo route('weixin_user_money_list'); ?>">余额明细</a></div>
</div>
<style>
.account{text-align:center;margin-top:50px;}
.account .icon{color:#FFCC00;font-size:100px;}
.account .money{color:#353535;font-size:36px;}
.account .tit{color:#000;font-size:18px;}
.bottoma{display:block;font-size:18px;padding:10px;border-radius:2px;}
</style>
<div class="floor account">
<div class="icon"><i class="fa fa-diamond"></i></div>
<div class="tit">我的余额</div>
<div class="money"><small></small><?php echo $user_info['money']; ?></div>
<br>
<a style="margin:10px;background-color:#1aad19;text-align:center;color:white;border:1px solid #179e16;" class="bottoma" href="http://www.lqycms.com/weixin/user_address_add">充值</a>
<a style="margin:0 10px 10px 10px;background-color:#f1f1f1;text-align:center;color:#000;border:1px solid #bfbfbf;" class="bottoma" href="http://www.lqycms.com/weixin/user_address_add">提现</a>
</div>
@include('weixin.common.footer')
</body></html>

92
resources/views/weixin/user/userMoneyList.blade.php

@ -0,0 +1,92 @@
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>余额明细</title><meta name="keywords" content="关键词"><meta name="description" content="描述"><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/weixin/mobile.js"></script></head><body>
<div class="classreturn loginsignup">
<div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
<div class="ds-in-bl tit center"><span>余额明细</span></div>
</div>
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
<style>
.money_list li{padding:15px;border-bottom:1px solid #ddd;}
.money_list .tit{color:#000;font-size:18px;margin-bottom:5px;}
.money_list .time{color:#8e8e8e;font-size:12px;}
.money_list span{font-size:18px;float:right;vertical-align:middle;margin-top:12px;}
.money_list span.green{color:#04ba06;}
</style>
<div class="floor">
<ul class="money_list cl">
<?php if($list){foreach($list as $k=>$v){ ?>
<li>
<span <?php if($v['type']==0){echo 'class="green"';} ?>><?php if($v['type']==0){echo '+';}else{echo '-';} ?> <?php echo $v['money']; ?></span>
<div class="info"><p class="tit"><?php echo $v['des']; ?></p>
<p class="time"><?php echo date('Y-m-d H:i:s',$v['add_time']); ?></p></div>
</li>
<?php }} ?>
</ul>
</div>
<script>
$(function(){
var ajaxload = false;
var maxpage = false;
var startpage = 1;
var totalpage = <?php echo $totalpage; ?>;
var tmp_url = window.location.href;
msg = tmp_url.split("#");
tmp_url = msg[0];
$(window).scroll(function ()
{
var listheight = $(".money_list").outerHeight();
if ($(document).scrollTop() + $(window).height() >= listheight)
{
if(startpage >= totalpage)
{
//$("#submit_bt_one").html("已是最后一页,没有更多数据!");
return false;
}
if(!ajaxload && !maxpage)
{
ajaxload = true;
//$("#submit_bt_one").html("努力加载中...");
var url = tmp_url;
var nextpage = startpage+1;
$.get(url,{page_ajax:1,page:nextpage},function(res)
{
if(res)
{
$(".money_list").append(res);
startpage++;
if(startpage >= totalpage)
{
maxpage = true;
//$("#submit_bt_one").html("已是最后一页,没有更多数据!");
}
else
{
//$("#submit_bt_one").html("点击加载更多");
}
ajaxload = false;
}
else
{
//$("#submit_bt_one").html("请求失败,请稍候再试!");
ajaxload = false;
}
},'json');
}
}
});
});
</script>
@include('weixin.common.footer')
</body></html>

92
resources/views/weixin/user/userPointList.blade.php

@ -0,0 +1,92 @@
<!DOCTYPE html><html><head><meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<title>积分明细</title><meta name="keywords" content="关键词"><meta name="description" content="描述"><meta content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
<link href="<?php echo env('APP_URL'); ?>/css/weixin/style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/weixin/mobile.js"></script></head><body>
<div class="classreturn loginsignup">
<div class="ds-in-bl return"><a href="javascript:history.back(-1);"><img src="<?php echo env('APP_URL'); ?>/images/weixin/return.png" alt="返回"></a></div>
<div class="ds-in-bl tit center"><span>积分明细</span></div>
</div>
<script type="text/javascript" src="<?php echo env('APP_URL'); ?>/js/layer/mobile/layer.js"></script>
<style>
.money_list li{padding:15px;border-bottom:1px solid #ddd;}
.money_list .tit{color:#000;font-size:18px;margin-bottom:5px;}
.money_list .time{color:#8e8e8e;font-size:12px;}
.money_list span{font-size:18px;float:right;vertical-align:middle;margin-top:12px;}
.money_list span.green{color:#f23030;}
</style>
<div class="floor">
<ul class="money_list cl">
<?php if($list){foreach($list as $k=>$v){ ?>
<li>
<span <?php if($v['type']==0){echo 'class="green"';} ?>><?php if($v['type']==0){echo '+';}else{echo '-';} ?> <?php echo $v['point']; ?></span>
<div class="info"><p class="tit"><?php echo $v['des']; ?></p>
<p class="time"><?php echo date('Y-m-d H:i:s',$v['add_time']); ?></p></div>
</li>
<?php }} ?>
</ul>
</div>
<script>
$(function(){
var ajaxload = false;
var maxpage = false;
var startpage = 1;
var totalpage = <?php echo $totalpage; ?>;
var tmp_url = window.location.href;
msg = tmp_url.split("#");
tmp_url = msg[0];
$(window).scroll(function ()
{
var listheight = $(".money_list").outerHeight();
if ($(document).scrollTop() + $(window).height() >= listheight)
{
if(startpage >= totalpage)
{
//$("#submit_bt_one").html("已是最后一页,没有更多数据!");
return false;
}
if(!ajaxload && !maxpage)
{
ajaxload = true;
//$("#submit_bt_one").html("努力加载中...");
var url = tmp_url;
var nextpage = startpage+1;
$.get(url,{page_ajax:1,page:nextpage},function(res)
{
if(res)
{
$(".money_list").append(res);
startpage++;
if(startpage >= totalpage)
{
maxpage = true;
//$("#submit_bt_one").html("已是最后一页,没有更多数据!");
}
else
{
//$("#submit_bt_one").html("点击加载更多");
}
ajaxload = false;
}
else
{
//$("#submit_bt_one").html("请求失败,请稍候再试!");
ajaxload = false;
}
},'json');
}
}
});
});
</script>
@include('weixin.common.footer')
</body></html>

4
routes/web.php

@ -64,7 +64,11 @@ Route::group(['prefix' => 'weixin', 'namespace' => 'Weixin'], function () {
Route::get('/goods/{id}', 'GoodsController@goods')->name('weixin_goods_detail'); //商品详情页
Route::get('/goodslist', 'GoodsController@goodslist')->name('weixin_goods_list'); //产品分类页
//个人中心
Route::get('/user', 'UserController@index')->name('weixin_user');
Route::get('/user_account', 'UserController@userAccount')->name('weixin_user_account');
Route::get('/user_money_list', 'UserController@userMoneyList')->name('weixin_user_money_list');
Route::get('/user_point_list', 'UserController@userPointList')->name('weixin_user_point_list');
//浏览记录
Route::get('/user_goods_history', 'UserController@userGoodsHistory')->name('weixin_user_goods_history');
Route::get('/user_goods_history_delete', 'UserController@userGoodsHistoryDelete')->name('weixin_user_goods_history_delete');

Loading…
Cancel
Save