From cadd8bb4be57269d13f0f07922707c0f9ac79702 Mon Sep 17 00:00:00 2001 From: "ZLW-PC\\Administrator" <374861669@qq.com> Date: Tue, 7 Nov 2017 18:00:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=88=86=E4=BA=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Common/WechatAuth.php | 1 - .../Api/UserRechargeController.php | 2 +- .../Controllers/Weixin/CommonController.php | 8 ++++++- .../Controllers/Weixin/IndexController.php | 6 +++++ public/css/weixin/style.css | 7 +++--- resources/org/wxJsSdk/jssdk.php | 6 +++-- .../views/weixin/article/detail.blade.php | 2 +- .../views/weixin/cart/cartCheckout.blade.php | 7 +++--- resources/views/weixin/cart/index.blade.php | 5 ++--- .../weixin/collect_goods/index.blade.php | 2 +- .../views/weixin/common/footer.blade.php | 4 +++- .../views/weixin/common/wxshare.blade.php | 7 +++--- resources/views/weixin/index/index.blade.php | 22 +++++-------------- .../views/weixin/user/userBonusList.blade.php | 4 +++- .../weixin/user/userGoodsHistory.blade.php | 10 ++++++--- .../views/weixin/user/userMoneyList.blade.php | 8 +++++-- .../views/weixin/user/userPointList.blade.php | 8 +++++-- routes/web.php | 4 +++- 18 files changed, 67 insertions(+), 46 deletions(-) diff --git a/app/Common/WechatAuth.php b/app/Common/WechatAuth.php index bd3d6ec..107720d 100644 --- a/app/Common/WechatAuth.php +++ b/app/Common/WechatAuth.php @@ -3,7 +3,6 @@ namespace App\Common; /** * OAuth2.0微信授权登录实现 - * */ class WechatAuth { diff --git a/app/Http/Controllers/Api/UserRechargeController.php b/app/Http/Controllers/Api/UserRechargeController.php index 550ed0a..da2f9b3 100644 --- a/app/Http/Controllers/Api/UserRechargeController.php +++ b/app/Http/Controllers/Api/UserRechargeController.php @@ -18,7 +18,7 @@ class UserRechargeController extends CommonController public function userRechargeList(Request $request) { //参数 - $data['limit'] = $request->input('limit', 10); + $data['limit'] = $request->input('limit', 10); $data['offset'] = $request->input('offset', 0); $data['status'] = $request->input('status', -1); diff --git a/app/Http/Controllers/Weixin/CommonController.php b/app/Http/Controllers/Weixin/CommonController.php index 4d282f1..33acb80 100644 --- a/app/Http/Controllers/Weixin/CommonController.php +++ b/app/Http/Controllers/Weixin/CommonController.php @@ -2,12 +2,18 @@ namespace App\Http\Controllers\Weixin; use App\Http\Controllers\Controller; +use App\Common\Helper; class CommonController extends Controller { + protected $isWechatBrowser; + public function __construct() { parent::__construct(); + + $this->isWechatBrowser = Helper::isWechatBrowser(); + view()->share('isWechatBrowser', $this->isWechatBrowser); } /** @@ -63,4 +69,4 @@ class CommonController extends Controller exit($str); } } -} +} \ No newline at end of file diff --git a/app/Http/Controllers/Weixin/IndexController.php b/app/Http/Controllers/Weixin/IndexController.php index 0c3db28..06a414a 100644 --- a/app/Http/Controllers/Weixin/IndexController.php +++ b/app/Http/Controllers/Weixin/IndexController.php @@ -21,6 +21,12 @@ class IndexController extends CommonController //首页 public function index() { + //分享到首页,把推荐id存下来 + if(isset($_GET['parent_id']) && !empty($_GET['parent_id'])) + { + $_SESSION['weixin_user_parent_id'] = intval($_GET['parent_id']); + } + //banner轮播图 $postdata = array( 'limit' => 5, diff --git a/public/css/weixin/style.css b/public/css/weixin/style.css index 4f5fb52..a906a3b 100644 --- a/public/css/weixin/style.css +++ b/public/css/weixin/style.css @@ -74,11 +74,12 @@ background:none; .goods_list_small li:nth-child(even) a{margin-right:0;margin-left:2px;} .goods_list_s li{color:#333;border-bottom:1px solid #eee;overflow:hidden;margin-left:10px;margin-right:10px;padding:15px 5px 15px 5px;} -.goods_list_s li span{color:#333;display:block;font-size:1rem;}.goods_list_s a:last-child li{border-bottom:0} +.goods_list_s li .btn{color:#333;display:block;font-size:1rem;cursor:pointer;}.goods_list_s a:last-child li{border-bottom:0} .goods_list_s .goods_thumb{width:100px;height:100px;float:left;margin-right:10px;display:block;}.goods_list_s .goods_thumb img{width:100px;height:100px;border:none;} .goods_list_s .goods_tit{line-height:24px;overflow:hidden;} .goods_list_s .goods_price{color:#f23030;}.goods_list_s .goods_price b{font-size:1rem;font-weight:normal;} .goods_list_s .goods_des{color:#999999;font-size:0.875rem;} +.goods_list_s .buy{border:1px solid #f23030;border-radius:2px;padding:0 3px;color:#fff;background-color:#f23030;} .classreturn{ background-color:#f8f8f8; @@ -292,9 +293,9 @@ margin:5px 0 .banner_headline .tit{border-top:1px dashed #dedede;text-align:center;margin:25px 0;} .banner_headline .tit h4{color:#666666;background-color:#f1f1f1;font-size:18px;font-weight:normal;position:relative;top:-14px;display:inline;padding:0 20px;} -.radio .check_t i {background-position: -30px 0} +.radio .check_t i{background-position:-29px 0;} -.radio i {width:22px;height:22px;display: block;float: left;background-image: url("../../images/weixin/check.png");background-repeat: no-repeat;background-size: cover;background-position: 0} +.radio i{width:22px;height:22px;display: block;float: left;background-image: url("../../images/weixin/check.png");background-repeat: no-repeat;background-size: cover;background-position: 0} .signup-find span,.radio span {font-size:24px;cursor: pointer} .sc_list { diff --git a/resources/org/wxJsSdk/jssdk.php b/resources/org/wxJsSdk/jssdk.php index df19068..fa1778d 100644 --- a/resources/org/wxJsSdk/jssdk.php +++ b/resources/org/wxJsSdk/jssdk.php @@ -122,12 +122,14 @@ class JSSDK private function get_php_file($filename) { - return trim(substr(file_get_contents($filename), 15)); + //return trim(substr(file_get_contents($filename), 15)); //原版 + return trim(substr(file_get_contents(resource_path('org/wxJsSdk/'.$filename)), 15)); //Laravel版 } private function set_php_file($filename, $content) { - $fp = fopen($filename, "w"); + //$fp = fopen($filename, "w"); //原版 + $fp = fopen(resource_path('org/wxJsSdk/'.$filename), "w"); //Laravel版 fwrite($fp, "" . $content); fclose($fp); } diff --git a/resources/views/weixin/article/detail.blade.php b/resources/views/weixin/article/detail.blade.php index 601246c..bdcf649 100644 --- a/resources/views/weixin/article/detail.blade.php +++ b/resources/views/weixin/article/detail.blade.php @@ -5,7 +5,7 @@
返回
-
微商城
+
文章详情
diff --git a/resources/views/weixin/cart/cartCheckout.blade.php b/resources/views/weixin/cart/cartCheckout.blade.php index 039be0f..20a3dc0 100644 --- a/resources/views/weixin/cart/cartCheckout.blade.php +++ b/resources/views/weixin/cart/cartCheckout.blade.php @@ -15,14 +15,15 @@
-

+ +

diff --git a/resources/views/weixin/common/footer.blade.php b/resources/views/weixin/common/footer.blade.php index ad9b862..5d6ff61 100644 --- a/resources/views/weixin/common/footer.blade.php +++ b/resources/views/weixin/common/footer.blade.php @@ -9,4 +9,6 @@ >

个人中心

- \ No newline at end of file + + +@include('weixin.common.wxshare') \ No newline at end of file diff --git a/resources/views/weixin/common/wxshare.blade.php b/resources/views/weixin/common/wxshare.blade.php index 79a9797..2e51f7c 100644 --- a/resources/views/weixin/common/wxshare.blade.php +++ b/resources/views/weixin/common/wxshare.blade.php @@ -43,10 +43,9 @@ wx.ready(function () { // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。 // 在这里调用 API var title=document.title; - var desc=share_desc; - var url='{$shareurl}'; //分享链接 - var img='{$shareimg}'; //分享图标 - var subscribe='{$subscribe}'; //分享描述 + var desc=''; //分享描述 + var url=''; //分享链接 + var img=''; //分享图标 // 分享给朋友 wx.onMenuShareAppMessage({ diff --git a/resources/views/weixin/index/index.blade.php b/resources/views/weixin/index/index.blade.php index 8e25929..88fa49b 100644 --- a/resources/views/weixin/index/index.blade.php +++ b/resources/views/weixin/index/index.blade.php @@ -152,24 +152,14 @@ var swiper = new Swiper('.swiper-nav', {
diff --git a/resources/views/weixin/user/userBonusList.blade.php b/resources/views/weixin/user/userBonusList.blade.php index b9ab29e..a804e90 100644 --- a/resources/views/weixin/user/userBonusList.blade.php +++ b/resources/views/weixin/user/userBonusList.blade.php @@ -24,7 +24,9 @@

有效期至 可用

- + +
暂无记录
+
+ + +
暂无记录
+