|
|
@@ -105,61 +105,9 @@ export default {
|
|
|
this.isSider = true;
|
|
|
getApp().globalData.isSider = true
|
|
|
}
|
|
|
- var pages = getCurrentPages(); //获取加载的页面
|
|
|
- var currentPage = pages[pages.length - 1]; //获取当前页面的对象
|
|
|
- var url = currentPage.route; //当前页面url
|
|
|
- getApp().globalData.selectedIndex = index;
|
|
|
- let res_url = this.check(url);
|
|
|
- let res_src = this.check(src);
|
|
|
- // console.log(res_url,res_src);
|
|
|
- if (!(res_url && res_src) && !(res_url == false && res_src == false)) {
|
|
|
- // if (index == 0) {
|
|
|
- // getApp().globalData.isSider = false;
|
|
|
- // } else {
|
|
|
- // getApp().globalData.isSider = true;
|
|
|
- // }
|
|
|
- uni.navigateTo({
|
|
|
- url: "/" + src,
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- check(url) {
|
|
|
- let isTure = false;
|
|
|
- let arr = [
|
|
|
- "pages/index/index",
|
|
|
- "pages/park/park_deatil",
|
|
|
- "pages/appeal/index",
|
|
|
- "pages/appeal/myAppeal",
|
|
|
- "pages/appeal/putAppeal",
|
|
|
- "pages/appeal/appeal_detail",
|
|
|
- "pages/policy/index",
|
|
|
- "pages/policy/policy_deatil",
|
|
|
- "pages/park/index",
|
|
|
- "pages/park/map_search",
|
|
|
- "pages/activity/index",
|
|
|
- "pages/activity/activity_deatil",
|
|
|
- "pages/supply/index",
|
|
|
- "pages/supply/putSupply",
|
|
|
- "pages/supply/mySupply",
|
|
|
- "pages/supply/supply_detail",
|
|
|
- "pages/enterprise/index",
|
|
|
- "pages/enterprise/enterprise_detail",
|
|
|
- "pages/enterprise/product_detail",
|
|
|
- "pages/service/index",
|
|
|
- "pages/auth/index",
|
|
|
- "pages/notice/index",
|
|
|
- "pages/notice/notice_deatil",
|
|
|
- "pages/attract/index",
|
|
|
- "pages/attract/attract_deatil",
|
|
|
- ];
|
|
|
- for (let i = 0; i < arr.length; i++) {
|
|
|
- let e = arr[i];
|
|
|
- if (e == url) {
|
|
|
- isTure = true;
|
|
|
- return isTure;
|
|
|
- }
|
|
|
- }
|
|
|
- return isTure;
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/" + src,
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|