正在显示
3 个修改的文件
包含
122 行增加
和
25 行删除
@@ -578,7 +578,21 @@ class PersonalcenterController extends WeChatBaseController{ | @@ -578,7 +578,21 @@ class PersonalcenterController extends WeChatBaseController{ | ||
578 | $aaaa = array_merge($res,$my_res); | 578 | $aaaa = array_merge($res,$my_res); |
579 | $bb = array_column($aaaa,'create_time'); | 579 | $bb = array_column($aaaa,'create_time'); |
580 | $cc = array_multisort($bb,SORT_DESC,$aaaa); | 580 | $cc = array_multisort($bb,SORT_DESC,$aaaa); |
581 | - $this -> assign('res',$aaaa); | 581 | + if(count($res)!=0 || count($my_res)!=0){ |
582 | + foreach ($aaaa as $key=>$val){ | ||
583 | + if($val['indent_type'] == 1){ | ||
584 | + $pingtai[] = $val; | ||
585 | + }else{ | ||
586 | + $yewu[] = $val; | ||
587 | + } | ||
588 | + } | ||
589 | + $this -> assign('pingtai',$pingtai); | ||
590 | + $this -> assign('yewu',$yewu); | ||
591 | + }else{ | ||
592 | + $this -> assign('pingtai',array()); | ||
593 | + $this -> assign('yewu',array()); | ||
594 | + } | ||
595 | +// $this -> assign('res',$aaaa); | ||
582 | // $this -> assign('my_res',$my_res); | 596 | // $this -> assign('my_res',$my_res); |
583 | return $this -> fetch(); | 597 | return $this -> fetch(); |
584 | 598 |
@@ -60,6 +60,41 @@ | @@ -60,6 +60,41 @@ | ||
60 | .mui-pciker-list li.highlight { | 60 | .mui-pciker-list li.highlight { |
61 | color: #FF7700; | 61 | color: #FF7700; |
62 | } | 62 | } |
63 | + .wire { | ||
64 | + width: 100%; | ||
65 | + height: 0.16rem; | ||
66 | + background: #fff; | ||
67 | + } | ||
68 | + | ||
69 | + .qiehuan_tab { | ||
70 | + padding-top: 0.16rem; | ||
71 | + display: flex; | ||
72 | + display: -webkit-flex; | ||
73 | + justify-content: space-around; | ||
74 | + align-items: center; | ||
75 | + } | ||
76 | + .qiehuan_left{ | ||
77 | + width: 2rem; | ||
78 | + height: 0.6rem; | ||
79 | + font-size: 0.28rem; | ||
80 | + background:#fff; | ||
81 | + color: #333; | ||
82 | + border-radius: 0.5rem; | ||
83 | + text-align: center; | ||
84 | + line-height: 0.6rem; | ||
85 | + box-shadow: 0 0.06rem 0.12rem rgba(255,255,255,1);; | ||
86 | + } | ||
87 | + .qiehuan_lefts { | ||
88 | + background: linear-gradient(328deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%); | ||
89 | + box-shadow: 0 0.06rem 0.12rem rgba(255, 128, 0, 0.24); | ||
90 | + box-sizing: border-box; | ||
91 | + | ||
92 | + color: rgba(255, 255, 255, 1); | ||
93 | + | ||
94 | + } | ||
95 | + .b{ | ||
96 | + display: none; | ||
97 | + } | ||
63 | </style> | 98 | </style> |
64 | <body> | 99 | <body> |
65 | <!-- 顶部 --> | 100 | <!-- 顶部 --> |
@@ -80,30 +115,63 @@ | @@ -80,30 +115,63 @@ | ||
80 | <div class="time_btn" onclick="my_search()">搜索</div> | 115 | <div class="time_btn" onclick="my_search()">搜索</div> |
81 | </div> | 116 | </div> |
82 | 117 | ||
83 | - | ||
84 | -<div class="record_Box"> | ||
85 | - <ul> | ||
86 | - <volist name="res" id="vo"> | ||
87 | - <li> | ||
88 | - <div class="recordImg"> | ||
89 | - <img src="{$vo.avatar}" alt=""> | ||
90 | - </div> | ||
91 | - <div class="recordTxt"> | ||
92 | - <div class="recordTxt1 one-txt-cut">{$vo.user_name}购买了{$vo.book_name}</div> | ||
93 | - <if condition="$vo.indent_type eq 1"> | ||
94 | - <div class="recordTxt2">平台订单</div> | ||
95 | - </if> | ||
96 | - <if condition="$vo.indent_type eq 2"> | ||
97 | - <div class="recordTxt2">业务员订单</div> | ||
98 | - </if> | ||
99 | - <p class="recordTxt3">{$vo.create_time|date="Y-m-d H:i:s",###}</p> | ||
100 | - </div> | ||
101 | - <div class="recordNum">佣金+{$vo.total_money}</div> | ||
102 | - </li> | ||
103 | - </volist> | ||
104 | - | ||
105 | - </ul> | 118 | +<div class="wire"></div> |
119 | +<!--切换tab--> | ||
120 | +<div class="qiehuan_tab"> | ||
121 | + <div class="qiehuan_left qiehuan_lefts">平台收入</div> | ||
122 | + <div class="qiehuan_left">团购收入</div> | ||
123 | +</div> | ||
124 | +<!--列表数据内容--> | ||
125 | +<div class="a"> | ||
126 | + <div class="record_Box"> | ||
127 | + <ul> | ||
128 | + <volist name="pingtai" id="vo"> | ||
129 | + <li> | ||
130 | + <div class="recordImg"> | ||
131 | + <img src="{$vo.avatar}" alt=""> | ||
132 | + </div> | ||
133 | + <div class="recordTxt"> | ||
134 | + <div class="recordTxt1 one-txt-cut">{$vo.user_name}购买了{$vo.book_name}</div> | ||
135 | + <if condition="$vo.indent_type eq 1"> | ||
136 | + <div class="recordTxt2">平台收入</div> | ||
137 | + </if> | ||
138 | + <if condition="$vo.indent_type eq 2"> | ||
139 | + <div class="recordTxt2">团购收入</div> | ||
140 | + </if> | ||
141 | + <p class="recordTxt3">{$vo.create_time|date="Y-m-d H:i:s",###}</p> | ||
142 | + </div> | ||
143 | + <div class="recordNum">佣金+{$vo.total_money}</div> | ||
144 | + </li> | ||
145 | + </volist> | ||
146 | + </ul> | ||
147 | + </div> | ||
148 | +</div> | ||
149 | +<div class="b"> | ||
150 | + <div class="record_Box"> | ||
151 | + <ul> | ||
152 | + <volist name="yewu" id="vo"> | ||
153 | + <li> | ||
154 | + <div class="recordImg"> | ||
155 | + <img src="{$vo.avatar}" alt=""> | ||
156 | + </div> | ||
157 | + <div class="recordTxt"> | ||
158 | + <div class="recordTxt1 one-txt-cut">{$vo.user_name}购买了{$vo.book_name}</div> | ||
159 | + <if condition="$vo.indent_type eq 1"> | ||
160 | + <div class="recordTxt2">平台收入</div> | ||
161 | + </if> | ||
162 | + <if condition="$vo.indent_type eq 2"> | ||
163 | + <div class="recordTxt2">团购收入</div> | ||
164 | + </if> | ||
165 | + <p class="recordTxt3">{$vo.create_time|date="Y-m-d H:i:s",###}</p> | ||
166 | + </div> | ||
167 | + <div class="recordNum">佣金+{$vo.total_money}</div> | ||
168 | + </li> | ||
169 | + </volist> | ||
170 | + </ul> | ||
171 | + </div> | ||
106 | </div> | 172 | </div> |
173 | + | ||
174 | + | ||
107 | <!-- 底部更多 --> | 175 | <!-- 底部更多 --> |
108 | <div class="in_what">—— 已经到底了哦 ——</div> | 176 | <div class="in_what">—— 已经到底了哦 ——</div> |
109 | <script src="__TMPL__/public/assets/js/base.js"></script> | 177 | <script src="__TMPL__/public/assets/js/base.js"></script> |
@@ -112,6 +180,21 @@ | @@ -112,6 +180,21 @@ | ||
112 | <script src="__TMPL__/public/assets/js/city.data-3.js"></script> | 180 | <script src="__TMPL__/public/assets/js/city.data-3.js"></script> |
113 | <script src="__TMPL__/public/assets/js/jquery.js"></script> | 181 | <script src="__TMPL__/public/assets/js/jquery.js"></script> |
114 | <script> | 182 | <script> |
183 | + //团购切换tab | ||
184 | + $(".qiehuan_left").click(function(){ | ||
185 | + var index = $(this).index(); | ||
186 | + console.log(index) | ||
187 | + $(this).addClass("qiehuan_lefts").siblings().removeClass("qiehuan_lefts"); | ||
188 | + if(index == 0){ | ||
189 | + $(".a").css("display","block"); | ||
190 | + $(".b").css("display","none") | ||
191 | + }else{ | ||
192 | + $(".a").css("display","none"); | ||
193 | + $(".b").css("display","block") | ||
194 | + } | ||
195 | + }) | ||
196 | +</script> | ||
197 | +<script> | ||
115 | /** | 198 | /** |
116 | *点击搜索 | 199 | *点击搜索 |
117 | */ | 200 | */ |
@@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController | @@ -204,7 +204,7 @@ class WeChatBaseController extends BaseController | ||
204 | */ | 204 | */ |
205 | public function checkWeChatUserLogin() | 205 | public function checkWeChatUserLogin() |
206 | { | 206 | { |
207 | - /*$user = Db::name('user')->where('id',27)->find(); | 207 | + /*$user = Db::name('user')->where('id',29)->find(); |
208 | cmf_update_current_user($user);*/ | 208 | cmf_update_current_user($user);*/ |
209 | $userId = cmf_get_current_user_id(); | 209 | $userId = cmf_get_current_user_id(); |
210 | if (empty($userId)) { | 210 | if (empty($userId)) { |
-
请 注册 或 登录 后发表评论