index.blade.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. @extends('theme::layout.public')
  2. @section('seo_title')专家认证 - {{ Setting()->get('website_name') }}@endsection
  3. @section('css')
  4. <link href="{{ asset('/static/js/select2/css/select2.min.css')}}" rel="stylesheet">
  5. <link href="{{ asset('/static/js/select2/css/select2-bootstrap.min.css')}}" rel="stylesheet">
  6. @endsection
  7. @section('content')
  8. <div class="row">
  9. <!--左侧菜单-->
  10. @include('theme::layout.profile_menu')
  11. <div id="main" class="settings col-md-10 form-horizontal main">
  12. <h2 class="h3 post-title">专家认证</h2>
  13. @if(Auth()->user()->authentication)
  14. @if( Auth()->user()->authentication->status === 0 )
  15. <div class="alert alert-info" role="alert">
  16. 您的申请提交成功!我们会在三个工作日内处理,处理结果会通过邮件、站内消息方式通知您,如有疑问请联系官方管理员。
  17. </div>
  18. @elseif( Auth()->user()->authentication->status === 1 )
  19. <div class="alert alert-success" role="alert">
  20. 恭喜,您的认证申请已通过审核!
  21. </div>
  22. @else
  23. <div class="alert alert-danger" role="alert">
  24. 抱歉,经过我们的审核您提交的资料未通过审核,请核实一下资料信息,再次提交。
  25. @if(Auth()->user()->authentication->failed_reason)失败原因:{{ Auth()->user()->authentication->failed_reason }}@endif
  26. </div>
  27. @endif
  28. @endif
  29. <div class="row mt-30">
  30. <div class="col-md-8">
  31. @if(Auth()->user()->authentication)
  32. <div class="box box-solid">
  33. <div class="box-body">
  34. <dl class="dl-horizontal">
  35. <dt>真实姓名</dt>
  36. <dd>{{ Auth()->user()->authentication->real_name }}</dd>
  37. <dt>性别</dt>
  38. <dd>{{ trans_gender_name(Auth()->user()->authentication->gender) }}</dd>
  39. <dt>所在城市</dt>
  40. <dd>{{ Area()->getName(Auth()->user()->authentication->province) }} @if(Auth()->user()->authentication->city>0 && Area()->getName(Auth()->user()->authentication->province)!=Area()->getName(Auth()->user()->authentication->city)) - {{ Area()->getName(Auth()->user()->authentication->city) }} @endif</dd>
  41. <dt>职业身份</dt>
  42. <dd>{{ Auth()->user()->authentication->title }}</dd>
  43. <dt>个人简介</dt>
  44. <dd>{{ Auth()->user()->authentication->description }}</dd>
  45. <dt>身份照号码</dt>
  46. <dd>{{ Auth()->user()->authentication->id_card }}</dd>
  47. <dt>身份照正面照片</dt>
  48. <dd><img class="img-responsive" src="{{ route('website.image.show',['image_name'=>Auth()->user()->authentication->id_card_image]) }}" /></dd>
  49. <dt>认证领域</dt>
  50. <dd>{{ Auth()->user()->authentication->skill }}</dd>
  51. <dt>专业性证明文件</dt>
  52. <dd><img class="img-responsive" src="{{ route('website.image.show',['image_name'=>Auth()->user()->authentication->skill_image]) }}" /></dd>
  53. <dd><a href="{{ route('auth.authentication.edit') }}" class="btn btn-warning">修改认证资料</a></dd>
  54. </dl>
  55. </div>
  56. </div>
  57. @else
  58. <form name="authForm" id="authentication_form" enctype="multipart/form-data" action="{{ route('auth.authentication.store')}}" method="POST">
  59. <input type="hidden" name="_token" value="{{ csrf_token() }}" />
  60. <input type="hidden" id="tags" name="skill" value="{{ old('skill') }}" />
  61. <div class="form-group @if ($errors->first('real_name')) has-error @endif">
  62. <label for="real_name" class="control-label col-sm-3 required">真实姓名</label>
  63. <div class="col-sm-9">
  64. <input name="real_name" type="text" maxlength="32" placeholder="真实姓名" class="form-control" value="{{ old('real_name','') }}" />
  65. @if ($errors->first('real_name'))
  66. <span class="help-block">{{ $errors->first('real_name') }}</span>
  67. @endif
  68. </div>
  69. </div>
  70. <div class="form-group">
  71. <label class="control-label col-sm-3">性别</label>
  72. <div class="col-sm-9">
  73. <label class="radio-inline"><input name="gender" type="radio" value="1" @if( old('gender',Auth()->user()->gender) == 1 ) checked @endif > 男</label>
  74. <label class="radio-inline"><input name="gender" type="radio" value="2" @if( old('gender',Auth()->user()->gender)==2 ) checked @endif> 女</label>
  75. <label class="radio-inline"><input name="gender" type="radio" value="0" @if( old('gender',Auth()->user()->gender)==0 ) checked @endif> 保密</label>
  76. </div>
  77. </div>
  78. <div class="form-group">
  79. <label for="setting-city" class="control-label col-sm-3">所在城市</label>
  80. <div class="col-sm-4">
  81. <select class="form-control" name="province" id="province">
  82. <option>请选择省份</option>
  83. @foreach($areaData['provinces'] as $province)
  84. <option value="{{ $province->id }}" @if( old('province',Auth()->user()->province) == $province->id) selected @endif>{{ $province->name }}</option>
  85. @endforeach
  86. </select>
  87. </div>
  88. <div class="col-sm-5">
  89. <select class="form-control" name="city" id="city">
  90. <option>请选择城市</option>
  91. @foreach($areaData['cities'] as $city)
  92. <option value="{{ $city->id }}" @if( old('city',Auth()->user()->city) == $city->id) selected @endif >{{ $city->name }}</option>
  93. @endforeach
  94. </select>
  95. </div>
  96. </div>
  97. <div class="form-group @if ($errors->first('title')) has-error @endif">
  98. <label for="name" class="control-label col-sm-3">身份职业</label>
  99. <div class="col-sm-9">
  100. <input name="title" id="title" type="text" maxlength="32" placeholder="例如:汽车制造 / 产品设计师 / 登山爱好者" class="form-control" value="{{ old('title',Auth()->user()->title) }}" />
  101. @if ($errors->first('title'))
  102. <span class="help-block">{{ $errors->first('title') }}</span>
  103. @endif
  104. </div>
  105. </div>
  106. <div class="form-group @if ($errors->first('description')) has-error @endif">
  107. <label for="setting-description" class="control-label col-sm-3">自我介绍</label>
  108. <div class="col-sm-9">
  109. <textarea name="description" id="setting-description" class="form-control" rows="6">{{ old('description',Auth()->user()->description) }}</textarea>
  110. @if ($errors->first('description'))
  111. <span class="help-block">{{ $errors->first('description') }}</span>
  112. @endif
  113. </div>
  114. </div>
  115. <div class="form-group @if ($errors->first('id_card')) has-error @endif">
  116. <label for="id_card" class="control-label col-sm-3 required">身份照号码</label>
  117. <div class="col-sm-9">
  118. <input name="id_card" type="text" maxlength="32" placeholder="身份照号码" class="form-control" value="{{ old('id_card','') }}" />
  119. @if ($errors->first('id_card'))
  120. <span class="help-block">{{ $errors->first('id_card') }}</span>
  121. @endif
  122. </div>
  123. </div>
  124. <div class="form-group @if ($errors->first('id_card_image')) has-error @endif">
  125. <label id="id_card_image" class="control-label col-sm-3 required">身份照正面照片</label>
  126. <div class="col-sm-9">
  127. <input class="form-control" type="file" name="id_card_image" />
  128. @if ($errors->first('id_card_image'))
  129. <span class="help-block">{{ $errors->first('id_card_image') }}</span>
  130. @else
  131. <div class="help-block">
  132. 1.请上传身份证正面带有头像的扫描件或清晰照片<br />
  133. 2.照片要求格式为JPG/JPEG/GIF/PNG,大小不要超过2M
  134. </div>
  135. @endif
  136. </div>
  137. </div>
  138. <div class="form-group @if ($errors->first('skill')) has-error @endif">
  139. <label for="select_tags" class="control-label col-sm-3 required">认证领域</label>
  140. <div class="col-sm-9">
  141. <select id="select_tags" name="select_tags" class="form-control" multiple="multiple" >
  142. @if(old('skill'))
  143. @foreach( array_filter(explode(",",old('skill'))) as $tag)
  144. <option value="{{ $tag }}" selected>{{ $tag }}</option>
  145. @endforeach
  146. @endif
  147. </select>
  148. @if ($errors->first('skill'))
  149. <span class="help-block">{{ $errors->first('skill') }}</span>
  150. @endif
  151. </div>
  152. </div>
  153. <div class="form-group @if ($errors->first('skill_image')) has-error @endif">
  154. <label id="skill_image" class="control-label col-sm-3 required">专业性证明</label>
  155. <div class="col-sm-9">
  156. <input class="form-control" type="file" name="skill_image" />
  157. @if ($errors->first('skill_image'))
  158. <span class="help-block">{{ $errors->first('skill_image') }}</span>
  159. @else
  160. <div class="help-block">
  161. 1.请上传您的工卡、单位证明、资格证书、获奖证书等一切可证明您身份的材料照片<br />
  162. 2.照片要求格式为JPG/JPEG/GIF/PNG,大小不要超过2M
  163. </div>
  164. @endif
  165. </div>
  166. </div>
  167. <div class="form-group @if ($errors->first('captcha')) has-error @endif">
  168. <label for="captcha" class="required control-label col-sm-3">验证码</label>
  169. <div class="col-sm-4">
  170. <input id="captcha" name="captcha" type="text" maxlength="32" placeholder="请输入下方验证码" class="form-control" value="{{ old('captcha') }}" />
  171. @if ($errors->first('captcha'))
  172. <span class="help-block">{{ $errors->first('captcha') }}</span>
  173. @endif
  174. <div class="mt-10"><a href="javascript:void(0);" id="reloadCaptcha"><img src="{{ captcha_src()}}"></a></div>
  175. </div>
  176. </div>
  177. <div class="form-action row mb-30">
  178. <div class="col-sm-offset-3 col-sm-9">
  179. <button class="btn btn-xl btn-primary profile-sub" type="submit">提交申请</button>
  180. </div>
  181. </div>
  182. </form>
  183. @endif
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. @endsection
  189. @section('script')
  190. <script src="{{ asset('/static/js/select2/js/select2.min.js')}}"></script>
  191. <script type="text/javascript">
  192. $(function(){
  193. $("#select_tags").select2({
  194. theme:'bootstrap',
  195. placeholder: "认证领域,例如法律、互联网、电脑等不超过5个词语",
  196. ajax: {
  197. url: '/ajax/loadTags',
  198. dataType: 'json',
  199. delay: 250,
  200. data: function (params) {
  201. return {
  202. word: params.term
  203. };
  204. },
  205. processResults: function (data) {
  206. return {
  207. results: data
  208. };
  209. },
  210. cache: true
  211. },
  212. minimumInputLength:1,
  213. tags:true
  214. });
  215. /*加载省份城市*/
  216. $("#province").change(function(){
  217. var province_id = $(this).val();
  218. $("#city").load("{{ url('ajax/loadCities') }}/"+province_id);
  219. });
  220. $("#select_tags").change(function(){
  221. $("#tags").val($("#select_tags").val());
  222. });
  223. });
  224. </script>
  225. @endsection