Browse Source

merge from rtest

stanley-king 4 years ago
parent
commit
d81a80e131
31 changed files with 1856 additions and 519 deletions
  1. 26 10
      admin/control/refill_stock.php
  2. 2 1
      admin/include/menu.php
  3. 12 3
      admin/templates/default/css/recharge.css
  4. 1 1
      admin/templates/default/layout/index_layout.php
  5. 1 1
      admin/templates/default/provider.amount.control.php
  6. 511 0
      admin/templates/default/refill_stock.php
  7. 109 20
      data/config/lingzh/refill.ini.php
  8. 307 340
      data/config/win/refill.ini.php
  9. 6 5
      helper/fcgisrv/LZRAccServer.php
  10. 79 0
      helper/refill/api/lingzh/shengying/RefillCallBack.php
  11. 154 0
      helper/refill/api/lingzh/shengying/RefillPhone.php
  12. 21 0
      helper/refill/api/lingzh/shengying/config.php
  13. BIN
      helper/refill/api/lingzh/shengying/商户话费充值协议(1.1).doc
  14. 20 0
      helper/refill/api/lingzh/shengying/对接文档.txt
  15. 53 0
      helper/refill/api/lingzh/wailing/RefillCallBack.php
  16. 121 0
      helper/refill/api/lingzh/wailing/RefillPhone.php
  17. 3 0
      helper/refill/api/lingzh/wailing/account.txt
  18. BIN
      helper/refill/api/lingzh/wailing/api.pdf
  19. 15 0
      helper/refill/api/lingzh/wailing/config.php
  20. 52 0
      helper/refill/api/lingzh/weishengy/RefillCallBack.php
  21. 108 0
      helper/refill/api/lingzh/weishengy/RefillPhone.php
  22. BIN
      helper/refill/api/lingzh/weishengy/api.docx
  23. 7 0
      helper/refill/api/lingzh/weishengy/api.txt
  24. 15 0
      helper/refill/api/lingzh/weishengy/config.php
  25. 6 10
      helper/refill/policy/rlock.php
  26. 4 0
      racc/callback/lingzh/shengying.php
  27. 4 0
      racc/callback/lingzh/wailing.php
  28. 4 0
      racc/callback/lingzh/weishengy.php
  29. 139 90
      shop/templates/default/seller/card_key.form.php
  30. 56 38
      shop/templates/default/seller/card_key.oil.form.php
  31. 20 0
      test/TestRefill.php

+ 26 - 10
admin/control/refill_stock.php

