From 31f4717f78c2f61af16ce989294204cf553060b7 Mon Sep 17 00:00:00 2001 From: shidongli Date: Tue, 17 Oct 2023 16:20:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=88=90=E5=91=98+=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E8=B4=A6=E5=8F=B7+=E6=B3=A8=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/pages/myinformation/myinformation.js | 36 ++ pages.json | 96 ++-- pages/homepage/homepage.vue | 19 +- pages/login/login.vue | 4 +- pages/myinformation/myinformation.vue | 75 ++- pages/register/register.vue | 197 ++++---- pagesB/AddMembers/AddMembers.vue | 565 +++++++++++------------ 7 files changed, 545 insertions(+), 447 deletions(-) diff --git a/api/pages/myinformation/myinformation.js b/api/pages/myinformation/myinformation.js index e118e16..ff16787 100644 --- a/api/pages/myinformation/myinformation.js +++ b/api/pages/myinformation/myinformation.js @@ -20,3 +20,39 @@ export function inviteFriends(patientId) { }, }) } + +// 获取已绑定家庭成员列表 +export function getFamilyList(openid,patientCode) { + return request({ + url: `/applet/register/switchResident/${openid}/${patientCode}`, + method: 'get', + }) +} +// 添加家庭成员 +export function registerdata(data) { + return request({ + url: '/applet/register', + method: 'POST', + data: data + }) +} +// 获取当前注册居民 +export function getCurrentUser(openid) { + return request({ + url: `/applet/register/getList/${openid}`, + method: 'GET', + header: { + // Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') + }, + }) +} +// 切换 +export function switchResident(openid,patientCode) { + return request({ + url: `/applet/register/switchResident/${openid}/${patientCode}`, + method: 'GET', + header: { + // Authorization: 'Bearer' + ' ' + uni.getStorageSync('token') + }, + }) +} diff --git a/pages.json b/pages.json index 0ebb63a..12d0198 100644 --- a/pages.json +++ b/pages.json @@ -3,13 +3,30 @@ "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" }, "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages + { + "path": "pages/myinformation/myinformation", + "style": { + "enablePullDownRefresh": false, + "navigationStyle": "custom" + } + }, + { + "path": "pages/register/register", + "style": { + "navigationBarTitleText": "注册", + "enablePullDownRefresh": false + } + }, + + { + "path": "pages/startup/startup", + "style": { + "navigationStyle": "custom", + "enablePullDownRefresh": false + } + }, + { - "path": "pages/startup/startup", - "style": { - "navigationStyle": "custom", - "enablePullDownRefresh": false - } - }, { "path": "pages/homepage/homepage", "style": { "enablePullDownRefresh": false, @@ -22,13 +39,7 @@ "enablePullDownRefresh": false, "navigationStyle": "custom" } - }, { - "path": "pages/myinformation/myinformation", - "style": { - "enablePullDownRefresh": false, - "navigationStyle": "custom" - } - }, { + }, { "path": "pages/login/login", "style": { "navigationBarTitleText": "登录", @@ -41,13 +52,7 @@ "navigationStyle": "custom" } }, - { - "path": "pages/register/register", - "style": { - "navigationBarTitleText": "注册", - "enablePullDownRefresh": false - } - }, { + { "path": "pages/facecollection/facecollection", "style": { "navigationBarTitleText": "人脸采集", @@ -61,8 +66,7 @@ "path": "Behaviorpoints/Behaviorpoints", "style": { "navigationBarTitleText": "行为积分", - "onReachBottomDistance": 40, //距离底部多远时触发 单位为px - "enablePullDownRefresh": true //设置参数为true + "enablePullDownRefresh": false } }, { @@ -70,6 +74,7 @@ "style": { "navigationBarTitleText": "预约详情", "enablePullDownRefresh": false, + // "navigationStyle": "default", "navigationBarBackgroundColor": "#4ac4ab" } }, @@ -360,8 +365,7 @@ "path": "PointsMall/PointsMall", "style": { "navigationBarTitleText": "积分商城", - "onReachBottomDistance": 40, //距离底部多远时触发 单位为px - "enablePullDownRefresh": true //设置参数为true + "enablePullDownRefresh": false } }, { "path": "screeningResult/screeningResult", @@ -399,8 +403,24 @@ "navigationBarTitleText": "履约详情", "enablePullDownRefresh": false } - } - ] + },{ + "path" : "AddMembers/AddMembers", + "style" : + { + "navigationBarTitleText": "添加成员", + "enablePullDownRefresh": false + } + } + ,{ + "path" : "Serviceevaluation/Serviceevaluation", + "style" : + { + "navigationBarTitleText": "服务评价", + "enablePullDownRefresh": false + } + + } + ] }, { "root": "pagesC", "pages": [{ @@ -410,13 +430,13 @@ "enablePullDownRefresh": false } }, - { - "path": "Filinginformation/Filinginformation", - "style": { - "navigationBarTitleText": "查看建档信息" - // "enablePullDownRefresh": false - } - }, + // { + // "path": "Filinginformation/Filinginformation", + // "style": { + // "navigationBarTitleText": "查看建档信息" + // // "enablePullDownRefresh": false + // } + // }, { "path": "Onlinesigning/Onlinesigning", "style": { @@ -504,13 +524,21 @@ "navigationBarTitleText": "", "enablePullDownRefresh": false } - }, { + }, + { "path": "contractsigningprotocol/contractsigningprotocol", "style": { "navigationBarTitleText": "签约协议", "enablePullDownRefresh": false } } + // { + // "path": "contractsigningprotocol/contractsigningprotocol", + // "style": { + // "navigationBarTitleText": "签约协议", + // "enablePullDownRefresh": false + // } + // } ] }], "globalStyle": { diff --git a/pages/homepage/homepage.vue b/pages/homepage/homepage.vue index 601e122..4ee2242 100644 --- a/pages/homepage/homepage.vue +++ b/pages/homepage/homepage.vue @@ -162,13 +162,16 @@ }, // 筛查记录 gorecords() { - if (!this.userinfo) { - this.gologin(); - } else { - uni.navigateTo({ - url: "/pagesC/Screeningrecords/Screeningrecords" - }) - } + uni.navigateTo({ + url: "/pagesC/Screeningrecords/Screeningrecords" + }) + // if (!this.userinfo) { + // this.gologin(); + // } else { + // uni.navigateTo({ + // url: "/pagesC/Screeningrecords/Screeningrecords" + // }) + // } }, // 健康自评 healthtest() { @@ -244,4 +247,4 @@ \ No newline at end of file + diff --git a/pages/login/login.vue b/pages/login/login.vue index 3610d0f..ea05107 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -89,6 +89,7 @@ let that = this; isRegistered(that.logincode, that.phonecode).then(resp => { uni.setStorageSync("openid", resp.data.openid) + uni.setStorageSync("phone", resp.data.phone) if (resp.data.code == '0') { that.$refs.uToast.show({ title: '未注册,请先注册', @@ -114,6 +115,7 @@ delta: 1 }) }, 500) + console.log("9999") } else { that.$refs.uToast.show({ title: '登录失败', @@ -160,4 +162,4 @@ \ No newline at end of file + diff --git a/pages/myinformation/myinformation.vue b/pages/myinformation/myinformation.vue index ed7e0ed..0b0cd22 100644 --- a/pages/myinformation/myinformation.vue +++ b/pages/myinformation/myinformation.vue @@ -155,10 +155,13 @@ + @@ -167,6 +170,7 @@ + @@ -176,6 +180,10 @@ } from "vuex"; import { appPersonal, + getFamilyList, + registerdata, + getCurrentUser, + switchResident } from '@/api/pages/myinformation/myinformation.js'; import { existPatientInfo @@ -184,6 +192,9 @@ createMobileToken } from '@/api/pages/login/index.js' import baseurl from '@/api/baseurl.js' + // import { + // , + // } from '@/api/pages/homepage/homepage.js' export default { data() { return { @@ -192,21 +203,61 @@ timer: null, list: {}, showhome: false, //切换 + familyList: {}, //切换列表 + userinfo: {}, //用户信息 + valueopenid:'', + }; }, onShow() { + + // this.bjimg = baseurl + '/profile/appletPicture/inviteFriendsOne.png' let that = this - this.baseurl = baseurl + that.userinfo = uni.getStorageSync('userinfo') + console.log(that.userinfo) + that.baseurl = baseurl const value = uni.getStorageSync('patientId'); + this.valueopenid = uni.getStorageSync('openid'); if (value) { that.myInfo() } else { that.appPersonallist = null } + // getCurrentUser(this.valueopenid).then(res => { + // console.log(res) + // this.familyList = res.data + + // }) }, methods: { + // 切换成员 + changeFamilyInfo(e) { + console.log(e,'000') + switchResident(this.valueopenid,e.patientCode).then(res => { + if (res.code == 200) { + this.$refs.uToast.show({ + title: '切换成功', + type: 'success', + duration: '1000', + }) + uni.setStorageSync('userinfo', res.data); + uni.setStorageSync('patientId', res.data.id); + this.myInfo() + + } + else{ + this.$refs.uToast.show({ + title: res.msg, + type: 'error', + duration: '1000', + }) + + } + }) + this.showhome = false + }, remove() { let that = this const value = uni.getStorageSync('patientId'); @@ -305,11 +356,11 @@ } }, // 服务评价 - evaluation(){ + evaluation() { uni.navigateTo({ url: '/pagesB/Serviceevaluation/Serviceevaluation' }) - + }, //去登陆 gologin() { @@ -385,9 +436,13 @@ homeshow() { // this.getSetting() // this.listquery.bindingCity = uni.getStorageSync('userInfo').bindingCity - // getFamilyList(this.listquery).then(res => { - // this.familyList = res.data.data - // // }) + + var patientCode = this.userinfo.patientCode + var openid = uni.getStorageSync('openid') + // getFamilyList(openid, patientCode).then(res => { + // this.familyList = res.data + // console.log(this.familyList, '000') + // }) this.showhome = true }, //管理家庭成员 @@ -479,4 +534,4 @@ + \ No newline at end of file diff --git a/pages/register/register.vue b/pages/register/register.vue index ec9466a..e6517ef 100644 --- a/pages/register/register.vue +++ b/pages/register/register.vue @@ -33,12 +33,26 @@ 手机号 - + 身份证号 + 户主身份证号 + + + + + 与户主关系 + + 请选择与户主关系 + {{householdRelationship}} + + + + + 所属区域 @@ -118,6 +132,7 @@ @funcValue="getpickerParentValue" pickerSize="4"> + @@ -154,6 +169,56 @@ }, data() { return { + showNation: false, //户主关系 + actions: [{ + value: '1', + label: '户主本人' + + }, + { + value: '2', + label: '配偶' + }, + { + value: '3', + label: '子女' + },{ + value: '4', + label: '(外)孙子女' + } ,{ + value: '5', + label: '父母' + } ,{ + value: '6', + label: '(外)祖父母' + } ,{ + value: '7', + label: '兄弟姐妹' + } ,{ + value: '8', + label: '儿媳' + } ,{ + value: '9', + label: '女婿' + } ,{ + value: '10', + label: '孙子女' + } ,{ + value: '11', + label: '侄子女' + } ,{ + value: '12', + label: '曾孙子女' + }, + ,{ + value: '13', + label: '祖父母' + }, + ,{ + value: '99', + label: '其他' + }, + ], tipsText: '', form: { name: '', @@ -221,8 +286,11 @@ sex: '', sexname: '', birthDate: '', - cityCode: '1' + cityCode: '1', + householdCardNo:'', + householdRelationship:'', }, + householdRelationship:'', timer: null, addresslength: null, patientDiseaseInfoList: [], //获取个人信息 @@ -268,6 +336,17 @@ }, message: '请输入正确的身份证号', trigger: ['blur'], + }], + householdRelationship:[{ + + message: '请输入户主身份证号', + trigger: ['change', 'blur'], + }, { + validator: (rule, value, callback) => { + return uni.$u.test.idCard(value); + }, + message: '请输入正确的身份证号', + trigger: ['blur'], }] } } @@ -280,6 +359,14 @@ // uni.$off('code'); // }, methods: { + // 与户主关系 + nationSelect(e) { + console.log(e) + this.query.householdRelationship = e[0].value + this.householdRelationship = e[0].label + // console.log(this.query.householdRelationship) + // this.$refs.uForm.validateField('nation') + }, onChange(e) { this.selected = e // console.log(e) @@ -288,12 +375,12 @@ }, // 下拉框多选 selectChange(val) { - console.log(val,'999'); + console.log(val, '999'); }, cancel() {}, confirm(e) { - this.query.diseaseList = e.map(Number) - console.log(e,'打印e') + this.query.diseaseList = e.map(Number) + console.log(e, '打印e') }, submit() { console.log(this.query) @@ -381,83 +468,7 @@ url: '/pages/facecollection/facecollection' }) }, - //提交信息 - // informationinfo() { - // var that = this - // if (that.query.sex == '男') { - // that.query.sex = 'MALE'; - // } else if (that.query.sex == '女') { - // that.query.sex = 'FEMALE'; - // } - // if (this.addresslength) { - // if (this.addresslength.length > 2) { - // const value = uni.getStorageSync('phone'); - // if (value) { - // that.query.phone = value - // if (that.radio == 1) { - // that.$refs.uToast.show({ - // title: '请审核并同意用户协议', - // type: 'error' - // }) - // } else { - // const patientId = uni.getStorageSync('patientId'); - // AppIdentification(patientId).then(resp => { - // if (resp.code == 200) { - // if (resp.data.loginFlag) { - // that.$refs.uToast.show({ - // title: '您已完善', - // type: 'success', - // }) - // if (that.timer) { - // clearTimeout(that.timer) - // } - // that.timer = setTimeout(e => { - // uni.navigateBack({ - // delta: 1 - // }) - // }, 1500) - // } else { - // information(that.query).then(res => { - // if (res.code == 200) { - // uni.removeStorageSync('invitationPatientId'); - // that.$refs.uToast.show({ - // title: '完善信息成功', - // type: 'success', - // duration: '1500' - // }) - // if (that.timer) { - // clearTimeout(that.timer) - // } - // that.timer = setTimeout(e => { - // uni.navigateBack({ - // delta: 1 - // }) - // }, 1500) - // } else if (res.code == 500) { - // that.$refs.uToast.show({ - // title: res.msg, - // type: 'error', - // }) - // } - // }) - // } - // } - // }) - // } - // } - // } else { - // that.$refs.uToast.show({ - // title: '所属区域应选择所在的区或街道,请重新选择!', - // type: 'error' - // }) - // } - // } else { - // that.$refs.uToast.show({ - // title: '所属区域应选择所在的区或街道,请重新选择!', - // type: 'error' - // }) - // } - // }, + //性别 sexchange(e) { if (e == '男') { @@ -542,12 +553,12 @@ onLoad(options) { let that = this // console.log(options, '00') - uni.$on('headPictureUrl',(res)=>{ - console.log(res,'99999') - this.query.headPictureUrl = res.tempImg - uni.$off('headPictureUrl') - // 为 B 页面传过来的值 - }) + uni.$on('headPictureUrl', (res) => { + console.log(res, '99999') + this.query.headPictureUrl = res.tempImg + uni.$off('headPictureUrl') + // 为 B 页面传过来的值 + }) // this.query.headPictureUrl = options.headPictureUrl // this.query.couponId = Number(options.couponId) @@ -570,6 +581,7 @@ that.query.source = 'REGISTER_YOURSELF' that.query.invitationPatientId = null } + this.query.phone=uni.getStorageSync("phone") // const chooseLocation = requirePlugin('chooseLocation'); // const location = chooseLocation.getLocation(); // 如果点击确认选点按钮,则返回选点结果对象,否则返回null // if (location) { @@ -721,10 +733,11 @@ } } - ::v-deep .u-radio.data-v-643b3322{ + + ::v-deep .u-radio.data-v-643b3322 { padding-left: 32rpx; - padding-top: 7rpx; - + padding-top: 7rpx; + } ::v-deep.input-placeholder { @@ -759,7 +772,7 @@ } - ::v-deep .u-radio[data-v-643b3322]{ + ::v-deep .u-radio[data-v-643b3322] { margin-top: 8rpx !important; margin-left: 30rpx !important; diff --git a/pagesB/AddMembers/AddMembers.vue b/pagesB/AddMembers/AddMembers.vue index 81d27b2..b68590b 100644 --- a/pagesB/AddMembers/AddMembers.vue +++ b/pagesB/AddMembers/AddMembers.vue @@ -13,70 +13,113 @@ + + - - 身份证号 - - - - - - - - - 姓名 - - - - 性别 - - - - {{item.name}} - - - - - - 民族 - - 请选择民族 - - - - - 出生日期 - - 请选择出生日期 - - - - - 与户主的关系 - - 请选择与户主的关系 - - - + + 身份证号 + + + + + + + + + + + 姓名 + + + + + + 性别 + + + + {{item.name}} + + + + + + + + 民族 + + 请选择民族 + + {{nation}} + + + + + + + 出生日期 + + 请选择出生日期 + {{form.birthDate}} + + + + + + + + 与户主的关系 + + 请选择与户主关系 + {{householdRelationship}} + + + + + + 户主身份证号 + + + - - 居住地址 - - - - - 手机号 - - + + + 居住地址 + + + + + + 手机号 + + + + - - + - + + 添加 + + + + + + + + @@ -84,6 +127,10 @@ @@ -502,6 +452,7 @@ border-radius: 5rpx; margin: 15rpx auto; position: relative; + ::v-deep .u-input { width: 630rpx; height: 63rpx; @@ -509,19 +460,21 @@ color: #8E8E8E; // border: 1rpx solid red; // margin: 12rpx auto; - border: none; + border: none !important; border-radius: 5rpx; - - + .u-input__input { font-size: 26rpx; font-family: Source Han Sans CN; font-weight: 400; color: #000000 !important; padding-left: 20rpx; - + } - + + } + .u-form-item{ + padding: 0 0 !important; } .text_title { @@ -548,8 +501,8 @@ border-radius: 2rpx; .text_con_pic { - margin-right: 10rpx; - margin-left: 9rpx; + margin-right: 10rpx; + margin-left: 9rpx; image { width: 14rpx; @@ -608,9 +561,9 @@ .idScan { position: absolute; - top: 87rpx; + top: 75rpx; right: 60rpx; - transform: translate(0%, -40%); + // transform: translate(0%, -40%); } .sex { @@ -643,14 +596,14 @@ // color: #8E8E8E !important; // font-size: 20rpx !important; // } - + ::v-deep.input-placeholder { color: #8E8E8E !important; font-size: 20rpx; font-family: Source Han Sans CN; font-weight: 400; } - + ::v-deep.uni-input-placeholder { color: #8E8E8E !important; font-size: 20rpx; @@ -664,9 +617,9 @@ // color: #8E8E8E !important; // font-size: 20rpx !important; // } - ::v-deep .uni-input-input{ + ::v-deep .uni-input-input { padding-left: 20rpx !important; - + } .select { @@ -677,6 +630,14 @@ border-radius: 5rpx; display: flex; position: relative; + .testitem { + font-size: 26rpx; + font-family: Source Han Sans CN; + font-weight: 400; + color: #000000; + + + } text { padding-left: 20rpx;