Browse Source

将妇联和零工市场共用数据库

linwu 1 year ago
parent
commit
06feb520b8

+ 2 - 1
app/mobile/EmpBaseController.php

@@ -152,6 +152,7 @@ abstract class EmpBaseController
             'wait' => $wait,
         ];
 
-        return view('/public/jump', $result);
+        $html      = view('/public/jump', $result);
+        throw new \think\exception\HttpResponseException($html);
     }
 }

+ 0 - 1
app/mobile/controller/Index.php

@@ -31,7 +31,6 @@ class Index extends UserBaseController
                 $tags = array_merge($tags,explode(',',$tag));
             }
             $v['tags'] = $tags;
-            $v['worker_name'] = $v['company_name'] ?: $v['worker']['title'];
         }
 
         return view('index/index', [

+ 0 - 3
app/mobile/controller/Jobs.php

@@ -72,7 +72,6 @@ class Jobs extends UserBaseController
                 $tags = array_merge($tags, explode(',', $tag));
             }
             $v['tags']        = $tags;
-            $v['worker_name'] = $v['company_name'] ?: $v['worker']['title'];
         }
 
         page_result(0, "", $list);
@@ -97,8 +96,6 @@ class Jobs extends UserBaseController
             $tags = array_merge($tags, explode(',', $tag));
         }
         $job['tags']           = $tags;
-        $job['worker_name']    = $job['company_name'] ?: $job['worker']['title'];
-        $job['worker_address'] = $job['company_address'] ?: $job['worker']['address'];
         $job['comdetails']     = addPByN($job['comdetails']);
         $job['requirement']    = addPByN($job['requirement']);
         $job['companydetails'] = addPByN($job['companydetails']);

+ 16 - 19
app/mobile/controller/Login.php

@@ -83,35 +83,30 @@ class Login
         $field   = input('field/s');
         $sinpage = SinpageModel::where(1)->find();
         $data    = [];
-        if ($field == "aboutus") {
+        if ($field == "woman_aboutus") {
             $data = [
                 'pagetil' => '关于我们',
-                'pagecon' => $sinpage->aboutus,
+                'pagecon' => $sinpage->woman_aboutus,
             ];
-        } elseif ($field == "privacy") {
+        } elseif ($field == "woman_privacy") {
             $data = [
                 'pagetil' => '隐私政策',
-                'pagecon' => $sinpage->privacy,
+                'pagecon' => $sinpage->woman_privacy,
             ];
-        } elseif ($field == "service") {
+        } elseif ($field == "woman_service") {
             $data = [
                 'pagetil' => '用户协议',
-                'pagecon' => $sinpage->service,
+                'pagecon' => $sinpage->woman_service,
             ];
-        } elseif ($field == "contact") {
+        } elseif ($field == "woman_contact") {
             $data = [
                 'pagetil' => '联系客服',
-                'pagecon' => $sinpage->contact,
-            ];
-        } elseif ($field == "wxmp") {
-            $data = [
-                'pagetil' => '嵌入公众号说明',
-                'pagecon' => $sinpage->wxmp,
+                'pagecon' => $sinpage->woman_contact,
             ];
         } else {
             $data = [
                 'pagetil' => '关于我们',
-                'pagecon' => $sinpage->aboutus,
+                'pagecon' => $sinpage->woman_aboutus,
             ];
         }
 
@@ -187,15 +182,15 @@ class Login
                 'nickname'   => $nickname,
                 'avatar'     => $headimgurl ?? '',
                 'mobile'     => $mobile,
-                'groupsid'     => 7,
-                'education'     => 7,
+                'groupsid'   => 7,
+                'education'  => 7,
                 'emp_time'   => [],
                 'user_tags'  => [],
                 'com_cate'   => [],
                 'work_place' => [],
                 'createtime' => time(),
             ]);
