diff --git a/application/admin/view/default/order/module/address.html b/application/admin/view/default/order/module/address.html index 61701ef25..b697d2bf9 100644 --- a/application/admin/view/default/order/module/address.html +++ b/application/admin/view/default/order/module/address.html @@ -12,7 +12,7 @@ {{$module_data.address_data.city_name}} {{$module_data.address_data.county_name}} {{$module_data.address_data.address}} - {{if isset($module_data['address_data']['lng']) and isset($module_data['address_data']['lat']) and $module_data.address_data.lng gt 0 and $module_data.address_data.lat gt 0}} + {{if !empty($module_data['address_data']['lng']) and !empty($module_data['address_data']['lat'])}}
建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)
+建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)
{{:MyUrl('api/crontab/orderclose')}}建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)
+建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)
{{:MyUrl('api/crontab/ordersuccess')}}建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)
+建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)
{{:MyUrl('api/crontab/paylogorderclose')}}1. 默认展示3级,最低1级、最高3级
+2. 层级不一样、前端分类页样式也会不一样
+经度 {{$module_data.lng}}
{{/if}} -{{if !empty($module_data['lat']) and $module_data['lat'] gt 0}} +{{if !empty($module_data['lat'])}}纬度 {{$module_data.lat}}
{{/if}} \ No newline at end of file diff --git a/application/api/controller/Goods.php b/application/api/controller/Goods.php index 27237399b..6c6474485 100755 --- a/application/api/controller/Goods.php +++ b/application/api/controller/Goods.php @@ -227,9 +227,11 @@ class Goods extends Common */ public function Category() { - // 开始处理 - $params = $this->data_post; - return DataReturn('success', 0, GoodsService::GoodsCategoryAll($params)); + $result = [ + 'category' => GoodsService::GoodsCategoryAll($this->data_post), + 'category_show_level' => MyC('common_show_goods_category_level', 3, true), + ]; + return DataReturn('success', 0, $result); } /** diff --git a/application/common.php b/application/common.php index 8c0c83ddf..a137a7a48 100755 --- a/application/common.php +++ b/application/common.php @@ -1362,6 +1362,55 @@ function IsJson($jsonstr) } } +/** + * 请求get,支持本地文件 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2020-08-07 + * @desc description + * @param [string] $value [本地文件路径或者远程url地址] + */ +function RequestGet($value) +{ + // 远程 + if(substr($value, 0, 4) == 'http') + { + // 是否有curl模块 + if(function_exists('curl_init')) + { + return CurlGet($value); + } + return file_get_contents($value); + } + + // 本地文件 + return file_exists($value) ? file_get_contents($value) : ''; +} + +/** + * curl模拟get请求 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @datetime 2018-01-03T19:21:38+0800 + * @param [string] $url [url地址] + * @return [array] [返回数据] + */ +function CurlGet($url) +{ + $curl = curl_init(); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); + curl_setopt($curl, CURLOPT_TIMEOUT, 500); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); + curl_setopt($curl, CURLOPT_URL, $url); + + $result = curl_exec($curl); + curl_close($curl); + return $result; +} + /** * curl模拟post * @author Devil diff --git a/application/index/controller/Category.php b/application/index/controller/Category.php index e12ce71b5..b20036735 100755 --- a/application/index/controller/Category.php +++ b/application/index/controller/Category.php @@ -43,6 +43,9 @@ class Category extends Common */ public function Index() { + // 展示层级 + $this->assign('category_show_level', MyC('common_show_goods_category_level', 3, true)); + // 浏览器名称 $this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('商品分类', 1)); diff --git a/application/index/view/default/buy/index.html b/application/index/view/default/buy/index.html index faed0c407..bf73fba2e 100755 --- a/application/index/view/default/buy/index.html +++ b/application/index/view/default/buy/index.html @@ -182,7 +182,7 @@ {{$address.city_name}} {{$address.county_name}} {{$address.address}} - {{if isset($address['lng']) and $address['lng'] gt 0 and isset($address['lat']) and $address['lat'] gt 0}} + {{if !empty($address['lng']) and !empty($address['lat'])}} 查看地图 {{/if}} @@ -266,7 +266,7 @@