Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
shidongli 2023-11-09 16:18:44 +08:00
commit 37835f8511
3 changed files with 63 additions and 77 deletions

View File

@ -248,7 +248,7 @@
}, { }, {
value: '3', value: '3',
label: '高血脂' label: '高血脂'
},], }, ],
arealist: [], //list arealist: [], //list
list: [{ list: [{
id: "", id: "",
@ -362,10 +362,7 @@
console.log(e, '打印e') console.log(e, '打印e')
}, },
submit() { submit() {
var that = this var that = this
// console.log(that.query)
// console.log(that.query.diseaseList.length,'000')
that.query.openid = uni.getStorageSync('openid'); that.query.openid = uni.getStorageSync('openid');
that.query.cityCode = uni.getStorageSync('region'); that.query.cityCode = uni.getStorageSync('region');
if (that.query.sexname == '男') { if (that.query.sexname == '男') {
@ -373,59 +370,54 @@
} else if (that.query.sexname == '女') { } else if (that.query.sexname == '女') {
that.query.sex = 'FEMALE'; that.query.sex = 'FEMALE';
} }
if (that.selected == 1) {
that.$refs.uToast.show({
title: '请审核并同意用户协议',
type: 'error'
})
return
} else if (that.query.sex == "") {
that.$refs.uToast.show({
title: '请选择性别',
type: 'error'
})
return
} else if (!that.query.locationName) {
that.$refs.uToast.show({
title: '请选择所在位置',
type: 'error'
})
return
} else if (!that.query.birthDate) {
that.$refs.uToast.show({
title: '请选择出生日期',
type: 'error'
})
return
}
that.$refs.uForm.validate(valid => { that.$refs.uForm.validate(valid => {
if (valid) { if (valid) {
registerdata(that.query).then(res => {
if (that.selected == 1) { if (res.code == 200) {
that.$refs.uToast.show({ getCurrentUser(that.query.openid, that.query.cityCode).then(res => {
title: '请审核并同意用户协议', uni.setStorageSync('patientId', res.data.id);
type: 'error' uni.setStorageSync('patientName', res.data.patientName);
}) uni.setStorageSync("userinfo", res.data)
} else if (that.query.sex == "") {
that.$refs.uToast.show({
title: '请选择性别',
type: 'error'
})
} else if (!that.query.locationName) {
that.$refs.uToast.show({
title: '请选择所在位置',
type: 'error'
})
} else if (!that.query.birthDate) {
that.$refs.uToast.show({
title: '请选择出生日期',
type: 'error'
})
}
// else if (that.query.diseaseList.length == 0) {
// that.$refs.uToast.show({
// title: '',
// type: 'error'
// })
// }
else {
registerdata(that.query).then(res => {
if (res.code == 200) {
getCurrentUser(that.query.openid, that.query.cityCode).then(res => {
uni.setStorageSync('patientId', res.data.id);
uni.setStorageSync('patientName', res.data.patientName);
uni.setStorageSync("userinfo", res.data)
that.$refs.uToast.show({
title: '注册成功',
type: 'success',
duration: '1000',
back: 1,
})
})
} else {
that.$refs.uToast.show({ that.$refs.uToast.show({
title: res.msg, title: '注册成功',
type: 'error', type: 'success',
duration: '1000',
back: 1,
}) })
} })
}) } else {
} that.$refs.uToast.show({
} else {} title: res.msg,
type: 'error',
})
}
})
}
}); });
}, },
// //
@ -574,9 +566,10 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: #fff; background: #fff;
::v-deep .select-modal .select-dialog{
height: 370rpx !important; ::v-deep .select-modal .select-dialog {
height: 370rpx !important;
} }
.Agreement { .Agreement {
@ -909,4 +902,4 @@
/deep/ .u-form-item__message { /deep/ .u-form-item__message {
padding-left: 0 !important; padding-left: 0 !important;
} }
</style> </style>

View File

@ -77,20 +77,12 @@
methods: { methods: {
info() { info() {
this.region = uni.getStorageSync('region') this.region = uni.getStorageSync('region')
console.log(this.region, '859')
if (this.region == 3) { if (this.region == 3) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '当前地区不支持,请重新选择区域', title: '当前地区不支持,请重新选择区域',
type: 'error', type: 'error',
duration: '2000', duration: '2000',
// url:'/pages/homepage/homepage'
}) })
uni.navigateTo({
'/pages/homepage/homepage'
})
// uni.navigateBack({
// delta: 1
// })
} }
}, },
// //

View File

@ -77,7 +77,7 @@
已签到 已签到
</view> </view>
</view> </view>
<!-- <view class="item" style="background-color: #F44B2F;"> <!-- <view class="item" style="background-color: #F44B2F;">
<image src="../../static/pagesB/yaoqing.png" mode=""></image> <image src="../../static/pagesB/yaoqing.png" mode=""></image>
<view class="titletext"> <view class="titletext">
每邀请 每邀请
@ -290,6 +290,18 @@
that.updata.phone = res.data[0].receivePhone that.updata.phone = res.data[0].receivePhone
that.userid = res.data[0].id that.userid = res.data[0].id
} }
let useritem = null
uni.$on('updata', function(data) {
if (data.useritem) {
useritem = JSON.parse(data.useritem)
that.updata.receiver = useritem.receiveName
that.updata.phone = useritem.receivePhone
that.updata.receiveAddress = useritem.areaName + useritem
.receiveAddress
that.userid = useritem.id
}
uni.$off('updata')
})
} }
} }
}) })
@ -300,17 +312,6 @@
duration: '2000', duration: '2000',
}) })
} }
let useritem = null
uni.$on('updata', function(data) {
if (data.useritem) {
useritem = JSON.parse(data.useritem)
that.updata.receiver = useritem.receiveName
that.updata.phone = useritem.receivePhone
that.updata.receiveAddress = useritem.areaName + useritem.receiveAddress
that.userid = useritem.id
}
uni.$off('updata')
})
}, },
methods: { methods: {
yaoqingshowtrue() { yaoqingshowtrue() {