stanley-king 2 years ago
parent
commit
5cb6c8401f

+ 2 - 2
docker/compose/workcuda/acc/docker-compose.yml

@@ -41,11 +41,11 @@ services:
   vapisrv:
     image: php-zts:7.3.18
     ports:
-      - 9100:9702
+      - 9702:9100
     volumes:
       - ../../../../:/var/www/html
       - ../conf/etc/localtime:/etc/localtime:ro
-      - ../conf/php/php-debg.ini:/usr/local/etc/php/php.ini
+      - ../conf/php/php-debug.ini:/usr/local/etc/php/php.ini
       - /mnt/upload:/var/www/html/data/upload
       - /mnt/shoplog:/var/www/html/data/log
       - ../conf/php/vapi-spwan-start:/usr/local/bin/docker-spwan-start

+ 9 - 0
docker/compose/workcuda/conf/nginx/nginx.conf

@@ -101,6 +101,15 @@ http
             try_files $uri $uri/ /mobile/index.html;
         }
 
+        location ~ /vapi/[/\w]+\.php$ {
+            root           $folder_name;
+            fastcgi_pass   docker.hostip:9702;
+            fastcgi_index  index.php;
+            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
+            fastcgi_param  SIGN $http_sign;
+            include fastcgi_params;
+        }
+
         location ~ /racc/[/\w]+\.php$ {
             root           $folder_name;
             fastcgi_pass   docker.hostip:9101;

+ 0 - 9
docker/compose/yl/conf/nginx/nginx.conf

@@ -107,15 +107,6 @@ http
             include fastcgi_params;
         }
 
-        location ~ /vapi/[/\w]+\.php$ {
-            root           $folder_name;
-            fastcgi_pass   docker.hostip:9702;
-            fastcgi_index  index.php;
-            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
-            fastcgi_param  SIGN $http_sign;
-            include fastcgi_params;
-        }
-
         location ~ \.php$ {
 	        add_header Cache-Control no-store;
             root           $folder_name;

+ 7 - 0
test/TestRefillMonitor.php

@@ -102,4 +102,11 @@ class TestRefillMonitor extends TestCase
     {
         $mchannel = new refill\mchannel();
     }
+
+    public function testDbConnect()
+    {
+        $mod = Model();
+        $result = $mod->table('refill_order')->limit(10)->select();
+        Log::record('',Log::DEBUG);
+    }
 }

vapi/control/card_check.php → vapi/control/card.php


+ 5 - 16
vapi/vapi.php

@@ -1,12 +1,13 @@
 <?php
 declare(strict_types=1);
 
-define('APP_ID', 'racc');
+define('APP_ID', 'vapi');
 define('MOBILE_SERVER',true);
-define('BASE_ROOT_PATH', str_replace('/racc', '', dirname(__FILE__)));
-define('BASE_PATH', BASE_ROOT_PATH . '/racc');
+define('BASE_ROOT_PATH', str_replace('/vapi', '', dirname(__FILE__)));
+define('BASE_PATH', BASE_ROOT_PATH . '/vapi');
 
 require_once(BASE_ROOT_PATH . '/global.php');
+require_once(BASE_CORE_PATH . '/lrlz.php');
 require_once(BASE_ROOT_PATH . '/fooder.php');
 require_once(BASE_PATH . '/index.php');
 
@@ -36,19 +37,7 @@ require_once(BASE_ROOT_PATH . '/helper/url_helper.php');
 require_once(BASE_ROOT_PATH . '/helper/activity_helper.php');
 require_once(BASE_HELPER_PATH . '/refill/util.php');
 
-//function all_channels() {
-//    return [];
-//}
-//
-//Base::mobile_init();
-//$trdid = Thread::getCurrentThreadId();
-//Log::record("thread id = {$trdid}",Log::INFO);
-//
-//$gMessageStates = new MsgStates();
-//StatesHelper::init();
-//$listener = new message\subscriber($gMessageStates);
-//$listener->start();
-
+Base::mobile_init();
 
 require_once(BASE_HELPER_PATH . '/fcgisrv/VApiServer.php');
 Log::record("fcgisrv\VApiServer start",Log::DEBUG);