Browse Source

Merge branch 'develop' of zhengxifeng/zc100 into master

zhengxifeng 7 months ago
parent
commit
aea49c8dd0

+ 11
- 1
application/admin/controller/ZcwdPosition.php View File

@@ -61,6 +61,8 @@ class ZcwdPosition extends Base
61 61
             ->order('pid asc, id asc')
62 62
             ->select();
63 63
 
64
+        $temp_id = 0;
65
+        $t_color = '#000';
64 66
         foreach ($list as $k => $v) {
65 67
 
66 68
             /*
@@ -97,6 +99,14 @@ class ZcwdPosition extends Base
97 99
                 $v['type_name'] = 'HTML代码';
98 100
             }*/
99 101
 
102
+            //处理颜色
103
+            if((int)$temp_id !== (int)$v['type']){
104
+                $red = mt_rand(0, 255);
105
+                $green = mt_rand(0, 255);
106
+                $blue = mt_rand(0, 255);
107
+                $t_color = sprintf("#%02x%02x%02x", $red, $green, $blue);
108
+            }
109
+            $temp_id = (int)$v['type'];
100 110
 
101 111
             //处理图片
102 112
             $v['ad'] = [];
@@ -123,7 +133,7 @@ class ZcwdPosition extends Base
123 133
                 ->find();
124 134
 
125 135
             $v['type_name'] = $one['name'];
126
-
136
+            $v['color'] = $t_color;
127 137
             $list[$k] = $v;
128 138
         }
129 139
 

+ 11
- 2
application/admin/controller/ZcwePosition.php View File

@@ -17,7 +17,7 @@ use think\Page;
17 17
 use think\Db;
18 18
 use think\Cache;
19 19
 
20
-class ZcwePosition extends Base
20
+class  ZcwePosition extends Base
21 21
 {
22 22
     private $ad_position_system_id = array(); // 系统默认位置ID,不可删除
23 23
 
@@ -99,6 +99,15 @@ class ZcwePosition extends Base
99 99
                 $v['type_name'] = 'HTML代码';
100 100
             }*/
101 101
 
102
+            //处理颜色
103
+            if((int)$temp_id !== (int)$v['type']){
104
+                $red = mt_rand(0, 255);
105
+                $green = mt_rand(0, 255);
106
+                $blue = mt_rand(0, 255);
107
+                $t_color = sprintf("#%02x%02x%02x", $red, $green, $blue);
108
+            }
109
+            $temp_id = (int)$v['type'];
110
+
102 111
 
103 112
             //处理图片
104 113
             $v['ad'] = [];
@@ -125,7 +134,7 @@ class ZcwePosition extends Base
125 134
                 ->find();
126 135
 
127 136
             $v['type_name'] = $one['name'];
128
-
137
+            $v['color'] = $t_color;
129 138
             $list[$k] = $v;
130 139
         }
131 140
 

+ 9
- 1
application/admin/controller/ZcwfPosition.php View File

@@ -99,6 +99,14 @@ class ZcwfPosition extends Base
99 99
                 $v['type_name'] = 'HTML代码';
100 100
             }*/
101 101
 
102
+            //处理颜色
103
+            if((int)$temp_id !== (int)$v['type']){
104
+                $red = mt_rand(0, 255);
105
+                $green = mt_rand(0, 255);
106
+                $blue = mt_rand(0, 255);
107
+                $t_color = sprintf("#%02x%02x%02x", $red, $green, $blue);
108
+            }
109
+            $temp_id = (int)$v['type'];
102 110
 
103 111
             //处理图片
104 112
             $v['ad'] = [];
@@ -125,7 +133,7 @@ class ZcwfPosition extends Base
125 133
                 ->find();
126 134
 
127 135
             $v['type_name'] = $one['name'];
128
-
136
+            $v['color'] = $t_color;
129 137
             $list[$k] = $v;
130 138
         }
131 139
 

+ 2
- 0
application/admin/controller/ZczsPosition.php View File

@@ -279,6 +279,7 @@ class ZczsPosition extends Base
279 279
                 'type'        => $post['type'], //职称地区  全国或者地区
280 280
                 'intro'       => $post['intro'], //备注
281 281
                 'admin_id'    => session('admin_id'),
282
+                'bdxl' => $post['bdxl'], //绑定学历
282 283
                 'lang'        => $this->admin_lang,
283 284
                 'add_time'    => getTime(),
284 285
                 'update_time' => getTime(),
@@ -482,6 +483,7 @@ class ZczsPosition extends Base
482 483
                     'title'       => trim($post['title']),
483 484
                     'type'        => $post['type'], //全国或者地区
484 485
                     'intro'       => $post['intro'],
