123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505 |
- @extends('mobile.module.layouts.content')
- @push('meta')
- <meta name="csrf-token" content="{{ csrf_token() }}">
- @endpush
- @push('css')
- <link href="{{ theme_asset('mobile/css/personal.css') }}" rel="stylesheet">
- <link href="{{ theme_asset('mobile/css/nprogress.css') }}" rel="stylesheet">
- @endpush
- @section('content')
- <div class="list_height plist-txt qs-relative">
- <div class="pic"></div>
- <div class="tit font14">简历照片</div>
- <div class="describe font13">
- <div class="avatar">
- @if($content)
- @if($content->images)
- <img id="avatars" src="{{ upload_asset($content->images) }}">
- @else
- @if($content->sex==1)
- <img id="avatars" src="/data/upload/resource/no_photo_male.png">
- @else
- <img id="avatars" src="/data/upload/resource/no_photo_female.png">
- @endif
- @endif
- @else
- <img id="avatars" src="/data/upload/resource/no_photo_male.png">
- @endif
- </div>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- <input type="file" id="browseFile" class="browseFile">
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">姓名<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" id="fullname" placeholder="请输入姓名" value="{{ $content->realname or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">性别<span class="font_red_light">*</span></div>
- <div id="sex" class="describe font13">
- <div class="radio-group x2">
- @if($content)
- @if($content->sex==1)
- <div class="radio-cell">
- <label for="radio4">男</label>
- <input id="radio4" name="sex" type="radio" value="1" title="男" checked="checked">
- </div>
- <div class="radio-cell">
- <label for="radio5">女</label>
- <input id="radio5" name="sex" type="radio" value="2" title="女">
- </div>
- @else
- <div class="radio-cell">
- <label for="radio4">男</label>
- <input id="radio4" name="sex" type="radio" value="1" title="男">
- </div>
- <div class="radio-cell">
- <label for="radio5">女</label>
- <input id="radio5" name="sex" type="radio" value="2" title="女" checked="checked">
- </div>
- @endif
- @else
- <div class="radio-cell">
- <label for="radio4">男</label>
- <input id="radio4" name="sex" type="radio" value="1" title="男" checked="checked">
- </div>
- <div class="radio-cell">
- <label for="radio5">女</label>
- <input id="radio5" name="sex" type="radio" value="2" title="女">
- </div>
- @endif
- <div class="clear"></div>
- </div>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">出生年份<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <span class="for-select"></span>
- <select id="birthdate" name="birthdate">
- <option value="">请选择</option>
- <option value="2003" @if($content) @if($content->birthday==2003) selected @endif @endif>2003年</option><option value="2002" @if($content) @if($content->birthday==2002) selected @endif @endif>2002年</option><option value="2001" @if($content) @if($content->birthday==2001) selected @endif @endif>2001年</option><option value="2000" @if($content) @if($content->birthday==2000) selected @endif @endif>2000年</option><option value="1999" @if($content) @if($content->birthday==1999) selected @endif @endif>1999年</option><option value="1998" @if($content) @if($content->birthday==1998) selected @endif @endif>1998年</option><option value="1997" @if($content) @if($content->birthday==1997) selected @endif @endif>1997年</option><option value="1996" @if($content) @if($content->birthday==1996) selected @endif @endif>1996年</option><option value="1995" @if($content) @if($content->birthday==1995) selected @endif @endif>1995年</option><option value="1994" @if($content) @if($content->birthday==1994) selected @endif @endif>1994年</option><option value="1993" @if($content) @if($content->birthday==1993) selected @endif @endif>1993年</option><option value="1992" @if($content) @if($content->birthday==1992) selected @endif @endif>1992年</option><option value="1991" @if($content) @if($content->birthday==1991) selected @endif @endif>1991年</option><option value="1990" @if($content) @if($content->birthday==1990) selected @endif @endif>1990年</option><option value="1989" @if($content) @if($content->birthday==1989) selected @endif @endif>1989年</option><option value="1988" @if($content) @if($content->birthday==1988) selected @endif @endif>1988年</option><option value="1987" @if($content) @if($content->birthday==1987) selected @endif @endif>1987年</option><option value="1986" @if($content) @if($content->birthday==1986) selected @endif @endif>1986年</option><option value="1985" @if($content) @if($content->birthday==1985) selected @endif @endif>1985年</option><option value="1984" @if($content) @if($content->birthday==1984) selected @endif @endif>1984年</option><option value="1983" @if($content) @if($content->birthday==1983) selected @endif @endif>1983年</option><option value="1982" @if($content) @if($content->birthday==1982) selected @endif @endif>1982年</option><option value="1981" @if($content) @if($content->birthday==1981) selected @endif @endif>1981年</option><option value="1980" @if($content) @if($content->birthday==1980) selected @endif @endif>1980年</option><option value="1979" @if($content) @if($content->birthday==1979) selected @endif @endif>1979年</option><option value="1978" @if($content) @if($content->birthday==1978) selected @endif @endif>1978年</option><option value="1977" @if($content) @if($content->birthday==1977) selected @endif @endif>1977年</option><option value="1976" @if($content) @if($content->birthday==1976) selected @endif @endif>1976年</option><option value="1975" @if($content) @if($content->birthday==1975) selected @endif @endif>1975年</option><option value="1974" @if($content) @if($content->birthday==1974) selected @endif @endif>1974年</option><option value="1973" @if($content) @if($content->birthday==1973) selected @endif @endif>1973年</option><option value="1972" @if($content) @if($content->birthday==1972) selected @endif @endif>1972年</option><option value="1971" @if($content) @if($content->birthday==1971) selected @endif @endif>1971年</option><option value="1970" @if($content) @if($content->birthday==1970) selected @endif @endif>1970年</option><option value="1969" @if($content) @if($content->birthday==1969) selected @endif @endif>1969年</option><option value="1968" @if($content) @if($content->birthday==1968) selected @endif @endif>1968年</option><option value="1967" @if($content) @if($content->birthday==1967) selected @endif @endif>1967年</option><option value="1966" @if($content) @if($content->birthday==1966) selected @endif @endif>1966年</option><option value="1965" @if($content) @if($content->birthday==1965) selected @endif @endif>1965年</option><option value="1964" @if($content) @if($content->birthday==1964) selected @endif @endif>1964年</option><option value="1963" @if($content) @if($content->birthday==1963) selected @endif @endif>1963年</option><option value="1962" @if($content) @if($content->birthday==1962) selected @endif @endif>1962年</option><option value="1961" @if($content) @if($content->birthday==1961) selected @endif @endif>1961年</option><option value="1960" @if($content) @if($content->birthday==1960) selected @endif @endif>1960年</option><option value="1959" @if($content) @if($content->birthday==1959) selected @endif @endif>1959年</option><option value="1958" @if($content) @if($content->birthday==1958) selected @endif @endif>1958年</option><option value="1957" @if($content) @if($content->birthday==1957) selected @endif @endif>1957年</option><option value="1956" @if($content) @if($content->birthday==1956) selected @endif @endif>1956年</option><option value="1955" @if($content) @if($content->birthday==1955) selected @endif @endif>1955年</option><option value="1954" @if($content) @if($content->birthday==1954) selected @endif @endif>1954年</option>
- </select>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt js-actionParent">
- <div class="pic"></div>
- <div class="tit font14">现居住地<span class="font_red_light">*</span></div>
- <div class="describe font13 qs-temp js-showActionSheet" data-type="city1" data-base="QS_city_parent" data-source="QS_city" data-multiple="false" data-num="0" data-link="false" data-level="3" data-addjob="true">
- <span class="qs-temp-txt-city1" data-otxt="@if($content){{ $content->residence_cn }}@endif">@if($content){{ $content->residence_cn }}@else请选择@endif</span>
- <input class="qs-temp-code-city1" name="residence" id="residence" type="hidden" value="@if($content){{ $content->residence }}@endif">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- <!--BEGIN actionSheet-->
- <div>
- <div class="qs-mask" style="display: none"></div>
- <div class="qs-actionsheet js-actionsheet">
- <div class="qs-actionsheet-menu">
- <div class="con-filter">
- <div class="f-selected-group f-selected-group-city1">
- <div class="s-bar">
- <div class="qs-btn qs-btn-inline qs-btn-small qs-btn-border-gray qs-left js-cancelActionSheet">取消</div>
- <div class="clear"></div>
- </div>
- <div class="s-list qs-hidden"></div>
- </div>
- <div class="f-box f-box-city1"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- {{-- <div class="list_height plist-txt">--}}
- {{-- <div class="pic"></div>--}}
- {{-- <div class="tit font14">证件类型<span class="font_red_light">*</span></div>--}}
- {{-- <div class="describe font13">--}}
- {{-- <span class="for-select">请选择</span>--}}
- {{-- <select id="card_t_cn" name="card_t_cn">--}}
- {{-- <option value="">请选择</option>--}}
- {{-- @if(isset($category['other']['AIX_card_type']))--}}
- {{-- @foreach($category['other']['AIX_card_type'] as $key => $val )--}}
- {{-- <option value="{{ explode(',',$val)[0] }}" @if($content) @if($content->card_t_cn==explode(',',$val)[0]) selected @endif @endif>{{ explode(',',$val)[1] }}</option>--}}
- {{-- @endforeach--}}
- {{-- @endif--}}
- {{-- </select>--}}
- {{-- </div>--}}
- {{-- <div class="arrow"></div>--}}
- {{-- <div class="clear"></div>--}}
- {{-- </div>--}}
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">证件号<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <input type="text" id="id_card" name="id_card" placeholder="请输入证件号" @if($content)@if($content->card_t_cn==306 && $content->id_card) readonly @endif @endif value="@if($content){{ $content->id_card }}@endif">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
-
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">最高学历<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <span class="for-select"></span>
- <select id="education" name="education">
- <option value="">请选择</option>
- @foreach($category['other']['AIX_education'] as $key => $val )
- <option value="{{ explode(',',$val)[0] }}" @if($content) @if($content->education==explode(',',$val)[0]) selected @endif @endif>{{ explode(',',$val)[1] }}</option>
- @endforeach
- </select>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt js-actionParent">
- <div class="pic"></div>
- <div class="tit font14">专业</div>
- <div class="describe font13 qs-temp-level-major js-showActionSheet" data-type="major" data-base="QS_major_parent" data-source="QS_major" data-multiple="false" data-num="0" data-link="false">
- <span class="qs-temp-txt-major" data-otxt="{{ $content->major_cn or '请选择' }}">{{ $content->major_cn or '请选择' }}</span>
- <input class="qs-temp-code-major" name="major" id="major" type="hidden" value="{{ $content->major or '' }}" />
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- <!--BEGIN actionSheet-->
- <div>
- <div class="qs-mask" style="display: none"></div>
- <div class="qs-actionsheet js-actionsheet">
- <div class="qs-actionsheet-menu">
- <div class="con-filter">
- <div class="f-selected-group f-selected-group-major">
- <div class="s-bar">
- <div class="qs-btn qs-btn-inline qs-btn-small qs-btn-border-gray qs-left js-cancelActionSheet">取消</div>
- <div class="clear"></div>
- </div>
- <div class="s-list qs-hidden"></div>
- </div>
- <div class="f-box f-box-major"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">工作经验<span class="font_red_light">*</span></div>
- <div class="describe font13">
- <span class="for-select"></span>
- <select id="experience" name="experience">
- <option value="">请选择</option>
- @foreach($category['other']['AIX_experience'] as $key => $val )
- <option value="{{ explode(',',$val)[0] }}" @if($content) @if($content->experience==explode(',',$val)[0]) selected @endif @endif>{{ explode(',',$val)[1] }}</option>
- @endforeach
- </select>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt js-actionParent">
- <div class="pic"></div>
- <div class="tit font14">籍贯<span class="font_red_light">*</span></div>
- <div class="describe font13 qs-temp js-showActionSheet" data-type="city2" data-base="QS_city_parent" data-source="QS_city" data-multiple="false" data-num="0" data-link="false" data-level="3" data-addjob="true">
- <span class="qs-temp-txt-city2" data-otxt="@if($content){{ $content->householdaddress_cn }}@endif">@if($content){{ $content->householdaddress_cn }}@else请选择@endif</span>
- <input class="qs-temp-code-city2" name="householdaddress" id="householdaddress" type="hidden" value="@if($content){{ $content->householdaddress }}@endif">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- <!--BEGIN actionSheet-->
- <div>
- <div class="qs-mask" style="display: none"></div>
- <div class="qs-actionsheet js-actionsheet">
- <div class="qs-actionsheet-menu">
- <div class="con-filter">
- <div class="f-selected-group f-selected-group-city2">
- <div class="s-bar">
- <div class="qs-btn qs-btn-inline qs-btn-small qs-btn-border-gray qs-left js-cancelActionSheet">取消</div>
- <div class="clear"></div>
- </div>
- <div class="s-list qs-hidden"></div>
- </div>
- <div class="f-box f-box-city2"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="split-block"></div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">手机号码<span class="font_red_light">*</span></div>
- <div class="describe font13">
- @if(auth('web-member')->user()->mobile_audit)
- <a class="mui-navigate-right">
- <i class="mui-pull-right update font14">{{ auth('web-member')->user()->mobile }}</i>
- </a>
- <input type="hidden" id="telephone" name="telephone" value="{{ auth('web-member')->user()->mobile }}">
- @else
- <input type="text" id="telephone" name="telephone" placeholder="请输入手机号码" value="{{ auth('web-member')->user()->mobile }}">
- @endif
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">邮箱<span class="font_red_light">*</span></div>
- <div class="describe font13">
- @if(auth('web-member')->user()->email_audit)
- <a class="mui-navigate-right">
- <i class="mui-pull-right update font14">{{ auth('web-member')->user()->email }}</i>
- </a>
- <input id="email" name="email" type="hidden" value="{{ auth('web-member')->user()->email }}">
- @else
- <input id="email" name="email" type="text" placeholder="请输入邮箱" value="{{ auth('web-member')->user()->email }}">
- @endif
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="split-block"></div>
- <div class="J_more list_height plist-txt">
- <div class="pic"></div>
- <div class="tit font14">选填信息</div>
- <div class="describe font13">
- 点开选填信息,填写更加分
- </div>
- <div class="arrow arrow_bottom"></div>
- <div class="clear"></div>
- </div>
- <div class="J_select qs-hidden">
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">身高</div>
- <div class="describe font13">
- <input id="height" name="height" type="text" placeholder="请输入身高,单位CM" value="{{ $content->height or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">婚姻状况</div>
- <div class="describe font13">
- <div class="radio-group x3">
- <div class="radio-cell">
- <label for="radio1">未婚</label>
- <input id="radio1" name="marriage" type="radio" value="1" title="未婚" @if($content) @if($content->marriage==1) checked="checked" @endif @else checked="checked" @endif>
- </div>
- <div class="radio-cell">
- <label for="radio2">已婚</label>
- <input id="radio2" name="marriage" type="radio" value="2" title="已婚" @if($content) @if($content->marriage==2) checked="checked" @endif @endif>
- </div>
- <div class="radio-cell">
- <label for="radio3">保密</label>
- <input id="radio3" name="marriage" type="radio" value="3" title="保密" @if($content) @if($content->marriage==3) checked="checked" @endif @endif>
- </div>
- <div class="clear"></div>
- </div>
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">QQ</div>
- <div class="describe font13">
- <input id="qq" name="qq" type="text" placeholder="请输入QQ" value="{{ $content->qq or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <div class="list_height plist-txt notarrow">
- <div class="pic"></div>
- <div class="tit font14">微信号</div>
- <div class="describe font13">
- <input id="weixin" name="weixin" type="text" placeholder="请输入微信号" value="{{ $content->weixin or '' }}">
- </div>
- <div class="arrow"></div>
- <div class="clear"></div>
- </div>
- <input type="hidden" id="member_id" value="{{ $content->id or '' }}">
- <input type="hidden" id="resume_id" value="{{ $resume_id or '' }}">
- </div>
- <div class="split-block"></div>
- <div class="btn-spacing">
- <a id="J_saveresume" href="javascript:;" class="qs-btn qs-btn-blue font18">保存</a>
- </div>
- <div class="split-block"></div>
- @endsection
- @section('script')
- <script src="{{ theme_asset('mobile/js/mobileBUGFix.mini.js') }}"></script>
- <script src="{{ theme_asset('mobile/js/qsCategory.js') }}"></script>
- <script src="{{ theme_asset('mobile/js/LocalResizeIMG.js') }}"></script>
- <script src="{{ theme_asset('mobile/js/nprogress.js') }}"></script>
- <script type="text/javascript">
- var default_district = '<?php echo $defaultCity;?>';
- var str_major = '<?php echo json_encode($category['major']['first']);?>';
- var QS_major_parent = eval(str_major);
- for(var i = 0;i <QS_major_parent.length;i ++){
- QS_major_parent[i].step_size = 0;
- }
- var major = '<?php echo json_encode($category['major']['sec']);?>';
- var QS_major = eval('('+major+')');
- for(var i = 0;i <QS_major.length;i ++){
- QS_major[i].step_size = 0;
- }
- var str = '<?php echo json_encode($category['jobs']['first']);?>';
- var QS_jobs_parent = eval(str);
- for(var i = 0;i <QS_jobs_parent.length;i ++){
- QS_jobs_parent[i].step_size = 0;
- }
- var jobs = '<?php echo json_encode($category['jobs']['sec']);?>';
- var QS_jobs = eval('('+jobs+')');
- for(var i = 0;i <QS_jobs.length;i ++){
- QS_jobs[i].step_size = 0;
- }
- var district = '<?php echo json_encode($category['district']['first']);?>';
- var QS_city_parent = eval(district);
- for(var i = 0;i <QS_city_parent.length;i ++){
- QS_city_parent[i].step_size = 0;
- }
- var districts = '<?php echo json_encode($category['district']['person']);?>';
- var QS_city = eval('('+districts+')');
- for(var i = 0;i <QS_city.length;i ++){
- QS_city[i].step_size = 0;
- }
- var other = '<?php echo json_encode($category['other']['AIX_trade']);?>';
- var QS_trade = eval(other);
- for(var i = 0;i <QS_trade.length;i ++){
- QS_trade[i].step_size = 0;
- }
- $(function(){
- $(".js-showActionSheet").on("click", function(){
- var $iosActionsheet = $(this).closest('.js-actionParent').find('.js-actionsheet');
- var $iosMask = $(this).closest('.js-actionParent').find('.qs-mask');
- $iosActionsheet.removeClass('qs-actionsheet-toggle');
- $iosActionsheet.addClass('qs-actionsheet-toggle');
- $iosMask.fadeIn(200);
- $iosMask.on('click', hideActionSheet);
- $(this).closest('.js-actionParent').find('.js-cancelActionSheet').on('click', hideActionSheet);
- $(this).closest('.js-actionParent').find('.qs-actionsheet-cell').on('click', hideActionSheet);
- function hideActionSheet() {
- $(this).closest('.js-actionParent').find('.js-actionsheet').removeClass('qs-actionsheet-toggle');
- $(this).closest('.js-actionParent').find('.qs-mask').fadeOut(200);
- }
- });
- });
- // 验证表单并提交
- $('#J_saveresume').die().live('click', function() {
- var member_id = $.trim($('#member_id').val());
- var resume_id = $.trim($('#resume_id').val());
- var fullnameValue = $.trim($('#fullname').val());
- var sexValue = $.trim($('#sex input[name="sex"]:checked').val());
- var birthdateValue = $.trim($('#birthdate').val());
- var experienceValue = $.trim($('#experience').val());
- var id_cardValue = $.trim($('#id_card').val());
- var card_t_cn = 306;
- var residenceValue = $.trim($('#residence').val());
- var telephoneValue = $.trim($('#telephone').val());
- var educationValue = $.trim($('#education').val());
- var emailValue = $.trim($('#email').val());
- var majorValue = $.trim($('#major').val());
- var heightValue = $.trim($('#height').val());
- var householdaddressValue = $.trim($('#householdaddress').val());
- var marriageValue = $.trim($('input[name="marriage"]:checked').val());
- var qq = $.trim($('#qq').val());
- var weixin = $.trim($('#weixin').val());
- $.ajax({
- headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
- url: "{{ url('mobile/person/memberInfo/updateInfo') }}",
- type: 'POST',
- dataType: 'json',
- data: {id:member_id,card_t_cn:card_t_cn,realname: fullnameValue,sex: sexValue, birthday: birthdateValue,residence: residenceValue,education: educationValue, experience: experienceValue, phone: telephoneValue, email: emailValue, major: majorValue,height: heightValue, householdaddress: householdaddressValue,marriage: marriageValue,qq:qq,weixin:weixin,id_card:id_cardValue},
- success : function(result){
- if(resume_id){
- window.location.href = '{{ url('mobile/person/resumeUpdate') }}/'+resume_id;
- } else {
- qsToast({type:1,context:'保存成功!'});
- }
- },
- error: function (errorData) {
- if (errorData.status==422) {//验证错误
- $.each(JSON.parse(errorData.response).errors,function (key,val) {
- qsToast({type:2,context: val[0]});
- return false;
- });
- }
- else if(errorData.status==400) {//业务错误
- qsToast({type:2,context: JSON.parse(errorData.response).message});
- return false;
- }
- }
- })
- });
- $('.J_more').on('click',function(){
- $(this).toggleClass('select');
- if($(this).hasClass('select')){
- $('.J_select').show();
- }else{
- $('.J_select').hide();
- }
- });
- $('#browseFile').localResizeIMG({
- width: 400,
- quality: 1,
- success: function (result) {
- var submitData={
- pic1:result.clearBase64,
- };
- NProgress.start();
- $.ajax({
- headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
- type: "POST",
- url: "{{ route($sub_site.'mobile.person.upload.head') }}",
- data: submitData,
- dataType:"json",
- success: function(result){
- if(result.status == 1){
- $('#avatars').attr('src','/storage/'+result.data);
- }else{
- qsToast({type:2,context:'上传失败!'});
- }
- NProgress.done();
- },
- complete :function(XMLHttpRequest, textStatus){},
- error:function(XMLHttpRequest, textStatus, errorThrown){ //上传失败
- qsToast({type:2,context: '头像上传失败!'});
- }
- });
- }
- });
- </script>
- @endsection
|