@@ -16,15 +16,22 @@ class refill_stockControl extends SystemControl
         $refill_oil_specs = $config['refill_oil_specs'];
         arsort($refill_oil_specs);
         if(chksubmit()) {
-
             $total = 0;
             foreach ($refill_oil_specs as $amount) {
                 $key = "total-{$amount}-amount";
-                $incr = $_POST[$key];
-                $total += $incr * $amount;
+                $incr = $_POST[$key] * $amount;
+                $total += $incr;
                 \refill\rlock::set_total_amount($key, $incr);
             }
             \refill\rlock::set_total_amount('total-amount', $total);
+            $mtotal_amounts = $_POST['mtotal_amount'];
+            foreach ($mtotal_amounts as $key => $mtotal_amount) {
+                \refill\rlock::set_amount_stock($key, $mtotal_amount);
+            }
+            $mtotal_turns = $_POST['mtotal_turn'];
+            foreach ($mtotal_turns as $turn_key => $mtotal_turn) {
+                \refill\rlock::set_amount_turn($turn_key, $mtotal_turn);
+            }
 
             $mchids = $_POST['mchid'];
             $amounts = $_POST['amount'];
@@ -66,19 +73,28 @@ class refill_stockControl extends SystemControl
         foreach ($amounts as $amount) {
             $key = "total-{$amount}-amount";
             $tamount = \refill\rlock::get_total_amount($key);
-            $amount_stock[$amount] = $tamount == false ? 0 : $tamount;
+            $amount_stock[$amount] = intval($tamount / $amount);
 
             foreach ($merchant_list as $merchant) {
                 $data = [];
 
                 $mchid = $merchant['mchid'];
-                $mturn_key = "{$mchid}-{$amount}-turn";
-                $mturn = \refill\rlock::get_amount_turn($mturn_key);
-                $data['turn'] = $mturn == false ? 0 : $mturn;
-                $mtotal_key = "{$mchid}-{$amount}-total";
-                $mtotal = \refill\rlock::get_amount_stock($mtotal_key) ?? 0;
-                $data['default_count'] = intval($mtotal / $amount);
+                $mamount_turn_key = "{$mchid}-{$amount}-turn";
+                $mamount_turn = \refill\rlock::get_amount_turn($mamount_turn_key);
+                $data['turn'] = $mamount_turn == false ? 1 : $mamount_turn;
+
+                $mamount_key = "{$mchid}-{$amount}-total";
+                $mamount = \refill\rlock::get_amount_stock($mamount_key);
+                $data['default_count'] = intval($mamount / $amount);
                 $mtactics["{$mchid}-{$amount}"] = $data;
+
+                $mtotal_key = "{$mchid}-amount";
+                $mtotal = \refill\rlock::get_amount_stock($mtotal_key);
+                $mtactics["{$mchid}-amount"] = $mtotal == false ? 0 : $mtotal;
+
+                $mturn_key = "{$mchid}-turn";
+                $mturn = \refill\rlock::get_amount_turn($mturn_key);
+                $mtactics["{$mchid}-turn"] = $mturn == false ? 1 : $mturn;
             }
         }
         return ['total' => $total, 'amount_stock' => $amount_stock, 'mtactics' => $mtactics];

+ 2 - 1
admin/include/menu.php

@@ -99,7 +99,8 @@ $arr = array(
 					array('args'=>'provider,merchant,merchant',				'text'=>'通道列表'),
 					array('args'=>'OrderSendList,merchant,merchant',		'text'=>'超时订单监控'),
 					array('args'=>'OrderStats,merchant,merchant',			'text'=>'对账管理'),
-					array('args'=>'stats,card_key,merchant',				'text'=>'卡密管理')
+					array('args'=>'stats,card_key,merchant',				'text'=>'卡密管理'),
+					array('args'=>'index,refill_stock,merchant',				'text'=>'库存管理')
 				)
 			),
 			4 => array(

+ 12 - 3
admin/templates/default/css/recharge.css

@@ -4,9 +4,15 @@
 .w40 {width:40px;}
 .w50 {width:50px;}
 .w70 {width: 70px;}
+.w86 {width:86px;}
+.w90 {width:90px;}
+.w100 {width:100px;}
 .w130 {width: 130px;}
 .w160 {width:160px;}
 
+.mw24 {min-width:24px;}
+.mw60 {min-width:60px;}
+.mw96 {min-width:96px;}
 .mw120 {min-width:120px;}
 .mw130 {min-width:130px;}
 .mw160 {min-width:160px;}
@@ -44,14 +50,17 @@
 .provider_amount_control .styleOne {width: 30px;display:inline-block;}
 .provider_amount_control .tb-type2 th.td { padding-right: 0;border-bottom: 1px dotted #CBE9F3;}
 .provider_amount_control .fixed-bar { margin-left:0px;padding-left:20px;}
-.provider_amount_control #tableHread { position: fixed;top:138px;left:20px;background-color: #fff;z-index:999;width: 96.5%%;}
+.provider_amount_control #tableHread { position: fixed;top:138px;left:20px;background-color: #fff;z-index:999;width: 96.5%;}
 .provider_amount_control .tableContent { display: block;padding-top: 79px;}
 .provider_amount_control #tableHread th,
 .provider_amount_control #tableHread td{ background-color: #fff;}
-.provider_amount_control #tableHread  { position: fixed;top:138px;left:20px;background-color: #fff;z-index:999;width: 96.5%%;}
-.provider_amount_control .batch-td { text-align: center;width: 160px;min-width:160px;padding-right: 10px;}
+.provider_amount_control #tableHread  { position: fixed;top:138px;left:20px;background-color: #fff;z-index:999;width: 96.5%;}
+.provider_amount_control .batch-td { text-align: center;width: 150px;min-width:150px;padding-right: 10px;}
 .provider_amount_control .batch-td .listNum { width: 51px;display:inline-block;}
 .provider_amount_control .batch-td .priority { width: 45px;display:inline-block;}
+/* 提示边框 */
+.redBorder {border-color: #e64444 !important;}
+
 /* 表单 */
 input[type="number"] {
   color: rgb(51, 51, 51);

+ 1 - 1
admin/templates/default/layout/index_layout.php

@@ -109,7 +109,7 @@ function openItem(args){
 		$.cookie('now_location_op',op);
 		$("a[name='item_"+op+act+"']").addClass('selected');
 		//crumbs
-		$('#crumbs').html('<span>'+$('#nav_'+nav+' > span').html()+'</span><span class="arrow">&nbsp;</span><span>'+$('#item_'+op+act).html()+'</span>');
+		$('#crumbs').html('<span>'+$('#nav_'+nav+' > span').html()+'</span><span class="arrow">&nbsp;</span><span>'+$('#item_'+op).html()+'</span>');
 	}
 	src = 'index.php?act='+act+'&op='+op;
 	$('#workspace').attr('src',src);

+ 1 - 1
admin/templates/default/provider.amount.control.php

@@ -1,4 +1,4 @@
-<link href="<?php echo ADMIN_TEMPLATES_URL;?>/css/recharge.css?5" rel="stylesheet" type="text/css" id="cssfile2" />
+<link href="<?php echo ADMIN_TEMPLATES_URL;?>/css/recharge.css?2" rel="stylesheet" type="text/css" id="cssfile2" />
 <?php defined('InShopNC') or exit('Access Invalid!'); ?>
 <div class="page provider_amount_control">
     <div class="fixed-bar">

+ 511 - 0
admin/templates/default/refill_stock.php

@@ -0,0 +1,511 @@
+<link href="<?php echo ADMIN_TEMPLATES_URL;?>/css/recharge.css?4" rel="stylesheet" type="text/css" id="cssfile2" />
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+<div class="page">
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>库存管理</h3>
+            <ul class="tab-base">
+                <li><a href="JavaScript:void(0);"  class="current"><span>机构库存</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <div class="fixed-empty"></div>
+    <form id="price_form" enctype="multipart/form-data" method="post">
+        <input type="hidden" name="form_submit" value="ok"/>
+        <table class="table tb-type2 tableFixed">
+            <tbody style="display:block;width:830px">
+            <tr>
+                <td colspan="2" class="required"><label>机构库存:</label></td>
+            </tr>
+            <tr class="noborder">
+                <?php foreach ($output['refill_oil_specs'] as $amount) {?>
+                <td class="moneySum w160">
+                    <div class="align-center"><?php echo $amount;?></div>
+                    <div style="position: relative;">
+                        <div style="width:50%;">
+                            <span>
+                                剩余(张)
+                                <div style="width:50%">
+                                    <input type="number" readonly class="w50 surplus" value="<?php echo $output['total_stock']['amount_stock'][$amount]?>" style="background-color: #eaeaea;">
+                                </div>
+                            </span>
+                        </div>
+                        <div style="width:50%;position: absolute;top: 0;right: 0;">
+                            <span>
+                                变动(张)
+                                <div style="width:50%">
+                                    <input type="number" name="total-<?php echo $amount;?>-amount" data-money="<?php echo $amount;?>" class="w50 money amountInput" value="0">
+                                </div>
+                            </span>
+                        </div>
+                    </div>
+                </td>
+                <?php }?>
+            </tr>
+            <tr class="noborder w500">
+                <td>
+                    余额:<span id="total"><?php echo $output['total_stock']['total'];?></span>
+                </td>
+                <td>
+                    变动总额:<span id="changeTotal">0</span>
+                </td>
+                <td>
+                    变动后总额:<span id="sumTotal"><?php echo $output['total_stock']['total'];?></span>
+                </td>
+            </tr>
+            <tr class="noborder">
+                <table class="table tb-type2" style="margin-top:180px">
+                    <thead class="flex_thead" style="top:200px" id="tableHread">
+
+                        <tr class="w500">
+                            <th class="align-center w96 mw96" rowspan="2">机构名称</th>
+                            <th class="align-center w60 mw60" colspan="3">机构金额</th>
+                            <th class="align-center w24 mw24"></th>
+                            <?php foreach ($output['refill_oil_specs'] as $amount) {?>
+                                <th class="align-center w60 tbNum mw60" colspan="3"><?php echo $amount;?></th>
+                                <th class="align-center w24 mw24"></th>
+                            <?php }?>
+                        </tr>
+                        <tr class="w500">
+                            <th class="align-center w60 mw60">剩余金额</th>
+                            <th class="align-center w60 mw60">变动金额</th>
+                            <th class="align-center w60 mw60">是否开启</th>
+                            <th class="align-center w24 mw24"></th>
+                            <?php foreach ($output['refill_oil_specs'] as $amount) {?>
+                            <th class="align-center w60 mw60">剩余张数</th>
+                            <th class="align-center w60 mw60">变动张数</th>
+                            <th class="align-center w60 mw60">是否开启</th>
+                            <th class="align-center w24 mw24"></th>
+                            <?php }?>
+                        </tr>
+                    </thead>
+                    <tbody class="tbody" style="display: block;padding-top: 37px;">
+                        <?php foreach ($output['merchant_list'] as $merchant) {?>
+                        <tr class="w500 trFlex">
+                            <td class="w96 align-center" style="min-width:96px">
+                                <?php echo $merchant['company_name'];?>
+
+                            </td>
+                            <td class="w50 align-center">
+                                <input type="number" readonly class="w50"
+                                       value="<?php echo $output['total_stock']['mtactics']["{$merchant['mchid']}-amount"];?>" style="background-color: #eaeaea;">
+                            </td>
+                            <td class="w50 align-center">
+                                <input type="number" class="w50 mecChange" name="mtotal_amount[<?php echo $merchant['mchid'];?>-amount]" value="0">
+                            </td>
+                            <td class="w60 align-center">
+                                <select class="select1 w60" name="mtotal_turn[<?php echo $merchant['mchid'];?>-turn]">
+                                    <option value="1" <?php if($output['total_stock']['mtactics']["{$merchant['mchid']}-turn"] == 1){ echo 'selected';}?>>关闭</option>
+                                    <option value="2" <?php if($output['total_stock']['mtactics']["{$merchant['mchid']}-turn"] == 2){ echo 'selected';}?>>预留</option>
+                                    <option value="3" <?php if($output['total_stock']['mtactics']["{$merchant['mchid']}-turn"] == 3){ echo 'selected';}?>>分配</option>
+                                </select>
+                            </td>
+                            <td class="align-center w24 mw24"></td>
+                            <?php foreach ($output['refill_oil_specs'] as $amount) {?>
+                                <input type="hidden" name="mchid[]" value="<?php echo $merchant['mchid'];?>">
+                                <input type="hidden" name="amount[]" value="<?php echo $amount;?>">
+                            <td class="w50 align-center">
+                                <input type="number" readonly class="w50 tbSurplus"
+                                       value="<?php echo $output['total_stock']['mtactics']["{$merchant['mchid']}-{$amount}"]['default_count'];?>" style="background-color: #eaeaea;">
+                            </td>
+                            <td class="w50 align-center">
+                                <input type="number" class="w50 tbChange amountInput" name="mtotal[]" value="0" data-tbMoney="<?php echo $amount;?>">
+                            </td>
+                            <td class="w60 align-center tbSelect">
+                                <select class="select2 w60" name="mturn[]">
+                                    <option value="1" <?php if($output['total_stock']['mtactics']["{$merchant['mchid']}-{$amount}"]['turn'] == 1){ echo 'selected';}?>>关闭</option>
+                                    <option value="2" <?php if($output['total_stock']['mtactics']["{$merchant['mchid']}-{$amount}"]['turn'] == 2){ echo 'selected';}?>>预留</option>
+                                    <option value="3" <?php if($output['total_stock']['mtactics']["{$merchant['mchid']}-{$amount}"]['turn'] == 3){ echo 'selected';}?>>分配</option>
+                                </select>
+                            </td>
+                            <td class="align-center w24 mw24"></td>
+                            <?php }?>
+                        </tr>
+                        <?php }?>
+                    </tbody>
+                </table>
+            </tr>
+            </tbody>
+            <tfoot>
+            <tr class="tfoot">
+                <td colspan="15"><a href="JavaScript:void(0);" class="btn" id="submitBtn"><span><?php echo $lang['nc_submit']; ?></span></a></td>
+            </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/dialog/dialog.js" id="dialog_js"
+        charset="utf-8"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery-ui/jquery.ui.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/ajaxfileupload/ajaxfileupload.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.js"></script>
+<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/refill/layer.js"></script>
+<link href="<?php echo RESOURCE_SITE_URL; ?>/js/jquery.Jcrop/jquery.Jcrop.min.css" rel="stylesheet" type="text/css"
+      id="cssfile2"/>
+<script type="text/javascript">
+    $(function () {
+        let isSubmit = true
+        let isOk = true
+        let isMoney = true
+        $(window).scroll(function() {
+            let toLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
+            if (toLeft>0) {
+                let headLeft = toLeft - 16
+                $('#tableHread')[0].style.left = '-'+headLeft+'px'
+            } else if (toLeft == 0) {
+                $('#tableHread')[0].style.left = 20+'px'
+            }
+        });
+        $(".money").change(function(){
+            // 剩余张数
+            let surplusArr = []
+            // 变动
+            let changeArr = []
+            // 金额
+            let numArr = []
+            // 变动后总额
+            let img_url_Sum = 0;
+            let change_img_url = 0;
+            $(".surplus").each(function(){
+                surplusArr.push(Number($(this).val()));
+            })
+            $(".money").each(function(){
+                changeArr.push(Number($(this).val()));
+                numArr.push(Number($(this).attr('data-money')));
+            })
+            for (let i = 0; i < surplusArr.length; i++) {
+                // img_url += (surplusArr[i] * numArr[i])
+                change_img_url += ( changeArr[i] * numArr[i])
+            }
+            img_url_Sum = change_img_url + Number($('#total').text())
+            // console.log('surplusArr', surplusArr, changeArr, numArr, change_img_url);
+            $('#changeTotal').text(change_img_url)
+            $('#sumTotal').text(img_url_Sum)
+            $('.tbChange').change()
+            $('.mecChange').change()
+        })
+        $('.tbChange').change(function () {
+            // 剩余张数
+            let surplusArr = []
+            // 变动
+            let changeArr = []
+            // 金额
+            let numArr = []
+            $(".surplus").each(function(){
+                surplusArr.push(Number($(this).val()));
+            })
+            $(".money").each(function(){
+                changeArr.push(Number($(this).val()));
+                numArr.push(Number($(this).attr('data-money')));
+            })
+            // 金额tb
+            let tbNumArr_Change = []
+            let tbNumArr_Surplus = []
+            let tbChangeSum_2000 = 0
+            let tbChangeSum_1000 = 0
+            let tbChangeSum_500 = 0
+            let tbChangeSum_200 = 0
+            let tbChangeSum_100 = 0
+            let tbchangeArr_2000 = []
+            let tbchangeArr_1000 = []
+            let tbchangeArr_500 = []
+            let tbchangeArr_200 = []
+            let tbchangeArr_100 = []
+            let tbSurplusSum_2000 = 0
+            let tbSurplusSum_1000 = 0
+            let tbSurplusSum_500 = 0
+            let tbSurplusSum_200 = 0
+            let tbSurplusSum_100 = 0
+            let tbSurplusArr_2000 = []
+            let tbSurplusArr_1000 = []
+            let tbSurplusArr_500 = []
+            let tbSurplusArr_200 = []
+            let tbSurplusArr_100 = []
+            let isFalse = []
+            let moneyArr = []
+            $(".tbChange").each(function(){
+                let isTrue = $(this).parent().next().children().val()
+                if (isTrue != 1) {
+                    if (Number($(this).attr('data-tbMoney')) == 2000 ) {
+                        tbchangeArr_2000.push(Number($(this).val()));
+                        tbSurplusArr_2000.push(Number($(this).parent().prev().children().val()));
+
+                    } else if(Number($(this).attr('data-tbMoney')) == 1000 ) {
+                        tbchangeArr_1000.push(Number($(this).val()));
+                        tbSurplusArr_1000.push(Number($(this).parent().prev().children().val()));
+
+                    } else if(Number($(this).attr('data-tbMoney')) == 1000 ) {
+                        tbchangeArr_1000.push(Number($(this).val()));
+                        tbSurplusArr_1000.push(Number($(this).parent().prev().children().val()));
+
+                    }else if(Number($(this).attr('data-tbMoney')) == 500 ) {
+                        tbchangeArr_500.push(Number($(this).val()));
+                        tbSurplusArr_500.push(Number($(this).parent().prev().children().val()));
+
+                    }else if(Number($(this).attr('data-tbMoney')) == 200 ) {
+                        tbchangeArr_200.push(Number($(this).val()));
+                        tbSurplusArr_200.push(Number($(this).parent().prev().children().val()));
+
+                    }else if(Number($(this).attr('data-tbMoney')) == 100 ) {
+                        tbchangeArr_100.push(Number($(this).val()));
+                        tbSurplusArr_100.push(Number($(this).parent().prev().children().val()));
+                    }
+                }
+            })
+            for (let i = 0; i < tbSurplusArr_2000.length; i++) {
+                tbChangeSum_2000 += tbchangeArr_2000[i]
+                tbSurplusSum_2000 += tbSurplusArr_2000[i]
+            }
+            for (let i = 0; i < tbSurplusArr_1000.length; i++) {
+                tbChangeSum_1000 += tbchangeArr_1000[i]
+                tbSurplusSum_1000 += tbSurplusArr_1000[i]
+            }
+            for (let i = 0; i < tbSurplusArr_500.length; i++) {
+                tbChangeSum_500 += tbchangeArr_500[i]
+                tbSurplusSum_500 += tbSurplusArr_500[i]
+            }
+            for (let i = 0; i < tbSurplusArr_200.length; i++) {
+                tbChangeSum_200 += tbchangeArr_200[i]
+                tbSurplusSum_200 += tbSurplusArr_200[i]
+            }
+            for (let i = 0; i < tbSurplusArr_100.length; i++) {
+                tbChangeSum_100 += tbchangeArr_100[i]
+                tbSurplusSum_100 += tbSurplusArr_100[i]
+            }
+            tbNumArr_Change.push(tbChangeSum_2000)
+            tbNumArr_Change.push(tbChangeSum_1000)
+            tbNumArr_Change.push(tbChangeSum_500)
+            tbNumArr_Change.push(tbChangeSum_200)
+            tbNumArr_Change.push(tbChangeSum_100)
+            tbNumArr_Surplus.push(tbSurplusSum_2000)
+            tbNumArr_Surplus.push(tbSurplusSum_1000)
+            tbNumArr_Surplus.push(tbSurplusSum_500)
+            tbNumArr_Surplus.push(tbSurplusSum_200)
+            tbNumArr_Surplus.push(tbSurplusSum_100)
+            // console.log('变',tbChangeSum_2000,tbChangeSum_1000, tbChangeSum_500, tbChangeSum_200, tbChangeSum_100 );
+            // console.log('剩余',tbSurplusSum_2000,tbSurplusSum_1000, tbSurplusSum_500, tbSurplusSum_200, tbSurplusSum_100 );
+            $(".money").each(function(){
+                moneyArr.push($(this));
+            })
+            for (let index = 0; index < tbNumArr_Change.length; index++) {
+                if ((tbNumArr_Change[index] + tbNumArr_Surplus[index]) > (surplusArr[index] + changeArr[index])) {
+                    isFalse.push(false)
+                    layer.msg('变动后张数不可以超过变动后总张数');
+                    // moneyArr[index][0].style['borderColor'] = '#e64444'
+                    moneyArr[index].addClass('redBorder')
+                } else {
+                    isFalse.push(true)
+                    // moneyArr[index][0].style['borderColor'] = ''
+                    moneyArr[index].removeClass('redBorder')
+                }
+            }
+            if ($.inArray(false, isFalse) == -1) {
+                isOk = true
+            } else {
+                isOk = false
+            }
+        })
+        let get_macsum = function() {
+            let surplusArr = []
+            let changeArr = []
+            let sum = 0
+            let defaultAmount = 0
+            let changeAmount = 0
+            $(".mecChange").each(function(){
+                let isTrue = $(this).parent().next().children().val()
+                if (isTrue !== '1') {
+                    changeAmount = Number($(this).val());
+                    if(changeAmount < 0) {
+                        changeAmount = 0;
+                    }
+                    defaultAmount = Number($(this).parent().prev().children().val());
+                    if(defaultAmount < 0) {
+                        defaultAmount = 0;
+                    }
+                    changeArr.push(changeAmount);
+                    surplusArr.push(defaultAmount);
+                }
+            })
+            for (let index = 0; index < changeArr.length; index++) {
+                sum += (surplusArr[index] + changeArr[index])
+            }
+            // console.log('surplusArr', changeAmount, defaultAmount);
+            return sum;
+        }
+        $('.mecChange').change(function () {
+            let value = $(this)[0].value
+            if (!value) {
+                isSubmit = false
+                $(this)[0].style['borderColor'] = '#e64444'
+            }  else {
+                isSubmit = true;
+                let img_url_Sum = Number($('#sumTotal').text())
+                let macSum = get_macsum();
+                if($(this).parent().next().children().val() == 1) {
+                    $(this)[0].style['borderColor'] = '' 
+                } else {
+                    if (macSum > img_url_Sum) {
+                        isMoney = false
+                        layer.msg('变动后金额不可以超过变动后总额');
+                        $(this)[0].style['borderColor'] = '#e64444'
+                    } else {
+                        isMoney = true
+                        $('.mecChange').each(function() {
+                            $(this)[0].style['borderColor'] = '' 
+                        })
+                    }
+                }
+                // console.log('机构', macSum, img_url_Sum,$(this)[0]);
+            }
+
+        })
+        $('.select1').change(function () {
+            $('.mecChange').change()
+        })
+        $('.select2').change(function () {
+            // 剩余张数
+            let surplusArr = []
+            // 变动
+            let changeArr = []
+            // 金额
+            let numArr = []
+            $(".surplus").each(function(){
+                surplusArr.push(Number($(this).val()));
+            })
+            $(".money").each(function(){
+                changeArr.push(Number($(this).val()));
+                numArr.push(Number($(this).attr('data-money')));
+            })
+            // 金额tb
+            let tbNumArr_Change = []
+            let tbNumArr_Surplus = []
+            let tbChangeSum_2000 = 0
+            let tbChangeSum_1000 = 0
+            let tbChangeSum_500 = 0
+            let tbChangeSum_200 = 0
+            let tbChangeSum_100 = 0
+            let tbchangeArr_2000 = []
+            let tbchangeArr_1000 = []
+            let tbchangeArr_500 = []
+            let tbchangeArr_200 = []
+            let tbchangeArr_100 = []
+            let tbSurplusSum_2000 = 0
+            let tbSurplusSum_1000 = 0
+            let tbSurplusSum_500 = 0
+            let tbSurplusSum_200 = 0
+            let tbSurplusSum_100 = 0
+            let tbSurplusArr_2000 = []
+            let tbSurplusArr_1000 = []
+            let tbSurplusArr_500 = []
+            let tbSurplusArr_200 = []
+            let tbSurplusArr_100 = []
+            let isFalse = []
+            let moneyArr = []
+            $(".tbChange").each(function(){
+                let isTrue = $(this).parent().next().children().val()
+                if (isTrue != 1) {
+                    if (Number($(this).attr('data-tbMoney')) == 2000 ) {
+                        tbchangeArr_2000.push(Number($(this).val()));
+                        tbSurplusArr_2000.push(Number($(this).parent().prev().children().val()));
+
+                    } else if(Number($(this).attr('data-tbMoney')) == 1000 ) {
+                        tbchangeArr_1000.push(Number($(this).val()));
+                        tbSurplusArr_1000.push(Number($(this).parent().prev().children().val()));
+
+                    } else if(Number($(this).attr('data-tbMoney')) == 1000 ) {
+                        tbchangeArr_1000.push(Number($(this).val()));
+                        tbSurplusArr_1000.push(Number($(this).parent().prev().children().val()));
+
+                    }else if(Number($(this).attr('data-tbMoney')) == 500 ) {
+                        tbchangeArr_500.push(Number($(this).val()));
+                        tbSurplusArr_500.push(Number($(this).parent().prev().children().val()));
+
+                    }else if(Number($(this).attr('data-tbMoney')) == 200 ) {
+                        tbchangeArr_200.push(Number($(this).val()));
+                        tbSurplusArr_200.push(Number($(this).parent().prev().children().val()));
+
+                    }else if(Number($(this).attr('data-tbMoney')) == 100 ) {
+                        tbchangeArr_100.push(Number($(this).val()));
+                        tbSurplusArr_100.push(Number($(this).parent().prev().children().val()));
+                    }
+                }
+            })
+            for (let i = 0; i < tbSurplusArr_2000.length; i++) {
+                tbChangeSum_2000 += tbchangeArr_2000[i]
+                tbSurplusSum_2000 += tbSurplusArr_2000[i]
+            }
+            for (let i = 0; i < tbSurplusArr_1000.length; i++) {
+                tbChangeSum_1000 += tbchangeArr_1000[i]
+                tbSurplusSum_1000 += tbSurplusArr_1000[i]
+            }
+            for (let i = 0; i < tbSurplusArr_500.length; i++) {
+                tbChangeSum_500 += tbchangeArr_500[i]
+                tbSurplusSum_500 += tbSurplusArr_500[i]
+            }
+            for (let i = 0; i < tbSurplusArr_200.length; i++) {
+                tbChangeSum_200 += tbchangeArr_200[i]
+                tbSurplusSum_200 += tbSurplusArr_200[i]
+            }
+            for (let i = 0; i < tbSurplusArr_100.length; i++) {
+                tbChangeSum_100 += tbchangeArr_100[i]
+                tbSurplusSum_100 += tbSurplusArr_100[i]
+            }
+            tbNumArr_Change.push(tbChangeSum_2000)
+            tbNumArr_Change.push(tbChangeSum_1000)
+            tbNumArr_Change.push(tbChangeSum_500)
+            tbNumArr_Change.push(tbChangeSum_200)
+            tbNumArr_Change.push(tbChangeSum_100)
+            tbNumArr_Surplus.push(tbSurplusSum_2000)
+            tbNumArr_Surplus.push(tbSurplusSum_1000)
+            tbNumArr_Surplus.push(tbSurplusSum_500)
+            tbNumArr_Surplus.push(tbSurplusSum_200)
+            tbNumArr_Surplus.push(tbSurplusSum_100)
+            // console.log('变',tbChangeSum_2000,tbChangeSum_1000, tbChangeSum_500, tbChangeSum_200, tbChangeSum_100 );
+            // console.log('剩余',tbSurplusSum_2000,tbSurplusSum_1000, tbSurplusSum_500, tbSurplusSum_200, tbSurplusSum_100 );
+            $(".money").each(function(){
+                moneyArr.push($(this));
+            })
+            for (let index = 0; index < tbNumArr_Change.length; index++) {
+                if ((tbNumArr_Change[index] + tbNumArr_Surplus[index]) > (surplusArr[index] + changeArr[index])) {
+                    isFalse.push(false)
+                    layer.msg('变动后张数不可以超过变动后总张数');
+                    moneyArr[index][0].style['borderColor'] = '#e64444'
+                } else {
+                    isFalse.push(true)
+                    moneyArr[index][0].style['borderColor'] = ''
+                }
+            }
+            if ($.inArray(false, isFalse) == -1) {
+                isOk = true
+            } else {
+                isOk = false
+            }
+        })
+        
+        $('.amountInput').change(function () {
+            let value = $(this)[0].value
+            if (!value) {
+                isSubmit = false
+                $(this)[0].style['borderColor'] = '#e64444'
+            }  else {
+                isSubmit = true;
+                $(this)[0].style['borderColor'] = ''
+            }
+        })
+        
+        $("#submitBtn").click(function () {
+            // console.log('isSubmit', isSubmit, isOk, isMoney);
+            if (isSubmit && isOk && isMoney) {
+                $("#price_form").submit();
+            }
+        })
+        // 表格hover时背景
+        $('.trFlex').each(function () {
+            $(this).hover(function () {
+                $(this)[0].style.backgroundColor = '#cbe9f3'
+            },function() {
+                $(this)[0].style.backgroundColor = '#fff'
+            })
+        })
+    });
+</script>

+ 109 - 20
data/config/lingzh/refill.ini.php

@@ -2,15 +2,15 @@
 
 global $config;
 
-$config['refill_oil_specs'] = [100 , 200 , 500 , 1000 , 2000];
-$config['refill_phone_specs'] = [10 , 20 , 30 , 50 , 100 , 200 , 300 , 500];
+$config['refill_oil_specs'] = [100, 200, 500, 1000, 2000];
+$config['refill_phone_specs'] = [10, 20, 30, 50, 100, 200, 300, 500];
 //充值额度基本表
 $config['refill_specs'] = [
-    'petrochina'    => $config['refill_oil_specs'],
-    'sinopec'       => $config['refill_oil_specs'],
-    'chinamobile'   => $config['refill_phone_specs'],
-    'chinaunicom'   => $config['refill_phone_specs'],
-    'chinatelecom'  => $config['refill_phone_specs']
+    'petrochina' => $config['refill_oil_specs'],
+    'sinopec' => $config['refill_oil_specs'],
+    'chinamobile' => $config['refill_phone_specs'],
+    'chinaunicom' => $config['refill_phone_specs'],
+    'chinatelecom' => $config['refill_phone_specs']
 ];
 
 
@@ -19,7 +19,7 @@ $oil_providers = [];
 $config['oil_providers'] = $oil_providers;
 
 
-$baizeyd = ['name' => 'baizeyd', 'store_id' => 32,'qualitys' => '1',
+$baizeyd = ['name' => 'baizeyd', 'store_id' => 32, 'qualitys' => '1',
     'amount' => [
         10 => [
             ['goods_id' => 1, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinamobile']
@@ -40,10 +40,10 @@ $baizeyd = ['name' => 'baizeyd', 'store_id' => 32,'qualitys' => '1',
     'official_sn' => true, 'refill_type' => 'api'];
 
 
-$aming_phone = ['name' => 'aming', 'store_id' => 34,'qualitys' => '1',
+$aming_phone = ['name' => 'aming', 'store_id' => 34, 'qualitys' => '1',
     'amount' => [
         10 => [
-            ['goods_id'  => 9, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 9, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         20 => [
             ['goods_id' => 10, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
@@ -69,7 +69,7 @@ $aming_phone = ['name' => 'aming', 'store_id' => 34,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$binghc_phone = ['name' => 'binghc', 'store_id' => 35,'qualitys' => '1',
+$binghc_phone = ['name' => 'binghc', 'store_id' => 35, 'qualitys' => '1',
     'amount' => [
         10 => [
             ['goods_id' => 17, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
@@ -98,7 +98,7 @@ $binghc_phone = ['name' => 'binghc', 'store_id' => 35,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$ruishun_phone = ['name' => 'ruishun', 'store_id' => 36,'qualitys' => '1',
+$ruishun_phone = ['name' => 'ruishun', 'store_id' => 36, 'qualitys' => '1',
     'amount' => [
         10 => [
             ['goods_id' => 25, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
@@ -127,7 +127,7 @@ $ruishun_phone = ['name' => 'ruishun', 'store_id' => 36,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$wuchen_phone = ['name' => 'wuchen', 'store_id' => 37,'qualitys' => '1',
+$wuchen_phone = ['name' => 'wuchen', 'store_id' => 37, 'qualitys' => '1',
     'amount' => [
         10 => [
             ['goods_id' => 33, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
@@ -156,7 +156,7 @@ $wuchen_phone = ['name' => 'wuchen', 'store_id' => 37,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$yibao_phone = ['name' => 'yibao', 'store_id' => 38,'qualitys' => '1',
+$yibao_phone = ['name' => 'yibao', 'store_id' => 38, 'qualitys' => '1',
     'amount' => [
         30 => [
             ['goods_id' => 41, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
@@ -173,7 +173,7 @@ $yibao_phone = ['name' => 'yibao', 'store_id' => 38,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$amingyd_phone = ['name' => 'amingyd', 'store_id' => 39,'qualitys' => '1',
+$amingyd_phone = ['name' => 'amingyd', 'store_id' => 39, 'qualitys' => '1',
     'amount' => [
         30 => [
             ['goods_id' => 45, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']
@@ -190,7 +190,7 @@ $amingyd_phone = ['name' => 'amingyd', 'store_id' => 39,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$chuka_phone = ['name' => 'chuka', 'store_id' => 40,'qualitys' => '1',
+$chuka_phone = ['name' => 'chuka', 'store_id' => 40, 'qualitys' => '1',
     'amount' => [
         20 => [
             ['goods_id' => 49, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom']
@@ -207,7 +207,7 @@ $chuka_phone = ['name' => 'chuka', 'store_id' => 40,'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$amingjd_phone = ['name' => 'amingjd', 'store_id' => 41,'qualitys' => '5',
+$amingjd_phone = ['name' => 'amingjd', 'store_id' => 41, 'qualitys' => '5',
     'amount' => [
         30 => [
             ['goods_id' => 55, 'price' => 27, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
@@ -224,7 +224,7 @@ $amingjd_phone = ['name' => 'amingjd', 'store_id' => 41,'qualitys' => '5',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$legou_phone = ['name' => 'legou', 'store_id' => 42,'qualitys' => '3',
+$legou_phone = ['name' => 'legou', 'store_id' => 42, 'qualitys' => '3',
     'amount' => [
         10 => [
             ['goods_id' => 57, 'price' => 9.7, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
@@ -253,7 +253,7 @@ $legou_phone = ['name' => 'legou', 'store_id' => 42,'qualitys' => '3',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$feiniao_phone = ['name' => 'feiniao', 'store_id' => 44,'qualitys' => '1',
+$feiniao_phone = ['name' => 'feiniao', 'store_id' => 44, 'qualitys' => '1',
     'amount' => [
         10 => [
             ['goods_id' => 65, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
@@ -333,6 +333,92 @@ $riying_phone = ['name' => 'riying', 'store_id' => 49, 'qualitys' => '5',
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
+
+$weishengy_phone = ['name' => 'weishengy', 'store_id' => 50, 'qualitys' => '5',
+    'amount' => [
+        10 => [
+            ['goods_id' => 87, 'price' => 9.2, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 88, 'price' => 18.4, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 89, 'price' => 27.6, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 90, 'price' => 46, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 91, 'price' => 92, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 92, 'price' => 184, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 93, 'price' => 276, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 94, 'price' => 460, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+$wailing_phone = ['name' => 'wailing', 'store_id' => 51, 'qualitys' => '5',
+    'amount' => [
+        10 => [
+            ['goods_id' => 95, 'price' => 9.2, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 96, 'price' => 18.4, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 97, 'price' => 27.6, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 98, 'price' => 46, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 99, 'price' => 92, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 100, 'price' => 184, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 101, 'price' => 276, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 102, 'price' => 460, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$shengying_phone = ['name' => 'shengying', 'store_id' => 52, 'qualitys' => '1',
+    'amount' => [
+        10 => [
+            ['goods_id' => 103, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        20 => [
+            ['goods_id' => 104, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        30 => [
+            ['goods_id' => 105, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        50 => [
+            ['goods_id' => 106, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        100 => [
+            ['goods_id' => 107, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        200 => [
+            ['goods_id' => 108, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        300 => [
+            ['goods_id' => 109, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        500 => [
+            ['goods_id' => 110, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
 $phone_providers = [
     ['name' => 'baizeyd', 'cfg' => $baizeyd, 'opened' => true, 'sort' => 1],
     ['name' => 'aming', 'cfg' => $aming_phone, 'opened' => true, 'sort' => 1],
@@ -347,5 +433,8 @@ $phone_providers = [
     ['name' => 'feiniao', 'cfg' => $feiniao_phone],
     ['name' => 'fensheng', 'cfg' => $fensheng_phone],
     ['name' => 'riying', 'cfg' => $riying_phone],
-    ];
+    ['name' => 'weishengy', 'cfg' => $weishengy_phone],
+    ['name' => 'wailing', 'cfg' => $wailing_phone],
+    ['name' => 'shengying', 'cfg' => $shengying_phone],
+];
 $config['phone_providers'] = $phone_providers;

+ 307 - 340
data/config/win/refill.ini.php

@@ -2,442 +2,409 @@
 
 global $config;
 
-$config['refill_oil_specs'] = [100, 200, 500, 1000, 2000];
-$config['refill_phone_specs'] = [10, 20, 30, 50, 100, 200, 300, 500];
-
+$config['refill_oil_specs'] = [100 , 200 , 500 , 1000 , 2000];
+$config['refill_phone_specs'] = [10 , 20 , 30 , 50 , 100 , 200 , 300 , 500];
 //充值额度基本表
 $config['refill_specs'] = [
-    'petrochina'  => $config['refill_oil_specs'],
-    'sinopec'     => $config['refill_oil_specs'],
-    'chinamobile' => $config['refill_phone_specs'],
-    'chinaunicom' => $config['refill_phone_specs'],
-    'chinatelecom' => $config['refill_phone_specs']
+    'petrochina'    => $config['refill_oil_specs'],
+    'sinopec'       => $config['refill_oil_specs'],
+    'chinamobile'   => $config['refill_phone_specs'],
+    'chinaunicom'   => $config['refill_phone_specs'],
+    'chinatelecom'  => $config['refill_phone_specs']
 ];
 
-//充值渠道配置表
-//速汇充京东加油通道
-$tianjt_oil = ['name' => 'tianjt', 'store_id' => 7,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6290, 'price' => 97.0, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6291, 'price' => 194, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6292, 'price' => 485, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6293, 'price' => 970, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
-
-//速汇充天猫加油通道
-$suhctm_oil = ['name' => 'suhctm', 'store_id' => 7,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6290, 'price' => 96.8, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6291, 'price' => 193.6, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6292, 'price' => 484, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6293, 'price' => 968, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
-
-$suhcpdd_oil = ['name' => 'suhcpdd', 'store_id' => 7,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6290, 'price' => 96.8, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6291, 'price' => 193.6, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6292, 'price' => 484, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6293, 'price' => 968, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'period' => ['start' => '8:30', 'end' => '22:20'], 'refill_type' => 'api'];
-
-//赵梓暄提供的加油通道
-$zzx_oil = ['name' => 'zzx', 'store_id' => 13,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6307, 'price' => 97.8, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
-        200 => [['goods_id' => 6308, 'price' => 195.6, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
-        500 => [['goods_id' => 6309, 'price' => 489, 'quality' => 1, 'card_type' => 'petrochina,sinopec']],
-        1000 => [['goods_id' => 6310, 'price' => 978, 'quality' => 1, 'card_type' => 'petrochina,sinopec']]
-    ],
-    'refill_type' => 'api'];
-
-//赵梓暄提供的加油通道
-$lx_oil = ['name' => 'lx', 'store_id' => 14,'qualitys' => '1',
-    'amount' => [
-        500 => [['goods_id' => 6322, 'price' => 479, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6311, 'price' => 958, 'quality' => 1, 'card_type' => 'sinopec']] //,
-//        2000 => ['goods_id' => 6322, 'price' => 1916]
-    ],
-    'period' => ['start' => '14:00', 'end' => '19:00'], 'official_sn' => true, 'refill_type' => 'inner_store'];
-
-//赛虎
-$saihu_oil = ['name' => 'saihu', 'store_id' => 15,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6313, 'price' => 97, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6314, 'price' => 194, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6315, 'price' => 485, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6316, 'price' => 970, 'quality' => 1, 'card_type' => 'sinopec']],
-        2000 => [['goods_id' => 6317, 'price' => 1940, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'refill_type' => 'api'];
-
-#官方中石油通道
-$gftd_oil = ['name' => 'gftd', 'store_id' => 19,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6339, 'price' => 95, 'quality' => 1, 'card_type' => 'petrochina']],
-        200 => [['goods_id' => 6340, 'price' => 190, 'quality' => 1, 'card_type' => 'petrochina']],
-        500 => [['goods_id' => 6341, 'price' => 475, 'quality' => 1, 'card_type' => 'petrochina']],
-        1000 => [['goods_id' => 6342, 'price' => 950, 'quality' => 1, 'card_type' => 'petrochina']]
-    ],
-    'period' => [], 'refill_type' => 'api'];
-
-#官方中石化通道
-$gftdsinop_oil = ['name' => 'gftdsinop', 'store_id' => 20,'qualitys' => '1',
-    'amount' => [
-        100 => [['goods_id' => 6343, 'price' => 95, 'quality' => 1, 'card_type' => 'sinopec']],
-        200 => [['goods_id' => 6344, 'price' => 190, 'quality' => 1, 'card_type' => 'sinopec']],
-        500 => [['goods_id' => 6345, 'price' => 475, 'quality' => 1, 'card_type' => 'sinopec']],
-        1000 => [['goods_id' => 6346, 'price' => 950, 'quality' => 1, 'card_type' => 'sinopec']]
-    ],
-    'period' => [], 'refill_type' => 'api'];
 
-$oil_providers = [
-    ['name' => 'tianjt', 'cfg' => $tianjt_oil],
-    ['name' => 'suhctm', 'cfg' => $suhctm_oil],
-    ['name' => 'suhcpdd', 'cfg' => $suhcpdd_oil],
-    ['name' => 'zzx', 'cfg' => $zzx_oil],
-    ['name' => 'lx', 'cfg' => $lx_oil],
-    ['name' => 'saihu', 'cfg' => $saihu_oil],
-    ['name' => 'gftd', 'cfg' => $gftd_oil],
-    ['name' => 'gftdsinop', 'cfg' => $gftdsinop_oil]
-];
+//充值渠道配置表
+$oil_providers = [];
 $config['oil_providers'] = $oil_providers;
 
-$beixt_phone = ['name' => 'beixt', 'store_id' => 8,'qualitys' => '1',
-    'amount' => [
-        50 => [['goods_id' => 6295, 'price' => 48.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6296, 'price' => 97.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6297, 'price' => 195,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'refill_type' => 'api'];
-
-$bxtwt_phone = ['name' => 'bxtwt', 'store_id' => 10,'qualitys' => '1',
-    'amount' => [
-        50 => [['goods_id' => 6298, 'price' => 48,   'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6299, 'price' => 96,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6300, 'price' => 192, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'refill_type' => 'api'];
 
-$bjb_phone = ['name' => 'bjb', 'store_id' => 12,'qualitys' => '1',
+$baizeyd = ['name' => 'baizeyd', 'store_id' => 32,'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6305, 'price' => 9.51,  'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6306, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6301, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6302, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6303, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6304, 'price' => 190.20, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6327, 'price' => 285.30, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6328, 'price' => 475.50, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
+        10 => [
+            ['goods_id' => 1, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        30 => [
+            ['goods_id' => 3, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        50 => [
+            ['goods_id' => 4, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        100 => [
+            ['goods_id' => 5, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        200 => [
+            ['goods_id' => 6, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$lingzh_phone = ['name' => 'lingzh', 'store_id' => 28,'qualitys' => '1,3,5',
+
+$aming_phone = ['name' => 'aming', 'store_id' => 34,'qualitys' => '1',
     'amount' => [
         10 => [
-            ['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.20, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id'  => 9, 'price' => 9.5, 'quality' => 1, 'card_type' => '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.40, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 10, 'price' => 19, 'quality' => 1, 'card_type' => '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.60, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 11, 'price' => 28.5, 'quality' => 1, 'card_type' => '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.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 12, 'price' => 47.5, 'quality' => 1, 'card_type' => '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.0, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 13, 'price' => 95, 'quality' => 1, 'card_type' => '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' => 184.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 14, 'price' => 190, 'quality' => 1, 'card_type' => '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' => 276.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+            ['goods_id' => 15, 'price' => 285, 'quality' => 1, 'card_type' => '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' => 460.00, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
-        ]
+            ['goods_id' => 16, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-//$lingzhdl_phone = ['name' => 'lingzhdl', 'store_id' => 29, 'qualitys' => '1',
-//    'amount' => [
-//        10 => [['goods_id' => 6397, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-//        20 => [['goods_id' => 6398, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-//        30 => [['goods_id' => 6399, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-//        50 => [['goods_id' => 6400, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-//
-//        100 => [['goods_id' => 6401, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-//        200 => [['goods_id' => 6402, 'price' => 190.20, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-//        300 => [['goods_id' => 6403, 'price' => 285.30, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-//        500 => [['goods_id' => 6404, 'price' => 475.50, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
-//    ],
-//    'official_sn' => true, 'refill_type' => 'api'];
-
-$bjbyd_phone = ['name' => 'bjbyd', 'store_id' => 24,'qualitys' => '1',
+$binghc_phone = ['name' => 'binghc', 'store_id' => 35,'qualitys' => '1',
     'amount' => [
-        30 => [['goods_id' => 6367, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinamobile']],
-        50 => [['goods_id' => 6368, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinamobile']],
-        100 => [['goods_id' => 6369, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinamobile']],
-        200 => [['goods_id' => 6370, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinamobile']]
+        10 => [
+            ['goods_id' => 17, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 18, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 19, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 20, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 21, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 22, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 23, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 24, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$afandnew_phone = ['name' => 'afandnew', 'store_id' => 25,'qualitys' => '1',
+$ruishun_phone = ['name' => 'ruishun', 'store_id' => 36,'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6454, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6455, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6386, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6371, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6372, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6373, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6387, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6388, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'refill_type' => 'api'];
-
-$tianx_phone = ['name' => 'tianx', 'store_id' => 25,'qualitys' => '1',
-    'amount' => [
-        50 => [['goods_id' => 6371, 'price' => 46.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6372, 'price' => 93,  'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6373, 'price' => 186, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
-    ],
-    'refill_type' => 'api'];
-
-$yifa_phone = ['name' => 'yifa', 'store_id' => 16,'qualitys' => '1',
-    'amount' => [
-        30 => [['goods_id' => 6318, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile']],
-        50 => [['goods_id' => 6319, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile']],
-        100 => [['goods_id' => 6320, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile']],
-        200 => [['goods_id' => 6321, 'price' => 191,  'quality' => 1, 'card_type' => 'chinamobile']]
+        10 => [
+            ['goods_id' => 25, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 26, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 27, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 28, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 29, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 30, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 31, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 32, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+        ],
     ],
-    'refill_type' => 'api'];
+    'official_sn' => true, 'refill_type' => 'api'];
 
-$jiec_phone = ['name' => 'jiec', 'store_id' => 17,'qualitys' => '1',
+$wuchen_phone = ['name' => 'wuchen', 'store_id' => 37,'qualitys' => '1',
     'amount' => [
-        30 => [['goods_id' => 6323, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6324, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6325, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6326, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6329, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6330, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        10 => [
+            ['goods_id' => 33, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 34, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 35, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 36, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 37, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 38, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 39, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 40, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$weit_phone = ['name' => 'weit', 'store_id' => 18,'qualitys' => '1',
+$yibao_phone = ['name' => 'yibao', 'store_id' => 38,'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6337, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6338, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6331, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6332, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6333, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6334, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6335, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6336, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
+        30 => [
+            ['goods_id' => 41, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 42, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 43, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 44, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$afand_phone = ['name' => 'afand', 'store_id' => 26,'qualitys' => '1',
+$amingyd_phone = ['name' => 'amingyd', 'store_id' => 39,'qualitys' => '1',
     'amount' => [
-        30 => [['goods_id' => 6374, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6375, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6376, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6377, 'price' => 190, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6378, 'price' => 285, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6379, 'price' => 475, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']]
+        30 => [
+            ['goods_id' => 45, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        50 => [
+            ['goods_id' => 46, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        100 => [
+            ['goods_id' => 47, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
+        200 => [
+            ['goods_id' => 48, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile']
+        ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$afandeng_phone = ['name' => 'afandeng', 'store_id' => 27,'qualitys' => '1',
+$chuka_phone = ['name' => 'chuka', 'store_id' => 40,'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6406, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6407, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6380, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6381, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6382, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6383, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6384, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6385, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        20 => [
+            ['goods_id' => 49, 'price' => 19, 'quality' => 1, 'card_type' => 'chinaunicom']
+        ],
+        30 => [
+            ['goods_id' => 50, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinaunicom']
+        ],
+        50 => [
+            ['goods_id' => 51, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinaunicom']
+        ],
+        100 => [
+            ['goods_id' => 52, 'price' => 95, 'quality' => 1, 'card_type' => 'chinaunicom']
+        ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$tongy_phone = ['name' => 'tongy', 'store_id' => 31,'qualitys' => '2',
+$amingjd_phone = ['name' => 'amingjd', 'store_id' => 41,'qualitys' => '5',
     'amount' => [
-        30 => [['goods_id' => 6408, 'price' => 29.76, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6408, 'price' => 29.4, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6408, 'price' => 29.64, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        50 => [['goods_id' => 6409, 'price' => 49.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6409, 'price' => 48.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6409, 'price' => 49.4, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        100 => [['goods_id' => 6410, 'price' => 99.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6410, 'price' => 97.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6410, 'price' => 98.8, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        200 => [['goods_id' => 6411, 'price' => 198.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6411, 'price' => 194.6, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6411, 'price' => 197.6, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        300 => [['goods_id' => 6412, 'price' => 297.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6412, 'price' => 291.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6412, 'price' => 296.4, 'quality' => 2, 'card_type' => 'chinatelecom']],
-
-        500 => [['goods_id' => 6413, 'price' => 496, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6413, 'price' => 486.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
-            ['goods_id' => 6413, 'price' => 494, 'quality' => 2, 'card_type' => 'chinatelecom']]
+        30 => [
+            ['goods_id' => 55, 'price' => 27, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 56, 'price' => 45, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 53, 'price' => 90, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 54, 'price' => 180, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$weiyi_phone = ['name' => 'weiyi', 'store_id' => 32,'qualitys' => '1',
+$legou_phone = ['name' => 'legou', 'store_id' => 42,'qualitys' => '3',
     'amount' => [
-        10 => [['goods_id' => 6414, 'price' => 9.6, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6415, 'price' => 19.2, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6416, 'price' => 28.8, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6417, 'price' => 48, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6418, 'price' => 96, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6419, 'price' => 192, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6420, 'price' => 288, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6421, 'price' => 480, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        10 => [
+            ['goods_id' => 57, 'price' => 9.7, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 58, 'price' => 19.4, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 59, 'price' => 29.1, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 60, 'price' => 48.5, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 61, 'price' => 97, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 62, 'price' => 194, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 63, 'price' => 291, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 64, 'price' => 485, 'quality' => 3, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$tonglu_phone = ['name' => 'tonglu', 'store_id' => 33,'qualitys' => '4',
+$feiniao_phone = ['name' => 'feiniao', 'store_id' => 44,'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6422, 'price' => 9.4, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6423, 'price' => 18.8, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6424, 'price' => 28.2, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6425, 'price' => 47, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6426, 'price' => 94, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6427, 'price' => 188, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6428, 'price' => 282, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6429, 'price' => 470, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        10 => [
+            ['goods_id' => 65, 'price' => 9.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 66, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 67, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 68, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 69, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 70, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 71, 'price' => 285, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 72, 'price' => 475, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$xc_phone = ['name' => 'xc', 'store_id' => 34, 'qualitys' => '4',
+$fensheng_phone = ['name' => 'fensheng', 'store_id' => 45, 'qualitys' => '1',
     'amount' => [
-        10 => [['goods_id' => 6430, 'price' => 9.6, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6431, 'price' => 19.2, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6432, 'price' => 28.8, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6433, 'price' => 48, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6434, 'price' => 96, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6435, 'price' => 192, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6436, 'price' => 288, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6437, 'price' => 480, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        10 => [
+            ['goods_id' => 73, 'price' => 9.50, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 74, 'price' => 19, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 75, 'price' => 28.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 76, 'price' => 47.5, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 77, 'price' => 95, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 78, 'price' => 190, 'quality' => 1, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$xunyin_phone = ['name' => 'xunyin', 'store_id' => 35,'qualitys' => '2',
+$riying_phone = ['name' => 'riying', 'store_id' => 49, 'qualitys' => '5',
     'amount' => [
         10 => [
-            ['goods_id' => 6438, 'price' => 10, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6438, 'price' => 9.97, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 79, 'price' => 9.2, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         20 => [
-            ['goods_id' => 6439, 'price' => 20, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6439, 'price' => 19.94, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 80, 'price' => 18.4, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         30 => [
-            ['goods_id' => 6440, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6440, 'price' => 29.91, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 81, 'price' => 27.6, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         50 => [
-            ['goods_id' => 6441, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6441, 'price' => 49.85, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 82, 'price' => 46, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         100 => [
-            ['goods_id' => 6442, 'price' => 100, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6442, 'price' => 99.7, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 83, 'price' => 92, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         200 => [
-            ['goods_id' => 6443, 'price' => 200, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6443, 'price' => 199.4, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 84, 'price' => 184, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         300 => [
-            ['goods_id' => 6444, 'price' => 300, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6444, 'price' => 299.1, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 85, 'price' => 276, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ],
         500 => [
-            ['goods_id' => 6445, 'price' => 500, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6445, 'price' => 498.5, 'quality' => 2, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 86, 'price' => 460, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
         ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$wantong_phone = ['name' => 'wantong', 'store_id' => 36, 'qualitys' => '4',
+$weishengy_phone = ['name' => 'weishengy', 'store_id' => 50, 'qualitys' => '5',
     'amount' => [
-        10 => [['goods_id' => 6446, 'price' => 9.35, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6447, 'price' => 18.7, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6448, 'price' => 28.05, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6449, 'price' => 46.75, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6450, 'price' => 93.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6451, 'price' => 187, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6452, 'price' => 280.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6453, 'price' => 467.5, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        10 => [
+            ['goods_id' => 87, 'price' => 9.2, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 88, 'price' => 18.4, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 89, 'price' => 27.6, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 90, 'price' => 46, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 91, 'price' => 92, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 92, 'price' => 184, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 93, 'price' => 276, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 94, 'price' => 460, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
-
-$yunling_phone = ['name' => 'yunling', 'store_id' => 37, 'qualitys' => '1',
+$wailing_phone = ['name' => 'wailing', 'store_id' => 51, 'qualitys' => '5',
     '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']]
+        10 => [
+            ['goods_id' => 95, 'price' => 9.2, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        20 => [
+            ['goods_id' => 96, 'price' => 18.4, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        30 => [
+            ['goods_id' => 97, 'price' => 27.6, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        50 => [
+            ['goods_id' => 98, 'price' => 46, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 99, 'price' => 92, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        200 => [
+            ['goods_id' => 100, 'price' => 184, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        300 => [
+            ['goods_id' => 101, 'price' => 276, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom'],
+        ],
+        500 => [
+            ['goods_id' => 102, 'price' => 460, '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],
-    ['name' => 'bjb', 'cfg' => $bjb_phone],
-    ['name' => 'bjbyd', 'cfg' => $bjbyd_phone],
-//    ['name' => 'yifa', 'cfg' => $yifa_phone],
-//    ['name' => 'jiec', 'cfg' => $jiec_phone],
-//    ['name' => 'weit', 'cfg' => $weit_phone],
-
-    ['name' => 'afand', 'cfg' => $afand_phone],
-    ['name' => 'afandeng', 'cfg' => $afandeng_phone],
-    ['name' => 'afandnew', 'cfg' => $afandnew_phone],
-    ['name' => 'lingzh', 'cfg' => $lingzh_phone],
-    ['name' => 'tongy', 'cfg' => $tongy_phone],
-    ['name' => 'weiyi', 'cfg' => $weiyi_phone],
-    ['name' => 'tonglu', 'cfg' => $tonglu_phone],
-    ['name' => 'xc', 'cfg' => $xc_phone],
-    ['name' => 'xunyin', 'cfg' => $xunyin_phone],
-    ['name' => 'wantong', 'cfg' => $wantong_phone],
-    ['name' => 'yunling', 'cfg' => $yunling_phone],
+    ['name' => 'baizeyd', 'cfg' => $baizeyd, 'opened' => true, 'sort' => 1],
+    ['name' => 'aming', 'cfg' => $aming_phone, 'opened' => true, 'sort' => 1],
+    ['name' => 'binghc', 'cfg' => $binghc_phone, 'opened' => true, 'sort' => 1],
+    ['name' => 'ruishun', 'cfg' => $ruishun_phone, 'opened' => true, 'sort' => 1],
+    ['name' => 'wuchen', 'cfg' => $wuchen_phone, 'opened' => true, 'sort' => 1],
+    ['name' => 'yibao', 'cfg' => $yibao_phone, 'opened' => true, 'sort' => 1],
+    ['name' => 'amingyd', 'cfg' => $amingyd_phone, 'opened' => true, 'sort' => 1],
+    ['name' => 'chuka', 'cfg' => $chuka_phone, 'opened' => true, 'sort' => 1],
+    ['name' => 'amingjd', 'cfg' => $amingjd_phone],
+    ['name' => 'legou', 'cfg' => $legou_phone],
+    ['name' => 'feiniao', 'cfg' => $feiniao_phone],
+    ['name' => 'fensheng', 'cfg' => $fensheng_phone],
+    ['name' => 'riying', 'cfg' => $riying_phone],
+    ['name' => 'weishengy', 'cfg' => $weishengy_phone],
+    ['name' => 'wailing', 'cfg' => $wailing_phone],
 ];
 $config['phone_providers'] = $phone_providers;

+ 6 - 5
helper/fcgisrv/LZRAccServer.php

@@ -25,11 +25,12 @@ class LZRAccServer extends BaseServer
         parent::__construct($subPath);
 
         $exfiles = [
-            'callback/lingzh/baizeyd.php','callback/lingzh/aming.php','callback/lingzh/binghc.php',
-            'callback/lingzh/ruishun.php','callback/lingzh/wuchen.php','callback/lingzh/yibao.php',
-            'callback/lingzh/amingyd.php','callback/lingzh/chuka.php','callback/lingzh/amingjd.php',
-            'callback/lingzh/legou.php'  ,'callback/lingzh/feiniao.php', 'callback/lingzh/fensheng.php',
-            'callback/lingzh/riying.php'
+            'callback/lingzh/baizeyd.php','callback/lingzh/aming.php'  ,'callback/lingzh/binghc.php',
+            'callback/lingzh/ruishun.php','callback/lingzh/wuchen.php' ,'callback/lingzh/yibao.php',
+            'callback/lingzh/amingyd.php','callback/lingzh/chuka.php'  ,'callback/lingzh/amingjd.php',
+            'callback/lingzh/legou.php'  ,'callback/lingzh/feiniao.php','callback/lingzh/fensheng.php',
+            'callback/lingzh/riying.php' ,'callback/lingzh/wailing.php','callback/lingzh/weishengy.php',
+            'callback/lingzh/shengying.php'
         ];
 
         $this->setExFiles($exfiles);

+ 79 - 0
helper/refill/api/lingzh/shengying/RefillCallBack.php

@@ -0,0 +1,79 @@
+<?php
+
+
+namespace refill\shengying;
+
+require_once(BASE_HELPER_RAPI_PATH . '/shengying/config.php');
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $signData['TaskID'] = $params['TaskID'];
+        $signData['Mobile'] = $params['Mobile'];
+        $signData['Status'] = $params['Status'];
+        $signData['ReportTime'] = $params['ReportTime'];
+        $signData['ReportCode'] = $params['ReportCode'];
+        $signData['OutTradeNo'] = $params['OutTradeNo'];
+
+        $sign = $this->sign($signData);
+        if ($params['Sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+    protected function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+
+    private function sign($params)
+    {
+        $content = '';
+        ksort($params);
+        foreach ($params as $key => $val){
+            if (false === $this->check_empty($val) && "@" != substr($val, 0, 1)) {
+                $val = urldecode($val);
+                $content .= "{$key}={$val}&";
+            }
+        }
+        $content = rtrim($content, '&');
+        $content .= config::ApiKey;
+
+        return md5($content);
+    }
+
+
+    public function notify($params)
+    {
+        $status = intval($params['Status']);
+        $order_sn = $params['OutTradeNo'];
+        $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'];
+        if ($status === 4) {
+            $data['official_sn'] = strtolower($params['ReceiptNum']) == 'null' ? '' : $params['ReceiptNum'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 5) {
+            return [$order_id, false, false,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 154 - 0
helper/refill/api/lingzh/shengying/RefillPhone.php

@@ -0,0 +1,154 @@
+<?php
+
+namespace refill\shengying;
+
+require_once(BASE_HELPER_RAPI_PATH . '/shengying/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, string $order_sn)
+    {
+        $params['BackUrl'] = config::NOTIFY_URL;
+        $params['Account'] = config::Account;
+        $params['Mobile'] = $phone;
+        $params['OutTradeNo'] = $order_sn;
+        return $params;
+    }
+
+    public function getPackage($card_type, $amount)
+    {
+        $params['Account'] = config::Account;
+        $params['Type'] = config::operator[$card_type];
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::GET_PACKAGE_URL, $params, 'POST');
+        if (empty($resp)) {
+            return [false, '获取话费包错误:系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp ,true);
+
+            if (empty($resp))
+            {
+                return [false, '获取话费包错误:系统错误'];
+            }
+            elseif($resp['Code'] == 0)
+            {
+                $packages = $resp['Packages'];
+                $result = [];
+                foreach ($packages as $package) {
+                    $result[$package['Package']] = $package;
+                }
+
+                if (array_key_exists($amount, $result)) {
+                    return [true, $result[$amount]['Package']];
+                } else {
+                    return [false, '话费包额度不支持'];
+                }
+            }
+            else
+            {
+                return [false, "获取话费包错误:{$resp['Message']}."];
+            }
+        }
+    }
+
+    public function add($card_no, $card_type, $amount, $params)
+    {
+        $params = $this->req_params($card_no, $params['order_sn']);
+        [$result, $Package] = $this->getPackage($card_type, $amount);
+        if(empty($result)) {
+            return [false, $Package, false];
+        }
+        $params['Package'] = $Package;
+        $sign = $this->sign(['Account' => $params['Account'], 'Mobile' => $params['Mobile'], 'Package' => $Package]);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'POST');
+        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'] == 0) {
+                return [true, $resp['TaskID'], false];
+            } else {
+                return [false, $resp['Message'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['Account'] = config::Account;
+        $params['OutTradeNo'] = $refill_info['order_sn'];
+        $params['SendTime'] = date("Y-m-d");
+        $params['sign'] = $this->sign(['Account' => $params['Account']]);
+
+        $resp = http_request(config::QUERY_URL, $params, 'POST');
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp))
+            {
+                return [false, '系统错误'];
+            }
+            elseif ($resp['code'] == 0)
+            {
+                $data = $resp['Reports'][0];
+                if ($data['Status'] == 4) {
+                    $order_state = ORDER_STATE_SUCCESS;
+                    $save['official_sn'] = strtolower($data['ReceiptNum']) == 'null' ? '' : $data['ReceiptNum'];
+                    Model('refill_order')->edit($refill_info['order_id'], $save);
+                } elseif (in_array($data['Status'], [3,5])) {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($data['Status'] == 2) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['Message']];
+                }
+
+                return [true, $order_state];
+            }
+            else
+            {
+                return [false, $resp['Message']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $content = '';
+        ksort($params);
+        foreach ($params as $key => $val) {
+            if (false === $this->check_empty($val) && "@" != substr($val, 0, 1)) {
+                $key = strtolower($key);
+                $content .= "{$key}={$val}&";
+            }
+        }
+        $content .= "key=" . config::ApiKey;
+
+        return md5($content);
+    }
+}

+ 21 - 0
helper/refill/api/lingzh/shengying/config.php

@@ -0,0 +1,21 @@
+<?php
+
+
+namespace refill\shengying;
+
+use mtopcard;
+class config
+{
+    const ORDER_URL = 'http://120.77.170.210:8080/telapi.aspx?v=H1.1&action=charge';
+    const QUERY_URL = 'http://120.77.170.210:8080/telapi.aspx?v=H1.1&action=queryReport';
+    const GET_PACKAGE_URL = 'http://120.77.170.210:8080/telapi.aspx?v=H1.1&action=getPackage';
+
+    const Account = 'LZYZ';
+    const ApiKey = '47f68456d0de4282ba5c34fda5306c1e';
+    const NOTIFY_URL = BASE_SITE_URL . "/racc/callback/lingzh/shengying.php";
+    const operator = [
+        mtopcard\ChinaMobileCard  => 1,
+        mtopcard\ChinaUnicomCard  => 2,
+        mtopcard\ChinaTelecomCard => 3
+    ];
+}

BIN
helper/refill/api/lingzh/shengying/商户话费充值协议(1.1).doc


+ 20 - 0
helper/refill/api/lingzh/shengying/对接文档.txt

@@ -0,0 +1,20 @@
+后台网址:http://120.77.170.210:8080/Login.aspx
+
+登录账号:LZYZ
+
+密码    :888888
+
+APIID: LZYZ
+
+秘钥:47f68456d0de4282ba5c34fda5306c1e
+
+下单地址:http://120.77.170.210:8080/telapi.aspx?v=H1.1&action=charge
+  
+余额查询:http://120.77.170.210:8080/telapi.aspx?v=H1.1&action=getBalance 
+
+状态查询:http://120.77.170.210:8080/telapi.aspx?v=H1.1&action=queryReport
+
+
+
+
+

+ 53 - 0
helper/refill/api/lingzh/wailing/RefillCallBack.php

@@ -0,0 +1,53 @@
+<?php
+
+
+namespace refill\wailing;
+
+require_once(BASE_HELPER_RAPI_PATH . '/wailing/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  = $params['order_id'] . $params['out_order_id'] . config::MCHID . $params['tel'] . $params['price'];
+        $content .= $params['status'] . config::KEY;
+        return md5($content);
+    }
+
+    //[$order_id, $success, $can_try, $need_handle]
+    public function notify($params)
+    {
+        $status = intval($params['status']);
+        $order_sn = $params['order_id'];
+        $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['out_order_id']) == 'null' ? '' : $params['out_order_id'];
+
+        if ($status === 1) {
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 0) {
+            return [$order_id, false, false,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 121 - 0
helper/refill/api/lingzh/wailing/RefillPhone.php

@@ -0,0 +1,121 @@
+<?php
+
+namespace refill\wailing;
+
+require_once(BASE_HELPER_RAPI_PATH . '/wailing/config.php');
+
+use refill;
+use Log;
+use mtopcard;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, string $order_sn)
+    {
+        $params['mchid'] = config::MCHID;
+        $params['tel'] = $phone;
+        $params['orderid'] = $order_sn;
+        $params['price'] = $amount;
+        $params['teltype'] = $this->phone_type($phone);
+        $params['timeout'] = config::NotifyTimeout;
+        $params['notify'] = config::NOTIFY_URL;
+        $params['time'] = time();
+        $params['rand'] = rand(100000, 999999);
+        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['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params, 'POST', false);
+
+        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'] == 0) {
+                return [true, $resp['order_id'], false];
+            } else {
+                return [false, $resp['msg'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['orderid'] = $refill_info['order_sn'];
+        $params['mchid'] = config::MCHID;
+
+        $content = $params['mchid'] . $params['orderid'] . config::KEY;
+        $params['sign'] = md5($content);
+
+        $resp = http_request(config::QUERY_URL, $params, 'POST', false);
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            elseif ($resp['code'] == 100)
+            {
+                $status = $resp['status'];
+                if ($status == 3) {
+                    $order_state = ORDER_STATE_SUCCESS;
+                    $updata['official_sn'] = $resp['out_order_id'];
+                    Model('refill_order')->edit($refill_info['order_id'], $updata);
+                } elseif ($status == 4) {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif (in_array($status, [1, 2])) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['data']];
+                }
+
+                return [true, $order_state];
+            }
+            else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $key = config::KEY;
+        $content = $params['mchid'] . $params['tel'] . $params['price'] . $params['orderid'] . $params['teltype'] . $params['timeout'] . $params['notify'];
+        $content .= $params['time'] . $params['rand'] . $key;
+        return md5($content);
+    }
+
+    private function phone_type($phone)
+    {
+        $card_type = mtopcard\card_type($phone);
+
+        if ($card_type == mtopcard\ChinaMobileCard) {
+            return 0;
+        } elseif ($card_type == mtopcard\ChinaUnicomCard) {
+            return 1;
+        } else { // ($card_type == mtopcard\ChinaTelecomCard)
+            return 2;
+        }
+    }
+}

+ 3 - 0
helper/refill/api/lingzh/wailing/account.txt

@@ -0,0 +1,3 @@
+后台地址:http://206.119.82.136
+账号:10045
+密码:lz123..

BIN
helper/refill/api/lingzh/wailing/api.pdf


+ 15 - 0
helper/refill/api/lingzh/wailing/config.php

@@ -0,0 +1,15 @@
+<?php
+
+
+namespace refill\wailing;
+
+class config
+{
+    const ORDER_URL = 'http://206.119.82.136/api/telpay';
+    const QUERY_URL = 'http://206.119.82.136/api/telpay/query';
+
+    const MCHID = 10045;
+    const KEY = 'a1b2f886cfda41170547cd6cfc1cf16b';
+    const NOTIFY_URL = BASE_SITE_URL . "/racc/callback/lingzh/wailing.php";
+    const NotifyTimeout = 7200;
+}

+ 52 - 0
helper/refill/api/lingzh/weishengy/RefillCallBack.php

@@ -0,0 +1,52 @@
+<?php
+
+
+namespace refill\weishengy;
+
+require_once(BASE_HELPER_RAPI_PATH . '/weishengy/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)
+    {
+        $masId = config::masId;
+        $content  = "masId={$masId}&oids={$params['oids']}&orderNo={$params['orderNo']}&orderPrice={$params['orderPrice']}&phone={$params['phone']}";
+        $content .= "&status={$params['status']}&time={$params['time']}&type={$params['type']}";
+        return strtoupper(md5($content));
+    }
+
+    public function notify($params)
+    {
+        $status = $params['status'];
+        $order_sn = $params['orderNo'];
+        $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'];
+        if ($status == 1) {
+            $data['official_sn'] = strtolower($params['oids']) == 'null' ? '' : $params['oids'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+//        elseif ($status == 2) {
+//            return [$order_id, false, false,true];
+//        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 108 - 0
helper/refill/api/lingzh/weishengy/RefillPhone.php

@@ -0,0 +1,108 @@
+<?php
+
+namespace refill\weishengy;
+
+require_once(BASE_HELPER_RAPI_PATH . '/weishengy/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['masId'] = config::masId;
+        $params['appKey'] = config::appKey;
+        $params['notifyUrl'] = config::NOTIFY_URL;
+        $params['time'] = time();
+
+        $orderData['orderNo'] = $order_sn;
+        $orderData['phone'] = $phone;
+        $orderData['orderPrice'] = $amount;
+
+        $params['orderList'][] = $orderData;
+        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['sign'] = $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'] == 0) {
+                return [true, '', false];
+            } else {
+                return [false, $resp['message'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['masId'] = config::masId;
+        $params['appKey'] = config::appKey;
+        $params['time'] = time();
+        $params['orderNo'] = $refill_info['order_sn'];
+        $content = "appKey={$params['appKey']}&masId={$params['masId']}&orderNo={$params['orderNo']}&time={$params['time']}";
+        $params['sign'] = strtoupper(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'] == 0)
+            {
+                $data = $resp['data'];
+                if ($data['status'] == 1) {
+                    $order_state = ORDER_STATE_SUCCESS;
+                    $save['official_sn'] = strtolower($data['oids']) == 'null' ? '' : $data['oids'];
+                    Model('refill_order')->edit($refill_info['order_id'], $save);
+                } elseif (in_array($data['status'], [0,2])) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['message']];
+                }
+                return [true, $order_state];
+            }
+            else
+            {
+                return [false, $resp['message']];
+            }
+        }
+    }
+
+    private function sign($params)
+    {
+        $content  = "appKey={$params['appKey']}&masId={$params['masId']}&notifyUrl={$params['notifyUrl']}&time={$params['time']}";
+        return strtoupper(md5($content));
+    }
+}

BIN
helper/refill/api/lingzh/weishengy/api.docx


+ 7 - 0
helper/refill/api/lingzh/weishengy/api.txt

@@ -0,0 +1,7 @@
+www.dabjweb.com/sup/
+baicai111
+aa1234
+
+
+masId : 699270071532654592
+appKey : 8sa877sdj219sda

+ 15 - 0
helper/refill/api/lingzh/weishengy/config.php

@@ -0,0 +1,15 @@
+<?php
+
+
+namespace refill\weishengy;
+
+class config
+{
+    const ORDER_URL = 'http://www.dabjweb.com/api/order/jdTelPay';
+    const QUERY_URL = 'http://www.dabjweb.com/api/order/jdTelGet';
+
+    const masId = '699270071532654592';
+    const appKey = '8sa877sdj219sda';
+    const NOTIFY_URL = BASE_SITE_URL . "/racc/callback/lingzh/weishengy.php";
+    const ExtHeaders = ['Content-Type: application/json;charset=utf-8'];
+}

+ 6 - 10
helper/refill/policy/rlock.php

@@ -9,42 +9,38 @@ class rlock
     public static function set_total_amount($key, $spec)
     {
         $ins = Cache::getInstance('cacheredis');
-        $name = 'mechant_total_amount';
+        $name = 'refill_total_amount';
         return $ins->hIncrBy($name, "{$key}", intval($spec));
     }
 
     public static function get_total_amount($key)
     {
         $ins = Cache::getInstance('cacheredis');
-        $name = 'mechant_total_amount';
+        $name = 'refill_total_amount';
         return $ins->hget($name, '', "{$key}");
     }
 
     public static function set_amount_stock($key, $spec)
     {
         $ins = Cache::getInstance('cacheredis');
-        $name = 'mechant_amount_stock';
+        $name = 'mechant_amount_total';
         return $ins->hIncrBy($name, "{$key}", intval($spec));
     }
 
     public static function get_amount_stock($key)
     {
         $ins = Cache::getInstance('cacheredis');
-        $name = 'mechant_amount_stock';
+        $name = 'mechant_amount_total';
         return $ins->hget($name, '', "{$key}");
     }
 
     public static function set_amount_turn($key, $value)
     {
-        $ins = Cache::getInstance('cacheredis');
-        $name = 'mechant_amount_turn';
-        return $ins->hset($name, "{$key}", $value);
+        return wkcache($key, $value);
     }
 
     public static function get_amount_turn($key)
     {
-        $ins = Cache::getInstance('cacheredis');
-        $name = 'mechant_amount_turn';
-        return $ins->hget($name, '', "{$key}");
+        return rkcache($key);
     }
 }

+ 4 - 0
racc/callback/lingzh/shengying.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('shengying',$_POST);
+echo ('ok');

+ 4 - 0
racc/callback/lingzh/wailing.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('wailing',$_POST);
+echo ('success');

+ 4 - 0
racc/callback/lingzh/weishengy.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('weishengy',$_POST);
+echo ('success');

+ 139 - 90
shop/templates/default/seller/card_key.form.php

@@ -105,7 +105,7 @@
   .card_pwd_data_tips {
     text-align: center;
     position: absolute;
-    bottom: 30px;
+    bottom: 50px;
     right: 2%;
     background-color: rgba(238, 237, 236, 0.2);
     line-height: 34px;
@@ -219,8 +219,6 @@
           <input type="hidden" name="card_key" id="textareaVal">
           <textarea rows="2" class="textarea" id="textarea" ></textarea>
           <div class="card_pwd_data_tips">
-            <div class="card_role_title">卡号卡密之间请用“空格”隔开</div>
-            <div class="card_role_enter">输完一张请按“回车(Enter)”换行</div>
             <div class="card_role_tips">【移动卡密规则】卡号17位,卡密18位</div>
             <div class="card_role_tips">【联通卡密规则】卡号15位,卡密19位</div>
             <div class="card_role_tips">【电信卡密规则】卡号19位,卡密18位</div>
@@ -284,8 +282,12 @@
       layer.msg('请填写卡号卡密');
       return false
     }
-    let textSplitArr = textareaVal.split(/[(\r\n)\r\n]+/);
-    // console.log('textSplit', textSplitArr);
+    // let textSplitArr = textareaVal.split(/[(\r\n)\r\n]+/);
+    let textStr = textareaVal.replace(/[,,;;]/g, "").replace(/\s+/ig,"");
+    let textSubStr = '';
+    let textSubArr = [];
+    let textCardKeyStr = ''
+    let textCardKeyArr = []
     let cardArr
     let cardPassword
     let regSplitArr
@@ -293,76 +295,98 @@
     let open
     if (typeVal == 4) {
       // 移动
-      regSplitArr = textSplitArr.map(function(item,idx) {
-        item = item.replace(/\s+/ig," ")
-        if (item.length != 36) {
-          layer.msg('请按规则写正确的移动卡号+卡密');
-          isTrue = false
-          return 
-        } else {
-          return item
-        }
-      })
-      cardArr= regSplitArr.map(function(item) {
+      if (textStr.length%35 != 0) {
+        layer.msg('请填写正确的移动卡号卡密');
+        isTrue = false
+        return
+      }
+      for (let index = 0; index < textStr.length/35; index++) {
+        textSubStr += (textStr.substr(35*index, 35)+',')
+      }
+      textSubStr = textSubStr.substr(0, textSubStr.length-1)
+      textSubArr = textSubStr.split(',')
+      for (let index = 0; index < textSubArr.length; index++) {
+        textCardKeyArr.push(textSubArr[index].substr(0, 17) + ' ' + textSubArr[index].substr(17));
+        textCardKeyStr += (textSubArr[index].substr(0, 17) + ' ' + textSubArr[index].substr(17) + ',');
+      }
+      // console.log('textSubStr', textSubStr, textSubArr, textCardKeyArr);
+      cardArr= textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(0, 17)
         }
       })
-      cardPassword = regSplitArr.map(function(item) {
+      cardPassword = textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(18, 18)
         }
       })
-      $("#textareaVal").val(regSplitArr);
+      let btnCardText = textCardKeyStr.replace(/,/g,'\n')
+      // console.log('btnCardText',cardArr, cardPassword, btnCardText, textCardKeyArr);
+      $("#textarea").val(btnCardText);
+      $("#textareaVal").val(textCardKeyArr);
     } else if (typeVal == 5) {
       // 联通
-      regSplitArr = textSplitArr.map(function(item,idx) {
-        item = item.replace(/\s+/ig," ")
-        if (item.length != 35) {
-          layer.msg('请按规则写正确的联通卡号+卡密');
-          isTrue = false
-          return isTrue
-        } else {
-          return item
-        }
-      })
-      cardArr= regSplitArr.map(function(item) {
+      if (textStr.length%34 != 0) {
+        layer.msg('请填写正确的联通卡号卡密');
+        isTrue = false
+        return
+      }
+      for (let index = 0; index < textStr.length/34; index++) {
+        textSubStr += (textStr.substr(34*index, 34)+',')
+      }
+      textSubStr = textSubStr.substr(0, textSubStr.length-1)
+      textSubArr = textSubStr.split(',')
+      for (let index = 0; index < textSubArr.length; index++) {
+        textCardKeyArr.push(textSubArr[index].substr(0, 15) + ' ' + textSubArr[index].substr(15));
+        textCardKeyStr += (textSubArr[index].substr(0, 15) + ' ' + textSubArr[index].substr(15) + ',');
+      }
+      // console.log('textSubStr', textSubStr, textSubArr, textCardKeyArr);
+      cardArr= textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(0, 15)
         }
       })
-      cardPassword = regSplitArr.map(function(item) {
+      cardPassword = textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(16, 19)
         }
       })
-      $("#textareaVal").val(regSplitArr);
+      let btnCardText = textCardKeyStr.replace(/,/g,'\n')
+      // console.log('btnCardText', btnCardText);
+      $("#textarea").val(btnCardText);
+      $("#textareaVal").val(textCardKeyArr);
     } else if (typeVal == 6) {
       // 电信
-      regSplitArr = textSplitArr.map(function(item,idx) {
-        item = item.replace(/\s+/ig," ")
-        if (item.length != 38) {
-          layer.msg('请按规则写正确的电信卡号+卡密');
-          isTrue = false
-          return
-        } else {
-          return item
-        }
-      })
-      cardArr= regSplitArr.map(function(item) {
+      if (textStr.length%37 != 0) {
+        layer.msg('请填写正确的移动卡号卡密');
+        isTrue = false
+        return
+      }
+      for (let index = 0; index < textStr.length/37; index++) {
+        textSubStr += (textStr.substr(37*index, 37)+',')
+      }
+      textSubStr = textSubStr.substr(0, textSubStr.length-1)
+      textSubArr = textSubStr.split(',')
+      for (let index = 0; index < textSubArr.length; index++) {
+        textCardKeyArr.push(textSubArr[index].substr(0, 19) + ' ' + textSubArr[index].substr(19));
+        textCardKeyStr += (textSubArr[index].substr(0, 19) + ' ' + textSubArr[index].substr(19) + ',');
+      }
+      // console.log('textSubStr', textSubStr, textSubArr, textCardKeyArr);
+      cardArr= textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(0, 19)
         }
       })
-      cardPassword = regSplitArr.map(function(item) {
+      cardPassword = textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(20, 18)
         }
       })
-      $("#textareaVal").val(regSplitArr);
-      // console.log('regSplitArr',regSplitArr);
+      let btnCardText = textCardKeyStr.replace(/,/g,'\n')
+      // console.log('btnCardText', btnCardText);
+      $("#textarea").val(btnCardText);
+      $("#textareaVal").val(textCardKeyArr);
     }
-    // console.log('cardArr', cardArr, cardPassword);
     function isRepeat(arr) {
       var hash = {};
       for(var i in arr) {
@@ -401,8 +425,12 @@
       layer.msg('请填写卡号卡密');
       return false
     }
-    let textSplitArr = textareaVal.split(/[(\r\n)\r\n]+/);
-    // console.log('textSplit', textSplitArr);
+    // let textSplitArr = textareaVal.split(/[(\r\n)\r\n]+/);
+    let textStr = textareaVal.replace(/[,,;;]/g, "").replace(/\s+/ig,"");
+    let textSubStr = '';
+    let textSubArr = [];
+    let textCardKeyStr = ''
+    let textCardKeyArr = []
     let cardArr
     let cardPassword
     let regSplitArr
@@ -410,76 +438,97 @@
     let open
     if (typeVal == 4) {
       // 移动
-      regSplitArr = textSplitArr.map(function(item,idx) {
-        item = item.replace(/\s+/ig," ")
-        if (item.length != 36) {
-          layer.msg('请按规则写正确的移动卡号+卡密');
-          isTrue = false
-          return 
-        } else {
-          // isTrue = true
-          return item
-        }
-      })
-      cardArr= regSplitArr.map(function(item) {
+      if (textStr.length%35 != 0) {
+        layer.msg('请填写正确的移动卡号卡密');
+        isTrue = false
+        return
+      }
+      for (let index = 0; index < textStr.length/35; index++) {
+        textSubStr += (textStr.substr(35*index, 35)+',')
+      }
+      textSubStr = textSubStr.substr(0, textSubStr.length-1)
+      textSubArr = textSubStr.split(',')
+      for (let index = 0; index < textSubArr.length; index++) {
+        textCardKeyArr.push(textSubArr[index].substr(0, 17) + ' ' + textSubArr[index].substr(17));
+        textCardKeyStr += (textSubArr[index].substr(0, 17) + ' ' + textSubArr[index].substr(17) + ',');
+      }
+      // console.log('textSubStr', textSubStr, textSubArr, textCardKeyArr);
+      cardArr= textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(0, 17)
         }
       })
-      cardPassword = regSplitArr.map(function(item) {
+      cardPassword = textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(18, 18)
         }
       })
-      $("#textareaVal").val(regSplitArr);
+      let btnCardText = textCardKeyStr.replace(/,/g,'\n')
+      // console.log('btnCardText',cardArr, cardPassword, btnCardText, textCardKeyArr);
+      $("#textarea").val(btnCardText);
+      $("#textareaVal").val(textCardKeyArr);
     } else if (typeVal == 5) {
       // 联通
-      regSplitArr = textSplitArr.map(function(item,idx) {
-        item = item.replace(/\s+/ig," ")
-        if (item.length != 35) {
-          layer.msg('请按规则写正确的联通卡号+卡密');
-          isTrue = false
-          return
-        } else {
-          // isTrue = true
-          return item
-        }
-      })
-      cardArr= regSplitArr.map(function(item) {
+      if (textStr.length%34 != 0) {
+        layer.msg('请填写正确的联通卡号卡密');
+        isTrue = false
+        return
+      }
+      for (let index = 0; index < textStr.length/34; index++) {
+        textSubStr += (textStr.substr(34*index, 34)+',')
+      }
+      textSubStr = textSubStr.substr(0, textSubStr.length-1)
+      textSubArr = textSubStr.split(',')
+      for (let index = 0; index < textSubArr.length; index++) {
+        textCardKeyArr.push(textSubArr[index].substr(0, 15) + ' ' + textSubArr[index].substr(15));
+        textCardKeyStr += (textSubArr[index].substr(0, 15) + ' ' + textSubArr[index].substr(15) + ',');
+      }
+      // console.log('textSubStr', textSubStr, textSubArr, textCardKeyArr);
+      cardArr= textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(0, 15)
         }
       })
-      cardPassword = regSplitArr.map(function(item) {
+      cardPassword = textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(16, 19)
         }
       })
-      $("#textareaVal").val(regSplitArr);
+      let btnCardText = textCardKeyStr.replace(/,/g,'\n')
+      // console.log('btnCardText', btnCardText);
+      $("#textarea").val(btnCardText);
+      $("#textareaVal").val(textCardKeyArr);
     } else if (typeVal == 6) {
       // 电信
-      regSplitArr = textSplitArr.map(function(item,idx) {
-        item = item.replace(/\s+/ig," ")
-        if (item.length != 38) {
-          layer.msg('请按规则写正确的电信卡号+卡密');
-          isTrue = false
-          return
-        } else {
-          return item
-        }
-      })
-      cardArr= regSplitArr.map(function(item) {
+      if (textStr.length%37 != 0) {
+        layer.msg('请填写正确的移动卡号卡密');
+        isTrue = false
+        return
+      }
+      for (let index = 0; index < textStr.length/37; index++) {
+        textSubStr += (textStr.substr(37*index, 37)+',')
+      }
+      textSubStr = textSubStr.substr(0, textSubStr.length-1)
+      textSubArr = textSubStr.split(',')
+      for (let index = 0; index < textSubArr.length; index++) {
+        textCardKeyArr.push(textSubArr[index].substr(0, 19) + ' ' + textSubArr[index].substr(19));
+        textCardKeyStr += (textSubArr[index].substr(0, 19) + ' ' + textSubArr[index].substr(19) + ',');
+      }
+      // console.log('textSubStr', textSubStr, textSubArr, textCardKeyArr);
+      cardArr= textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(0, 19)
         }
       })
-      cardPassword = regSplitArr.map(function(item) {
+      cardPassword = textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(20, 18)
         }
       })
-      $("#textareaVal").val(regSplitArr);
-      // console.log('regSplitArr',regSplitArr);
+      let btnCardText = textCardKeyStr.replace(/,/g,'\n')
+      // console.log('btnCardText', btnCardText);
+      $("#textarea").val(btnCardText);
+      $("#textareaVal").val(textCardKeyArr);
     }
     // console.log('cardArr', cardArr, cardPassword);
     function isRepeat(arr) {

+ 56 - 38
shop/templates/default/seller/card_key.oil.form.php

@@ -105,7 +105,7 @@
   .card_pwd_data_tips {
     text-align: center;
     position: absolute;
-    bottom: 30px;
+    bottom: 50px;
     right: 2%;
     background-color: rgba(238, 237, 236, 0.2);
     line-height: 34px;
@@ -194,8 +194,6 @@
           <input type="hidden" name="card_key" id="textareaVal">
           <textarea rows="2" class="textarea" id="textarea" ></textarea>
           <div class="card_pwd_data_tips">
-            <div class="card_role_title">卡号卡密之间请用“空格”隔开</div>
-            <div class="card_role_enter">输完一张请按“回车(Enter)”换行</div>
             <div class="card_role_tips">【中石化卡密规则】卡号16位,卡密20位</div>
             <div class="card_role_eg">如:7967857824750842 94493936486377907702</div>
           </div>
@@ -256,38 +254,49 @@
       layer.msg('请填写卡号卡密');
       return false
     }
-    let textSplitArr = textareaVal.split(/[(\r\n)\r\n]+/);
-    // console.log('textSplit', textSplitArr);
+    // let textSplitArr = textareaVal.split(/[(\r\n)\r\n]+/);
+    let textStr = textareaVal.replace(/[,,;;]/g, "").replace(/\s+/ig,"");
+    let textSubStr = '';
+    let textSubArr = [];
+    let textCardKeyStr = ''
+    let textCardKeyArr = []
     let cardArr
     let cardPassword
     let regSplitArr
     let isTrue = true
+    let open
     if (typeVal == 2) {
       // 石化
-      regSplitArr = textSplitArr.map(function(item,idx) {
-        item = item.replace(/\s+/ig," ")
-        if (item.length != 37) {
-          layer.msg('请按规则写正确的中石化卡号+卡密');
-          isTrue = false
-          return
-        } else {
-          return item
-        }
-      })
-      cardArr= regSplitArr.map(function(item) {
+      if (textStr.length%36 != 0) {
+        layer.msg('请填写正确的移动卡号卡密');
+        isTrue = false
+        return
+      }
+      for (let index = 0; index < textStr.length/36; index++) {
+        textSubStr += (textStr.substr(36*index, 36)+',')
+      }
+      textSubStr = textSubStr.substr(0, textSubStr.length-1)
+      textSubArr = textSubStr.split(',')
+      for (let index = 0; index < textSubArr.length; index++) {
+        textCardKeyArr.push(textSubArr[index].substr(0, 16) + ' ' + textSubArr[index].substr(16));
+        textCardKeyStr += (textSubArr[index].substr(0, 16) + ' ' + textSubArr[index].substr(16) + ',');
+      }
+      // console.log('textSubStr', textSubStr, textSubArr, textCardKeyArr);
+      cardArr= textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(0, 16)
         }
       })
-      cardPassword = regSplitArr.map(function(item) {
+      cardPassword = textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(17, 20)
         }
       })
-      $("#textareaVal").val(regSplitArr);
-      // console.log('regSplitArr',regSplitArr);
+      let btnCardText = textCardKeyStr.replace(/,/g,'\n')
+      // console.log('btnCardText',cardArr, cardPassword, btnCardText, textCardKeyArr);
+      $("#textarea").val(btnCardText);
+      $("#textareaVal").val(textCardKeyArr);
     }
-    // console.log('cardArr', cardArr, cardPassword);
     function isRepeat(arr) {
       var hash = {};
       for(var i in arr) {
@@ -322,39 +331,48 @@
       layer.msg('请填写卡号卡密');
       return false
     }
-    let textSplitArr = textareaVal.split(/[(\r\n)\r\n]+/);
-    // console.log('textSplit', textSplitArr);
+    // let textSplitArr = textareaVal.split(/[(\r\n)\r\n]+/);
+    let textStr = textareaVal.replace(/[,,;;]/g, "").replace(/\s+/ig,"");
+    let textSubStr = '';
+    let textSubArr = [];
+    let textCardKeyStr = ''
+    let textCardKeyArr = []
     let cardArr
     let cardPassword
     let regSplitArr
     let isTrue = true
     let open
     if (typeVal == 2) {
-      // 石化
-      regSplitArr = textSplitArr.map(function(item,idx) {
-        item = item.replace(/\s+/ig," ")
-        if (item.length != 37) {
-          layer.msg('请按规则写正确的中石化卡号+卡密');
-          isTrue = false
-          return
-        } else {
-          return item
-        }
-      })
-      cardArr= regSplitArr.map(function(item) {
+      if (textStr.length%36 != 0) {
+        layer.msg('请填写正确的移动卡号卡密');
+        isTrue = false
+        return
+      }
+      for (let index = 0; index < textStr.length/36; index++) {
+        textSubStr += (textStr.substr(36*index, 36)+',')
+      }
+      textSubStr = textSubStr.substr(0, textSubStr.length-1)
+      textSubArr = textSubStr.split(',')
+      for (let index = 0; index < textSubArr.length; index++) {
+        textCardKeyArr.push(textSubArr[index].substr(0, 16) + ' ' + textSubArr[index].substr(16));
+        textCardKeyStr += (textSubArr[index].substr(0, 16) + ' ' + textSubArr[index].substr(16) + ',');
+      }
+      // console.log('textSubStr', textSubStr, textSubArr, textCardKeyArr);
+      cardArr= textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(0, 16)
         }
       })
-      cardPassword = regSplitArr.map(function(item) {
+      cardPassword = textCardKeyArr.map(function(item) {
         if (item) {
           return item = item.substr(17, 20)
         }
       })
-      $("#textareaVal").val(regSplitArr);
-      // console.log('regSplitArr',regSplitArr);
+      let btnCardText = textCardKeyStr.replace(/,/g,'\n')
+      // console.log('btnCardText',cardArr, cardPassword, btnCardText, textCardKeyArr);
+      $("#textarea").val(btnCardText);
+      $("#textareaVal").val(textCardKeyArr);
     }
-    // console.log('cardArr', cardArr, cardPassword);
     function isRepeat(arr) {
       var hash = {};
       for(var i in arr) {

+ 20 - 0
test/TestRefill.php

@@ -439,6 +439,26 @@ class TestRefill extends TestCase
 //        refill\RefillFactory::instance()->notify('riying',$input);
     }
 
+    public function testWeishengyPhone()
+    {
+        $providers = new refill\weishengy\RefillPhone([]);
+//        $resp = $providers->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '15551618590601301527']);
+        $data = '{"masId":"699270071532654592","oids":"158877719094,166090529155,158887187476","orderNo":"62411618635377880788","orderPrice":"150.00","phone":"18500608333","sign":"3EC10A32FC4CCC976048E1164D0FCBF6","status":"1","time":"1618643281063","type":"2"}';
+        $input = json_decode($data, true);
+        refill\RefillFactory::instance()->notify('weishengy',$input);
+    }
+
+    public function testWailingPhone()
+    {
+        $providers = new refill\wailing\RefillPhone([]);
+//        $resp = $providers->add(13699279618, 4, 30, ['order_sn' => $this->make_sn()]);
+        $resp = $providers->query(['order_sn' => '73241618543784045618']);
+        $data = '{"order_id":"73241618543784045618","mchid":"10045","tel":"13699279618","price":"30.00","sign":"4991de3e40f14c198b8c194455ea021b","status":"0","out_order_id":"0"}';
+        $input = json_decode($data, true);
+//        refill\RefillFactory::instance()->notify('wailing',$input);
+    }
+
     public function testYunlingPhone()
     {
         $providers = new refill\yunling\RefillPhone([]);