diff --git a/app/user/controller/CenterController.php b/app/user/controller/CenterController.php index 156bf39..49eb9d2 100644 --- a/app/user/controller/CenterController.php +++ b/app/user/controller/CenterController.php @@ -11,7 +11,7 @@ class CenterController extends HomeBaseController function _initialize() { if (empty(session('user.id'))) { - $this->error('登录失败'); + $this->error('登录超时', url('index/Index/index')); } } @@ -356,4 +356,18 @@ class CenterController extends HomeBaseController } } + public function integralLog() { + $type = request()->param('type'); + if($type == 1) { + $title = '积分获取记录'; + }else { + $title = '积分使用记录'; + } + $log = Db::name('zj_integral_log')->where(['uid'=>session('user.id')])->select(); + return $this->fetch('integral_log', [ + 'log' => $log, + 'title' => $title + ]); + } + } diff --git a/public/themes/simpleboot3/user/center/integral_log.html b/public/themes/simpleboot3/user/center/integral_log.html new file mode 100644 index 0000000..9dae7ad --- /dev/null +++ b/public/themes/simpleboot3/user/center/integral_log.html @@ -0,0 +1,62 @@ + +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> + <link rel="stylesheet" href="https://at.alicdn.com/t/font_834805_0ml90wdq5hzm.css"> + <link rel="stylesheet" href="__INDEX__/css/base.css"> + <link rel="stylesheet" href="__INDEX__/css/swiper.min.css"> + <script type="text/javascript" src="__INDEX__/js/base.js"></script> + <title>{$title}</title> + <style> + .gainlist{ + display:flex; + justify-content: space-between; + align-items: center; + padding: 0.42rem 0.36rem; + border-bottom: 1px solid #f5f5f5; + background: #fff; + } + .buy_good{ + font-size: 0.32rem; + color:#000000; + font-weight: bold; + } + .good_date{ + color:#999999; + font-size: 0.26rem; + margin-top: 0.1rem; + } + .code_intergral{ + color:#FF0800; + font-size: 0.36rem; + } + </style> +</head> +<body> +<div class="container"> + <volist name="log" id="vo"> + <div class="gainlist"> + <div class="good_intergral"> + <p class="buy_good"> + <if condition="$vo['type'] eq '1'"> + 购买商品消费 + </if> + <if condition="$vo['type'] eq '2'"> + 购买商品获得 + </if> + <if condition="$vo['type'] eq '3'"> + 好友购买奖励 + </if> + </p> + <p class="good_date">{$vo.create_time|date='Y-m-d', ###}</p> + </div> + <div class="code_intergral"> + {$vo.balance}积分 + </div> + </div> + </volist> +</div> +</body> +</html> diff --git a/public/themes/simpleboot3/user/center/my_balance.html b/public/themes/simpleboot3/user/center/my_balance.html index 982c95b..4e62bd8 100644 --- a/public/themes/simpleboot3/user/center/my_balance.html +++ b/public/themes/simpleboot3/user/center/my_balance.html @@ -60,11 +60,11 @@ <p class="remain">积分余额</p> </div> <div class="integrate_list"> - <div class="list takenote"> + <div class="list takenote" data-url="{:url('user/Center/integralLog',['type'=>1])}"> <p class="record">积分获取记录</p> <P class="iconfont icon-jinru"></P> </div> - <div class="list uselist"> + <div class="list uselist" data-url="{:url('user/Center/integralLog',['type'=>2])}"> <p class="record">积分使用记录</p> <P class="iconfont icon-jinru"></P> </div> @@ -82,10 +82,10 @@ <script src="__INDEX__/js/jquery.min.js"></script> <script> $(".takenote").click(function(){ - + window.location.href=$(this).attr('data-url'); }) $(".uselist").click(function(){ - + window.location.href=$(this).attr('data-url'); }) //赠送好友积分 $(".friend").click(function(){