diff --git a/app.js b/app.js index a97f3c1..4f30300 100644 --- a/app.js +++ b/app.js @@ -1,8 +1,8 @@ App({ globalData: { userInfo: null, - ip: 'https://test.renminshitang.com.cn/daotian/api_dev', - // ip: "https://daotian.matripe.com.cn", + // ip: 'https://test.renminshitang.com.cn/daotian/api_dev', + ip: "https://daotian.matripe.com.cn", // ip: 'http://localhost:8001', sessionId: "", header: { diff --git a/assets/images/back.png b/assets/images/back.png deleted file mode 100644 index c4624b9..0000000 Binary files a/assets/images/back.png and /dev/null differ diff --git a/assets/images/idCard.png b/assets/images/idCard.png deleted file mode 100644 index 90df220..0000000 Binary files a/assets/images/idCard.png and /dev/null differ diff --git a/assets/images/logoColumn.svg b/assets/images/logoColumn.svg deleted file mode 100644 index 2bd8640..0000000 --- a/assets/images/logoColumn.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/images/logoColumn1.svg b/assets/images/logoColumn1.svg deleted file mode 100644 index d8e28f6..0000000 --- a/assets/images/logoColumn1.svg +++ /dev/null @@ -1,59 +0,0 @@ - - \ No newline at end of file diff --git a/assets/images/miniphone.png b/assets/images/miniphone.png deleted file mode 100644 index 6c3b1e0..0000000 Binary files a/assets/images/miniphone.png and /dev/null differ diff --git a/assets/images/phone.png b/assets/images/phone.png deleted file mode 100644 index f54d8de..0000000 Binary files a/assets/images/phone.png and /dev/null differ diff --git a/assets/images/qrcode.png b/assets/images/qrcode.png deleted file mode 100644 index 19587c6..0000000 Binary files a/assets/images/qrcode.png and /dev/null differ diff --git a/assets/images/quicklyRecord.png b/assets/images/quicklyRecord.png deleted file mode 100644 index 7bd4c63..0000000 Binary files a/assets/images/quicklyRecord.png and /dev/null differ diff --git a/components/bottom-drawer/index.js b/components/bottom-drawer/index.js index c36b811..c558286 100644 --- a/components/bottom-drawer/index.js +++ b/components/bottom-drawer/index.js @@ -7,7 +7,8 @@ Component({ disabled: false, idCardImageUrl: "", idCardNum: "", - tel:'', + tel: '', + userName: '', dateTime: "", currentTime: dateUtil.formatDateYMD(mydate.toLocaleDateString()), copyTime: dateUtil.formatDateYMD(mydate.toLocaleDateString()), @@ -96,16 +97,31 @@ Component({ }, ready () { let that = this; - console.log('this.data.info',this.data.info); + console.log('this.data.info', this.data.info); + console.log('app.globalData.loginUserInfo', app.globalData.loginUserInfo); for (let i = 16; i < 70; i++) { that.data.ageArray.push(i); } this.setData({ ageArray: that.data.ageArray, info: that.data.info, - tel:app.globalData.loginUserInfo.tel - }) + }) + // 监听弹窗的显示与隐藏 + Object.defineProperty(that.data, "show", { + enumerable: true, + configurable: true, + set (val) { + console.log(val); //打印设置好的值 + if (val) { + that.setData({ + tel: app.globalData.loginUserInfo.tel, + userName: app.globalData.loginUserInfo.user.realName, + idCardNum: app.globalData.loginUserInfo.user.idcard + }) + } + }, + }); let hour = new Date().getHours(); if (hour < 20 && hour >= 6) { if (that.data.currentTime == that.data.copyTime) { @@ -206,35 +222,35 @@ Component({ }); return; } - if (that.data.info.agencyOperation == 2) { - if (that.data.ageIndex == -1) { - wx.showToast({ - icon: "none", - title: "请选择年龄", - }); - return; - } - e.detail.value.age = parseInt(that.data.ageIndex) + 16; - e.detail.value.sex = that.data.sex; - } else { - if (e.detail.value.idCard == "") { - wx.showToast({ - icon: "none", - title: "请输入身份证号", - }); - return; - } - var regIdCard = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; - if (regIdCard.test(e.detail.value.idCard) == false) { - wx.showToast({ - icon: "none", - title: "请输入正确的身份证号", - }); - return; - } - - e.detail.value.interviewTimeStr = that.data.currentTime; + // if (that.data.info.agencyOperation == 2) { + if (that.data.ageIndex == -1) { + wx.showToast({ + icon: "none", + title: "请选择年龄", + }); + return; } + e.detail.value.age = parseInt(that.data.ageIndex) + 16; + e.detail.value.sex = that.data.sex; + // } else { + if (e.detail.value.idCard == "") { + wx.showToast({ + icon: "none", + title: "请输入身份证号", + }); + return; + } + var regIdCard = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; + if (regIdCard.test(e.detail.value.idCard) == false) { + wx.showToast({ + icon: "none", + title: "请输入正确的身份证号", + }); + return; + } + + e.detail.value.interviewTimeStr = that.data.currentTime; + // } if (that.data.idCardImageUrl != "") { e.detail.value.idCardImageUrl = that.data.idCardImageUrl } diff --git a/components/bottom-drawer/index.wxml b/components/bottom-drawer/index.wxml index c43eceb..4edfbdc 100644 --- a/components/bottom-drawer/index.wxml +++ b/components/bottom-drawer/index.wxml @@ -1,130 +1,129 @@
diff --git a/pages/index/index.js b/pages/index/index.js index 001a691..80498af 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -1785,6 +1785,7 @@ Page({ that.data.storeJobListSearchForm.cityName = ""; } that.data.storeJobListSearchForm.keys = that.data.inputVal == "搜索职位" ? "" : that.data.inputVal; + that.data.storeJobListSearchForm.recruitment = 1 // debugger; wx.showLoading({ title: "加载中...", diff --git a/pages/jobListSearch/index.js b/pages/jobListSearch/index.js index a429c8d..ea681e3 100644 --- a/pages/jobListSearch/index.js +++ b/pages/jobListSearch/index.js @@ -1056,7 +1056,7 @@ Page({ console.log("searchCityParamStorage======", searchCityParamStorage); that.data.storeJobListSearchForm.cityName = searchCityParamStorage.name; if (app.isEmptyCheck(searchCityParamStorage.name)) { - that.data.storeJobListSearchForm.cityName = "全国"; + that.data.storeJobListSearchForm.cityName = ""; } that.setData({ @@ -1360,7 +1360,7 @@ Page({ console.log(that.data.searchCityParamStorage); that.data.storeJobListSearchForm.cityName = that.data.searchCityParamStorage.name; if (app.isEmptyCheck(that.data.searchCityParamStorage.name)) { - that.data.storeJobListSearchForm.cityName = "全国"; + that.data.storeJobListSearchForm.cityName = ""; } that.data.storeJobListSearchForm.keys = that.data.inputVal == "" ? "" : that.data.inputVal; // debugger; diff --git a/pages/mine/addUserCard/index.js b/pages/mine/addUserCard/index.js index 94a664c..6755054 100644 --- a/pages/mine/addUserCard/index.js +++ b/pages/mine/addUserCard/index.js @@ -24,6 +24,7 @@ Page({ //登录=================================start // debugger if (app.globalData.isLogin) { + console.log('app.globalData.user',app.globalData.user); this.setData({ isLogin: app.globalData.isLogin, user: app.globalData.user, diff --git a/pages/mine/changePsw/index.js b/pages/mine/changePsw/index.js index 5c9285b..6326f08 100644 --- a/pages/mine/changePsw/index.js +++ b/pages/mine/changePsw/index.js @@ -1,312 +1,325 @@ // pages/changePsw/index.js const app = getApp(); +// import { customRequest } from '../../utils/request.js'; Page({ - /** - * 页面的初始数据 - */ - data: { - type: 1, - disabled: 0, - getmsg: "获取验证码", - btnColor: false, - tel: "", - }, + /** + * 页面的初始数据 + */ + data: { + type: 1, + disabled: 1, + getmsg: "获取验证码", + btnColor: true, + tel: "", + }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { - if (options.type) { - this.setData({ - type: options.type, - }); - if (options.type == 1) { - wx.setNavigationBarTitle({ - title: "找回密码", - }); - } else { - wx.setNavigationBarTitle({ - title: "修改登录密码", - }); - } - } - }, - changeBtn: function (e) { - console.log(e); - if (this.verifyTel(e.detail.value)) { - this.setData({ - disabled: "1", - btnColor: true, - tel: e.detail.value, - }); - } else { - this.setData({ - btnColor: false, - disabled: 0, - }); - } - }, - /** - * 手机号合规校验 - * - * - */ - verifyTel(value) { - console.log(value); - var myreg = /^[1][3456789][0-9]{9}$/; - if (myreg.test(value)) { - return true; - } else { - return false; - } - }, - /** - * 密码重复校验 - * - * - */ - verify(newStr, oldStr) { - if (newStr != oldStr) { - return false; - } else { - return true; - } - }, - /** - * 表单信息提交校验 - * - * - */ - beforeFormSubmit(e) { - console.log(e); - wx.showLoading({ - title: "提交中", - mask: true, - success: (result) => {}, - }); - let that = this; - let value = e.detail.value; - if (e.currentTarget.dataset.type == 1) { - if (value.tel == "" || !this.verifyTel(value.tel)) { - app.hideLoad(); - app.showTips(that, "请输入正确手机号"); - return; - } - if (value.code == "") { - app.hideLoad(); - app.showTips(that, "验证码不能为空"); - return; - } - if (value.newPsw.trim() == "" || value.rePsw.trim() == "") { - app.hideLoad(); - value.newPsw.trim() == "" ? app.showTips(that, "请输入新密码") : app.showTips(that, "请再次输入密码"); - return; - } - if (!this.verify(value.newPsw.trim(), value.rePsw.trim())) { - app.hideLoad(); - app.showTips(that, "前后密码不一致"); - return; - } - app.hideLoad(); - this.formSubmit(value, 1); - } else { + /** + * 生命周期函数--监听页面加载 + */ + onLoad (options) { + if (options.type) { + console.log('app.globalData.loginUserInfo', app.globalData.loginUserInfo); + this.setData({ + type: options.type, + tel: app.globalData.loginUserInfo.tel, + }); + if (options.type == 1) { + wx.setNavigationBarTitle({ + title: "设置密码", + }); + } else { + wx.setNavigationBarTitle({ + title: "修改登录密码", + }); + } + } + }, + changeBtn: function (e) { + console.log(e); + if (this.verifyTel(e.detail.value)) { + this.setData({ + disabled: "1", + btnColor: true, + tel: e.detail.value, + }); + } else { + this.setData({ + btnColor: false, + disabled: 0, + }); + } + }, + /** + * 手机号合规校验 + * + * + */ + verifyTel (value) { + console.log(value); + var myreg = /^[1][3456789][0-9]{9}$/; + if (myreg.test(value)) { + return true; + } else { + return false; + } + }, + /** + * 密码重复校验 + * + * + */ + verify (newStr, oldStr) { + if (newStr != oldStr) { + return false; + } else { + return true; + } + }, + /** + * 表单信息提交校验 + * + * + */ + beforeFormSubmit (e) { + console.log(e); + console.log(e.currentTarget.dataset.type); + wx.showLoading({ + title: "提交中", + mask: true, + success: (result) => { }, + }); + let that = this; + let value = e.detail.value; + if (e.currentTarget.dataset.type == 1) { + value.tel = that.data.tel + if (value.tel == "" || !this.verifyTel(value.tel)) { + app.hideLoad(); + app.showTips(that, "请输入正确手机号"); + return; + } + if (value.code == "") { + app.hideLoad(); + app.showTips(that, "验证码不能为空"); + return; + } + if (value.newPsw.trim() == "" || value.rePsw.trim() == "") { + app.hideLoad(); + value.newPsw.trim() == "" ? app.showTips(that, "请输入新密码") : app.showTips(that, "请再次输入密码"); + return; + } + if (!this.verify(value.newPsw.trim(), value.rePsw.trim())) { + app.hideLoad(); + app.showTips(that, "前后密码不一致"); + return; + } + app.hideLoad(); + this.formSubmit(value, 1); + } else { console.log(app.globalData.user); - if (value.tel == "") { - app.hideLoad(); - app.showTips(that, "请输入原密码"); - return; - } - if (value.newPsw.trim() == "" || value.rePsw.trim() == "") { - app.hideLoad(); - value.newPsw.trim() == "" ? app.showTips(that, "请输入新密码") : app.showTips(that, "请再次输入密码"); - return; - } - if (!this.verify(value.newPsw.trim(), value.rePsw.trim())) { - app.hideLoad(); - app.showTips(that, "前后密码不一致"); - return; - } - this.formSubmit(value, 2); - } - }, - /** - * 表单信息提交 - * - * - */ - formSubmit(value, type) { - let that = this; - if (type == 1) { - console.log(value); - wx.request({ - url: app.globalData.ip + "/yishoudan/updatePassword", - data: { - tel: value.tel, - code: value.code, - password: value.newPsw, - }, - header: { - "content-type": "application/json", - }, - success: function ({ data }) { - console.log(data); - if (data.status == 200) { - app.showTips(that, "修改成功"); - setTimeout(() => { - if (app.globalData.isLogin) { - wx.navigateBack({ - target: 1, - success: (result) => {}, - }); - } else { - wx.reLaunch({ - url: "/pages/login/index?type=psw", - success: (result) => {}, - }); - } - }, 2000); - } else { - app.showTips(that, data.msg); - } - }, - }); - } else { - wx.request({ - url: app.globalData.ip + "/yishoudan/updatePasswordByPwd", - data: { - tel: app.globalData.user.tel, - oldPassword: value.oldPsw, - password: value.newPsw, - }, - method:'post', - header:app.globalData.header, - success: function ({ data }) { - console.log(data); - if (data.status == 200) { - app.showTips(that, "修改成功"); - setTimeout(() => { - if (app.globalData.isLogin) { - wx.navigateBack({ - target: 1, - success: (result) => {}, - }); - } else { - wx.reLaunch({ - url: "/pages/login/index?type=psw", - success: (result) => {}, - }); - } - }, 2000); - } else { - app.showTips(that, data.msg); - } - }, - }); - } - }, - /** - * 改变修改密码类型 - * - * - */ - changeType() { - this.setData({ - type: 1, - }); - wx.setNavigationBarTitle({ - title: "找回密码", - }); - }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() {}, + console.log(value); + if (!value.oldPsw) { + app.hideLoad(); + console.log(that); + app.showTips(that, "请输入原密码"); + return; + } + if (value.newPsw.trim() == "" || value.rePsw.trim() == "") { + app.hideLoad(); + value.newPsw.trim() == "" ? app.showTips(that, "请输入新密码") : app.showTips(that, "请再次输入密码"); + return; + } + if (!this.verify(value.newPsw.trim(), value.rePsw.trim())) { + app.hideLoad(); + app.showTips(that, "前后密码不一致"); + return; + } + this.formSubmit(value, 2); + } + }, + /** + * 表单信息提交 + * + * + */ + formSubmit (value, type) { + let that = this; + if (type == 1) { + console.log(value); - /** - * 生命周期函数--监听页面显示 - */ - onShow() {}, - /** - * 获取验证码 - * - * - */ - sendMsg: function () { - console.log(this.data.tel); - var that = this; + wx.request({ + url: app.globalData.ip + "/yishoudan/updatePassword", + data: { + tel: value.tel, + code: value.code, + password: value.newPsw, + }, + header: app.globalData.headers, + success: function ({ data }) { + console.log(data); + if (data.status == 200) { + app.showTips(that, "修改成功"); + setTimeout(() => { + if (app.globalData.isLogin) { + wx.navigateBack({ + target: 1, + success: (result) => { }, + }); + } else { + wx.reLaunch({ + url: "/pages/login/index?type=psw", + success: (result) => { }, + }); + } + }, 2000); + } else { + app.showTips(that, data.msg); + } + }, + }); + } else { - that.setData({ - btnColor: false, - disabled: 0, - }); + wx.request({ + url: app.globalData.ip + "/yishoudan/updatePasswordByPwd", + data: { + tel: app.globalData.user.tel, + oldPassword: value.oldPsw, + password: value.newPsw, + }, + method: 'post', + header: app.globalData.headers, + success: function ({ data }) { + console.log(data); + if (data.status == 200) { + app.showTips(that, "修改成功"); + setTimeout(() => { + // if (app.globalData.isLogin) { + // wx.navigateBack({ + // target: 1, + // success: (result) => {}, + // }); + // } else { + // wx.reLaunch({ + // url: "/pages/login/index?type=psw", + // success: (result) => {}, + // }); + // } + wx.reLaunch({ + url: "/pages/login/index?type=psw", + success: (result) => { }, + }); + }, 2000); + } else { + app.hideLoad(); + app.showTips(that, data.msg); + } + }, + }); + } + }, + /** + * 改变修改密码类型 + * + * + */ + changeType () { + this.setData({ + type: 1, + }); + wx.setNavigationBarTitle({ + title: "找回密码", + }); + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady () { }, - that.getCode(); - var timer = 1; - if (timer == 1) { - timer = 0; - var time = 60; - var inter = setInterval(function () { - that.setData({ - getmsg: time + "s", - btnColor: false, - disabled: 0, - }); - time--; - if (time < 0) { - timer = 1; - clearInterval(inter); - that.setData({ - getmsg: "重新获取", - btnColor: true, - disabled: 1, - }); - } - }, 1000); - } - }, - getCode: function () { - var that = this; - wx.request({ - url: app.globalData.ip + "/commons/sendMsgCode", - data: { - tel: that.data.tel, - }, - header: app.globalData.headers, - method: "GET", - success: function (res) { - console.log("发送短信验证码"); - console.log(res); - if (res.data.status == 200) { - app.showTips(that, "验证码发送成功"); - } else if (res.data.status == 9999) { - app.dialogNotLogin(); - } else { - } - }, - }); - }, - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() {}, + /** + * 生命周期函数--监听页面显示 + */ + onShow () { }, + /** + * 获取验证码 + * + * + */ + sendMsg: function () { + console.log(this.data.tel); + var that = this; - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() {}, + that.setData({ + btnColor: false, + disabled: 0, + }); - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() {}, + that.getCode(); + var timer = 1; + if (timer == 1) { + timer = 0; + var time = 60; + var inter = setInterval(function () { + that.setData({ + getmsg: time + "s", + btnColor: false, + disabled: 0, + }); + time--; + if (time < 0) { + timer = 1; + clearInterval(inter); + that.setData({ + getmsg: "重新获取", + btnColor: true, + disabled: 1, + }); + } + }, 1000); + } + }, + getCode: function () { + var that = this; - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() {}, + wx.request({ + url: app.globalData.ip + "/commons/sendMsgCode", + data: { + tel: that.data.tel, + }, + header: app.globalData.headers, + method: "GET", + success: function (res) { + console.log("发送短信验证码"); + console.log(res); + if (res.data.status == 200) { + app.showTips(that, "验证码发送成功"); + } else if (res.data.status == 9999) { + app.dialogNotLogin(); + } else { + } + }, + }); + }, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide () { }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage1() {}, + /** + * 生命周期函数--监听页面卸载 + */ + onUnload () { }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh () { }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom () { }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage1 () { }, }); diff --git a/pages/mine/changePsw/index.wxml b/pages/mine/changePsw/index.wxml index ed6355b..b4840c4 100644 --- a/pages/mine/changePsw/index.wxml +++ b/pages/mine/changePsw/index.wxml @@ -1,67 +1,73 @@ - -