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天有无接触过近期境外返回人员
+
+
+
+
+
+
+
+
+
+
+ *是否在学校所在地
+
+
+
+
+
+
+
+
+
*当前体温(℃)
+
+
+ *紧急联系人
+
+
+
+
+
+
+
+ 备注(选填)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
*联系方式
@@ -76,7 +76,7 @@
/>
-
+
- 就诊医院:{{ item.hospital }}
+
+
+ 境外人员接触史
+
+
+ 在校
+
+
+ 不在校
+
+
+ 紧急联系人:{{ item.emergencyName }} {{ item.emergencyPhone }}
+
+ 备注:{{ item.remark }}
+
+
+
+
@@ -116,6 +133,18 @@
}
}
},
+
+ // 预览图片
+ viewImage(filePath,index) {
+ console.log(filePath,index)
+ if(filePath && filePath.length > 0){
+ uni.previewImage({
+ urls: filePath,
+ current:filePath[index]
+ })
+ }
+ },
+
},
};
diff --git a/pages/my-trips/my-trips.vue b/pages/my-trips/my-trips.vue
index 92a6c91..dfc7406 100644
--- a/pages/my-trips/my-trips.vue
+++ b/pages/my-trips/my-trips.vue
@@ -96,7 +96,7 @@
formatDate1(time) {
var data = new Date(time);
- return formatDate(data, 'MM月dd日 HH:mm');
+ return formatDate(data, 'MM月dd日 hh:mm');
},
},
diff --git a/pages/punch-the-clock/punch-the-clock.vue b/pages/punch-the-clock/punch-the-clock.vue
index 506f97b..679264c 100644
--- a/pages/punch-the-clock/punch-the-clock.vue
+++ b/pages/punch-the-clock/punch-the-clock.vue
@@ -31,7 +31,7 @@
- 最近14天是否有武汉居住史、旅游史或武汉亲戚来访
+ *最近14天是否有武汉居住史、旅游史或武汉亲戚来访
@@ -45,7 +45,7 @@
- 最近14天是否有新冠肺炎患者或疑似患者接触史
+ *最近14天是否有新冠肺炎患者或疑似患者接触史
@@ -57,12 +57,67 @@
+
+
+ *最近14天有无接触过近期境外返回人员
+
+
+
+
+
+
+
+
+
+
+ *是否在学校所在地
+
+
+
+
+
+
+
+
+
*当前体温(℃)
+
+
+ *紧急联系人
+
+
+
+
+
+
+
+ 备注(选填)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -74,7 +129,7 @@
showToast
} from 'common/script/util';
import {
- HEALTH_SIGN
+ HEALTH_SIGN,HEALTH_FILE
} from 'api/api';
import {
mapState,
@@ -102,11 +157,34 @@
value: '1',
name: '是'
}],
+ overseas: [{
+ value: '0',
+ name: '无'
+ }, {
+ value: '1',
+ name: '有'
+ }],
+ locations: [{
+ value: '0',
+ name: '否'
+ }, {
+ value: '1',
+ name: '是'
+ }],
animalHeat: 0,
healthTypeId: 0,
touchHubei: 0,
touchSick: 0,
+ touchOverseas: 0,
+ schoolLocation: 0,
+ emergencyName: '',
+ emergencyPhone: '',
+ remark: '',
+ fileIdList: [],
+ imgList: [],
agree: false,
+ agree1: false,
+ agree2: false,
};
},
computed: mapState('user', ['token', 'status']),
@@ -127,6 +205,12 @@
changeIntentions(data) {
this.agree = data;
},
+ changeIntentions1(data) {
+ this.agree1 = data;
+ },
+ changeIntentions2(data) {
+ this.agree2 = data;
+ },
// 状态
StateChange: function(evt) {
@@ -150,7 +234,6 @@
// 接触
TouchChange(evt) {
- console.log(this.touches,'aa')
for (let b = 0; b < this.touches.length; b++) {
if (this.touches[b].value === evt.target.value) {
this.touchSick = b;
@@ -158,7 +241,89 @@
}
}
},
+
+ // 境外
+ TouchOverseasChange(evt) {
+ for (let i = 0; i < this.overseas.length; i++) {
+ if (this.overseas[i].value === evt.target.value) {
+ this.touchOverseas = i;
+ break;
+ }
+ }
+ },
+
+ // 学校所在地
+ SchoolLocationChange(evt) {
+ for (let i = 0; i < this.locations.length; i++) {
+ if (this.locations[i].value === evt.target.value) {
+ this.schoolLocation = i;
+ break;
+ }
+ }
+ },
+ ChooseImage() {
+ uni.chooseImage({
+ count: 9, //默认9
+ sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+ sourceType: ['album'], //从相册选择
+ success: (res) => {
+ if (this.imgList.length != 0) {
+ this.imgList = this.imgList.concat(res.tempFilePaths)
+ } else {
+ this.imgList = res.tempFilePaths
+ }
+ uni.uploadFile({
+ url: `https://test.tall.wiki/gateway${HEALTH_FILE}`,
+ filePath: res.tempFilePaths[0],
+ fileType: 'image',
+ name: 'file',
+ success: (res) => {
+ const resData = JSON.parse(res.data)
+ const {
+ success,
+ code,
+ msg,
+ data
+ } = resData;
+ this.fileIdList.splice(-1,0,resData.data.fileId);
+ uni.showToast({
+ title: '图片提交成功',
+ duration: 1000,
+ });
+ console.log(this.fileIdList);
+ },fail: (err) => {
+ console.log('uploadImage fail', err);
+ uni.showModal({
+ content: err.errMsg,
+ showCancel: false
+ });
+ }
+ });
+ },
+ });
+ },
+ ViewImage(e) {
+ uni.previewImage({
+ urls: this.imgList,
+ current: e.currentTarget.dataset.url
+ });
+ },
+ DelImg(e) {
+ uni.showModal({
+ title: '删除',
+ content: '确定要删除这张图片吗?',
+ cancelText: '再想想',
+ confirmText: '再见',
+ success: res => {
+ if (res.confirm) {
+ this.imgList.splice(e.currentTarget.dataset.index, 1)
+ this.fileIdList.splice(e.currentTarget.dataset.index, 1)
+ }
+ }
+ })
+ },
+
/**
* 申请健康码
*/
@@ -174,7 +339,15 @@
hospital,
token,
touchHubei,
- touchSick
+ touchSick,
+ touchOverseas,
+ schoolLocation,
+ emergencyName,
+ emergencyPhone,
+ remark,
+ fileIdList,
+ agree1,
+ agree2,
} = this;
const params = {
param: {
@@ -185,10 +358,17 @@
hospital,
token,
touchHubei,
- touchSick
+ touchSick,
+ touchOverseas,
+ schoolLocation,
+ emergencyName,
+ emergencyPhone,
+ remark,
+ fileIdList,
+ healthAgreement: agree1 ? 1 : 0,
+ selfFill: agree2 ? 1 : 0,
}
};
-
const res = await this.$http.post(HEALTH_SIGN, params);
const {
success,
@@ -230,7 +410,11 @@
address,
healthTypeId,
animalHeat,
- agree
+ emergencyName,
+ emergencyPhone,
+ agree,
+ agree1,
+ agree2
} = this;
if (!district || district === '请选择当前所在地区') {
showToast('请选择当前所在地区');
@@ -248,12 +432,37 @@
showToast('请输入当前体温');
return;
}
+ if (!emergencyName) {
+ showToast('请输入紧急联系人姓名');
+ return;
+ }
+ if (!this.verifyPhone(emergencyPhone)) {
+ showToast('请输入正确的紧急联系人手机号');
+ return;
+ }
if (!agree) {
- showToast('请确定是否为本人填写');
+ showToast('请选择是否同意《用户服务协议》和《隐私政策》');
return;
}
+ if (!agree1) {
+ showToast('请选择是否同意信息提交山西大学管理');
+ return;
+ }
+ if (!agree2) {
+ showToast('请确定是否为本人填写');
+ return;
+ }
return true;
},
+
+ /**
+ * 验证手机号格式
+ * @param {string} phone 手机号
+ */
+ verifyPhone(phone) {
+ const phoneExg = /^1\d{10}$/;
+ return phoneExg.test(phone);
+ },
},
};
diff --git a/store/modules/user/actions.js b/store/modules/user/actions.js
index dfb2a50..8315bd4 100644
--- a/store/modules/user/actions.js
+++ b/store/modules/user/actions.js
@@ -74,8 +74,8 @@ const actions = {
.post(GET_USER_INFO, params)
.then(res => {
hideLoading();
+ console.log('getUserInfo data: ', res.data);
const { data } = res.data;
- console.log('getUserInfo data: ', data);
resolve(data);
// 获取自己的信息采取设置
// 扫别人健康码的时候不用设置
@@ -90,7 +90,7 @@ const actions = {
})
.catch(data => {
hideLoading();
- showToast(data.msg || '查询个人信息失败');
+ // showToast(data.msg || '查询个人信息失败');
reject(data);
});
});
diff --git a/utils/user.js b/utils/user.js
index 601a00a..a6f5ebe 100644
--- a/utils/user.js
+++ b/utils/user.js
@@ -55,6 +55,7 @@ export const wxLogin = () => {
type: SIGN_IN_TYPES['mp'],
data: { identifier: response.code, credential: 'health' },
redirect: 'https://test.tall.wiki/gateway/health/initMsg',
+ // redirect: 'https://www.tall.wiki/gateway/health/initMsg',
};
resolve(params);
} else {
@@ -81,6 +82,7 @@ export const wxWorkLogin = () => {
type: SIGN_IN_TYPES['wx_work'],
data: { identifier: response.code, credential: 'health' },
redirect: 'https://test.tall.wiki/gateway/health/initMsg',
+ // redirect: 'https://www.tall.wiki/gateway/health/initMsg',
};
resolve(params);
} else {