486
+                    'bdxl' => $post['bdxl'], //绑定学历
485 487
                     'update_time' => getTime(),
486 488
                 );
487 489
                 $resultID = Db::name('zczs_position')->update($data);

+ 2
- 2
application/admin/template/zcwd_position/index.htm View File

@@ -125,9 +125,9 @@
125 125
                                 </td>
126 126
 
127 127
                                 <td align="left" style="width:100%;">
128
-                                    <div class="tl text-l10">
128
+                                    <div class="tl text-l10" style="color:{$vo.color}">
129 129
                                         {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
130
-                                            <a href="javascript:void(0);" data-href="{:url('ZcwdPosition/edit',array('id'=>$vo['id']))}" data-closereload="1" onclick="openFullframe(this, '编辑广告', '100%', '100%');">{$vo.title}</a>
130
+                                            <a href="javascript:void(0);" data-href="{:url('ZcwdPosition/edit',array('id'=>$vo['id']))}" data-closereload="1" onclick="openFullframe(this, '编辑广告', '100%', '100%');" style="color:{$vo.color}">{$vo.title}</a>
131 131
                                         {else /}
132 132
                                             {$vo.title}
133 133
                                         {/eq}

+ 2
- 2
application/admin/template/zcwe_position/index.htm View File

@@ -120,9 +120,9 @@
120 120
                                 </td>
121 121
 
122 122
                                 <td align="left" style="width:100%;">
123
-                                    <div class="tl text-l10">
123
+                                    <div class="tl text-l10" style="color:{$vo.color}">
124 124
                                         {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
125
-                                            <a href="javascript:void(0);" data-href="{:url('ZcwdPosition/edit',array('id'=>$vo['id']))}" data-closereload="1" onclick="openFullframe(this, '编辑广告', '100%', '100%');">{$vo.title}</a>
125
+                                            <a href="javascript:void(0);" data-href="{:url('ZcwdPosition/edit',array('id'=>$vo['id']))}" data-closereload="1" onclick="openFullframe(this, '编辑广告', '100%', '100%');" style="color:{$vo.color}">{$vo.title}</a>
126 126
                                         {else /}
127 127
                                             {$vo.title}
128 128
                                         {/eq}

+ 2
- 2
application/admin/template/zcwf_position/index.htm View File

@@ -122,9 +122,9 @@
122 122
                                 </td>
123 123
 
124 124
                                 <td align="left" style="width:100%;">
125
-                                    <div class="tl text-l10">
125
+                                    <div class="tl text-l10" style="color:{$vo.color}">
126 126
                                         {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
127
-                                            <a href="javascript:void(0);" data-href="{:url('ZcwdPosition/edit',array('id'=>$vo['id']))}" data-closereload="1" onclick="openFullframe(this, '编辑广告', '100%', '100%');">{$vo.title}</a>
127
+                                            <a href="javascript:void(0);" data-href="{:url('ZcwdPosition/edit',array('id'=>$vo['id']))}" data-closereload="1" onclick="openFullframe(this, '编辑广告', '100%', '100%');" style="color:{$vo.color}">{$vo.title}</a>
128 128
                                         {else /}
129 129
                                             {$vo.title}
130 130
                                         {/eq}

+ 23
- 0
application/admin/template/zczs_position/add.htm View File

@@ -84,6 +84,29 @@
84 84
                 </dd>
85 85
             </dl>
86 86
 
87
+            <dl class="row" id="citychoose" style="display: block;">
88
+                <dt class="tit"> <label for="title"><em>*</em>绑定学历</label> </dt>
89
+                <dd class="opt">
90
+
91
+                    <select name="bdxl" class="select" id="selectTest2" style="margin:0px 5px;height:30px;">
92
+                        <?php
93
+                        /*<option value="{$field1.id}" {eq name="$pid" value="$field1.id"}selected{/eq}>{$field1.name}</option>*/
94
+                        ?>
95
+                        <option value="0">选择学历</option>
96
+                        <option value="1">中专</option>
97
+                        <option value="2">高技</option>
98
+                        <option value="3">大专</option>
99
+                        <option value="4">本科</option>
100
+                        <option value="5">硕士</option>
101
+                        <option value="6">博士</option>
102
+                    </select>
103
+
104
+                    <span class="err"></span>
105
+                    <p class="notic2 red" id="title_tips"></p>
106
+                </dd>
107
+            </dl>
108
+
109
+
87 110
             <dl class="row" id="citychoose" style="display: none;">
88 111
                 <dt class="tit"> <label for="title"><em>*</em>地区选择</label> </dt>
89 112
                 <dd class="opt">

+ 23
- 0
application/admin/template/zczs_position/edit.htm View File

@@ -89,6 +89,29 @@
89 89
 
90 90
 
91 91
 
92
+            <dl class="row" id="citychoose" style="display: block;">
93
+                <dt class="tit"> <label for="title"><em>*</em>绑定学历</label> </dt>
94
+                <dd class="opt">
95
+
96
+                    <select name="bdxl" class="select" id="selectTest999" style="margin:0px 5px;height:30px;">
97
+                        <?php
98
+                        /*<option value="{$field1.id}" {eq name="$pid" value="$field1.id"}selected{/eq}>{$field1.name}</option>*/
99
+                        ?>
100
+                        <option value="0" {eq name="$field.bdxl" value="0"}selected{/eq}>选择学历</option>
101
+                        <option value="1" {eq name="$field.bdxl" value="1"}selected{/eq}>中专</option>
102
+                        <option value="2" {eq name="$field.bdxl" value="2"}selected{/eq}>高技</option>
103
+                        <option value="3" {eq name="$field.bdxl" value="3"}selected{/eq}>大专</option>
104
+                        <option value="4" {eq name="$field.bdxl" value="4"}selected{/eq}>本科</option>
105
+                        <option value="5" {eq name="$field.bdxl" value="5"}selected{/eq}>硕士</option>
106
+                        <option value="6" {eq name="$field.bdxl" value="6"}selected{/eq}>博士</option>
107
+                    </select>
108
+
109
+                    <span class="err"></span>
110
+                    <p class="notic2 red" id="title_tips"></p>
111
+                </dd>
112
+            </dl>
113
+
114
+
92 115
             <dl class="row" id="citychoose" style="display: none;" >
93 116
                 <dt class="tit"> <label for="title"><em>*</em>地区选择</label> </dt>
94 117
                 <dd class="opt">

+ 13
- 1
application/api/controller/Diyajax.php View File

@@ -214,18 +214,30 @@ class Diyajax extends Base
214 214
     {
215 215
         $param = request()->param();
216 216
         $param['id'] = (int)$param['id'];
217
+        $param['xl'] = (int)$param['xl'];
218
+
217 219
         if(!empty($param['id'])){
218 220
             $map_ids = Db::name('zc_zs')
219 221
                 ->where('zc_id', $param['id'])
220 222
                 ->where('is_del', 0)
221 223
                 ->column('map_id');
224
+
222 225
             //调用等级
223 226
             $list = Db::name('zczs_position')
224 227
                 ->where('id','in',$map_ids)
225 228
                 ->where('is_del', 0)
226 229
                 ->where('status', 1)
227 230
                 ->select();
228
-            respose(['code'=>1, 'msg'=>'请求成功', 'data'=>$list]);
231
+
232
+            $new_list = [];
233
+            foreach ($list as $k=>$v){
234
+                if((int)$v['bdxl'] >= (int)$param['xl']){
235
+                    //保留
236
+                    $new_list[] = $v;
237
+                }
238
+            }
239
+
240
+            respose(['code'=>1, 'msg'=>'请求成功', 'data'=>$new_list]);
229 241
         }else{
230 242
             respose(['code'=>0, 'msg'=>'请求失败', 'data'=>[]]);
231 243
         }

+ 1
- 1
template/pc/components/index/kop.htm View File

@@ -151,7 +151,7 @@ $tyu_num = 1;
151 151
                 <td><?php echo $xl[$detail['xl']];?></td>
152 152
                 <td>
153 153
                     <?php
154
-                    if($field2['xlyq'] == $detail['xl']){
154
+                    if($field2['xlyq'] <= $detail['xl']){
155 155
                         //echo "<font style='color: blue;'>符合</font>";
156 156
                         echo '<font class="td-r"><img src="/template/pc/js/botstrap-step/img_6.png" /></font>';
157 157
                         $num++;

+ 4
- 1
template/pc/js/botstrap-step/scripts.js View File

@@ -158,6 +158,8 @@ jQuery(document).ready(function() {
158 158
                 return false;
159 159
             }
160 160
 
161
+            var xl = $('#choose5').val();
162
+
161 163
             //调用证书
162 164
             $('#loadingModal').modal('show');
163 165
             $.ajax({
@@ -165,7 +167,8 @@ jQuery(document).ready(function() {
165 167
                 method: 'POST',
166 168
                 dataType: 'json', // 指定响应数据为JSON
167 169
                 data: {
168
-                    id: a
170
+                    id: a,
171
+                    xl: xl,
169 172
                 },
170 173
                 success: function (data) {
171 174
                     // 请求成功后隐藏加载状态

Loading…
Cancel
Save