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