浏览代码

merage commit

ayHaru 4 年之前
父节点
当前提交
f6be2d763c

+ 2 - 1
admin/templates/default/login.php

@@ -38,7 +38,8 @@ title="<?php echo $lang['login_index_password_pattern'];?>">
   </form>
   <div class="bottom">
     <h5>Powered by Lily&Beauty</h5>
-    <h6 title="Lily&Beauty">© 2010-2020 <a href="http://www.lrlz.com/" target="_blank">丽人丽妆 Inc.</a></h6>
+
+    <h6 title="Lily&Beauty">© 2010-2020 <a href="http://www.lrlz.com/" target="_blank">椰子电子商务责任有限公司 Inc.</a></h6>
   </div>
 </div>
 

+ 10 - 9
data/config/prod/pay.ini.php

@@ -13,15 +13,16 @@ define('MINIPAY_WXPAY_KEY',         '0f86a4a9b1edb51b1a8d180fa228a157');
 define('MINIPAY_WXPAY_SSLCERT_PATH', '../cert/xyz_cert.pem');
 define('MINIPAY_WXPAY_SSLKEY_PATH',  '../cert/xyz_key.pem');
 
-define('OPENWX_APPID',       'wx24c5645aa986234a');
-define('OPENWX_MCHID',       '1279745801');
+define('OPENWX_APPID',       'wx38f1d15c5337e89b');
+define('OPENWX_MCHID',       '1600686690');
 define('OPENWX_KEY',         '0f86a4a9b1edb51b1a7d110fa223a157');
-define('OPENWX_APPSECRET',   '41f93fef3207e917e742b9ebcd540cb2');
-define('OPENWX_SSLCERT_PATH', '../cert/panda_cert.pem');
-define('OPENWX_SSLKEY_PATH',  '../cert/panda_key.pem');
+define('OPENWX_APPSECRET',   '0f62334f4196afa652d3b9d5864d88b4');
+define('OPENWX_SSLCERT_PATH', '../cert/xyz_cert.pem');
+define('OPENWX_SSLKEY_PATH',  '../cert/xyz_key.pem');
 
-define('SIGN_APPID',       'wx4139a76ccb1f74b3');
-define('SIGN_APPSECRET',   '708ce8faa4ec48ba689b03e8fa7e592c');
+define('SIGN_APPID',       'wx38f1d15c5337e89b');
+define('SIGN_APPSECRET',   'fd6436e7427476dbe71a6333b3b02a96');
 
-define('AUTHOR_APPID',       'wx4139a76ccb1f74b3');
-define('AUTHOR_APPSECRET',   '708ce8faa4ec48ba689b03e8fa7e592c');
+//H5端,用户身份信息授权用的
+define('AUTHOR_APPID',       'wx38f1d15c5337e89b');
+define('AUTHOR_APPSECRET',   'fd6436e7427476dbe71a6333b3b02a96');

+ 1 - 1
docker-compose-dev.yml

@@ -9,6 +9,7 @@ services:
       - $PWD:/var/www/html
       - $PWD/conf/etc/localtime:/etc/localtime:ro
       - /Volumes/Transcend/upload:/var/www/html/data/upload
+      - /Users/stanley-king/work/WebProject/wapshop/dist:/var/www/html/mshop
       - $PWD/conf/nginx/cert:/etc/nginx/cert
       - $PWD/conf/nginx/nginx-debug-http.conf:/etc/nginx/nginx.conf:ro
     links:
@@ -85,7 +86,6 @@ services:
     command: [php, "/var/www/html/searcher.php"]
     depends_on:
       - "redisrv"
-
   crontabsrv:
       image: php-zts-debug:7.3.18
       volumes:

+ 1 - 0
docker-compose.yml

@@ -9,6 +9,7 @@ services:
       - $PWD:/var/www/html
       - $PWD/conf/etc/localtime:/etc/localtime:ro
       - /mnt/upload:/var/www/html/data/upload
+      - /mnt/wapshop:/var/www/html/mshop
       - $PWD/conf/nginx/cert:/etc/nginx/cert
       - $PWD/conf/nginx/nginx-prod-https.conf:/etc/nginx/nginx.conf:ro
     links:

+ 1 - 2
helper/fcgi_server.php

