123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266 |
- // pages/mine/myinfo/myinfo.js
- const app = getApp();
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- uid:"",
- mainInfo:{
- sname: "",
- age: "",
- eduStatus: 1,
- place: "暂无",
- phoneNumber: "暂无"
- },
- percentage:"0",
- // oClass:"item",
- otherInfoList:[
- {
- oClass: 'item',
- itemTittle:'教育经历',
- experienceList:[
- {
- startTime: '2012-09',
- endTime: '2016-06',
- shcool:'北京大学 |',
- degree:' 本科',
- thirdTittle:'主修专业:',
- project:'软件工程',
- fourthTittle:'在校经历:',
- schoolsExperience:'暂无'
- },
- {
- startTime: '2016-09',
- endTime: '2019-06',
- shcool: '清华大学 |',
- degree: ' 硕士',
- thirdTittle: '主修专业:',
- project: '软件工程',
- fourthTittle: '在校经历:',
- schoolsExperience: '我在学校表现良好,绩点全班排名前三好唔好前端其后期的以定期维护轻微电话轻微电话青海湖去耦合器好多钱情况文化的切换我的前后端我确定好群殴我等会群殴我好多去哦好的去哦好的群殴电话启动启动群殴电话群殴我好多气得我轻微电话群殴电话去'
- }
- ]
- },
- {
- oClass: 'item',
- itemTittle: '工作经历',
- experienceList: [
- {
- startTime: '2012-09',
- endTime: '2016-06',
- company:'字节跳动',
- thirdTittle: '主要工作内容:',
- content:'打杂'
- }
- ]
- },
- {
- oClass: 'none',
- itemTittle: '工作期望',
- },
- {
- oClass: 'none',
- itemTittle: '自我评价',
- }
- ]
- },
- // 点击预览
- preview(e){
- wx.navigateTo({
- url: '../../pre-info/pre-info',
- })
- },
- // 点击修改该项记录
- modify(e) {
- switch (e.currentTarget.dataset.index) {
- case 0:
- wx.navigateTo({
- url: '../../edit-info/info-edu/info-edu?getid=' + e.currentTarget.dataset.id,
- })
- break;
- case 1:
- wx.navigateTo({
- url: '../../edit-info/info-work/info-work?getid=' + e.currentTarget.dataset.id,
- })
- break;
- }
- // wx.showToast({
- // icon:"none",
- // title: '跳转到修改该项信息页面',
- // })
- },
- // 点击编辑
- base(e) {
- wx.navigateTo({
- url: '../../edit-info/info-base/info-base',
- })
- },
- // 该项没有记录时 点击 +添加....
- none(e) {
- switch (e.currentTarget.dataset.index) {
- case 0:
- wx.navigateTo({
- url: '../../edit-info/info-edu/info-edu',
- })
- break;
- case 1:
- wx.navigateTo({
- url: '../../edit-info/info-work/info-work',
- })
- break;
- case 2:
- wx.navigateTo({
- url: '../../edit-info/info-hope/info-hope',
- })
- break;
- case 3:
- wx.navigateTo({
- url: '../../edit-info/info-self/info-self',
- })
- break;
- }
- },
- // 该项记录原有时 点击 +添加
- have(e) {
- switch (e.currentTarget.dataset.index) {
- case 0:
- wx.navigateTo({
- url: '../../edit-info/info-edu/info-edu',
- })
- break;
- case 1:
- wx.navigateTo({
- url: '../../edit-info/info-work/info-work',
- })
- break;
- case 2:
- wx.navigateTo({
- url: '../../edit-info/info-hope/info-hope?id=' + e.currentTarget.dataset.index,
- })
- break;
- case 3:
- wx.navigateTo({
- url: '../../edit-info/info-self/info-self?id=' + e.currentTarget.dataset.index,
- })
- break;
- }
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
-
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
- var _this = this
- try {
- var value = wx.getStorageSync('uid')
- if (value) {
- this.setData({
- uid: value
- });
- }
- } catch (e) {
- console.log(e)
- }
- // 获取主要信息
- wx.request({
- url: app.globalData.baseURL + '/user/',
- method: 'GET',
- data: {
- "id": _this.data.uid
- },
- success(res) {
- console.log(res.data)
- var data = _this.data.mainInfo
- if(res.data.data){
- _this.setData({
- mainInfo: res.data.data,
- });
- }else{
- _this.setData({
- mainInfo: data,
- });
- }
-
- console.log(res)
- }
- })
- // 获取简历百分比
- wx.request({
- url: app.globalData.baseURL + '/resume/percentage',
- method: 'GET',
- data: {
- "uid": _this.data.uid
- },
- success(res) {
- console.log(res.data.percentage)
- _this.setData({
- percentage: res.data.percentage
- });
- }
- })
- // 获取其他简历信息
- wx.request({
- url: app.globalData.baseURL + '/resume/others',
- method: 'GET',
- data: {
- "id": _this.data.uid
- },
- success(res) {
- _this.setData({
- otherInfoList: res.data,
- });
- console.log(res.data)
- }
- })
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
- }
- })
|