Commit 30a1529e by 高淑倩

observers

parent 8c5db006
...@@ -26,20 +26,20 @@ Component({ ...@@ -26,20 +26,20 @@ Component({
currentRoute: `/${utils.getCurrentPageUrl()}` currentRoute: `/${utils.getCurrentPageUrl()}`
}) })
}, },
observers: { // observers: {
currentRoute(nRoute, oRoute) { // currentRoute(nRoute, oRoute) {
if(nRoute != oRoute){ // if(nRoute != oRoute){
this.setData({ // this.setData({
currentRoute: nRoute // currentRoute: nRoute
}) // })
} // }
const {currentRoute} = this.data // const {currentRoute} = this.data
if(currentRoute.indexOf('subPackage/page/pages/subPage/subPage') > -1){ // if(currentRoute.indexOf('subPackage/page/pages/subPage/subPage') > -1){
// 子页面 判断id // // 子页面 判断id
console.log('=动态子页面===') // console.log('=动态子页面===')
} // }
} // }
}, // },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
......
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