Browse Source

fix:初始化接口

super-yimizi 2 months ago
parent
commit
300751fd01

+ 639 - 639
addons/shop/config.php

@@ -2,879 +2,879 @@
 
 
 return [
 return [
     [
     [
-        'name'    => 'sitename',
-        'title'   => '站点名称',
-        'type'    => 'string',
-        'content' => [],
-        'value'   => '商城网站',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'name' => 'sitename',
+        'title' => '站点名称',
+        'type' => 'string',
+        'content' => [],
+        'value' => '商城网站',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'workinghours',
-        'title'   => '工作时间',
-        'type'    => 'string',
-        'content' => [],
-        'value'   => '9:00-18:00',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'name' => 'workinghours',
+        'title' => '工作时间',
+        'type' => 'string',
+        'content' => [],
+        'value' => '9:00-18:00',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'email',
-        'title'   => '客服邮箱',
-        'type'    => 'string',
-        'content' => [],
-        'value'   => '1234567890@qq.com',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'name' => 'email',
+        'title' => '客服邮箱',
+        'type' => 'string',
+        'content' => [],
+        'value' => '1234567890@qq.com',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'company',
-        'title'   => '公司名称',
-        'type'    => 'string',
-        'content' => [],
-        'value'   => '公司名称',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'name' => 'company',
+        'title' => '公司名称',
+        'type' => 'string',
+        'content' => [],
+        'value' => '公司名称',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'icpbeian',
-        'title'   => 'ICP备案号',
-        'type'    => 'string',
-        'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'name' => 'icpbeian',
+        'title' => 'ICP备案号',
+        'type' => 'string',
+        'content' => [],
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'gwabeian',
-        'title'   => '公安备案号',
-        'type'    => 'string',
-        'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'name' => 'gwabeian',
+        'title' => '公安备案号',
+        'type' => 'string',
+        'content' => [],
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'sitelogo',
-        'title'   => '站点Logo',
-        'type'    => 'image',
-        'content' => [],
-        'value'   => '/assets/addons/shop/img/logo.png',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'name' => 'sitelogo',
+        'title' => '站点Logo',
+        'type' => 'image',
+        'content' => [],
+        'value' => '/assets/addons/shop/img/logo.png',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'title',
-        'title'   => '首页标题',
-        'type'    => 'string',
-        'content' => [],
-        'value'   => '首页标题',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'name' => 'title',
+        'title' => '首页标题',
+        'type' => 'string',
+        'content' => [],
+        'value' => '首页标题',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'keywords',
-        'title'   => '首页关键字',
-        'type'    => 'string',
+        'name' => 'keywords',
+        'title' => '首页关键字',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '首页关键字',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '首页关键字',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'description',
-        'title'   => '首页描述',
-        'type'    => 'string',
+        'name' => 'description',
+        'title' => '首页描述',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '首页描述',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '首页描述',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'theme',
-        'title'   => '皮肤',
-        'type'    => 'string',
+        'name' => 'theme',
+        'title' => '皮肤',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => 'default',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '仅适用于PC版',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'default',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '仅适用于PC版',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'qrcode',
-        'title'   => '公众号二维码',
-        'type'    => 'image',
+        'name' => 'qrcode',
+        'title' => '公众号二维码',
+        'type' => 'image',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'default_goods_img',
-        'title'   => '商品默认图片',
-        'type'    => 'image',
+        'name' => 'default_goods_img',
+        'title' => '商品默认图片',
+        'type' => 'image',
         'content' => [],
         'content' => [],
-        'value'   => '/assets/addons/shop/img/noimage.jpg',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '/uploads/20250625/71bc5284f9de0e8ed7bf138c9fc5664e.jpg',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'default_category_img',
-        'title'   => '分类默认图片',
-        'type'    => 'image',
+        'name' => 'default_category_img',
+        'title' => '分类默认图片',
+        'type' => 'image',
         'content' => [],
         'content' => [],
-        'value'   => '/assets/addons/shop/img/noimage.jpg',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '/uploads/20250625/71bc5284f9de0e8ed7bf138c9fc5664e.jpg',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'default_block_img',
-        'title'   => '区块默认图片',
-        'type'    => 'image',
+        'name' => 'default_block_img',
+        'title' => '区块默认图片',
+        'type' => 'image',
         'content' => [],
         'content' => [],
-        'value'   => '/assets/addons/shop/img/noimage.jpg',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '/uploads/20250625/71bc5284f9de0e8ed7bf138c9fc5664e.jpg',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'default_page_img',
-        'title'   => '单页默认图片',
-        'type'    => 'image',
+        'name' => 'default_page_img',
+        'title' => '单页默认图片',
+        'type' => 'image',
         'content' => [],
         'content' => [],
-        'value'   => '/assets/addons/shop/img/noimage.jpg',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '/uploads/20250625/71bc5284f9de0e8ed7bf138c9fc5664e.jpg',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'openedsite',
-        'title'   => '站点前台开关',
-        'type'    => 'checkbox',
+        'name' => 'openedsite',
+        'title' => '站点前台开关',
+        'type' => 'checkbox',
         'content' => [
         'content' => [
-            'pc'     => 'PC',
+            'pc' => 'PC',
             'uniapp' => 'Uniapp',
             'uniapp' => 'Uniapp',
         ],
         ],
-        'value'   => 'pc,uniapp',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => 'PC为网页端,Uniapp仅针对Uniapp版本',
-        'ok'      => '',
-        'extend'  => '',
-    ],
-    [
-        'name'    => 'domain',
-        'title'   => '绑定二级域名前缀',
-        'type'    => 'string',
-        'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
-    ],
-    [
-        'name'    => 'rewrite',
-        'title'   => '伪静态',
-        'type'    => 'array',
-        'content' => [],
-        'value'   => [
-            'index/index'    => '/shop/$',
-            'goods/index'    => '/shop/a/[:id]',
-            'page/index'     => '/shop/p/[:diyname]',
-            'search/index'   => '/shop/s',
+        'value' => 'pc,uniapp',
+        'rule' => '',
+        'msg' => '',
+        'tip' => 'PC为网页端,Uniapp仅针对Uniapp版本',
+        'ok' => '',
+        'extend' => '',
+    ],
+    [
+        'name' => 'domain',
+        'title' => '绑定二级域名前缀',
+        'type' => 'string',
+        'content' => [],
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
+    ],
+    [
+        'name' => 'rewrite',
+        'title' => '伪静态',
+        'type' => 'array',
+        'content' => [],
+        'value' => [
+            'index/index' => '/shop/$',
+            'goods/index' => '/shop/a/[:id]',
+            'page/index' => '/shop/p/[:diyname]',
+            'search/index' => '/shop/s',
             'category/index' => '/shop/c/[:diyname]',
             'category/index' => '/shop/c/[:diyname]',
-            'coupon/show'    => '/shop/coupon/[:coupon]',
-            'coupon/index'   => '/shop/coupon',
-            'exchange/show'  => '/shop/exchange/[:id]',
-            'exchange/index' => '/shop/exchange'
+            'coupon/show' => '/shop/coupon/[:coupon]',
+            'coupon/index' => '/shop/coupon',
+            'exchange/show' => '/shop/exchange/[:id]',
+            'exchange/index' => '/shop/exchange',
         ],
         ],
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '如果需要将简单商城绑定到网站首页,请移除<code>值</code>中的<code>/shop</code>',
-        'ok'      => '',
-        'extend'  => '',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '如果需要将简单商城绑定到网站首页,请移除<code>值</code>中的<code>/shop</code>',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'audittype',
-        'title'   => '审核方式',
-        'type'    => 'radio',
+        'name' => 'audittype',
+        'title' => '审核方式',
+        'type' => 'radio',
         'content' => [
         'content' => [
-            'local'    => '本地',
+            'local' => '本地',
             'baiduyun' => '百度云',
             'baiduyun' => '百度云',
         ],
         ],
-        'value'   => 'local',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '如果启用百度云,请输入百度云AI平台应用的AK和SK,预留暂未使用',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'local',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '如果启用百度云,请输入百度云AI平台应用的AK和SK,预留暂未使用',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'nlptype',
-        'title'   => '分词方式',
-        'type'    => 'radio',
+        'name' => 'nlptype',
+        'title' => '分词方式',
+        'type' => 'radio',
         'content' => [
         'content' => [
-            'local'    => '本地',
+            'local' => '本地',
             'baiduyun' => '百度云',
             'baiduyun' => '百度云',
         ],
         ],
-        'value'   => 'local',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '如果启用百度云,请输入百度云AI平台应用的AK和SK',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'local',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '如果启用百度云,请输入百度云AI平台应用的AK和SK',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'aip_appid',
-        'title'   => '百度AI平台应用Appid',
-        'type'    => 'string',
+        'name' => 'aip_appid',
+        'title' => '百度AI平台应用Appid',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '百度云AI开放平台应用AppId',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '百度云AI开放平台应用AppId',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'aip_apikey',
-        'title'   => '百度AI平台应用Apikey',
-        'type'    => 'string',
+        'name' => 'aip_apikey',
+        'title' => '百度AI平台应用Apikey',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '百度云AI开放平台应用ApiKey',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '百度云AI开放平台应用ApiKey',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'aip_secretkey',
-        'title'   => '百度AI平台应用Secretkey',
-        'type'    => 'string',
+        'name' => 'aip_secretkey',
+        'title' => '百度AI平台应用Secretkey',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '百度云AI开放平台应用Secretkey',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '百度云AI开放平台应用Secretkey',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'phone',
-        'title'   => '客服联系电话',
-        'type'    => 'string',
+        'name' => 'phone',
+        'title' => '客服联系电话',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '13000000000',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '用户联系客服的电话',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '13000000000',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '用户联系客服的电话',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'paytypelist',
-        'title'   => '支付方式',
-        'type'    => 'checkbox',
+        'name' => 'paytypelist',
+        'title' => '支付方式',
+        'type' => 'checkbox',
         'content' => [
         'content' => [
             'wechat' => '微信支付',
             'wechat' => '微信支付',
             'alipay' => '支付宝支付',
             'alipay' => '支付宝支付',
         ],
         ],
-        'value'   => 'wechat,alipay',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'wechat,alipay',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'defaultpaytype',
-        'title'   => '默认支付方式',
-        'type'    => 'radio',
+        'name' => 'defaultpaytype',
+        'title' => '默认支付方式',
+        'type' => 'radio',
         'content' => [
         'content' => [
             'wechat' => '微信支付',
             'wechat' => '微信支付',
             'alipay' => '支付宝支付',
             'alipay' => '支付宝支付',
         ],
         ],
-        'value'   => 'wechat',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'wechat',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'money_score',
-        'title'   => '订单积分',
-        'type'    => 'number',
+        'name' => 'money_score',
+        'title' => '订单积分',
+        'type' => 'number',
         'content' => [],
         'content' => [],
-        'value'   => '1',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '订单完成赠送积分,每订单金额一元赠送多少积分',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '1',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '订单完成赠送积分,每订单金额一元赠送多少积分',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'comment_score',
-        'title'   => '评价积分',
-        'type'    => 'number',
+        'name' => 'comment_score',
+        'title' => '评价积分',
+        'type' => 'number',
         'content' => [],
         'content' => [],
-        'value'   => '1',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '评价赠送积分',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '1',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '评价赠送积分',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'order_timeout',
-        'title'   => '订单超时时长',
-        'type'    => 'number',
+        'name' => 'order_timeout',
+        'title' => '订单超时时长',
+        'type' => 'number',
         'content' => [],
         'content' => [],
-        'value'   => '3600',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '超时订单将自动关闭,单位秒',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '3600',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '超时订单将自动关闭,单位秒',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'auto_delivery_time',
-        'title'   => '订单自动收货时长',
-        'type'    => 'number',
+        'name' => 'auto_delivery_time',
+        'title' => '订单自动收货时长',
+        'type' => 'number',
         'content' => [],
         'content' => [],
-        'value'   => '3',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '发货订单多少天后自动收货,单位天',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '3',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '发货订单多少天后自动收货,单位天',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'order_refund_sync',
-        'title'   => '订单同步退款',
-        'type'    => 'radio',
+        'name' => 'order_refund_sync',
+        'title' => '订单同步退款',
+        'type' => 'radio',
         'content' => [
         'content' => [
             1 => '是',
             1 => '是',
             0 => '否',
             0 => '否',
         ],
         ],
-        'value'   => '1',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '关闭后需前往微信支付宝进行手动退款',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '1',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '关闭后需前往微信支付宝进行手动退款',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'sendnoticemode',
-        'title'   => '通知推送模式',
-        'type'    => 'radio',
+        'name' => 'sendnoticemode',
+        'title' => '通知推送模式',
+        'type' => 'radio',
         'content' => [
         'content' => [
             'disabled' => '关闭推送',
             'disabled' => '关闭推送',
-            'async'    => '异步并发推送',
-            'queue'    => '使用队列推送(需安装队列插件+Redis)',
+            'async' => '异步并发推送',
+            'queue' => '使用队列推送(需安装队列插件+Redis)',
         ],
         ],
-        'value'   => 'disabled',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'disabled',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'shippingfeecoupon',
-        'title'   => '优惠券适用于运费',
-        'type'    => 'radio',
+        'name' => 'shippingfeecoupon',
+        'title' => '优惠券适用于运费',
+        'type' => 'radio',
         'content' => [
         'content' => [
-            '1' => '是',
-            '0' => '否',
+            1 => '是',
+            0 => '否',
         ],
         ],
-        'value'   => '0',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '判断优惠券是否适用于运费',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '0',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '判断优惠券是否适用于运费',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'shippingfeerefund',
-        'title'   => '退款时退运费模式',
-        'type'    => 'radio',
+        'name' => 'shippingfeerefund',
+        'title' => '退款时退运费模式',
+        'type' => 'radio',
         'content' => [
         'content' => [
             'averagegoods' => '运费平分至每个商品',
             'averagegoods' => '运费平分至每个商品',
-            'lastrefund'   => '运费叠加至最后一个退款商品',
+            'lastrefund' => '运费叠加至最后一个退款商品',
         ],
         ],
-        'value'   => 'averagegoods',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'averagegoods',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'category_mode',
-        'title'   => '前端分类展示模式',
-        'type'    => 'radio',
+        'name' => 'category_mode',
+        'title' => '前端分类展示模式',
+        'type' => 'radio',
         'content' => [
         'content' => [
             1 => '一级分类',
             1 => '一级分类',
             0 => '二级分类',
             0 => '二级分类',
-            2 => '三级分类',
+            '三级分类',
         ],
         ],
-        'value'   => '1',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '目前仅用于uniapp端分类展示',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '1',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '目前仅用于uniapp端分类展示',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'autolinks',
-        'title'   => '关键字链接',
-        'type'    => 'array',
+        'name' => 'autolinks',
+        'title' => '关键字链接',
+        'type' => 'array',
         'content' => [],
         'content' => [],
-        'value'   => [],
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '对应的关键字将会自动加上链接',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => [],
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '对应的关键字将会自动加上链接',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'usersidenav',
-        'title'   => '会员中心边栏模块',
-        'type'    => 'checkbox',
+        'name' => 'usersidenav',
+        'title' => '会员中心边栏模块',
+        'type' => 'checkbox',
         'content' => [
         'content' => [
-            'order'    => '我的订单',
-            'address'  => '我的收货地址',
-            'collect'  => '我的收藏',
-            'comment'  => '我的评价',
-            'coupon'   => '我的优惠券',
-            'exchange' => '我的积分兑换'
+            'order' => '我的订单',
+            'address' => '我的收货地址',
+            'collect' => '我的收藏',
+            'comment' => '我的评价',
+            'coupon' => '我的优惠券',
+            'exchange' => '我的积分兑换',
         ],
         ],
-        'value'   => 'order,address,collect,comment,coupon,exchange',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => 'PC端会员中心边栏模块',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'order,address,collect,comment,coupon,exchange',
+        'rule' => '',
+        'msg' => '',
+        'tip' => 'PC端会员中心边栏模块',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'cachelifetime',
-        'title'   => '缓存默认时长',
-        'type'    => 'string',
+        'name' => 'cachelifetime',
+        'title' => '缓存默认时长',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => 'true',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '0表示不缓存,具体数字表示缓存时长,true表示永久缓存',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'true',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '0表示不缓存,具体数字表示缓存时长,true表示永久缓存',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'flagtype',
-        'title'   => '标志字典',
-        'type'    => 'array',
+        'name' => 'flagtype',
+        'title' => '标志字典',
+        'type' => 'array',
         'content' => [],
         'content' => [],
-        'value'   => [
-            'hot'       => '热门',
-            'new'       => '新',
+        'value' => [
+            'hot' => '热门',
+            'new' => '新',
             'recommend' => '推荐',
             'recommend' => '推荐',
-            'top'       => '置顶',
+            'top' => '置顶',
         ],
         ],
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'urlsuffix',
-        'title'   => 'URL后缀',
-        'type'    => 'string',
+        'name' => 'urlsuffix',
+        'title' => 'URL后缀',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => 'html',
-        'rule'    => '',
-        'msg'     => '如果不需要后缀可以设置为空',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'html',
+        'rule' => '',
+        'msg' => '如果不需要后缀可以设置为空',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'moduleurlsuffix',
-        'title'   => '模块URL后缀',
-        'type'    => 'array',
+        'name' => 'moduleurlsuffix',
+        'title' => '模块URL后缀',
+        'type' => 'array',
         'content' => [],
         'content' => [],
-        'value'   => [
+        'value' => [
             'category' => 'html',
             'category' => 'html',
-            'goods'    => 'html',
-            'page'     => 'html',
-            'coupon'   => 'html',
-            'exchange' => 'html'
+            'goods' => 'html',
+            'page' => 'html',
+            'coupon' => 'html',
+            'exchange' => 'html',
         ],
         ],
-        'rule'    => '',
-        'msg'     => '如果不需要后缀可以设置为空',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'rule' => '',
+        'msg' => '如果不需要后缀可以设置为空',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'api_mode',
-        'title'   => '快递对接方式',
-        'type'    => 'radio',
+        'name' => 'api_mode',
+        'title' => '快递对接方式',
+        'type' => 'radio',
         'content' => [
         'content' => [
-            'online'  => '正式环境',
+            'online' => '正式环境',
             'sandbox' => '沙箱环境',
             'sandbox' => '沙箱环境',
         ],
         ],
-        'value'   => 'online',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'online',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'EBusinessID',
-        'title'   => '快递鸟ID',
-        'type'    => 'string',
+        'name' => 'EBusinessID',
+        'title' => '快递鸟ID',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'kdNiaoApiKey',
-        'title'   => '快递鸟ApiKey',
-        'type'    => 'string',
+        'name' => 'kdNiaoApiKey',
+        'title' => '快递鸟ApiKey',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'printtype',
-        'title'   => '打印类型',
-        'type'    => 'radio',
+        'name' => 'printtype',
+        'title' => '打印类型',
+        'type' => 'radio',
         'content' => [
         'content' => [
             'system' => '系统自带打印',
             'system' => '系统自带打印',
             'clodop' => '使用C-Lodop打印(需安装软件)',
             'clodop' => '使用C-Lodop打印(需安装软件)',
         ],
         ],
-        'value'   => 'system',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'system',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'clodop_ip_port',
-        'title'   => '打印服务IP+端口',
-        'type'    => 'string',
+        'name' => 'clodop_ip_port',
+        'title' => '打印服务IP+端口',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => 'http://localhost:8000',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'http://localhost:8000',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'clodop_print_view',
-        'title'   => '打印预览/设计',
-        'type'    => 'radio',
+        'name' => 'clodop_print_view',
+        'title' => '打印预览/设计',
+        'type' => 'radio',
         'content' => [
         'content' => [
-            0 => '直接打印',
-            1 => '开启预览',
-            2 => '预览并设计',
+            '直接打印',
+            '开启预览',
+            '预览并设计',
         ],
         ],
-        'value'   => '1',
-        'rule'    => 'required',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '1',
+        'rule' => 'required',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'coupon_key',
-        'title'   => '优惠券ID加密的key',
-        'type'    => 'string',
+        'name' => 'coupon_key',
+        'title' => '优惠券ID加密的key',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '用于优惠券ID的加密,为空时将使用Token的加密Key',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '用于优惠券ID的加密,为空时将使用Token的加密Key',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'logisticstype',
-        'title'   => '物流查询方式',
-        'type'    => 'radio',
+        'name' => 'logisticstype',
+        'title' => '物流查询方式',
+        'type' => 'radio',
         'content' => [
         'content' => [
             'kdnapi' => '快递鸟api',
             'kdnapi' => '快递鸟api',
-            'kd100'  => '跳转快递100',
+            'kd100' => '跳转快递100',
         ],
         ],
-        'value'   => 'kd100',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'kd100',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'freightitemfee',
-        'title'   => '满足多运费条件计算方式',
-        'type'    => 'radio',
+        'name' => 'freightitemfee',
+        'title' => '满足多运费条件计算方式',
+        'type' => 'radio',
         'content' => [
         'content' => [
             'max' => '取最高运费',
             'max' => '取最高运费',
             'min' => '取最低运费',
             'min' => '取最低运费',
         ],
         ],
-        'value'   => 'max',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '当满足多个运费条件时,运费计算的方式',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'max',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '当满足多个运费条件时,运费计算的方式',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'amap_webapi_key',
-        'title'   => '高德地图Web服务API密钥',
-        'type'    => 'string',
+        'name' => 'amap_webapi_key',
+        'title' => '高德地图Web服务API密钥',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '高德地图Web服务API密钥',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '高德地图Web服务API密钥',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'autoredirectmobile',
-        'title'   => '移动H5自动重定向',
-        'type'    => 'radio',
+        'name' => 'autoredirectmobile',
+        'title' => '移动H5自动重定向',
+        'type' => 'radio',
         'content' => [
         'content' => [
             1 => '开启',
             1 => '开启',
             0 => '关闭',
             0 => '关闭',
         ],
         ],
-        'value'   => '0',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '当部署了Uniapp-H5,用于移动端H5访问时自动重定向',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '0',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '当部署了Uniapp-H5,用于移动端H5访问时自动重定向',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'mobileurl',
-        'title'   => 'H5站点URL',
-        'type'    => 'string',
+        'name' => 'mobileurl',
+        'title' => 'H5站点URL',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '如果未部署Uni-APP的H5则无需设置,需http://开头',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '如果未部署Uni-APP的H5则无需设置,需http://开头',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'porfilePrompt',
-        'title'   => '昵称修改通知频率',
-        'type'    => 'radio',
+        'name' => 'porfilePrompt',
+        'title' => '昵称修改通知频率',
+        'type' => 'radio',
         'content' => [
         'content' => [
-            'disabled'   => '关闭提示',
+            'disabled' => '关闭提示',
             'firstlogin' => '首次登录提示',
             'firstlogin' => '首次登录提示',
             'everylogin' => '每次登录提示',
             'everylogin' => '每次登录提示',
         ],
         ],
-        'value'   => 'everylogin',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'everylogin',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'notice',
-        'title'   => 'Uniapp端公告',
-        'type'    => 'array',
+        'name' => 'notice',
+        'title' => 'Uniapp端公告',
+        'type' => 'array',
         'content' => [],
         'content' => [],
-        'value'   => [
+        'value' => [
             [
             [
                 'title' => '这是一条公告信息',
                 'title' => '这是一条公告信息',
-                'path'  => '/pages/my/my',
+                'path' => '/pages/my/my',
             ],
             ],
         ],
         ],
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'wxapp',
-        'title'   => '微信小程序二维码',
-        'type'    => 'image',
+        'name' => 'wxapp',
+        'title' => '微信小程序二维码',
+        'type' => 'image',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'wx_appid',
-        'title'   => '微信小程序AppID',
-        'type'    => 'string',
+        'name' => 'wx_appid',
+        'title' => '微信小程序AppID',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '微信小程序的app_id',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '微信小程序的app_id',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'wx_app_secret',
-        'title'   => '微信小程序AppSecret',
-        'type'    => 'string',
+        'name' => 'wx_app_secret',
+        'title' => '微信小程序AppSecret',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '微信小程序的app_secret',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '微信小程序的app_secret',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'mp_appid',
-        'title'   => '微信公众号AppID',
-        'type'    => 'string',
+        'name' => 'mp_appid',
+        'title' => '微信公众号AppID',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'mp_app_secret',
-        'title'   => '微信公众号AppSecret',
-        'type'    => 'string',
+        'name' => 'mp_app_secret',
+        'title' => '微信公众号AppSecret',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'app_id',
-        'title'   => 'APP的AppID',
-        'type'    => 'string',
+        'name' => 'app_id',
+        'title' => 'APP的AppID',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '微信开放平台中应用的Appid,仅Uniapp版本使用',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '微信开放平台中应用的Appid,仅Uniapp版本使用',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'app_secret',
-        'title'   => 'APP的AppSecret',
-        'type'    => 'string',
+        'name' => 'app_secret',
+        'title' => 'APP的AppSecret',
+        'type' => 'string',
         'content' => [],
         'content' => [],
-        'value'   => '',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '微信开放平台中应用的AppSecret,仅Uniapp版本使用',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '微信开放平台中应用的AppSecret,仅Uniapp版本使用',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'logintypelist',
-        'title'   => '登录类型列表',
-        'type'    => 'checkbox',
+        'name' => 'logintypelist',
+        'title' => '登录类型列表',
+        'type' => 'checkbox',
         'content' => [
         'content' => [
-            'account'      => '账号密码登录',
-            'mobile'       => '手机号登录',
-            'wechat'       => '微信授权登录',
+            'account' => '账号密码登录',
+            'mobile' => '手机号登录',
+            'wechat' => '微信授权登录',
             'wechatmobile' => '微信手机授权登录',
             'wechatmobile' => '微信手机授权登录',
         ],
         ],
-        'value'   => 'account,mobile,wechat,wechatmobile',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => 'account,mobile,wechat,wechatmobile',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
     [
     [
-        'name'    => 'wechatautocreate',
-        'title'   => '微信登录自动创建账号',
-        'type'    => 'radio',
+        'name' => 'wechatautocreate',
+        'title' => '微信登录自动创建账号',
+        'type' => 'radio',
         'content' => [
         'content' => [
             1 => '是',
             1 => '是',
             0 => '否',
             0 => '否',
         ],
         ],
-        'value'   => '0',
-        'rule'    => '',
-        'msg'     => '',
-        'tip'     => '首次使用微信登录时是否自动创建账号',
-        'ok'      => '',
-        'extend'  => '',
+        'value' => '0',
+        'rule' => '',
+        'msg' => '',
+        'tip' => '首次使用微信登录时是否自动创建账号',
+        'ok' => '',
+        'extend' => '',
     ],
     ],
 ];
 ];

+ 1 - 1
addons/shop/data/theme.json

@@ -1 +1 @@
-{"navbar":{"titleColor":"#fff","bgColor":{"background":"#374486"},"backIconColor":"#fff","backTextStyle":{"color":"#fff"},"titleSize":"35","isshow":true},"theme":{"color":"#ffffff","bgColor":"#374486","ladder":10,"number":9,"border":5},"tabbar":{"color":"#999","selectColor":"#000","bgColor":"#ffffff","height":"100","borderTop":true,"iconSize":"40","midButton":false,"midButtonSize":"60","list":[{"image":"\/assets\/addons\/shop\/img\/tabbar\/home.png","selectedImage":"\/assets\/addons\/shop\/img\/tabbar\/home-hl.png","text":"首页","path":"\/pages\/index\/index","midButton":false,"count":0,"isDot":false,"badgeColor":"#ffffff","badgeBgColor":"#374486"},{"image":"\/assets\/addons\/shop\/img\/tabbar\/category.png","selectedImage":"\/assets\/addons\/shop\/img\/tabbar\/category-hl.png","text":"分类","path":"\/pages\/category\/index","midButton":false,"count":0,"isDot":false,"badgeColor":"#ffffff","badgeBgColor":"#374486"},{"image":"\/assets\/addons\/shop\/img\/tabbar\/cart.png","selectedImage":"\/assets\/addons\/shop\/img\/tabbar\/cart-hl.png","text":"购物车","path":"\/pages\/cart\/cart","midButton":false,"count":0,"isDot":false,"badgeColor":"#ffffff","badgeBgColor":"#374486"},{"image":"\/assets\/addons\/shop\/img\/tabbar\/my.png","selectedImage":"\/assets\/addons\/shop\/img\/tabbar\/my-hl.png","text":"我的","path":"\/pages\/my\/my","midButton":false,"count":0,"isDot":false,"badgeColor":"#ffffff","badgeBgColor":"#374486"}],"isshow":true}}
+{"navbar":{"titleColor":"#fff","bgColor":{"background":"#374486"},"backIconColor":"#fff","backTextStyle":{"color":"#fff"},"titleSize":"35","isshow":true},"theme":{"color":"#ffffff","bgColor":"#374486","ladder":10,"number":9,"border":5},"tabbar":{"color":"#999","selectColor":"#000","bgColor":"#ffffff","height":"100","borderTop":true,"iconSize":"40","midButton":false,"midButtonSize":"60","list":[{"image":"\/assets\/addons\/shop\/img\/tabbar\/home.png","selectedImage":"\/assets\/addons\/shop\/img\/tabbar\/home-hl.png","text":"","path":"\/pages\/index\/index","midButton":false,"count":0,"isDot":false,"badgeColor":"#ffffff","badgeBgColor":"#374486"},{"image":"\/assets\/addons\/shop\/img\/tabbar\/category.png","selectedImage":"\/assets\/addons\/shop\/img\/tabbar\/category-hl.png","text":"分类","path":"\/pages\/category\/index","midButton":false,"count":0,"isDot":false,"badgeColor":"#ffffff","badgeBgColor":"#374486"},{"image":"\/assets\/addons\/shop\/img\/tabbar\/cart.png","selectedImage":"\/assets\/addons\/shop\/img\/tabbar\/cart-hl.png","text":"购物车","path":"\/pages\/cart\/cart","midButton":false,"count":0,"isDot":false,"badgeColor":"#ffffff","badgeBgColor":"#374486"},{"image":"\/assets\/addons\/shop\/img\/tabbar\/my.png","selectedImage":"\/assets\/addons\/shop\/img\/tabbar\/my-hl.png","text":"我的","path":"\/pages\/my\/my","midButton":false,"count":0,"isDot":false,"badgeColor":"#ffffff","badgeBgColor":"#374486"}],"isshow":true}}

+ 23 - 8
application/api/controller/Order.php

@@ -11,7 +11,8 @@ use app\common\model\OrderAction;
 use app\common\model\OrderGoods;
 use app\common\model\OrderGoods;
 use app\common\library\KdApiExpOrder;
 use app\common\library\KdApiExpOrder;
 use think\Db;
 use think\Db;
-
+use app\common\Service\OrderService;
+use app\common\Enum\OrderEnum;
 /**
 /**
  * 订单接口
  * 订单接口
  */
  */
@@ -48,7 +49,7 @@ class Order extends Base
             }
             }
             
             
             // 统一调用计算方法
             // 统一调用计算方法
