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,52 +35,37 @@ Component({ ...@@ -35,52 +35,37 @@ 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) {
// 触发父组件更新页面 // 触发父组件更新页面 外部小程序
wxService.nextTick(() => { this.setData({
this.triggerEvent('updatePage', { pageId: currentClickType.url }) isAuthorization: false
}) })
} else if(link.type == 3) { return false
// 预览 } else if(link.type == 2) {
wx.previewImage({ // 触发父组件更新页面
current: `https://images.unsplash.com/${currentClickType.imageUrl}`, // 当前显示图片的http链接 wxService.nextTick(() => {
urls: [`http://testimg3.bigaka.com/${currentClickType.link.url}`] // 需要预览的图片http链接列表 this.triggerEvent('updatePage', { pageId: currentClickType.url })
}) })
} else if(link.type == 4) { } else if(link.type == 3) {
wxService.router(`${currentClickType}`) // 预览
} wx.previewImage({
current: `https://images.unsplash.com/${currentClickType.imageUrl}`, // 当前显示图片的http链接
// 是当前小程序 直接跳转 urls: [`http://testimg3.bigaka.com/${currentClickType.link.url}`] // 需要预览的图片http链接列表
// if(accountInfo.miniProgram.appId == appid){ })
// wxService.router(`${path}`) } else if(link.type == 4) {
// } else { wxService.router(`${currentClickType}`)
// // 跳转其他小程序 }
// wx.navigateToMiniProgram({ }
// appId: appid, // else {
// path: `${path}`, // this.setData({
// success: e => { // isAuthorization: true
// console.log(e) // })
// }, // return false
// fail: e => { // }
// console.log(e)
// },
// complete: e => {
// console.log(e)
// },
// })
// }
}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