diff --git a/application/index/controller/Common.php b/application/index/controller/Common.php index 658b9fbb896193d229f11eb9ea663c1fd54d01d8..246fdab5e8fbafa390fc277e08bf2e5b5115fd25 100755 --- a/application/index/controller/Common.php +++ b/application/index/controller/Common.php @@ -17,6 +17,7 @@ use app\service\BuyService; use app\service\MessageService; use app\service\SearchService; use app\service\ConfigService; +use app\service\LinkService; /** * 前端公共控制器 @@ -205,6 +206,10 @@ class Common extends Controller // 商城公告 $this->assign('common_shop_notice', MyC('common_shop_notice')); + + // 友情链接 + $link = LinkService::LinkList(['where'=>['is_enable'=>1]]); + $this->assign('link_list', $link['data']); } /** diff --git a/application/index/view/default/lib/region_linkage.html b/application/index/view/default/lib/region_linkage.html index 2bb60bcbf623a9290a31dd4515b85e64664698a3..c925a1db8cc80da5714057ad82bf8dd2d4a4b2d7 100755 --- a/application/index/view/default/lib/region_linkage.html +++ b/application/index/view/default/lib/region_linkage.html @@ -6,7 +6,7 @@ - + \ No newline at end of file diff --git a/application/index/view/default/public/footer_nav.html b/application/index/view/default/public/footer_nav.html index 4a41acd238b49a932020681fdb277af1f51a8852..c725ee619cc862fe7632a097cd002bf2f45edef1 100755 --- a/application/index/view/default/public/footer_nav.html +++ b/application/index/view/default/public/footer_nav.html @@ -1,3 +1,20 @@ + +{{if !empty($link_list)}} +
+
+

友情链接

+ +
+
+{{/if}} + + \ No newline at end of file diff --git a/application/service/LinkService.php b/application/service/LinkService.php index 85d179e46532f8242573053df1312c007b09f68a..504815712de151dacb18cdc7342e6db27a955717 100755 --- a/application/service/LinkService.php +++ b/application/service/LinkService.php @@ -33,7 +33,8 @@ class LinkService */ public static function LinkList($params = []) { - $data = Db::name('Link')->order('sort asc')->select(); + $where = empty($params['where']) ? [] : $params['where']; + $data = Db::name('Link')->where($where)->order('sort asc')->select(); return DataReturn('处理成功', 0, $data); } diff --git a/application/service/OrderService.php b/application/service/OrderService.php index efa106efdb7799ea828bb8739fa80ed1ae776a7b..7772e8f6c66db57ae0d3596f9ace068eed9c9ff5 100755 --- a/application/service/OrderService.php +++ b/application/service/OrderService.php @@ -92,6 +92,14 @@ class OrderService // 回调地址 $url = __MY_PUBLIC_URL__.'payment_order_'.strtolower($payment[0]['payment']); + // url模式, pathinfo模式下采用自带url生成url, 避免非index.php多余 + if(MyC('home_seo_url_model', 0) == 0) + { + $call_back_url = $url.'_respond.php'; + } else { + $call_back_url = MyUrl('index/order/respond', ['paymentname'=>$payment[0]['payment']]); + } + // 开放平台用户penid $temp_key = APPLICATION_CLIENT_TYPE.'_openid'; $user_openid = isset($params['user'][$temp_key]) ? $params['user'][$temp_key] : ''; @@ -104,7 +112,7 @@ class OrderService 'name' => '订单支付', 'total_price' => $order['total_price'], 'notify_url' => $url.'_notify.php', - 'call_back_url' => $url.'_respond.php', + 'call_back_url' => $call_back_url, ); $pay_name = 'payment\\'.$payment[0]['payment']; $ret = (new $pay_name($payment[0]['config']))->Pay($pay_data); @@ -258,14 +266,19 @@ class OrderService } // 支付方式 - $payment = PaymentService::PaymentList(['where'=>['payment'=>PAYMENT_TYPE]]); + $payment_name = defined('PAYMENT_TYPE') ? PAYMENT_TYPE : (isset($params['paymentname']) ? $params['paymentname'] : ''); + if(empty($payment_name)) + { + return DataReturn('支付方式标记异常', -1); + } + $payment = PaymentService::PaymentList(['where'=>['payment'=>$payment_name]]); if(empty($payment[0])) { return DataReturn('支付方式有误', -1); } // 支付数据校验 - $pay_name = 'payment\\'.PAYMENT_TYPE; + $pay_name = 'payment\\'.$payment_name; $ret = (new $pay_name($payment[0]['config']))->Respond(array_merge($_GET, $_POST)); if(isset($ret['code']) && $ret['code'] == 0) { diff --git a/public/static/index/default/css/common.css b/public/static/index/default/css/common.css index 9ba6e93fcf36c42df00cb57c1ac58fd9021bc194..e9c7e81dbe30e820d7b2ca1dac11a47e0c92f42f 100755 --- a/public/static/index/default/css/common.css +++ b/public/static/index/default/css/common.css @@ -447,6 +447,40 @@ background:url(../images/ibar_sprites.png) no-repeat;background-position:0px -23 .am-footer-default .am-footer-divider { padding: 0 5px; } +.am-footer-default .am-footer-miscs a { + color: #8e8e8e; +} + +/** + * 友情链接 + */ +.friendship-list { + margin-top: 20px; + margin-bottom: 10px; +} +.friendship-list h2 { + border-bottom: 1px solid #e3e0e0; + line-height: 26px; + color: #333; + font-weight: 500; + font-size: 14px; +} +.friendship-list ul { + overflow: hidden; +} +.friendship-list ul li { + float: left; + line-height: 26px; + text-align: center; +} +.friendship-list ul li:not(:last-child) { + margin-right: 10px; +} + +.friendship-list ul li:not(:last-child) a { + border-right: 1px solid #d4d4d4; + padding-right: 10px; +} /** @@ -458,6 +492,9 @@ background:url(../images/ibar_sprites.png) no-repeat;background-position:0px -23 padding-left: 0px; padding-right: 0px; } + .friendship-list { + padding: 0 5px; + } } /** diff --git a/public/static/index/default/images/preview.jpg b/public/static/index/default/images/preview.jpg old mode 100755 new mode 100644 index f8a126ecc3b21ab8b522d94565cdd7fc2def0fd0..7cc0d5a888f82350cb41625d2a3ba65398dae04b Binary files a/public/static/index/default/images/preview.jpg and b/public/static/index/default/images/preview.jpg differ diff --git a/thinkphp/tpl/think_exception.tpl b/thinkphp/tpl/think_exception.tpl index 19ecbdc1bf4cc76baab846badc7bfe65399dd6da..c3fa0d4c97f7f69afc4b10fefeb785a034fd13ce 100755 --- a/thinkphp/tpl/think_exception.tpl +++ b/thinkphp/tpl/think_exception.tpl @@ -410,9 +410,9 @@