-            $result = \app\common\Service\OrderService::calculateOrder($goods_list, $this->auth->id, $area_id, $user_coupon_id);
+            $result = OrderService::calculateOrder($goods_list, $this->auth->id, $area_id, $user_coupon_id);
             $orderItem = $result['orderItem'];
             $orderItem = $result['orderItem'];
             $goodsList = $result['goodsList'];
             $goodsList = $result['goodsList'];
             $orderInfo = $result['orderInfo'];
             $orderInfo = $result['orderInfo'];
@@ -109,13 +110,13 @@ class Order extends Base
                 $goods_list = \app\common\Service\CartService::convertCartToGoodsList($cart_ids, $this->auth->id);
                 $goods_list = \app\common\Service\CartService::convertCartToGoodsList($cart_ids, $this->auth->id);
                 
                 
                 // 创建订单
                 // 创建订单
-                $order = \app\common\Service\OrderService::createOrder($address_id, $this->auth->id, $goods_list, $user_coupon_id, $remark);
+                $order = OrderService::createOrder($address_id, $this->auth->id, $goods_list, $user_coupon_id, $remark);
                 
                 
                 // 购物车订单创建成功后清理购物车
                 // 购物车订单创建成功后清理购物车
                 \app\common\Service\CartService::clear($cart_ids);
                 \app\common\Service\CartService::clear($cart_ids);
             } elseif (!empty($goods_list)) {
             } elseif (!empty($goods_list)) {
                 // 商品列表模式 - 直接创建订单
                 // 商品列表模式 - 直接创建订单
-                $order = \app\common\Service\OrderService::createOrder($address_id, $this->auth->id, $goods_list, $user_coupon_id, $remark);
+                $order = OrderService::createOrder($address_id, $this->auth->id, $goods_list, $user_coupon_id, $remark);
             } else {
             } else {
                 $this->error('请提供购物车ID或商品列表');
                 $this->error('请提供购物车ID或商品列表');
             }
             }
