Browse Source

Merge branch 'rmaster' of 39.97.239.116:gyfl/xyzshop into rmaster

ayHaru 4 years ago
parent
commit
fa8834e75d

+ 2 - 12
admin/control/merchant.php

@@ -1665,12 +1665,7 @@ class merchantControl extends SystemControl
     }
 
     private function successful_where() {
-        if(defined('COMPANY_NAME') && COMPANY_NAME === 'LZKJ_COMPANY') {
-            $url = 'https://www.lzkj168.cn/plot/days';
-        }
-        else {
-            $url = 'https://www.xyzshops.cn/plot/days';
-        }
+        $url = BASE_SITE_URL . '/plot/days';
         Log::record("successful get timestamp url : {$url}", Log::DEBUG);
         $data = http_request($url);
         if(empty($data)) return [];
@@ -1685,12 +1680,7 @@ class merchantControl extends SystemControl
     }
 
     public function successful_time_get_whereOp(){
-        if(defined('COMPANY_NAME') && COMPANY_NAME === 'LZKJ_COMPANY') {
-            $url = 'https://www.lzkj168.cn/plot/paths?time_stamp='.$_GET['timestamp'];
-        }
-        else {
-            $url = 'https://www.xyzshops.cn/plot/paths?time_stamp='.$_GET['timestamp'];
-        }
+        $url = BASE_SITE_URL . '/plot/paths?time_stamp='.$_GET['timestamp'];
         Log::record("successful get where url : {$url}", Log::DEBUG);
         $data = http_request($url);
         preg_match_all('/\d{10}\/[a-z]+\/\d{1,2}\/\d\/\d{2,4}/', $data, $matches);

+ 3 - 12
admin/templates/default/provider.successful.php

@@ -147,15 +147,8 @@
                 layer.msg('请选择时间');
                 return
             }
-            let base_src = ''
-            <?php
-            if (defined('COMPANY_NAME') && COMPANY_NAME === 'LZKJ_COMPANY'){?>
-                base_src = 'https://www.lzkj168.cn';
-            <?php }else{?>
-                base_src = 'https://www.xyzshops.cn';
-            <?php }?>
-            // console.log('val', time_stamp, interval,chname,quality,card_type,amount);
-            let src = base_src+"/plot/index?time_stamp="+time+"&interval="+interval+"&chname="+chname+"&quality="+quality+"&card_type="+card_type+"&amount="+amount
+
+            let src = window.location.origin + "/plot/index?time_stamp=" + time + "&interval=" + interval + "&chname=" + chname + "&quality=" + quality + "&card_type=" + card_type + "&amount=" + amount
             if (!interval) {
                 src = src.replace("&interval=", "")
             }
@@ -171,14 +164,12 @@
             if (!amount) {
                 src = src.replace("&amount=", "")
             }
-            // $('iframe').attr('src',src)
-            // console.log('src',src);
+
             $.get(src, function (data){
                 if (!data) {
                     return
                 }
                 $('iframe').attr('src',src)
-                // console.log('data', data);
             });
         });
     })

+ 60 - 46
data/config/win/refill.ini.php

