Browse Source

merchant.mctl remove opened

xiaoyu 3 years ago
parent
commit
64fea32584

+ 0 - 1
admin/control/merchant.php

@@ -1122,7 +1122,6 @@ class merchantControl extends SystemControl
                 $profit_ratio = floatval($_POST['profit_ratio']) ?? 0;
                 $retry_times_cfg['lower_ratio'] = ['ratio' => $ratio, 'period' => $period];
                 $retry_times_cfg['profit_ratio'] = $profit_ratio;
-                $retry_times_cfg['opened'] = intval($_POST['opened']) === 1;
                 return serialize($retry_times_cfg);
             };
 

+ 3 - 20
admin/templates/default/merchant.ctl.php

@@ -58,7 +58,7 @@
             <tr class="noborder">
                 <td colspan="2" class="required"><label class="mleft" for="name">状态码:</label>
                     <?php foreach ($output['card_state'] as $key => $value) { ?>
-                        <?php if ($value != '实号') { ?>
+                        <?php if ($value != '实号' && $key != 1) { ?>
                             <label>
                             <input type="checkbox" name="card_states[]" value="<?php echo $key; ?>"
                             <?php if (!empty($output['intercept']['card_states']) && in_array($key, $output['intercept']['card_states'])) {
@@ -104,24 +104,7 @@
                 <td colspan="2" class="required"><label class="validation">高价补充条件:</label></td>
             </tr>
             <tr class="noborder">
-                <td colspan="2" class="required"><label class="mleft" for="name">开启状态:</label>
-                    <label>
-                        <input type="radio" class="open" name="opened"
-                                 value="1" <?php if ($output['retry_times']['opened'] === true) {
-                            echo 'checked';
-                        } ?>>开启
-                    </label>
-                    <label>
-                        <input type="radio" class="open" name="opened"
-                                 value="0" <?php if ($output['retry_times']['opened'] === false) {
-                            echo 'checked';
-                        } ?>>关闭
-                    </label>
-                </td>
-            </tr>
-
-            <tr class="noborder">
-                <td colspan="2" class="required"><label style="margin-left: 45px;" for="name">成功率不低于:</label>
+                <td colspan="2" class="required"><label style="margin-left: 45px; " for="name">成功率不低于:</label>
                     <label for="success"></label><input type="text" name="ratio"
                                                         value="<?php echo $output['retry_times']['lower_ratio']['ratio'] ?? 0; ?>" id="success">
 
@@ -147,7 +130,7 @@
             </tr>
 
             <tr class="noborder">
-                <td colspan="2" class="required"><label style="margin-left: 45px;" for="name">利润率低于:</label>
+                <td colspan="2" class="required"><label style="margin-left: 45px;display: inline-block;width: 84px" for="name">利润率低于:</label>
                     <label>
                         <input type="text" name="profit_ratio"
                                value="<?php echo $output['retry_times']['profit_ratio'] ?? 0;?>"

+ 6 - 1
helper/mtopcard/mtopcard.php

@@ -74,7 +74,12 @@ const ProvinceList = [
 
 #空号拦截状态
 const CardState = [
-    '空号','实号','停机','库无','沉默号','风险号'
+    0 => '空号',
+    1 => '实号',
+    2 => '停机',
+    3 => '库无',
+    4 => '沉默号',
+    5 => '风险号'
 ];
 
 function month_stamp($time=null) : int {