fix:修改订阅

This commit is contained in:
阿怪 2024-03-20 22:38:04 +08:00
parent 5d6abb0219
commit 90b72393be
5 changed files with 42 additions and 9 deletions

View File

@ -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()

View File

@ -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()

View File

@ -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();
} }

View File

@ -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">

View File

@ -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
}) })