@@ -141,49 +141,49 @@ $lingzh_phone = ['name' => 'lingzh', 'store_id' => 28,'qualitys' => '1,3,5',
             ['goods_id' => 6389, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6389, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
             ['goods_id' => 6389, 'price' => 9.53, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6389, 'price' => 9.25, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id' => 6389, 'price' => 9, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         20 => [
             ['goods_id' => 6390, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6390, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
             ['goods_id' => 6390, 'price' => 19.06, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6390, 'price' => 18.50, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6390, 'price' => 18, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         30 => [
             ['goods_id' => 6391, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6391, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
             ['goods_id' => 6391, 'price' => 28.59, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6391, 'price' => 27.75, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6391, 'price' => 27, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         50 => [
             ['goods_id' => 6392, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6392, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
             ['goods_id' => 6392, 'price' => 47.65, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6392, 'price' => 46.25, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6392, 'price' => 45, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         100 => [
             ['goods_id' => 6393, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6393, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
             ['goods_id' => 6393, 'price' => 95.3, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6393, 'price' => 92.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6393, 'price' => 90, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         200 => [
             ['goods_id' => 6394, 'price' => 190.60, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6394, 'price' => 190.20, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
             ['goods_id' => 6394, 'price' => 190.60, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6394, 'price' => 185.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6394, 'price' => 180, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         300 => [
             ['goods_id' => 6395, 'price' => 285.90, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6395, 'price' => 285.30, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
             ['goods_id' => 6395, 'price' => 285.90, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6395, 'price' => 277.50, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id' => 6395, 'price' => 270, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         500 => [
             ['goods_id' => 6396, 'price' => 476.50, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6396, 'price' => 475.50, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom'],
             ['goods_id' => 6396, 'price' => 476.50, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
-            ['goods_id' => 6396, 'price' => 462.50, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6396, 'price' => 450, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -454,19 +454,6 @@ $wantong_phone = ['name' => 'wantong', 'store_id' => 36, 'qualitys' => '4',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$yunling_phone = ['name' => 'yunling', 'store_id' => 37, 'qualitys' => '1',
-    'amount' => [
-        10 => [['goods_id' => 6456, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6457, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6458, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6459, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6460, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6461, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6462, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6463, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'official_sn' => true, 'refill_type' => 'api'];
-
 $zhongst_phone = ['name' => 'zhongst', 'store_id' => 39, 'qualitys' => '4',
     'amount' => [
         10 => [['goods_id' => 6464, 'price' => 9.35, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
@@ -530,52 +517,65 @@ $afandfs_phone = ['name' => 'afandfs', 'store_id' => 41, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$yunling_phone = ['name' => 'yunling', 'store_id' => 37, 'qualitys' => '1',
+    'amount' => [
+        10 => [['goods_id' => 6456, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6457, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6458, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6459, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6460, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6461, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6462, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6463, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $yunlingfs_phone = ['name' => 'yunlingfs', 'store_id' => 42, 'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6488, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile']],
-        20 => [['goods_id' => 6489, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile']],
-        30 => [['goods_id' => 6490, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile']],
-        50 => [['goods_id' => 6491, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile']],
-        100 => [['goods_id' => 6492, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile']],
-        200 => [['goods_id' => 6493, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile']],
-        300 => [['goods_id' => 6494, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile']],
-        500 => [['goods_id' => 6495, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile']]
+        10 => [['goods_id' => 6488, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile']],
+        20 => [['goods_id' => 6489, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile']],
+        30 => [['goods_id' => 6490, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile']],
+        50 => [['goods_id' => 6491, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile']],
+        100 => [['goods_id' => 6492, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile']],
+        200 => [['goods_id' => 6493, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile']],
+        300 => [['goods_id' => 6494, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile']],
+        500 => [['goods_id' => 6495, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$tiancheng_phone = ['name' => 'tiancheng', 'store_id' => 41, 'qualitys' => '1',
+$tiancheng_phone = ['name' => 'tiancheng', 'store_id' => 43, 'qualitys' => '1',
     'amount' => [
         10 => [
-            ['goods_id' => 6480, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6480, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6496, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6496, 'price' => 9.45, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6481, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6481, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6497, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6497, 'price' => 18.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6482, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6482, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6498, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6498, 'price' => 28.35, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6483, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6483, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6499, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6499, 'price' => 47.25, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6484, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6484, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6500, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6500, 'price' => 94.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6485, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6485, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6501, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6501, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6486, 'price' => 285.3, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6486, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6502, 'price' => 285.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6502, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6487, 'price' => 475.5, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6487, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']
+            ['goods_id' => 6503, 'price' => 475.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6503, 'price' => 472.5, 'quality' => 1, 'card_type' => 'chinamobile,chinatelecom']
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -606,6 +606,19 @@ $xunao_phone = ['name' => 'xunao', 'store_id' => 44, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$weiyiman_phone = ['name' => 'weiyiman', 'store_id' => 45, 'qualitys' => '5',
+    'amount' => [
+        10 => [['goods_id' => 6512, 'price' => 8.8, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6513, 'price' => 17.6, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6514, 'price' => 26.4, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6515, 'price' => 44, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6516, 'price' => 88, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6517, 'price' => 176, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6518, 'price' => 264, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6519, 'price' => 440, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -632,5 +645,6 @@ $phone_providers = [
     ['name' => 'yunlingfs', 'cfg' => $yunlingfs_phone],
     ['name' => 'tiancheng', 'cfg' => $tiancheng_phone],
     ['name' => 'xunao', 'cfg' => $xunao_phone],
+    ['name' => 'weiyiman', 'cfg' => $weiyiman_phone],
 ];
 $config['phone_providers'] = $phone_providers;

+ 16 - 2
data/config/xyz/refill.ini.php

@@ -570,8 +570,8 @@ $tiancheng_phone = ['name' => 'tiancheng', 'store_id' => 43, 'qualitys' => '1',
             ['goods_id' => 6501, 'price' => 189, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 64502, 'price' => 285.3, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 64502, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6502, 'price' => 285.3, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6502, 'price' => 283.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         500 => [
             ['goods_id' => 6503, 'price' => 475.5, 'quality' => 1, 'card_type' => 'chinamobile'],
@@ -606,6 +606,19 @@ $xunao_phone = ['name' => 'xunao', 'store_id' => 44, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$weiyiman_phone = ['name' => 'weiyiman', 'store_id' => 45, 'qualitys' => '5',
+    'amount' => [
+        10 => [['goods_id' => 6512, 'price' => 8.8, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6513, 'price' => 17.6, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6514, 'price' => 26.4, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6515, 'price' => 44, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6516, 'price' => 88, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6517, 'price' => 176, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6518, 'price' => 264, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6519, 'price' => 440, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -632,5 +645,6 @@ $phone_providers = [
     ['name' => 'yunlingfs', 'cfg' => $yunlingfs_phone],
     ['name' => 'tiancheng', 'cfg' => $tiancheng_phone],
     ['name' => 'xunao', 'cfg' => $xunao_phone],
+    ['name' => 'weiyiman', 'cfg' => $weiyiman_phone],
 ];
 $config['phone_providers'] = $phone_providers;

+ 1 - 1
helper/fcgisrv/MobileServer.php

@@ -59,7 +59,7 @@ class MobileServer extends BaseServer
             'refill_weiyi.php','refill_tonglu.php','refill_xc.php','refill_xunyin.php',
             'refill_yunling.php','refill_wantong.php','refill_zhongst.php',
             'refill_luqian.php','refill_afandfs.php','refill_yunlingfs.php',
-            'refill_tiancheng.php','refill_xunao.php'
+            'refill_tiancheng.php','refill_xunao.php','refill_weiyiman.php'
         ];
 
         $this->setExFiles($exfiles);

+ 50 - 0
helper/refill/api/xyz/weiyiman/RefillCallBack.php

@@ -0,0 +1,50 @@
+<?php
+namespace refill\weiyiman;
+
+require_once(BASE_HELPER_RAPI_PATH . '/weiyiman/config.php');
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $sign = $this->sign($params);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    private function sign($params)
+    {
+        $content  = config::USER_ID . $params['ordernum'] . $params['timestamp'] . config::KEY;
+        return md5($content);
+    }
+
+    //[$order_id, $success, $can_try, $need_handle]
+    public function notify($params)
+    {
+        $status = intval($params['state']);
+        $order_sn = $params['ordernum'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+        $order_id = $order_info['order_id'];
+        
+        $data['official_sn'] = strtolower($params['serialno']) == 'null' ? '' : $params['serialno'];
+
+        if ($status === 2) {
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 3) {
+            return [$order_id, false, true,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 96 - 0
helper/refill/api/xyz/weiyiman/RefillPhone.php

@@ -0,0 +1,96 @@
+<?php
+namespace refill\weiyiman;
+
+require_once(BASE_HELPER_RAPI_PATH . '/weiyiman/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, string $order_sn)
+    {
+        $params['userid'] = config::USER_ID;
+        $params['orderid'] = $order_sn;
+        $params['echo'] = rand(100000,999999);
+        $params['timestamp'] = date("YmdHis");
+        $params['version'] = '1.0';
+        $params['packcode'] = $amount;
+        $params['mobile'] = $phone;
+        $params['flowtype'] = '1001';
+        $params['callback_url'] = config::NOTIFY_URL;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params)
+    {
+        $params = $this->req_params($card_no, $amount, $params['order_sn']);
+        $sign = $this->sign($params);
+        $params['chargeSign'] = $sign;
+
+        $params = json_encode($params);
+
+        $resp = http_post_data(config::ORDER_URL, $params , config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($resp['code'] === '0000') {
+                return [true, '', false];
+            } else {
+                return [false, $resp['desc'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['orderid'] = $refill_info['order_sn'];
+        $params['userid'] = config::USER_ID;
+        $params['timestamp'] = date("YmdHis");
+        $content = $params['userid'] . $params['orderid'] . $params['timestamp'] . config::KEY;
+        $params['sign'] = md5($content);
+        $params = json_encode($params);
+
+        $resp = http_post_data(config::QUERY_URL, $params , config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            } elseif ($resp['code'] === '0000') {
+                $order_state = ORDER_STATE_SUCCESS;
+            } elseif ($resp['code'] === '0004') {
+                $order_state = ORDER_STATE_CANCEL;
+            } elseif ($resp['code'] === '0002' || $resp['code'] === '0003') {
+                $order_state = ORDER_STATE_SEND;
+            } else {
+                return [false, $resp['desc']];
+            }
+            return [true, $order_state];
+        }
+    }
+
+    private function sign($params)
+    {
+        $content  = $params['userid'] . $params['orderid'] . config::KEY . $params['echo'] . $params['timestamp'];
+        return md5($content);
+    }
+
+}

+ 13 - 0
helper/refill/api/xyz/weiyiman/config.php

@@ -0,0 +1,13 @@
+<?php
+namespace refill\weiyiman;
+
+class config
+{
+    const ORDER_URL = 'http://115.28.209.246:8081/api/charge.do';
+    const QUERY_URL = 'http://115.28.209.246:8081/api/query_chargestate.do';
+
+    const USER_ID = 'd62df4c1fc804cd48f86';
+    const KEY = '7f3feb5e0c1049f4b839';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_weiyiman.php";
+    const ExtHeaders = ['Content-Type: application/json'];
+}

+ 1 - 1
mobile/control/merchant_info.php

@@ -12,7 +12,7 @@ class merchant_infoControl extends mbMerchantControl
     {
         $mchid = $this->mchid();
         $model_merchant = Model('merchant');
-        $field = 'mchid,admin_id,name,alarm_amount,ip_white_list,use_key,contact_name,contact_phone,warning_phone,company_name,quality,time_out';
+        $field = 'mchid,admin_id,name,alarm_amount,ip_white_list,use_key,contact_name,contact_phone,warning_phone,company_name,quality,time_out,credit_bonus';
         $merchant_info = $model_merchant->getMerchantInfo(['mchid' => $mchid], $field);
         $model_member = Model('member');
         $member_info = $model_member->getMemberInfo(['member_id' => $merchant_info['admin_id']], 'available_predeposit');

+ 5 - 0
mobile/refill_weiyiman.php

@@ -0,0 +1,5 @@
+<?php
+$content = $_SERVER['post_content'];
+$input = json_decode($content,true);
+
+refill\util::push_notify('weiyiman',$input);

+ 32 - 7
plot/DataCenter.py

@@ -141,7 +141,7 @@ class DataCenter(object):
             print(ex)
             return []
 
-    def paths(self,time_stamp):
+    def paths(self, time_stamp):
         try:
             day_stamp = self.day_stamp(time_stamp)
             hfive = h5py.File(self._file_name, 'r')
@@ -184,10 +184,10 @@ class DataCenter(object):
             for path, data in self.read_data(hfive, paths):
                 data = np.array(data)
                 predata = predata + data
-                self._draw_plot(ax, x, day_stamp, start_pos,end_pos, data, interval, path)
+                self._draw_plot(ax, x, day_stamp, start_pos, end_pos, data, interval, path)
                 logger.info("path=%s", path)
 
-            self._draw_plot(ax, x, day_stamp, start_pos,end_pos, predata, interval, filer_text)
+            self._draw_plot(ax, x, day_stamp, start_pos, end_pos, predata, interval, filer_text)
 
             ax.legend()
             ax.grid()
@@ -208,8 +208,6 @@ class DataCenter(object):
         for path in paths:
             yield path, hfive[path]
 
-
-
     def datasets(self, hfive, start_time, **kwargs):
         logger = logging.getLogger('app')
 
@@ -269,7 +267,7 @@ class DataCenter(object):
 
         return filer_text, paths
 
-    def _draw_plot(self, ax, x, day_stamp, start_pos,end_pos, data, interval=300, path=''):
+    def _draw_plot(self, ax, x, day_stamp, start_pos, end_pos, data, interval=300, path=''):
         import matplotlib.dates as mdate
         # 'commit-succ': 0, 'commit-fail': 1, 'notify-succ': 2, 'notify-fail': 3, 'user_succ': 4
 
@@ -294,8 +292,35 @@ class DataCenter(object):
             x = x[pos]
             ySucc = ySucc[pos]
 
+        opened = np.where(ySucc > 0)
+        if len(opened) == 0:
+            return False
+
         xs = np.array([stime.strftime('%H:%M', stime.localtime(d + day_stamp)) for d in x])
         ax.yaxis.set_major_formatter(ticker.PercentFormatter(xmax=1, decimals=0))
-        ax.plot(xs, ySucc, ls='--', marker='o', label=path)
+        ax.plot(xs, ySucc, ls='--', marker='o', label=self._label(path))
+
+        return True
+
+    def _label(self,path):
+        items = re.split(r'/', path)
+        if len(items) == 6:
+            (_, _sday, _chname, _quality, _card_type, _amount) = items
+            card_type = ''
+            if _card_type == '1':
+                card_type = 'sy'
+            elif _card_type == '2':
+                card_type = 'sh'
+            elif _card_type == '4':
+                card_type = 'yd'
+            elif _card_type == '5':
+                card_type = 'lt'
+            elif _card_type == '6':
+                card_type = 'dianxin'
+            return f"{_chname}-{_quality}-{card_type}-{_amount}"
+        else:
+            return path
+
+
 
 dataCenter = DataCenter()

+ 3 - 5
plot/app.py

@@ -46,9 +46,6 @@ def index():
     else:
         interval = int(interval)
 
-    # buf = dataCenter.draw_plot(1618243200, chname=chname)
-    # , quality=quality, card_type=card_type, interval=interval,
-    #                        amount=amount)1618502478
     buf = dataCenter.draw_plot(time_stamp, interval=interval, chname=chname, quality=quality, card_type=card_type,
                                amount=amount)
     data = base64.b64encode(buf.getbuffer()).decode("ascii")
@@ -57,8 +54,9 @@ def index():
 
 @app.route('/plot/days')
 def days():
-    datas = dataCenter.days()
-    return jsonify(datas)
+    dates = dataCenter.days()
+    dates.reverse()
+    return jsonify(dates)
 
 @app.route('/plot/paths')
 def paths():

+ 1 - 1
plot/thdf5.py

@@ -60,7 +60,7 @@ class DataTest(unittest.TestCase):
         print(days)
 
     def test_data(self):
-        buf = dataCenter.draw_plot(1619020800, chname='lingzh')
+        buf = dataCenter.draw_plot(1619020800)
         img = Image.open(buf)
         img.show()
 

+ 1 - 1
test/TestRefill.php

@@ -332,7 +332,7 @@ class TestRefill extends TestCase
     public function testPrice()
     {
         $amounts = [10, 20, 30, 50, 100, 200, 300, 500];
-        $rate = 0.94;
+        $rate = 0.88;
         foreach ($amounts as $amount) {
             $price[] = $amount * $rate;
         }

+ 1 - 1
test/TestTime.php

@@ -143,7 +143,7 @@ class TestTime extends TestCase
     public function testZero()
     {
         $x = time();
-        $date = date('Y-m-d H:i:s',1618243200);
+        $date = date('Y-m-d H:i:s',1619020800);
         $day_start = strtotime("{$date}");
 
     }