diff --git a/application/admin/controller/Site.php b/application/admin/controller/Site.php index 9d521465829c92cf5581a01a6582b8fc99466427..54ac495c6cfa434afc47d59a1c067de8a2faba73 100755 --- a/application/admin/controller/Site.php +++ b/application/admin/controller/Site.php @@ -117,6 +117,9 @@ class Site extends Common */ public function Save() { + // 参数 + $params = $_POST; + // 导航 $nav_type = input('nav_type', 'base'); @@ -150,6 +153,25 @@ class Site extends Common case 'imagesverify' : $field_list[] = 'common_images_verify_rules'; break; + + // 站点类型 + case 'sitetype' : + // 自提地址处理 + if(!empty($params['common_self_extraction_address'])) + { + if(!is_array($params['common_self_extraction_address'])) + { + $address = json_decode($params['common_self_extraction_address'], true); + } else { + $address = $params['common_self_extraction_address']; + } + foreach($address as $k=>$v) + { + $address[$k]['id'] = $k; + } + $params['common_self_extraction_address'] = json_encode($address, JSON_UNESCAPED_UNICODE); + } + break; } // 开始处理空值 @@ -157,15 +179,15 @@ class Site extends Common { foreach($field_list as $field) { - if(!isset($_POST[$field])) + if(!isset($params[$field])) { - $_POST[$field] = ''; + $params[$field] = ''; } } } // 基础配置 - $ret = ConfigService::ConfigSave($_POST); + $ret = ConfigService::ConfigSave($params); // 清除缓存 if($ret['code'] == 0) diff --git a/application/tags.php b/application/tags.php index 7fb4b4ce8cf21ddb6f5dd9c94f67aad0e78b5245..47869fdf7d828c7fa956a580eedcaa9fb5e6873b 100755 --- a/application/tags.php +++ b/application/tags.php @@ -32,5 +32,21 @@ return array ( 'log_write' => array ( ), + 'plugins_service_users_center_left_menu_handle' => + array ( + 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + ), + 'plugins_service_header_navigation_top_right_handle' => + array ( + 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + ), + 'plugins_service_buy_order_insert_end' => + array ( + 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + ), + 'plugins_service_order_status_change_history_success_handle' => + array ( + 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + ), ); ?> \ No newline at end of file diff --git a/sourcecode/alipay/pages/buy/buy.js b/sourcecode/alipay/pages/buy/buy.js index 0d77e7d506fd0bd1d26cabed191df4b689393ed8..58c924c3f9ffba7d6931fcd4675ceac8edf26554 100644 --- a/sourcecode/alipay/pages/buy/buy.js +++ b/sourcecode/alipay/pages/buy/buy.js @@ -135,7 +135,7 @@ Page({ // 地址 this.setData({ address: data.base.address || null, - address_id: ((data.base.address || null) != null && (data.base.address.id || null) != null) ? data.base.address.id : null, + address_id: ((data.base.address || null) != null) ? data.base.address.id : null, }); my.setStorage({ key: app.data.cache_buy_user_address_select_key, diff --git a/sourcecode/baidu/pages/buy/buy.js b/sourcecode/baidu/pages/buy/buy.js index 68398796eeefa9ad942301103d8489bba9612eec..be9f6c58cf4e38316007bc02b328eddb951553ab 100755 --- a/sourcecode/baidu/pages/buy/buy.js +++ b/sourcecode/baidu/pages/buy/buy.js @@ -116,7 +116,7 @@ Page({ // 地址 this.setData({ address: data.base.address || null, - address_id: (data.base.address || null) != null && (data.base.address.id || null) != null ? data.base.address.id : null + address_id: ((data.base.address || null) != null) ? data.base.address.id : null }); swan.setStorage({ key: app.data.cache_buy_user_address_select_key, diff --git a/sourcecode/qq/pages/buy/buy.js b/sourcecode/qq/pages/buy/buy.js index 750866c1a0df697a2e4fa50903426bc8492e194d..47f74831990c263e5adab5a987edc7acf78edfc4 100755 --- a/sourcecode/qq/pages/buy/buy.js +++ b/sourcecode/qq/pages/buy/buy.js @@ -122,7 +122,7 @@ Page({ // 地址 this.setData({ address: data.base.address || null, - address_id: ((data.base.address || null) != null && (data.base.address.id || null) != null) ? data.base.address.id : null, + address_id: ((data.base.address || null) != null) ? data.base.address.id : null, }); qq.setStorage({ key: app.data.cache_buy_user_address_select_key, diff --git a/sourcecode/toutiao/pages/buy/buy.js b/sourcecode/toutiao/pages/buy/buy.js index 9625a8e48aa3a7f5749df49841818ca4e5f9fa39..305885a61c82d4ae23047a04e5fc630ebf1a99df 100755 --- a/sourcecode/toutiao/pages/buy/buy.js +++ b/sourcecode/toutiao/pages/buy/buy.js @@ -122,7 +122,7 @@ Page({ // 地址 this.setData({ address: data.base.address || null, - address_id: ((data.base.address || null) != null && (data.base.address.id || null) != null) ? data.base.address.id : null, + address_id: ((data.base.address || null) != null) ? data.base.address.id : null, }); tt.setStorage({ key: app.data.cache_buy_user_address_select_key, diff --git a/sourcecode/weixin/pages/buy/buy.js b/sourcecode/weixin/pages/buy/buy.js index 25e69077ecc478de018112d59b09cb19d947b97b..e3dbe5d31ac78fc392275c2f988636576b088f49 100755 --- a/sourcecode/weixin/pages/buy/buy.js +++ b/sourcecode/weixin/pages/buy/buy.js @@ -122,7 +122,7 @@ Page({ // 地址 this.setData({ address: data.base.address || null, - address_id: ((data.base.address || null) != null && (data.base.address.id || null) != null) ? data.base.address.id : null, + address_id: ((data.base.address || null) != null) ? data.base.address.id : null, }); wx.setStorage({ key: app.data.cache_buy_user_address_select_key, @@ -184,6 +184,7 @@ Page({ if (this.data.common_order_is_booking != 1) { validation.push({ fields: 'payment_id', msg: '请选择支付方式' }); } + if (app.fields_check(data, validation)) { // 加载loding wx.showLoading({title: '提交中...'});