-            $auth = UserAuthsModel::create([
+            $auth       = UserAuthsModel::create([
                 'userid'       => $user['id'],
                 'identitytype' => 'weixin',
                 'identifier'   => $open_id,
@@ -259,7 +254,7 @@ class Login
         $user_id = get_user_id();
         $worker  = WorkerModel::field(['id', 'realname', 'mobile', 'address', 'title', 'details', 'picone', 'remark', 'status'])->where('userid', $user_id)->find();
         if (empty($worker)) {
-            $worker = json_encode(['id' => 0, 'realname' => '', 'mobile' => '', 'address' => '', 'title' => '', 'details' => '', 'picone' => '', 'remark' => '']);
+            $worker = json_encode(['id' => 0, 'wtype' => '', 'realname' => '', 'mobile' => '', 'address' => '', 'title' => '', 'details' => '', 'picone' => '', 'remark' => '']);
         } else {
             if ($worker->status == 1) {
                 return $this->_jump('等待管理员审核', url('/login/setType') . '?type=1');
@@ -283,12 +278,14 @@ class Login
         } else {
             $user_id            = get_user_id();
             $data['userid']     = $user_id;
-            $data['wtype']      = 2;
             $data['ftitle']     = $data['title'];
             $data['province']   = '福建省';
             $data['city']       = '泉州市';
             $data['district']   = '晋江市';
             $data['createitme'] = time();
+            if ($data['wtype'] == 1) {
+                $data['title'] = $data['ftitle'] = $data['realname'];
+            }
             WorkerModel::create($data);
         }
         page_result();

+ 1 - 1
app/mobile/controller/Resume.php

@@ -34,7 +34,7 @@ class Resume extends EmpBaseController
         $size = input('size/d', 20);
 
         $model = new UserModel();
-        $model = $model->where('status', 2)->where('authstatus', '=', 3);
+        $model = $model->where('status', 2)->where('authstatus', '=', 3)->where('gender',2);
 
         $jobintention = input('jobintention/d', 0);
         if (!empty($jobintention)) {

+ 1 - 1
app/mobile/view/index/index.html

@@ -38,7 +38,7 @@
         </div>
         <div class="job-flex margin-top-10">
             <div class="job-flex-left">
-                {{item.worker_name}}
+                {{item.worker.title}}
             </div>
             <div class="job-flex-right">
                 浏览量:{{item.volume}}

+ 5 - 5
app/mobile/view/jobs/detail.html

@@ -32,7 +32,7 @@
     </div>
     <div class="job-flex margin-top-10">
         <div class="job-flex-left">
-            {{job.worker_name}}
+            {{job.worker.title}}
         </div>
         <div class="job-flex-right">
             浏览量:{{job.volume}}
@@ -76,8 +76,8 @@
     <div class="company" style="padding-top:10px;" @click="toWorker">
         <img :src="img_worker">
         <div class="company-right">
-            <div class="company-name">{{job.worker_name}}</div>
-            <div class="company-address">{{job.worker_address}}</div>
+            <div class="company-name">{{job.worker.title}}</div>
+            <div class="company-address">{{job.worker.address}}</div>
         </div>
     </div>
 </div>
@@ -103,10 +103,10 @@
             </div>
         </van-col>
         <van-col span="16">
-            <div class="button" @click="onApply" v-if="job.third_id == 0 && !log">
+            <div class="button" @click="onApply" v-if="!log">
                 报名
             </div>
-            <div class="button" @click="onMobile" v-if="job.third_id > 0 || log">
+            <div class="button" @click="onMobile" v-if="log">
                 联系对方
             </div>
         </van-col>

+ 1 - 1
app/mobile/view/jobs/index.html

@@ -43,7 +43,7 @@
                 </div>
                 <div class="job-flex margin-top-10">
                     <div class="job-flex-left">
-                        {{item.worker_name}}
+                        {{item.worker.title}}
                     </div>
                     <div class="job-flex-right">
                         浏览量:{{item.volume}}

+ 31 - 9
app/mobile/view/login/emp_register.html

@@ -24,12 +24,20 @@
 <div style="width:100%;height:46px;"></div>
 
 <van-cell-group>
+<van-field name="radio" required label="类型">
+    <template #input>
+        <van-radio-group v-model="form.wtype" direction="horizontal">
+            <van-radio name="1">个人雇主</van-radio>
+            <van-radio name="2">企业雇主</van-radio>
+        </van-radio-group>
+    </template>
+</van-field>
 <van-field v-model="form.realname" required label="姓名" placeholder="请输入姓名"></van-field>
 <van-field v-model="form.mobile" required label="电话" placeholder="请输入电话"></van-field>
 <van-field v-model="form.address" required label="地址" placeholder="请输入地址"></van-field>
 </van-cell-group>
 <van-cell-group style="margin-top:10px;">
-    <van-field v-model="form.title" required label="公司名称" placeholder="请输入公司名称"></van-field>
+    <van-field v-model="form.title" label="公司名称" placeholder="请输入公司名称"></van-field>
     <van-field
             v-model="form.details"
             rows="1"
@@ -40,7 +48,7 @@
     ></van-field>
 </van-cell-group>
 <van-cell-group style="margin-top:10px;">
-    <van-field label="营业执照" required readonly></van-field>
+    <van-field label="营业执照" readonly></van-field>
     <div class="uploader-box">
         <van-uploader :max-count="1" :after-read="uploadPic">
             <van-image style="width:80%;display:block;margin:20px auto 0 auto;" :src="pic_image"></van-image>
@@ -82,13 +90,27 @@
                     }, 'json')
                 },
                 onSubmit() {
-                    const fields = [
-                        {key: 'realname', tip: '请输入姓名'},
-                        {key: 'mobile', tip: '请输入电话'},
-                        {key: 'address', tip: '请输入地址'},
-                        {key: 'title', tip: '请输入公司名称'},
-                        {key: 'picone', tip: '请上传营业执照'},
-                    ];
+                    if (this.form.wtype == '') {
+                        this.$toast('请选择雇主类型');
+                        return false;
+                    }
+                    let fields = [];
+                    if (this.form.wtype == 1) {
+                         fields = [
+                            {key: 'realname', tip: '请输入姓名'},
+                            {key: 'mobile', tip: '请输入电话'},
+                            {key: 'address', tip: '请输入地址'},
+                        ];
+                    } else {
+                         fields = [
+                            {key: 'wtype', tip: '请选择雇主类型'},
+                            {key: 'realname', tip: '请输入姓名'},
+                            {key: 'mobile', tip: '请输入电话'},
+                            {key: 'address', tip: '请输入地址'},
+                            {key: 'title', tip: '请输入公司名称'},
+                            {key: 'picone', tip: '请上传营业执照'},
+                        ];
+                    }
                     for (let i = 0; i < fields.length; i++) {
                         if (this.form[fields[i].key].trim() === '') {
                             this.$toast(fields[i].tip);

+ 2 - 2
app/mobile/view/login/type.html

@@ -43,8 +43,8 @@
             <div class="agreement-content">
                 <p>请你务必审慎阅读、充分理解“用户服务协议”和“隐私政策”各条款,包括但不限于:为了向你提供即时招聘讯息、内容分享等服务,我们需要收集你的设备信息、操作日志等个人信息。</p>
                 <p>你可阅读
-                    <a href="{:url('/login/sinpage')}?field=service">《用户服务协议》</a>
-                    和<a href="{:url('/login/sinpage')}?field=privacy">《隐私政策》</a>
+                    <a href="{:url('/login/sinpage')}?field=woman_service">《用户服务协议》</a>
+                    和<a href="{:url('/login/sinpage')}?field=woman_privacy">《隐私政策》</a>
                     了解详细信息,如你同意,请点击“我同意”开始接受我们等服务。</p>
             </div>
             <div class="agreement-footer" @click="onAgree">

+ 4 - 4
app/mobile/view/my/about.html

@@ -18,10 +18,10 @@
     </van-nav-bar>
 <div style="width:100%;height:46px;"></div>
 <van-cell-group>
-    <van-cell title="关于我们" is-link url="{:url('/login/sinpage')}?field=aboutus" size="large"></van-cell>
-    <van-cell title="服务协议" is-link url="{:url('/login/sinpage')}?field=service" size="large"></van-cell>
-    <van-cell title="隐私政策" is-link url="{:url('/login/sinpage')}?field=privacy" size="large"></van-cell>
-    <van-cell title="联系我们" is-link url="{:url('/login/sinpage')}?field=contact" size="large"></van-cell>
+    <van-cell title="关于我们" is-link url="{:url('/login/sinpage')}?field=woman_aboutus" size="large"></van-cell>
+    <van-cell title="服务协议" is-link url="{:url('/login/sinpage')}?field=woman_privacy" size="large"></van-cell>
+    <van-cell title="隐私政策" is-link url="{:url('/login/sinpage')}?field=woman_service" size="large"></van-cell>
+    <van-cell title="联系我们" is-link url="{:url('/login/sinpage')}?field=woman_contact" size="large"></van-cell>
 </van-cell-group>
 {/block}
 {block name="script"}