@@ -153,12 +154,26 @@ class Order extends Base
     //订单列表
     //订单列表
     public function index()
     public function index()
     {
     {
+        // 验证请求参数
+        $validate = new \app\api\validate\Order();
         $param = $this->request->param();
         $param = $this->request->param();
-        $param['user_id'] = $this->auth->id;
-        $list = OrderModel::tableList($param);
+        $param['time_range'] = '1'; // 添加触发时间范围验证的字段
+        
+        if (!$validate->scene('lists')->check($param)) {
+            $this->error($validate->getError());
+        }
+        
+        // 设置默认值
+        $userId = $this->auth->id;
+        $param['page']     = $this->request->param('page', 1, 'intval');
+        $param['pageSize'] = $this->request->param('pageSize', 10, 'intval');
+        $status   = $this->request->param('status', 0, 'intval'); // 默认为0(全部订单)
+        $param['keywords'] = $this->request->param('keywords', '', 'trim');
+        $status   = OrderEnum::SHOW_TYPE_STATUS_MAP[$status];
+        $list = OrderService::getOrderList($userId ,$param, $status);
         foreach ($list as $item) {
         foreach ($list as $item) {
-            $item->append(['status_text']);
-            $field = 'id,order_sn,amount,expressno,expressname,saleamount,shippingfee,paystate,orderstate,shippingstate,order_goods,status,status_text';
+            $item->append(['order_status_text']);
+            $field = 'id,order_sn,amount,goods_price,order_amount,express_name,express_no,order_goods,order_status_text,order_status';
             $item->visible(explode(',', $field));
             $item->visible(explode(',', $field));
         }
         }
         $this->success('获取成功', $list);
         $this->success('获取成功', $list);

+ 76 - 0
application/api/validate/Order.php

@@ -35,6 +35,15 @@ class Order extends Validate
         'order_sn'        => 'require|alphaNum',
         'order_sn'        => 'require|alphaNum',
         'paytype'         => 'require|in:alipay,wechat,unionpay,balance',
         'paytype'         => 'require|in:alipay,wechat,unionpay,balance',
         'method'          => 'require|in:web,wap,app,miniapp,mp,mini',
         'method'          => 'require|in:web,wap,app,miniapp,mp,mini',
+        
+        // 订单列表查询相关
+        'page'            => 'integer|egt:1',
+        'pageSize'        => 'integer|between:1,100',
+        'status'          => 'checkOrderStatus',
+        'keywords'        => 'max:50',
+        'start_time'      => 'date',
+        'end_time'        => 'date',
+        'time_range'      => 'checkTimeRange',
     ];
     ];
 
 
     /**
     /**
@@ -77,6 +86,15 @@ class Order extends Validate
         'paytype.in'            => '支付方式不支持',
         'paytype.in'            => '支付方式不支持',
         'method.require'        => '支付方法不能为空',
         'method.require'        => '支付方法不能为空',
         'method.in'             => '支付方法不支持',
         'method.in'             => '支付方法不支持',
+        
+        // 订单列表查询相关
+        'page.integer'          => '页码必须是整数',
+        'page.egt'              => '页码必须大于等于1',
+        'pageSize.integer'      => '每页数量必须是整数',
+        'pageSize.between'      => '每页数量必须在1-100之间',
+        'keywords.max'          => '搜索关键词长度不能超过50个字符',
+        'start_time.date'       => '开始时间格式错误',
+        'end_time.date'         => '结束时间格式错误',
     ];
     ];
 
 
     /**
     /**
@@ -93,6 +111,8 @@ class Order extends Validate
         'cancel'            => ['order_sn'],
         'cancel'            => ['order_sn'],
         // 订单支付
         // 订单支付
         'pay'               => ['order_sn', 'paytype', 'method'],
         'pay'               => ['order_sn', 'paytype', 'method'],
+        // 订单列表
+        'lists'             => ['page', 'pageSize', 'status', 'keywords', 'start_time', 'end_time', 'time_range'],
     ];
     ];
 
 
     /**
     /**
@@ -216,4 +236,60 @@ class Order extends Validate
         
         
         return true;
         return true;
     }
     }
+
+    /**
+     * 自定义验证规则:验证时间范围
+     * @param $value
+     * @param $rule
+     * @param $data
+     * @return bool|string
+     */
+    protected function checkTimeRange($value, $rule, $data)
+    {
+        // 如果提供了开始时间和结束时间,验证时间范围
+        if (isset($data['start_time']) && isset($data['end_time'])) {
+            $startTime = strtotime($data['start_time']);
+            $endTime = strtotime($data['end_time']);
+            
+            if ($startTime === false) {
+                return '开始时间格式错误';
+            }
+            
+            if ($endTime === false) {
+                return '结束时间格式错误';
+            }
+            
+            if ($startTime > $endTime) {
+                return '开始时间不能大于结束时间';
+            }
+            
+            // 限制查询时间范围不超过1年
+            $maxRange = 365 * 24 * 3600; // 1年的秒数
+            if (($endTime - $startTime) > $maxRange) {
+                return '查询时间范围不能超过1年';
+            }
+        }
+        
+        return true;
+    }
+
+    /**
+     * 自定义验证规则:验证订单状态
+     * @param $value
+     * @param $rule
+     * @param $data
+     * @return bool|string
+     */
+    protected function checkOrderStatus($value, $rule, $data)
+    {
+        // 引入OrderEnum
+        $allowedStatuses = array_keys(\app\common\Enum\OrderEnum::SHOW_TYPE_STATUS_MAP);
+        
+        if (!in_array($value, $allowedStatuses)) {
+            $allowedValues = implode(', ', $allowedStatuses);
+            return "订单状态值不正确,允许的值为:{$allowedValues}";
+        }
+        
+        return true;
+    }
 } 
 } 

