diff --git a/app.json b/app.json index 8e8b4f0..83c28f4 100644 --- a/app.json +++ b/app.json @@ -100,7 +100,8 @@ "userProtocol/userProtocol", "exchangeCard/exchangeCard", "exchange/exchange", - "complaint/complaint" + "complaint/complaint", + "resume/resume" ] } ], diff --git a/config/config.js b/config/config.js index a9f0c1f..5a23fdb 100755 --- a/config/config.js +++ b/config/config.js @@ -435,6 +435,9 @@ var config = { dynamicId: "/couponOrder/dynamicId", // 获取卡详情 getCardDetail: "/couponPassword/getCardDetail", + resumeAdd: "/resume/add", + resumeDetail: "/resume/myResume", + resumeFileUpload: "/upload/awsFileUpload", }, weapp: { AppId: weappId diff --git a/ext.json b/ext.json index cae2f04..34dfe10 100644 --- a/ext.json +++ b/ext.json @@ -2,45 +2,35 @@ "ext": { "attr": { "car": { - "tjd": { - "payPath": "", - "tjdAppId": "wx6945d1bda68d7993" - }, "etcp": { - "payPath": "pages/pay/order-pay-open/main", - "etcpAppId": "wxc07f9d67923d676d", - "etcpCallbackUrl": "https://admin.malls.iformall.com/api/carCallback/etcpPaidCallback" - }, - "bolink": { - "payPath": "pages/park/park", - "bolinkAppId": "wxbd08b4baa10fcc1d" - }, - "version": "release" + "etcpAppId": "wx192b7d2e8dcbefd0", + "etcpVersion": "release", + "etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" + } }, - "mchId": "1698320008", + "mchId": "1604439800", "imgProxy": [ { - "newUrl": "https://c.malls.iformall.com/img", + "newUrl": "https://ctest.malls.iformall.com/img", "orgUrl": "https://iformall-net.formall.oss-accelerate.aliyuncs.com" }, { - "newUrl": "https://c.malls.iformall.com/img1", + "newUrl": "https://ctest.malls.iformall.com/img1", "orgUrl": "https://formall.oss-accelerate.aliyuncs.com" }, { - "newUrl": "https://c.malls.iformall.com/img2", + "newUrl": "https://ctest.malls.iformall.com/img2", "orgUrl": "https://wx.qlogo.cn" } ], - "mchIdOld": "1698320008", - "configUrl": "https://c.malls.iformall.com/C/api", - "ifStoreApp": "0", + "configUrl": "https://ctest.malls.iformall.com/C/api", + "businessSwitch": "1", "ifHaveWebSocket": "0", "ifHaveCarModular": "1" }, - "name": "株洲东都国际广场", - "weappId": "wxdcaa5b92ea7de725", - "appVersion": "C.5.1.1" + "name": "金泸商务", + "weappId": "wx649b3be73c1afe47", + "appVersion": "C.test.5.2.0" }, "debug": false, "tabBar": { @@ -76,7 +66,8 @@ "selectedIconPath": "assets/images/user-a.png" } ], - "custom": true + "color": "#abb1be", + "selectedColor": "#b2743d" }, "window": { "backgroundTextStyle": "dark", @@ -84,7 +75,17 @@ "navigationBarTitleText": "", "navigationBarBackgroundColor": "#FFFFFF" }, - "extAppid": "wxdcaa5b92ea7de725", + "plugins": { + "auto-points-plugin": { + "version": "1.3.0", + "provider": "wxfab2bf944bfc4da6" + }, + "live-player-plugin": { + "version": "1.3.4", + "provider": "wx2b03c6e691cd7370" + } + }, + "extAppid": "wx649b3be73c1afe47", "extEnable": true, "permission": { "scope.userLocation": { @@ -96,5 +97,8 @@ "request": 30000, "downloadFile": 10000 }, - "privacy_api_not_use": true + "requiredPrivateInfos": [ + "chooseLocation", + "getLocation" + ] } \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index d6b5349..d33c654 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -77,7 +77,7 @@ Page({ options.id = this.data.newArr[2]; } else if (options.type == 'ts') { options.id = this.data.newArr[2]; - } else if (options.type == 'ts') { + } else if (options.type == 'rm') { options.id = this.data.newArr[2]; } } @@ -87,10 +87,8 @@ Page({ wx.setStorageSync('imgurl', imgurl); if (app.globalData.token) { - - this.updateUserInfo(); - if (options.couponChannelId || options.orderId || options.id) { + if (options.couponChannelId || options.orderId || options.id || options.type === "rm") { that.userStatus(options); } else { that.userStatus(); @@ -100,7 +98,7 @@ Page({ // 所以此处加入 callback 以防止这种情况 app.tokenCallback = token => { this.updateUserInfo(); - if (options.couponChannelId || options.orderId || options.id) { + if (options.couponChannelId || options.orderId || options.id || options.type === "rm") { that.userStatus(options); } else { that.userStatus(); @@ -113,9 +111,9 @@ Page({ * 检查用户的状态 */ userStatus: function (options) { - + console.log(options, 'options'); var that = this; - if (options && (options.couponChannelId || options.orderId || options.id)) { + if (options && (options.couponChannelId || options.orderId || options.id || options.type === "rm")) { that.checkuserstatus(options); } else { that.checkuserstatus(); @@ -388,6 +386,10 @@ Page({ wx.redirectTo({ url: `/pages/index/searchbar/detail/index?id=${options.id}` }); + } else if (options && app.globalData.type == 'rm') { + wx.navigateTo({ + url: '/pages3/resume/resume', + }) } else { // 主页 wx.switchTab({ @@ -560,6 +562,10 @@ Page({ wx.switchTab({ url: '/index/searchbar' }) + } else if (options && app.globalData.type == 'rm') { + wx.navigateTo({ + url: '/pages3/resume/resume', + }) } else { wx.switchTab({ url: app.globalData.goHomeUrl, diff --git a/pages3/resume/resume.js b/pages3/resume/resume.js new file mode 100644 index 0000000..da8b4f7 --- /dev/null +++ b/pages3/resume/resume.js @@ -0,0 +1,292 @@ +let app = getApp(); +const Http = require("../../utils/HttpBasics"); +const util = require("../../utils/util.js"); +const config = require("../../config/config"); + +Page({ + /** + * 页面的初始数据 + */ + data: { + userName: '', + content: '', + phone: '', + date: '2000-01-01', + dateEnd: '', + dateFlag: 1, + gender: '', + sexArry: ['男', '女'], + sexFlag: 1, + fileName: '', + filePath: '', + currentID: '' + }, + + bindDateChange(e) { + this.setData({ + date: e.detail.value, + dateFlag: 2 + }) + }, + + bindGenderChange(e) { + this.setData({ + gender: e.detail.value, + sexFlag: 2 + }) + }, + + showPhoneMsg() { + wx.showToast({ + title: '手机号无法更改', + icon: "error" + }) + }, + + uploadFile() { + wx.chooseMessageFile({ + count: 1, // 选择一个文件 + type: 'file', // 文件类型,可以是 image、video、file + success: (res) => { + console.log(res, 'res'); + wx.showLoading({ + title: '上传中', + }) + const fileName = res.tempFiles[0].name; + const tempFilePath = res.tempFiles[0].path; + this.goUpload(fileName, tempFilePath); + }, + }); + }, + + goUpload(fileName, filePath) { + const that = this + wx.uploadFile({ + url: config.url + config.api.resumeFileUpload, + filePath, + name: 'file', + header: { + 'token': app.globalData.token + }, + success: (res) => { + const response = JSON.parse(res.data) + console.log(response, 'response') + + wx.hideLoading() + wx.showToast({ + title: '上传成功', + icon: 'success' + }); + that.setData({ + fileName, + filePath: response.data.url + }) + }, + fail: (err) => { + wx.hideLoading() + wx.showToast({ + title: '上传失败', + icon: 'error' + }); + console.error(err); + }, + }); + }, + + cancelUpload() { + wx.showModal({ + title: '提示', + content: '删除文件后需要重新上传', + success(res) { + if (res.confirm) { + this.setData({ + fileName: "", + filePath: "" + }) + } else if (res.cancel) { + } + } + }) + + }, + + formSubmit(e) { + const that = this + const data = { + userName: e.detail.value.userName, + sex: 1 * that.data.gender + 1, + birthDay: that.data.date + " 00:00:00", + content: e.detail.value.content, + } + console.log(data, 'data'); + + if (!data.userName) { + wx.showToast({ + title: '请输入真实姓名', + icon: 'error', + duration: 2000 + }) + return + } + + if (data.sex == 0) { + wx.showToast({ + title: '请选择性别', + icon: 'error', + duration: 2000 + }) + return + } + + if (!data.content) { + wx.showToast({ + title: '请输入求职内容', + icon: 'error', + duration: 2000 + }) + return + } + + if (that.data.fileName) data.fileName = that.data.fileName + if (that.data.filePath) data.filePath = that.data.filePath + if (that.data.currentID) data.id = that.data.currentID + + Http.post({ + url: config.api.resumeAdd, + data, + }).then(res => { + if (res.code == 200) { + wx.showToast({ + title: "提交成功!", + icon: 'success', + duration: 1500, + }) + } else { + wx.showToast({ + title: "提交出错!", + icon: 'error', + duration: 1500, + }) + } + }).catch(err => { + console.log(err); + }) + }, + + getUserPhone() { + const that = this + Http.get({ + url: config.api.getScore, + data: {} + }).then(res => { + console.log(res.data); + if (res.data.phone) { + that.setData({ + phone: res.data.phone + }) + } + }) + .catch(err => { + wx.showModal({ + title: '提示', + content: err.errMsg, + showCancel: false + }) + }) + }, + + getResumeDetail() { + const that = this + Http.get({ + url: config.api.resumeDetail, + }).then(res => { + const data = res.data + that.setData({ + userName: data.userName, + sexFlag: 2, + gender: data.sex - 1, + dateFlag: 2, + date: data.birthDayStr, + content: data.content, + }) + + if (data.id) { + that.setData({ + currentID: data.id + }) + } + + if (data.fileName) { + that.setData({ + fileName: data.fileName + }) + } + + if (data.filePath) { + that.setData({ + filePath: data.filePath + }) + } + + }).catch(err => { + + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.getUserPhone() + this.getResumeDetail() + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + // onShareAppMessage() { + + // }, +}) \ No newline at end of file diff --git a/pages3/resume/resume.json b/pages3/resume/resume.json new file mode 100644 index 0000000..685ef2c --- /dev/null +++ b/pages3/resume/resume.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "求职简历", + "enablePullDownRefresh": true, + "navigationBarBackgroundColor": "#F4F5F9", + "navigationBarTextStyle": "black", + "usingComponents": { + "navbar": "../../components/navbar/navbar" + } +} \ No newline at end of file diff --git a/pages3/resume/resume.wxml b/pages3/resume/resume.wxml new file mode 100644 index 0000000..c3536c9 --- /dev/null +++ b/pages3/resume/resume.wxml @@ -0,0 +1,70 @@ + + + +
+ + 姓名* + + + + + + + 手机号 + + + + + + + 性别* + + + + 请选择性别 + + + {{sexArry[gender]}} + + + + + + + + 出生年月* + + + + {{date}} + + + + + + + 求职内容* + +