2023-04-06 15:52:19 +08:00
|
|
|
|
import Vue from 'vue'
|
|
|
|
|
|
import Vuex from 'vuex'
|
|
|
|
|
|
Vue.use(Vuex)
|
|
|
|
|
|
const store = new Vuex.Store({
|
|
|
|
|
|
state: {
|
|
|
|
|
|
//公共的变量,这里的变量不能随便修改,只能通过触发mutations的方法才能改变
|
|
|
|
|
|
},
|
|
|
|
|
|
mutations: {
|
2023-04-06 17:15:57 +08:00
|
|
|
|
//护理员
|
|
|
|
|
|
personsubscribesuccess(state) {
|
|
|
|
|
|
wx.requestSubscribeMessage({
|
|
|
|
|
|
tmplIds: [
|
|
|
|
|
|
't6PZuAOalg6RTh_dzORsHthP4PeZQNSWVqlLmxypyas',
|
|
|
|
|
|
'fmZMOW9dq4kKBH-BEpcVIltbG0C9-aiQUVG3USVfgR8',
|
|
|
|
|
|
],
|
|
|
|
|
|
success(res) {},
|
|
|
|
|
|
fail(err) {},
|
|
|
|
|
|
complete(scc) {}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
//护理站
|
2023-04-06 15:52:19 +08:00
|
|
|
|
//预约订单接受消息通知
|
|
|
|
|
|
subscribesuccess(state) {
|
|
|
|
|
|
wx.requestSubscribeMessage({
|
|
|
|
|
|
tmplIds: [
|
|
|
|
|
|
't6PZuAOalg6RTh_dzORsHsO8Q1meZcgnI-aBmaWo0T8',
|
|
|
|
|
|
'sQQCAXGLyDsQOKfZCGibhSmcamlbc7wKeGBt1pKCyBM',
|
|
|
|
|
|
'LeOiaoAggUK5eEtz8vVs8Pjp0O2lf0T75nc8vTYtfiQ',
|
|
|
|
|
|
],
|
|
|
|
|
|
success(res) {},
|
|
|
|
|
|
fail(err) {},
|
|
|
|
|
|
complete(scc) {}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
//预约订单拒绝消息通知
|
|
|
|
|
|
integralsubscribesuccess(state) {
|
|
|
|
|
|
wx.requestSubscribeMessage({
|
|
|
|
|
|
tmplIds: [
|
|
|
|
|
|
'fmZMOW9dq4kKBH-BEpcVIltbG0C9-aiQUVG3USVfgR8',
|
|
|
|
|
|
'foVV7Gke-8JdzgzHQ7QQrDV5lK1L5xLkuUyZurQC8L4',
|
|
|
|
|
|
],
|
|
|
|
|
|
success(res) {},
|
|
|
|
|
|
fail(err) {},
|
|
|
|
|
|
complete(scc) {}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
actions: {
|
2023-04-06 17:15:57 +08:00
|
|
|
|
//护理员
|
|
|
|
|
|
personopenPopup(contxt) {
|
|
|
|
|
|
const nursePersonIds = uni.getStorageSync('nursePersonId');
|
|
|
|
|
|
wx.getSetting({
|
|
|
|
|
|
withSubscriptions: true,
|
|
|
|
|
|
success(res) {
|
|
|
|
|
|
if (res.authSetting['scope.subscribeMessage']) {} else {
|
2023-04-11 10:38:25 +08:00
|
|
|
|
contxt.commit('personsubscribesuccess')
|
2023-04-06 17:15:57 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
//护理站
|
2023-04-06 15:52:19 +08:00
|
|
|
|
//预约订单拒绝消息通知
|
|
|
|
|
|
integralopenPopup(contxt) {
|
|
|
|
|
|
wx.getSetting({
|
2023-04-06 17:15:57 +08:00
|
|
|
|
withSubscriptions: true,
|
2023-04-06 15:52:19 +08:00
|
|
|
|
success(res) {
|
|
|
|
|
|
if (res.authSetting['scope.subscribeMessage']) {} else {
|
2023-04-11 14:43:12 +08:00
|
|
|
|
contxt.commit('integralsubscribesuccess')
|
2023-04-06 15:52:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
//预约订单接受消息通知
|
|
|
|
|
|
openPopup(contxt) {
|
|
|
|
|
|
wx.getSetting({
|
2023-04-06 17:15:57 +08:00
|
|
|
|
withSubscriptions: true,
|
2023-04-06 15:52:19 +08:00
|
|
|
|
success(res) {
|
|
|
|
|
|
if (res.authSetting['scope.subscribeMessage']) {} else {
|
2023-04-11 14:33:39 +08:00
|
|
|
|
contxt.commit('subscribesuccess')
|
2023-04-06 15:52:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
export default store
|