This commit is contained in:
2023-11-15 10:31:52 +08:00
parent 1c8404ffd8
commit 54af0a0bd0
4 changed files with 143 additions and 157 deletions

View File

@ -77,6 +77,9 @@
detail, detail,
checkSignApply checkSignApply
} from '@/api/pages/homepage/homepage.js' } from '@/api/pages/homepage/homepage.js'
import {
mapActions
} from "vuex";
export default { export default {
data() { data() {
return { return {
@ -104,6 +107,7 @@
} else {} } else {}
}, },
methods: { methods: {
...mapActions(["openPopup"]),
// //
city() { city() {
uni.navigateTo({ uni.navigateTo({
@ -134,6 +138,8 @@
}, },
// //
goonline() { goonline() {
this.openPopup();
setTimeout(e => {
if (!this.userinfo) { if (!this.userinfo) {
this.gologin(); this.gologin();
} else if (this.userinfo) { } else if (this.userinfo) {
@ -162,6 +168,7 @@
} }
} }
} }
}, 50)
}, },
// //
count() { count() {
@ -242,6 +249,8 @@
}, },
// //
goappoint() { goappoint() {
this.openPopup();
setTimeout(e => {
if (!this.userinfo) { if (!this.userinfo) {
this.gologin(); this.gologin();
} else { } else {
@ -270,6 +279,7 @@
} }
} }
} }
}, 50)
}, },
// //
servicerecord() { servicerecord() {

View File

@ -43,7 +43,6 @@
<script> <script>
import { import {
mapState,
mapActions mapActions
} from "vuex"; } from "vuex";
import { import {
@ -73,9 +72,12 @@
this.getHeathHousing(); this.getHeathHousing();
}, },
methods: { methods: {
//
...mapActions(["openPopup"]),
goAppointmentscreening() { goAppointmentscreening() {
this.openPopup();
setTimeout(e => {
// //
if (!this.userInfo) { if (!this.userInfo) {
uni.showModal({ uni.showModal({
title: "提示", title: "提示",
@ -92,8 +94,7 @@
} }
}, },
}) })
} } else {
else {
getScreening(this.patientId).then(res => { getScreening(this.patientId).then(res => {
if (res.code == 200) { if (res.code == 200) {
let userinfo = JSON.stringify(this.userInfo) let userinfo = JSON.stringify(this.userInfo)
@ -109,12 +110,7 @@
} }
}) })
} }
// uni.navigateTo({ }, 0)
// url: '/pagesB/screenorder/screenorder'
// })
// uni.navigateTo({
// url: '/pagesB/orderlist/orderlist'
// })
}, },
//item //item
gohealthitem(item) { gohealthitem(item) {
@ -132,7 +128,6 @@
url: '/pages/login/login' url: '/pages/login/login'
}) })
} }
}, },
// //
getHeathHousing() { getHeathHousing() {
@ -146,8 +141,6 @@
}) })
}, },
// //
//
...mapActions(["openPopup"]),
gomaterialbenefits() { gomaterialbenefits() {
// //
// this.$store.dispatch("openPopup"); // this.$store.dispatch("openPopup");
@ -188,7 +181,6 @@
url: '/pages/login/login' url: '/pages/login/login'
}) })
} }
}, 0) }, 0)
}, },
// //
@ -207,10 +199,11 @@
url: '/pages/login/login' url: '/pages/login/login'
}) })
} }
}, },
// //
result() { result() {
this.openPopup();
setTimeout(e => {
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId'); const value2 = uni.getStorageSync('patientId');
if (value && value2) { if (value && value2) {
@ -225,13 +218,10 @@
url: '/pages/login/login' url: '/pages/login/login'
}) })
} }
}, 50)
}, },
// //
goshopping() { goshopping() {
// this.openPopup();
setTimeout(e => { setTimeout(e => {
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId'); const value2 = uni.getStorageSync('patientId');
@ -247,34 +237,27 @@
url: '/pages/login/login' url: '/pages/login/login'
}) })
} }
}, 0) }, 0)
}, },
// //
goconsultationplatform() { goconsultationplatform() {
this.openPopup();
setTimeout(e => {
const value = uni.getStorageSync('openid'); const value = uni.getStorageSync('openid');
const value2 = uni.getStorageSync('patientId'); const value2 = uni.getStorageSync('patientId');
const value3 = uni.getStorageSync('region'); if (value && value2) {
if (value && value2 &&value3!=3) {
uni.navigateTo({ uni.navigateTo({
url: '/pagesB/consultationplatform/consultationplatform', url: '/pagesB/consultationplatform/consultationplatform',
}) })
} else if(!value && !value2) { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '您未登录,请先登录', title: '您未登录,请先登录',
type: 'error', type: 'error',
duration: '1000', duration: '1000',
url: '/pages/login/login' url: '/pages/login/login'
}) })
}else if(value3==3){
this.$refs.uToast.show({
title: '请重新选择区域',
type: 'error',
duration: '1000',
})
} }
}, 0)
}, },
}, },
//1. //1.

View File

@ -204,9 +204,6 @@
</template> </template>
<script> <script>
import {
mapActions
} from "vuex";
import { import {
appPersonal, appPersonal,
getFamilyList, getFamilyList,
@ -562,17 +559,13 @@
// } // }
}, },
// //
...mapActions(["integralopenPopup"]),
gointegral() { gointegral() {
const value = uni.getStorageSync('userinfo'); const value = uni.getStorageSync('userinfo');
const value2 = uni.getStorageSync('patientId'); const value2 = uni.getStorageSync('patientId');
if (value && value2) { if (value && value2) {
this.integralopenPopup();
setTimeout(e => {
uni.navigateTo({ uni.navigateTo({
url: `/pagesB/healthybeans/healthybeans?integral=${this.appPersonallist.integral}` url: `/pagesB/healthybeans/healthybeans?integral=${this.appPersonallist.integral}`
}) })
}, 0)
} else { } else {
this.gologin(); this.gologin();
} }

View File

@ -8,22 +8,22 @@ const store = new Vuex.Store({
mutations: { mutations: {
//相当于同步的操作 //相当于同步的操作
//点击确认 //点击确认
subscribesuccess(state) { integralsubscribesuccess(state) {
wx.requestSubscribeMessage({ wx.requestSubscribeMessage({
tmplIds: [ tmplIds: [
'-IxZeEkkXFhoSwGtBHbipKQ6kjEmkdTkswKeOypSsNQ', // 'S_c9bR4znSWpXg-6ACIMn7AkaR11dzo113XM8w4CKz0'
'e1JRZaw1OfTz2b6X9DTqqaJtV4rXEt7uhwXoZLDb_eA',
'nUB9HRbqQXOVuTpkKBIHMgzWlNq6touzxf5QYBiMkbU',
], ],
success(res) {}, success(res) {},
fail(err) {}, fail(err) {},
complete(scc) {} complete(scc) {}
}) })
}, },
integralsubscribesuccess(state) { subscribesuccess(state) {
wx.requestSubscribeMessage({ wx.requestSubscribeMessage({
tmplIds: [ tmplIds: [
'S_c9bR4znSWpXg-6ACIMn7AkaR11dzo113XM8w4CKz0' '8InV9jXDT5sMj9OWfXEvlLQGlw2UaWfZ9OBMFxufmfk',
'2wn1BssReKjZasxKKZRWxBN0VqSmGmkuhc3AhTr18I0',
'MSSKCxOdtMUkY1ACu-u3itz8Vh_w5xDkO2llAOGwElU',
], ],
success(res) {}, success(res) {},
fail(err) {}, fail(err) {},