From b68c33fb2d65cfccb81af868902006a9b126eed0 Mon Sep 17 00:00:00 2001 From: songsong428 Date: Fri, 27 Mar 2020 23:06:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=A5=E5=BA=B7=E6=89=93=E5=8D=A1=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/user-agreement/user-agreement.vue | 54 ++++- config/api/api.js | 5 + pages/add-stroke/add-stroke.vue | 38 ++- pages/apply-code/apply-code.vue | 221 +++++++++++++++++- pages/basic-info/basic-info.vue | 48 ++-- pages/my-code/my-code.vue | 31 ++- pages/my-trips/my-trips.vue | 2 +- pages/punch-the-clock/punch-the-clock.vue | 229 ++++++++++++++++++- store/modules/user/actions.js | 4 +- utils/user.js | 2 + 10 files changed, 579 insertions(+), 55 deletions(-) diff --git a/components/user-agreement/user-agreement.vue b/components/user-agreement/user-agreement.vue index 635b4b8..ada7ac4 100644 --- a/components/user-agreement/user-agreement.vue +++ b/components/user-agreement/user-agreement.vue @@ -1,13 +1,31 @@ @@ -16,6 +34,8 @@ export default { data() { return { agree: false, + agree1: false, + agree2: false, }; }, onLoad(op) {}, @@ -29,6 +49,24 @@ export default { this.$emit('changeIntentions',this.agree) }, + changeIntentions1(){ + if(!this.agree1){ + this.agree1 = true; + }else{ + this.agree1 = false; + } + this.$emit('changeIntentions1',this.agree1) + }, + + changeIntentions2(){ + if(!this.agree2){ + this.agree2 = true; + }else{ + this.agree2 = false; + } + this.$emit('changeIntentions2',this.agree2) + }, + // 服务协议 serviceAgreement(){ console.log('用户服务协议') diff --git a/config/api/api.js b/config/api/api.js index ca8eb0b..7297a40 100644 --- a/config/api/api.js +++ b/config/api/api.js @@ -22,6 +22,9 @@ export const HEALTH_TYPE_STATUS = `${health}/type`; // 健康打卡 export const HEALTH_SIGN = `${health}/upload`; +// 上传备注图片 +export const HEALTH_FILE = `${health}/file`; + // 查看自己的打卡记录 export const USER_SIGNS = `${sites}/info`; @@ -42,3 +45,5 @@ export const GET_JOURNEYS = `${journeys}/info`; // 上报行程 export const SUBMIT_JOURNEYS = `${journeys}/upload`; + + diff --git a/pages/add-stroke/add-stroke.vue b/pages/add-stroke/add-stroke.vue index 055b03e..a5b3911 100644 --- a/pages/add-stroke/add-stroke.vue +++ b/pages/add-stroke/add-stroke.vue @@ -44,7 +44,7 @@ - + @@ -62,8 +62,8 @@ export default { components: {UniCalendar,StartDateSelector,EndDateSelector}, data() { return { - startTime: this.$moment().format('YYYY-MM-DD'), - endTime: this.$moment().format('YYYY-MM-DD'), + startTime: this.$moment().format('YYYY-MM-DD HH:mm'), + endTime: this.$moment().format('YYYY-MM-DD HH:mm'), transports: [ { value: '0', @@ -104,7 +104,9 @@ export default { together: '', tripMode: 0, journeyType: 0, - agree: false + agree: false, + agree1: false, + agree2: false }; }, methods: { @@ -130,6 +132,12 @@ export default { changeIntentions(data) { this.agree = data; }, + changeIntentions1(data) { + this.agree1 = data; + }, + changeIntentions2(data) { + this.agree2 = data; + }, /** * 获取出发时间 @@ -163,9 +171,11 @@ export default { journeyType, startTime, together, - tripMode + tripMode, + agree1, + agree2, } = this; - + console.log(startTime,endTime) const params = { param: { carNo, @@ -173,7 +183,9 @@ export default { journeyType: journeyType+1, startTime: +this.$moment(startTime).format('x'), together, - tripMode + tripMode, + healthAgreement: agree1 ? 1 : 0, + selfFill: agree2 ? 1 : 0, } }; @@ -212,7 +224,7 @@ export default { // 验证信息 checkRules() { - const { startTime,endTime,journeyType,tripMode,carNo,agree } = this; + const { startTime,endTime,journeyType,tripMode,carNo,agree,agree1,agree2 } = this; if (!this.startTime) { showToast('请选择出发时间'); return; @@ -233,7 +245,15 @@ export default { showToast('乘坐航班车次或车牌号码及座位号'); return; } - if (!this.agree) { + if (!agree) { + showToast('请选择是否同意《用户服务协议》和《隐私政策》'); + return; + } + if (!this.agree1) { + showToast('请选择是否同意信息提交山西大学管理'); + return; + } + if (!this.agree2) { showToast('请确定是否为本人填写'); return; } diff --git a/pages/apply-code/apply-code.vue b/pages/apply-code/apply-code.vue index b04acf2..d26f2ac 100644 --- a/pages/apply-code/apply-code.vue +++ b/pages/apply-code/apply-code.vue @@ -47,7 +47,7 @@ - 最近14天是否有武汉居住史、旅游史或武汉亲戚来访 + *最近14天是否有武汉居住史、旅游史或武汉亲戚来访 @@ -65,7 +65,7 @@ - 最近14天是否有新冠肺炎患者或疑似患者接触史 + *最近14天是否有新冠肺炎患者或疑似患者接触史 @@ -81,14 +81,71 @@ + + + *最近14天有无接触过近期境外返回人员 + + + + + + + + + + + *是否在学校所在地 + + + + + + + + + *当前体温(℃) + + + *紧急联系人 + + + + + + + + 备注(选填) +