修改
This commit is contained in:
parent
f39395a161
commit
fd2926b75d
@ -296,7 +296,10 @@
|
||||
},
|
||||
//去登陆
|
||||
gologin() {
|
||||
uni.navigateTo({
|
||||
this.$refs.uToast.show({
|
||||
title: '您未登录,请先登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
},
|
||||
|
||||
@ -192,7 +192,7 @@
|
||||
},
|
||||
//专病管理
|
||||
godiseasemanagement() {
|
||||
// this.openPopup();
|
||||
this.openPopup();
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/diseasemanagement/diseasemanagement'
|
||||
@ -201,12 +201,9 @@
|
||||
},
|
||||
//健康咨询
|
||||
gomedicine() {
|
||||
// this.openPopup();
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/medicine/medicine'
|
||||
})
|
||||
}, 0)
|
||||
uni.navigateTo({
|
||||
url: '/pages/medicine/medicine'
|
||||
})
|
||||
},
|
||||
//跳转客服
|
||||
gocustomerservice() {
|
||||
@ -216,7 +213,7 @@
|
||||
},
|
||||
//跳转护理站页面
|
||||
gosite() {
|
||||
// this.openPopup();
|
||||
this.openPopup();
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/site/site'
|
||||
@ -235,7 +232,7 @@
|
||||
gomaterialbenefits() {
|
||||
// 第二种引入
|
||||
// this.$store.dispatch("openPopup");
|
||||
// this.openPopup();
|
||||
this.openPopup();
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/materialbenefits/materialbenefits'
|
||||
@ -244,7 +241,7 @@
|
||||
},
|
||||
//跳转商城
|
||||
goshopping() {
|
||||
// this.openPopup();
|
||||
this.openPopup();
|
||||
setTimeout(e => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/shopping/shopping'
|
||||
|
||||
@ -12,8 +12,49 @@ const store = new Vuex.Store({
|
||||
//相当于同步的操作
|
||||
//点击确认
|
||||
subscribesuccess(state) {
|
||||
insertSubscribeMessageRecord().then(res => {
|
||||
console.log(res)
|
||||
const openids = uni.getStorageSync('openid');
|
||||
const patientIds = uni.getStorageSync('patientId');
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: [
|
||||
'-IxZeEkkXFhoSwGtBHbipKQ6kjEmkdTkswKeOypSsNQ',
|
||||
'e1JRZaw1OfTz2b6X9DTqqaJtV4rXEt7uhwXoZLDb_eA',
|
||||
'nUB9HRbqQXOVuTpkKBIHMgzWlNq6touzxf5QYBiMkbU'
|
||||
],
|
||||
success(res) {
|
||||
var list = {
|
||||
"subscribeMessageRecordList": [{
|
||||
templateId: '-IxZeEkkXFhoSwGtBHbipKQ6kjEmkdTkswKeOypSsNQ',
|
||||
subscribeStatus: res[
|
||||
'-IxZeEkkXFhoSwGtBHbipKQ6kjEmkdTkswKeOypSsNQ'],
|
||||
openid: openids,
|
||||
patientId: patientIds,
|
||||
},
|
||||
{
|
||||
templateId: 'e1JRZaw1OfTz2b6X9DTqqaJtV4rXEt7uhwXoZLDb_eA',
|
||||
subscribeStatus: res[
|
||||
'e1JRZaw1OfTz2b6X9DTqqaJtV4rXEt7uhwXoZLDb_eA'],
|
||||
openid: openids,
|
||||
patientId: patientIds,
|
||||
},
|
||||
{
|
||||
templateId: 'nUB9HRbqQXOVuTpkKBIHMgzWlNq6touzxf5QYBiMkbU',
|
||||
subscribeStatus: res[
|
||||
'nUB9HRbqQXOVuTpkKBIHMgzWlNq6touzxf5QYBiMkbU'],
|
||||
openid: openids,
|
||||
patientId: patientIds,
|
||||
},
|
||||
]
|
||||
}
|
||||
if (openids && patientId) {
|
||||
insertSubscribeMessageRecord(list).then(ress => {
|
||||
console.log(ress)
|
||||
})
|
||||
}
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err)
|
||||
},
|
||||
complete(scc) {}
|
||||
})
|
||||
},
|
||||
},
|
||||
@ -28,23 +69,7 @@ const store = new Vuex.Store({
|
||||
console.log('res.authSetting', res.authSetting)
|
||||
if (res.authSetting['scope.subscribeMessage']) {} else {
|
||||
//因为没有选择总是保持,所以需要调起授权弹窗再次授权
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: [
|
||||
'-IxZeEkkXFhoSwGtBHbipKQ6kjEmkdTkswKeOypSsNQ',
|
||||
'e1JRZaw1OfTz2b6X9DTqqaJtV4rXEt7uhwXoZLDb_eA',
|
||||
'nUB9HRbqQXOVuTpkKBIHMgzWlNq6touzxf5QYBiMkbU'
|
||||
],
|
||||
success(res) {
|
||||
console.log(res)
|
||||
setTimeout(() => {
|
||||
contxt.commit('subscribesuccess')
|
||||
}, 1000)
|
||||
},
|
||||
fail(err) {
|
||||
console.log(err)
|
||||
},
|
||||
complete(scc) {}
|
||||
})
|
||||
contxt.commit('subscribesuccess')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user