作者 anyv
1 个管道 的构建 通过 耗费 1 秒

4

... ... @@ -578,7 +578,21 @@ class PersonalcenterController extends WeChatBaseController{
$aaaa = array_merge($res,$my_res);
$bb = array_column($aaaa,'create_time');
$cc = array_multisort($bb,SORT_DESC,$aaaa);
$this -> assign('res',$aaaa);
if(count($res)!=0 || count($my_res)!=0){
foreach ($aaaa as $key=>$val){
if($val['indent_type'] == 1){
$pingtai[] = $val;
}else{
$yewu[] = $val;
}
}
$this -> assign('pingtai',$pingtai);
$this -> assign('yewu',$yewu);
}else{
$this -> assign('pingtai',array());
$this -> assign('yewu',array());
}
// $this -> assign('res',$aaaa);
// $this -> assign('my_res',$my_res);
return $this -> fetch();
... ...
... ... @@ -60,6 +60,41 @@
.mui-pciker-list li.highlight {
color: #FF7700;
}
.wire {
width: 100%;
height: 0.16rem;
background: #fff;
}
.qiehuan_tab {
padding-top: 0.16rem;
display: flex;
display: -webkit-flex;
justify-content: space-around;
align-items: center;
}
.qiehuan_left{
width: 2rem;
height: 0.6rem;
font-size: 0.28rem;
background:#fff;
color: #333;
border-radius: 0.5rem;
text-align: center;
line-height: 0.6rem;
box-shadow: 0 0.06rem 0.12rem rgba(255,255,255,1);;
}
.qiehuan_lefts {
background: linear-gradient(328deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%);
box-shadow: 0 0.06rem 0.12rem rgba(255, 128, 0, 0.24);
box-sizing: border-box;
color: rgba(255, 255, 255, 1);
}
.b{
display: none;
}
</style>
<body>
<!-- 顶部 -->
... ... @@ -80,30 +115,63 @@
<div class="time_btn" onclick="my_search()">搜索</div>
</div>
<div class="record_Box">
<ul>
<volist name="res" id="vo">
<li>
<div class="recordImg">
<img src="{$vo.avatar}" alt="">
</div>
<div class="recordTxt">
<div class="recordTxt1 one-txt-cut">{$vo.user_name}购买了{$vo.book_name}</div>
<if condition="$vo.indent_type eq 1">
<div class="recordTxt2">平台订单</div>
</if>
<if condition="$vo.indent_type eq 2">
<div class="recordTxt2">业务员订单</div>
</if>
<p class="recordTxt3">{$vo.create_time|date="Y-m-d H:i:s",###}</p>
</div>
<div class="recordNum">佣金+{$vo.total_money}</div>
</li>
</volist>
</ul>
<div class="wire"></div>
<!--切换tab-->
<div class="qiehuan_tab">
<div class="qiehuan_left qiehuan_lefts">平台收入</div>
<div class="qiehuan_left">团购收入</div>
</div>
<!--列表数据内容-->
<div class="a">
<div class="record_Box">
<ul>
<volist name="pingtai" id="vo">
<li>
<div class="recordImg">
<img src="{$vo.avatar}" alt="">
</div>
<div class="recordTxt">
<div class="recordTxt1 one-txt-cut">{$vo.user_name}购买了{$vo.book_name}</div>
<if condition="$vo.indent_type eq 1">
<div class="recordTxt2">平台收入</div>
</if>
<if condition="$vo.indent_type eq 2">
<div class="recordTxt2">团购收入</div>
</if>
<p class="recordTxt3">{$vo.create_time|date="Y-m-d H:i:s",###}</p>
</div>
<div class="recordNum">佣金+{$vo.total_money}</div>
</li>
</volist>
</ul>
</div>
</div>
<div class="b">
<div class="record_Box">
<ul>
<volist name="yewu" id="vo">
<li>
<div class="recordImg">
<img src="{$vo.avatar}" alt="">
</div>
<div class="recordTxt">
<div class="recordTxt1 one-txt-cut">{$vo.user_name}购买了{$vo.book_name}</div>
<if condition="$vo.indent_type eq 1">
<div class="recordTxt2">平台收入</div>
</if>
<if condition="$vo.indent_type eq 2">
<div class="recordTxt2">团购收入</div>
</if>
<p class="recordTxt3">{$vo.create_time|date="Y-m-d H:i:s",###}</p>
</div>
<div class="recordNum">佣金+{$vo.total_money}</div>
</li>
</volist>
</ul>
</div>
</div>
<!-- 底部更多 -->
<div class="in_what">—— 已经到底了哦 ——</div>
<script src="__TMPL__/public/assets/js/base.js"></script>
... ... @@ -112,6 +180,21 @@
<script src="__TMPL__/public/assets/js/city.data-3.js"></script>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script>
//团购切换tab
$(".qiehuan_left").click(function(){
var index = $(this).index();
console.log(index)
$(this).addClass("qiehuan_lefts").siblings().removeClass("qiehuan_lefts");
if(index == 0){
$(".a").css("display","block");
$(".b").css("display","none")
}else{
$(".a").css("display","none");
$(".b").css("display","block")
}
})
</script>
<script>
/**
*点击搜索
*/
... ...
... ... @@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController
*/
public function checkWeChatUserLogin()
{
/*$user = Db::name('user')->where('id',27)->find();
/*$user = Db::name('user')->where('id',29)->find();
cmf_update_current_user($user);*/
$userId = cmf_get_current_user_id();
if (empty($userId)) {
... ...