作者 anyv

5

... ... @@ -50,7 +50,6 @@ class PlatformordersController extends AdminBaseController{
//地址查询
$address = Db::name('address') -> where("id",$data_in['indent_address']) -> find();
if(!empty($address)){
$address['detailed'] = explode(',',$address['detailed']);
$this -> assign('address',$address);
}else{
$this -> assign('address',null);
... ...
... ... @@ -79,8 +79,7 @@ class SalesmanorderController extends AdminBaseController{
$data = Db::name('indent') -> where('id',$id['id']) -> find();
if(!empty($data['indent_address'])){
$address = Db::name('address') -> where("id",$data['indent_address']) -> find();
$address_detailed = explode(',',$address['detailed']);
$address_region = $address['region'].$address_detailed[0].$address_detailed[1];
$address_region = $address['region'].$address['detailed'];
}else{
$address_region = '';
}
... ...
... ... @@ -270,12 +270,6 @@ class OrderpageController extends WeChatBaseController{
$indent_id = $this -> request -> param();
$uid = cmf_get_current_user_id();
$data = Db::name('address') -> where("delete_time = 0 and uid =".$uid) -> select() -> toArray();
if(!empty($data)){
foreach($data as $key => $val){
$detailed = explode(',',$val['detailed']);
$data[$key]['detailed'] = $detailed[0].$detailed[1];
}
}
$this -> assign('indent_id',$indent_id['indet_id']);
$this -> assign('data',$data);
return $this -> fetch();
... ... @@ -333,9 +327,6 @@ class OrderpageController extends WeChatBaseController{
}else{
$id = $this -> request -> param();
$data = Db::name('address') -> where('id',$id['id']) -> find();
$detailed = explode(',',$data['detailed']);
$data['detailed0'] = $detailed[0];
$data['detailed1'] = $detailed[1];
$this -> assign('data',$data);
$this -> assign('indent_id',$id['indet_id']);
return $this -> fetch();
... ...
... ... @@ -206,12 +206,6 @@ class PersonalcenterController extends WeChatBaseController{
$uid = cmf_get_current_user_id();
$data = Db::name('address') -> where("delete_time = 0 and uid =".$uid) -> select() -> toArray();
if(!empty($data)){
foreach($data as $key => $val){
$detailed = explode(',',$val['detailed']);
$data[$key]['detailed'] = $detailed[0].$detailed[1];
}
}
$this -> assign('data',$data);
return $this -> fetch();
... ... @@ -283,9 +277,6 @@ class PersonalcenterController extends WeChatBaseController{
}else{
$id = $this -> request -> param();
$data = Db::name('address') -> where('id',$id['id']) -> find();
$detailed = explode(',',$data['detailed']);
$data['detailed0'] = $detailed[0];
$data['detailed1'] = $detailed[1];
$this -> assign('data',$data);
return $this -> fetch();
}
... ...
... ... @@ -18,7 +18,7 @@
<h4>姓名:{$data_in.name}</h4>
<h4>手机号:{$data_in.phone}</h4>
<h4>买家留言:{$data_in.leave_word}</h4>
<h4>收货地址:{$address.region}{$address.detailed[0]}{$address.detailed[1]}</h4>
<h4>收货地址:{$address.region}{$address.detailed}</h4>
</div>
</div>
</body>
... ...
... ... @@ -138,7 +138,7 @@
<li id="saved-image{$key}">
<input id="photo-{$key}" type="hidden" name="det_img[]"
value="{$vo.url}">
<input class="form-control" id="photo-{$key}-name" type="text"
<input class="form-control" id="photo-{$key}-name" type="hidden"
name="det_name[]"
value="{$vo.name|default=''}" style="width: 200px;" title="图片名称">
<img id="photo-{$key}-preview"
... ...
... ... @@ -49,9 +49,6 @@
<input type="text" placeholder="街道、小区、门牌号码" id="address_content">
</li>
</ul>
<div class="add_detailAddress">
<textarea placeholder="请输入详细地址,不少于15字" maxlength="200" id="address_content_con"></textarea>
</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
... ... @@ -78,7 +75,7 @@
region = $('#city_text').text();
address_content = $('#address_content').val();
address_content_con = $('#address_content_con').val();
detailed = address_content+','+address_content_con;
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))}";
... ...
... ... @@ -47,12 +47,9 @@
<input type="hidden" name="id" value="{$data.id}" id="id">
<li>
<label for="">详细地址</label>
<input type="text" placeholder="街道、小区、门牌号码" id="address_content" value="{$data.detailed0}">
<input type="text" placeholder="街道、小区、门牌号码" id="address_content" value="{$data.detailed}">
</li>
</ul>
<div class="add_detailAddress">
<textarea placeholder="请输入详细地址,不少于15字" maxlength="200" id="address_content_con">{$data.detailed1}</textarea>
</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
... ... @@ -80,7 +77,7 @@
region = $('#city_text').text();
address_content = $('#address_content').val();
address_content_con = $('#address_content_con').val();
detailed = address_content+','+address_content_con;
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))}";
... ...
... ... @@ -30,28 +30,6 @@
<!-- 内容 -->
<div class="ad_content">
<ul id="ad_contentUl">
<!--<volist name="data" id="vo">
<li ontouchstart="fors()">
<div class="ad_conBox">
<div class="ad_con1">
<p class="ad_conName">{$vo.name}</p>
<if condition="$vo.default_address eq 1">
<p class="ad_conMo" style="display:block;">默认</p>
<else/>
<p class="ad_conMo">默认</p>
</if>
<p class="ad_conPhone">{$vo.phone}</p>
<img class="ad_conImg" src="__TMPL__/public/assets/images/35.png" ontouchstart="address_edit({$vo.id})" alt="">
</div>
</div>
<p class="ad_conAddress">收货地址:{$vo.region}{$vo.detailed}</p>
<div class="ad_MoRemove">
<div class="ad_mo" ontouchstart="set_default({$vo.id})">设为默认</div>
<div class="ad_move" ontouchstart="address_del({$vo.id})">删除</div>
</div>
</li>
</volist>-->
<volist name="data" id="vo">
<li>
<div class="" style="display: flex;justify-content: flex-start;align-items: center;">
... ...
... ... @@ -49,9 +49,6 @@
<input type="text" placeholder="街道、小区、门牌号码" id="address_content">
</li>
</ul>
<div class="add_detailAddress">
<textarea placeholder="请输入详细地址,不少于15字" maxlength="200" id="address_content_con"></textarea>
</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
... ... @@ -78,7 +75,7 @@
region = $('#city_text').text();
address_content = $('#address_content').val();
address_content_con = $('#address_content_con').val();
detailed = address_content+','+address_content_con;
detailed = address_content;
$.post("{:url('Personalcenter/add_shop_address')}",{name:name,phone:phone,region:region,detailed:detailed},function(data){
if(data){
window.location.href = "{:url('Personalcenter/shop_address')}";
... ...
... ... @@ -47,12 +47,9 @@
<input type="hidden" name="id" value="{$data.id}" id="id">
<li>
<label for="">详细地址</label>
<input type="text" placeholder="街道、小区、门牌号码" id="address_content" value="{$data.detailed0}">
<input type="text" placeholder="街道、小区、门牌号码" id="address_content" value="{$data.detailed}">
</li>
</ul>
<div class="add_detailAddress">
<textarea placeholder="请输入详细地址,不少于15字" maxlength="200" id="address_content_con">{$data.detailed1}</textarea>
</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
... ... @@ -80,7 +77,7 @@
region = $('#city_text').text();
address_content = $('#address_content').val();
address_content_con = $('#address_content_con').val();
detailed = address_content+','+address_content_con;
detailed = address_content;
$.post("{:url('Personalcenter/address_edit')}",{id:id,name:name,phone:phone,region:region,detailed:detailed},function(data){
if(data){
window.location.href = "{:url('Personalcenter/shop_address')}";
... ...