Commit 6774bdd6 by 高淑倩

modify: type=1_不弹框

parent d6f593c0
...@@ -53,7 +53,13 @@ Component({ ...@@ -53,7 +53,13 @@ Component({
// 更改数据问题 // 更改数据问题
let currentClickType = app.globalData.commonFunc.getLink(item.link.type, item) let currentClickType = app.globalData.commonFunc.getLink(item.link.type, item)
if(link.type == 2) { if(link.type == 1) {
// 触发父组件更新页面 外部小程序
this.setData({
isAuthorization: false
})
return false
} else if(link.type == 2) {
// 触发父组件更新页面 // 触发父组件更新页面
wxService.nextTick(() => { wxService.nextTick(() => {
this.triggerEvent('updatePage', { pageId: currentClickType.url }) this.triggerEvent('updatePage', { pageId: currentClickType.url })
...@@ -68,12 +74,13 @@ Component({ ...@@ -68,12 +74,13 @@ Component({
wxService.router(`${currentClickType}`) wxService.router(`${currentClickType}`)
} }
}else{
this.setData({
isAuthorization: true
})
return false
} }
// else{
// this.setData({
// isAuthorization: true
// })
// return false
// }
} }
} }
} }
......
...@@ -26,7 +26,7 @@ Component({ ...@@ -26,7 +26,7 @@ Component({
circular: true, circular: true,
interval: 5000, interval: 5000,
duration: 1000, duration: 1000,
isAuthorization: false isAuthorization: false // false 不显示 true 显示
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
...@@ -35,13 +35,17 @@ Component({ ...@@ -35,13 +35,17 @@ Component({
preview(e) { preview(e) {
const {appid, path, link,item} = e.currentTarget.dataset const {appid, path, link,item} = e.currentTarget.dataset
// 获取当前帐号信息 // 获取当前帐号信息
const accountInfo = utils.getAccountInfo()
const userInfo = wx.getStorageSync('_baseUserInfo') const userInfo = wx.getStorageSync('_baseUserInfo')
if (userInfo){ if (userInfo){
// app.globalData.commonFunc.getLink(item.link.type, item)
let currentClickType = app.globalData.commonFunc.getLink(item.link.type, item) let currentClickType = app.globalData.commonFunc.getLink(item.link.type, item)
if(link.type == 2) { if(link.type == 1) {
// 触发父组件更新页面 外部小程序
this.setData({
isAuthorization: false
})
return false
} else if(link.type == 2) {
// 触发父组件更新页面 // 触发父组件更新页面
wxService.nextTick(() => { wxService.nextTick(() => {
this.triggerEvent('updatePage', { pageId: currentClickType.url }) this.triggerEvent('updatePage', { pageId: currentClickType.url })
...@@ -55,32 +59,13 @@ Component({ ...@@ -55,32 +59,13 @@ Component({
} else if(link.type == 4) { } else if(link.type == 4) {
wxService.router(`${currentClickType}`) wxService.router(`${currentClickType}`)
} }
}
// 是当前小程序 直接跳转 // else {
// if(accountInfo.miniProgram.appId == appid){ // this.setData({
// wxService.router(`${path}`) // isAuthorization: true
// } else {
// // 跳转其他小程序
// wx.navigateToMiniProgram({
// appId: appid,
// path: `${path}`,
// success: e => {
// console.log(e)
// },
// fail: e => {
// console.log(e)
// },
// complete: e => {
// console.log(e)
// },
// }) // })
// return false
// } // }
}else{
this.setData({
isAuthorization: true
})
return false
}
} }
} }
......
...@@ -73,15 +73,21 @@ Component({ ...@@ -73,15 +73,21 @@ Component({
// }, // },
// }) // })
} }
if (!userInfo){ // if (!userInfo){
// this.setData({
// isAuthorization: true
// })
// return false
// }
// 2019.06.14
let currentClickType = app.globalData.commonFunc.getLink(item.link.type, item)
if(link.type == 1) {
// 触发父组件更新页面 外部小程序
this.setData({ this.setData({
isAuthorization: true isAuthorization: false
}) })
return false return false
} }else if(link.type == 2) {
// 2019.06.14
let currentClickType = app.globalData.commonFunc.getLink(item.link.type, item)
if(link.type == 2) {
// 触发父组件更新页面 // 触发父组件更新页面
wxService.nextTick(() => { wxService.nextTick(() => {
this.triggerEvent('updatePage', { pageId: currentClickType.url }) this.triggerEvent('updatePage', { pageId: currentClickType.url })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment