fix:修改订阅
This commit is contained in:
parent
5d6abb0219
commit
90b72393be
@ -23,6 +23,15 @@
|
|||||||
swiper_h.value = store.systemInfo.windowHeight
|
swiper_h.value = store.systemInfo.windowHeight
|
||||||
}
|
}
|
||||||
getList()
|
getList()
|
||||||
|
uni.requestSubscribeMessage({
|
||||||
|
tmplIds: ['PgxoZOOSDgBcmIGd_EVLDkRzNPA6Cr4MWeG9m4OO3n0'],
|
||||||
|
success: (res) => {
|
||||||
|
console.log(res);
|
||||||
|
},
|
||||||
|
fail(res) {
|
||||||
|
console.log(res);
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
onPullDownRefresh(()=> { // 下拉刷新
|
onPullDownRefresh(()=> { // 下拉刷新
|
||||||
init()
|
init()
|
||||||
|
@ -19,12 +19,9 @@
|
|||||||
if(!store.userInfo) { //没登录过
|
if(!store.userInfo) { //没登录过
|
||||||
// console.log("没有store.userInfo",store.userInfo)
|
// console.log("没有store.userInfo",store.userInfo)
|
||||||
// getHospitalList()
|
// getHospitalList()
|
||||||
setTimeout(()=>{
|
// setTimeout(()=>{
|
||||||
inputDialog.value.open()
|
// inputDialog.value.open()
|
||||||
},0)
|
// },0)
|
||||||
// uni.navigateTo({
|
|
||||||
// url:'/pages/login/login'
|
|
||||||
// })
|
|
||||||
} else {
|
} else {
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
inputDialog.value.close()
|
inputDialog.value.close()
|
||||||
|
@ -99,6 +99,21 @@
|
|||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
mask:true
|
mask:true
|
||||||
})
|
})
|
||||||
|
// 判断是否登录
|
||||||
|
let is_login = util.checkLogin()
|
||||||
|
if(!is_login) {
|
||||||
|
uni.showToast({
|
||||||
|
title:'请先登录',
|
||||||
|
icon:"error",
|
||||||
|
duration:2000,
|
||||||
|
mask:true,
|
||||||
|
success() {
|
||||||
|
store.afterFailLogin(2000)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 判断是否有手术信息
|
||||||
let operation_info = null
|
let operation_info = null
|
||||||
if(uni.getStorageSync('operation_info')) {
|
if(uni.getStorageSync('operation_info')) {
|
||||||
operation_info = JSON.parse(uni.getStorageSync('operation_info'))
|
operation_info = JSON.parse(uni.getStorageSync('operation_info'))
|
||||||
@ -133,6 +148,18 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title:'请填写手术信息',
|
||||||
|
icon:"error",
|
||||||
|
duration:2000,
|
||||||
|
mask:true,
|
||||||
|
success() {
|
||||||
|
setTimeout(() => {
|
||||||
|
store.toProfile()
|
||||||
|
},2000)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
} else { // 已登录
|
} else { // 已登录
|
||||||
userinfo.value = JSON.parse(uni.getStorageSync('userInfo'))
|
userinfo.value = JSON.parse(uni.getStorageSync('userInfo'))
|
||||||
h_info.value = userinfo.value
|
h_info.value = userinfo.value
|
||||||
h_info.value.surgery_time = h_info.value.SurgeryTime
|
h_info.value.surgery_time = h_info.value.surgery_time
|
||||||
userinfo.value.avatar = uni.getStorageSync('avatarUrl')
|
userinfo.value.avatar = uni.getStorageSync('avatarUrl')
|
||||||
h_index.value = hospitals.value.findIndex((item,i) => {
|
h_index.value = hospitals.value.findIndex((item,i) => {
|
||||||
return item.ID == userinfo.value.HospitalId
|
return item.ID == userinfo.value.HospitalId
|
||||||
@ -257,7 +257,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<template v-if="userinfo.IsSurgery == 1">
|
<template>
|
||||||
<view class="rb-card" @tap="toDetail(3)">
|
<view class="rb-card" @tap="toDetail(3)">
|
||||||
<view class="rbc-content">
|
<view class="rbc-content">
|
||||||
<view class="rbc-content-row rbc-content-left rbc-content-left-box">
|
<view class="rbc-content-row rbc-content-left rbc-content-left-box">
|
||||||
|
@ -258,7 +258,7 @@ export const useStore = defineStore('main2', {
|
|||||||
url:"/pages/login/login?token_info="+token_info
|
url:"/pages/login/login?token_info="+token_info
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toProfile(token_info) {
|
toProfile(token_info = null) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:"/pages/user/userInfo?token_info="+token_info
|
url:"/pages/user/userInfo?token_info="+token_info
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user