xg
This commit is contained in:
parent
30f9144865
commit
1ea2ea6640
@ -85,20 +85,9 @@
|
|||||||
setTimeout(e => {
|
setTimeout(e => {
|
||||||
// 筛查预约
|
// 筛查预约
|
||||||
if (!this.userInfo) {
|
if (!this.userInfo) {
|
||||||
uni.showModal({
|
this.$refs.uToast.show({
|
||||||
title: "提示",
|
title: res.msg,
|
||||||
content: "您还未注册,是否去注册?",
|
type: '您未登录,请前往我的页面进行登录',
|
||||||
confirmText: '是',
|
|
||||||
cancelText: '否',
|
|
||||||
success(res) {
|
|
||||||
if (res.confirm) {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: "/pagesB/register/register"
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
wx.exitMiniProgram()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
getScreening(this.cardNo).then(res => {
|
getScreening(this.cardNo).then(res => {
|
||||||
|
|||||||
@ -447,9 +447,6 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (resp.data.openid) {
|
|
||||||
uni.setStorageSync("openid", resp.data.openid)
|
|
||||||
}
|
|
||||||
if (resp.data.code == '0') {
|
if (resp.data.code == '0') {
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: '未注册,请先注册',
|
title: '未注册,请先注册',
|
||||||
@ -461,7 +458,7 @@
|
|||||||
}
|
}
|
||||||
that.timer = setTimeout(() => {
|
that.timer = setTimeout(() => {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesB/register/register',
|
url: `/pagesB/register/register?openid=${resp.data.openid}`,
|
||||||
})
|
})
|
||||||
}, 1500)
|
}, 1500)
|
||||||
} else if (resp.data.code == '2') {
|
} else if (resp.data.code == '2') {
|
||||||
@ -471,6 +468,9 @@
|
|||||||
duration: '1500',
|
duration: '1500',
|
||||||
})
|
})
|
||||||
} else if (resp.data.code == '1') {
|
} else if (resp.data.code == '1') {
|
||||||
|
if (resp.data.openid) {
|
||||||
|
uni.setStorageSync("openid", resp.data.openid)
|
||||||
|
}
|
||||||
that.outlogin(that, resp.data.openid)
|
that.outlogin(that, resp.data.openid)
|
||||||
} else {
|
} else {
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
@ -496,12 +496,26 @@
|
|||||||
uni.setStorageSync('phone', res.data
|
uni.setStorageSync('phone', res.data
|
||||||
.phone);
|
.phone);
|
||||||
that.scoket();
|
that.scoket();
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '登录成功',
|
||||||
|
type: 'success',
|
||||||
|
back: 1
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '未查询到信息,请先去注册',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1500',
|
||||||
|
})
|
||||||
|
if (that.timer) {
|
||||||
|
clearTimeout(that.timer)
|
||||||
|
}
|
||||||
|
that.timer = setTimeout(() => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pagesB/register/register?openid=${uni.getStorageSync('openid')}`,
|
||||||
|
})
|
||||||
|
}, 1500)
|
||||||
}
|
}
|
||||||
that.$refs.uToast.show({
|
|
||||||
title: '登录成功',
|
|
||||||
type: 'success',
|
|
||||||
back: 1
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: '登录失败',
|
title: '登录失败',
|
||||||
@ -650,7 +664,8 @@
|
|||||||
gomanagefamily() {
|
gomanagefamily() {
|
||||||
const value = uni.getStorageSync('userinfo');
|
const value = uni.getStorageSync('userinfo');
|
||||||
const value2 = uni.getStorageSync('patientId');
|
const value2 = uni.getStorageSync('patientId');
|
||||||
if (value && value2) {
|
const value3 = uni.getStorageSync('openid');
|
||||||
|
if (value && value2 && value3) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pagesB/managefamily/managefamily'
|
url: '/pagesB/managefamily/managefamily'
|
||||||
})
|
})
|
||||||
@ -660,10 +675,12 @@
|
|||||||
},
|
},
|
||||||
// 添加家庭成员
|
// 添加家庭成员
|
||||||
addFamilyItem() {
|
addFamilyItem() {
|
||||||
uni.navigateTo({
|
if (uni.getStorageSync('openid')) {
|
||||||
url: '/pagesB/AddMembers/AddMembers'
|
uni.navigateTo({
|
||||||
})
|
url: '/pagesB/AddMembers/AddMembers'
|
||||||
this.showhome = false
|
})
|
||||||
|
this.showhome = false
|
||||||
|
}
|
||||||
// if (!this.userInfo) {
|
// if (!this.userInfo) {
|
||||||
// uni.showModal({
|
// uni.showModal({
|
||||||
// title: "提示",
|
// title: "提示",
|
||||||
|
|||||||
@ -20,8 +20,8 @@
|
|||||||
<u-input v-model="form.cardNo" placeholder="请输入身份证号" @blur="searchfun_close" />
|
<u-input v-model="form.cardNo" placeholder="请输入身份证号" @blur="searchfun_close" />
|
||||||
<view class="idScan">
|
<view class="idScan">
|
||||||
<!-- <u-icon slot="right" name="arrow-right"></u-icon> -->
|
<!-- <u-icon slot="right" name="arrow-right"></u-icon> -->
|
||||||
<image style="width: 28rpx;height: 28rpx;"
|
<image style="width: 28rpx;height: 28rpx;" :src="require('@/pagesC/images/sweep.png')"
|
||||||
:src="require('@/pagesC/images/sweep.png')" mode="">
|
mode="">
|
||||||
</image>
|
</image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -210,12 +210,7 @@
|
|||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta: 1
|
delta: 1
|
||||||
})
|
})
|
||||||
|
|
||||||
// uni.navigateTo({
|
|
||||||
// url:`/pagesB/register/register?headPictureUrl=${this.tempImg}`
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 点击 - 取消上传
|
// 点击 - 取消上传
|
||||||
handleCancelClick() {
|
handleCancelClick() {
|
||||||
console.log(this.tempImg)
|
console.log(this.tempImg)
|
||||||
|
|||||||
@ -160,9 +160,6 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (resp.data.openid) {
|
|
||||||
uni.setStorageSync("openid", resp.data.openid)
|
|
||||||
}
|
|
||||||
if (resp.data.code == '0') {
|
if (resp.data.code == '0') {
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: '未注册,请先注册',
|
title: '未注册,请先注册',
|
||||||
@ -174,7 +171,7 @@
|
|||||||
}
|
}
|
||||||
that.timer = setTimeout(() => {
|
that.timer = setTimeout(() => {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pagesB/register/register',
|
url: `/pagesB/register/register?openid=${resp.data.openid}`,
|
||||||
})
|
})
|
||||||
}, 1500)
|
}, 1500)
|
||||||
} else if (resp.data.code == '2') {
|
} else if (resp.data.code == '2') {
|
||||||
@ -184,6 +181,9 @@
|
|||||||
duration: '1500',
|
duration: '1500',
|
||||||
})
|
})
|
||||||
} else if (resp.data.code == '1') {
|
} else if (resp.data.code == '1') {
|
||||||
|
if (resp.data.openid) {
|
||||||
|
uni.setStorageSync("openid", resp.data.openid)
|
||||||
|
}
|
||||||
logingetCurrentUser(resp.data.openid).then(res => {
|
logingetCurrentUser(resp.data.openid).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
@ -192,12 +192,26 @@
|
|||||||
uni.setStorageSync('userinfo', res.data);
|
uni.setStorageSync('userinfo', res.data);
|
||||||
uni.setStorageSync('phone', res.data.phone);
|
uni.setStorageSync('phone', res.data.phone);
|
||||||
that.scoket();
|
that.scoket();
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '登录成功',
|
||||||
|
type: 'success',
|
||||||
|
back: 1
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
that.$refs.uToast.show({
|
||||||
|
title: '未查询到信息,请先去注册',
|
||||||
|
type: 'error',
|
||||||
|
duration: '1500',
|
||||||
|
})
|
||||||
|
if (that.timer) {
|
||||||
|
clearTimeout(that.timer)
|
||||||
|
}
|
||||||
|
that.timer = setTimeout(() => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pagesB/register/register?openid=${uni.getStorageSync('openid')}`,
|
||||||
|
})
|
||||||
|
}, 1500)
|
||||||
}
|
}
|
||||||
that.$refs.uToast.show({
|
|
||||||
title: '登录成功',
|
|
||||||
type: 'success',
|
|
||||||
back: 1
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
that.$refs.uToast.show({
|
that.$refs.uToast.show({
|
||||||
title: '登录失败',
|
title: '登录失败',
|
||||||
@ -250,7 +264,7 @@
|
|||||||
}
|
}
|
||||||
that.timer = setTimeout(() => {
|
that.timer = setTimeout(() => {
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pagesB/register/register',
|
url: `/pagesB/register/register?openid=${uni.getStorageSync('openid')}`,
|
||||||
})
|
})
|
||||||
}, 1500)
|
}, 1500)
|
||||||
} else if (resp.data.code == '2') {
|
} else if (resp.data.code == '2') {
|
||||||
|
|||||||
@ -117,9 +117,11 @@
|
|||||||
},
|
},
|
||||||
// 添加家庭成员
|
// 添加家庭成员
|
||||||
add() {
|
add() {
|
||||||
uni.navigateTo({
|
if (uni.getStorageSync('openid')) {
|
||||||
url: '/pagesB/AddMembers/AddMembers'
|
uni.navigateTo({
|
||||||
})
|
url: '/pagesB/AddMembers/AddMembers'
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
gofamilymemberdetail(item) {
|
gofamilymemberdetail(item) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
|
|||||||
@ -170,6 +170,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
openid:'',
|
||||||
SOCKETURL: '',
|
SOCKETURL: '',
|
||||||
showNation: false, //户主关系
|
showNation: false, //户主关系
|
||||||
actions: [{
|
actions: [{
|
||||||
@ -444,7 +445,7 @@
|
|||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
var that = this
|
var that = this
|
||||||
that.query.openid = uni.getStorageSync('openid');
|
that.query.openid = this.openid
|
||||||
if (!uni.getStorageSync('region')) {
|
if (!uni.getStorageSync('region')) {
|
||||||
uni.setStorageSync("region", 2)
|
uni.setStorageSync("region", 2)
|
||||||
uni.setStorageSync("location", '东营市')
|
uni.setStorageSync("location", '东营市')
|
||||||
@ -489,6 +490,7 @@
|
|||||||
logingetCurrentUser(that.query.openid).then(res => {
|
logingetCurrentUser(that.query.openid).then(res => {
|
||||||
uni.setStorageSync('patientId', res.data.id);
|
uni.setStorageSync('patientId', res.data.id);
|
||||||
uni.setStorageSync('phone', res.data.phone);
|
uni.setStorageSync('phone', res.data.phone);
|
||||||
|
uni.setStorageSync('openid', res.data.openid);
|
||||||
uni.setStorageSync('patientName', res.data
|
uni.setStorageSync('patientName', res.data
|
||||||
.patientName);
|
.patientName);
|
||||||
uni.setStorageSync("userinfo", res.data)
|
uni.setStorageSync("userinfo", res.data)
|
||||||
@ -633,6 +635,7 @@
|
|||||||
// that.query.patientId = value
|
// that.query.patientId = value
|
||||||
// }
|
// }
|
||||||
this.areaInfo()
|
this.areaInfo()
|
||||||
|
this.openid = options.openid
|
||||||
},
|
},
|
||||||
//带参返回
|
//带参返回
|
||||||
// 从地图选点插件返回后,在页面的onShow生命周期函数中能够调用插件接口,取得选点结果对象
|
// 从地图选点插件返回后,在页面的onShow生命周期函数中能够调用插件接口,取得选点结果对象
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user