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

5

@@ -42,6 +42,10 @@ class SalesmangoodsController extends AdminBaseController{ @@ -42,6 +42,10 @@ class SalesmangoodsController extends AdminBaseController{
42 public function salesman_edit(){ 42 public function salesman_edit(){
43 43
44 if($this -> request -> isPost()){ 44 if($this -> request -> isPost()){
  45 + if($_POST['money'] > $_POST['price']){
  46 + $this -> error('佣金不能大于售价');
  47 + }
  48 +
45 if(!empty($_POST['det_img'])){ 49 if(!empty($_POST['det_img'])){
46 $_POST['det_img'] = json_encode($_POST['det_img']); 50 $_POST['det_img'] = json_encode($_POST['det_img']);
47 $_POST['det_name'] = json_encode($_POST['det_name']); 51 $_POST['det_name'] = json_encode($_POST['det_name']);
@@ -57,7 +61,6 @@ class SalesmangoodsController extends AdminBaseController{ @@ -57,7 +61,6 @@ class SalesmangoodsController extends AdminBaseController{
57 $data = Db::name('goods') -> where('id',$id['id']) -> find(); 61 $data = Db::name('goods') -> where('id',$id['id']) -> find();
58 if(!empty($data['det_img'])){ 62 if(!empty($data['det_img'])){
59 $data['det_img'] = json_decode($data['det_img'],true); 63 $data['det_img'] = json_decode($data['det_img'],true);
60 - $data['det_img'] = explode(',',$data['det_img']);  
61 $data['det_name'] = json_decode($data['det_name'],true); 64 $data['det_name'] = json_decode($data['det_name'],true);
62 foreach ($data['det_img'] as $key => $val){ 65 foreach ($data['det_img'] as $key => $val){
63 $data['more'][$key]['url'] = $data['det_img'][$key]; 66 $data['more'][$key]['url'] = $data['det_img'][$key];
@@ -54,6 +54,10 @@ class GoodsdetailsController extends WeChatBaseController{ @@ -54,6 +54,10 @@ class GoodsdetailsController extends WeChatBaseController{
54 54
55 } 55 }
56 $data = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where('a.id',$goods_id['goods_id']) -> find(); 56 $data = Db::name('goods') -> alias('a') -> field("a.*,b.name") -> join('classification b','a.classify_id = b.id','LEFT') -> where('a.id',$goods_id['goods_id']) -> find();
  57 + //当商品不存在时跳转到首页
  58 + if(empty($data)){
  59 + $this -> redirect("Index/index");
  60 + }
57 $this -> assign('price',$data['price']); 61 $this -> assign('price',$data['price']);
58 $price = explode('.',$data['price']); 62 $price = explode('.',$data['price']);
59 $pricing = explode('.',$data['pricing']); 63 $pricing = explode('.',$data['pricing']);
@@ -546,7 +546,7 @@ class PersonalcenterController extends WeChatBaseController{ @@ -546,7 +546,7 @@ class PersonalcenterController extends WeChatBaseController{
546 if(empty($res)){ 546 if(empty($res)){
547 $res = null; 547 $res = null;
548 } 548 }
549 - $this -> assign('res',$res); 549 +// $this -> assign('res',$res);
550 //搜索老师用户 550 //搜索老师用户
551 $teacher_avatar = Db::name('user') -> where('id',$uid) -> find(); 551 $teacher_avatar = Db::name('user') -> where('id',$uid) -> find();
552 if(!empty($get['startime']) && !empty($get['endtime'])){ 552 if(!empty($get['startime']) && !empty($get['endtime'])){
@@ -575,7 +575,11 @@ class PersonalcenterController extends WeChatBaseController{ @@ -575,7 +575,11 @@ class PersonalcenterController extends WeChatBaseController{
575 if(empty($my_res)){ 575 if(empty($my_res)){
576 $my_res = null; 576 $my_res = null;
577 } 577 }
578 - $this -> assign('my_res',$my_res); 578 + $aaaa = array_merge($res,$my_res);
  579 + $bb = array_column($aaaa,'create_time');
  580 + $cc = array_multisort($bb,SORT_DESC,$aaaa);
  581 + $this -> assign('res',$aaaa);
  582 +// $this -> assign('my_res',$my_res);
579 return $this -> fetch(); 583 return $this -> fetch();
580 584
581 } 585 }
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 </head> 11 </head>
12 <style> 12 <style>
13 .de_main4ParaCon p{ 13 .de_main4ParaCon p{
14 - width: 2.9rem; 14 + /*width: 2.9rem;*/
15 font-size: 0.28rem; 15 font-size: 0.28rem;
16 cursor: pointer; 16 cursor: pointer;
17 margin-bottom: 0.08rem; 17 margin-bottom: 0.08rem;
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 5 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
6 <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" /> 6 <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
7 <meta http-equiv="X-UA-Compatible" content="ie=edge"> 7 <meta http-equiv="X-UA-Compatible" content="ie=edge">
8 - <title>学考无忧-业务员商城</title> 8 + <title>学考无忧-校园团购</title>
9 <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css"> 9 <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css">
10 <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css"> 10 <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
11 </head> 11 </head>
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <a href="javascript:history.back(-1)"> 16 <a href="javascript:history.back(-1)">
17 <img class="ad_topImg" src="__TMPL__/public/assets/images/left2.png" alt=""> 17 <img class="ad_topImg" src="__TMPL__/public/assets/images/left2.png" alt="">
18 </a> 18 </a>
19 - <p style="color:white">业务员商城</p> 19 + <p style="color:white">校园团购</p>
20 </div> 20 </div>
21 <div class="in_hot_shop se_con" style="margin-top:0.28rem"> 21 <div class="in_hot_shop se_con" style="margin-top:0.28rem">
22 <volist name="salesman_goods" id="vo"> 22 <volist name="salesman_goods" id="vo">
@@ -190,7 +190,7 @@ @@ -190,7 +190,7 @@
190 </if> 190 </if>
191 191
192 <elseif condition="$data.state eq 5 || $data.state eq 3 || $data.state eq 2"/> 192 <elseif condition="$data.state eq 5 || $data.state eq 3 || $data.state eq 2"/>
193 - <!--<div class="pay_bottom2_2">售后咨询</div>--> 193 + <div class="pay_bottom2_2">售后咨询</div>
194 <elseif condition="$data.state eq 4"/> 194 <elseif condition="$data.state eq 4"/>
195 <div class="myorder_bottom2_1 cancel_order" data-id="{$data.id}">取消订单</div> 195 <div class="myorder_bottom2_1 cancel_order" data-id="{$data.id}">取消订单</div>
196 <a href="{:url('portal/pay/index',array('id'=>$data['id']))}"> 196 <a href="{:url('portal/pay/index',array('id'=>$data['id']))}">
@@ -101,24 +101,7 @@ @@ -101,24 +101,7 @@
101 <div class="recordNum">佣金+{$vo.total_money}</div> 101 <div class="recordNum">佣金+{$vo.total_money}</div>
102 </li> 102 </li>
103 </volist> 103 </volist>
104 - <volist name="my_res" id="vo">  
105 - <li>  
106 - <div class="recordImg">  
107 - <img src="{$vo.avatar}" alt="">  
108 - </div>  
109 - <div class="recordTxt">  
110 - <div class="recordTxt1 one-txt-cut">{$vo.user_name}购买了{$vo.book_name}</div>  
111 - <if condition="$vo.indent_type eq 1">  
112 - <div class="recordTxt2">平台订单</div>  
113 - </if>  
114 - <if condition="$vo.indent_type eq 2">  
115 - <div class="recordTxt2">业务员订单</div>  
116 - </if>  
117 - <p class="recordTxt3">{$vo.create_time|date="Y-m-d H:i:s",###}</p>  
118 - </div>  
119 - <div class="recordNum">佣金+{$vo.total_money}</div>  
120 - </li>  
121 - </volist> 104 +
122 </ul> 105 </ul>
123 </div> 106 </div>
124 <!-- 底部更多 --> 107 <!-- 底部更多 -->
@@ -119,19 +119,19 @@ @@ -119,19 +119,19 @@
119 </a> 119 </a>
120 </li> 120 </li>
121 <li> 121 <li>
122 - <a href="{:url('Order/get_all',array('state'=>3))}"> 122 + <a href="{:url('Order/get_all',array('state'=>5))}">
123 <div class="w_my_leftImg"> 123 <div class="w_my_leftImg">
124 - <img src="__TMPL__/public/assets/images/44.png" alt="" /> 124 + <img src="__TMPL__/public/assets/images/45.png" alt="" />
125 </div> 125 </div>
126 - <p class="w_my_leftTxt">完成</p> 126 + <p class="w_my_leftTxt">发货</p>
127 </a> 127 </a>
128 </li> 128 </li>
129 <li> 129 <li>
130 - <a href="{:url('Order/get_all',array('state'=>5))}"> 130 + <a href="{:url('Order/get_all',array('state'=>3))}">
131 <div class="w_my_leftImg"> 131 <div class="w_my_leftImg">
132 - <img src="__TMPL__/public/assets/images/45.png" alt="" /> 132 + <img src="__TMPL__/public/assets/images/44.png" alt="" />
133 </div> 133 </div>
134 - <p class="w_my_leftTxt">发货</p> 134 + <p class="w_my_leftTxt">完成</p>
135 </a> 135 </a>
136 </li> 136 </li>
137 </ul> 137 </ul>
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 5 <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
6 <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" /> 6 <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
7 <meta http-equiv="X-UA-Compatible" content="ie=edge"> 7 <meta http-equiv="X-UA-Compatible" content="ie=edge">
8 - <title>学考无忧-收地址</title> 8 + <title>学考无忧-收地址</title>
9 <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css"> 9 <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css">
10 <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css"> 10 <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css">
11 </head> 11 </head>
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 <!-- 顶部 --> 14 <!-- 顶部 -->
15 <div class="ad_top top_navBg"> 15 <div class="ad_top top_navBg">
16 <img class="ad_topImg" src="__TMPL__/public/assets/images/left2.png" alt="" /> 16 <img class="ad_topImg" src="__TMPL__/public/assets/images/left2.png" alt="" />
17 - <h1>收货地址</h1> 17 + <h1>购物车</h1>
18 <p>管理</p> 18 <p>管理</p>
19 </div> 19 </div>
20 <div class="shopping_cartBox"> 20 <div class="shopping_cartBox">