+ 18 - 28
application/common/Enum/OrderEnum.php

@@ -4,26 +4,22 @@ namespace app\common\Enum;
 
 
 class OrderEnum
 class OrderEnum
 {
 {
-    /**
+      /**
      * 订单状态
      * 订单状态
      */
      */
-    const STATUS_CREATE = 101; //待付款
-    const STATUS_PAY = 201; //已付款
-    const STATUS_SHIP = 301; //已发货
-    const STATUS_CONFIRM = 401; //已收货
-    const STATUS_AUTO_CONFIRM = 402;
-
+    const STATUS_CREATE = 101;
+    const STATUS_PAY = 201;
+    const STATUS_SHIP = 301;
+    const STATUS_CONFIRM = 401;
     const STATUS_CANCEL = 102;
     const STATUS_CANCEL = 102;
     const STATUS_AUTO_CANCEL = 103;
     const STATUS_AUTO_CANCEL = 103;
     const STATUS_ADMIN_CANCEL = 104;
     const STATUS_ADMIN_CANCEL = 104;
     const STATUS_REFUND = 202;
     const STATUS_REFUND = 202;
     const STATUS_REFUND_CONFIRM = 203;
     const STATUS_REFUND_CONFIRM = 203;
     const STATUS_GROUPON_TIMEOUT = 204;
     const STATUS_GROUPON_TIMEOUT = 204;
+    const STATUS_AUTO_CONFIRM = 402;
 
 
 
 
-    /**
-     * 订单枚举map
-     */
     const STATUS_TEXT_MAP = [
     const STATUS_TEXT_MAP = [
         self::STATUS_CREATE => '未付款',
         self::STATUS_CREATE => '未付款',
         self::STATUS_CANCEL => "已取消",
         self::STATUS_CANCEL => "已取消",
@@ -38,38 +34,32 @@ class OrderEnum
         self::STATUS_AUTO_CONFIRM => "已收货(系统)",
         self::STATUS_AUTO_CONFIRM => "已收货(系统)",
     ];
     ];
 
 
+    public static function getOrderStatusList()
+    {
+        return self::STATUS_TEXT_MAP;
+    }
+
+    public static function getOrderStatusText($status)
+    {
+        return self::STATUS_TEXT_MAP[$status] ?? '未知';
+    }
+
+
 
 
     const SHOW_TYPE_ALL = 0;//全部订单
     const SHOW_TYPE_ALL = 0;//全部订单
     const SHOW_TYPE_WAIT_PAY = 1;//待付款订单
     const SHOW_TYPE_WAIT_PAY = 1;//待付款订单
     const SHOW_TYPE_WAIT_DELIVERY = 2;//待发货订单
     const SHOW_TYPE_WAIT_DELIVERY = 2;//待发货订单
     const SHOW_TYPE_WAIT_RECEIPT = 3;//待收货订单
     const SHOW_TYPE_WAIT_RECEIPT = 3;//待收货订单
-
     const SHOW_TYPE_WAIT_COMMENT = 4;//待评价订单
     const SHOW_TYPE_WAIT_COMMENT = 4;//待评价订单
 
 
 
 
-    /**
-     * 订单枚举map
-     */
     const SHOW_TYPE_STATUS_MAP = [
     const SHOW_TYPE_STATUS_MAP = [
         self::SHOW_TYPE_ALL => [],
         self::SHOW_TYPE_ALL => [],
         self::SHOW_TYPE_WAIT_PAY => [self::STATUS_CREATE],
         self::SHOW_TYPE_WAIT_PAY => [self::STATUS_CREATE],
         self::SHOW_TYPE_WAIT_DELIVERY => [self::STATUS_PAY],
         self::SHOW_TYPE_WAIT_DELIVERY => [self::STATUS_PAY],
         self::SHOW_TYPE_WAIT_RECEIPT => [self::STATUS_SHIP],
         self::SHOW_TYPE_WAIT_RECEIPT => [self::STATUS_SHIP],
-        self::SHOW_TYPE_WAIT_COMMENT => [self::STATUS_CONFIRM, self::STATUS_COMMENT],
+        self::SHOW_TYPE_WAIT_COMMENT => [self::STATUS_CONFIRM],
     ];
     ];
 
 
 
 
-    /**
-     * 支付方式 枚举
-     */
-    const METHOD_WALLET   = 'wallet';
-    const METHOD_WECHAT  = 'wechatv3';
-    /**
-     * 支付方式
-     */
-    const SHOW_PAY_TYPE_MAP = [
-        self::METHOD_WALLET => '余额支付',
-        self::METHOD_WECHAT => '微信支付',
-    ];
-
 }
 }

