-
- {{if !empty($address.alias)}}
-
{{$address.alias}}
- {{/if}}
- {{if isset($address['is_default']) and $address['is_default'] eq 1}}
-
默认
- {{/if}}
-
- {{$address.name}}
- {{$address.tel}}
-
+ {{else /}}
+
+
+
+
确认收货地址
+ {{if !empty($user_address_list)}}
+
+ {{/if}}
+
+ {{if !empty($user_address_list)}}
+
+ {{foreach $user_address_list as $address}}
+ -
+
+
+ {{if !empty($address.alias)}}
+ {{$address.alias}}
+ {{/if}}
+ {{if isset($address['is_default']) and $address['is_default'] eq 1}}
+ 默认
+ {{/if}}
+
+ {{$address.name}}
+ {{$address.tel}}
+
+
+
+ {{$address.province_name}}
+ {{$address.city_name}}
+ {{$address.county_name}}
+ {{$address.address}}
+
-
-
{{$address.province_name}}
-
{{$address.city_name}}
-
{{$address.county_name}}
-
{{$address.address}}
+
+
-
-
-
-
-
-
- {{/foreach}}
-
- {{/if}}
- {{if empty($user_address_list)}}
-
-
- 没有地址
-
- {{/if}}
-
+
+
+ {{/foreach}}
+
+ {{else /}}
+
+
+ 没有地址
+
+
+ {{/if}}
+
+ {{/if}}
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}}
diff --git a/application/service/BuyService.php b/application/service/BuyService.php
index 89b9ab2d0..44cd8bd83 100755
--- a/application/service/BuyService.php
+++ b/application/service/BuyService.php
@@ -15,6 +15,7 @@ use think\facade\Hook;
use app\service\GoodsService;
use app\service\UserService;
use app\service\ResourcesService;
+use app\service\ConfigService;
/**
* 购买服务层
@@ -1243,5 +1244,38 @@ class BuyService
}
return DataReturn('没有需要回滚的数据', 0);
}
+
+ /**
+ * 自提点地址选中地址获取
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2019-11-18
+ * @desc description
+ * @param [int] $params['address_id'] [自提点地址索引值]
+ * @param [array] $params['address_id'] [自提点地址列表]
+ */
+ public static function SiteExtractionAddress($params = [])
+ {
+ // 自提地址列表
+ $address = ConfigService::SiteTypeExtractionAddressList();
+
+ // 选中地址处理
+ $default = null;
+ if(isset($params['address_id']) && !empty($address['data']) && is_array($address['data']))
+ {
+ if(isset($address['data'][$params['address_id']]))
+ {
+ $default = $address['data'][$params['address_id']];
+ }
+ }
+
+ // 返回数据
+ $result = [
+ 'data_list' => $address['data'],
+ 'default' => $default,
+ ];
+ return DataReturn('操作成功', 0, $result);
+ }
}
?>
\ No newline at end of file
diff --git a/config/shopxo.php b/config/shopxo.php
index c7111a6b0..586bb6b24 100755
--- a/config/shopxo.php
+++ b/config/shopxo.php
@@ -15,7 +15,7 @@
return [
// 开发模式
- 'is_develop' => true,
+ 'is_develop' => false,
// 默认编码
'default_charset' => 'utf-8',
diff --git a/public/static/admin/default/css/site.css b/public/static/admin/default/css/site.css
index fdf516201..c12668531 100755
--- a/public/static/admin/default/css/site.css
+++ b/public/static/admin/default/css/site.css
@@ -49,10 +49,24 @@ ul.home_site_user_register_bg_images-images-view li {
.address-detail, #map {
border-bottom: 0 !important;
}
-.address-list {
- padding: 0 20% 0 0 !important;
-}
.address-list .edit-submit,
.address-list .delete-submit {
cursor: pointer;
+}
+@media only screen and (min-width:640px) {
+ .address-list {
+ padding: 0 20% 0 0 !important;
+ }
+}
+@media only screen and (max-width:640px) {
+ .address-list .edit-submit,
+ .address-list .delete-submit {
+ position: absolute;
+ top: 12px;
+ right: 5px;
+ float: none !important;
+ }
+ .address-list .delete-submit {
+ right: 70px;
+ }
}
\ No newline at end of file
diff --git a/public/static/index/default/css/buy.css b/public/static/index/default/css/buy.css
index 32e642c9a..e57115060 100755
--- a/public/static/index/default/css/buy.css
+++ b/public/static/index/default/css/buy.css
@@ -1,5 +1,5 @@
/*页面*/
-.buy-items h3{border-bottom: 3px solid #e3e3e3; margin-top:15px;}
+.buy-items h3{border-bottom: 2px solid #e3e3e3; margin-top:15px;}
/*地址管理*/
h3 { font-size: 14px;font-weight: 700;}
@@ -161,7 +161,7 @@ ul.address-list, .business-item ul { overflow: hidden; }
.pay-confirm .nav-total-price { color: #d2364c; font-weight: 700; }
.order-nav { background: #f5f5f5; z-index: 100; }
.am-footer { padding-bottom: 45px; }
-}
+}
/**
@@ -190,5 +190,62 @@ strong.total-price-content { color: #d2364c; font-size: 16px; }
.cart-content table tr .number { width: 20%; }
.cart-content table tr .total-price { width: 20%; }
.cart-content { margin-top: 20px; }
-}
+}
+
+/**
+ * 自提地址
+ */
+.extraction-address-item {
+ box-shadow: none;
+}
+.extraction-address-item .first-icon {
+ width: 15px;
+}
+.extraction-address-item .first-icon i {
+ color: #666;
+}
+.extraction-address-item .address-detail {
+ margin-top: 2px;
+}
+@media only screen and (min-width: 640px) {
+ .extraction-address {
+ padding: 0 5px;
+ }
+}
+@media only screen and (min-width: 1025px) {
+ .extraction-address {
+ padding: 0;
+ }
+}
+@media only screen and (max-width: 640px) {
+ .extraction-default {
+ background: url(../images/buy-peraddress.png) repeat-x;
+ background-position: bottom;
+ border: 0;
+ }
+ .extraction-default .am-panel-bd {
+ padding: 20px 5px;
+ }
+ .extraction-default .am-panel-bd .address-right {
+ padding-top: 5px;
+ }
+}
+/**
+ * 自提地址-弹层
+ */
+#extraction-address-popup .am-list {
+ margin-top: 0;
+}
+#extraction-address-popup .am-list > li {
+ padding: 10px 5px;
+ border-color: #eee;
+}
+#extraction-address-popup .am-list > li:first-child {
+ border-top: 0;
+}
+#extraction-address-popup .extraction-address-item button {
+ position: absolute;
+ top: 15px;
+ right: 5px;
+}
diff --git a/public/static/index/default/js/buy.js b/public/static/index/default/js/buy.js
index 220c4328f..b321e8393 100755
--- a/public/static/index/default/js/buy.js
+++ b/public/static/index/default/js/buy.js
@@ -119,5 +119,19 @@ $(function()
$('form.nav-buy input[name=payment_id]').val(payment_id);
$('form.nav-buy input[name=user_note]').val($('.order-user-info input.memo-input').val());
});
+
+ // 自提点地址
+ $extraction_popup = $('#extraction-address-popup');
+ $extraction_popup.find('.extraction-address-item button').on('click', function()
+ {
+ window.location.href = UrlFieldReplace('address_id', $(this).data('value'));
+ });
+ $('.extraction-default .extraction-address-item').on('click', function(e)
+ {
+ if($(window).width() < 640)
+ {
+ $extraction_popup.modal();
+ }
+ });
});
\ No newline at end of file