|
@@ -1,6 +1,7 @@
|
|
const pages = require('../../mixin/pages')
|
|
const pages = require('../../mixin/pages')
|
|
const { getProductCategoryList } = require('../../api/common')
|
|
const { getProductCategoryList } = require('../../api/common')
|
|
const { getLunboList } = require('./api/index')
|
|
const { getLunboList } = require('./api/index')
|
|
|
|
+const app = getApp()
|
|
let leftHeight = 0
|
|
let leftHeight = 0
|
|
let rightHeight = 0
|
|
let rightHeight = 0
|
|
let query = null
|
|
let query = null
|
|
@@ -206,6 +207,7 @@ Page({
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleSwiperClick(e) {
|
|
handleSwiperClick(e) {
|
|
|
|
+ const isTab = app.globalData.tabBarList.map(item => item.pagePath)
|
|
const { item } = e.currentTarget.dataset
|
|
const { item } = e.currentTarget.dataset
|
|
if (Object.prototype.toString.call(item) === '[object Object]') {
|
|
if (Object.prototype.toString.call(item) === '[object Object]') {
|
|
const { lunbo_link_url } = item
|
|
const { lunbo_link_url } = item
|
|
@@ -214,9 +216,15 @@ Page({
|
|
url: '/pages/h5/h5?url=' + lunbo_link_url
|
|
url: '/pages/h5/h5?url=' + lunbo_link_url
|
|
})
|
|
})
|
|
} else if (/^\/pages/.test(lunbo_link_url)) {
|
|
} else if (/^\/pages/.test(lunbo_link_url)) {
|
|
- wx.navigateTo({
|
|
|
|
- url: lunbo_link_url
|
|
|
|
- })
|
|
|
|
|
|
+ if (isTab.findIndex(item => lunbo_link_url.indexOf(item) > -1) > -1) {
|
|
|
|
+ wx.switchTab({
|
|
|
|
+ url: lunbo_link_url
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ wx.navigateTo({
|
|
|
|
+ url: lunbo_link_url
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|