+ 5 - 99
application/common/model/Order.php

@@ -5,15 +5,12 @@ namespace app\common\model;
 use think\Db;
 use think\Db;
 use think\Exception;
 use think\Exception;
 use think\Model;
 use think\Model;
-use addons\shop\model\Freight;
-use addons\shop\model\Carts;
-use addons\shop\model\Address;
 use Yansongda\Pay\Exceptions\GatewayException;
 use Yansongda\Pay\Exceptions\GatewayException;
 use addons\epay\library\Service;
 use addons\epay\library\Service;
 use addons\shop\model\OrderAction;
 use addons\shop\model\OrderAction;
 use addons\shop\model\TemplateMsg;
 use addons\shop\model\TemplateMsg;
 use traits\model\SoftDelete;
 use traits\model\SoftDelete;
-
+use app\common\Enum\OrderEnum;
 /**
 /**
  * 模型
  * 模型
  */
  */
@@ -31,7 +28,7 @@ class Order extends Model
     protected $deleteTime = 'deletetime';
     protected $deleteTime = 'deletetime';
     // 追加属性
     // 追加属性
     protected $append = [
     protected $append = [
-        'url'
+    
     ];
     ];
     protected static $config = [];
     protected static $config = [];
 
 
@@ -42,34 +39,9 @@ class Order extends Model
         $config = get_addon_config('shop');
         $config = get_addon_config('shop');
         self::$config = $config;
         self::$config = $config;
     }
     }
