Commit 07d75b1d by 高淑倩

type89

parent bf7d488f
...@@ -36,13 +36,10 @@ HandlerLink.prototype = { ...@@ -36,13 +36,10 @@ HandlerLink.prototype = {
appId: item.link.appid, appId: item.link.appid,
path: `${item.link.url}`, path: `${item.link.url}`,
success: e => { success: e => {
console.log('type=1', e)
}, },
fail: e => { fail: e => {
console.log('type=1', e)
}, },
complete: e => { complete: e => {
console.log(e)
}, },
}) })
return '' return ''
...@@ -74,6 +71,10 @@ HandlerLink.prototype = { ...@@ -74,6 +71,10 @@ HandlerLink.prototype = {
return `/${item.link.url}` return `/${item.link.url}`
} else if (type == 7) { } else if (type == 7) {
return `${item.link.url}` return `${item.link.url}`
} else if (type == 8) {
return `${item.link.url}`
} else if (type == 9) {
return `${item.link.url}`
} }
} }
} }
......
...@@ -6,12 +6,11 @@ function currentLinkRouter(event, _this) { ...@@ -6,12 +6,11 @@ function currentLinkRouter(event, _this) {
let curItemType = ev.item let curItemType = ev.item
const userInfo = wx.getStorageSync('_baseUserInfo') const userInfo = wx.getStorageSync('_baseUserInfo')
// link row // link row
console.log('curItemType', curItemType)
if (curItemType.link) { if (curItemType.link) {
//处理返回值是空对象时 导致跳转失败 //处理返回值是空对象时 导致跳转失败
if (Object.keys(curItemType.link).length > 0){ if (Object.keys(curItemType.link).length > 0){
let currentClickType = app.globalData.commonFunc.getLink(curItemType.link.type, curItemType) let currentClickType = app.globalData.commonFunc.getLink(curItemType.link.type, curItemType)
if (curItemType.link.type == 1) { if (curItemType.link.type == 1) {
// 触发父组件更新页面 外部小程序 // 触发父组件更新页面 外部小程序
} else if (curItemType.link.type == 2) { } else if (curItemType.link.type == 2) {
...@@ -46,7 +45,7 @@ function currentLinkRouter(event, _this) { ...@@ -46,7 +45,7 @@ function currentLinkRouter(event, _this) {
} else if (curItemType.link.type == 8) { } else if (curItemType.link.type == 8) {
wxService.router(`/pages/productDetail/productDetail?id=${currentClickType}`) wxService.router(`/pages/productDetail/productDetail?id=${currentClickType}`)
} else if (curItemType.link.type == 9) { } else if (curItemType.link.type == 9) {
wxService.router(`/subPackage/page/pages/categoryPro/categoryPro?${currentClickType}`) wxService.router(`/subPackage/page/pages/categoryPro/categoryPro?id=${currentClickType}`)
} }
} }
else{ else{
...@@ -66,7 +65,7 @@ function currentLinkRouter(event, _this) { ...@@ -66,7 +65,7 @@ function currentLinkRouter(event, _this) {
} }
else if (rowObj.type == 9) { else if (rowObj.type == 9) {
// 分类 // 分类
wxService.router(`/subPackage/page/pages/categoryPro/categoryPro?${currentClickRow}`) wxService.router(`/subPackage/page/pages/categoryPro/categoryPro?id=${currentClickRow}`)
} }
} }
} else if (curItemType.row) { } else if (curItemType.row) {
...@@ -86,7 +85,7 @@ function currentLinkRouter(event, _this) { ...@@ -86,7 +85,7 @@ function currentLinkRouter(event, _this) {
} }
else if (rowObj.type == 9) { else if (rowObj.type == 9) {
// 分类 // 分类
wxService.router(`/subPackage/page/pages/categoryPro/categoryPro?${currentClickRow}`) wxService.router(`/subPackage/page/pages/categoryPro/categoryPro?id=${currentClickRow}`)
} }
} }
} }
......
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