@@ -14,7 +14,6 @@ require_once (BASE_CORE_PATH . '/framework/function/http.php');
 class fcgi_server
 {
     static private $stInstance = NULL;
-
     static public function instance()
     {
         if(self::$stInstance == NULL) {
@@ -28,7 +27,7 @@ class fcgi_server
         static $exfiles = ['web_wxnotify.php',
             'wxnotify.php','pub_wxnotify.php','alipay_notify_url.php','dispatch_notify.php','kdniao_notify.php',
             'cmbpay_notify.php','cmbpay_sign.php','wxauthor.php','api/wxLogin/index.php','api/wxLogin/callback.php',
-            'test.php'];
+            'signature.php'];
         $path = BASE_ROOT_PATH . '/mobile/';
         $file = str_replace($path,'',$file);
 

+ 1 - 10
helper/third_author/wxauthor.php

@@ -37,16 +37,7 @@ class wxauthor
 
     public function enter($origin_url)
     {
-        if(defined('SERVER_TYPE') && SERVER_TYPE == 'panda') {
-            $back_url = 'https://passport.lrlz.com/mobile/wxauthor.php';
-        }
-        elseif(defined('SERVER_TYPE') && SERVER_TYPE == 'car') {
-            $back_url = 'http://cardev.lrlz.com/mobile/wxauthor.php';
-        }
-        else {
-            Log::record("找不到微信OpenWxPayConfig密钥",Log::ERR);
-        }
-
+        $back_url = BASE_SITE_URL . "/mobile/wxauthor.php";
         $params = [ 'appid' => self::appid,
                     'redirect_uri' => $back_url,
                     'response_type' => 'code',

+ 6 - 6
mobile/control/index.php

@@ -67,12 +67,12 @@ class indexControl extends specialControl
         $client_tpe = session_helper::client_type();
         if($client_tpe == session_helper::device_mini || $client_tpe == session_helper::device_wap) {
             $tabs = [];
-            $tabs[] = ['special_id' => 1383,'name' => '推荐'];
-            $tabs[] = ['special_id' => 1122,'name' => '品牌'];
-            $tabs[] = ['special_id' => 1025,'name' => '护肤'];
-            $tabs[] = ['special_id' => 1035,'name' => '彩妆'];
-            $tabs[] = ['special_id' => 1036,'name' => '洗护'];
-            $tabs[] = ['special_id' => 886,'name' => '男士'];
+            $tabs[] = ['special_id' => 1045,'name' => '推荐'];
+//            $tabs[] = ['special_id' => 1122,'name' => '品牌'];
+//            $tabs[] = ['special_id' => 1025,'name' => '护肤'];
+//            $tabs[] = ['special_id' => 1035,'name' => '彩妆'];
+//            $tabs[] = ['special_id' => 1036,'name' => '洗护'];
+//            $tabs[] = ['special_id' => 886,'name' => '男士'];
         }
         else {
             $tabs = index_tab::instance()->tabs();

+ 3 - 2
mobile/control/mshop.php

@@ -40,6 +40,7 @@ class mshopControl extends specialControl
         } else {
             $url = BASE_SITE_URL . "/mshop/";
         }
+        Log::record("url={$url}",Log::DEBUG);
 
         return self::outsuccess(['direct_uri' => $url],"redirect");
     }
@@ -198,7 +199,7 @@ class mshopControl extends specialControl
             $title = $this->special_name($valid);
             if($title != false) {
                 $success = true;
-                $sub_title = "丽人丽妆 内买商城\n\n点击浏览";
+                $sub_title = "椰子 内买商城\n\n点击浏览";
                 $img_url = $this->special_shareimg($valid);
                 $mini_url = "pages/special/special?title={$title}&special_id={$valid}";
             } else {
@@ -221,7 +222,7 @@ class mshopControl extends specialControl
                 }
                 $tip = $goods_info['goods_jingle'];
                 if(empty($title)) {
-                    $sub_title = "丽人丽妆 内买商城\n\n点击浏览";
+                    $sub_title = "椰子 内买商城\n\n点击浏览";
                 } else {
                     $sub_title = "{$tip}\n\n点击浏览";
                 }

+ 0 - 1
mobile/control/special.php

@@ -28,7 +28,6 @@ class specialControl extends mobileHomeControl
         if($special_id < 0) {
             return self::outerr(errcode::ErrParamter);
         }
-
         $spitem = spid_helper::instance()->special($special_id);
         if($spitem == false) {
             return self::outerr(errcode::ErrParamter,"该专题不存在");

+ 23 - 0
mobile/signature.php

@@ -0,0 +1,23 @@
+<?php
+
+Log::record("This is signatrue file.");
+
+
+$signature = $_GET["signature"];
+$timestamp = $_GET["timestamp"];
+$nonce = $_GET["nonce"];
+$echostr = $_GET["echostr"];
+
+echo("{$echostr}");
+
+$token = 'stanleykinghelloworld';
+$tmpArr = array($token, $timestamp, $nonce);
+sort($tmpArr, SORT_STRING);
+$tmpStr = implode( $tmpArr );
+$tmpStr = sha1( $tmpStr );
+
+if( $tmpStr == $signature ){
+    return true;
+}else{
+    return false;
+}

+ 51 - 54
mobile/wxauthor.php

@@ -20,64 +20,61 @@ Log::record("state:{$state} originurl=" . wechat_helper::get_origin_url(),Log::D
 if(empty($code)) {
     Log::record("没有同意授权");
 }
-else
+elseif(wechat_helper::has_origin_url())
 {
-    if(wechat_helper::has_origin_url())
+    $author = new thrid_author\wxauthor();
+    $user_info = $author->callback($code);
+    if(empty($user_info)) {
+        Log::record("微信取到的信息为空",Log::DEBUG);
+    }
+    else
     {
-        $author = new \thrid_author\wxauthor();
-        $user_info = $author->callback($code);
-        if(empty($user_info)) {
-            Log::record("微信取到的信息为空",Log::DEBUG);
-        }
-        else
-        {
-            wechat_helper::set_userinfo($user_info);
-            $origin_url = wechat_helper::get_origin_url();
-            wechat_helper::clear_origin_url();
-            Log::record("origin_url={$origin_url}",Log::DEBUG);
+        wechat_helper::set_userinfo($user_info);
+        $origin_url = wechat_helper::get_origin_url();
+        wechat_helper::clear_origin_url();
+        Log::record("origin_url={$origin_url}",Log::DEBUG);
 
-            if(!empty($origin_url))
-            {
-                $html = "<!DOCTYPE html>
-                        <html lang=\"en\">
-                            <head>
-                                <meta charset=\"UTF-8\">
-                                <meta http-equiv=\"Cache-Control\" content=\"no-cache, no-store, must-revalidate\" />
-                                <meta http-equiv=\"Pragma\" content=\"no-cache\" />
-                                <meta http-equiv=\"Expires\" content=\"0\" />
-                                <title>跳转中</title>
-                            </head> 
-                            <body>
-                                <script>
-                                    window.location.replace(\"{$origin_url}\");
-                                </script>
-                            </body>
-                        </html>";
+        if(!empty($origin_url))
+        {
+            $html = "<!DOCTYPE html>
+                    <html lang=\"en\">
+                        <head>
+                            <meta charset=\"UTF-8\">
+                            <meta http-equiv=\"Cache-Control\" content=\"no-cache, no-store, must-revalidate\" />
+                            <meta http-equiv=\"Pragma\" content=\"no-cache\" />
+                            <meta http-equiv=\"Expires\" content=\"0\" />
+                            <title>跳转中</title>
+                        </head> 
+                        <body>
+                            <script>
+                                window.location.replace(\"{$origin_url}\");
+                            </script>
+                        </body>
+                    </html>";
 
-                echo $html;
-            }
+            echo $html;
         }
     }
-    else
-    {
-        $host = urldecode($state);
-        $url = "{$host}/mobile/wxauthor.php?code={$code}";
-        Log::record("redirect url={$url}",Log::DEBUG);
-        $html = "<!DOCTYPE html>
-                        <html lang=\"en\">
-                            <head>
-                                <meta charset=\"UTF-8\">
-                                <meta http-equiv=\"Cache-Control\" content=\"no-cache, no-store, must-revalidate\" />
-                                <meta http-equiv=\"Pragma\" content=\"no-cache\" />
-                                <meta http-equiv=\"Expires\" content=\"0\" />
-                                <title>跳转中</title>
-                            </head>                        
-                            <body>
-                                <script>
-                                    window.location.replace(\"{$url}\");
-                                </script>
-                            </body>
-                        </html>";
-        echo $html;
-    }
+}
+else
+{
+    $host = urldecode($state);
+    $url = "{$host}/mobile/wxauthor.php?code={$code}";
+    Log::record("redirect url={$url}",Log::DEBUG);
+    $html = "<!DOCTYPE html>
+                    <html lang=\"en\">
+                        <head>
+                            <meta charset=\"UTF-8\">
+                            <meta http-equiv=\"Cache-Control\" content=\"no-cache, no-store, must-revalidate\" />
+                            <meta http-equiv=\"Pragma\" content=\"no-cache\" />
+                            <meta http-equiv=\"Expires\" content=\"0\" />
+                            <title>跳转中</title>
+                        </head>                        
+                        <body>
+                            <script>
+                                window.location.replace(\"{$url}\");
+                            </script>
+                        </body>
+                    </html>";
+    echo $html;
 }

+ 2 - 2
test/TestActivity.php

@@ -88,7 +88,7 @@ class TestActivity extends TestCase
             array('special_id' => 220,'name' => "男士"),
             array('special_id' => 197,'name' => "天猫店铺榜"),
             array('special_id' => 211,'name' => "美妆学院"),
-            array('special_id' => 195,'name' => "丽人丽妆")
+            array('special_id' => 195,'name' => "椰子电子商务责任有限公司")
         );
         $config['old_specials'] = array(74,87,105,110,188,190,197,220);
     }
@@ -96,7 +96,7 @@ class TestActivity extends TestCase
     public function testFull()
     {
         $contents = activity\full_sent::instance()->rules();
-        $store_list = Model('store')->getStoreOnlineList(array('store_id' => 6),null,'','store_free_price');
+        $store_list = Model('store')->getStoreOnlineList(['store_id' => 6],null,'','store_free_price');
     }
     public function testxActivity()
     {