-
-    public function getUrlAttr($value, $data)
-    {
-        return url('shop.order/detail', ['orderid' => $data['order_sn']]);
-    }
-
-    public function getPayurlAttr($value, $data)
+    public function getOrderStatusTextAttr($value, $data)
     {
     {
-        return addon_url('shop/payment/index') . '?orderid=' . $data['order_sn'];
-    }
-
-    public function getCommenturlAttr($value, $data)
-    {
-        return url('shop.comment/post') . '?orderid=' . $data['order_sn'];
-    }
-
-    /**
-     * 获取快递查询URL
-     */
-    public function getLogisticsurlAttr($value, $data)
-    {
-        $url = self::$config['logisticstype'] == 'kdnapi' ? url('shop.order/logistics') . '?orderid=' . $data['order_sn'] : "https://www.kuaidi100.com/chaxun?com={$data['expressname']}&nu={$data['expressno']}";
-        return $url;
-    }
-
-    public function getOrderstateList()
-    {
-        return ['0' => __('Orderstate 0'), '1' => __('Orderstate 1'), '2' => __('Orderstate 2'), '3' => __('Orderstate 3'), '4' => __('Orderstate 4'), '5' => __('Orderstate 5')];
+        return OrderEnum::getOrderStatusText($data['order_status']);
     }
     }
 
 
     public function getShippingstateList()
     public function getShippingstateList()
