stanley-king 7 år sedan
förälder
incheckning
326485012e
4 ändrade filer med 3687 tillägg och 7 borttagningar
  1. 14 0
      crontab/control/date.php
  2. 3639 0
      data/mobile/omsid.php
  3. 0 7
      mobile/control/index.php
  4. 34 0
      mobile/control/mshop.php

+ 14 - 0
crontab/control/date.php

@@ -11,6 +11,7 @@ defined('InShopNC') or exit('Access Invalid!');
 
 require_once(BASE_ROOT_PATH . '/helper/notify_helper.php');
 require_once(BASE_ROOT_PATH . '/helper/stat_helper.php');
+require_once(BASE_DATA_PATH . '/mobile/omsid.php');
 
 
 class dateControl extends BaseCronControl
@@ -112,6 +113,19 @@ class dateControl extends BaseCronControl
         $this->_stat_daily();
     }
 
+    public function omsidOp()
+    {
+        $serials = omsid();
+        $mod_goods = Model('goods');
+        foreach ($serials as $goods_serial => $omsid)
+        {
+            $ret = $mod_goods->where(['goods_serial' => $goods_serial])->update(['oms_id' => $omsid]);
+            if($ret == false) {
+                Log::record("cannot update goods_serial = {$goods_serial}",Log::ERR);
+            }
+        }
+    }
+
     public function _stat_daily()
     {
         $cur_date = new DateTime();

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 3639 - 0
data/mobile/omsid.php


+ 0 - 7
mobile/control/index.php

@@ -65,13 +65,6 @@ class indexControl extends specialControl
         }
     }
 
-    public function wxauthorOp()
-    {
-        util::from_wechat();
-        \thrid_author\wxauthor::enter();
-        return self::outsuccess(null,'','wap');
-    }
-
     public function inoherbOp()
     {
         if(session_helper::need_wechat_author())

+ 34 - 0
mobile/control/mshop.php

@@ -0,0 +1,34 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: stanley-king
+ * Date: 2017/6/13
+ * Time: 下午3:51
+ */
+
+class indexControl extends specialControl
+{
+    public function __construct()
+    {
+        parent::__construct();
+    }
+
+    private function author($url)
+    {
+        if(session_helper::need_wechat_author())
+        {
+            $author = new thrid_author\wxauthor();
+            $url = "http://p.lrlz.com/hfive/inoherb/index.html?2";
+            $author->enter($url);
+            return;
+        }
+        else {
+            fcgi_header('location:http://p.lrlz.com/hfive/inoherb/index.html?2');
+        }
+    }
+
+    public function tabsOp()
+    {
+        return self::outsuccess(['tabs' => [['special_id' => 0,'name' => "首页"]]]);
+    }
+}