正在显示
3 个修改的文件
包含
7 行增加
和
7 行删除
@@ -154,13 +154,15 @@ class OrderpageController extends WeChatBaseController{ | @@ -154,13 +154,15 @@ class OrderpageController extends WeChatBaseController{ | ||
154 | $this -> assign('courier',$courier['courier']); | 154 | $this -> assign('courier',$courier['courier']); |
155 | $money['money'] = $money['money']+$courier['courier']; | 155 | $money['money'] = $money['money']+$courier['courier']; |
156 | $this -> assign('money',$money['money']); | 156 | $this -> assign('money',$money['money']); |
157 | + if(empty($indent_id['address_id'])){ | ||
158 | + $address = Db::name('address') -> where("uid=".$uid." and default_address=1 and delete_time = 0") -> find(); | ||
159 | + }else{ | ||
160 | + $address = Db::name('address') -> where('id',$indent_id['address_id']) -> find(); | ||
161 | + } | ||
157 | 162 | ||
158 | - $address = Db::name('address') -> where("uid=".$uid." and default_address=1 and delete_time = 0") -> find(); | ||
159 | if(empty($address)){ | 163 | if(empty($address)){ |
160 | $this -> assign('address',4); | 164 | $this -> assign('address',4); |
161 | }else{ | 165 | }else{ |
162 | - $address_arr = explode(',',$address['detailed']); | ||
163 | - $address['detailed'] = $address_arr[0].$address_arr[1]; | ||
164 | $indet_data = Db::name('indent') -> where("id",$indent_id['indet_id']) -> find(); | 166 | $indet_data = Db::name('indent') -> where("id",$indent_id['indet_id']) -> find(); |
165 | if($indet_data['state'] == 4){ | 167 | if($indet_data['state'] == 4){ |
166 | $indet_data_update['id'] = $indent_id['indet_id']; | 168 | $indet_data_update['id'] = $indent_id['indet_id']; |
@@ -74,9 +74,9 @@ | @@ -74,9 +74,9 @@ | ||
74 | 74 | ||
75 | id = $('.haha').attr('data-id'); | 75 | id = $('.haha').attr('data-id'); |
76 | if(typeof(id) == 'undefined'){ | 76 | if(typeof(id) == 'undefined'){ |
77 | - window.location.href = "{:url('Orderpage/order_page',array('indet_id'=>$indent_id))}"; | 77 | + window.location.href = "{:url('Orderpage/order_salesman_kd',array('indet_id'=>$indent_id))}"; |
78 | }else{ | 78 | }else{ |
79 | - window.location.href = "{:url('Orderpage/order_page',array('indet_id'=>$indent_id))}?address_id="+id; | 79 | + window.location.href = "{:url('Orderpage/order_salesman_kd',array('indet_id'=>$indent_id))}?address_id="+id; |
80 | } | 80 | } |
81 | 81 | ||
82 | } | 82 | } |
-
请 注册 或 登录 后发表评论