@@ -82,12 +54,7 @@ class Order extends Model
         return ['0' => __('Paystate 0'), '1' => __('Paystate 1')];
         return ['0' => __('Paystate 0'), '1' => __('Paystate 1')];
     }
     }
 
 
-    public function getOrderstateTextAttr($value, $data)
-    {
-        $value = $value ? $value : $data['orderstate'];
-        $list = $this->getOrderstateList();
-        return $list[$value] ?? '';
-    }
+
 
 
     public function getShippingstateTextAttr($value, $data)
     public function getShippingstateTextAttr($value, $data)
     {
     {
@@ -103,30 +70,6 @@ class Order extends Model
         return $list[$value] ?? '';
         return $list[$value] ?? '';
     }
     }
 
 
-    public function getStatusTextAttr($value, $data)
-    {
-        if ($data['orderstate'] == 0) {
-            if ($data['paystate'] == 0) {
-                return '待付款';
-            }
-            if ($data['shippingstate'] == 0) {
-                return '待发货';
-            } elseif ($data['shippingstate'] == 1) {
-                return '待收货';
-            } elseif ($data['shippingstate'] == 2) {
-                return '待评价';
-            }
-        } elseif ($data['orderstate'] == 1) {
-            return '已取消';
-        } elseif ($data['orderstate'] == 2) {
-            return '已失效';
-        } elseif ($data['orderstate'] == 3) {
-            return '已完成';
-        } elseif ($data['orderstate'] == 4) {
-            return '退货/退款中';
-        }
-        return '未知';
-    }
 
 
     //获取订单剩余有效时长
     //获取订单剩余有效时长
     public function getRemainsecondsAttr($value, $data)
     public function getRemainsecondsAttr($value, $data)
