正在显示
13 个修改的文件
包含
701 行增加
和
256 行删除
@@ -93,6 +93,20 @@ class IndexController extends CommentController | @@ -93,6 +93,20 @@ class IndexController extends CommentController | ||
93 | }else{ | 93 | }else{ |
94 | $final['is_check'] = 1; | 94 | $final['is_check'] = 1; |
95 | } | 95 | } |
96 | +// 判断是否填写过 | ||
97 | + $where_resume['user_id'] = Session::get('uid'); | ||
98 | + $where_resume['status'] = array('neq',9); | ||
99 | + $is_resume = Db::name('Resume')->where($where_resume)->find(); | ||
100 | + if($is_resume){ | ||
101 | + if($is_resume['status'] == 2){ | ||
102 | + $final['is_resume'] = 2; | ||
103 | + }else{ | ||
104 | + $final['is_resume'] = 3; | ||
105 | + } | ||
106 | + | ||
107 | + }else{ | ||
108 | + $final['is_resume'] = 0; | ||
109 | + } | ||
96 | // 轮播图 | 110 | // 轮播图 |
97 | $where_banner['status'] = array('neq',9); | 111 | $where_banner['status'] = array('neq',9); |
98 | $where_banner['type'] = 2; | 112 | $where_banner['type'] = 2; |
@@ -136,18 +150,24 @@ class IndexController extends CommentController | @@ -136,18 +150,24 @@ class IndexController extends CommentController | ||
136 | } | 150 | } |
137 | } | 151 | } |
138 | 152 | ||
153 | + public function getPic(){ | ||
154 | + $get = new MemberController(); | ||
155 | + $this->apiResponse('1','成功',$get->pic($_FILES)) ; | ||
156 | + } | ||
157 | + | ||
158 | + | ||
139 | // 我要兼职表单提交 | 159 | // 我要兼职表单提交 |
140 | public function resume() | 160 | public function resume() |
141 | { | 161 | { |
142 | $data = $this->request->param(); | 162 | $data = $this->request->param(); |
143 | // 图片上传 | 163 | // 图片上传 |
144 | - | ||
145 | $validate = Loader::validate('Resume'); | 164 | $validate = Loader::validate('Resume'); |
146 | if(!$validate->check($data)){ | 165 | if(!$validate->check($data)){ |
147 | $mes = $validate->getError(); | 166 | $mes = $validate->getError(); |
148 | $this->apiResponse('0',$mes); | 167 | $this->apiResponse('0',$mes); |
149 | } | 168 | } |
150 | $model = new ResumeModel(); | 169 | $model = new ResumeModel(); |
170 | + $data['user_id'] = Session::get('uid'); | ||
151 | $res = $model->save($data); | 171 | $res = $model->save($data); |
152 | if($res){ | 172 | if($res){ |
153 | $this->apiResponse('1','成功'); | 173 | $this->apiResponse('1','成功'); |
@@ -25,6 +25,7 @@ class MemberController extends CommentController | @@ -25,6 +25,7 @@ class MemberController extends CommentController | ||
25 | { | 25 | { |
26 | $where_member['id'] = Session::get('uid'); | 26 | $where_member['id'] = Session::get('uid'); |
27 | $member = Db::name('Member')->where($where_member)->find(); | 27 | $member = Db::name('Member')->where($where_member)->find(); |
28 | + $member['wx_pic'] = cmf_get_image_url($member['wx_pic']); | ||
28 | $this->assign('list',$member); | 29 | $this->assign('list',$member); |
29 | return $this->fetch(); | 30 | return $this->fetch(); |
30 | } | 31 | } |
@@ -32,63 +33,55 @@ class MemberController extends CommentController | @@ -32,63 +33,55 @@ class MemberController extends CommentController | ||
32 | public function changeUser(){ | 33 | public function changeUser(){ |
33 | $where_member['id'] = Session::get('uid'); | 34 | $where_member['id'] = Session::get('uid'); |
34 | $member = Db::name('Member')->where($where_member)->find(); | 35 | $member = Db::name('Member')->where($where_member)->find(); |
36 | + $member['wx_pic'] = cmf_get_image_url($member['wx_pic']); | ||
35 | $this->assign('list',$member); | 37 | $this->assign('list',$member); |
36 | return $this->fetch('editmaterial'); | 38 | return $this->fetch('editmaterial'); |
37 | } | 39 | } |
38 | // 修改资料 | 40 | // 修改资料 |
39 | public function change(){ | 41 | public function change(){ |
40 | $data = $this->request->param(); | 42 | $data = $this->request->param(); |
41 | -echo "<pre/>"; | ||
42 | -print_r($_FILES); | ||
43 | -die; | ||
44 | - if ((($_FILES["file"]["type"] == "image/gif") | ||
45 | - || ($_FILES["file"]["type"] == "image/jpeg") | ||
46 | - || ($_FILES["file"]["type"] == "image/pjpeg")) | ||
47 | - && ($_FILES["file"]["size"] < 20000)) | ||
48 | - { | ||
49 | - if ($_FILES["file"]["error"] > 0) | ||
50 | - { | ||
51 | - echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; | ||
52 | - } | ||
53 | - else | ||
54 | - { | ||
55 | - echo "Upload: " . $_FILES["file"]["name"] . "<br />"; | ||
56 | - echo "Type: " . $_FILES["file"]["type"] . "<br />"; | ||
57 | - echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />"; | ||
58 | - echo "Temp file: " . $_FILES["file"]["tmp_name"] . "<br />"; | ||
59 | - | ||
60 | - if (file_exists("upload/" . $_FILES["file"]["name"])) | ||
61 | - { | ||
62 | - echo $_FILES["file"]["name"] . " already exists. "; | ||
63 | - } | ||
64 | - else | ||
65 | - { | ||
66 | - move_uploaded_file($_FILES["file"]["tmp_name"], | ||
67 | - "upload/" . $_FILES["file"]["name"]); | ||
68 | - echo "Stored in: " . "upload/" . $_FILES["file"]["name"]; | ||
69 | - } | ||
70 | - } | 43 | + $final = array(); |
44 | + if(!empty($_FILES)){ | ||
45 | +// 图片 | ||
46 | + $res = $this->pic($_FILES); | ||
47 | + $final[] = cmf_get_image_url($res); | ||
48 | + $data['wx_pic'] = $res; | ||
71 | } | 49 | } |
72 | - else | ||
73 | - { | ||
74 | - echo "Invalid file"; | ||
75 | - } | ||
76 | - | ||
77 | -die; | ||
78 | - | ||
79 | -// $validate = Loader::validate('Member'); | ||
80 | -// if(!$validate->sceneIsset()->check($data)){ | ||
81 | -// $mes = $validate->getError(); | ||
82 | -// $this->apiResponse('0',$mes); | ||
83 | -// } | ||
84 | $where_member['id'] = Session::get('uid'); | 50 | $where_member['id'] = Session::get('uid'); |
85 | $data['update_time'] = time(); | 51 | $data['update_time'] = time(); |
86 | $res = Db::name('Member')->where($where_member)->update($data); | 52 | $res = Db::name('Member')->where($where_member)->update($data); |
87 | if($res){ | 53 | if($res){ |
88 | - $this->apiResponse('1',"成功"); | 54 | + $this->apiResponse('1',"成功",$final); |
89 | }else{ | 55 | }else{ |
90 | $this->apiResponse('0',"失败"); | 56 | $this->apiResponse('0',"失败"); |
91 | } | 57 | } |
58 | + | ||
59 | + } | ||
60 | +// 图片 | ||
61 | + public function pic($file){ | ||
62 | + if ((($file["file"]["type"] == "image/gif") | ||
63 | + || ($file["file"]["type"] == "image/jpeg") | ||
64 | + || ($file["file"]["type"] == "image/png")) | ||
65 | + && ($file["file"]["size"] < 100000)) | ||
66 | + { | ||
67 | + if ($file["file"]["error"] > 0) | ||
68 | + { | ||
69 | + $this->apiResponse('0',$file["file"]["error"]); | ||
70 | + }else{ | ||
71 | + $data = './upload/'; | ||
72 | + $flodername = 'pic/' . date("Ymd", time()); | ||
73 | + $png = uniqid() . '.png'; | ||
74 | + $filename = $data.$flodername . '/' . $png; | ||
75 | + if (!file_exists($data.$flodername)){ | ||
76 | + mkdir($data.$flodername, 0777, true); | ||
77 | + } | ||
78 | + move_uploaded_file($_FILES["file"]["tmp_name"], | ||
79 | + $filename); | ||
80 | + return $flodername . '/' . $png; | ||
81 | + } | ||
82 | + }else{ | ||
83 | + $this->apiResponse('0','图片格式错误'); | ||
84 | + } | ||
92 | } | 85 | } |
93 | 86 | ||
94 | // 我的订单 | 87 | // 我的订单 |
@@ -112,24 +105,188 @@ die; | @@ -112,24 +105,188 @@ die; | ||
112 | ->field('o.id,o.order_sn,o.status as orderStatus,o.create_time as cre,o.update_time as up , h.id as hire_id,h.* , s.name as select_name ,m.name as member_name ') | 105 | ->field('o.id,o.order_sn,o.status as orderStatus,o.create_time as cre,o.update_time as up , h.id as hire_id,h.* , s.name as select_name ,m.name as member_name ') |
113 | ->order('o.create_time desc') | 106 | ->order('o.create_time desc') |
114 | ->select()->toArray(); | 107 | ->select()->toArray(); |
108 | + if($coo_list){ | ||
109 | + foreach ($coo_list as $k=>$v){ | ||
110 | + $coo_list[$k]['start_time'] = date('Y.m.d',strtotime($v['start_time'])); | ||
111 | + $coo_list[$k]['end_time'] = date('Y.m.d',strtotime($v['end_time'])); | ||
112 | + } | ||
113 | + } | ||
115 | $this->apiResponse('1','成功',$coo_list); | 114 | $this->apiResponse('1','成功',$coo_list); |
116 | } | 115 | } |
117 | 116 | ||
117 | +// 我的订单详情 | ||
118 | + public function detail(){ | ||
119 | + $data = $this->request->param(); | ||
120 | + if(!empty($data['type'])){ | ||
121 | + $where_order['o.status'] = $data['type']; | ||
122 | + }else{ | ||
123 | + $where_order['o.status'] = array('neq',9); | ||
124 | + } | ||
125 | + $where_order['o.id'] = $data['id']; | ||
126 | + $where_order['h.user_id'] = Session::get('uid'); | ||
127 | + $coo_list = Db::name('Order')->alias('o') | ||
128 | + ->where($where_order) | ||
129 | + ->join("Hire h",'h.id = o.hire_id') | ||
130 | + ->join("Select s",'s.id = h.select_id') | ||
131 | + ->join("Member m",'m.id = h.user_id') | ||
132 | + ->field('o.id,o.order_sn,o.status as orderStatus,o.create_time as cre,o.update_time as up , h.id as hire_id,h.* , s.name as select_name ,m.name as member_name ') | ||
133 | + ->order('o.create_time desc') | ||
134 | + ->find(); | ||
135 | + if($coo_list){ | ||
136 | + $coo_list['start_time'] = date('Y.m.d',strtotime($coo_list['start_time'])); | ||
137 | + $coo_list['end_time'] = date('Y.m.d',strtotime($coo_list['end_time'])); | ||
138 | + } | ||
139 | + $this->assign('list',$coo_list); | ||
140 | + return $this->fetch('ordertail'); | ||
141 | + } | ||
118 | 142 | ||
119 | - // 我的简历 | 143 | +// 取消订单/确认完成 |
144 | + public function changeStatus(){ | ||
145 | + $data = $this->request->param(); | ||
146 | + $where_order['id'] = $data['id']; | ||
147 | + if($data['type'] == 1){ | ||
148 | +// 取消 | ||
149 | + $where_order['status'] = 3; | ||
150 | + }else if($data['type'] == 2){ | ||
151 | +// 确认完成 | ||
152 | + $where_order['status'] = 6; | ||
153 | + } | ||
154 | + $order = Db::name('Order')->where($where_order)->find(); | ||
155 | + if($order){ | ||
156 | + if($data['type'] == 1){ | ||
157 | +// 取消 | ||
158 | + $up['status'] = 5; | ||
159 | + }else if($data['type'] == 2){ | ||
160 | +// 确认完成 | ||
161 | + $up['status'] = 7; | ||
162 | + } | ||
163 | + $up['update_time'] = time(); | ||
164 | + $res = Db::name('Order')->where($where_order)->update($up); | ||
165 | + if($data['type'] == 1){ | ||
166 | +// 取消 | ||
167 | + $meg = '取消'; | ||
168 | + }else if($data['type'] == 2){ | ||
169 | +// 确认完成 | ||
170 | + $meg = '确认完成'; | ||
171 | + } | ||
172 | + if($res){ | ||
173 | + $this->apiResponse('1',$meg."成功"); | ||
174 | + }else{ | ||
175 | + $this->apiResponse('0',$meg.'取消失败'); | ||
176 | + } | ||
177 | + }else{ | ||
178 | + $this->apiResponse('0','状态错误'); | ||
179 | + } | ||
180 | + | ||
181 | + } | ||
182 | + | ||
183 | +// 评价 | ||
184 | + public function common(){ | ||
185 | + if($this->request->isPost()){ | ||
186 | + $data = $this->request->param(); | ||
187 | + | ||
188 | + }else{ | ||
189 | + return $this->fetch('evalute'); | ||
190 | + } | ||
191 | + | ||
192 | + } | ||
193 | + | ||
194 | +// 我的钱包 | ||
195 | + public function myBalance(){ | ||
196 | + $where_member['id'] = Session::get('uid'); | ||
197 | + $where_member['status'] = array('neq',9); | ||
198 | + $member = Db::name('Member')->where($where_member)->find(); | ||
199 | + $this->assign('list',$member); | ||
200 | + return $this->fetch('myremain'); | ||
201 | + } | ||
202 | +// 我要提现 | ||
203 | + public function getMoney(){ | ||
204 | + $where_member['id'] = Session::get('uid'); | ||
205 | + $where_member['status'] = array('neq',9); | ||
206 | + $member = Db::name('Member')->where($where_member)->find(); | ||
207 | + $this->assign('list',$member); | ||
208 | + return $this->fetch('mybalance'); | ||
209 | + } | ||
210 | + | ||
211 | +// 我的简历 | ||
120 | public function myResume(){ | 212 | public function myResume(){ |
121 | $where_member['m.id'] = Session::get('uid'); | 213 | $where_member['m.id'] = Session::get('uid'); |
122 | $where_member['m.status'] = array('neq',9); | 214 | $where_member['m.status'] = array('neq',9); |
123 | $member = Db::name('Member')->alias('m') | 215 | $member = Db::name('Member')->alias('m') |
124 | ->join("Resume r",'r.user_id = m.id') | 216 | ->join("Resume r",'r.user_id = m.id') |
217 | + ->join("Select s",'r.select_id = s.id') | ||
125 | ->where($where_member) | 218 | ->where($where_member) |
126 | - ->field('m.wx_name,m.wx_pic,m.name,m.tel,m.card_num,r.*') | 219 | + ->field('m.wx_name,m.wx_pic,m.name,m.tel,m.card_num,r.*,s.name as select_name,s.id as select_id') |
220 | + ->order('create_time desc') | ||
127 | ->find(); | 221 | ->find(); |
222 | + $member['wx_pic'] = cmf_get_image_url($member['wx_pic']); | ||
223 | + $member['just'] = cmf_get_image_url($member['just']); | ||
224 | + $member['back'] = cmf_get_image_url($member['back']); | ||
225 | + $member['skill'] = explode(',',$member['skill']); | ||
128 | $this->assign('list',$member); | 226 | $this->assign('list',$member); |
227 | + $where_select['status'] = array('neq',9); | ||
228 | + $where_select['type'] = 2; | ||
229 | + $select = Db::name('Select')->where($where_select)->order('score desc,create_time desc')->select()->toArray(); | ||
230 | + $final['select'] = $select; | ||
231 | + // 判断是否填写过 | ||
232 | + $where_resume['user_id'] = Session::get('uid'); | ||
233 | + $where_resume['status'] = array('neq',9); | ||
234 | + $is_resume = Db::name('Resume')->where($where_resume)->find(); | ||
235 | + | ||
236 | + $this->assign('final',$final); | ||
129 | return $this->fetch('viae'); | 237 | return $this->fetch('viae'); |
130 | } | 238 | } |
239 | +// 上传图片 | ||
240 | + public function getPic(){ | ||
241 | + $this->apiResponse('1','成功',$this->pic($_FILES)) ; | ||
242 | + } | ||
243 | +// 修改简历 | ||
244 | + public function changeResume(){ | ||
245 | + $data = $this->request->param(); | ||
246 | + $model = new ResumeModel(); | ||
247 | +// 用户 | ||
248 | + $where_member['id'] = Session::get('uid'); | ||
249 | + if($data['wx_pic']){ | ||
250 | + $add_member['wx_pic'] = $data['wx_pic']; | ||
251 | + } | ||
252 | +// $add_member['wx_pic'] = $data['wx_pic']?$data['wx_pic']:; | ||
253 | + $add_member['name'] = $data['name']; | ||
254 | + $add_member['card_num'] = $data['card_num']; | ||
255 | + $add_member['update_time'] = time(); | ||
256 | + $res_member = Db::name('Member')->where($where_member)->update($add_member); | ||
257 | + if(!$res_member){ | ||
258 | + $this->apiResponse('0','修改失败1'); | ||
259 | + } | ||
260 | +// 简历 | ||
261 | + unset($data['wx_pic']); | ||
262 | + unset($data['name']); | ||
263 | + unset($data['card_num']); | ||
264 | + $where_resume['user_id'] = Session::get('uid'); | ||
265 | + $where_resume['status'] = array('neq',9);; | ||
266 | + $id = $model->where($where_resume)->order('create_time desc')->value('id'); | ||
267 | + if($id){ | ||
268 | + $where_resume['user_id'] = Session::get('uid'); | ||
269 | + $where_resume['status'] = array('neq',9); | ||
270 | + if(!$data['just']){ | ||
271 | + unset($data['just']); | ||
272 | + } | ||
273 | + if(!$data['back']){ | ||
274 | + unset($data['back']); | ||
275 | + } | ||
276 | + $data['id'] = $id; | ||
277 | + $data['status'] = 2; | ||
278 | + $res = $model->isUpdate(true)->save($data); | ||
279 | + if($res){ | ||
280 | + $this->apiResponse('1','成功'); | ||
281 | + }else{ | ||
282 | + $this->apiResponse('0','失败'); | ||
283 | + } | ||
284 | + }else{ | ||
285 | + $this->apiResponse('0','简历错误'); | ||
286 | + } | ||
131 | 287 | ||
132 | - // 关于我们 | 288 | + } |
289 | +// 关于我们 | ||
133 | public function aboutUs(){ | 290 | public function aboutUs(){ |
134 | $where_art['type'] = 3; | 291 | $where_art['type'] = 3; |
135 | $where_art['status'] = array('neq',9); | 292 | $where_art['status'] = array('neq',9); |
@@ -24,8 +24,8 @@ class ResumeValidate extends Validate | @@ -24,8 +24,8 @@ class ResumeValidate extends Validate | ||
24 | 'select_id' => 'require', | 24 | 'select_id' => 'require', |
25 | 'skill' => 'require', | 25 | 'skill' => 'require', |
26 | 'experience' => 'require|max:500', | 26 | 'experience' => 'require|max:500', |
27 | -// 'just' => 'require', | ||
28 | -// 'back' => 'require', | 27 | + 'just' => 'require', |
28 | + 'back' => 'require', | ||
29 | 29 | ||
30 | ]; | 30 | ]; |
31 | protected $message = [ | 31 | protected $message = [ |
@@ -41,8 +41,8 @@ class ResumeValidate extends Validate | @@ -41,8 +41,8 @@ class ResumeValidate extends Validate | ||
41 | 'skill.require' => '职业技能不能为空!', | 41 | 'skill.require' => '职业技能不能为空!', |
42 | 'experience.require' => '工作经验不能为空!', | 42 | 'experience.require' => '工作经验不能为空!', |
43 | 'experience.max' => '工作经验过长!', | 43 | 'experience.max' => '工作经验过长!', |
44 | -// 'just.require' => '身份证正面照不能为空!', | ||
45 | -// 'back.require' => '身份证反面照不能为空!', | 44 | + 'just.require' => '身份证正面照不能为空!', |
45 | + 'back.require' => '身份证反面照不能为空!', | ||
46 | ]; | 46 | ]; |
47 | 47 | ||
48 | protected $scene = [ | 48 | protected $scene = [ |
@@ -112,17 +112,23 @@ | @@ -112,17 +112,23 @@ | ||
112 | </div> | 112 | </div> |
113 | </div> | 113 | </div> |
114 | <!--提交成功之后弹层--> | 114 | <!--提交成功之后弹层--> |
115 | -<div class="materialwrapper" style="display:none"> | 115 | +<div class="materialwrapper" <eq name="final.is_resume" value="0"> style="display: none" </eq>> |
116 | <div class="materialpop"> | 116 | <div class="materialpop"> |
117 | <p class="materialimg"> | 117 | <p class="materialimg"> |
118 | <img src="__TMPL__/public/assets/images/bicon06@2x.png" alt=""> | 118 | <img src="__TMPL__/public/assets/images/bicon06@2x.png" alt=""> |
119 | </p> | 119 | </p> |
120 | <div class="material_name"> | 120 | <div class="material_name"> |
121 | - <p class="materialname">您已成功填写求职信息,请在个人中心</p> | ||
122 | - <p class="materialname"> | ||
123 | - <a href="" class="myresume">我的简历</a> | ||
124 | - 进行查看 | ||
125 | - </p> | 121 | + <eq name="final.is_resume" value="2"> |
122 | + <p class="materialname">您已成功填写求职信息,请等待审核</p> | ||
123 | + | ||
124 | + </eq> | ||
125 | + <eq name="final.is_resume" value="3"> | ||
126 | + <p class="materialname">您已成功填写求职信息,请在个人中心</p> | ||
127 | + <p class="materialname"> | ||
128 | + <a href="{:url('member/myresume')}" class="myresume">我的简历</a> | ||
129 | + 进行查看 | ||
130 | + </p> | ||
131 | + </eq> | ||
126 | </div> | 132 | </div> |
127 | </div> | 133 | </div> |
128 | </div> | 134 | </div> |
@@ -277,7 +283,7 @@ | @@ -277,7 +283,7 @@ | ||
277 | </div> | 283 | </div> |
278 | <!--<img src="__TMPL__/public/assets/images/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>--> | 284 | <!--<img src="__TMPL__/public/assets/images/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>--> |
279 | <input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg"> | 285 | <input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg"> |
280 | - | 286 | + <input type="hidden" id="face"/> |
281 | <p class="uploadimgname uploadfront">点击上传正面照</p> | 287 | <p class="uploadimgname uploadfront">点击上传正面照</p> |
282 | </div> | 288 | </div> |
283 | <div class="back"> | 289 | <div class="back"> |
@@ -288,6 +294,7 @@ | @@ -288,6 +294,7 @@ | ||
288 | <img id="imghead1" border="0" src="__TMPL__/public/assets/images/bicon04@2x.png" style="width:100%;height:100%" onclick="$('#previewImg1').click();"> | 294 | <img id="imghead1" border="0" src="__TMPL__/public/assets/images/bicon04@2x.png" style="width:100%;height:100%" onclick="$('#previewImg1').click();"> |
289 | </div> | 295 | </div> |
290 | <!--<img src="__TMPL__/public/assets/images/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>--> | 296 | <!--<img src="__TMPL__/public/assets/images/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>--> |
297 | + <input type="hidden" id="back"/> | ||
291 | <input type="file" onchange="previewImage1(this)" style="display: none;" id="previewImg1"> | 298 | <input type="file" onchange="previewImage1(this)" style="display: none;" id="previewImg1"> |
292 | 299 | ||
293 | <p class="uploadimgname uploadback">点击上传反面照</p> | 300 | <p class="uploadimgname uploadback">点击上传反面照</p> |
@@ -398,15 +405,15 @@ | @@ -398,15 +405,15 @@ | ||
398 | }, | 405 | }, |
399 | onConfirm: function (result) { | 406 | onConfirm: function (result) { |
400 | console.log(list[result[0]].label); | 407 | console.log(list[result[0]].label); |
401 | - $(".sex").html(list[result[0]].label) | ||
402 | - $(".sex").attr('index',sexlist[result[0]].value); | 408 | + $(".sex").html(list[result[0]].label); |
409 | + $(".sex").attr('index',list[result[0]].value); | ||
403 | } | 410 | } |
404 | }); | 411 | }); |
405 | }); | 412 | }); |
406 | 413 | ||
407 | //用户协议 | 414 | //用户协议 |
408 | $(".protoal").click(function(){ | 415 | $(".protoal").click(function(){ |
409 | - $(".workerwapper").css("display","block") | 416 | + $(".workerwapper").css("display","block"); |
410 | $('.select').removeClass("icon-weixuanze"); | 417 | $('.select').removeClass("icon-weixuanze"); |
411 | $('.select').addClass("icon-yixuanze"); | 418 | $('.select').addClass("icon-yixuanze"); |
412 | }) | 419 | }) |
@@ -449,16 +456,18 @@ | @@ -449,16 +456,18 @@ | ||
449 | '</div>' | 456 | '</div>' |
450 | 457 | ||
451 | $(".skill_item").append(text); | 458 | $(".skill_item").append(text); |
452 | - $(".enterskill").val("请添加您的职业技能") | 459 | + // $(".enterskill").val("请添加您的职业技能") |
460 | + $(".enterskill").val(''); | ||
461 | + $(".enterskill").attr('placeholder',"请添加您的职业技能"); | ||
453 | } | 462 | } |
454 | 463 | ||
455 | }) | 464 | }) |
456 | 465 | ||
457 | $(".skill").on("click",".deleteimg",function(){ | 466 | $(".skill").on("click",".deleteimg",function(){ |
458 | - $(this).parents(".skill_itemname").remove(); | 467 | + $(this).parents(".skill_itemname").remove(); |
459 | }) | 468 | }) |
460 | 469 | ||
461 | - //提交时资料不完善 | 470 | + // 提交时资料不完善 |
462 | $(".mesub").click(function(){ | 471 | $(".mesub").click(function(){ |
463 | var wx = $('.wx').val(); | 472 | var wx = $('.wx').val(); |
464 | var age = $('.age').val(); | 473 | var age = $('.age').val(); |
@@ -470,6 +479,8 @@ | @@ -470,6 +479,8 @@ | ||
470 | var skill = $('.skill1').val(); | 479 | var skill = $('.skill1').val(); |
471 | var experience = $('.experience').val(); | 480 | var experience = $('.experience').val(); |
472 | var isTrue = $(".select").hasClass("icon-yixuanze"); | 481 | var isTrue = $(".select").hasClass("icon-yixuanze"); |
482 | + var face = $('#face').val(); | ||
483 | + var back = $('#back').val(); | ||
473 | if(isTrue == true){ | 484 | if(isTrue == true){ |
474 | $.ajax({ | 485 | $.ajax({ |
475 | type: 'POST', | 486 | type: 'POST', |
@@ -484,6 +495,8 @@ | @@ -484,6 +495,8 @@ | ||
484 | 'select_id' : select_id, | 495 | 'select_id' : select_id, |
485 | 'skill' : skill, | 496 | 'skill' : skill, |
486 | 'experience' : experience, | 497 | 'experience' : experience, |
498 | + 'just' : face, | ||
499 | + 'back' : back, | ||
487 | }, | 500 | }, |
488 | success: function (res) { | 501 | success: function (res) { |
489 | if(res.code == 1){ | 502 | if(res.code == 1){ |
@@ -492,9 +505,11 @@ | @@ -492,9 +505,11 @@ | ||
492 | }else{ | 505 | }else{ |
493 | popup(res.message); | 506 | popup(res.message); |
494 | } | 507 | } |
508 | + console.log('1111111'); | ||
495 | console.log(res); | 509 | console.log(res); |
496 | }, | 510 | }, |
497 | error: function (res) { | 511 | error: function (res) { |
512 | + console.log('33333333'); | ||
498 | console.log(res); | 513 | console.log(res); |
499 | } | 514 | } |
500 | }); | 515 | }); |
@@ -503,7 +518,7 @@ | @@ -503,7 +518,7 @@ | ||
503 | popup('请先勾选劳动者协议'); | 518 | popup('请先勾选劳动者协议'); |
504 | } | 519 | } |
505 | }); | 520 | }); |
506 | - //上传图片 | 521 | + // 上传图片 |
507 | function clacImgZoomParam(maxWidth, maxHeight, width, height) { | 522 | function clacImgZoomParam(maxWidth, maxHeight, width, height) { |
508 | var param = { | 523 | var param = { |
509 | top: 0, | 524 | top: 0, |
@@ -561,6 +576,37 @@ | @@ -561,6 +576,37 @@ | ||
561 | div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; | 576 | div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; |
562 | } | 577 | } |
563 | 578 | ||
579 | + var thisFile = document.getElementById("previewImg").files[0]; | ||
580 | + var formData = new FormData(); | ||
581 | + formData.append('file',thisFile); | ||
582 | + $.ajax({ | ||
583 | + url: "{:url('Index/getPic')}", | ||
584 | + type: "POST", | ||
585 | + data: formData, | ||
586 | + /** | ||
587 | + *必须false才会自动加上正确的Content-Type | ||
588 | + */ | ||
589 | + contentType: false, | ||
590 | + /** | ||
591 | + * 必须false才会避开jQuery对 formdata 的默认处理 | ||
592 | + * XMLHttpRequest会对 formdata 进行正确的处理 | ||
593 | + */ | ||
594 | + processData: false, | ||
595 | + success: function (data) { | ||
596 | + if(data.code == 1){ | ||
597 | + $('#face').val(data.data); | ||
598 | + // popup('上传成功'); | ||
599 | + }else{ | ||
600 | + popup(data.message) | ||
601 | + } | ||
602 | + console.log(data); | ||
603 | + }, | ||
604 | + error: function () { | ||
605 | + popup("上传失败!"); | ||
606 | + } | ||
607 | + }); | ||
608 | + | ||
609 | + | ||
564 | } | 610 | } |
565 | 611 | ||
566 | // 反面照 | 612 | // 反面照 |
@@ -597,6 +643,35 @@ | @@ -597,6 +643,35 @@ | ||
597 | div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; | 643 | div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; |
598 | } | 644 | } |
599 | 645 | ||
646 | + var thisFile1 = document.getElementById("previewImg1").files[0]; | ||
647 | + var formData1 = new FormData(); | ||
648 | + formData1.append('file',thisFile1); | ||
649 | + $.ajax({ | ||
650 | + url: "{:url('Index/getPic')}", | ||
651 | + type: "POST", | ||
652 | + data: formData1, | ||
653 | + /** | ||
654 | + *必须false才会自动加上正确的Content-Type | ||
655 | + */ | ||
656 | + contentType: false, | ||
657 | + /** | ||
658 | + * 必须false才会避开jQuery对 formdata 的默认处理 | ||
659 | + * XMLHttpRequest会对 formdata 进行正确的处理 | ||
660 | + */ | ||
661 | + processData: false, | ||
662 | + success: function (data) { | ||
663 | + if(data.code == 1){ | ||
664 | + $('#back').val(data.data); | ||
665 | + // popup('上传成功'); | ||
666 | + }else{ | ||
667 | + popup(data.message) | ||
668 | + } | ||
669 | + console.log(data); | ||
670 | + }, | ||
671 | + error: function () { | ||
672 | + popup("上传失败!"); | ||
673 | + } | ||
674 | + }); | ||
600 | } | 675 | } |
601 | 676 | ||
602 | 677 |
@@ -26,22 +26,18 @@ | @@ -26,22 +26,18 @@ | ||
26 | </div> | 26 | </div> |
27 | <div class="materialcontainer"> | 27 | <div class="materialcontainer"> |
28 | 28 | ||
29 | -<form id="form1" enctype="multipart/form-data"> | 29 | + |
30 | <div class="materialistimg"> | 30 | <div class="materialistimg"> |
31 | - <!--<p class="headimg">--> | ||
32 | - <!--<img src="__TMPL__/public/assets/images/person_head.png" alt="">--> | ||
33 | - <!--</p>--> | ||
34 | <div id="preview" class="headimg"> | 31 | <div id="preview" class="headimg"> |
35 | - <img id="imghead" border="0" src="__TMPL__/public/assets/images/person_head.png " style="width:100%;height:100%" onclick="$('#previewImg').click();"> | 32 | + <img id="imghead" border="0" src="{$list.wx_pic}" style="width:100%;height:100%" onclick="$('#previewImg').click();"> |
36 | </div> | 33 | </div> |
37 | - <!--<img src="__TMPL__/public/assets/images/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>--> | ||
38 | - <input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg" > | ||
39 | - <div class="editheadimg"> | 34 | + <input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg" /> |
35 | + <div class="editheadimg" onclick="$('#previewImg').click();"> | ||
40 | <p class="editname">编辑头像</p> | 36 | <p class="editname">编辑头像</p> |
41 | <p class="iconfont icon-right"></p> | 37 | <p class="iconfont icon-right"></p> |
42 | </div> | 38 | </div> |
43 | </div> | 39 | </div> |
44 | -</form> | 40 | + |
45 | <div class="namelist" data_id="0"> | 41 | <div class="namelist" data_id="0"> |
46 | <p class="editname">姓名</p> | 42 | <p class="editname">姓名</p> |
47 | <div class="nameinfo"> | 43 | <div class="nameinfo"> |
@@ -169,84 +165,73 @@ | @@ -169,84 +165,73 @@ | ||
169 | param.top = Math.round((maxHeight - param.height) / 2); | 165 | param.top = Math.round((maxHeight - param.height) / 2); |
170 | return param; | 166 | return param; |
171 | } | 167 | } |
172 | - function previewImage(file) { | ||
173 | - $(".uploadfront").css("display","none") | ||
174 | - var MAXWIDTH = 50; | ||
175 | - var MAXHEIGHT = 50; | ||
176 | - var div = document.getElementById('preview'); | ||
177 | - if(file.files && file.files[0]) { | ||
178 | - div.innerHTML = '<img id=imghead onclick=$("#previewImg").click()>'; | ||
179 | - var img = document.getElementById('imghead'); | ||
180 | - img.onload = function() { | ||
181 | - var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight); | ||
182 | - img.width = rect.width; | ||
183 | - img.height = rect.height; | ||
184 | - // img.style.marginLeft = rect.left+'px'; | ||
185 | - img.style.marginTop = rect.top + 'px'; | ||
186 | - } | ||
187 | - var reader = new FileReader(); | ||
188 | - reader.onload = function(evt) { | ||
189 | - img.src = evt.target.result; | ||
190 | - } | ||
191 | - reader.readAsDataURL(file.files[0]); | ||
192 | - // console.log('21222222222'); | ||
193 | - // console.log($("#form1")[0]); | ||
194 | - $.ajax({ | ||
195 | - url: "/UpImg/upload", | ||
196 | - type: "post", | ||
197 | - dataType: "json", | ||
198 | - cache: false, | ||
199 | - data: new FormData($("#form1")[0]), | ||
200 | - processData: false,// 不处理数据 | ||
201 | - contentType: false, // 不设置内容类型 | ||
202 | - success: function (res) { | ||
203 | - console.log(res); | ||
204 | - }, | ||
205 | - error: function (res) { | ||
206 | - console.log(res); | ||
207 | - } | ||
208 | - }); | ||
209 | - | ||
210 | - } else //兼容IE | ||
211 | - { | ||
212 | - | ||
213 | - var sFilter = 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="'; | ||
214 | - file.select(); | ||
215 | - var src = document.selection.createRange().text; | ||
216 | - div.innerHTML = '<img id=imghead>'; | ||
217 | - var img = document.getElementById('imghead'); | ||
218 | - img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src; | ||
219 | - var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight); | ||
220 | - status = ('rect:' + rect.top + ',' + rect.left + ',' + rect.width + ',' + rect.height); | ||
221 | - div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; | ||
222 | - } | ||
223 | - | ||
224 | - var a = $('#imghead').attr('src'); | ||
225 | - console.log('55555555555555555'); | ||
226 | - console.log(src); | ||
227 | - | ||
228 | - | ||
229 | - } | ||
230 | - | 168 | + function previewImage(file) { |
169 | + $(".uploadfront").css("display","none") | ||
170 | + var MAXWIDTH = 50; | ||
171 | + var MAXHEIGHT = 50; | ||
172 | + var div = document.getElementById('preview'); | ||
173 | + if(file.files && file.files[0]) { | ||
174 | + div.innerHTML = '<img id=imghead onclick=$("#previewImg").click()>'; | ||
175 | + var img = document.getElementById('imghead'); | ||
176 | + img.onload = function() { | ||
177 | + var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight); | ||
178 | + img.width = rect.width; | ||
179 | + img.height = rect.height; | ||
180 | + // img.style.marginLeft = rect.left+'px'; | ||
181 | + img.style.marginTop = rect.top + 'px'; | ||
182 | + } | ||
183 | + var reader = new FileReader(); | ||
184 | + reader.onload = function(evt) { | ||
185 | + img.src = evt.target.result; | ||
186 | + } | ||
187 | + reader.readAsDataURL(file.files[0]); | ||
188 | + } else //兼容IE | ||
189 | + { | ||
190 | + var sFilter = 'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src="'; | ||
191 | + file.select(); | ||
192 | + var src = document.selection.createRange().text; | ||
193 | + div.innerHTML = '<img id=imghead>'; | ||
194 | + var img = document.getElementById('imghead'); | ||
195 | + img.filters.item('DXImageTransform.Microsoft.AlphaImageLoader').src = src; | ||
196 | + var rect = clacImgZoomParam(MAXWIDTH, MAXHEIGHT, img.offsetWidth, img.offsetHeight); | ||
197 | + status = ('rect:' + rect.top + ',' + rect.left + ',' + rect.width + ',' + rect.height); | ||
198 | + div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; | ||
199 | + } | ||
231 | 200 | ||
201 | + } | ||
232 | 202 | ||
233 | 203 | ||
234 | 204 | ||
235 | $('.save').click(function () { | 205 | $('.save').click(function () { |
236 | - $('#form1').submit(); | ||
237 | - // $.ajax({ | ||
238 | - // type: 'POST', | ||
239 | - // url: "{:url('Member/change')}", | ||
240 | - // data: { | ||
241 | - // 'pic': $('#previewImg').val() | ||
242 | - // }, | ||
243 | - // success: function (res) { | ||
244 | - // console.log(res); | ||
245 | - // }, | ||
246 | - // error: function (res) { | ||
247 | - // console.log(res); | ||
248 | - // } | ||
249 | - // }); | 206 | + var file = document.getElementById("previewImg").files[0]; |
207 | + var formData = new FormData(); | ||
208 | + formData.append('file',file); | ||
209 | + $.ajax({ | ||
210 | + url: "{:url('Member/change')}", | ||
211 | + type: "POST", | ||
212 | + data: formData, | ||
213 | + /** | ||
214 | + *必须false才会自动加上正确的Content-Type | ||
215 | + */ | ||
216 | + contentType: false, | ||
217 | + /** | ||
218 | + * 必须false才会避开jQuery对 formdata 的默认处理 | ||
219 | + * XMLHttpRequest会对 formdata 进行正确的处理 | ||
220 | + */ | ||
221 | + processData: false, | ||
222 | + success: function (data) { | ||
223 | + if(data.code == 1){ | ||
224 | + $('#imghead').attr('src',data.data[0]); | ||
225 | + popup('上传成功'); | ||
226 | + }else{ | ||
227 | + popup(data.message) | ||
228 | + } | ||
229 | + console.log(data); | ||
230 | + }, | ||
231 | + error: function () { | ||
232 | + alert("上传失败!"); | ||
233 | + } | ||
234 | + }); | ||
250 | }) | 235 | }) |
251 | 236 | ||
252 | </script> | 237 | </script> |
@@ -98,14 +98,46 @@ | @@ -98,14 +98,46 @@ | ||
98 | 98 | ||
99 | <script> | 99 | <script> |
100 | $(".evalstar").click(function(){ | 100 | $(".evalstar").click(function(){ |
101 | - var src=$(this).children("img").attr("src"); | ||
102 | - if(src=="__TMPL__/public/assets/images/starxing.png"){ | ||
103 | - $(this).children("img").attr("src","__TMPL__/public/assets/images/starxingshi.png"); | ||
104 | - }else if(src=="__TMPL__/public/assets/images/starxingshi.png"){ | ||
105 | - $(this).children("img").attr("src","__TMPL__/public/assets/images/starxing.png") | 101 | + var src=$(this).children("img").attr("src"); |
102 | + // console.log($(this).index) | ||
103 | + // console.log($(this).index()) | ||
104 | + $('.evaluterank').attr('isTrue',$(this).index()); | ||
105 | + if($(this).index()==0){ | ||
106 | + if(src=="__TMPL__/public/assets/images/starxing.png"){ | ||
107 | + $(this).children("img").attr("src","__TMPL__/public/assets/images/starxingshi.png"); | ||
108 | + }else if(src=="__TMPL__/public/assets/images/starxingshi.png"){ | ||
109 | + $(this).nextAll().children("img").attr("src","__TMPL__/public/assets/images/starxing.png") | ||
110 | + } | ||
111 | + | ||
112 | + }else{ | ||
113 | + if(src=="__TMPL__/public/assets/images/starxing.png"){ | ||
114 | + $(this).children("img").attr("src","__TMPL__/public/assets/images/starxingshi.png"); | ||
115 | + $(this).prevAll().children("img").attr("src","__TMPL__/public/assets/images/starxingshi.png") | ||
116 | + }else if(src=="__TMPL__/public/assets/images/starxingshi.png"){ | ||
117 | + $(this).children("img").attr("src","__TMPL__/public/assets/images/starxing.png"); | ||
118 | + $(this).nextAll().children("img").attr("src","__TMPL__/public/assets/images/starxing.png") | ||
119 | + } | ||
106 | } | 120 | } |
107 | 121 | ||
108 | - }) | 122 | + }); |
123 | + | ||
124 | + // 提交 | ||
125 | + $('.sub').click(function () { | ||
126 | + var start = $('.evaluterank').attr('isTrue'); | ||
127 | + $.ajax({ | ||
128 | + type: 'POST', | ||
129 | + url: "{:url('Member/common')}", | ||
130 | + data: { | ||
131 | + 'start':start, | ||
132 | + }, | ||
133 | + success: function (res) { | ||
134 | + console.log(res); | ||
135 | + }, | ||
136 | + error: function (res) { | ||
137 | + console.log(res); | ||
138 | + } | ||
139 | + }); | ||
140 | + }); | ||
109 | </script> | 141 | </script> |
110 | </body> | 142 | </body> |
111 | </html> | 143 | </html> |
@@ -22,10 +22,10 @@ | @@ -22,10 +22,10 @@ | ||
22 | <div class="header"> | 22 | <div class="header"> |
23 | <div class="person_info"> | 23 | <div class="person_info"> |
24 | <p class="person_img"> | 24 | <p class="person_img"> |
25 | - <img src="__TMPL__/public/assets/images/person_head.png" alt=""> | 25 | + <img src="{$list.wx_pic}" alt=""> |
26 | </p> | 26 | </p> |
27 | <p class="person_name"> | 27 | <p class="person_name"> |
28 | - 兔子先生 | 28 | + {$list.wx_name} |
29 | </p> | 29 | </p> |
30 | </div> | 30 | </div> |
31 | <p class="change"> | 31 | <p class="change"> |
@@ -100,7 +100,7 @@ | @@ -100,7 +100,7 @@ | ||
100 | }); | 100 | }); |
101 | //我的钱包 | 101 | //我的钱包 |
102 | $(".interg").click(function () { | 102 | $(".interg").click(function () { |
103 | - window.location.href = 'myremain.html' | 103 | + window.location.href = "{:url('Member/myBalance')}" |
104 | }) | 104 | }) |
105 | //关于我们 | 105 | //关于我们 |
106 | $(".us").click(function () { | 106 | $(".us").click(function () { |
@@ -17,9 +17,18 @@ | @@ -17,9 +17,18 @@ | ||
17 | </div> | 17 | </div> |
18 | <div class="cash"> | 18 | <div class="cash"> |
19 | <p class="moneysign">¥</p> | 19 | <p class="moneysign">¥</p> |
20 | - <input type="text" placeholder="0.00" class="remainmoney"> | 20 | + <input type="text" placeholder="0.00" class="remainmoney" onkeyup="num(this)"> |
21 | </div> | 21 | </div> |
22 | <p class="amountmoney">提现到微信零钱</p> | 22 | <p class="amountmoney">提现到微信零钱</p> |
23 | </div> | 23 | </div> |
24 | </body> | 24 | </body> |
25 | +<script> | ||
26 | + function num(obj){ | ||
27 | + obj.value = obj.value.replace(/[^\d.]/g,""); //清除"数字"和"."以外的字符 | ||
28 | + obj.value = obj.value.replace(/^\./g,""); //验证第一个字符是数字 | ||
29 | + obj.value = obj.value.replace(/\.{2,}/g,"."); //只保留第一个, 清除多余的 | ||
30 | + obj.value = obj.value.replace(".","$#$").replace(/\./g,"").replace("$#$","."); | ||
31 | + obj.value = obj.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3'); //只能输入两个小数 | ||
32 | + } | ||
33 | +</script> | ||
25 | </html> | 34 | </html> |
@@ -31,6 +31,9 @@ | @@ -31,6 +31,9 @@ | ||
31 | 31 | ||
32 | </div> | 32 | </div> |
33 | </div> | 33 | </div> |
34 | + | ||
35 | +<!--begin:提示弹层--> | ||
36 | +<div class="pop_fn"></div> | ||
34 | <script> | 37 | <script> |
35 | def(); | 38 | def(); |
36 | function def() { | 39 | function def() { |
@@ -44,7 +47,7 @@ function def() { | @@ -44,7 +47,7 @@ function def() { | ||
44 | success: function (res) { | 47 | success: function (res) { |
45 | var html = ''; | 48 | var html = ''; |
46 | $.each(res.data,function (index,val) { | 49 | $.each(res.data,function (index,val) { |
47 | - html += " <div class=\"allist_item\" onclick='jump("+val.id+")'>\n" + | 50 | + html += " <div class=\"allist_item\">\n" + |
48 | " <div class=\"item_head\">\n" + | 51 | " <div class=\"item_head\">\n" + |
49 | " <div class=\"order\">\n" + | 52 | " <div class=\"order\">\n" + |
50 | " <p class=\"ordername\">订单号:</p>\n" + | 53 | " <p class=\"ordername\">订单号:</p>\n" + |
@@ -67,7 +70,7 @@ function def() { | @@ -67,7 +70,7 @@ function def() { | ||
67 | } | 70 | } |
68 | html += | 71 | html += |
69 | " </div>\n" + | 72 | " </div>\n" + |
70 | - " <div class=\"item_body\">\n" + | 73 | + " <div class=\"item_body\" onclick='jump("+val.id+")'>\n" + |
71 | " <p class=\"itembody_name\">"+val.title+"</p>\n" + | 74 | " <p class=\"itembody_name\">"+val.title+"</p>\n" + |
72 | " <p class=\"itembody_price\">¥"+val.money+"/天</p>\n" + | 75 | " <p class=\"itembody_price\">¥"+val.money+"/天</p>\n" + |
73 | " <p class=\"itembody_date\">工作时间:"+val.start_time+"-"+val.start_time+"</p>\n" + | 76 | " <p class=\"itembody_date\">工作时间:"+val.start_time+"-"+val.start_time+"</p>\n" + |
@@ -75,12 +78,12 @@ function def() { | @@ -75,12 +78,12 @@ function def() { | ||
75 | " <div class=\"footbtn\">\n"; | 78 | " <div class=\"footbtn\">\n"; |
76 | // 2待审核,3审核通过,待付款,4审核未通过,5已取消,6待完成,7待评价,8已评价 | 79 | // 2待审核,3审核通过,待付款,4审核未通过,5已取消,6待完成,7待评价,8已评价 |
77 | if(val.orderStatus == 3){ | 80 | if(val.orderStatus == 3){ |
78 | - html += "<p class=\"cancelorder\">取消订单</p>\n" + | 81 | + html += "<p class=\"cancelorder\" onclick='change("+val.id+",1)'>取消订单</p>\n" + |
79 | " <p class=\"sureorder\">付款</p>" ; | 82 | " <p class=\"sureorder\">付款</p>" ; |
80 | }else if(val.orderStatus == 6){ | 83 | }else if(val.orderStatus == 6){ |
81 | - html += "<p class=\"sureorder\">确认完成</p>" ; | 84 | + html += "<p class=\"sureorder\" onclick='change("+val.id+",2)'>确认完成</p>" ; |
82 | }else if(val.orderStatus == 7){ | 85 | }else if(val.orderStatus == 7){ |
83 | - html += "<p class=\"sureorder\">评价</p>\n" ; | 86 | + html += "<p class=\"sureorder\" onclick='common("+val.id+")'>评价</p>\n" ; |
84 | } | 87 | } |
85 | html += | 88 | html += |
86 | " </div>\n" + | 89 | " </div>\n" + |
@@ -95,48 +98,86 @@ function def() { | @@ -95,48 +98,86 @@ function def() { | ||
95 | }); | 98 | }); |
96 | } | 99 | } |
97 | 100 | ||
98 | - | 101 | +// tab |
99 | $("ul li").click(function(){ | 102 | $("ul li").click(function(){ |
100 | - // var orderid=$(this).attr("id"); | ||
101 | $(this).addClass("active"); | 103 | $(this).addClass("active"); |
102 | $(this).siblings("li").removeClass("active"); | 104 | $(this).siblings("li").removeClass("active"); |
103 | def(); | 105 | def(); |
104 | -}) | ||
105 | - | ||
106 | -//评价页面 | ||
107 | - $(".sureorder").click(function(){ | ||
108 | - window.location.href='evalute.html' | ||
109 | - }) | ||
110 | -$(".allist").click(function(){ | ||
111 | - window.location.href='ordertail.html' | ||
112 | -}) | ||
113 | -//取消订单 | ||
114 | -window.alert = function(name){ | ||
115 | - var iframe = document.createElement("IFRAME"); | ||
116 | - iframe.style.display="none"; | ||
117 | - document.documentElement.appendChild(iframe); | ||
118 | - window.frames[0].window.alert(name); | ||
119 | - iframe.parentNode.removeChild(iframe); | 106 | +}); |
107 | +// 详情 | ||
108 | +function jump(id) { | ||
109 | + var url = "{:url('Member/detail')}"; | ||
110 | + url = url.split('.'); | ||
111 | + url = url[0] + '/id/' + id + ".html"; | ||
112 | + window.location.href = url; | ||
120 | } | 113 | } |
121 | -window.confirm = function (message) { | ||
122 | - var iframe = document.createElement("IFRAME"); | ||
123 | - iframe.style.display = "none"; | ||
124 | - iframe.setAttribute("src", 'data:text/plain,'); | ||
125 | - document.documentElement.appendChild(iframe); | ||
126 | - var alertFrame = window.frames[0]; | ||
127 | - var result = alertFrame.window.confirm(message); | ||
128 | - iframe.parentNode.removeChild(iframe); | ||
129 | - return result; | 114 | +// 取消/确认 |
115 | +function change(id,type) { | ||
116 | + if(type == 1){ | ||
117 | + window.event.stopPropagation(); | ||
118 | + var a=confirm("是否取消订单"); | ||
119 | + if(a==true){ | ||
120 | + order(id,type) | ||
121 | + } | ||
122 | + }else{ | ||
123 | + order(id,type) | ||
124 | + } | ||
125 | +} | ||
126 | +function order(id,type) { | ||
127 | + $.ajax({ | ||
128 | + type: 'POST', | ||
129 | + url: "{:url('Member/changeStatus')}", | ||
130 | + data: { | ||
131 | + 'id':id, | ||
132 | + 'type':type, | ||
133 | + }, | ||
134 | + success: function (res) { | ||
135 | + console.log(res); | ||
136 | + popup(res.message); | ||
137 | + if(res.code == 1){ | ||
138 | + setTimeout("def()",2500); | ||
139 | + } | ||
140 | + }, | ||
141 | + error: function (res) { | ||
142 | + console.log(res); | ||
143 | + } | ||
144 | + }); | ||
145 | +} | ||
146 | +//评价页面 | ||
147 | +function common(id) { | ||
148 | + var url = "{:url('Member/common')}"; | ||
149 | + url = url.split('.'); | ||
150 | + url = url[0] + '/id/' + id + ".html"; | ||
151 | + window.location.href = url; | ||
130 | } | 152 | } |
131 | 153 | ||
132 | - | ||
133 | -$(".cancelorder").click(function(){ | ||
134 | - window.event.stopPropagation(); | ||
135 | - var a=confirm("是否取消订单"); | ||
136 | - if(a==true){ | ||
137 | - alert("取消订单") | ||
138 | - } | ||
139 | -}) | 154 | +//取消订单 |
155 | +// window.alert = function(name){ | ||
156 | +// var iframe = document.createElement("IFRAME"); | ||
157 | +// iframe.style.display="none"; | ||
158 | +// document.documentElement.appendChild(iframe); | ||
159 | +// window.frames[0].window.alert(name); | ||
160 | +// iframe.parentNode.removeChild(iframe); | ||
161 | +// } | ||
162 | +// window.confirm = function (message) { | ||
163 | +// var iframe = document.createElement("IFRAME"); | ||
164 | +// iframe.style.display = "none"; | ||
165 | +// iframe.setAttribute("src", 'data:text/plain,'); | ||
166 | +// document.documentElement.appendChild(iframe); | ||
167 | +// var alertFrame = window.frames[0]; | ||
168 | +// var result = alertFrame.window.confirm(message); | ||
169 | +// iframe.parentNode.removeChild(iframe); | ||
170 | +// return result; | ||
171 | +// } | ||
172 | +// | ||
173 | +// | ||
174 | +// $(".cancelorder").click(function(){ | ||
175 | +// window.event.stopPropagation(); | ||
176 | +// var a=confirm("是否取消订单"); | ||
177 | +// if(a==true){ | ||
178 | +// alert("取消订单") | ||
179 | +// } | ||
180 | +// }) | ||
140 | </script> | 181 | </script> |
141 | </body> | 182 | </body> |
142 | </html> | 183 | </html> |
@@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
6 | <link rel="stylesheet" href="https://at.alicdn.com/t/font_890739_l00sw01grqj.css"> | 6 | <link rel="stylesheet" href="https://at.alicdn.com/t/font_890739_l00sw01grqj.css"> |
7 | <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css"> | 7 | <link rel="stylesheet" href="__TMPL__/public/assets/css/base.css"> |
8 | <link rel="stylesheet" href="__TMPL__/public/assets/css/personcenter.css"> | 8 | <link rel="stylesheet" href="__TMPL__/public/assets/css/personcenter.css"> |
9 | - <script type="text/javascript" src="../js/jquery.min.js"></script> | ||
10 | - <script type="text/javascript" src="../js/base.js"></script> | 9 | + <script type="text/javascript" src="__TMPL__/public/assets/js/jquery.min.js"></script> |
10 | + <script type="text/javascript" src="__TMPL__/public/assets/js/base.js"></script> | ||
11 | <title>我的余额</title> | 11 | <title>我的余额</title> |
12 | 12 | ||
13 | </head> | 13 | </head> |
@@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
16 | <div class="headmoney"> | 16 | <div class="headmoney"> |
17 | <img src="__TMPL__/public/assets/images/cbg@2x.png" alt=""> | 17 | <img src="__TMPL__/public/assets/images/cbg@2x.png" alt=""> |
18 | </div> | 18 | </div> |
19 | - <p class="meremainmoney">0.00</p> | 19 | + <p class="meremainmoney">{$list.money}</p> |
20 | <div class="memoney"> | 20 | <div class="memoney"> |
21 | <div class="popmoney"> | 21 | <div class="popmoney"> |
22 | <p class="remainmoney-sign"> | 22 | <p class="remainmoney-sign"> |
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | </div> | 30 | </div> |
31 | <script> | 31 | <script> |
32 | $(".memoney").click(function(){ | 32 | $(".memoney").click(function(){ |
33 | - window.location.href='mybalance.html' | 33 | + window.location.href="{:url('Member/getMoney')}" |
34 | }) | 34 | }) |
35 | </script> | 35 | </script> |
36 | </body> | 36 | </body> |
@@ -18,13 +18,19 @@ | @@ -18,13 +18,19 @@ | ||
18 | <body> | 18 | <body> |
19 | <div class="container"> | 19 | <div class="container"> |
20 | <div class="head"> | 20 | <div class="head"> |
21 | - <p class="ordernum">订单号:201807122659</p> | ||
22 | - <p class="orderstate">待审核</p> | 21 | + <p class="ordernum">订单号:{$list.order_sn}</p> |
22 | + <eq name="list.orderStatus" value="2"><p class="orderstate">待审核</p></eq> | ||
23 | + <eq name="list.orderStatus" value="3"><p class="orderstate">待付款</p></eq> | ||
24 | + <eq name="list.orderStatus" value="4"><p class="orderstate">审核未通过</p></eq> | ||
25 | + <eq name="list.orderStatus" value="5"><p class="orderstate">已取消</p></eq> | ||
26 | + <eq name="list.orderStatus" value="6"><p class="orderstate">待完成</p></eq> | ||
27 | + <eq name="list.orderStatus" value="7"><p class="orderstate">待评价</p></eq> | ||
28 | + <eq name="list.orderStatus" value="8"><p class="orderstate">已评价</p></eq> | ||
23 | </div> | 29 | </div> |
24 | <div class="ordercontent"> | 30 | <div class="ordercontent"> |
25 | - <p class="content_name">兼职美术老师</p> | ||
26 | - <p class="content_price">¥999/天</p> | ||
27 | - <p class="content_date">2018.09.20-2018.10.20</p> | 31 | + <p class="content_name">{$list.title}</p> |
32 | + <p class="content_price">¥{$list.money}/天</p> | ||
33 | + <p class="content_date">{$list.start_time}-{$list.end_time}</p> | ||
28 | </div> | 34 | </div> |
29 | <div class="companyinfo"> | 35 | <div class="companyinfo"> |
30 | <p class="signcompany"> | 36 | <p class="signcompany"> |
@@ -17,6 +17,23 @@ | @@ -17,6 +17,23 @@ | ||
17 | .weui-picker__item{ | 17 | .weui-picker__item{ |
18 | font-size: 0.3rem; | 18 | font-size: 0.3rem; |
19 | } | 19 | } |
20 | + .join{ | ||
21 | + display:flex; | ||
22 | + height: 1rem; | ||
23 | + padding: 0 0.29rem; | ||
24 | + align-items: center; | ||
25 | + background: #F5F6FA; | ||
26 | + margin-top: 0.36rem; | ||
27 | + } | ||
28 | + #select{ | ||
29 | + width:4rem; | ||
30 | + height:0.5rem; | ||
31 | + font-size: 0.3rem; | ||
32 | + background: transparent; | ||
33 | + margin-bottom: 1.1rem; | ||
34 | + border:none; | ||
35 | + outline: nones; | ||
36 | + } | ||
20 | </style> | 37 | </style> |
21 | </head> | 38 | </head> |
22 | <body> | 39 | <body> |
@@ -33,22 +50,19 @@ | @@ -33,22 +50,19 @@ | ||
33 | </div> | 50 | </div> |
34 | </div> | 51 | </div> |
35 | <!--提交成功之后弹层--> | 52 | <!--提交成功之后弹层--> |
36 | -<div class="materialwrapper" style="display:none"> | ||
37 | - <div class="materialpop"> | ||
38 | - <p class="materialimg"> | ||
39 | - <img src="__TMPL__/public/assets/images/bicon06@2x.png" alt=""> | ||
40 | - </p> | ||
41 | - <div class="material_name"> | ||
42 | - <p class="materialname">您已成功填写求职信息,请在个人中心</p> | ||
43 | - <p class="materialname"> | ||
44 | - <a href="" class="myresume">我的简历</a> | ||
45 | - 进行查看 | ||
46 | - </p> | ||
47 | - </div> | 53 | +<div class="materialwrapper" style="display: none" > |
54 | +<div class="materialpop"> | ||
55 | + <p class="materialimg"> | ||
56 | + <img src="__TMPL__/public/assets/images/bicon06@2x.png" alt=""> | ||
57 | + </p> | ||
58 | + <div class="material_name"> | ||
59 | + <p class="materialname">您已成功填写求职信息,请等待审核</p> | ||
48 | </div> | 60 | </div> |
49 | </div> | 61 | </div> |
62 | +</div> | ||
50 | <div class="container"> | 63 | <div class="container"> |
51 | <div class="headinfo"> | 64 | <div class="headinfo"> |
65 | + <input type="hidden" class="id"/> | ||
52 | <div class="hire"> | 66 | <div class="hire"> |
53 | <p class="hire_img"> | 67 | <p class="hire_img"> |
54 | <img src="__TMPL__/public/assets/images/aicon06@2x.png" alt=""> | 68 | <img src="__TMPL__/public/assets/images/aicon06@2x.png" alt=""> |
@@ -63,11 +77,12 @@ | @@ -63,11 +77,12 @@ | ||
63 | <!--</p>--> | 77 | <!--</p>--> |
64 | 78 | ||
65 | <div id="preview3" class="editpeopleimg"> | 79 | <div id="preview3" class="editpeopleimg"> |
66 | - <img id="imghead3" border="0" src="__TMPL__/public/assets/images/dicon02@2x.png" style="width:100%;height:100%" | 80 | + <img id="imghead3" border="0" src="{$list.wx_pic}" style="width:100%;height:100%" |
67 | onclick="$('#previewImg3').click();"> | 81 | onclick="$('#previewImg3').click();"> |
68 | </div> | 82 | </div> |
69 | <!--<img src="__TMPL__/public/assets/images/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>--> | 83 | <!--<img src="__TMPL__/public/assets/images/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>--> |
70 | <input type="file" onchange="previewImage3(this)" style="display: none;" id="previewImg3"> | 84 | <input type="file" onchange="previewImage3(this)" style="display: none;" id="previewImg3"> |
85 | + <input type="hidden" id="first"/> | ||
71 | <p class="editpeople">编辑头像</p> | 86 | <p class="editpeople">编辑头像</p> |
72 | </div> | 87 | </div> |
73 | <p class="row"> | 88 | <p class="row"> |
@@ -78,14 +93,14 @@ | @@ -78,14 +93,14 @@ | ||
78 | <div class="list"> | 93 | <div class="list"> |
79 | <div class="list_name">姓名</div> | 94 | <div class="list_name">姓名</div> |
80 | <div class="listenter"> | 95 | <div class="listenter"> |
81 | - <input type="text" placeholder="向昱筱" value="{$list.name}"> | 96 | + <input type="text" placeholder="向昱筱" value="{$list.name}" class="name"> |
82 | </div> | 97 | </div> |
83 | </div> | 98 | </div> |
84 | <div class="position"> | 99 | <div class="position"> |
85 | <div class="list"> | 100 | <div class="list"> |
86 | <div class="list_name">年龄</div> | 101 | <div class="list_name">年龄</div> |
87 | <div class="listenter"> | 102 | <div class="listenter"> |
88 | - <input type="text" placeholder="22" value="{$list.age}"> | 103 | + <input type="text" placeholder="请输入年龄" value="{$list.age}" class="age"> |
89 | </div> | 104 | </div> |
90 | </div> | 105 | </div> |
91 | </div> | 106 | </div> |
@@ -100,19 +115,19 @@ | @@ -100,19 +115,19 @@ | ||
100 | </div> | 115 | </div> |
101 | 116 | ||
102 | <p class="row"> | 117 | <p class="row"> |
103 | - <img src="__TMPL__/public/assets/images/bicon01@2x.png" alt=""> | 118 | + <img src="__TMPL__/public/assets/images/bicon01@2x.png" alt="{$list.age}"> |
104 | </p> | 119 | </p> |
105 | </div> | 120 | </div> |
106 | <div class="list"> | 121 | <div class="list"> |
107 | <div class="list_name">身份证号</div> | 122 | <div class="list_name">身份证号</div> |
108 | <div class="listenter"> | 123 | <div class="listenter"> |
109 | - <input type="text" placeholder="132645955876924681"> | 124 | + <input type="text" placeholder="请输入身份证号" value="{$list.card_num}" class="card_num"> |
110 | </div> | 125 | </div> |
111 | </div> | 126 | </div> |
112 | <div class="list"> | 127 | <div class="list"> |
113 | <div class="list_name">微信号</div> | 128 | <div class="list_name">微信号</div> |
114 | <div class="listenter"> | 129 | <div class="listenter"> |
115 | - <input type="text" placeholder="132645955876924681"> | 130 | + <input type="text" placeholder="请输入微信号" value="{$list.wx}" class="wx"> |
116 | </div> | 131 | </div> |
117 | </div> | 132 | </div> |
118 | 133 | ||
@@ -145,13 +160,19 @@ | @@ -145,13 +160,19 @@ | ||
145 | <div class="list"> | 160 | <div class="list"> |
146 | <div class="list_name">赋闲时间</div> | 161 | <div class="list_name">赋闲时间</div> |
147 | <div class="listenter"> | 162 | <div class="listenter"> |
148 | - <input type="text" placeholder="每天晚上8点以后"> | 163 | + <input type="text" placeholder="请输入赋闲时间" value="{$list.free_time}" class="free_time"> |
149 | </div> | 164 | </div> |
150 | </div> | 165 | </div> |
151 | <div class="list"> | 166 | <div class="list"> |
152 | <p class="list_name">求职意向</p> | 167 | <p class="list_name">求职意向</p> |
153 | - <div class="listenter"> | ||
154 | - <input type="text" placeholder="在家能工作的闲置工作"> | 168 | + <div class="listenter" style="width:4rem;"> |
169 | + <select name="" id="select" style="color: #aaaaaa"> | ||
170 | + <volist name="final.select" id="sel"> | ||
171 | + <option value="{$sel.id}" <eq name="sel.id" value="$list.select_id">selected</eq>>{$sel.name}</option> | ||
172 | + </volist> | ||
173 | + | ||
174 | + </select> | ||
175 | + <!--<input type="text" placeholder="请输入雇佣事项" >--> | ||
155 | </div> | 176 | </div> |
156 | </div> | 177 | </div> |
157 | <div class="skill"> | 178 | <div class="skill"> |
@@ -160,11 +181,14 @@ | @@ -160,11 +181,14 @@ | ||
160 | </div> | 181 | </div> |
161 | <div class="skillist"> | 182 | <div class="skillist"> |
162 | <div class="skill_item"> | 183 | <div class="skill_item"> |
163 | - <div class="skill_itemname"> | ||
164 | - <!--<p class="skill_itemtext">办公软件</p>--> | ||
165 | - <input type="text" placeholder="办公软件" class="skill_itemtext"> | ||
166 | - <p class="skill_itemimg deleteimg"><img src="__TMPL__/public/assets/images/bicon02@2x.png" alt=""></p> | ||
167 | - </div> | 184 | + <volist name="list.skill" id="skill"> |
185 | + <div class="skill_itemname"> | ||
186 | + <!--<p class="skill_itemtext">办公软件</p>--> | ||
187 | + <input type="text" placeholder="办公软件" class="skill_itemtext" value="{$skill}"> | ||
188 | + <p class="skill_itemimg deleteimg"><img src="__TMPL__/public/assets/images/bicon02@2x.png" alt=""></p> | ||
189 | + </div> | ||
190 | + </volist> | ||
191 | + | ||
168 | </div> | 192 | </div> |
169 | <div class="addskill"> | 193 | <div class="addskill"> |
170 | <input type="text" placeholder="请添加您的职业技能" class="enterskill"> | 194 | <input type="text" placeholder="请添加您的职业技能" class="enterskill"> |
@@ -186,7 +210,7 @@ | @@ -186,7 +210,7 @@ | ||
186 | <p class="wire"></p> | 210 | <p class="wire"></p> |
187 | </div> | 211 | </div> |
188 | <div class="experience"> | 212 | <div class="experience"> |
189 | - <textarea name="" id="enterexperience" cols="30" rows="10" placeholder="请输入工作经历"></textarea> | 213 | + <textarea name="" id="enterexperience" cols="30" rows="10" placeholder="请输入工作经历" >{$list.experience}</textarea> |
190 | 214 | ||
191 | </div> | 215 | </div> |
192 | </div> | 216 | </div> |
@@ -207,12 +231,12 @@ | @@ -207,12 +231,12 @@ | ||
207 | <!--</p>--> | 231 | <!--</p>--> |
208 | 232 | ||
209 | <div id="preview" class="uploadimg"> | 233 | <div id="preview" class="uploadimg"> |
210 | - <img id="imghead" border="0" src="__TMPL__/public/assets/images/bicon04@2x.png" style="width:100%;height:100%" | 234 | + <img id="imghead" border="0" src="{$list.just}" style="width:100%;height:100%" |
211 | onclick="$('#previewImg').click();"> | 235 | onclick="$('#previewImg').click();"> |
212 | </div> | 236 | </div> |
213 | <!--<img src="__TMPL__/public/assets/images/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>--> | 237 | <!--<img src="__TMPL__/public/assets/images/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>--> |
214 | <input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg"> | 238 | <input type="file" onchange="previewImage(this)" style="display: none;" id="previewImg"> |
215 | - | 239 | + <input type="hidden" id="second"/> |
216 | <p class="uploadimgname uploadfront">点击上传正面照</p> | 240 | <p class="uploadimgname uploadfront">点击上传正面照</p> |
217 | </div> | 241 | </div> |
218 | <div class="back"> | 242 | <div class="back"> |
@@ -220,12 +244,12 @@ | @@ -220,12 +244,12 @@ | ||
220 | <!--<img src="__TMPL__/public/assets/images/bicon04@2x.png" alt="">--> | 244 | <!--<img src="__TMPL__/public/assets/images/bicon04@2x.png" alt="">--> |
221 | <!--</p>--> | 245 | <!--</p>--> |
222 | <div id="preview1" class="uploadimg"> | 246 | <div id="preview1" class="uploadimg"> |
223 | - <img id="imghead1" border="0" src="__TMPL__/public/assets/images/bicon04@2x.png" style="width:100%;height:100%" | 247 | + <img id="imghead1" border="0" src="{$list.back}" style="width:100%;height:100%" |
224 | onclick="$('#previewImg1').click();"> | 248 | onclick="$('#previewImg1').click();"> |
225 | </div> | 249 | </div> |
226 | <!--<img src="__TMPL__/public/assets/images/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>--> | 250 | <!--<img src="__TMPL__/public/assets/images/delet.png" alt="" style="position:absolute;bottom:92px;left:46px" class="deleteimg"/>--> |
227 | <input type="file" onchange="previewImage1(this)" style="display: none;" id="previewImg1"> | 251 | <input type="file" onchange="previewImage1(this)" style="display: none;" id="previewImg1"> |
228 | - | 252 | + <input type="hidden" id="third"/> |
229 | <p class="uploadimgname uploadback">点击上传反面照</p> | 253 | <p class="uploadimgname uploadback">点击上传反面照</p> |
230 | </div> | 254 | </div> |
231 | </div> | 255 | </div> |
@@ -252,10 +276,10 @@ | @@ -252,10 +276,10 @@ | ||
252 | <script> | 276 | <script> |
253 | var sexlist=[{ | 277 | var sexlist=[{ |
254 | label: '男', | 278 | label: '男', |
255 | - value: 1 | 279 | + value: 0 |
256 | }, { | 280 | }, { |
257 | label: '女', | 281 | label: '女', |
258 | - value: 2 | 282 | + value: 1 |
259 | }] | 283 | }] |
260 | $('.sexselect').on('click', function () { | 284 | $('.sexselect').on('click', function () { |
261 | 285 | ||
@@ -266,30 +290,38 @@ | @@ -266,30 +290,38 @@ | ||
266 | onConfirm: function (result) { | 290 | onConfirm: function (result) { |
267 | console.log(sexlist[result[0]].label); | 291 | console.log(sexlist[result[0]].label); |
268 | $(".sexchose").html(sexlist[result[0]].label) | 292 | $(".sexchose").html(sexlist[result[0]].label) |
293 | + $(".sexchose").attr('index',sexlist[result[0]].value) | ||
269 | } | 294 | } |
270 | }); | 295 | }); |
271 | }); | 296 | }); |
272 | 297 | ||
273 | 298 | ||
274 | var list=[{ | 299 | var list=[{ |
275 | - label: '小学一年级', | 300 | + label: '小学', |
276 | value: 0 | 301 | value: 0 |
277 | }, { | 302 | }, { |
278 | - label: '小学二年级', | 303 | + label: '初中', |
279 | value: 1 | 304 | value: 1 |
305 | + }, { | ||
306 | + label: '高中', | ||
307 | + value: 2 | ||
308 | + }, { | ||
309 | + label: '大学', | ||
310 | + value: 3 | ||
280 | }] | 311 | }] |
281 | $('.seclectschool').on('click', function () { | 312 | $('.seclectschool').on('click', function () { |
313 | + | ||
282 | weui.picker(list, { | 314 | weui.picker(list, { |
283 | onChange: function (result) { | 315 | onChange: function (result) { |
284 | console.log(result); | 316 | console.log(result); |
285 | }, | 317 | }, |
286 | onConfirm: function (result) { | 318 | onConfirm: function (result) { |
287 | console.log(list[result[0]].label); | 319 | console.log(list[result[0]].label); |
288 | - $(".sex").html(list[result[0]].label) | 320 | + $(".sex").html(list[result[0]].label); |
321 | + $(".sex").attr('index',list[result[0]].value); | ||
289 | } | 322 | } |
290 | }); | 323 | }); |
291 | }); | 324 | }); |
292 | - | ||
293 | //职业技能 | 325 | //职业技能 |
294 | $(".enterskill").keyup(function(){ | 326 | $(".enterskill").keyup(function(){ |
295 | var h=$(this).val().length; | 327 | var h=$(this).val().length; |
@@ -339,19 +371,14 @@ | @@ -339,19 +371,14 @@ | ||
339 | '</div>' | 371 | '</div>' |
340 | 372 | ||
341 | $(".skill_item").append(text); | 373 | $(".skill_item").append(text); |
342 | - $(".enterskill").val("请添加您的职业技能"); | 374 | + $(".enterskill").val(''); |
375 | + $(".enterskill").attr('placeholder',"请添加您的职业技能"); | ||
343 | } | 376 | } |
344 | - | ||
345 | - }) | 377 | + }); |
346 | 378 | ||
347 | $(".skill").on("click", ".deleteimg", function () { | 379 | $(".skill").on("click", ".deleteimg", function () { |
348 | $(this).parents(".skill_itemname").remove(); | 380 | $(this).parents(".skill_itemname").remove(); |
349 | }) | 381 | }) |
350 | - | ||
351 | - //提交时资料不完善 | ||
352 | - $(".mesub").click(function () { | ||
353 | - popup("您好,您的资料尚未完善") | ||
354 | - }) | ||
355 | //上传图片 | 382 | //上传图片 |
356 | function clacImgZoomParam(maxWidth, maxHeight, width, height) { | 383 | function clacImgZoomParam(maxWidth, maxHeight, width, height) { |
357 | var param = { | 384 | var param = { |
@@ -409,9 +436,9 @@ | @@ -409,9 +436,9 @@ | ||
409 | status = ('rect:' + rect.top + ',' + rect.left + ',' + rect.width + ',' + rect.height); | 436 | status = ('rect:' + rect.top + ',' + rect.left + ',' + rect.width + ',' + rect.height); |
410 | div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; | 437 | div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; |
411 | } | 438 | } |
412 | - | 439 | + var thisFile = document.getElementById("previewImg").files[0]; |
440 | + getAjax(thisFile,2); | ||
413 | } | 441 | } |
414 | - | ||
415 | // 反面照 | 442 | // 反面照 |
416 | function previewImage1(file) { | 443 | function previewImage1(file) { |
417 | $(".uploadback").css("display", "none") | 444 | $(".uploadback").css("display", "none") |
@@ -445,10 +472,10 @@ | @@ -445,10 +472,10 @@ | ||
445 | status = ('rect:' + rect.top + ',' + rect.left + ',' + rect.width + ',' + rect.height); | 472 | status = ('rect:' + rect.top + ',' + rect.left + ',' + rect.width + ',' + rect.height); |
446 | div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; | 473 | div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; |
447 | } | 474 | } |
448 | - | 475 | + var thisFile = document.getElementById("previewImg1").files[0]; |
476 | + getAjax(thisFile,3); | ||
449 | } | 477 | } |
450 | - | ||
451 | - | 478 | + // 头像 |
452 | function previewImage3(file) { | 479 | function previewImage3(file) { |
453 | $(".uploadback").css("display", "none") | 480 | $(".uploadback").css("display", "none") |
454 | var MAXWIDTH = 50; | 481 | var MAXWIDTH = 50; |
@@ -482,9 +509,98 @@ | @@ -482,9 +509,98 @@ | ||
482 | div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; | 509 | div.innerHTML = "<div id=divhead style='width:" + rect.width + "px;height:" + rect.height + "px;margin-top:" + rect.top + "px;" + sFilter + src + "\"'></div>"; |
483 | } | 510 | } |
484 | 511 | ||
512 | + var thisFile = document.getElementById("previewImg3").files[0]; | ||
513 | + getAjax(thisFile,1); | ||
485 | } | 514 | } |
486 | 515 | ||
516 | + function getAjax(thisFile,type) { | ||
517 | + var formData = new FormData(); | ||
518 | + formData.append('file',thisFile); | ||
519 | + $.ajax({ | ||
520 | + url: "{:url('Member/getPic')}", | ||
521 | + type: "POST", | ||
522 | + data: formData, | ||
523 | + /** | ||
524 | + *必须false才会自动加上正确的Content-Type | ||
525 | + */ | ||
526 | + contentType: false, | ||
527 | + /** | ||
528 | + * 必须false才会避开jQuery对 formdata 的默认处理 | ||
529 | + * XMLHttpRequest会对 formdata 进行正确的处理 | ||
530 | + */ | ||
531 | + processData: false, | ||
532 | + success: function (data) { | ||
533 | + console.log(type); | ||
534 | + if(data.code == 1){ | ||
535 | + if(type == 1){ | ||
536 | + $('#first').val(data.data); | ||
537 | + }else if(type == 2){ | ||
538 | + $('#second').val(data.data); | ||
539 | + }else if(type == 3){ | ||
540 | + $('#third').val(data.data); | ||
541 | + } | ||
542 | + // popup('上传成功'); | ||
543 | + }else{ | ||
544 | + popup(data.message) | ||
545 | + } | ||
546 | + console.log(data); | ||
547 | + }, | ||
548 | + error: function () { | ||
549 | + popup("上传失败!"); | ||
550 | + } | ||
551 | + }); | ||
552 | + } | ||
487 | 553 | ||
554 | + //提交时资料不完善 | ||
555 | + $(".save").click(function () { | ||
556 | + var wx_pic = $('#first').val(); | ||
557 | + var name = $('.name').val(); | ||
558 | + var age = $('.age').val(); | ||
559 | + var sex = $(".sexchose").attr('index'); | ||
560 | + var card_num = $(".card_num").val(); | ||
561 | + var wx = $('.wx').val(); | ||
562 | + var education = $(".sex").attr('index'); | ||
563 | + var free_time = $('.free_time').val(); | ||
564 | + var select_id = $('#select').val(); | ||
565 | + var skill = $('.skill_itemtext').val(); | ||
566 | + var experience = $('#enterexperience').val(); | ||
567 | + var face = $('#second').val(); | ||
568 | + var back = $('#third').val(); | ||
569 | + $.ajax({ | ||
570 | + type: 'POST', | ||
571 | + url: "{:url('Member/changeResume')}", | ||
572 | + data: { | ||
573 | + 'id' : $('.id').val(), | ||
574 | + 'wx_pic' : wx_pic, | ||
575 | + 'name' : name, | ||
576 | + 'age' : age, | ||
577 | + 'sex' : sex, | ||
578 | + 'card_num' : card_num, | ||
579 | + 'wx' : wx, | ||
580 | + 'education' : education, | ||
581 | + 'free_time' : free_time, | ||
582 | + 'select_id' : select_id, | ||
583 | + 'skill' : skill, | ||
584 | + 'experience' : experience, | ||
585 | + 'just' : face, | ||
586 | + 'back' : back, | ||
587 | + }, | ||
588 | + success: function (res) { | ||
589 | + if(res.code == 1){ | ||
590 | + $('.examinewrapper').css('display','block'); | ||
591 | + setTimeout(location.href="{:url('Member/index')}",20000); | ||
592 | + }else{ | ||
593 | + popup(res.message); | ||
594 | + } | ||
595 | + console.log('1111111'); | ||
596 | + console.log(res); | ||
597 | + }, | ||
598 | + error: function (res) { | ||
599 | + console.log('33333333'); | ||
600 | + console.log(res); | ||
601 | + } | ||
602 | + }); | ||
603 | + }) | ||
488 | </script> | 604 | </script> |
489 | </body> | 605 | </body> |
490 | </html> | 606 | </html> |
@@ -17,9 +17,13 @@ body,html{ | @@ -17,9 +17,13 @@ body,html{ | ||
17 | .person_img{ | 17 | .person_img{ |
18 | width:1.2rem; | 18 | width:1.2rem; |
19 | height:1.2rem; | 19 | height:1.2rem; |
20 | + border-radius: 50%; | ||
21 | + | ||
20 | } | 22 | } |
21 | .person_img img{ | 23 | .person_img img{ |
22 | width:100%; | 24 | width:100%; |
25 | + height:100%; | ||
26 | + border-radius: 50%; | ||
23 | } | 27 | } |
24 | .person_name{ | 28 | .person_name{ |
25 | height:1.2rem; | 29 | height:1.2rem; |
-
请 注册 或 登录 后发表评论