Commit 6774bdd6 by 高淑倩

modify: type=1_不弹框

parent d6f593c0
......@@ -53,7 +53,13 @@ Component({
// 更改数据问题
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(() => {
this.triggerEvent('updatePage', { pageId: currentClickType.url })
......@@ -68,12 +74,13 @@ Component({
wxService.router(`${currentClickType}`)
}
}else{
this.setData({
isAuthorization: true
})
return false
}
// else{
// this.setData({
// isAuthorization: true
// })
// return false
// }
}
}
}
......
......@@ -26,7 +26,7 @@ Component({
circular: true,
interval: 5000,
duration: 1000,
isAuthorization: false
isAuthorization: false // false 不显示 true 显示
},
/**
* 组件的方法列表
......@@ -35,52 +35,37 @@ Component({
preview(e) {
const {appid, path, link,item} = e.currentTarget.dataset
// 获取当前帐号信息
const accountInfo = utils.getAccountInfo()
const userInfo = wx.getStorageSync('_baseUserInfo')
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) {
// 触发父组件更新页面
wxService.nextTick(() => {
this.triggerEvent('updatePage', { pageId: currentClickType.url })
})
} else if(link.type == 3) {
// 预览
wx.previewImage({
current: `https://images.unsplash.com/${currentClickType.imageUrl}`, // 当前显示图片的http链接
urls: [`http://testimg3.bigaka.com/${currentClickType.link.url}`] // 需要预览的图片http链接列表
})
} else if(link.type == 4) {
wxService.router(`${currentClickType}`)
}
// 是当前小程序 直接跳转
// if(accountInfo.miniProgram.appId == appid){
// wxService.router(`${path}`)
// } else {
// // 跳转其他小程序
// wx.navigateToMiniProgram({
// appId: appid,
// path: `${path}`,
// success: e => {
// console.log(e)
// },
// fail: e => {
// console.log(e)
// },
// complete: e => {
// console.log(e)
// },
// })
// }
}else{
this.setData({
isAuthorization: true
})
return false
}
if(link.type == 1) {
// 触发父组件更新页面 外部小程序
this.setData({
isAuthorization: false
})
return false
} else if(link.type == 2) {
// 触发父组件更新页面
wxService.nextTick(() => {
this.triggerEvent('updatePage', { pageId: currentClickType.url })
})
} else if(link.type == 3) {
// 预览
wx.previewImage({
current: `https://images.unsplash.com/${currentClickType.imageUrl}`, // 当前显示图片的http链接
urls: [`http://testimg3.bigaka.com/${currentClickType.link.url}`] // 需要预览的图片http链接列表
})
} else if(link.type == 4) {
wxService.router(`${currentClickType}`)
}
}
// else {
// this.setData({
// isAuthorization: true
// })
// return false
// }
}
}
......
......@@ -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({
isAuthorization: true
isAuthorization: false
})
return false
}
// 2019.06.14
let currentClickType = app.globalData.commonFunc.getLink(item.link.type, item)
if(link.type == 2) {
}else if(link.type == 2) {
// 触发父组件更新页面
wxService.nextTick(() => {
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