@@ -272,43 +215,6 @@ class Order extends Model
     }
     }
 
 
 
 
-    /**
-     * 订单列表
-     *
-     * @param $param
-     * @return \think\Paginator
-     */
-    public static function tableList($param)
-    {
-        $pageNum = 15;
-        if (!empty($param['num'])) {
-            $pageNum = $param['num'];
-        }
-        return self::with(['orderGoods'])
-            ->where(function ($query) use ($param) {
-                $query->where('status', 'normal');
-
-                if (!empty($param['user_id'])) {
-                    $query->where('user_id', $param['user_id']);
-                }
-
-                if (isset($param['orderstate']) && $param['orderstate'] != '') {
-                    $query->where('orderstate', $param['orderstate']);
-                }
-                if (isset($param['shippingstate']) && $param['shippingstate'] != '') {
-                    $query->where('shippingstate', $param['shippingstate']);
-                }
-                if (isset($param['paystate']) && $param['paystate'] != '') {
-                    $query->where('paystate', $param['paystate']);
-                }
-                if (isset($param['q']) && $param['q'] != '') {
-                    $query->where('order_sn', 'in', function ($query) use ($param) {
-                        return $query->name('shop_order_goods')->where('order_sn|title', 'like', '%' . $param['q'] . '%')->field('order_sn');
-                    });
-                }
-            })
-            ->order('createtime desc')->paginate($pageNum, false, ['query' => request()->get()]);
-    }
 
 
 
 
     /**
     /**

+ 1 - 14
application/common/model/OrderGoods.php

@@ -20,7 +20,6 @@ class OrderGoods extends Model
     protected $updateTime = '';
     protected $updateTime = '';
     // 追加属性
     // 追加属性
     protected $append = [
     protected $append = [
-        'url'
     ];
     ];
     protected static $config = [];
     protected static $config = [];
 
 
@@ -32,19 +31,7 @@ class OrderGoods extends Model
         self::$config = $config;
         self::$config = $config;
     }
     }
 
 
-    public function getUrlAttr($value, $data)
-    {
-        $suffix = static::$config['moduleurlsuffix']['goods'] ?? static::$config['urlsuffix'];
-        return $this->goods ? $this->goods->url : addon_url('shop/goods/index', ['id' => $data['goods_id']], $suffix);
-    }
-
-    public function getFullurlAttr($value, $data)
-    {
-        $suffix = static::$config['moduleurlsuffix']['goods'] ?? static::$config['urlsuffix'];
-        return $this->goods ? $this->goods->fullurl : addon_url('shop/goods/index', ['id' => $data['goods_id']], $suffix, true);
-    }
-
-    public function getImageAttr($value, $data)
+    public function getGoodsImageAttr($value, $data)
     {
     {
         $value = $value ?: ($data['image'] ?? '/assets/addons/shop/img/noimage.jpg');
         $value = $value ?: ($data['image'] ?? '/assets/addons/shop/img/noimage.jpg');
         return cdnurl($value, true);
         return cdnurl($value, true);

+ 34 - 0
application/common/service/OrderService.php

@@ -484,4 +484,38 @@ class OrderService
         ];
         ];
     }
     }
 
 
+        /**
+     * 订单列表
+     *
+     * @param $param
+     * @return \think\Paginator
+     */
+    public static function getOrderList($userId = 0, $param,$status = [])
+    {
+        $pageSize = 15;
+        if (!empty($param['pageSize'])) {
+            $pageSize = $param['pageSize'];
+        }
+        return Order::with(['orderGoods'])
+            ->where(function ($query) use ($param) {
+
+                if (!empty($userId)) {
+                    $query->where('user_id', $userId);
+                }
+               
+                if (!empty($status)) {
+                    $query->whereIn('order_status', $status );
+                }
+              
+                if (isset($param['keywords']) && $param['keywords'] != '') {
+                    $query->where('order_sn', 'in', function ($query) use ($param) {
+                        return $query->name('shop_order_goods')->where('order_sn|goods_title', 'like', '%' . $param['q'] . '%')->field('order_sn');
+                    });
+                }
+            })
+            ->order('createtime desc')
+            ->paginate($pageSize, false, ['query' => request()->get()]);
+    }
+
+
 } 
 }