162 lines
4.2 KiB
JavaScript
162 lines
4.2 KiB
JavaScript
// jobInterview/pages/interviewNotice/interviewNotic.js
|
|
import {
|
|
myhttp
|
|
} from "../../../utils/service";
|
|
const url = require('../../../utils/url');
|
|
Page({
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
searchContent: "",
|
|
scrollTop: undefined,
|
|
interviewCompanyList:[{
|
|
interviewCompanyId: "123",
|
|
companyName: "小米",
|
|
interviewTime: "2023-9-26",
|
|
companyLogoUrl: "http://117.88.94.226:5380/upload/picture/E0DC5383-D4F8-4398-96FD-2BAA73EDA253.png",
|
|
job: "Java后端工程师",
|
|
result:3
|
|
},
|
|
]
|
|
},
|
|
switchToResDetail(e){
|
|
wx.navigateTo({
|
|
url: '/jobInterview/pages/AIresult/AIresult?index='+e.currentTarget.dataset.index
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
onLoad(options) {
|
|
// this.getInterviewRecord()
|
|
|
|
},
|
|
getInterviewRecord(){
|
|
myhttp({
|
|
url: url.backUrl + "/vx_interview/getInterviewRecord?userId="+wx.getStorageSync("userInfo").id,
|
|
data: {},
|
|
method: "GET"
|
|
}).then((res) => {
|
|
console.log(res)
|
|
|
|
if (res.code == 0) {
|
|
var respond = res.data.map(item =>({
|
|
interviewCompanyId:item.companyEncoding,
|
|
companyName:item.companyName,
|
|
interviewTime:item.interviewTime,
|
|
companyLogoUrl:JSON.parse(item.companyLogoUrl)[0].url,
|
|
job:item.job,
|
|
result:item.status,
|
|
noticeId:item.noticeId
|
|
}))
|
|
this.setData({
|
|
interviewCompanyList:respond
|
|
})
|
|
} else {
|
|
wx.showToast({
|
|
title: '记录获取失败',
|
|
icon: "error"
|
|
})
|
|
}
|
|
})
|
|
},
|
|
/*监听搜索输入框的值*/
|
|
onChange(event) {
|
|
this.setData({
|
|
searchContent: event.detail
|
|
})
|
|
},
|
|
onSearch() {
|
|
var that = this;
|
|
//延时执行,防止获取输入框值不对应
|
|
setTimeout(function () {
|
|
/*发送网络请求*/
|
|
console.log(that.data.searchContent)
|
|
myhttp({
|
|
url: url.backUrl + "/vx_interview/searchInterviewRecord?searchCompany="+that.data.searchContent+"&userId="+wx.getStorageSync("userInfo").id,
|
|
data: {},
|
|
method: "GET"
|
|
}).then((res) => {
|
|
console.log(res)
|
|
if (res.code == 0) {
|
|
var respond = res.data.map(item =>({
|
|
interviewCompanyId:item.companyEncoding,
|
|
companyName:item.companyName,
|
|
interviewTime:item.interviewTime,
|
|
companyLogoUrl:JSON.parse(item.companyLogoUrl)[0].url,
|
|
job:item.job,
|
|
result:item.status,
|
|
noticeId:item.noticeId
|
|
}))
|
|
that.setData({
|
|
interviewCompanyList:respond
|
|
})
|
|
wx.showToast({
|
|
title: '搜索记录成功',
|
|
icon: "success"
|
|
})
|
|
} else {
|
|
wx.showToast({
|
|
title: '搜索记录失败',
|
|
icon: "error"
|
|
})
|
|
}
|
|
})
|
|
}, 1000)
|
|
},
|
|
/**
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
*/
|
|
onReady() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面显示
|
|
*/
|
|
onShow() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面隐藏
|
|
*/
|
|
onHide() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 生命周期函数--监听页面卸载
|
|
*/
|
|
onUnload() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
*/
|
|
onPullDownRefresh() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 页面上拉触底事件的处理函数
|
|
*/
|
|
onReachBottom() {
|
|
|
|
},
|
|
|
|
/**
|
|
* 用户点击右上角分享
|
|
*/
|
|
onShareAppMessage() {
|
|
|
|
},
|
|
onPageScroll(res) {
|
|
this.setData({
|
|
scrollTop: res.scrollTop
|
|
})
|
|
}
|
|
}) |