diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/application/admin/config/app.php b/application/admin/config/app.php old mode 100644 new mode 100755 diff --git a/application/admin/config/template.php b/application/admin/config/template.php old mode 100644 new mode 100755 diff --git a/application/admin/controller/Admin.php b/application/admin/controller/Admin.php index 641cacb0ae81e237bde971682a74102cec65d198..de1eb2b2d677219997f16a14489e4b9e64ab3b9a 100755 --- a/application/admin/controller/Admin.php +++ b/application/admin/controller/Admin.php @@ -56,7 +56,7 @@ class Admin extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/admin/index'), + 'url' => MyUrl('admin/admin/index'), ); $page = new \base\Page($page_params); @@ -118,7 +118,7 @@ class Admin extends Common $data = AdminService::AdminList($data_params); if(empty($data[0])) { - return $this->error('管理员信息不存在', url('admin/index/index')); + return $this->error('管理员信息不存在', MyUrl('admin/index/index')); } $this->assign('data', $data[0]); } @@ -200,7 +200,7 @@ class Admin extends Common // 是否已登录 if(session('admin') !== null) { - return redirect(url('admin/index/index')); + return redirect(MyUrl('admin/index/index')); } return $this->fetch(); @@ -237,7 +237,7 @@ class Admin extends Common public function Logout() { session_destroy(); - return redirect(url('admin/admin/logininfo')); + return redirect(MyUrl('admin/admin/logininfo')); } } ?> \ No newline at end of file diff --git a/application/admin/controller/Answer.php b/application/admin/controller/Answer.php index 72bfe702d290635c0655f271e5d1a7789ef18c06..0dd8ae3123983113bbbd09702f15df8a4abfebe2 100755 --- a/application/admin/controller/Answer.php +++ b/application/admin/controller/Answer.php @@ -58,7 +58,7 @@ class Answer extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/order/index'), + 'url' => MyUrl('admin/order/index'), ); $page = new \base\Page($page_params); $this->assign('page_html', $page->GetPageHtml()); diff --git a/application/admin/controller/Apphomenav.php b/application/admin/controller/Apphomenav.php index c8d98c80c1061777c10f786f8937c2c9a926679b..980cadac565811188357e9c41d286e0e42cba2ee 100755 --- a/application/admin/controller/Apphomenav.php +++ b/application/admin/controller/Apphomenav.php @@ -58,7 +58,7 @@ class AppHomeNav extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/apphomenav/index'), + 'url' => MyUrl('admin/apphomenav/index'), ); $page = new \base\Page($page_params); $this->assign('page_html', $page->GetPageHtml()); diff --git a/application/admin/controller/Article.php b/application/admin/controller/Article.php index 8883de087cb81d5cfc436b643a6ce302e3a3ed7e..e39f78a768f5bf43602ad19ef231eae90ef30f30 100755 --- a/application/admin/controller/Article.php +++ b/application/admin/controller/Article.php @@ -58,7 +58,7 @@ class Article extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/article/index'), + 'url' => MyUrl('admin/article/index'), ); $page = new \base\Page($page_params); $this->assign('page_html', $page->GetPageHtml()); diff --git a/application/admin/controller/Brand.php b/application/admin/controller/Brand.php index cd36786e47acad61fd6981a62b8e608bde2bfd87..4c0310539d8cbc10d4412aebee43a8ab431f85f7 100755 --- a/application/admin/controller/Brand.php +++ b/application/admin/controller/Brand.php @@ -58,7 +58,7 @@ class Brand extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/brand/index'), + 'url' => MyUrl('admin/brand/index'), ); $page = new \base\Page($page_params); $this->assign('page_html', $page->GetPageHtml()); diff --git a/application/admin/controller/Common.php b/application/admin/controller/Common.php index a1b6a41a3be409318b1aee499ef2ecda38921849..1b09478e8556d0a4476cb56c48db6ee785f98666 100755 --- a/application/admin/controller/Common.php +++ b/application/admin/controller/Common.php @@ -84,7 +84,7 @@ class Common extends Controller { exit(json_encode(DataReturn('登录失效,请重新登录', -400))); } else { - die(''); + die(''); } } } diff --git a/application/admin/controller/Coupon.php b/application/admin/controller/Coupon.php index cb20fc3c94b2c8a8cf5f1e0daec6b7f0eaaa0206..abbf9c02908d49fe561f624d8aa2123fa669a301 100755 --- a/application/admin/controller/Coupon.php +++ b/application/admin/controller/Coupon.php @@ -54,7 +54,7 @@ class Coupon extends Common 'number' => $number, 'total' => $m->where($where)->count(), 'where' => $param, - 'url' => url('Admin/Coupon/Index'), + 'url' => MyUrl('Admin/Coupon/Index'), ); $page = new \base\Page($page_param); @@ -485,7 +485,7 @@ class Coupon extends Common 'number' => $number, 'total' => $m->alias('uc')->join('__USER__ AS u ON u.id=uc.user_id')->where($where)->count(), 'where' => $param, - 'url' => url('Admin/Coupon/User'), + 'url' => MyUrl('Admin/Coupon/User'), ); $page = new \base\Page($page_param); diff --git a/application/admin/controller/Customview.php b/application/admin/controller/Customview.php index 9e608e868d01f42cdc405bd298f6a7996ce351f4..7f1e6d606e738e9b6fcad474f278cc6aabd7c296 100755 --- a/application/admin/controller/Customview.php +++ b/application/admin/controller/Customview.php @@ -58,7 +58,7 @@ class CustomView extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/customview/index'), + 'url' => MyUrl('admin/customview/index'), ); $page = new \base\Page($page_params); $this->assign('page_html', $page->GetPageHtml()); diff --git a/application/admin/controller/Goods.php b/application/admin/controller/Goods.php index f38371478d6271bde87d498dc3d055fdc00611ef..a9e2634e585d8453cc8eee8ae0d160bd3e5e5eb5 100755 --- a/application/admin/controller/Goods.php +++ b/application/admin/controller/Goods.php @@ -59,7 +59,7 @@ class Goods extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/goods/index'), + 'url' => MyUrl('admin/goods/index'), ); $page = new \base\Page($page_params); @@ -110,7 +110,7 @@ class Goods extends Common $data = GoodsService::GoodsList($data_params); if(empty($data[0])) { - return $this->error('商品信息不存在', url('admin/goods/index')); + return $this->error('商品信息不存在', MyUrl('admin/goods/index')); } $this->assign('data', $data[0]); diff --git a/application/admin/controller/Integrallog.php b/application/admin/controller/Integrallog.php index d9c616159b37d91892c031a59f280ce7cd9a9d2f..3cc181b45629c48fa55c43a2d15e7fec7597ad0d 100755 --- a/application/admin/controller/Integrallog.php +++ b/application/admin/controller/Integrallog.php @@ -60,7 +60,7 @@ class IntegralLog extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/integrallog/index'), + 'url' => MyUrl('admin/integrallog/index'), ); $page = new \base\Page($page_params); $this->assign('page_html', $page->GetPageHtml()); diff --git a/application/admin/controller/Message.php b/application/admin/controller/Message.php index b99ce004d1d969eaeccd4a660742b64fb6727fa0..32d3f9a12215b64cb9b14024276a9b9f49f32b50 100755 --- a/application/admin/controller/Message.php +++ b/application/admin/controller/Message.php @@ -60,7 +60,7 @@ class Message extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/message/index'), + 'url' => MyUrl('admin/message/index'), ); $page = new \base\Page($page_params); $this->assign('page_html', $page->GetPageHtml()); diff --git a/application/admin/controller/Order.php b/application/admin/controller/Order.php index 6e85b287d3800dfd6b5c7b9a42e74fa0f4200455..3ccc0bbf3d82cad45015d8abac3c16f9717f4bb2 100755 --- a/application/admin/controller/Order.php +++ b/application/admin/controller/Order.php @@ -62,7 +62,7 @@ class Order extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/order/index'), + 'url' => MyUrl('admin/order/index'), ); $page = new \base\Page($page_params); $this->assign('page_html', $page->GetPageHtml()); diff --git a/application/admin/controller/Paylog.php b/application/admin/controller/Paylog.php index 142c7a9b876677948cbdbab77793b0dc93771b80..41452f087232df75e14f19df4be947adf1ca8d63 100755 --- a/application/admin/controller/Paylog.php +++ b/application/admin/controller/Paylog.php @@ -60,7 +60,7 @@ class PayLog extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/paylog/index'), + 'url' => MyUrl('admin/paylog/index'), ); $page = new \base\Page($page_params); $this->assign('page_html', $page->GetPageHtml()); diff --git a/application/admin/controller/Payment.php b/application/admin/controller/Payment.php index 625747581b88a89a6ea4427467371d1ee10235a0..38020184197347534c9f415b6797eb5f9334b62b 100755 --- a/application/admin/controller/Payment.php +++ b/application/admin/controller/Payment.php @@ -75,7 +75,7 @@ class Payment extends Common $data = PaymentService::PaymentList($data_params); if(empty($data[0])) { - return $this->error('没有相关支付方式', url('admin/payment/index')); + return $this->error('没有相关支付方式', MyUrl('admin/payment/index')); } $this->assign('data', $data[0]); } diff --git a/application/admin/controller/Slide.php b/application/admin/controller/Slide.php index 37e05da4281de98a7a65924617427b07eba68b76..9a45147cd758123af7bc394801ccf1fccb206399 100755 --- a/application/admin/controller/Slide.php +++ b/application/admin/controller/Slide.php @@ -58,7 +58,7 @@ class Slide extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/customview/index'), + 'url' => MyUrl('admin/customview/index'), ); $page = new \base\Page($page_params); $this->assign('page_html', $page->GetPageHtml()); diff --git a/application/admin/controller/User.php b/application/admin/controller/User.php index dcd6b0d2428991073d75a81d3a1c88c49a9443f8..28faaa6b6d15ab7965c68a5fd5db8f3af5c2112b 100755 --- a/application/admin/controller/User.php +++ b/application/admin/controller/User.php @@ -57,7 +57,7 @@ class User extends Common 'total' => $total, 'where' => $params, 'page' => isset($params['page']) ? intval($params['page']) : 1, - 'url' => url('admin/user/index'), + 'url' => MyUrl('admin/user/index'), ); $page = new \base\Page($page_params); @@ -73,7 +73,7 @@ class User extends Common $this->assign('common_gender_list', lang('common_gender_list')); // Excel地址 - $this->assign('excel_url', url('admin/user/excelexport', $params)); + $this->assign('excel_url', MyUrl('admin/user/excelexport', $params)); $this->assign('params', $params); $this->assign('page_html', $page->GetPageHtml()); @@ -129,7 +129,7 @@ class User extends Common $data = UserService::UserList($data_params); if(empty($data[0])) { - return $this->error('用户信息不存在', url('admin/user/index')); + return $this->error('用户信息不存在', MyUrl('admin/user/index')); } $data[0]['birthday_text'] = empty($data[0]['birthday']) ? '' : date('Y-m-d', $data[0]['birthday']); $this->assign('data', $data[0]); diff --git a/application/admin/lang/zh-cn.php b/application/admin/lang/zh-cn.php old mode 100644 new mode 100755 index 66b4b6335cc8b4d275b34cc7a22fce5f63ec7542..00ea5063392457873c6d98befd121b13f397e3a0 --- a/application/admin/lang/zh-cn.php +++ b/application/admin/lang/zh-cn.php @@ -72,25 +72,25 @@ return array( array( 'is_enable' => 1, 'name' => '站点缓存', - 'url' => url('admin/cache/statusupdate'), + 'url' => MyUrl('admin/cache/statusupdate'), 'desc' => '数据转换后或前台不能正常访问时,可以使用此功能更新所有缓存' ), array( 'is_enable' => 1, 'name' => '模板缓存', - 'url' => url('admin/cache/templateupdate'), + 'url' => MyUrl('admin/cache/templateupdate'), 'desc' => '当页面显示不正常,可尝试使用此功能修复' ), array( 'is_enable' => 0, 'name' => '模块缓存', - 'url' => url('admin/cache/moduleupdate'), + 'url' => MyUrl('admin/cache/moduleupdate'), 'desc' => '更新页面布局与模块后未生效,可尝试使用此功能修复' ), array( 'is_enable' => 1, 'name' => '日志清除', - 'url' => url('admin/cache/logdelete'), + 'url' => MyUrl('admin/cache/logdelete'), 'desc' => '清除站点日志' ), ), diff --git a/application/admin/view/default/admin/index.html b/application/admin/view/default/admin/index.html index 61e5118e63a6597526ef6fabf58adab7e9bfe9cc..464e62b0710933627e23d58e7da282aa925e1602 100755 --- a/application/admin/view/default/admin/index.html +++ b/application/admin/view/default/admin/index.html @@ -4,7 +4,7 @@
-
+
@@ -35,7 +35,7 @@ @@ -74,11 +74,11 @@ {{if $v['id'] eq 1}} 不可操作 {{else /}} - + {{if $v['id'] neq $admin['id']}} - + {{/if}} {{/if}} diff --git a/application/admin/view/default/admin/login_info.html b/application/admin/view/default/admin/login_info.html index 296fc5b2a8381d585ad07bb7aa9a95a719efa52b..dd0d927351c3f92d9f562d646ef23ef484d7f875 100755 --- a/application/admin/view/default/admin/login_info.html +++ b/application/admin/view/default/admin/login_info.html @@ -8,7 +8,7 @@
- +
diff --git a/application/admin/view/default/admin/save_info.html b/application/admin/view/default/admin/save_info.html index 785cce631db75b29e650c897a0e8d8a5f0311999..2a4a3fd9d2446e61c91f13270d27162d52e1e846 100755 --- a/application/admin/view/default/admin/save_info.html +++ b/application/admin/view/default/admin/save_info.html @@ -4,7 +4,7 @@
- + {{if empty($data['id'])}} @@ -13,7 +13,7 @@ 管理员编辑 {{/if}} - 返回 + 返回
diff --git a/application/admin/view/default/answer/index.html b/application/admin/view/default/answer/index.html index 94a90301b11bb4c0763633aa743e3fe5a74afa21..e8c59e896c1e58289162113bf65d054df134d8ec 100755 --- a/application/admin/view/default/answer/index.html +++ b/application/admin/view/default/answer/index.html @@ -4,7 +4,7 @@
- +
@@ -69,7 +69,7 @@ {{$v.content}} - + {{$v.reply}} {{$v.add_time}} @@ -128,7 +128,7 @@ {{if $v['is_reply'] eq 0}} {{/if}} - + {{/foreach}} @@ -154,7 +154,7 @@ - +
diff --git a/application/admin/view/default/appconfig/index.html b/application/admin/view/default/appconfig/index.html index e544b9beffd95ab23d8028d34289a4183495c10b..c00b3d48408afbebdd37f0e62c2e759f38fe779b 100755 --- a/application/admin/view/default/appconfig/index.html +++ b/application/admin/view/default/appconfig/index.html @@ -4,7 +4,7 @@
- +
@@ -47,7 +47,7 @@ @@ -88,14 +88,14 @@ {{/if}} - + {{$v.add_time_time}} - + - + {{/foreach}} diff --git a/application/admin/view/default/apphomenav/save_info.html b/application/admin/view/default/apphomenav/save_info.html index 8eee03e16be72b3ee2fc033e23f718ecb9743e48..584d7c851cefc8201838bfcb177fbbba1f73613e 100755 --- a/application/admin/view/default/apphomenav/save_info.html +++ b/application/admin/view/default/apphomenav/save_info.html @@ -4,7 +4,7 @@
- + @@ -14,7 +14,7 @@ 导航编辑 {{/if}} - 返回 + 返回
diff --git a/application/admin/view/default/appminialipayconfig/index.html b/application/admin/view/default/appminialipayconfig/index.html index da8b7e324d64dcbb47f8fc3816156f00a27a98b3..95b769cc57bfdf25d2a9df1343bb27de6d09b0e5 100755 --- a/application/admin/view/default/appminialipayconfig/index.html +++ b/application/admin/view/default/appminialipayconfig/index.html @@ -4,7 +4,7 @@
- +
diff --git a/application/admin/view/default/appminialipaylist/index.html b/application/admin/view/default/appminialipaylist/index.html index 4c7114f94c20c846a14b1b6c23088ddd872eac39..9accfc5963b9ecdab5f235b3b01bafcf0fd949db 100755 --- a/application/admin/view/default/appminialipaylist/index.html +++ b/application/admin/view/default/appminialipaylist/index.html @@ -5,7 +5,7 @@
- +
@@ -32,7 +32,7 @@ {{/if}} - + {{/foreach}} diff --git a/application/admin/view/default/article/index.html b/application/admin/view/default/article/index.html index 4a6b0c1236b006667e685cd60e2553c92ddb11a0..425dcc48e55402bf2b4feec7029c67bae0a48033 100755 --- a/application/admin/view/default/article/index.html +++ b/application/admin/view/default/article/index.html @@ -4,7 +4,7 @@
- +
@@ -45,7 +45,7 @@ @@ -72,10 +72,10 @@ {{$v.article_category_name}} {{$v.access_count}} - + - + 查看更多 @@ -111,10 +111,10 @@
- + - + {{/foreach}} diff --git a/application/admin/view/default/article/save_info.html b/application/admin/view/default/article/save_info.html index 9b26a5c9a7859af44413280b10e06eb0ffd31e2c..62b3cc9d0c1d7fb421b25088e8b7d25fc209d122 100755 --- a/application/admin/view/default/article/save_info.html +++ b/application/admin/view/default/article/save_info.html @@ -4,7 +4,7 @@
- + {{if empty($data['id'])}} @@ -13,7 +13,7 @@ 文章编辑 {{/if}} - 返回 + 返回
@@ -50,7 +50,7 @@
- +
diff --git a/application/admin/view/default/articlecategory/index.html b/application/admin/view/default/articlecategory/index.html index 8e34bfeb934ade12601021aba425182df882c4a5..9ba98bec36a1561e88b8cf49c44b34634b9d9203 100755 --- a/application/admin/view/default/articlecategory/index.html +++ b/application/admin/view/default/articlecategory/index.html @@ -18,7 +18,7 @@
- +
@@ -55,5 +55,5 @@ {{include file="public/footer" /}} \ No newline at end of file diff --git a/application/admin/view/default/brand/index.html b/application/admin/view/default/brand/index.html index b3767c7c665bb28c41e05f3c42c03d1c790cf70b..517f4b487129e2f6f3b8a370ce749deefa3489ab 100755 --- a/application/admin/view/default/brand/index.html +++ b/application/admin/view/default/brand/index.html @@ -4,7 +4,7 @@
- +
@@ -39,7 +39,7 @@ @@ -80,14 +80,14 @@ {{/if}} - + {{$v.add_time_time}} - + - + {{/foreach}} diff --git a/application/admin/view/default/brand/save_info.html b/application/admin/view/default/brand/save_info.html index 1411295a7a70406760be86befb1fe9fc3f236dbc..04d6d58347b75c3d0cb1a5e063cb34b976018fce 100755 --- a/application/admin/view/default/brand/save_info.html +++ b/application/admin/view/default/brand/save_info.html @@ -4,7 +4,7 @@
- + @@ -14,7 +14,7 @@ 品牌编辑 {{/if}} - 返回 + 返回
diff --git a/application/admin/view/default/brandcategory/index.html b/application/admin/view/default/brandcategory/index.html index 6d3d538e19742448efe44e9739d77b251de24fff..9b225a5139dd7758c11f4bc81e02ccd63a8e2bf4 100755 --- a/application/admin/view/default/brandcategory/index.html +++ b/application/admin/view/default/brandcategory/index.html @@ -18,7 +18,7 @@
- +
@@ -55,5 +55,5 @@ {{include file="public/footer" /}} \ No newline at end of file diff --git a/application/admin/view/default/config/index.html b/application/admin/view/default/config/index.html index b96ea2b81f82fd43bae5a8b7cca0e89adab6c781..ae67c6ec274c6026c319e8d7ac71c792a7a97aee 100755 --- a/application/admin/view/default/config/index.html +++ b/application/admin/view/default/config/index.html @@ -4,7 +4,7 @@
- +
value="{{$param.keyword}}"{{/if}} /> @@ -39,7 +39,7 @@
新增 + 新增
@@ -83,7 +83,7 @@ {{/if}} - 查看更多 @@ -135,14 +135,14 @@
- + - + {{if $v['is_enable'] eq 1)}} - + {{/if}} diff --git a/application/admin/view/default/coupon/save_info.html b/application/admin/view/default/coupon/save_info.html index 53314c719dc0607e02943c2941e09c830ddece70..97e2cf0e6416e5d06b9b34d38ec5a2e1f5e37ecc 100755 --- a/application/admin/view/default/coupon/save_info.html +++ b/application/admin/view/default/coupon/save_info.html @@ -4,7 +4,7 @@
- + 返回 + 返回
diff --git a/application/admin/view/default/coupon/send_info.html b/application/admin/view/default/coupon/send_info.html index a2c1669e2fc35f02fe10aee952b64e593bdcb02a..73d4e5c62442147b475c2da99a4b535bbd291c4d 100755 --- a/application/admin/view/default/coupon/send_info.html +++ b/application/admin/view/default/coupon/send_info.html @@ -4,13 +4,13 @@
- + 返回 + 返回 @@ -57,7 +57,7 @@
- +
diff --git a/application/admin/view/default/coupon/user.html b/application/admin/view/default/coupon/user.html index 2ef78dbbd120743707eedbe1e958bafea9203b46..bb4ca2f36fbec0396a9a1a8240917a1adb1d3382 100755 --- a/application/admin/view/default/coupon/user.html +++ b/application/admin/view/default/coupon/user.html @@ -4,7 +4,7 @@
- +
value="{{$param.keyword}}"{{/if}} /> @@ -27,7 +27,7 @@
- 优惠券列表 + 优惠券列表
@@ -127,7 +127,7 @@ {{if $v['status'] neq 1)}} - + {{/if}} diff --git a/application/admin/view/default/customview/index.html b/application/admin/view/default/customview/index.html index 1c81e3eceed4edff3ddc0bf603719a5198fadbf7..32029a35bace037c35ea4d098eaea239a87b738b 100755 --- a/application/admin/view/default/customview/index.html +++ b/application/admin/view/default/customview/index.html @@ -4,7 +4,7 @@
-
+
@@ -45,7 +45,7 @@ @@ -68,19 +68,19 @@ {{foreach $data_list as $v}} - {{$v.title}} + {{$v.title}} - + - + - + - + {{$v.access_count}} @@ -123,10 +123,10 @@
- + - + {{/foreach}} diff --git a/application/admin/view/default/customview/save_info.html b/application/admin/view/default/customview/save_info.html index 2c38e85b3ec6b32961af021ed3770bb29a23257f..35f4d8848af3f18ec43adaebb2ff1ca652d67ba6 100755 --- a/application/admin/view/default/customview/save_info.html +++ b/application/admin/view/default/customview/save_info.html @@ -4,7 +4,7 @@
- + {{if empty($data['id'])}} @@ -13,7 +13,7 @@ 自定义页面编辑 {{/if}} - 返回 + 返回
@@ -41,7 +41,7 @@
- +
diff --git a/application/admin/view/default/email/index.html b/application/admin/view/default/email/index.html index a5cbabd19153393780fc881e09fbbd04256818ac..caea6ce96f0364a5f10ccb8d56e02ac2a63add56 100755 --- a/application/admin/view/default/email/index.html +++ b/application/admin/view/default/email/index.html @@ -8,7 +8,7 @@ - +
@@ -40,7 +40,7 @@ - +
diff --git a/application/admin/view/default/email/message.html b/application/admin/view/default/email/message.html index 444cb4e498ec2c2d18daa93d2034add9b9dbb55e..7092ccf7bcf1a7f5a2361157381ab86bdbe18180 100755 --- a/application/admin/view/default/email/message.html +++ b/application/admin/view/default/email/message.html @@ -8,7 +8,7 @@ - +
diff --git a/application/admin/view/default/email/nav.html b/application/admin/view/default/email/nav.html index df2fdf2fe3cb556b670695139bb944027f68b192..eda73d78756c7cd82e09948478ba3885274ba1af 100755 --- a/application/admin/view/default/email/nav.html +++ b/application/admin/view/default/email/nav.html @@ -1,8 +1,8 @@ \ No newline at end of file diff --git a/application/admin/view/default/express/index.html b/application/admin/view/default/express/index.html index 79b04bd8c2b2b5ce5f795a0248c6f00ba86b54a9..2506462d9827d591cffd8bd8482f59e9989e9d40 100755 --- a/application/admin/view/default/express/index.html +++ b/application/admin/view/default/express/index.html @@ -18,7 +18,7 @@
- +
    @@ -66,5 +66,5 @@ {{include file="public/footer" /}} \ No newline at end of file diff --git a/application/admin/view/default/goods/index.html b/application/admin/view/default/goods/index.html index 180841bff373b1efa8f6e43cb6c4d94169eb17ba..b9226d905371591d0f8896027e46f2adc1a5bc4e 100755 --- a/application/admin/view/default/goods/index.html +++ b/application/admin/view/default/goods/index.html @@ -4,7 +4,7 @@
    - +
    @@ -39,7 +39,7 @@ @@ -75,10 +75,10 @@ {{/if}} - + - + {{$v.inventory}} {{$v.inventory_unit}} {{$v.model}} @@ -149,10 +149,10 @@
    - + - + {{/foreach}} diff --git a/application/admin/view/default/goods/save_info.html b/application/admin/view/default/goods/save_info.html index f551a190fc8c4acd0884e8354461f7e136eae418..f2404668d03c9a8ec2e2e7ebbdf6569f310328dc 100755 --- a/application/admin/view/default/goods/save_info.html +++ b/application/admin/view/default/goods/save_info.html @@ -4,7 +4,7 @@
    - + @@ -14,7 +14,7 @@ 商品编辑 {{/if}} - 返回 + 返回
    - +
      @@ -103,5 +103,5 @@ {{include file="public/footer" /}} \ No newline at end of file diff --git a/application/admin/view/default/index/index.html b/application/admin/view/default/index/index.html index ccfe1c07ed35591e9d5f4d08481e6a56a8e9759c..ee67f23ec828e97f04317d2562dfb452724fc6ac 100755 --- a/application/admin/view/default/index/index.html +++ b/application/admin/view/default/index/index.html @@ -9,7 +9,7 @@ {{include file="public/menu" /}} - +
    diff --git a/application/admin/view/default/integrallog/index.html b/application/admin/view/default/integrallog/index.html index 73d4e7fadf6b7bd3291625038153c9d08ff0d937..84df88487cbc23043355021b031b09faca9ed627 100755 --- a/application/admin/view/default/integrallog/index.html +++ b/application/admin/view/default/integrallog/index.html @@ -4,7 +4,7 @@
    - +
    diff --git a/application/admin/view/default/link/index.html b/application/admin/view/default/link/index.html index b81652cde763b103b0f3aeb2d6e4595389565057..f6e962b141ee572e2c2cf04e44584d10b16a9fe0 100755 --- a/application/admin/view/default/link/index.html +++ b/application/admin/view/default/link/index.html @@ -18,7 +18,7 @@
    - +
    @@ -69,11 +69,11 @@ {{$v.describe}} - + - + {{/foreach}} diff --git a/application/admin/view/default/message/index.html b/application/admin/view/default/message/index.html index 56f2b9cb3f32d56c7d77ad2aa0004a541dad8e06..32f80650e77dad4dccfe003bab190b0cb7b6fe9c 100755 --- a/application/admin/view/default/message/index.html +++ b/application/admin/view/default/message/index.html @@ -4,7 +4,7 @@
    - +
    @@ -89,7 +89,7 @@ {{if empty($v['add_time_time'])}}未设置{{else /}}{{$v.add_time_time}}{{/if}} - + {{/foreach}} diff --git a/application/admin/view/default/navigation/index.html b/application/admin/view/default/navigation/index.html index 4c6adde7d5475c92c3a2fa6ba6a341e783a313dc..a194a941c65387a736a17ffc39c9994e77bdad8f 100755 --- a/application/admin/view/default/navigation/index.html +++ b/application/admin/view/default/navigation/index.html @@ -37,11 +37,11 @@ {{:lang('common_nav_type_list')[$v['data_type']]}} - + - + {{if !empty($data_list)}} @@ -54,11 +54,11 @@ {{:lang('common_nav_type_list')[$vs['data_type']]}} - + - + {{/foreach}} @@ -80,7 +80,7 @@
    - +
    @@ -184,7 +184,7 @@
    - +
    diff --git a/application/admin/view/default/navigation/nav.html b/application/admin/view/default/navigation/nav.html index 8d1c7e5be023397cba06b74a279102e828c48686..96d157948a746791d5cae35c82b8978e4a85934b 100755 --- a/application/admin/view/default/navigation/nav.html +++ b/application/admin/view/default/navigation/nav.html @@ -1,8 +1,8 @@ \ No newline at end of file diff --git a/application/admin/view/default/order/index.html b/application/admin/view/default/order/index.html index 34faacddd938d491e99c99187ffc727ccd36e0b8..77d4c48536d6a5a4a70b2c25990b6dce9850481e 100755 --- a/application/admin/view/default/order/index.html +++ b/application/admin/view/default/order/index.html @@ -4,7 +4,7 @@
    - +
    @@ -71,10 +71,10 @@ {{foreach $v.items as $vs}}
    @@ -143,10 +143,10 @@ {{foreach $v.items as $vs}}
    @@ -231,22 +231,22 @@ {{if in_array($v['status'], [0])}} - + {{/if}} {{if in_array($v['status'], [0,1])}} - + {{if in_array($v['status'], [1])}} {{/if}} {{/if}} {{if $v['status'] eq 2}} - + {{/if}} {{if $v['status'] eq 3}} - + {{/if}} {{if in_array($v['status'], [5,6])}} - + {{/if}} @@ -266,7 +266,7 @@ ×
    - +

    选择快递

    @@ -313,7 +313,7 @@ ×
    - +

    选择支付

    diff --git a/application/admin/view/default/paylog/index.html b/application/admin/view/default/paylog/index.html index a6db13459e1b7205ef50f23f8155e6be49a672c5..6213234b2a81543a0669a91a234f8fd17bb61ac1 100755 --- a/application/admin/view/default/paylog/index.html +++ b/application/admin/view/default/paylog/index.html @@ -4,7 +4,7 @@
    - +
    diff --git a/application/admin/view/default/payment/index.html b/application/admin/view/default/payment/index.html index c50655bac35fc7615e59732dc92567f79271e479..7fcb4f60024602feef4af302c99ba483dbfbc66a 100755 --- a/application/admin/view/default/payment/index.html +++ b/application/admin/view/default/payment/index.html @@ -73,31 +73,31 @@ {{if $v['is_install'] eq 1}} - + {{else /}} 未安装 {{/if}} {{if $v['is_install'] eq 1}} - + {{else /}} 未安装 {{/if}} {{if $v['is_install'] eq 0}} - + {{if !in_array($v['payment'], $cannot_deleted_list)}} - + {{/if}} {{else /}} - + - + {{/if}} @@ -118,7 +118,7 @@
    - +

    1 类名必须于文件名一致(去除 .php ),如 Alipay.php 则取 Alipay
    2 类必须定义三个方法
        2.1 Config 配置方法
        2.2 Pay 支付方法
        2.3 Respond 回调方法

    diff --git a/application/admin/view/default/payment/save_info.html b/application/admin/view/default/payment/save_info.html index 49cc28e24b4230849c09092be2525493549a2233..3881f6bbd1b776bd1af1b54399efb30f1d606230 100755 --- a/application/admin/view/default/payment/save_info.html +++ b/application/admin/view/default/payment/save_info.html @@ -4,11 +4,11 @@
    - + 支付方式编辑 - 返回 + 返回
    diff --git a/application/admin/view/default/power/index.html b/application/admin/view/default/power/index.html index 86c5a7be38fcded5bc333027231cf04c542a4e9e..2f807c7b9b8dad8b4d7eaf50810700f4a519e05c 100755 --- a/application/admin/view/default/power/index.html +++ b/application/admin/view/default/power/index.html @@ -18,7 +18,7 @@
    - +
    + diff --git a/application/admin/view/default/public/menu.html b/application/admin/view/default/public/menu.html index fafccfa0decd9f973e0fdcadc9a4a3e665de190e..5c4a68e33c7adf5818d8c037d4182d6e83e83e23 100755 --- a/application/admin/view/default/public/menu.html +++ b/application/admin/view/default/public/menu.html @@ -2,12 +2,12 @@
    - +
    @@ -56,5 +56,5 @@ {{include file="public/footer" /}} \ No newline at end of file diff --git a/application/admin/view/default/screeningprice/index.html b/application/admin/view/default/screeningprice/index.html index 9d68f9e4f3244598f83abafc6793018e8fde9f74..892378561bc88816df718993e91d255bd917eb0c 100755 --- a/application/admin/view/default/screeningprice/index.html +++ b/application/admin/view/default/screeningprice/index.html @@ -19,7 +19,7 @@
    规则举例
    最小价格0 - 最大价格100 则是小于100
    最小价格1000 - 最大价格0 则是大于1000
    最小价格100 - 最大价格500 则是大于等于100并且小于500
    - +
    @@ -64,5 +64,5 @@ {{include file="public/footer" /}} \ No newline at end of file diff --git a/application/admin/view/default/seo/index.html b/application/admin/view/default/seo/index.html index ac440511700418f73410d4de670c5d17644f9899..39659312e6bccd15348bcb3809b955c9b1c1cf4a 100755 --- a/application/admin/view/default/seo/index.html +++ b/application/admin/view/default/seo/index.html @@ -4,7 +4,7 @@
    - +
    diff --git a/application/admin/view/default/slide/index.html b/application/admin/view/default/slide/index.html index 2aa55c4e0be56b4f0fb81d24056e6969fb47f9c2..469e7175e207c0c6a28b609682390d6096f07792 100755 --- a/application/admin/view/default/slide/index.html +++ b/application/admin/view/default/slide/index.html @@ -4,7 +4,7 @@
    - +
    @@ -45,7 +45,7 @@ @@ -84,14 +84,14 @@ {{/if}} - + {{$v.add_time_time}} - + - + {{/foreach}} diff --git a/application/admin/view/default/slide/save_info.html b/application/admin/view/default/slide/save_info.html index e9bbc69e09747c2265f610509bb9f0860233c8e5..218a16842a9905ca4d8e8b4c5658b85d9a820135 100755 --- a/application/admin/view/default/slide/save_info.html +++ b/application/admin/view/default/slide/save_info.html @@ -4,7 +4,7 @@
    - + @@ -14,7 +14,7 @@ 轮播编辑 {{/if}} - 返回 + 返回
    diff --git a/application/admin/view/default/sms/index.html b/application/admin/view/default/sms/index.html index 9d00388693e812de36d732cfa32eb14c7d2fd157..5a9caa2591dcbd411de60c0e4e15bbd3dd7b8dbc 100755 --- a/application/admin/view/default/sms/index.html +++ b/application/admin/view/default/sms/index.html @@ -8,7 +8,7 @@ - +
    diff --git a/application/admin/view/default/sms/message.html b/application/admin/view/default/sms/message.html index a1b42bb739d9baa0b1f4135a8309e31e7a4baa8d..f2510e8e955cbf658c0fb319cc0170f78d823787 100755 --- a/application/admin/view/default/sms/message.html +++ b/application/admin/view/default/sms/message.html @@ -8,7 +8,7 @@ - +
    diff --git a/application/admin/view/default/sms/nav.html b/application/admin/view/default/sms/nav.html index b87664a215b52998da788f891727bbd9de124f22..c22dda2a4a12863cc72939e43759f90d149f5922 100755 --- a/application/admin/view/default/sms/nav.html +++ b/application/admin/view/default/sms/nav.html @@ -1,9 +1,9 @@ diff --git a/application/admin/view/default/theme/index.html b/application/admin/view/default/theme/index.html index d553ba89749336c280ebd213894dbc8819a91786..7cbf2b656e61b51296d5b172fcb7fb92e85d88ea 100755 --- a/application/admin/view/default/theme/index.html +++ b/application/admin/view/default/theme/index.html @@ -9,7 +9,7 @@ {{if !empty($data_list)}} -
    {{/if}}
    @@ -214,7 +214,7 @@
    - + diff --git a/application/index/view/default/cart/index.html b/application/index/view/default/cart/index.html index f5662ea1e23a449327317a476bf367f8082819a7..d939bc87719441a4bf3bb9ea634a76155ab1e9c6 100755 --- a/application/index/view/default/cart/index.html +++ b/application/index/view/default/cart/index.html @@ -65,7 +65,7 @@

    ¥{{$goods.price}}

    -
    +
    - + @@ -81,7 +81,7 @@ ¥{{$goods.total_price}} - 删除 + 删除 {{/foreach}} @@ -95,10 +95,10 @@ 全选 - 清空 + 清空
    diff --git a/application/index/view/default/category/index.html b/application/index/view/default/category/index.html old mode 100644 new mode 100755 index baae1f6f54e7245f721738bc1c5f5795cf76af11..a51419f2ed59faa09387be8024a16b02f7216cd0 --- a/application/index/view/default/category/index.html +++ b/application/index/view/default/category/index.html @@ -23,20 +23,20 @@ {{foreach $goods_category_list as $v}}
    - {{$v.name}} + {{$v.name}}
    {{if !empty($v['items'])}} {{foreach $v.items as $vs}} {{if !empty($vs['items'])}} diff --git a/application/index/view/default/goods/index.html b/application/index/view/default/goods/index.html old mode 100644 new mode 100755 index e94421b6e124ab2bff3651a12dd63a0694505b68..c308fc9a9ae7040954bbdf8567ee7089e763f01d --- a/application/index/view/default/goods/index.html +++ b/application/index/view/default/goods/index.html @@ -12,7 +12,7 @@ {{include file="public/goods_category" /}} -
    +
    @@ -100,7 +100,7 @@
    手机扫一扫购买 - +
    @@ -169,7 +169,7 @@
    - + 取消
    @@ -198,12 +198,12 @@ 首页 {{if isset($goods['is_favor']) and $goods['is_favor'] eq 1}} -
    - - + diff --git a/application/index/view/default/index/index.html b/application/index/view/default/index/index.html index 5f232339a686762a9d49f9c2b5583d655830b3a7..39be2dd2d3935744c1cafa031330b2b34c7f4e6a 100755 --- a/application/index/view/default/index/index.html +++ b/application/index/view/default/index/index.html @@ -24,7 +24,7 @@
    -
    + @@ -74,16 +74,16 @@ {{if !empty($user)}} - 退出 + 退出 {{/if}}
    {{if empty($user) and (MyC('home_user_login_state') eq 1 or in_array('sms', MyC('home_user_reg_state')) or in_array('email', MyC('home_user_reg_state')))}} {{/if}} @@ -92,9 +92,9 @@ {{if !empty($user_order_status)}} {{foreach $user_order_status as $v}} {{if in_array($v['status'], [1,2,3])}} - {{$v.count}}{{$v.name}} + {{$v.count}}{{$v.name}} {{elseif in_array($v['status'], [100]) /}} - {{$v.count}}{{$v.name}} + {{$v.count}}{{$v.name}} {{/if}} {{/foreach}} {{/if}} @@ -136,7 +136,7 @@ {{if !empty($category['items'])}} {{foreach $category.items as $keys=>$categorys}} {{if $key lt 6 and $keys eq 0 and isset($categorys['is_home_recommended']) and $categorys['is_home_recommended'] eq 1}} - {{$categorys.name}} + {{$categorys.name}} {{/if}} {{/foreach}} {{/if}} @@ -144,7 +144,7 @@ {{/if}}
    - 更多 + 更多
    @@ -155,7 +155,7 @@ {{if !empty($floor['items'])}} {{foreach $floor.items as $category_key=>$category}} {{if $category_key lt 6 and isset($category['is_home_recommended']) and $category['is_home_recommended'] eq 1}} - + {{:mb_substr($category['name'], 0, 4, 'utf-8')}} @@ -164,7 +164,7 @@ {{/foreach}} {{/if}}
    - +
    {{$floor.describe}}
    diff --git a/application/index/view/default/lib/region_linkage.html b/application/index/view/default/lib/region_linkage.html index 80543c6e11bb99740aa70f74d0d10ffea5701bd6..2bb60bcbf623a9290a31dd4515b85e64664698a3 100755 --- a/application/index/view/default/lib/region_linkage.html +++ b/application/index/view/default/lib/region_linkage.html @@ -1,4 +1,4 @@ -
    +
    @@ -76,7 +76,7 @@ - 清除条件 + 清除条件 diff --git a/application/index/view/default/order/comments.html b/application/index/view/default/order/comments.html index 24d412843a60da9f8dd3a289610e686d7457a41d..2633834ba1f2b1df677b734139fa45819cc38379 100755 --- a/application/index/view/default/order/comments.html +++ b/application/index/view/default/order/comments.html @@ -23,7 +23,7 @@
    {{if $data['user_is_comments'] eq 0}} - + {{if !empty($data.items)}}
    diff --git a/application/index/view/default/order/detail.html b/application/index/view/default/order/detail.html index 7e71031c0c74da518f4f59adb2ba425f37a7d3a2..056f3f39f4e3d52faef935b01d4d8d3b0f342625 100755 --- a/application/index/view/default/order/detail.html +++ b/application/index/view/default/order/detail.html @@ -101,6 +101,24 @@
    订单编号:
    {{$data.order_no}}
    + {{if !empty($data.status_name)}} +
    +
    订单状态:
    +
    {{$data.status_name}}
    +
    + {{/if}} + {{if !empty($data.pay_status_name)}} +
    +
    支付状态:
    +
    {{$data.pay_status_name}}
    +
    + {{/if}} + {{if !empty($data.payment_name)}} +
    +
    支付方式:
    +
    {{$data.payment_name}}
    +
    + {{/if}} {{if !empty($data.user_note)}}
    用户留言:
    @@ -173,19 +191,19 @@ 您可以 {{/if}} {{if in_array($data['status'], [0,1])}} - + {{/if}} {{if in_array($data['status'], [1])}} {{/if}} {{if in_array($data['status'], [3])}} - + {{/if}} {{if in_array($data['status'], [4]) and $data['user_is_comments'] eq 0}} - 评价 + 评价 {{/if}} {{if in_array($data['status'], [4,5,6])}} - + {{/if}}
    {{if in_array($data['status'], [3,4])}} @@ -303,7 +321,7 @@ ×
    - +

    选择支付

    diff --git a/application/index/view/default/order/index.html b/application/index/view/default/order/index.html index 2472b8945197f053f440ea3f2dac97f661d1b970..3f2a3d33bb584e5d6d69a1a4deb9490c7073db74 100755 --- a/application/index/view/default/order/index.html +++ b/application/index/view/default/order/index.html @@ -22,7 +22,7 @@
    - +
    @@ -111,7 +111,7 @@ - 清除条件 + 清除条件 @@ -184,25 +184,25 @@ {{$order.status_name}} {{if in_array($order['status'], [0,1])}} - + {{/if}} {{if in_array($order['status'], [1])}} - 支付 + 支付 {{/if}} {{if in_array($order['status'], [3])}} - + {{/if}} {{if in_array($order['status'], [4]) and $order['user_is_comments'] eq 0}} - 评价 + 评价 {{/if}} {{if in_array($order['status'], [4,5,6])}} - + {{/if}} {{/if}} diff --git a/application/index/view/default/personal/index.html b/application/index/view/default/personal/index.html index 2c638f798dd06d4f76ff4cf96c29d7d6ff844543..7d921381d4b74c5ff2f28b0f339e4b677b87da19 100755 --- a/application/index/view/default/personal/index.html +++ b/application/index/view/default/personal/index.html @@ -24,7 +24,7 @@
    个人资料 - 编辑 + 编辑
    {{foreach $personal_show_list as $k=>$v}} diff --git a/application/index/view/default/personal/save_info.html b/application/index/view/default/personal/save_info.html index 43a3cd5a913c41f6274cf20c6b1e4056efbb2d80..e0bf06d10fc95000038bbbbc1b1d17c557bfb26e 100755 --- a/application/index/view/default/personal/save_info.html +++ b/application/index/view/default/personal/save_info.html @@ -23,10 +23,10 @@
    - + 个人资料 - 返回 + 返回
    diff --git a/application/index/view/default/public/goods_category.html b/application/index/view/default/public/goods_category.html index 47ff92a816939aa3163da1d2836848a686272211..d403c39d3f74f6c6dfd71ebe1c5dfff3ef7b6184 100755 --- a/application/index/view/default/public/goods_category.html +++ b/application/index/view/default/public/goods_category.html @@ -1,7 +1,7 @@
    - +
    全部分类
    @@ -15,7 +15,7 @@
    @@ -28,14 +28,14 @@ {{foreach $v.items as $vs}}
    - + {{$vs.name}}
    {{if !empty($vs['items'])}} {{foreach $vs.items as $vss}}
    - + {{$vss.name}}
    diff --git a/application/index/view/default/public/header_nav.html b/application/index/view/default/public/header_nav.html index afd0aadc813e791087d1dbd0bb4260c4328c12a0..11c6334e21d0db0c0cffc75a84a10942096f7917 100755 --- a/application/index/view/default/public/header_nav.html +++ b/application/index/view/default/public/header_nav.html @@ -12,7 +12,7 @@ {{/if}}
