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'])}}
diff --git a/application/admin/view/default/site/extends.html b/application/admin/view/default/site/extends.html index 772a1d898..27ac7930b 100644 --- a/application/admin/view/default/site/extends.html +++ b/application/admin/view/default/site/extends.html @@ -26,8 +26,8 @@ -
-

建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)

+
+

建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)

{{:MyUrl('api/crontab/orderclose')}}
@@ -40,8 +40,8 @@ -
-

建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)

+
+

建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)

{{:MyUrl('api/crontab/ordersuccess')}}
@@ -54,8 +54,8 @@ -
-

建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)

+
+

建议将该地址添加到linux定时任务定时请求即可(结果 sucs:0, fail:0 冒号后面则是处理的数据条数,sucs成功,fali失败)

{{:MyUrl('api/crontab/paylogorderclose')}}
diff --git a/application/admin/view/default/site/goods.html b/application/admin/view/default/site/goods.html index 2ad40d27d..f72b18782 100644 --- a/application/admin/view/default/site/goods.html +++ b/application/admin/view/default/site/goods.html @@ -17,6 +17,20 @@ {{/foreach}} + +
+ +
+ + + + +
+
+

1. 默认展示3级,最低1级、最高3级

+

2. 层级不一样、前端分类页样式也会不一样

+
+
diff --git a/application/admin/view/default/warehouse/detail.html b/application/admin/view/default/warehouse/detail.html index 726c5dc0e..85f2d6e0d 100644 --- a/application/admin/view/default/warehouse/detail.html +++ b/application/admin/view/default/warehouse/detail.html @@ -10,7 +10,7 @@
地图
- {{if !empty($data['lng']) and $data['lng'] gt 0 and !empty($data['lat']) and $data['lat']}} + {{if !empty($data['lng']) and !empty($data['lat'])}}
{{else /}}
未配置
diff --git a/application/admin/view/default/warehouse/module/position.html b/application/admin/view/default/warehouse/module/position.html index 533a7e5b6..e7da4ff8a 100644 --- a/application/admin/view/default/warehouse/module/position.html +++ b/application/admin/view/default/warehouse/module/position.html @@ -1,7 +1,7 @@ -{{if !empty($module_data['lng']) and $module_data['lng'] gt 0}} +{{if !empty($module_data['lng'])}}

经度 {{$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 @@
{{$v.name}}{{if !empty($v['alias'])}}{{$v.alias}}{{/if}} - {{if isset($v['lng']) and isset($v['lat']) and $v['lng'] gt 0 and $v['lat'] gt 0}} + {{if isset($v['lng']) and isset($v['lat'])}} diff --git a/application/index/view/default/order/detail.html b/application/index/view/default/order/detail.html index 1630e2c78..870b3b0f4 100755 --- a/application/index/view/default/order/detail.html +++ b/application/index/view/default/order/detail.html @@ -325,7 +325,7 @@
{{$data.address_data.province_name}} {{$data.address_data.city_name}} {{$data.address_data.county_name}} {{$data.address_data.address}} - {{if $data.address_data.lng gt 0 and $data.address_data.lat gt 0}} + {{if !empty($data['address_data']['lng']) and !empty($data['address_data']['lat'])}} {{/if}}
diff --git a/application/index/view/default/order/module/address.html b/application/index/view/default/order/module/address.html index 61701ef25..b697d2bf9 100644 --- a/application/index/view/default/order/module/address.html +++ b/application/index/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'])}}
diff --git a/sourcecode/weixin/app.js b/sourcecode/weixin/app.js index 5bf04cf5d..71ef2c3ad 100755 --- a/sourcecode/weixin/app.js +++ b/sourcecode/weixin/app.js @@ -68,7 +68,7 @@ App({ // 请求地址 request_url: "{{request_url}}", request_url: 'http://shopxo.com/', - request_url: 'https://dev.shopxo.net/', + // request_url: 'https://dev.shopxo.net/', // 基础信息 application_title: "{{application_title}}", diff --git a/sourcecode/weixin/pages/goods-category/goods-category.js b/sourcecode/weixin/pages/goods-category/goods-category.js index a9f217762..cf5ac5522 100755 --- a/sourcecode/weixin/pages/goods-category/goods-category.js +++ b/sourcecode/weixin/pages/goods-category/goods-category.js @@ -4,6 +4,7 @@ Page({ data_list_loding_status: 1, nav_active_index: 0, data_list: [], + category_show_level: 3, data_content: null, }, @@ -32,18 +33,19 @@ Page({ success: res => { wx.stopPullDownRefresh(); if (res.data.code == 0) { - var data = res.data.data; + var category = res.data.data.category; var data_content = []; var index = this.data.nav_active_index || 0; - if (data.length > 0) + if (category.length > 0) { - data[index]['active'] = 'nav-active'; - data_content = data[index]; + category[index]['active'] = 'nav-active'; + data_content = category[index]; } this.setData({ - data_list: data, + data_list: category, + category_show_level: res.data.data.category_show_level || 3, data_content: data_content, - data_list_loding_status: data.length == 0 ? 0 : 3, + data_list_loding_status: category.length == 0 ? 0 : 3, data_bottom_line_status: true, }); } else { diff --git a/sourcecode/weixin/pages/goods-category/goods-category.wxml b/sourcecode/weixin/pages/goods-category/goods-category.wxml index cdf59e8c8..afbb935d5 100755 --- a/sourcecode/weixin/pages/goods-category/goods-category.wxml +++ b/sourcecode/weixin/pages/goods-category/goods-category.wxml @@ -1,41 +1,68 @@ - - - - {{item.name}} - - - - - - - - {{data_content.vice_name}} - {{data_content.describe}} - - - - - - {{v.name}} - - - - - - {{vs.name}} - - - - - - - - - + + + + + + + {{v.name}} + - + + + + + + + {{item.name}} + + + + + + + + {{data_content.vice_name}} + {{data_content.describe}} + + + + + + + + + + {{v.name}} + + + + + + + + + {{v.name}} + + + + + {{vs.name}} + + + + + + + + + + + + + + diff --git a/sourcecode/weixin/pages/goods-category/goods-category.wxss b/sourcecode/weixin/pages/goods-category/goods-category.wxss index adaeda606..77e3f5ac0 100755 --- a/sourcecode/weixin/pages/goods-category/goods-category.wxss +++ b/sourcecode/weixin/pages/goods-category/goods-category.wxss @@ -45,6 +45,7 @@ } .right-content, .one-content { padding: 20rpx; + margin-bottom: 20rpx; } .one-vice-name { font-size: 30rpx; @@ -60,17 +61,23 @@ background: #f5f5f5; padding: 20rpx 10rpx; } -.content-three { - float: left; - width: calc(33.33% - 20rpx); - padding: 25rpx 10rpx; - text-align: center; +.content-item { + float: left; + width: calc(33.33% - 20rpx); + padding: 25rpx 10rpx; + text-align: center; } -.content-three .text { - font-size: 28rpx; - line-height: 46rpx; +.content-item .text { + font-size: 28rpx; + line-height: 46rpx; } -.content-three .icon { - width: 100%; - height: 120rpx; +.content-item .icon { + width: 100%; + height: 120rpx; } +.model-one .content-item { + width: calc(33.33% - 21.1rpx); +} +.model-one .content-item:nth-child(3n) { + border-right: 0; +} \ No newline at end of file