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

1

... ... @@ -315,6 +315,11 @@ class OrderpageController extends WeChatBaseController{
}else{
$indent_id = $this -> request -> param();
$this -> assign('indent_id',$indent_id['indet_id']);
if($indent_id['type']==5){
$this -> assign('type',5);
}else{
$this -> assign('type',6);
}
return $this -> fetch();
}
... ... @@ -337,6 +342,11 @@ class OrderpageController extends WeChatBaseController{
$data = Db::name('address') -> where('id',$id['id']) -> find();
$this -> assign('data',$data);
$this -> assign('indent_id',$id['indet_id']);
if($id['type']==5){
$this -> assign('type',5);
}else{
$this -> assign('type',6);
}
return $this -> fetch();
}
... ...
... ... @@ -78,7 +78,12 @@
detailed = address_content;
$.post("{:url('Orderpage/add_shop_address')}",{name:name,phone:phone,region:region,detailed:detailed},function(data){
if(data){
window.location.href = "{:url('Orderpage/go_add_address',array('indet_id'=>$indent_id))}";
type = {$type};
if(type == 5){
window.location.href = "{:url('Orderpage/go_add_address',array('indet_id'=>$indent_id,'type'=>$type))}";
}else{
window.location.href = "{:url('Orderpage/go_add_address',array('indet_id'=>$indent_id))}";
}
}else{
alert('保存失败!');
}
... ...
... ... @@ -80,7 +80,13 @@
detailed = address_content;
$.post("{:url('Orderpage/address_edit')}",{id:id,name:name,phone:phone,region:region,detailed:detailed},function(data){
if(data){
window.location.href = "{:url('Orderpage/go_add_address',array('indet_id'=>$indent_id))}";
type = {$type};
if(type == 5){
window.location.href = "{:url('Orderpage/go_add_address',array('indet_id'=>$indent_id,'type'=>$type))}";
}else{
window.location.href = "{:url('Orderpage/go_add_address',array('indet_id'=>$indent_id))}";
}
}else{
alert('保存失败!');
}
... ...
... ... @@ -23,7 +23,7 @@
<img class="ad_topImg" src="__TMPL__/public/assets/images/left.png" alt="">
</a>
<h1>收货地址</h1>
<a href="{:url('Orderpage/add_shop_address',array('indet_id'=>$indent_id))}">
<a href="{:url('Orderpage/add_shop_address',array('indet_id'=>$indent_id,'type'=>$type))}">
<p>新增地址</p>
</a>
</div>
... ... @@ -130,7 +130,7 @@
*编辑地址
*/
function address_edit(id){
window.location.href = "{:url('Orderpage/address_edit',array('indet_id'=>$indent_id))}?id="+id;
window.location.href = "{:url('Orderpage/address_edit',array('indet_id'=>$indent_id,'type'=>$type))}?id="+id;
}
</script>
</body>
... ...