@@ -22,7 +22,7 @@
diff --git a/application/index/view/default/public/user_menu.html b/application/index/view/default/public/user_menu.html index bee09de71f15be3f926cc19c6633467e03941075..3a35cd04ff7b295520ccbfa051faee31ce0b19a1 100755 --- a/application/index/view/default/public/user_menu.html +++ b/application/index/view/default/public/user_menu.html @@ -7,7 +7,7 @@ {{if $v.is_show eq 1}} {{if empty($v['item'])}}
  • - {{if !empty($v['icon'])}}{{/if}} {{$v.name}} + {{if !empty($v['icon'])}}{{/if}} {{$v.name}}
  • {{else /}}
  • @@ -16,7 +16,7 @@ {{foreach $v.item as $vs}} {{if $vs.is_show eq 1}}
  • - {{if !empty($vs['icon'])}}{{/if}} {{$vs.name}} + {{if !empty($vs['icon'])}}{{/if}} {{$vs.name}}
  • {{/if}} {{/foreach}} @@ -39,7 +39,7 @@ ×
    - +
    diff --git a/application/index/view/default/safety/email_info.html b/application/index/view/default/safety/email_info.html index 4755393e93e01d92272a35ad9b8c88e9c9a18b31..06832aee3b63d3ebd43786715fb076e0b0d34294 100755 --- a/application/index/view/default/safety/email_info.html +++ b/application/index/view/default/safety/email_info.html @@ -23,10 +23,10 @@
    - + 原电子邮箱校验 - 返回 + 返回
    @@ -36,7 +36,7 @@
    - +
    @@ -56,8 +56,8 @@ diff --git a/application/index/view/default/safety/login_pwd_info.html b/application/index/view/default/safety/login_pwd_info.html index 4a1db786af852b5091a22e6ef6ac6d944261b993..88cd0a64fc3d1e295240594d9a01bba3ad5fb968 100755 --- a/application/index/view/default/safety/login_pwd_info.html +++ b/application/index/view/default/safety/login_pwd_info.html @@ -23,10 +23,10 @@
    - + 登录密码修改 - 返回 + 返回
    diff --git a/application/index/view/default/safety/mobile_info.html b/application/index/view/default/safety/mobile_info.html index 28a686cc0e1250c9401d0c6c2c0c7018a90bf0eb..470ee49c125882dd43aec6d674998a03f4d09e19 100755 --- a/application/index/view/default/safety/mobile_info.html +++ b/application/index/view/default/safety/mobile_info.html @@ -23,10 +23,10 @@
    - + 原手机号码校验 - 返回 + 返回
    @@ -36,7 +36,7 @@
    - +
    @@ -56,8 +56,8 @@ diff --git a/application/index/view/default/safety/new_email_info.html b/application/index/view/default/safety/new_email_info.html index a73fe1e7be77aab3b7ddf94d2bffcf79db6fd9c4..a77fb4182622c0b549c80173fb7b5046f0ea0b52 100755 --- a/application/index/view/default/safety/new_email_info.html +++ b/application/index/view/default/safety/new_email_info.html @@ -23,10 +23,10 @@
    - + 新电子邮箱校验 - 返回 + 返回
    @@ -36,7 +36,7 @@
    - +
    @@ -56,8 +56,8 @@ diff --git a/application/index/view/default/safety/new_mobile_info.html b/application/index/view/default/safety/new_mobile_info.html index 569e776a01f1051136d1a886997bb94054664278..cbf324dcc568b68186b005d7754bd1472827b2ef 100755 --- a/application/index/view/default/safety/new_mobile_info.html +++ b/application/index/view/default/safety/new_mobile_info.html @@ -23,10 +23,10 @@
    - + 新手机号码校验 - 返回 + 返回
    @@ -36,7 +36,7 @@
    - +
    @@ -56,8 +56,8 @@ diff --git a/application/index/view/default/search/index.html b/application/index/view/default/search/index.html old mode 100644 new mode 100755 index 25d37eba62aa981c2f01103b6f68163694a86490..24720c6555dd7dc4c48f108b91db43ceda96b25a --- a/application/index/view/default/search/index.html +++ b/application/index/view/default/search/index.html @@ -112,7 +112,7 @@ - +
    diff --git a/application/index/view/default/user/email_reg_info.html b/application/index/view/default/user/email_reg_info.html index e4152f0834d623fe3456de6591c9fe8c70ed3190..4b0331700ab34cd25d6d0dc4525733545cbbbd24 100755 --- a/application/index/view/default/user/email_reg_info.html +++ b/application/index/view/default/user/email_reg_info.html @@ -16,18 +16,18 @@
    - +
    {{if MyC('home_user_login_state') eq 1}} 已有帐号? - +
    {{/if}}
    @@ -38,7 +38,7 @@
    - +
    @@ -53,7 +53,7 @@

    - 忘记密码? + 忘记密码?

    @@ -69,8 +69,8 @@
    - 'reg'])}}"' /> - 看不清换一张 + 'reg'])}}"' /> + 看不清换一张
    diff --git a/application/index/view/default/user/forget_pwd_info.html b/application/index/view/default/user/forget_pwd_info.html index 4debdb44f2f20d25c85a95322bf7a29fc80f5440..2daa82b10986f9a6e8324de2f8f7f42388738c98 100755 --- a/application/index/view/default/user/forget_pwd_info.html +++ b/application/index/view/default/user/forget_pwd_info.html @@ -15,11 +15,11 @@
    -
    +
    {{if MyC('home_user_login_state') eq 1}} 已有帐号? - 立即登录 + 立即登录
    {{/if}} @@ -31,7 +31,7 @@
    - +

    @@ -59,8 +59,8 @@
    - 'forget'])}}"' /> - 看不清换一张 + 'forget'])}}"' /> + 看不清换一张
    diff --git a/application/index/view/default/user/index.html b/application/index/view/default/user/index.html index ff2a2120b9772cf291162dec5da2cd483cf19d28..9a16c7cd2ef6c01c870b841c092c0636a2d7abb4 100755 --- a/application/index/view/default/user/index.html +++ b/application/index/view/default/user/index.html @@ -43,34 +43,34 @@
    • - +

      {{$user_order_count}}

      订单总数

    • - +

      {{$user_goods_favor_count}}

      商品收藏

    • - +

      {{$user_goods_browse_count}}

      我的足迹

    • - +

      {{$user.integral}}

      我的积分

      @@ -80,7 +80,7 @@
    • - +

      {{$v.name}}

      {{if !empty($v.count)}} @@ -106,7 +106,7 @@
    • {{elseif in_array($v['status'], [100]) /}}
    • - +

      {{$v.name}}

      {{if !empty($v.count)}} @@ -127,7 +127,7 @@
      交易提醒 {{if !empty($order_list)}} - + 更多 {{/if}} @@ -138,11 +138,11 @@ {{foreach $order.items as $key=>$goods}} {{if $key eq 0}}
      - +
      - {{$goods.title}} + {{$goods.title}}
      • {{$order.add_time_time}} @@ -157,13 +157,13 @@
      {{if in_array($order['status'], [1])}} - 支付 + 支付 {{/if}} {{if in_array($order['status'], [3])}} - + {{/if}} {{if in_array($order['status'], [4]) and $order['user_is_comments'] eq 0}} - 评价 + 评价 {{/if}}
      {{/if}} @@ -187,7 +187,7 @@
      购物车 {{if !empty($cart_list)}} - + 更多 {{/if}} @@ -197,11 +197,11 @@ {{foreach $cart_list as $key=>$goods}} {{if $key lt 3}}
      - +
      - {{$goods.title}} + {{$goods.title}}
      • ¥{{$goods.price}} @@ -230,7 +230,7 @@
        商品收藏 {{if !empty($goods_favor_list)}} - + 更多 {{/if}} @@ -241,7 +241,7 @@ {{foreach $goods_favor_list as $goods}}
      • {{/foreach}} diff --git a/application/index/view/default/useraddress/save_info.html b/application/index/view/default/useraddress/save_info.html index 71a1798d14a48906bf2c296f0b16bd6f983df11f..65c18d810b4dc6f7f2dab6d561d002bd135ff89a 100755 --- a/application/index/view/default/useraddress/save_info.html +++ b/application/index/view/default/useraddress/save_info.html @@ -3,7 +3,7 @@
        -
        +
        diff --git a/application/index/view/default/userfavor/goods.html b/application/index/view/default/userfavor/goods.html index cc3522d82f8ba8a975eb554f1e74bd4c8a093125..7d44bf8e354f4f681ac8cb415042331515509e9e 100755 --- a/application/index/view/default/userfavor/goods.html +++ b/application/index/view/default/userfavor/goods.html @@ -22,7 +22,7 @@
        - +
        @@ -64,7 +64,7 @@

        ¥{{$v.price}}

        - + {{/foreach}} diff --git a/application/index/view/default/usergoodsbrowse/index.html b/application/index/view/default/usergoodsbrowse/index.html index 1ff50e76f39ff1bd681594a98dd7ae58cf82b495..0560248b5091eb777c79ea7892e4253bd5acdb2c 100755 --- a/application/index/view/default/usergoodsbrowse/index.html +++ b/application/index/view/default/usergoodsbrowse/index.html @@ -22,7 +22,7 @@
        - +
        @@ -64,7 +64,7 @@

        ¥{{$v.price}}

        - + {{/foreach}} @@ -81,7 +81,7 @@
        {{if !empty($data_list)}} - 清空 + 清空 {{$page_html|raw}} diff --git a/application/index/view/default/userintegral/index.html b/application/index/view/default/userintegral/index.html index ca40f195e0e949f333c0d34a98b44142c0360d8d..0f54124a7ec62ea376e8d324ddd6756667fad107 100755 --- a/application/index/view/default/userintegral/index.html +++ b/application/index/view/default/userintegral/index.html @@ -22,7 +22,7 @@
        - +
        @@ -52,7 +52,7 @@ - 清除条件 + 清除条件 diff --git a/application/service/AdminPowerService.php b/application/service/AdminPowerService.php old mode 100644 new mode 100755 diff --git a/application/service/AdminService.php b/application/service/AdminService.php old mode 100644 new mode 100755 diff --git a/application/service/AlipayLifeService.php b/application/service/AlipayLifeService.php deleted file mode 100755 index c9fe381ede159e7fee2f2b77970bc32a55e56689..0000000000000000000000000000000000000000 --- a/application/service/AlipayLifeService.php +++ /dev/null @@ -1,1856 +0,0 @@ - isset($params['user_id']) ? intval($params['user_id']) : 0, - 'alipay_life_user_id' => isset($params['alipay_life_user_id']) ? intval($params['alipay_life_user_id']) : 0, - 'alipay_life_ids' => empty($params['alipay_life_ids']) ? 0 : json_encode(explode(',', $params['alipay_life_ids'])), - 'msg_type' => intval($params['msg_type']), - 'send_type' => intval($params['send_type']), - 'status' => 0, - ]; - - // 开始处理业务 - $status = false; - $m = Db::name('AlipayLifeMessage'); - if(empty($params['id'])) - { - $data['add_time'] = time(); - if($m->insertGetId($data)) - { - $status = true; - $msg = '新增成功'; - } else { - $msg = '新增失败'; - } - } else { - $data['upd_time'] = time(); - if($m->where(array('id'=>intval(I('id'))))->update($data)) - { - $status = true; - $msg = '编辑成功'; - } else { - $msg = '编辑失败或数据未改变'; - } - } - - return DataReturn($msg, $status ? 0 : -100); - } - - /** - * 消息保存 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MessageContentSave($params = []) - { - // 参数校验 - $ret = self::MessageContentSaveCheck($params); - if($ret['code'] != 0) - { - return $ret; - } - - // 开始处理业务 - $data = [ - 'alipay_life_message_id' => intval($params['message_id']), - 'title' => I('title', '', null, $params), - 'content' => I('content', '', null, $params), - 'url' => isset($params['url']) ? $params['url'] : '', - 'action_name' => I('action_name', '', null, $params), - 'image_url' => isset($params['image_url']) ? $params['image_url'] : '', - 'add_time' => time(), - ]; - - // 图片 - if(isset($_FILES['file_image_url']['error'])) - { - $path = DS.'Public'.DS.'Upload'.DS.'alipay_life_message'.DS.date('Y').DS.date('m').DS.date('d').DS; - $file_obj = new \Library\FileUpload(['root_path'=>ROOT_PATH, 'path'=>$path]); - $ret = $file_obj->Save('file_image_url'); - if($ret['status'] === true) - { - $data['image_url'] = $ret['data']['url']; - - // 图片上传至支付宝 - $alipay_life_message = Db::name('AlipayLifeMessage')->find($data['alipay_life_message_id']); - if(!empty($alipay_life_message)) - { - if($alipay_life_message['send_type'] == 1 && !empty($alipay_life_message['alipay_life_ids'])) - { - $alipay_life_ids = json_decode($alipay_life_message['alipay_life_ids'], true); - $alipay_life_id = isset($alipay_life_ids[0]) ? $alipay_life_ids[0] : ''; - } else { - $alipay_life_id = Db::name('AlipayLifeUser')->where(['id'=>$alipay_life_message['alipay_life_user_id']])->value('alipay_life_id'); - } - } else { - return DataReturn('消息主数据有误', -5); - } - if(!empty($alipay_life_id)) - { - $obj = new \Library\AlipayLife(['life_data'=>Db::name('AlipayLife')->find($alipay_life_id)]); - $res = $obj->UploadImage(['file'=>ROOT_PATH.substr($data['image_url'], 1)]); - if($res['status'] != 0) - { - return DataReturn($res['msg'], -10); - } - $data['out_image_url'] = $res['data']; - } else { - return DataReturn('消息生活号id有误', -10); - } - } - } - - // 开始处理业务 - $status = false; - $m = Db::name('AlipayLifeMessageContent'); - if(empty($params['id'])) - { - $data['add_time'] = time(); - if($m->insertGetId($data)) - { - $status = true; - $msg = '新增成功'; - } else { - $msg = '新增失败'; - } - } else { - $data['upd_time'] = time(); - if($m->where(array('id'=>intval(I('id'))))->update($data)) - { - $status = true; - $msg = '编辑成功'; - } else { - $msg = '编辑失败或数据未改变'; - } - } - - return DataReturn($msg, $status ? 0 : -100); - } - - /** - * 消息添加参数校验 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MessageSaveCheck($params = []) - { - // 基础参数 - $p = [ - [ - 'checked_type' => 'in', - 'key_name' => 'msg_type', - 'checked_data' => [0,1], - 'error_msg' => '消息类型有误', - ], - [ - 'checked_type' => 'in', - 'key_name' => 'send_type', - 'checked_data' => [0,1], - 'error_msg' => '发送类型有误', - ], - ]; - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - - // 发送类型 - $p = []; - if($params['send_type'] == 0) - { - $p[] = [ - 'checked_type' => 'empty', - 'key_name' => 'user_id', - 'error_msg' => '指定用户id有误', - ]; - $p[] = [ - 'checked_type' => 'empty', - 'key_name' => 'alipay_life_user_id', - 'error_msg' => '指定用户生活号关联id有误', - ]; - $p[] = [ - 'checked_type' => 'empty', - 'key_name' => 'alipay_life_ids', - 'error_msg' => '指定用户生活号id有误', - ]; - } - - // 验证 - if(!empty($p)) - { - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - } - - return DataReturn('验证成功', 0); - } - - /** - * 消息内容添加参数校验 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MessageContentSaveCheck($params = []) - { - // 基础参数 - $p = [ - [ - 'checked_type' => 'empty', - 'key_name' => 'message_id', - 'error_msg' => '消息id有误', - ], - [ - 'checked_type' => 'empty', - 'key_name' => 'content', - 'error_msg' => '消息内容有误', - ], - ]; - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - - // 主数据 - $message = Db::name('AlipayLifeMessage')->find($params['message_id']); - if(empty($message)) - { - return DataReturn('消息数据不存在', -1); - } - - // 图文 - $p = []; - if($message['msg_type'] == 1) - { - // 图片 - if(empty($_FILES['file_image_url']) && empty($params['image_url'])) - { - return DataReturn('请上传封面图片', -1); - } - - $p[] = [ - 'checked_type' => 'empty', - 'key_name' => 'url', - 'error_msg' => '图文url跳转地址有误', - ]; - $p[] = [ - 'checked_type' => 'isset', - 'key_name' => 'action_name', - 'error_msg' => '链接文字有误', - ]; - } - - // 验证 - if(!empty($p)) - { - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - } - - return DataReturn('验证成功', 0); - } - - /** - * 根据appid获取一条生活号 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-08-29 - * @desc description - * @param [array] $params [输入参数] - */ - public static function AppidLifeRow($params = []) - { - if(!empty($params['appid'])) - { - return Db::name('AlipayLife')->where(['appid'=>$params['appid']])->find(); - } - return null; - } - - /** - * 用户取消关注生活号 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-08-29 - * @desc description - * @param [array] $params [输入参数] - * @return [boolean] [成功true, 失败false] - */ - public static function UserUnfollow($params = []) - { - if(!empty($params['alipay_openid'])) - { - $life = self::AppidLifeRow($params); - $user = Db::name('User')->where(['alipay_openid'=>$params['alipay_openid']])->find(); - if(!empty($life) && !empty($user)) - { - return Db::name('AlipayLifeUser')->where(['user_id'=>$user['id'], 'alipay_life_id'=>$life['id']])->delete() !== false; - } - } - return false; - } - - /** - * 用户关注/进入生活号 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-08-29 - * @desc description - * @param [array] $params [输入参数] - * @return [boolean] [成功true, 失败false] - */ - public static function UserEnter($params = []) - { - $life = self::AppidLifeRow($params); - if(!empty($params['alipay_openid']) && !empty($life)) - { - $user = Db::name('User')->where(['alipay_openid'=>$params['alipay_openid']])->find(); - if(empty($user)) - { - $data = [ - 'alipay_openid' => $params['alipay_openid'], - 'nickname' => isset($params['user_name']) ? $params['user_name'] : '', - 'add_time' => time(), - ]; - $user_id = Db::name('User')->insertGetId($data); - } else { - $user_id = $user['id']; - } - if(!empty($user_id)) - { - $life_user_data = [ - 'user_id' => $user_id, - 'alipay_life_id'=> $life['id'], - ]; - $life_user = Db::name('AlipayLifeUser')->where($life_user_data)->find(); - if(empty($life_user)) - { - $life_user_data['add_time'] = time(); - return Db::name('AlipayLifeUser')->insertGetId($life_user_data) > 0; - } else { - return Db::name('AlipayLifeUser')->where($life_user_data)->update(['enter_count'=>$life_user['enter_count']+1, 'upd_time'=>time()]) !== false; - } - } - } - return false; - } - - /** - * 消息发送 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MessageSubmit($params = []) - { - // 基础参数 - $p = [ - [ - 'checked_type' => 'empty', - 'key_name' => 'id', - 'error_msg' => '消息id有误', - ], - ]; - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - - // 获取数据 - $m = Db::name('AlipayLifeMessage'); - $data = $m->find(intval($params['id'])); - if(empty($data)) - { - return DataReturn('消息记录不存在', -1); - } - $common_send_status_list = lang('common_send_status_list'); - if(!in_array($data['status'], [0,4])) - { - return DataReturn('状态不可操作['.$common_send_status_list[$data['status']]['name'].']', -2); - } - - // 获取数据内容 - $content_count = (int) Db::name('AlipayLifeMessageContent')->where(['alipay_life_message_id'=>$data['id']])->count(); - if(empty($content_count)) - { - return DataReturn('消息内容不能为空', -1); - } - - switch($data['send_type']) - { - case 0 : - if($content_count > 1) - { - return DataReturn('消息内容不存在', -1); - } - break; - - case 1 : - if($content_count > 10) - { - return DataReturn('群发消息不能超过10条内容', -1); - } - break; - } - - // 发送类型 - $detail = []; - if($data['send_type'] == 1) - { - $alipay_life_all = json_decode($data['alipay_life_ids'], true); - foreach($alipay_life_all as $alipay_life_id) - { - $detail[] = [ - 'alipay_life_id' => $alipay_life_id, - 'alipay_life_message_id'=> $data['id'], - ]; - } - } else { - $alipay_openid = Db::name('User')->where(['id'=>$data['user_id']])->value('alipay_openid'); - if(!empty($alipay_openid)) - { - $detail[] = [ - 'user_id' => $data['user_id'], - 'alipay_life_id' => Db::name('AlipayLifeUser')->where(['id'=>$data['alipay_life_user_id']])->value('alipay_life_id'), - 'alipay_life_user_id' => $data['alipay_life_user_id'], - 'alipay_openid' => $alipay_openid, - 'alipay_life_message_id'=> $data['id'], - ]; - } - - } - - // 入库详情表 - $m->startTrans(); - if(Db::name('AlipayLifeMessageDetail')->addAll($detail) !== false) - { - if($m->where(['id'=>$data['id']])->update(['status'=>1, 'startup_time'=>time(), 'upd_time'=>time()]) !== false) - { - $m->commit(); - self::SyncJobSend($data['id'], 'message_id', 'MessageSend'); - return DataReturn('提交成功', 0); - } - } - $m->rollback(); - return DataReturn('提交失败', -100); - } - - /** - * 消息异步发送触发 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [int] $value_id [id值] - * @param [string] $field_name [字段名称] - * @param [string] $action [方法] - */ - public static function SyncJobSend($value_id, $field_name, $action) - { - SyncJob(ApiUrl('AlipayLife', $action, [$field_name=>$value_id])); - } - - /** - * 消息发送 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MessageSend($params = []) - { - if(empty($params['message_id'])) - { - die('[params_time:'.date('Y-m-d H:i:s')."][msg:id有误]\n\n"); - } - - // 启动开始 - echo '[start_time:'.date('Y-m-d H:i:s')."]\n"; - echo '[data:'.$params['message_id']."]\n"; - - // 开始处理 - $m = Db::name('AlipayLifeMessage'); - $data = $m->find($params['message_id']); - if(empty($data)) - { - die('[time:'.date('Y-m-d H:i:s')."][msg:{$params['message_id']}数据不存在]\n\n"); - } - if(!in_array($data['status'], [1])) - { - die('[time:'.date('Y-m-d H:i:s')."][msg:{$data['status']}状态不可操作]\n\n"); - } - - // 发送消息类型 - if($data['send_type'] == 1) - { - $alipay_life_all = json_decode($data['alipay_life_ids'], true); - } else { - $alipay_life_all = [Db::name('AlipayLifeUser')->where(['id'=>$data['alipay_life_user_id']])->value('alipay_life_id')]; - } - - // 消息内容 - $data['content'] = Db::name('AlipayLifeMessageContent')->field('id,title,content,out_image_url,url,action_name')->where(['alipay_life_message_id'=>$data['id']])->select(); - if(empty($data['content'])) - { - die('[time:'.date('Y-m-d H:i:s')."][msg:{$data['id']}消息内容为空]\n\n"); - } - - // 获取消息详情 - $detail_m = Db::name('AlipayLifeMessageDetail'); - $detail = $detail_m->where(['alipay_life_message_id'=>$data['id'], 'status'=>0])->limit(30)->select(); - if(!empty($detail)) - { - foreach($detail as $v) - { - // 生活号 - $life = Db::name('AlipayLife')->find($v['alipay_life_id']); - $obj = new \Library\AlipayLife(['life_data'=>$life]); - - // 群发 - if($data['send_type'] == 1) - { - // 请求接口处理 - $ret = $obj->GroupSend($data); - } else { - // 请求接口处理 - $data['alipay_openid'] = $v['alipay_openid']; - $ret = $obj->CustomSend($data); - } - - // 返回状态更新 - $status = (isset($ret['status']) && $ret['status'] == 0) ? 2 : 4; - $detail_m->where(['id'=>$v['id']])->update(['status'=>$status, 'send_time'=>time(), 'upd_time'=>time(), 'return_msg'=>$ret['msg']]); - } - echo '[count:'.count($detail).']'; - } else { - $status_all = $detail_m->where(['alipay_life_message_id'=>$data['id']])->group('status')->column('status'); - if(count($status_all) <= 1) - { - $status = in_array(2, $status_all) ? 2 : 4; - } else { - $status = 3; - } - $m->where(['id'=>$data['id']])->update(['success_time'=>time(), 'status'=>$status, 'upd_time'=>time()]); - echo '[success_time:'.date('Y-m-d H:i:s')."]\n"; - echo '[data:'.$params['message_id']."]\n\n"; - } - - // 继续运行脚本 - self::SyncJobSend($data['id'], 'message_id', 'MessageSend'); - - // end - die('[end_time:'.date('Y-m-d H:i:s')."][msg:处理结束]\n\n"); - } - - /** - * 生活号搜索 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-29 - * @desc description - * @param [array] $params [输入参数] - */ - public static function AlipayLifeSearch($params = []) - { - if(isset($params['is_all']) && $params['is_all'] == 1) - { - $where = []; - } else { - $where = ['l.is_shelves'=>1]; - } - - // 分类 - if(!empty($params['category_id'])) - { - $where['lc.alipay_life_category_id'] = intval($params['category_id']); - } - - // 关键字 - if(!empty($params['keywords'])) - { - $where['l.name'] = ['like', '%'.I('keywords', '', '', $params).'%']; - } - - // 查询数据 - $data = Db::name('AlipayLife')->alias('l')->join(' INNER JOIN __ALIPAY_LIFE_CATEGORY_JOIN__ AS lc ON l.id=lc.alipay_life_id')->field('l.id,l.name')->group('l.id')->where($where)->select(); - - if(empty($data)) - { - return DataReturn('没有相关数据', -100); - } else { - return DataReturn('操作成功', 0, $data); - } - } - - /** - * 消息详情列表 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-30 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MessageDetailList($params = []) - { - // 基础参数 - if(empty($params['message_id'])) - { - return []; - } - - // 条件 - $where = ['alipay_life_message_id' => intval($params['message_id'])]; - - // 列表 - $data = Db::name('AlipayLifeMessageDetail')->where($where)->order('id desc')->select(); - if(!empty($data)) - { - $common_send_status_list = lang('common_send_status_list'); - foreach($data as &$v) - { - // 状态 - $v['status_name'] = $common_send_status_list[$v['status']]['name']; - - // 生活号 - $v['alipay_life_name'] = empty($v['alipay_life_id']) ? '' : Db::name('AlipayLife')->where(['id'=>$v['alipay_life_id']])->value('name'); - - // 用户 - $v['alipay_openid'] = empty($v['user_id']) ? '' : Db::name('User')->where(['id'=>$v['user_id']])->value('alipay_openid'); - - // 时间 - $v['add_time'] = date('Y-m-d H:i:s', $v['add_time']); - $v['upd_time'] = empty($v['upd_time']) ? '' : date('Y-m-d H:i:s', $v['upd_time']); - $v['send_time'] = empty($v['send_time']) ? '' : date('Y-m-d H:i:s', $v['send_time']); - } - } - return $data; - } - - /** - * 生活号状态操作 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-30 - * @desc 上架/下架操作 - * @param [array] $params [输入参数] - */ - public static function LifeStatus($params = []) - { - // 基础参数 - $p = [ - [ - 'checked_type' => 'empty', - 'key_name' => 'alipay_life_id', - 'error_msg' => '生活号id有误', - ], - [ - 'checked_type' => 'in', - 'key_name' => 'status', - 'checked_data' => [0,1], - 'error_msg' => '状态有误', - ], - ]; - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - - // 数据更新 - Db::startTrans(); - if(Db::name('AlipayLife')->where(['id'=>$params['alipay_life_id']])->update(['is_shelves'=>$params['status'], 'upd_time'=>time()])) - { - $obj = new \base\AlipayLife(['life_data'=>Db::name('AlipayLife')->find($params['alipay_life_id'])]); - if($params['status'] == 1) - { - $ret = $obj->LifeAboard(); - } else { - $ret = $obj->LifeDebark(); - } - if($ret['status'] == 0) - { - Db::commit(); - return DataReturn('编辑成功', 0); - } else { - Db::rollback(); - return DataReturn($ret['msg'], -100); - } - } - - Db::rollback(); - return DataReturn('编辑失败或数据未改变', -100); - } - - /** - * 菜单保存 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MenuSave($params = []) - { - // 参数校验 - $p = [ - [ - 'checked_type' => 'empty', - 'key_name' => 'name', - 'error_msg' => '名称不能为空', - ], - [ - 'checked_type' => 'length', - 'key_name' => 'name', - 'checked_data' => '30', - 'error_msg' => '名称最多30个字符', - ], - [ - 'checked_type' => 'isset', - 'key_name' => 'type', - 'error_msg' => '请选择菜单类型', - ], - [ - 'checked_type' => 'empty', - 'key_name' => 'alipay_life_ids', - 'error_msg' => '请选择生活号', - ], - ]; - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - - // 数据项 - $data = [ - 'name' => I('name', '', '', $params), - 'type' => intval(I('type', 0, '', $params)), - 'alipay_life_ids' => empty($params['alipay_life_ids']) ? 0 : json_encode(explode(',', $params['alipay_life_ids'])), - ]; - - // 开始处理业务 - $status = false; - $m = Db::name('AlipayLifeMenu'); - if(empty($params['id'])) - { - $data['add_time'] = time(); - if($m->insertGetId($data)) - { - $status = true; - $msg = '新增成功'; - } else { - $msg = '新增失败'; - } - } else { - $data['upd_time'] = time(); - if($m->where(array('id'=>intval(I('id'))))->update($data)) - { - $status = true; - $msg = '编辑成功'; - } else { - $msg = '编辑失败或数据未改变'; - } - } - - return DataReturn($msg, $status ? 0 : -100); - } - - /** - * 菜单内容保存 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MenuContentSave($params = []) - { - // 参数校验 - $ret = self::MenuContentSaveCheck($params); - if($ret['code'] != 0) - { - return $ret; - } - - // 开始处理业务 - $data = [ - 'alipay_life_menu_id' => intval($params['menu_id']), - 'pid' => intval(I('pid', 0, null, $params)), - 'name' => I('name', '', null, $params), - 'action_type' => intval(I('action_type', 0, null, $params)), - 'action_value' => I('action_value', '', null, $params), - 'icon' => isset($params['icon']) ? $params['icon'] : '', - 'sort' => intval(I('sort', 0)), - 'add_time' => time(), - ]; - - // 图片 - if(isset($_FILES['file_icon']['error'])) - { - $path = DS.'Public'.DS.'Upload'.DS.'alipay_life_menu'.DS.date('Y').DS.date('m').DS.date('d').DS; - $file_obj = new \Library\FileUpload(['root_path'=>ROOT_PATH, 'path'=>$path]); - $ret = $file_obj->Save('file_icon'); - if($ret['status'] === true) - { - $data['icon'] = $ret['data']['url']; - - // 图片上传至支付宝 - $alipay_life_menu = Db::name('AlipayLifeMenu')->find($data['alipay_life_menu_id']); - if(!empty($alipay_life_menu)) - { - if(!empty($alipay_life_menu['alipay_life_ids'])) - { - $alipay_life_ids = json_decode($alipay_life_menu['alipay_life_ids'], true); - $alipay_life_id = isset($alipay_life_ids[0]) ? $alipay_life_ids[0] : ''; - - $obj = new \Library\AlipayLife(['life_data'=>Db::name('AlipayLife')->find($alipay_life_id)]); - $res = $obj->UploadImage(['file'=>ROOT_PATH.substr($data['icon'], 1)]); - if($res['status'] != 0) - { - return DataReturn($res['msg'], -10); - } - $data['out_icon'] = $res['data']; - } else { - return DataReturn('菜单生活号id有误', -10); - } - } else { - return DataReturn('菜单主数据有误', -5); - } - } - } - - // 开始处理业务 - $status = false; - $m = Db::name('AlipayLifeMenuContent'); - if(empty($params['id'])) - { - $data['add_time'] = time(); - if($m->insertGetId($data)) - { - $status = true; - $msg = '新增成功'; - } else { - $msg = '新增失败'; - } - } else { - $data['upd_time'] = time(); - if($m->where(array('id'=>intval(I('id'))))->update($data)) - { - $status = true; - $msg = '编辑成功'; - } else { - $msg = '编辑失败或数据未改变'; - } - } - - return DataReturn($msg, $status ? 0 : -100); - } - - /** - * 菜单内容参数校验 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MenuContentSaveCheck($params = []) - { - // 基础参数 - $p = [ - [ - 'checked_type' => 'empty', - 'key_name' => 'menu_id', - 'error_msg' => '菜单id有误', - ], - [ - 'checked_type' => 'empty', - 'key_name' => 'name', - 'error_msg' => '名称不能为空', - ], - [ - 'checked_type' => 'length', - 'key_name' => 'name', - 'checked_data' => '5', - 'error_msg' => '名称最多5个字符', - ], - [ - 'checked_type' => 'isset', - 'key_name' => 'action_type', - 'error_msg' => '请选择事件类型', - ], - ]; - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - - // 主数据 - $menu = Db::name('AlipayLifeMenu')->find($params['menu_id']); - if(empty($menu)) - { - return DataReturn('消息数据不存在', -1); - } - - // 图标 - if($menu['type'] == 1) - { - // 图片 - if(empty($_FILES['file_icon']) && empty($params['icon'])) - { - return DataReturn('请上传图标', -1); - } - } - - // 事件值 - $p = []; - if($params['action_type'] < 1) - { - $p[] = [ - 'checked_type' => 'empty', - 'key_name' => 'action_value', - 'error_msg' => '事件值不能为空', - ]; - } - - // 验证 - if(!empty($p)) - { - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - } - - return DataReturn('验证成功', 0); - } - - /** - * 菜单发布提交 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MenuSubmit($params = []) - { - // 基础参数 - $p = [ - [ - 'checked_type' => 'empty', - 'key_name' => 'id', - 'error_msg' => '菜单id有误', - ], - ]; - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - - // 获取数据 - $m = Db::name('AlipayLifeMenu'); - $data = $m->find(intval($params['id'])); - if(empty($data)) - { - return DataReturn('菜单记录不存在', -1); - } - $common_release_status_list = lang('common_release_status_list'); - if(!in_array($data['status'], [0,4])) - { - return DataReturn('状态不可操作['.$common_release_status_list[$data['status']]['name'].']', -2); - } - - // 获取数据内容 - $content_list = Db::name('AlipayLifeMenuContent')->field('id,name')->where(['alipay_life_menu_id'=>$data['id'], 'pid'=>0])->select(); - if(empty($content_list)) - { - return DataReturn('菜单数据不能为空', -1); - } - - $content_count = count($content_list); - switch($data['type']) - { - case 0 : - if($content_count > 4) - { - return DataReturn('文字菜单最多4个', -1); - } - - // 子集校验 - foreach($content_list as $v) - { - $temp_count = Db::name('AlipayLifeMenuContent')->where(['pid'=>$v['id']])->count(); - if($temp_count > 5) - { - return DataReturn('['.$v['name'].']二级菜单不能超过5个', -1); - } - } - break; - - case 1 : - if($content_count > 8) - { - return DataReturn('图标菜单最多8个', -1); - } - break; - } - - // 生活号 - $detail = []; - $alipay_life_all = json_decode($data['alipay_life_ids'], true); - foreach($alipay_life_all as $alipay_life_id) - { - $detail[] = [ - 'alipay_life_id' => $alipay_life_id, - 'alipay_life_menu_id' => $data['id'], - 'add_time' => time(), - ]; - } - - // 入库详情表 - $m->startTrans(); - if(Db::name('AlipayLifeMenuDetail')->addAll($detail) !== false) - { - $upd_data = [ - 'status' => 1, - 'startup_time' => time(), - 'upd_time' => time() - ]; - $status = Db::name('AlipayLifeMenu')->where(['id'=>$data['id']])->update($upd_data); - if($status !== false) - { - $m->commit(); - self::SyncJobSend($data['id'], 'menu_id', 'MenuRelease'); - return DataReturn('提交成功', 0); - } - } - $m->rollback(); - return DataReturn('提交失败', -100); - } - - /** - * 菜单发布 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MenuRelease($params = []) - { - if(empty($params['menu_id'])) - { - die('[params_time:'.date('Y-m-d H:i:s')."][msg:id有误]\n\n"); - } - - // 启动开始 - echo '[start_time:'.date('Y-m-d H:i:s')."]\n"; - echo '[data:'.$params['menu_id']."]\n"; - - // 开始处理 - $m = Db::name('AlipayLifeMenu'); - $data = $m->find($params['menu_id']); - if(empty($data)) - { - die('[time:'.date('Y-m-d H:i:s')."][msg:{$params['menu_id']}数据不存在]\n\n"); - } - if(!in_array($data['status'], [1])) - { - die('[time:'.date('Y-m-d H:i:s')."][msg:{$data['status']}状态不可操作]\n\n"); - } - - // 消息内容 - $field = 'id,pid,name,action_type,action_value,out_icon'; - $data['content'] = Db::name('AlipayLifeMenuContent')->field($field)->where(['alipay_life_menu_id'=>$data['id'], 'pid'=>0])->order('sort asc')->select(); - if(empty($data['content'])) - { - die('[time:'.date('Y-m-d H:i:s')."][msg:{$data['id']}菜单内容为空]\n\n"); - } - - // 是否文本类型 - $action_type_list = lang('common_alipay_life_menu_action_type_list'); - foreach($data['content'] as &$v) - { - // 外部事件值 - $v['action_type'] = $action_type_list[$v['action_type']]['out_value']; - - // 是否需要读取子集 - if($data['type'] == 0) - { - $items = Db::name('AlipayLifeMenuContent')->field($field)->where(['pid'=>$v['id']])->order('sort asc')->select(); - if(!empty($items)) - { - foreach($items as &$vs) - { - // 外部事件值 - $vs['action_type'] = $action_type_list[$vs['action_type']]['out_value']; - } - } - $v['items'] = $items; - } - } - - // 生活号循环处理 - $detail_m = Db::name('AlipayLifeMenuDetail'); - $detail = $detail_m->where(['alipay_life_menu_id'=>$data['id'], 'status'=>0])->limit(10)->select(); - if(!empty($detail)) - { - foreach($detail as $d) - { - // 生活号 - $life = Db::name('AlipayLife')->find($d['alipay_life_id']); - - // 请求接口处理 - $obj = new \Library\AlipayLife(['life_data'=>$life]); - $ret = $obj->MenuRelease($data); - - // 返回状态更新 - $status = (isset($ret['status']) && $ret['status'] == 0) ? 2 : 4; - $detail_m->where(['id'=>$d['id']])->update(['status'=>$status, 'send_time'=>time(), 'upd_time'=>time(), 'return_msg'=>$ret['msg']]); - } - } else { - $status_all = $detail_m->where(['alipay_life_menu_id'=>$data['id']])->group('status')->column('status'); - if(count($status_all) <= 1) - { - $status = in_array(2, $status_all) ? 2 : 4; - } else { - $status = 3; - } - $m->where(['id'=>$data['id']])->update(['success_time'=>time(), 'status'=>$status, 'upd_time'=>time()]); - echo '[success_time:'.date('Y-m-d H:i:s')."]\n"; - echo '[data:'.$params['menu_id']."]\n\n"; - } - - // 继续运行脚本 - self::SyncJobSend($data['id'], 'menu_id', 'MenuRelease'); - - // end - die('[end_time:'.date('Y-m-d H:i:s')."][msg:处理结束]\n\n"); - } - - /** - * 菜单详情列表 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-30 - * @desc description - * @param [array] $params [输入参数] - */ - public static function MenuDetailList($params = []) - { - // 基础参数 - if(empty($params['menu_id'])) - { - return []; - } - - // 条件 - $where = ['alipay_life_menu_id' => intval($params['menu_id'])]; - - // 列表 - $data = Db::name('AlipayLifeMenuDetail')->where($where)->order('id desc')->select(); - if(!empty($data)) - { - $common_release_status_list = lang('common_release_status_list'); - foreach($data as &$v) - { - // 状态 - $v['status_name'] = $common_release_status_list[$v['status']]['name']; - - // 生活号 - $v['alipay_life_name'] = empty($v['alipay_life_id']) ? '' : Db::name('AlipayLife')->where(['id'=>$v['alipay_life_id']])->value('name'); - - // 时间 - $v['add_time'] = date('Y-m-d H:i:s', $v['add_time']); - $v['upd_time'] = empty($v['upd_time']) ? '' : date('Y-m-d H:i:s', $v['upd_time']); - $v['send_time'] = empty($v['send_time']) ? '' : date('Y-m-d H:i:s', $v['send_time']); - } - } - return $data; - } - - /** - * 批量上下架保存 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function LifeStatusSave($params = []) - { - // 参数校验 - $p = [ - [ - 'checked_type' => 'empty', - 'key_name' => 'name', - 'error_msg' => '名称不能为空', - ], - [ - 'checked_type' => 'length', - 'key_name' => 'name', - 'checked_data' => '30', - 'error_msg' => '名称最多30个字符', - ], - [ - 'checked_type' => 'in', - 'key_name' => 'is_shelves', - 'checked_data' => [0,1], - 'error_msg' => '上下架状态选择有误', - ], - [ - 'checked_type' => 'empty', - 'key_name' => 'alipay_life_ids', - 'error_msg' => '请选择生活号', - ], - ]; - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - - // 数据项 - $data = [ - 'name' => I('name', '', '', $params), - 'is_shelves' => intval($params['is_shelves']), - 'alipay_life_ids' => empty($params['alipay_life_ids']) ? 0 : json_encode(explode(',', $params['alipay_life_ids'])), - ]; - - // 开始处理业务 - $status = false; - $m = Db::name('AlipayLifeStatus'); - if(empty($params['id'])) - { - $data['add_time'] = time(); - if($m->insertGetId($data)) - { - $status = true; - $msg = '新增成功'; - } else { - $msg = '新增失败'; - } - } else { - $data['upd_time'] = time(); - if($m->where(array('id'=>intval(I('id'))))->update($data)) - { - $status = true; - $msg = '编辑成功'; - } else { - $msg = '编辑失败或数据未改变'; - } - } - - return DataReturn($msg, $status ? 0 : -100); - } - - /** - * 批量上下架提交 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function LifeStatusSubmit($params = []) - { - // 基础参数 - $p = [ - [ - 'checked_type' => 'empty', - 'key_name' => 'id', - 'error_msg' => '菜单id有误', - ], - ]; - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - - // 获取数据 - $m = Db::name('AlipayLifeStatus'); - $data = $m->find(intval($params['id'])); - if(empty($data)) - { - return DataReturn('数据不存在', -1); - } - $common_handle_status_list = lang('common_handle_status_list'); - if(!in_array($data['status'], [0,4])) - { - return DataReturn('状态不可操作['.$common_handle_status_list[$data['status']]['name'].']', -2); - } - - // 生活号 - $detail = []; - $alipay_life_all = json_decode($data['alipay_life_ids'], true); - foreach($alipay_life_all as $alipay_life_id) - { - $detail[] = [ - 'alipay_life_id' => $alipay_life_id, - 'alipay_life_status_id' => $data['id'], - 'add_time' => time(), - ]; - } - - // 入库详情表 - $m->startTrans(); - if(Db::name('AlipayLifeStatusDetail')->addAll($detail) !== false) - { - $upd_data = [ - 'status' => 1, - 'startup_time' => time(), - 'upd_time' => time() - ]; - $status = $m->where(['id'=>$data['id']])->update($upd_data); - if($status !== false) - { - $m->commit(); - self::SyncJobSend($data['id'], 'status_id', 'StatusHandle'); - return DataReturn('提交成功', 0); - } - } - $m->rollback(); - return DataReturn('提交失败', -100); - } - - /** - * 批量上下架处理 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-24 - * @desc description - * @param [array] $params [输入参数] - */ - public static function StatusHandle($params = []) - { - if(empty($params['status_id'])) - { - die('[params_time:'.date('Y-m-d H:i:s')."][msg:id有误]\n\n"); - } - - // 启动开始 - echo '[start_time:'.date('Y-m-d H:i:s')."]\n"; - echo '[menu:'.$params['status_id']."]\n"; - - // 开始处理 - $m = Db::name('AlipayLifeStatus'); - $data = $m->find($params['status_id']); - if(empty($data)) - { - die('[time:'.date('Y-m-d H:i:s')."][msg:{$params['status_id']}数据不存在]\n\n"); - } - if(!in_array($data['status'], [1])) - { - die('[time:'.date('Y-m-d H:i:s')."][msg:{$data['status']}状态不可操作]\n\n"); - } - - // 生活号循环处理 - $detail_m = Db::name('AlipayLifeStatusDetail'); - $detail = $detail_m->where(['alipay_life_status_id'=>$data['id'], 'status'=>0])->limit(10)->select(); - $life_m = Db::name('AlipayLife'); - if(!empty($detail)) - { - foreach($detail as $v) - { - // 数据更新 - $status = 4; - $msg = ''; - $life_m->startTrans(); - if($life_m->where(array('id'=>$v['alipay_life_id']))->update(array('is_shelves'=>$data['is_shelves'], 'upd_time'=>time()))) - { - $obj = new \Library\AlipayLife(['life_data'=>$life_m->find($v['alipay_life_id'])]); - if($data['is_shelves'] == 1) - { - $ret = $obj->LifeAboard(); - } else { - $ret = $obj->LifeDebark(); - } - if($ret['status'] == 0) - { - $life_m->commit(); - $status = 2; - } else { - $life_m->rollback(); - } - $msg = $ret['msg']; - } else { - $life_m->rollback(); - $msg = '主数据更新失败'; - } - $detail_m->where(['id'=>$v['id']])->update(['status'=>$status, 'send_time'=>time(), 'upd_time'=>time(), 'return_msg'=>$msg]); - } - } else { - $status_all = $detail_m->where(['alipay_life_status_id'=>$data['id']])->group('status')->column('status'); - if(count($status_all) <= 1) - { - $status = in_array(2, $status_all) ? 2 : 4; - } else { - $status = 3; - } - $m->where(['id'=>$data['id']])->update(['success_time'=>time(), 'status'=>$status, 'upd_time'=>time()]); - echo '[success_time:'.date('Y-m-d H:i:s')."]\n"; - echo '[data:'.$params['status_id']."]\n\n"; - } - - // 继续运行脚本 - self::SyncJobSend($data['id'], 'status_id', 'StatusHandle'); - - // end - die('[end_time:'.date('Y-m-d H:i:s')."][msg:处理结束]\n\n"); - } - - /** - * 批量上下架详情列表 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-10-30 - * @desc description - * @param [array] $params [输入参数] - */ - public static function StatusDetailList($params = []) - { - // 基础参数 - if(empty($params['status_id'])) - { - return []; - } - - // 条件 - $where = ['alipay_life_status_id' => intval($params['status_id'])]; - - // 列表 - $data = Db::name('AlipayLifeStatusDetail')->where($where)->order('id desc')->select(); - if(!empty($data)) - { - $common_handle_status_list = lang('common_handle_status_list'); - foreach($data as &$v) - { - // 状态 - $v['status_name'] = $common_handle_status_list[$v['status']]['name']; - - // 生活号 - $v['alipay_life_name'] = empty($v['alipay_life_id']) ? '' : Db::name('AlipayLife')->where(['id'=>$v['alipay_life_id']])->value('name'); - - // 时间 - $v['add_time'] = date('Y-m-d H:i:s', $v['add_time']); - $v['upd_time'] = empty($v['upd_time']) ? '' : date('Y-m-d H:i:s', $v['upd_time']); - $v['send_time'] = empty($v['send_time']) ? '' : date('Y-m-d H:i:s', $v['send_time']); - } - } - return $data; - } - - /** - * 生活号列表 - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-06T21:31:53+0800 - * @param [array] $params [输入参数] - */ - public static function AlipayLifeList($params = []) - { - $where = empty($params['where']) ? [] : $params['where']; - $field = empty($params['field']) ? 'a.*' : $params['field']; - $order_by = empty($params['order_by']) ? 'a.id desc' : trim($params['order_by']); - - $m = isset($params['m']) ? intval($params['m']) : 0; - $n = isset($params['n']) ? intval($params['n']) : 10; - - // 获取品牌列表 - $data = Db::name('AlipayLife')->alias('a')->field($field)->join(['__ALIPAY_LIFE_CATEGORY_JOIN__'=>'cj'], 'a.id=cj.alipay_life_id')->where($where)->limit($m, $n)->order($order_by)->group('a.id')->select(); - if(!empty($data)) - { - $common_is_enable_tips = lang('common_is_enable_tips'); - $images_host = config('images_host'); - foreach($data as &$v) - { - // 是否启用 - if(isset($v['is_enable'])) - { - $v['is_enable_text'] = $common_is_enable_tips[$v['is_enable']]['name']; - } - - // 分类名称 - $category_ids = Db::name('AlipayLifeCategoryJoin')->where(['alipay_life_id'=>$v['id']])->column('alipay_life_category_id'); - $v['alipay_life_category_text'] = Db::name('AlipayLifeCategory')->where(['id'=>$category_ids])->column('name'); - - // logo - if(isset($v['logo'])) - { - $v['logo_old'] = $v['logo']; - $v['logo'] = empty($v['logo']) ? '' : $images_host.$v['logo']; - } - - // 时间 - if(isset($v['add_time'])) - { - $v['add_time_time'] = date('Y-m-d H:i:s', $v['add_time']); - $v['add_time_date'] = date('Y-m-d', $v['add_time']); - } - if(isset($v['upd_time'])) - { - $v['upd_time_time'] = date('Y-m-d H:i:s', $v['upd_time']); - $v['upd_time_date'] = date('Y-m-d', $v['upd_time']); - } - } - } - return DataReturn('处理成功', 0, $data); - } - - /** - * 生活号总数 - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-10T22:16:29+0800 - * @param [array] $where [条件] - */ - public static function AlipayLifeTotal($where) - { - return (int) Db::name('AlipayLife')->alias('a')->join(['__ALIPAY_LIFE_CATEGORY_JOIN__'=>'cj'], 'a.id=cj.alipay_life_id')->where($where)->count(); - } - - /** - * 生活号列表条件 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-09-29 - * @desc description - * @param [array] $params [输入参数] - */ - public static function AlipayLifeListWhere($params = []) - { - $where = []; - - if(!empty($params['keywords'])) - { - $where[] = ['a.name', 'like', '%'.$params['keywords'].'%']; - } - - // 是否更多条件 - if(isset($params['is_more']) && $params['is_more'] == 1) - { - // 等值 - if(isset($params['is_shelves']) && $params['is_shelves'] > -1) - { - $where[] = ['a.is_shelves', '=', intval($params['is_shelves'])]; - } - if(isset($params['alipay_life_category_id']) && $params['alipay_life_category_id'] > -1) - { - $where[] = ['cj.alipay_life_category_id', '=', intval($params['alipay_life_category_id'])]; - } - - if(!empty($params['time_start'])) - { - $where[] = ['a.add_time', '>', strtotime($params['time_start'])]; - } - if(!empty($params['time_end'])) - { - $where[] = ['a.add_time', '<', strtotime($params['time_end'])]; - } - } - - return $where; - } - - /** - * 生活号保存 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-12-18 - * @desc description - * @param [array] $params [输入参数] - */ - public static function AlipayLifeSave($params = []) - { - // 请求类型 - $p = [ - [ - 'checked_type' => 'length', - 'key_name' => 'name', - 'checked_data' => '2,30', - 'error_msg' => '名称格式 2~30 个字符', - ], - [ - 'checked_type' => 'empty', - 'key_name' => 'alipay_life_category_id', - 'error_msg' => '请选择生活号分类', - ], - [ - 'checked_type' => 'length', - 'key_name' => 'appid', - 'checked_data' => '1,60', - 'error_msg' => 'appid格式 1~60 个字符', - ], - [ - 'checked_type' => 'length', - 'key_name' => 'out_rsa_public', - 'checked_data' => '1,2000', - 'error_msg' => '应用公钥格式 1~2000 个字符', - ], - [ - 'checked_type' => 'length', - 'key_name' => 'rsa_private', - 'checked_data' => '1,2000', - 'error_msg' => '应用私钥格式 1~2000 个字符', - ], - [ - 'checked_type' => 'length', - 'key_name' => 'out_rsa_public', - 'checked_data' => '1,2000', - 'error_msg' => '支付宝公钥格式 1~2000 个字符', - ], - ]; - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - - // 附件 - $data_fields = ['logo']; - $attachment = ResourcesService::AttachmentParams($params, $data_fields); - - // 数据 - $data = [ - 'name' => $params['name'], - 'appid' => $params['appid'], - 'logo' => $attachment['data']['logo'], - 'rsa_public' => empty($params['rsa_public']) ? '' : $params['rsa_public'], - 'rsa_private' => empty($params['rsa_private']) ? '' : $params['rsa_private'], - 'out_rsa_public' => empty($params['out_rsa_public']) ? '' : $params['out_rsa_public'], - ]; - - // 开启事务 - Db::startTrans(); - if(empty($params['id'])) - { - $data['add_time'] = time(); - $alipay_life_id = Db::name('AlipayLife')->insertGetId($data); - if($alipay_life_id > 0) - { - $ret = self::AlipayLifeCategoryInsert($params, $alipay_life_id); - if($ret['code'] != 0) - { - Db::rollback(); - return $ret; - } - - Db::commit(); - return DataReturn('添加成功', 0); - } - - Db::rollback(); - return DataReturn('添加失败', -100); - } else { - $data['upd_time'] = time(); - if(Db::name('AlipayLife')->where(['id'=>intval($params['id'])])->update($data)) - { - $ret = self::AlipayLifeCategoryInsert($params, intval($params['id'])); - if($ret['code'] != 0) - { - Db::rollback(); - return $ret; - } - - Db::commit(); - return DataReturn('编辑成功', 0); - } - - Db::rollback(); - return DataReturn('编辑失败', -100); - } - } - - /** - * 生活号分类添加 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-12-21 - * @desc description - * @param [array] $params [输入参数] - * @param [array] $alipay_life_id [生活号id] - */ - private static function AlipayLifeCategoryInsert($params = [], $alipay_life_id) - { - // 删除关联分类 - Db::name('AlipayLifeCategoryJoin')->where(['alipay_life_id'=>intval($params['id'])])->delete(); - - // 开始添加 - if(!empty($params['alipay_life_category_id'])) - { - $data = []; - foreach(explode(',', $params['alipay_life_category_id']) as $v) - { - $data[] = [ - 'alipay_life_id' => $alipay_life_id, - 'alipay_life_category_id' => $v, - 'add_time' => time(), - ]; - } - if(Db::name('AlipayLifeCategoryJoin')->insertAll($data) < count($data)) - { - return DataReturn('生活号分类添加失败', -10); - } - } - return DataReturn('生活号分类添加成功', 0); - } - - /** - * 生活号删除 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-12-18 - * @desc description - * @param [array] $params [输入参数] - */ - public static function AlipayLifeDelete($params = []) - { - // 请求参数 - $p = [ - [ - 'checked_type' => 'empty', - 'key_name' => 'id', - 'error_msg' => '操作id有误', - ], - ]; - $ret = ParamsChecked($params, $p); - if($ret !== true) - { - return DataReturn($ret, -1); - } - - // 删除操作 - Db::startTrans(); - if(Db::name('AlipayLife')->where(['id'=>intval($params['id'])])->delete() && Db::name('AlipayLifeCategoryJoin')->where(['alipay_life_id'=>intval($params['id'])])->delete() !== false) - { - Db::commit(); - return DataReturn('删除成功'); - } - - Db::rollback(); - return DataReturn('删除失败或资源不存在', -100); - } - - /** - * 生活号分类 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-08-29 - * @desc description - * @param [array] $params [输入参数] - */ - public static function AlipayLifeCategoryList($params = []) - { - $where = empty($params['where']) ? ['is_enable'=>1] : $params['where']; - $field = empty($params['field']) ? '*' : $params['field']; - $order_by = empty($params['order_by']) ? 'sort asc' : trim($params['order_by']); - - $data = Db::name('AlipayLifeCategory')->where($where)->field($field)->order($order_by)->select(); - - return DataReturn('处理成功', 0, $data); - } - - /** - * 生活号分类id - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @date 2018-08-29 - * @desc description - * @param [array] $params [输入参数] - */ - public static function AlipayLifeCategoryIds($params = []) - { - $where = empty($params['where']) ? [] : $params['where']; - $field = empty($params['alipay_life_category_id']) ? 'alipay_life_category_id' : $params['field']; - $data = Db::name('AlipayLifeCategoryJoin')->where($where)->column($field); - return DataReturn('处理成功', 0, $data); - } -} -?> \ No newline at end of file diff --git a/application/service/AnswerService.php b/application/service/AnswerService.php old mode 100644 new mode 100755 diff --git a/application/service/AppMiniService.php b/application/service/AppMiniService.php old mode 100644 new mode 100755 diff --git a/application/service/AppNavService.php b/application/service/AppNavService.php old mode 100644 new mode 100755 diff --git a/application/service/ArticleService.php b/application/service/ArticleService.php index 1c64ae1ad0ed72baffb560a079599d0c2a5ff88d..9899f98cc81c06e9a89989eec97adbabdf557216 100755 --- a/application/service/ArticleService.php +++ b/application/service/ArticleService.php @@ -36,7 +36,7 @@ class ArticleService foreach($data as &$v) { // url - $v['url'] = HomeUrl('article', 'index', ['id'=>$v['id']]); + $v['url'] = MyUrl('index/article/index', ['id'=>$v['id']]); // 分类名称 if(isset($v['article_category_id'])) @@ -250,7 +250,7 @@ class ArticleService foreach($items as &$vs) { // url - $vs['url'] = HomeUrl('article', 'index', ['id'=>$vs['id']]); + $vs['url'] = MyUrl('index/article/index', ['id'=>$vs['id']]); } } $v['items'] = $items; @@ -394,8 +394,8 @@ class ArticleService foreach($data as &$v) { $v['is_son'] = (Db::name('ArticleCategory')->where(['pid'=>$v['id']])->count() > 0) ? 'ok' : 'no'; - $v['ajax_url'] = url('admin/articlecategory/getnodeson', array('id'=>$v['id'])); - $v['delete_url'] = url('admin/articlecategory/delete'); + $v['ajax_url'] = MyUrl('admin/articlecategory/getnodeson', array('id'=>$v['id'])); + $v['delete_url'] = MyUrl('admin/articlecategory/delete'); $v['json'] = json_encode($v); } return DataReturn('操作成功', 0, $data); diff --git a/application/service/BrandService.php b/application/service/BrandService.php index e1a411bcdfe107c030775559525bd4b7b06c588e..5539a51fe0bce9d5c80e8d810c263f758455420d 100755 --- a/application/service/BrandService.php +++ b/application/service/BrandService.php @@ -389,8 +389,8 @@ class BrandService foreach($data as &$v) { $v['is_son'] = (Db::name('BrandCategory')->where(['pid'=>$v['id']])->count() > 0) ? 'ok' : 'no'; - $v['ajax_url'] = url('admin/brandcategory/getnodeson', array('id'=>$v['id'])); - $v['delete_url'] = url('admin/brandcategory/delete'); + $v['ajax_url'] = MyUrl('admin/brandcategory/getnodeson', array('id'=>$v['id'])); + $v['delete_url'] = MyUrl('admin/brandcategory/delete'); $v['json'] = json_encode($v); } return DataReturn('操作成功', 0, $data); diff --git a/application/service/BuyService.php b/application/service/BuyService.php index 4cebd4c2f3cf6ad181cd617f6b543ad7e884b8e2..9d969424252646c5e4f814e36597028f1731e938 100755 --- a/application/service/BuyService.php +++ b/application/service/BuyService.php @@ -182,7 +182,7 @@ class BuyService } // 基础信息 - $v['goods_url'] = HomeUrl('goods', 'index', ['id'=>$v['goods_id']]); + $v['goods_url'] = MyUrl('index/goods/index', ['id'=>$v['goods_id']]); $v['images_old'] = $v['images']; $v['images'] = empty($v['images']) ? null : $images_host.$v['images']; $v['total_price'] = $v['stock']*$v['price']; @@ -676,7 +676,7 @@ class BuyService // 返回信息 $result = [ 'order' => Db::name('Order')->find($order_id), - 'jump_url' => url('index/order/index'), + 'jump_url' => MyUrl('index/order/index'), ]; @@ -691,7 +691,7 @@ class BuyService // 提交成功 case 1 : $msg = '提交成功'; - $result['jump_url'] = url('index/order/pay', ['id'=>$order_id]); + $result['jump_url'] = MyUrl('index/order/pay', ['id'=>$order_id]); break; // 默认操作成功 diff --git a/application/service/ConfigService.php b/application/service/ConfigService.php old mode 100644 new mode 100755 diff --git a/application/service/CustomViewService.php b/application/service/CustomViewService.php old mode 100644 new mode 100755 diff --git a/application/service/ExpressService.php b/application/service/ExpressService.php old mode 100644 new mode 100755 index 52baccdaad505359cf8956eac415f25749607508..e3719e67acb0dbfeff3fff3a3b217d29e55b373e --- a/application/service/ExpressService.php +++ b/application/service/ExpressService.php @@ -78,8 +78,8 @@ class ExpressService foreach($data as &$v) { $v['is_son'] = (Db::name('Express')->where(['pid'=>$v['id']])->count() > 0) ? 'ok' : 'no'; - $v['ajax_url'] = url('admin/express/getnodeson', array('id'=>$v['id'])); - $v['delete_url'] = url('admin/express/delete'); + $v['ajax_url'] = MyUrl('admin/express/getnodeson', array('id'=>$v['id'])); + $v['delete_url'] = MyUrl('admin/express/delete'); $v['icon_url'] = empty($v['icon']) ? '' : $images_host.$v['icon']; $v['json'] = json_encode($v); } diff --git a/application/service/GoodsService.php b/application/service/GoodsService.php index 95c6afdefeecd36f429b86d2320919b875923581..aa8ebedae3e72ca8b58d86da70a1fba0cd7a4aed 100755 --- a/application/service/GoodsService.php +++ b/application/service/GoodsService.php @@ -242,7 +242,7 @@ class GoodsService // 商品url地址 if(!empty($v['id'])) { - $v['goods_url'] = HomeUrl('goods', 'index', ['id'=>$v['id']]); + $v['goods_url'] = MyUrl('index/goods/index', ['id'=>$v['id']]); } // 商品封面图片 @@ -580,7 +580,7 @@ class GoodsService $v['images_old'] = $v['images']; $v['images'] = empty($v['images']) ? null : $images_host.$v['images']; - $v['goods_url'] = HomeUrl('goods', 'index', ['id'=>$v['goods_id']]); + $v['goods_url'] = MyUrl('index/goods/index', ['id'=>$v['goods_id']]); } } return DataReturn('处理成功', 0, $data); @@ -725,7 +725,7 @@ class GoodsService { $v['images_old'] = $v['images']; $v['images'] = empty($v['images']) ? null : $images_host.$v['images']; - $v['goods_url'] = HomeUrl('goods', 'index', ['id'=>$v['goods_id']]); + $v['goods_url'] = MyUrl('index/goods/index', ['id'=>$v['goods_id']]); } } return DataReturn('处理成功', 0, $data); @@ -1833,8 +1833,8 @@ class GoodsService foreach($data as &$v) { $v['is_son'] = (Db::name('GoodsCategory')->where(['pid'=>$v['id']])->count() > 0) ? 'ok' : 'no'; - $v['ajax_url'] = url('admin/goodscategory/getnodeson', array('id'=>$v['id'])); - $v['delete_url'] = url('admin/goodscategory/delete'); + $v['ajax_url'] = MyUrl('admin/goodscategory/getnodeson', array('id'=>$v['id'])); + $v['delete_url'] = MyUrl('admin/goodscategory/delete'); $v['icon_url'] = empty($v['icon']) ? '' : $images_host.$v['icon']; $v['big_images_url'] = empty($v['big_images']) ? '' : $images_host.$v['big_images']; $v['json'] = json_encode($v); diff --git a/application/service/LinkService.php b/application/service/LinkService.php old mode 100644 new mode 100755 diff --git a/application/service/NavigationService.php b/application/service/NavigationService.php index eca1fea5e356f311d9f81f33653ff8f7c3491d9b..b7f588fc02cfcbf1dced46f394d96f2de1979c34 100755 --- a/application/service/NavigationService.php +++ b/application/service/NavigationService.php @@ -78,17 +78,17 @@ class NavigationService { // 文章分类 case 'article': - $v['url'] = HomeUrl('article', 'index', ['id'=>$v['value']]); + $v['url'] = MyUrl('index/article/index', ['id'=>$v['value']]); break; // 自定义页面 case 'customview': - $v['url'] = HomeUrl('customview', 'index', ['id'=>$v['value']]); + $v['url'] = MyUrl('index/customview/index', ['id'=>$v['value']]); break; // 商品分类 case 'goods_category': - $v['url'] = HomeUrl('search', 'index', ['category_id'=>$v['value']]); + $v['url'] = MyUrl('index/search/index', ['category_id'=>$v['value']]); break; } $data[$k] = $v; diff --git a/application/service/OrderService.php b/application/service/OrderService.php index e38d28fdc9b82e0a314b19af5b44ef1b3ec69c99..40418b8bd25cab143e8f51d3313e33e50d468fc8 100755 --- a/application/service/OrderService.php +++ b/application/service/OrderService.php @@ -73,8 +73,15 @@ class OrderService return DataReturn('支付方式有误', -1); } + // 支付入口文件检查 + $pay_checked = PaymentService::EntranceFileChecked($payment[0]['payment'], 'order'); + if($pay_checked['code'] != 0) + { + return $pay_checked; + } + // 回调地址 - $url = __MY_URL__.'payment_order_'.strtolower($payment[0]['payment']); + $url = __MY_PUBLIC_URL__.'payment_order_'.strtolower($payment[0]['payment']); // 开放平台用户penid $temp_key = APPLICATION_CLIENT_TYPE.'_openid'; @@ -253,6 +260,10 @@ class OrderService $ret = (new $pay_name($payment[0]['config']))->Respond(array_merge($_GET, $_POST)); if(isset($ret['code']) && $ret['code'] == 0) { + if(empty($ret['data']['out_trade_no'])) + { + return DataReturn('单号有误', -1); + } // 获取订单信息 $where = ['order_no'=>$ret['data']['out_trade_no'], 'is_delete_time'=>0, 'user_is_delete_time'=>0]; $order = Db::name('Order')->where($where)->find(); @@ -606,7 +617,7 @@ class OrderService { $vs['images'] = empty($vs['images']) ? null : $images_host.$vs['images']; $vs['spec'] = empty($vs['spec']) ? null : json_decode($vs['spec'], true); - $vs['goods_url'] = HomeUrl('goods', 'index', ['id'=>$vs['goods_id']]); + $vs['goods_url'] = MyUrl('index/goods/index', ['id'=>$vs['goods_id']]); $vs['total_price'] = $vs['buy_number']*$vs['price']; } } diff --git a/application/service/PayLogService.php b/application/service/PayLogService.php old mode 100644 new mode 100755 diff --git a/application/service/PaymentService.php b/application/service/PaymentService.php old mode 100644 new mode 100755 index d2100d12ee7212e742a72e9f48830a4d89b875ce..ea866523cbd07533985408a0b59b2112efaaa356 --- a/application/service/PaymentService.php +++ b/application/service/PaymentService.php @@ -22,6 +22,9 @@ class PaymentService // 不删除的支付方式 public static $cannot_deleted_list; + // 入口文件位置 + public static $dir_root_path; + /** * 初始化 * @author Devil @@ -41,6 +44,9 @@ class PaymentService // 不删除的支付方式 self::$cannot_deleted_list = ['DeliveryPayment', 'CashPayment']; + + // 入口文件位置 + self::$dir_root_path = defined('IS_ROOT_ACCESS') ? ROOT : ROOT.'public'.DS; } /** @@ -368,11 +374,10 @@ class PaymentService */ private static function PowerCheck() { - // 主目录权限 - $root_path = ROOT.'public'; - if(!is_writable($root_path)) + // 入口文件目录 + if(!is_writable(self::$dir_root_path)) { - return DataReturn('目录没有操作权限'.'['.$root_path.']', -3); + return DataReturn('目录没有操作权限'.'['.self::$dir_root_path.']', -3); } // 插件权限 @@ -614,6 +619,9 @@ class PaymentService foreach(self::$payment_business_type_all as $v) { $name = strtolower($v['name']); + + if(defined('IS_ROOT_ACCESS')) + { // 异步 $notify=<<run()->send(); +require './public/index.php'; ?> php; @@ -651,33 +652,67 @@ $respond=<< +php; + + } else { + +// 异步 +$notify=<<run()->send(); +// 支付模块标记 +define('PAYMENT_TYPE', '{$payment}'); + +// 引入入口文件 +require __DIR__.'/index.php'; ?> php; - $name = strtolower($v['name']); - @file_put_contents(ROOT.'public'.DS.'payment_'.$name.'_'.strtolower($payment).'_respond.php', $respond); + +// 同步 +$respond=<< +php; + } + + @file_put_contents(self::$dir_root_path.'payment_'.$name.'_'.strtolower($payment).'_respond.php', $respond); // 线下支付不生成异步入口文件 if(!in_array($payment, config('under_line_list'))) { - @file_put_contents(ROOT.'public'.DS.'payment_'.$name.'_'.strtolower($payment).'_notify.php', $notify); + @file_put_contents(self::$dir_root_path.'payment_'.$name.'_'.strtolower($payment).'_notify.php', $notify); } } @@ -705,17 +740,46 @@ php; foreach(self::$payment_business_type_all as $v) { $name = strtolower($v['name']); - if(file_exists(ROOT.'public'.DS.'payment_'.$name.'_'.$payment.'_notify.php')) + if(file_exists(self::$dir_root_path.'payment_'.$name.'_'.$payment.'_notify.php')) { - @unlink(ROOT.'public'.DS.'payment_'.$name.'_'.$payment.'_notify.php'); + @unlink(self::$dir_root_path.'payment_'.$name.'_'.$payment.'_notify.php'); } - if(file_exists(ROOT.'public'.DS.'payment_'.$name.'_'.$payment.'_respond.php')) + if(file_exists(self::$dir_root_path.'payment_'.$name.'_'.$payment.'_respond.php')) { - @unlink(ROOT.'public'.DS.'payment_'.$name.'_'.$payment.'_respond.php'); + @unlink(self::$dir_root_path.'payment_'.$name.'_'.$payment.'_respond.php'); } } return DataReturn('操作成功', 0); } + + /** + * 入库文件检查 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2018-12-26 + * @desc description + * @param [string] $payment [支付标记] + * @param [string] $name [支付业务方式名称] + */ + public static function EntranceFileChecked($payment, $name) + { + // 同步返回文件 + if(!file_exists(self::$dir_root_path.'payment_'.strtolower($name).'_'.strtolower($payment).'_respond.php')) + { + return DataReturn('支付返回入口文件不存在,请联系管理员处理', -10); + } + + // 线下支付不生成异步入口文件 + if(!in_array($payment, config('under_line_list'))) + { + if(!file_exists(self::$dir_root_path.'payment_'.strtolower($name).'_'.strtolower($payment).'_notify.php')) + { + return DataReturn('支付通知入口文件不存在,请联系管理员处理', -10); + } + } + return DataReturn('校验成功', 0); + } } ?> \ No newline at end of file diff --git a/application/service/RegionService.php b/application/service/RegionService.php old mode 100644 new mode 100755 index 0feeaf890237b91b3a0bec14a99274877f657a7c..f806cec3b7858ead9b9fdeaf2ea1ef30a40d874f --- a/application/service/RegionService.php +++ b/application/service/RegionService.php @@ -79,8 +79,8 @@ class RegionService foreach($data as &$v) { $v['is_son'] = (Db::name('Region')->where(['pid'=>$v['id']])->count() > 0) ? 'ok' : 'no'; - $v['ajax_url'] = url('admin/region/getnodeson', array('id'=>$v['id'])); - $v['delete_url'] = url('admin/region/delete'); + $v['ajax_url'] = MyUrl('admin/region/getnodeson', array('id'=>$v['id'])); + $v['delete_url'] = MyUrl('admin/region/delete'); $v['json'] = json_encode($v); } return DataReturn('操作成功', 0, $data); diff --git a/application/service/ResourcesService.php b/application/service/ResourcesService.php index 235c18ea4bc57797a140ec65225d8bf8866a5efe..96244bb0e04272d1302b6677d31f265a907966bf 100755 --- a/application/service/ResourcesService.php +++ b/application/service/ResourcesService.php @@ -28,12 +28,12 @@ class ResourcesService { // 读取内容 case 'get': - return str_replace('/static/', __MY_URL__.'static/', $content); + return str_replace('/static/', __MY_PUBLIC_URL__.'static/', $content); break; // 内容写入 case 'add': - return str_replace(array(__MY_URL__.'static/', __MY_ROOT__.'static/'), '/static/', $content); + return str_replace(array(__MY_PUBLIC_URL__.'static/', __MY_ROOT__.'static/'), '/static/', $content); } return $content; } @@ -49,7 +49,7 @@ class ResourcesService */ public static function AttachmentPathHandle($value) { - return empty($value) ? '' : str_replace([__MY_URL__, __MY_ROOT__], DS, $value); + return empty($value) ? '' : str_replace([__MY_PUBLIC_URL__, __MY_ROOT__], DS, $value); } /** diff --git a/application/service/SafetyService.php b/application/service/SafetyService.php old mode 100644 new mode 100755 diff --git a/application/service/ScreeningPriceService.php b/application/service/ScreeningPriceService.php old mode 100644 new mode 100755 index 3d2c9a92217d9e55ed35c7d30aa85677aa4e9059..35dd042be31afa6bfeb493d2402e4f273f43f32a --- a/application/service/ScreeningPriceService.php +++ b/application/service/ScreeningPriceService.php @@ -35,8 +35,8 @@ class ScreeningPriceService foreach($data as &$v) { $v['is_son'] = (Db::name('ScreeningPrice')->where(['pid'=>$v['id']])->count() > 0) ? 'ok' : 'no'; - $v['ajax_url'] = url('admin/screeningprice/getnodeson', array('id'=>$v['id'])); - $v['delete_url'] = url('admin/screeningprice/delete'); + $v['ajax_url'] = MyUrl('admin/screeningprice/getnodeson', array('id'=>$v['id'])); + $v['delete_url'] = MyUrl('admin/screeningprice/delete'); $v['json'] = json_encode($v); } return DataReturn('操作成功', 0, $data); diff --git a/application/service/SlideService.php b/application/service/SlideService.php old mode 100644 new mode 100755 diff --git a/application/service/ThemeService.php b/application/service/ThemeService.php old mode 100644 new mode 100755 diff --git a/config/app.php b/config/app.php index 7e66fd283b1c00a35b3aa3a86a9d0c1cacd3eba2..e725e5809a81f8039d850ecbf51222ba299fc248 100755 --- a/config/app.php +++ b/config/app.php @@ -162,7 +162,7 @@ return [ // 图片host, 数据库图片地址以/Public/...开头 - 'images_host' => substr(__MY_URL__, 0, -1), + 'images_host' => substr(__MY_PUBLIC_URL__, 0, -1), // 开启U带域名 'url_domain_deploy' => true, diff --git a/extend/payment/Alipay.php b/extend/payment/Alipay.php index 3d918f945db133a0885bd252b4f3d62b47a9c518..75f4540433b75cfc7bd3853f481ca3e41fd1d30b 100755 --- a/extend/payment/Alipay.php +++ b/extend/payment/Alipay.php @@ -302,7 +302,7 @@ class Alipay '.$params['call_back_url'].' '.$params['notify_url'].' '.$params['out_user'].' - '.$params['merchant_url'].' + '.(isset($params['merchant_url']) ? $params['merchant_url'] : $params['call_back_url']).' 3600 0 '; diff --git a/index.php b/index.php new file mode 100755 index 0000000000000000000000000000000000000000..24a763df33e9aa59f9bfca5b41c1032b850a2277 --- /dev/null +++ b/index.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/public/core.php b/public/core.php index 322191607936a2d8adc4c84660d3fe5055a7c94b..083ebb5267a8776cb31e65defc1dcaaed7dfba5f 100755 --- a/public/core.php +++ b/public/core.php @@ -19,13 +19,18 @@ if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !'); define('__MY_HTTP__', (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') ? 'http' : 'https'); // 根目录 -define('__MY_ROOT__', empty($_SERVER['SCRIPT_NAME']) ? '' : substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')+1)); +$my_root = empty($_SERVER['SCRIPT_NAME']) ? '' : substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/')+1); + +define('__MY_ROOT__', defined('IS_ROOT_ACCESS') ? $my_root.'public/' : $my_root); // 项目HOST define('__MY_HOST__', empty($_SERVER['HTTP_HOST']) ? '' : $_SERVER['HTTP_HOST']); // 项目URL地址 -define('__MY_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.'://'.__MY_HOST__.__MY_ROOT__); +define('__MY_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.'://'.__MY_HOST__.$my_root); + +// 项目public目录URL地址 +define('__MY_PUBLIC_URL__', empty($_SERVER['HTTP_HOST']) ? '' : __MY_HTTP__.'://'.__MY_HOST__.__MY_ROOT__); // 当前页面url地址 $request_url = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; diff --git a/public/index.php b/public/index.php index db32ad3a788f79899bb5c4509c763281dda33b96..db02785f36984c24e4cd4c507a78c0e66bd09022 100755 --- a/public/index.php +++ b/public/index.php @@ -18,7 +18,8 @@ require __DIR__ . '/../thinkphp/base.php'; // 支持事先使用静态方法设置Request对象和Config对象 // 引入公共入口文件 -require './core.php'; +require __DIR__.'/core.php'; // 执行应用并响应 Container::get('app')->run()->send(); +?> \ No newline at end of file diff --git a/public/install/shopxo_tp5.sql b/public/install/shopxo_tp5.sql old mode 100644 new mode 100755 diff --git a/public/payment_order_alipay_notify.php b/public/payment_order_alipay_notify.php old mode 100644 new mode 100755 index efcae4f46018b32ab2697042d86c1242bd8bc795..59d1eca74dab08a1e321177c694e8f1174e03557 --- a/public/payment_order_alipay_notify.php +++ b/public/payment_order_alipay_notify.php @@ -4,22 +4,12 @@ * 订单支付异步入口 */ -namespace think; - // 默认绑定模块 $_GET['s'] = '/api/ordernotify/notify'; // 支付模块标记 define('PAYMENT_TYPE', 'Alipay'); -// 加载基础文件 -require __DIR__ . '/../thinkphp/base.php'; - -// 支持事先使用静态方法设置Request对象和Config对象 - -// 引入公共入口文件 -require './core.php'; - -// 执行应用并响应 -Container::get('app')->run()->send(); +// 引入入口文件 +require __DIR__.'/index.php'; ?> \ No newline at end of file diff --git a/public/payment_order_alipay_respond.php b/public/payment_order_alipay_respond.php old mode 100644 new mode 100755 index 23912b727a0976edabe94cbde14ea6df0fe0588f..25ec0840183e2a6ad59d90015a934548e002cda9 --- a/public/payment_order_alipay_respond.php +++ b/public/payment_order_alipay_respond.php @@ -4,22 +4,12 @@ * 订单支付同步入口 */ -namespace think; - // 默认绑定模块 $_GET['s'] = '/index/order/respond'; // 支付模块标记 define('PAYMENT_TYPE', 'Alipay'); -// 加载基础文件 -require __DIR__ . '/../thinkphp/base.php'; - -// 支持事先使用静态方法设置Request对象和Config对象 - -// 引入公共入口文件 -require './core.php'; - -// 执行应用并响应 -Container::get('app')->run()->send(); +// 引入入口文件 +require __DIR__.'/index.php'; ?> \ No newline at end of file diff --git a/public/payment_order_alipaymini_notify.php b/public/payment_order_alipaymini_notify.php old mode 100644 new mode 100755 index 1b0859c5bb8a8a1b35f5253046b6d6e21dc5305f..2f741094b3cd6ca5393c57a7d1bdde6fa9ffd401 --- a/public/payment_order_alipaymini_notify.php +++ b/public/payment_order_alipaymini_notify.php @@ -4,22 +4,12 @@ * 订单支付异步入口 */ -namespace think; - // 默认绑定模块 $_GET['s'] = '/api/ordernotify/notify'; // 支付模块标记 define('PAYMENT_TYPE', 'AlipayMini'); -// 加载基础文件 -require __DIR__ . '/../thinkphp/base.php'; - -// 支持事先使用静态方法设置Request对象和Config对象 - -// 引入公共入口文件 -require './core.php'; - -// 执行应用并响应 -Container::get('app')->run()->send(); +// 引入入口文件 +require __DIR__.'/index.php'; ?> \ No newline at end of file diff --git a/public/payment_order_alipaymini_respond.php b/public/payment_order_alipaymini_respond.php old mode 100644 new mode 100755 index d38206f953024739bb89a94eb0185f099a366c70..5c0a2aaa65e6673943c08616c97c093d73e3bc0a --- a/public/payment_order_alipaymini_respond.php +++ b/public/payment_order_alipaymini_respond.php @@ -4,22 +4,12 @@ * 订单支付同步入口 */ -namespace think; - // 默认绑定模块 $_GET['s'] = '/index/order/respond'; // 支付模块标记 define('PAYMENT_TYPE', 'AlipayMini'); -// 加载基础文件 -require __DIR__ . '/../thinkphp/base.php'; - -// 支持事先使用静态方法设置Request对象和Config对象 - -// 引入公共入口文件 -require './core.php'; - -// 执行应用并响应 -Container::get('app')->run()->send(); +// 引入入口文件 +require __DIR__.'/index.php'; ?> \ No newline at end of file diff --git a/public/payment_order_cashpayment_respond.php b/public/payment_order_cashpayment_respond.php index 9df2b259817ebef58b9db966c0b61892ebd21eee..08e6b34e2ec85718dae5e73821ce4fdeb9ec5876 100644 --- a/public/payment_order_cashpayment_respond.php +++ b/public/payment_order_cashpayment_respond.php @@ -4,22 +4,12 @@ * 订单支付同步入口 */ -namespace think; - // 默认绑定模块 $_GET['s'] = '/index/order/respond'; // 支付模块标记 define('PAYMENT_TYPE', 'CashPayment'); -// 加载基础文件 -require __DIR__ . '/../thinkphp/base.php'; - -// 支持事先使用静态方法设置Request对象和Config对象 - -// 引入公共入口文件 -require './core.php'; - -// 执行应用并响应 -Container::get('app')->run()->send(); +// 引入入口文件 +require __DIR__.'/index.php'; ?> \ No newline at end of file diff --git a/public/payment_order_deliverypayment_respond.php b/public/payment_order_deliverypayment_respond.php index 934f477d83ff76ff31d18c5a25a6fa9d2f4171b5..833b206fe10a6236226038a952acb02af28c84f6 100644 --- a/public/payment_order_deliverypayment_respond.php +++ b/public/payment_order_deliverypayment_respond.php @@ -4,22 +4,12 @@ * 订单支付同步入口 */ -namespace think; - // 默认绑定模块 $_GET['s'] = '/index/order/respond'; // 支付模块标记 define('PAYMENT_TYPE', 'DeliveryPayment'); -// 加载基础文件 -require __DIR__ . '/../thinkphp/base.php'; - -// 支持事先使用静态方法设置Request对象和Config对象 - -// 引入公共入口文件 -require './core.php'; - -// 执行应用并响应 -Container::get('app')->run()->send(); +// 引入入口文件 +require __DIR__.'/index.php'; ?> \ No newline at end of file