123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850 |
- <template>
- <view>
- <form>
- <button class="cu-form-group" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
- <view class="title">头像</view>
- <view class="cu-avatar radius bg-gray">
- <avatar selWidth="640rpx" selHeight="640rpx" :avatarSrc="userinfo.avatar" noTab="true" avatarStyle="top:16rpx;width: 75rpx; height: 75rpx; border-radius: 5%;"></avatar>
- </view>
- </button>
- <!-- <view class="cu-form-group">
- <view class="title">头像</view>
- <view class="cu-avatar radius bg-gray">
- <avatar selWidth="640rpx" selHeight="640rpx" @upload="setAvatar" :avatarSrc="userinfo.avatar" noTab="true" avatarStyle="width: 75rpx; height: 75rpx; border-radius: 5%;"></avatar>
- </view>
- </view> -->
-
- <view class="cu-list menu margin-top">
- <view class="cu-item arrow" data-title="昵称" data-infobox="input" data-field="nickname" :data-value="userinfo.nickname" @click="showModalNickname">
- <view class="content">
- <text>昵称</text>
- </view>
- <view class="action">
- <text class="text-grey">{{userinfo.nickname}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text>手机号</text>
- </view>
- <view class="action">
- <text class="text-grey">{{userinfo.mobile}}</text>
- </view>
- </view>
- <view class="cu-item arrow" data-title="公开电话">
- <view class="content">
- <text>公开电话</text>
- </view>
- <view class="action">
- <picker mode="selector" @change="isPublicPickerChange" :value="isPublicIndex" :range="isPublicPickerList" :range-key="`text`">
- <view class="picker padding-tb text-right text-grey" style="width: 280rpx;line-height: 40rpx;">{{isPublicIndex>-1 ? isPublicPickerList[isPublicIndex].text : ("请选择...")}}</view>
- </picker>
- </view>
- </view>
- </view>
-
- <view class="cu-list menu margin-top" v-if="userinfo.authstatus==3">
- <view class="cu-item">
- <view class="content">
- <text>身份证号</text>
- </view>
- <view class="action">
- <text class="text-grey">{{userinfo.idcard}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text>姓名</text>
- </view>
- <view class="action">
- <text class="text-grey">{{userinfo.realname}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text>性别</text>
- </view>
- <view class="action">
- <text class="text-grey">{{userinfo.gender==1 ? "男" : "女"}}</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text>出生日期</text>
- </view>
- <view class="action">
- <text class="text-grey">{{userinfo.birthday}}</text>
- </view>
- </view>
- </view>
-
- <view class="cu-list menu margin-top">
- <view class="cu-item arrow" data-title="岗位设置方式">
- <view class="content">
- <text>岗位设置方式</text>
- </view>
- <view class="action">
- <picker mode="selector" @change="comCateTypePickerChange" :value="comCateTypeIndex" :range="comCateTypePickerList" :range-key="`text`">
- <view class="picker padding-tb text-right text-grey" style="width: 280rpx;line-height: 40rpx;">{{comCateTypeIndex>-1 ? comCateTypePickerList[comCateTypeIndex].text : ("请选择...")}}</view>
- </picker>
- </view>
- </view>
- <view class="cu-item arrow" @click="toggleComCate(true)" v-if="userinfo.com_cate_type == 1">
- <view class="content">
- <text>岗位类型</text>
- </view>
- <view class="action">
- <view class="picker padding-tb text-right text-grey" style="width: 280rpx;line-height: 40rpx;">{{userinfo.com_cate.length > 0 ? userinfo.com_cate : "请选择..."}}</view>
- </view>
- </view>
- <view class="cu-item arrow" data-title="岗位类型" data-infobox="input" data-field="com_cate_other" :data-value="userinfo.com_cate_other" @click="showModal" v-if="userinfo.com_cate_type == 2">
- <view class="content">
- <text>岗位类型</text>
- </view>
- <view class="action">
- <text class="text-grey text-cut">{{userinfo.com_cate_other}}</text>
- </view>
- </view>
- </view>
-
- <view class="cu-list menu margin-top solid-bottom">
- <view class="cu-item arrow" data-title="求职意向">
- <view class="content">
- <text class="text-red">*</text>
- <text>求职意向</text>
- </view>
- <view class="action">
- <picker mode="selector" @change="jobintentiontypePickerChange" :value="jobintentiontypePickIndex" :range="jobintentiontypePickerList" :range-key="`title`">
- <view class="picker padding-tb text-right text-grey" style="width: 280rpx;line-height: 40rpx;">{{jobintentiontypePickIndex>-1 ? jobintentiontypePickerList[jobintentiontypePickIndex].title : ("请选择...")}}</view>
- </picker>
- </view>
- </view>
- <view class="cu-item arrow" @click="toggleFilter(true)" :style="userinfo.jobintention == 3 ? '' : 'display:none;'">
- <view class="content">
- <text>用工时间</text>
- </view>
- <view class="action">
- <view class="picker padding-tb text-right text-grey" style="width: 280rpx;line-height: 40rpx;">{{userinfo.emp_time.length > 0 ? userinfo.emp_time : "请选择..."}}</view>
- </view>
- </view>
- <view class="cu-item arrow" data-title="现居住地" data-infobox="input" data-field="address" :data-value="userinfo.address" @click="showModal">
- <view class="content">
- <text class="text-red">*</text>
- <text>现居住地</text>
- </view>
- <view class="action">
- <text class="text-grey text-cut">{{userinfo.address}}</text>
- </view>
- </view>
- <view class="cu-item arrow" @click="toggleCommunity(true)">
- <view class="content">
- <text>上班地点</text>
- </view>
- <view class="action">
- <view class="picker padding-tb text-right text-grey" style="width: 280rpx;line-height: 40rpx;">{{userinfo.work_place.length > 0 ? userinfo.work_place : "请选择..."}}</view>
- </view>
- </view>
- </view>
-
- <view class="cu-list menu margin-top solid-bottom">
- <!-- <view class="cu-item arrow" data-title="健康状况">
- <view class="content">
- <text>健康状况</text>
- </view>
- <view class="action">
- <picker mode="selector" @change="healthPickerChange" :value="healthPickIndex" :range="healthPickerList" :range-key="`text`">
- <view class="picker padding-tb text-right text-grey" style="width: 280rpx;line-height: 40rpx;">{{healthPickIndex>-1 ? healthPickerList[healthPickIndex].text : ("请选择...")}}</view>
- </picker>
- </view>
- </view> -->
- <view class="cu-item arrow" data-title="工作经验">
- <view class="content">
- <text class="text-red">*</text>
- <text>工作经验</text>
- </view>
- <view class="action">
- <picker mode="selector" @change="workexperiencePickerChange" :value="workexperiencePickIndex" :range="workexperiencePickerList" :range-key="`text`">
- <view class="picker padding-tb text-right text-grey" style="width: 280rpx;line-height: 40rpx;">{{workexperiencePickIndex>-1 ? workexperiencePickerList[workexperiencePickIndex].text : ("请选择...")}}</view>
- </picker>
- </view>
- </view>
- <view class="cu-item arrow" data-title="学历">
- <view class="content">
- <text class="text-red">*</text>
- <text>学历</text>
- </view>
- <view class="action">
- <picker mode="selector" @change="educationPickerChange" :value="educationPickIndex" :range="educationPickerList" :range-key="`text`">
- <view class="picker padding-tb text-right text-grey" style="width: 280rpx;line-height: 40rpx;">{{educationPickIndex>-1 ? educationPickerList[educationPickIndex].text : ("请选择...")}}</view>
- </picker>
- </view>
- </view>
- <view class="padding-tb padding-lr-xs bg-white solids-top">
- <view class="title padding-bottom-sm text-lg">技能证书</view>
- <view class="grid col-4 grid-square flex-sub">
- <block v-for="(picitem,picindex) in userinfo.skill_cert" :key="picindex">
- <view class="bg-img" @tap="viewImage" :data-url="picitem">
- <image :src="picitem" mode="aspectFill"></image>
- <view class="cu-tag bg-red" @tap.stop="delImg" :data-index="index">
- <text class='cuIcon-close'></text>
- </view>
- </view>
- </block>
- <view class="solids" @tap="chooseImage" v-if="userinfo.skill_cert.length <= 12">
- <text class='cuIcon-cameraadd'></text>
- </view>
- </view>
- </view>
- <view class="cu-item arrow" data-title="个人描述" data-infobox="textarea" data-field="eduexperience" :data-value="userinfo.eduexperience" @click="showModal">
- <view class="content">
- <text>个人描述</text>
- </view>
- </view>
- </view>
- <view class="padding bg-white">
- <text>{{userinfo.eduexperience}}</text>
- </view>
- <view class="padding text-center">
- <button class="cu-btn bg-orange margin-tb-sm lg" @tap="goCDetail()">已确认完善信息,返回!</button>
- </view>
- <!-- <view class="padding text-center" v-if="userinfo.authstatus == 1">
- <button class="cu-btn bg-orange margin-tb-sm lg" @tap="goLPage('/pages/my/myauth')">您还未进行实名认证,请实名认证!</button>
- </view>
- <view class="padding text-center" v-else="userinfo.authstatus == 2">
- <button class="cu-btn bg-orange margin-tb-sm lg" @tap="goLPage('/pages/my/myauth')">您的实名认证已提交,正在等待审核!</button>
- </view> -->
- </form>
-
-
- <view class="cu-modal" :class="forminfo.isshow">
- <view class="cu-dialog">
- <view class="cu-bar bg-white justify-end">
- <view class="content">修改 {{forminfo.title}}</view>
- <view class="action" @tap="hideModal">
- <text class="cuIcon-close text-grey"></text>
- </view>
- </view>
- <view class="padding-xl bg-white text-left solid-top solid-bottom">
- <input v-if="forminfo.infobox=='input'" :placeholder="'请输入'+forminfo.title+'...'" @input="bindInput" :value="forminfo.value"></input>
- <textarea v-if="forminfo.infobox=='textarea'" :placeholder="'请输入'+forminfo.title+'...'" @input="bindInput" maxlength="-1" :value="forminfo.value"></textarea>
- </view>
- <view class="cu-bar bg-white justify-end">
- <view class="action">
- <button class="cu-btn line-grey text-grey" @tap="hideModal">取消</button>
- <button class="cu-btn bg-green margin-left" @tap="subModal">确定</button>
- </view>
- </view>
- </view>
- </view>
-
- <view class="cu-modal" :class="formavatar">
- <view class="cu-dialog">
- <view class="cu-bar bg-white justify-end">
- <view class="content">修改 昵称</view>
- <view class="action" @tap="hideModal">
- <text class="cuIcon-close text-grey"></text>
- </view>
- </view>
- <view class="padding-xl bg-white text-left solid-top solid-bottom">
- <input :placeholder="'请输入昵称...'" type="nickname" @input="bindInput" :value="forminfo.value"></input>
- </view>
- <view class="cu-bar bg-white justify-end">
- <view class="action">
- <button class="cu-btn line-grey text-grey" @tap="hideModal">取消</button>
- <button class="cu-btn bg-green margin-left" @tap="subModal">确定</button>
- </view>
- </view>
- </view>
- </view>
-
- <view class="filteremp" v-if="empTimeModal">
- <view class="padding bg-white emp-box">
- <block v-for="(item,index) in empTime" :key="index">
- <button class="cu-btn margin-lr-xs margin-tb-xs" v-if="!userinfo.emp_time.includes(item.name)" @click="selectEmpTime(item.name,'add')">
- {{item.name}}
- </button>
- <button class="cu-btn margin-lr-xs margin-tb-xs bg-red" v-else @click="selectEmpTime(item.name,'del')">
- {{item.name}}
- </button>
- </block>
- <view class="padding flex flex-wrap justify-between align-center">
- <button class="cu-btn bg-red lg" @click="subFilter()">确定</button>
- <button class="cu-btn bg-gray lg" @click="toggleFilter(false)">取消</button>
- </view>
- </view>
- </view>
-
- <view class="filteremp" v-if="communityModal">
- <view class="padding bg-white emp-box">
- <block v-for="(item,index) in community" :key="index">
- <button class="cu-btn margin-lr-xs margin-tb-xs" v-if="!userinfo.work_place.includes(item.name)" @click="selectCommunity(item.name,'add')">
- {{item.name}}
- </button>
- <button class="cu-btn margin-lr-xs margin-tb-xs bg-red" v-else @click="selectCommunity(item.name,'del')">
- {{item.name}}
- </button>
- </block>
- <view class="padding flex flex-wrap justify-between align-center">
- <button class="cu-btn bg-red lg" @click="subCommunity()">确定</button>
- <button class="cu-btn bg-gray lg" @click="toggleCommunity(false)">取消</button>
- </view>
- </view>
- </view>
-
- <view class="filteremp" v-if="comCateModal">
- <view class="padding bg-white emp-box">
- <block v-for="(item,index) in comCate" :key="index">
- <button class="cu-btn margin-lr-xs margin-tb-xs" v-if="!userinfo.com_cate.includes(item.title)" @click="selectComCate(item.title,'add')">
- {{item.title}}
- </button>
- <button class="cu-btn margin-lr-xs margin-tb-xs bg-red" v-else @click="selectComCate(item.title,'del')">
- {{item.title}}
- </button>
- </block>
- <view class="padding flex flex-wrap justify-between align-center">
- <button class="cu-btn bg-red lg" @click="subComCate()">确定</button>
- <button class="cu-btn bg-gray lg" @click="toggleComCate(false)">取消</button>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- var _this;
- import avatar from "@/components/yq-avatar/yq-avatar.vue";
- var sexPickerList = [
- {id: 0, text: '保密'},
- {id: 1, text: '男'},
- {id: 2, text: '女'},
- ];
- var educationPickerList = [
- {id: 1, text: '初中及以下'},
- {id: 2, text: '高中'},
- {id: 3, text: '中技'},
- {id: 4, text: '中专'},
- {id: 5, text: '大专'},
- {id: 6, text: '本科'},
- {id: 7, text: '硕士'},
- {id: 8, text: '博士'},
- ];
- var workexperiencePickerList = [
- {id: 1, text: '无经验'},
- {id: 2, text: '一年以下'},
- {id: 3, text: '1-3年'},
- {id: 4, text: '3-5年'},
- {id: 5, text: '5-10年'},
- {id: 6, text: '10年以上'}
- ];
- var healthPickerList = [
- {id:1, text: '健康或良好'},
- {id:2, text: '一般或较弱'},
- {id:3, text: '有慢性病'},
- {id:4, text: '残疾'}
- ];
- var healthPickerList = [
- {id:1, text: '健康或良好'},
- {id:2, text: '一般或较弱'},
- {id:3, text: '有慢性病'},
- {id:4, text: '残疾'}
- ];
- var comCateTypePickerList = [
- {id:1, text: '选择项方式'},
- {id:2, text: '手工填写方式'},
- ];
- var comCateTypePickerList = [
- {id:1, text: '选择项方式'},
- {id:2, text: '手工填写方式'},
- ];
- var isPublicPickerList = [
- {id:1, text: '是'},
- {id:2, text: '否'},
- ];
- export default {
- components: {
- avatar
- },
- data() {
- return {
- userinfo: {},
-
- formavatar: false,
-
- forminfo: {
- isshow: "",
- infobox: "input",
- title: "",
- field: "",
- value: ""
- },
-
- jobintentiontypePickIndex: -1,
- jobintentiontypePickerList: [],
- jobintentiontypeValue: {
- id: false,
- title: false
- },
- workexperiencePickIndex: -1,
- workexperiencePickerList: [],
- workexperienceValue: {
- id: false,
- text: false
- },
- educationPickIndex: -1,
- educationPickerList: [],
- educationValue: {
- id: false,
- text: false
- },
- healthPickIndex: -1,
- healthPickerList: [],
- healthValue: {
- id: false,
- text: false
- },
- comCateTypeIndex: -1,
- comCateTypePickerList: [],
- comCateTypeValue: {
- id: false,
- text: false,
- },
- isPublicIndex: -1,
- isPublicPickerList: [],
- isPublicValue: {
- id: false,
- text: false,
- },
- empTimeOrigin: [],
- empTime: [],
- empTimeModal: false,
- communityOrigin: [],
- community: [],
- communityModal: false,
- comCateOrigin: [],
- comCate: [],
- comCateModal: false,
- }
- },
- onLoad: function(option) {
- _this = this;
- _this.userinfo = _this.checkLogin("/pages/my/myinfo");
- _this.getJobintentiontype();
- _this.getEmpTime();
- _this.getCommunity();
- _this.getComCate();
- _this.healthPickerList = healthPickerList;
- if(_this.userinfo.health >= 1) {
- _this.healthPickIndex = _this.userinfo.health - 1;
- _this.healthValue.text = _this.healthPickerList[_this.healthPickIndex].text;
- _this.healthValue.id = _this.healthPickerList[_this.healthPickIndex].id;
- }
- _this.educationPickerList = educationPickerList;
- if(_this.userinfo.education >= 1) {
- _this.educationPickIndex = _this.userinfo.education - 1;
- _this.educationValue.text = _this.educationPickerList[_this.educationPickIndex].text;
- _this.educationValue.id = _this.educationPickerList[_this.educationPickIndex].id;
- }
- _this.workexperiencePickerList = workexperiencePickerList;
- if(_this.userinfo.workexperience >= 1) {
- _this.workexperiencePickIndex = _this.userinfo.workexperience - 1;
- _this.workexperienceValue.text = _this.workexperiencePickerList[_this.workexperiencePickIndex].text;
- _this.workexperienceValue.id = _this.workexperiencePickerList[_this.workexperiencePickIndex].id;
- }
- _this.comCateTypePickerList = comCateTypePickerList;
- if(_this.userinfo.com_cate_type >= 1) {
- _this.comCateTypeIndex = _this.userinfo.com_cate_type - 1;
- _this.comCateTypeValue.text = _this.comCateTypePickerList[_this.comCateTypeIndex].text;
- _this.comCateTypeValue.id = _this.comCateTypePickerList[_this.comCateTypeIndex].id;
- }
- _this.isPublicPickerList = isPublicPickerList;
- if(_this.userinfo.is_public >= 1) {
- _this.isPublicIndex = _this.userinfo.is_public - 1;
- _this.isPublicValue.text = _this.isPublicPickerList[_this.isPublicIndex].text;
- _this.isPublicValue.id = _this.isPublicPickerList[_this.isPublicIndex].id;
- }
-
- //数组删除值
- Array.prototype.remove = function(val) {
- var index = this.indexOf(val);
- if (index > -1) {
- this.splice(index, 1);
- }
- };
- },
- methods: {
- onChooseAvatar: function(e) {
- _this.$req.ajaxFile({
- path: "attachment/tplfieldimage",
- title:'正在上传',
- filePath: e.detail.avatarUrl,
- fileName:'file',
- }).then((filedata) => {
- var data = JSON.parse(filedata.data);
- if (data.code == 1) {
- uni.showModal({
- title: '信息提示',
- content: data.msg,
- showCancel: false
- });
- }
- return false;
- _this.editFiled('avatar', data.data.src);
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- // 获取求职意向
- getJobintentiontype: function() {
- _this.$req.ajax({
- path: "my/jobintention_lst",
- data: {}
- }).then((data) => {
- _this.jobintentiontypePickerList = data.plist;
- if(_this.userinfo.jobintention > 0) {
- _this.jobintentiontypePickerList.forEach((item,index) => {
- if(item.id == _this.userinfo.jobintention) {
- _this.jobintentiontypePickIndex = index;
- _this.jobintentiontypeValue.title = _this.jobintentiontypePickerList[_this.jobintentiontypePickIndex].title;
- _this.jobintentiontypeValue.id = _this.jobintentiontypePickerList[_this.jobintentiontypePickIndex].id;
- }
- });
- }
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- // 获取用工时间
- getEmpTime: function() {
- _this.$req.ajax({
- path: "index/getRensheCode",
- data: {type:"emp_time"}
- }).then((data) => {
-
- _this.empTime = data;
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- // 获取镇街
- getCommunity: function() {
- _this.$req.ajax({
- path: "index/getRensheCode",
- data: {type:"community"}
- }).then((data) => {
- data.push({code:0,id:0,name:"不限"});
- _this.community = data;
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- // 获取岗位类型
- getComCate: function() {
- _this.$req.ajax({
- path: "index/getComCate",
- data: {}
- }).then((data) => {
- _this.comCate = data;
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- // 求职意向岗位修改
- jobintentiontypePickerChange: function(e) {
- _this.jobintentiontypePickIndex = e.detail.value;
- _this.jobintentiontypeValue.title = _this.jobintentiontypePickerList[_this.jobintentiontypePickIndex].title;
- _this.jobintentiontypeValue.id = _this.jobintentiontypePickerList[_this.jobintentiontypePickIndex].id;
- _this.editFiled( "jobintention", _this.jobintentiontypeValue.id );
- },
- // 工作经验修改
- workexperiencePickerChange: function(e) {
- _this.workexperiencePickIndex = e.detail.value;
- _this.workexperienceValue.text = _this.workexperiencePickerList[_this.workexperiencePickIndex].text;
- _this.workexperienceValue.id = _this.workexperiencePickerList[_this.workexperiencePickIndex].id;
- _this.editFiled( "workexperience", _this.workexperienceValue.id );
- },
- // 学历修改
- educationPickerChange: function(e) {
- _this.educationPickIndex = e.detail.value;
- _this.educationValue.text = _this.educationPickerList[_this.educationPickIndex].text;
- _this.educationValue.id = _this.educationPickerList[_this.educationPickIndex].id;
- _this.editFiled( "education", _this.educationValue.id );
- },
- // 健康状况修改
- healthPickerChange: function(e) {
- _this.healthPickIndex = e.detail.value;
- _this.healthValue.text = _this.healthPickerList[_this.healthPickIndex].text;
- _this.healthValue.id = _this.healthPickerList[_this.healthPickIndex].id;
- _this.editFiled( "health", _this.healthValue.id );
- },
- // 岗位类型设置
- comCateTypePickerChange: function(e) {
- _this.comCateTypeIndex = e.detail.value;
- _this.comCateTypeValue.text = _this.comCateTypePickerList[_this.comCateTypeIndex].text;
- _this.comCateTypeValue.id = _this.comCateTypePickerList[_this.comCateTypeIndex].id;
- _this.editFiled( "com_cate_type", _this.comCateTypeValue.id );
- },
- //公开电话
- isPublicPickerChange: function(e) {
- _this.isPublicIndex = e.detail.value;
- _this.isPublicValue.text = _this.isPublicPickerList[_this.isPublicIndex].text;
- _this.isPublicValue.id = _this.isPublicPickerList[_this.isPublicIndex].id;
- _this.editFiled( "is_public", _this.isPublicValue.id );
- },
- // 填写字段
- hideModal: function() {
- _this.forminfo = {
- isshow: "",
- title: "",
- field: "",
- value: ""
- };
- _this.formavatar = "";
- },
- showModal: function(e) {
- _this.forminfo.title = e.currentTarget.dataset.title;
- _this.forminfo.infobox = e.currentTarget.dataset.infobox;
- _this.forminfo.field = e.currentTarget.dataset.field;
- _this.forminfo.value = e.currentTarget.dataset.value;
- _this.forminfo.isshow = "show";
- },
- showModalNickname: function(e) {
- _this.forminfo.title = e.currentTarget.dataset.title;
- _this.forminfo.infobox = e.currentTarget.dataset.infobox;
- _this.forminfo.field = e.currentTarget.dataset.field;
- _this.forminfo.value = e.currentTarget.dataset.value;
- _this.formavatar = 'show';
- },
- bindInput: function(e) {
- _this.forminfo.value = e.detail.value;
- },
- subModal: function() {
- _this.editFiled( _this.forminfo.field, _this.forminfo.value );
- },
-
- // 修改头像
- setAvatar: function(rsp) {
- _this.$req.ajaxFile({
- path: "attachment/tplfieldimage",
- title:'正在上传',
- filePath: rsp.path,
- fileName:'file',
- }).then((filedata) => {
- var data = JSON.parse(filedata.data);
- _this.editFiled('avatar', data.data.src);
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- //返回招聘详情
- goCDetail: function() {
- _this.checkLogin("/pages/my/my");
- if (_this.userinfo===false){
- return false;
- }
- if(_this.userinfo.address==""){
- uni.showToast({
- title: '请完善您的现居住地',
- icon:'none',
- duration: 2000
- });
- return false;
- }
- if(_this.userinfo.jobintention==""){
- uni.showToast({
- title: '请选择您的求职意向',
- icon:'none',
- duration: 2000
- });
- return false;
- }
- if(_this.userinfo.workexperience==""){
- uni.showToast({
- title: '请选择您的工作经验',
- icon:'none',
- duration: 2000
- });
- return false;
- }
- if(_this.userinfo.education==""){
- uni.showToast({
- title: '请选择您的学历',
- icon:'none',
- duration: 2000
- });
- return false;
- }
- _this.$req.ajax({
- path: "my/perfectUserInfo",
- data: {
- userid: _this.userinfo.id,
- skill_cert: _this.userinfo.skill_cert ? _this.userinfo.skill_cert.join(",") : _this.userinfo.skill_cert,
- }
- })
- uni.showToast({
- title: '修改成功',
- icon:'none',
- duration: 2000
- });
- setTimeout(function () {
- uni.navigateBack();
- }, 1500);
- },
- //跳转
- goLPage: function(pageurl) {
- _this.userinfo = _this.checkLogin("/pages/my/my");
- if (_this.userinfo===false){
- return false;
- }
- uni.navigateTo({
- url: pageurl,
- fail: function(){
- uni.switchTab({
- url: pageurl
- });
- }
- });
- },
- // 更新用户字段
- editFiled: function (field, value) {
- _this.$req.ajax({
- path: "my/edituserinfo",
- data: {
- userid: _this.userinfo.id,
- field: field,
- value: value
- }
- }).then((data) => {
- _this.userinfo = data;
- uni.setStorageSync('userinfo', data);
- _this.hideModal();
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- },
- selectEmpTime: function (name, option) {
- if (option == 'add') {
- _this.userinfo.emp_time.push(name);
- } else if (option == 'del') {
- _this.userinfo.emp_time.remove(name);
- }
- },
- selectCommunity: function (name, option) {
- if (option == 'add') {
- _this.userinfo.work_place.push(name);
- } else if (option == 'del') {
- _this.userinfo.work_place.remove(name);
- }
- },
- toggleFilter: function (value) {
- if (value) {
- _this.empTimeOrigin = [..._this.userinfo.emp_time];
- } else {
- _this.userinfo.emp_time = [..._this.empTimeOrigin];
- }
- _this.empTimeModal = value;
- },
- selectComCate: function (name, option) {
- if (option == 'add') {
- _this.userinfo.com_cate.push(name);
- } else if (option == 'del') {
- _this.userinfo.com_cate.remove(name);
- }
- },
- toggleComCate: function (value) {
- if (value) {
- _this.comCateOrigin = [..._this.userinfo.com_cate];
- } else {
- _this.userinfo.com_cate = [..._this.comCateOrigin];
- }
- _this.comCateModal = value;
- },
- toggleCommunity: function (value) {
- if (value) {
- _this.communityOrigin = [..._this.userinfo.work_place];
- } else {
- _this.userinfo.work_place = [..._this.communityOrigin];
- }
- _this.communityModal = value;
- },
- subFilter: function () {
- _this.editFiled( 'emp_time',_this.userinfo.emp_time );
- _this.empTimeModal = false;
- },
- subCommunity: function () {
- _this.editFiled( 'work_place',_this.userinfo.work_place );
- _this.communityModal = false;
- },
- subComCate: function () {
- _this.editFiled( 'com_cate',_this.userinfo.com_cate );
- _this.comCateModal = false;
- },
- // 图片上传
- chooseImage: function(e) {
- uni.chooseImage({
- count: 12,
- sizeType: ['original', 'compressed'],
- sourceType: ['album'],
- success: (res) => {
- _this.$req.ajaxFile({
- path: "attachment/tplfieldimage",
- title: '正在上传',
- filePath: res.tempFilePaths[0],
- fileName: 'file',
- }).then((filedata) => {
- var data = JSON.parse(filedata.data);
- _this.userinfo.skill_cert.push(data.data.src);
- }).catch((err) => {
- uni.showModal({
- title: '信息提示',
- content: err,
- showCancel: false
- });
- });
- }
- });
- },
- viewImage: function(e) {
- uni.previewImage({
- urls: _this.userinfo.skill_cert,
- current: e.currentTarget.dataset.url
- });
- },
- delImg: function(e) {
- _this.userinfo.skill_cert.splice(e.currentTarget.dataset.index, 1);
- },
- }
- }
- </script>
- <style>
- .filteremp{ width: 750rpx; position: fixed;top: 0; z-index: 999; height: 100vh; background-color:#000;background: rgba(0, 0, 0, 0.5); }
- .filteremp .emp-box{ width: 750rpx; position: absolute;bottom: 0;}
- </style>
|