修改
This commit is contained in:
parent
11172e3717
commit
ca98468c3a
@ -32,3 +32,14 @@ export function detail(identity,region) {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
//是否注册
|
||||
export function checkSignApply(identity, region) {
|
||||
return request({
|
||||
url: `/applet/sign/apply/checkSignApply/${identity}`,
|
||||
method: 'GET',
|
||||
header: {
|
||||
region: region,
|
||||
},
|
||||
})
|
||||
}
|
||||
@ -495,7 +495,6 @@
|
||||
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
|
||||
}, {
|
||||
"path": "selectInstitution/selectInstitution",
|
||||
"style": {
|
||||
|
||||
@ -68,8 +68,8 @@
|
||||
import {
|
||||
getOpenId,
|
||||
getCurrentUser,
|
||||
detail
|
||||
|
||||
detail,
|
||||
checkSignApply
|
||||
} from '@/api/pages/homepage/homepage.js'
|
||||
export default {
|
||||
data() {
|
||||
@ -79,6 +79,7 @@
|
||||
identity: '',
|
||||
region: '',
|
||||
openid: '',
|
||||
checkSign: null,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@ -86,38 +87,31 @@
|
||||
},
|
||||
onShow() {
|
||||
this.userinfo = uni.getStorageSync('userinfo');
|
||||
this.region = this.userinfo.cityCode;
|
||||
this.openid = this.userinfo.openid;
|
||||
this.identity = this.userinfo.cardNo;
|
||||
if (!this.openid && !this.region) {
|
||||
// that.appPersonallist = null
|
||||
this.$refs.uToast.show({
|
||||
title: '您未登录,请先登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
})
|
||||
} else {
|
||||
getCurrentUser(this.openid, this.region).then(res => {
|
||||
this.patientName = res.data.patientName
|
||||
uni.setStorageSync('patientId', res.data.id);
|
||||
// if (!res.data) {
|
||||
// // 注册
|
||||
// }
|
||||
if (this.userinfo) {
|
||||
checkSignApply(this.userinfo.cardNo, '1').then(res => {
|
||||
if (res.code != 0) {
|
||||
this.checkSign = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 登录
|
||||
login() {
|
||||
this.gologin();
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/login"
|
||||
})
|
||||
},
|
||||
gologin() {
|
||||
if (!this.userinfo) {
|
||||
this.$refs.uToast.show({
|
||||
title: '您未登录,请先登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
return
|
||||
}
|
||||
},
|
||||
// 签约信息
|
||||
detailinfo(url1, url2) {
|
||||
@ -139,98 +133,100 @@
|
||||
},
|
||||
// 家医签约
|
||||
goonline() {
|
||||
uni.navigateTo({
|
||||
this.gologin();
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
// this.detailinfo('/pagesC/Onlinesigning/Onlinesigning', '/pagesB/mysigning/mysigning')
|
||||
if (!this.userinfo && !this.identity) {
|
||||
// this.gologin();
|
||||
} else {
|
||||
// this.detailinfo('/pagesC/Onlinesigning/Onlinesigning', '/pagesB/mysigning/mysigning')
|
||||
uni.navigateTo({
|
||||
url: "/pagesB/mysigning/mysigning"
|
||||
})
|
||||
}
|
||||
},
|
||||
// 积分兑换
|
||||
count() {
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else {
|
||||
this.detailinfo('', '')
|
||||
uni.navigateTo({
|
||||
url: ""
|
||||
})
|
||||
}
|
||||
},
|
||||
// 健康档案
|
||||
goHealthrecords() {
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
} else {
|
||||
// this.detailinfo('', '')
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/Healthrecords/Healthrecords'
|
||||
url: "/pagesC/Healthrecords/Healthrecords"
|
||||
})
|
||||
}
|
||||
},
|
||||
// 筛查记录
|
||||
gorecords() {
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
} else {
|
||||
// this.detailinfo('', '')
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/Screeningrecords/Screeningrecords'
|
||||
url: "/pagesC/Screeningrecords/Screeningrecords"
|
||||
})
|
||||
}
|
||||
},
|
||||
// 健康自评
|
||||
healthtest() {
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
} else {
|
||||
// this.detailinfo('', '')
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/healthtest/healthtest'
|
||||
url: "/pagesC/healthtest/healthtest"
|
||||
})
|
||||
}
|
||||
},
|
||||
// 体征检测
|
||||
sign() {
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
} else {
|
||||
// this.detailinfo('', '')
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/Physicalexamination/Physicalexamination'
|
||||
url: "/pagesC/Physicalexamination/Physicalexamination"
|
||||
})
|
||||
}
|
||||
},
|
||||
// 服务预约
|
||||
goappoint() {
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/ServiceAppointment/ServiceAppointment'
|
||||
})
|
||||
// if (!this.userinfo && !this.identity) {
|
||||
// this.gologin();
|
||||
// } else {
|
||||
// this.detailinfo('', '/pagesC/ServiceAppointment/ServiceAppointment')
|
||||
// }
|
||||
},
|
||||
// 服务记录
|
||||
servicerecord() {
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else {
|
||||
// this.detailinfo('', '')
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/servicerecord/servicerecord'
|
||||
url: "/pagesC/ServiceAppointment/ServiceAppointment"
|
||||
})
|
||||
}
|
||||
},
|
||||
// 服务记录
|
||||
servicerecord() {
|
||||
this.gologin();
|
||||
uni.navigateTo({
|
||||
url: "/pagesC/servicerecord/servicerecord"
|
||||
})
|
||||
},
|
||||
// 我的预约
|
||||
myappointment() {
|
||||
if (!this.userinfo && !this.identity) {
|
||||
this.gologin();
|
||||
if (!this.checkSign) {
|
||||
this.$refs.uToast.show({
|
||||
title: '未签约,请先签约',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: "/pagesC/Onlinesigning/Onlinesigning"
|
||||
})
|
||||
} else {
|
||||
// this.detailinfo('', '')
|
||||
uni.navigateTo({
|
||||
url: '/pagesC/Myappointment/Myappointment'
|
||||
url: "/pagesC/Myappointment/Myappointment"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@ -24,15 +24,14 @@
|
||||
logincode: undefined,
|
||||
code: undefined,
|
||||
timer: undefined,
|
||||
scenenurseStationId: undefined,
|
||||
codes:'',
|
||||
// scenenurseStationId: undefined,
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.phonecode = undefined
|
||||
this.logincode = undefined
|
||||
this.code = undefined
|
||||
this.scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||
// this.scenenurseStationId = uni.getStorageSync('scenenurseStationId');
|
||||
},
|
||||
methods: {
|
||||
getPhoneNumberp(val) {
|
||||
@ -42,73 +41,53 @@
|
||||
wx.login({
|
||||
provider: 'weixin',
|
||||
success: function(loginRes) {
|
||||
console.log(loginRes)
|
||||
|
||||
// uni.$emit('code',loginRes.code)
|
||||
that.code = loginRes.code
|
||||
isRegistered(that.code).then(resp=>{
|
||||
console.log(resp,'0000')
|
||||
if(!resp.data){
|
||||
uni.navigateTo({
|
||||
url:`/pages/register/register?code=${that.logincode}`
|
||||
})
|
||||
|
||||
}else{
|
||||
uni.setStorageSync('userinfo', resp.data);
|
||||
uni.switchTab({
|
||||
url:'/pages/homepage/homepage'
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
}),
|
||||
that.codes=that.code
|
||||
that.login()
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 是否注册
|
||||
isRegisteredget(){
|
||||
|
||||
|
||||
},
|
||||
login() {
|
||||
let that = this;
|
||||
console.log(that.codes,'9999')
|
||||
getWeChatUser(that.codes).then(res => {
|
||||
getWeChatUser(that.code).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.setStorageSync("openid", res.data)
|
||||
// uni.setStorageSync("patientId", res.data.id)
|
||||
// uni.setStorageSync("phone", res.data.phone)
|
||||
// this.$refs.uToast.show({
|
||||
// title: '登录成功',
|
||||
// type: 'success',
|
||||
// duration: '1500'
|
||||
// })
|
||||
// console.log(this.logincode)
|
||||
// this.phonecode = undefined
|
||||
// this.logincode = undefined
|
||||
// uni.setStorageSync("Refresh", 'Refresh')
|
||||
// if (this.timer) {
|
||||
// clearTimeout(this.timer)
|
||||
// }
|
||||
// this.timer = setTimeout(e => {
|
||||
// uni.navigateBack({
|
||||
// delta: 1
|
||||
// })
|
||||
// }, 500)
|
||||
isRegistered(that.code).then(resp => {
|
||||
if (!resp.data) {
|
||||
that.$refs.uToast.show({
|
||||
title: '未注册,请先注册',
|
||||
type: 'error',
|
||||
duration: '1500',
|
||||
url: '/pages/register/register',
|
||||
})
|
||||
} else {
|
||||
// this.$refs.uToast.show({
|
||||
// title: '登录失败',
|
||||
// type: 'error',
|
||||
// duration: '1500'
|
||||
// })
|
||||
getCurrentUser(that.openid, that.region).then(res => {
|
||||
if (res.code == 200) {
|
||||
that.$refs.uToast.show({
|
||||
title: '登录成功',
|
||||
type: 'success',
|
||||
duration: '1500'
|
||||
})
|
||||
uni.setStorageSync('patientId', res.data.id);
|
||||
uni.setStorageSync('userinfo', resp.data);
|
||||
if (this.timer) {
|
||||
clearTimeout(this.timer)
|
||||
}
|
||||
this.timer = setTimeout(e => {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 500)
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '登录失败',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@ -127,6 +127,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getCurrentUser,
|
||||
} from '@/api/pages/homepage/homepage.js'
|
||||
import {
|
||||
AppIdentification
|
||||
} from '@/api/pagesB/AppIdentification/index.js'
|
||||
@ -197,7 +200,6 @@
|
||||
value: '0',
|
||||
label: '无'
|
||||
}],
|
||||
|
||||
// checked:false,
|
||||
// chooseLocation: '', //地图选址
|
||||
arealist: [], //区街道list
|
||||
@ -214,7 +216,6 @@
|
||||
headPictureUrl: '',
|
||||
couponId: null,
|
||||
patientName: "",
|
||||
|
||||
cardNo: "",
|
||||
phone: "",
|
||||
address: "",
|
||||
@ -298,21 +299,12 @@
|
||||
selectChange(val) {
|
||||
console.log(val);
|
||||
},
|
||||
cancel() {
|
||||
|
||||
},
|
||||
cancel() {},
|
||||
confirm(e) {
|
||||
this.query.diseaseList = e.map(Number)
|
||||
console.log(e)
|
||||
|
||||
},
|
||||
submit() {
|
||||
console.log(this.query)
|
||||
// this.query.openid = uni.getStorageSync('openid');
|
||||
// uni.navigateTo({
|
||||
// url: '/pagesB/information/information'
|
||||
// })
|
||||
|
||||
var that = this
|
||||
that.query.openid = uni.getStorageSync('openid');
|
||||
if (that.query.sexname == '男') {
|
||||
@ -325,10 +317,7 @@
|
||||
title: '请选择性别',
|
||||
type: 'error'
|
||||
})
|
||||
|
||||
}
|
||||
console.log(that.selected)
|
||||
|
||||
if (!that.query.locationName) {
|
||||
that.$refs.uToast.show({
|
||||
title: '请选择所在位置',
|
||||
@ -342,7 +331,6 @@
|
||||
})
|
||||
}
|
||||
that.$refs.uForm.validate(valid => {
|
||||
console.log(valid)
|
||||
if (valid) {
|
||||
if (!that.selected) {
|
||||
that.$refs.uToast.show({
|
||||
@ -351,13 +339,12 @@
|
||||
})
|
||||
} else {
|
||||
registerdata(that.query).then(res => {
|
||||
if (res.code == 500) {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
if (res.code == 200) {
|
||||
getCurrentUser(that.query.openid, '1').then(res => {
|
||||
// uni.setStorageSync('patientId', res.data.id);
|
||||
// uni.setStorageSync('patientName', res.data.patientName);
|
||||
uni.setStorageSync("userinfo", res.data)
|
||||
})
|
||||
}else{
|
||||
uni.setStorageSync("userinfo", that.query)
|
||||
that.$refs.uToast.show({
|
||||
title: '注册成功',
|
||||
type: 'success',
|
||||
@ -366,14 +353,15 @@
|
||||
uni.switchTab({
|
||||
url: '/pages/homepage/homepage',
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: res.msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log('验证失败');
|
||||
})
|
||||
}
|
||||
} else {}
|
||||
});
|
||||
},
|
||||
// 性别
|
||||
@ -389,10 +377,7 @@
|
||||
uni.navigateTo({
|
||||
url: '/pages/facecollection/facecollection'
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
|
||||
//提交信息
|
||||
// informationinfo() {
|
||||
// var that = this
|
||||
@ -640,6 +625,7 @@
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.Agreement {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
@ -648,6 +634,7 @@
|
||||
position: absolute;
|
||||
top: 5%;
|
||||
font-size: 30rpx;
|
||||
|
||||
.title {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
@ -657,12 +644,14 @@
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
height: 830rpx;
|
||||
overflow-y: scroll;
|
||||
text-align: left;
|
||||
text-indent: 2em;
|
||||
}
|
||||
|
||||
.cancel {
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
@ -675,6 +664,7 @@
|
||||
width: 50%;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.determine {
|
||||
height: 70rpx;
|
||||
line-height: 70rpx;
|
||||
@ -687,12 +677,14 @@
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.radio-content {
|
||||
margin: 50rpx auto;
|
||||
width: 70%;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
position: relative;
|
||||
|
||||
.agreement {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@ -700,6 +692,7 @@
|
||||
transform: translateY(-50%);
|
||||
color: #878987;
|
||||
}
|
||||
|
||||
.radio-right {
|
||||
height: 100rpx;
|
||||
|
||||
@ -713,6 +706,7 @@
|
||||
top: 50%;
|
||||
left: 5%;
|
||||
transform: translateY(-50%);
|
||||
|
||||
.radio-active {
|
||||
width: 16rpx;
|
||||
height: 16rpx;
|
||||
@ -740,6 +734,7 @@
|
||||
|
||||
.form {
|
||||
margin-top: 106rpx;
|
||||
|
||||
::v-deep .u-input {
|
||||
width: 630rpx;
|
||||
height: 63rpx;
|
||||
|
||||
@ -137,8 +137,6 @@
|
||||
<u-checkbox v-model="item.checked" v-for="(item, index) in crowdslist" :key="index"
|
||||
:name="item.crowdNo" label-size='20rpx'>{{item.crowdName}}</u-checkbox>
|
||||
</u-checkbox-group>
|
||||
|
||||
|
||||
<u-checkbox-group @change="packagescheckboxGroupChange" v-model="query.packagesName"
|
||||
v-if="showGroup == 2" label-size='20rpx'>
|
||||
<u-checkbox v-model="item.checked" v-for="(item, index) in packageslist" :key="index"
|
||||
@ -208,6 +206,17 @@
|
||||
methods: {
|
||||
updata() {
|
||||
if (this.radio == 2) {
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
if (month < 10) {
|
||||
month = '0' + month;
|
||||
}
|
||||
if (day < 10) {
|
||||
day = '0' + day;
|
||||
}
|
||||
this.query.signTime = year + '-' + month + '-' + day;
|
||||
if (this.query.identity) {
|
||||
this.query.birthday = getBirthday(this.query.identity)
|
||||
let gender = getSex(this.query.identity)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user