|
@@ -1,78 +1,106 @@
|
|
|
-class Common{
|
|
|
+class Common {
|
|
|
constructor() {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//跳转
|
|
|
- navTo(url){
|
|
|
+ navTo(url) {
|
|
|
uni.navigateTo({
|
|
|
- url:url
|
|
|
+ url: url
|
|
|
})
|
|
|
- }
|
|
|
-
|
|
|
- goback(url){
|
|
|
- var page = getCurrentPages();
|
|
|
- console.log(page);
|
|
|
- console.log(url);
|
|
|
- let windpowerstationName = uni.getStorageSync('windpowerstationName');
|
|
|
- page[page.length-1].$vm.address = windpowerstationName;
|
|
|
- // if(windpowerstationName=="宁夏新能源公司"){
|
|
|
- // if(page[page.length-1].route=="components/weatherProphethomepage/WeatherProphethomepage"){
|
|
|
- // page[page.length-1].$vm.FDC="MHS_FDC";
|
|
|
- // }else{
|
|
|
- // page[page.length-1].$vm.FDC="0";
|
|
|
- // }
|
|
|
- // }
|
|
|
- // if(windpowerstationName=="麻黄山风电场"){
|
|
|
- // page[page.length-1].$vm.FDC="MHS_FDC";
|
|
|
- // }
|
|
|
- // if(windpowerstationName=="牛首山风电场"){
|
|
|
- // page[page.length-1].$vm.FDC="NSS_FDC";
|
|
|
- // }
|
|
|
- // if(windpowerstationName=="石板泉风电场"){
|
|
|
- // page[page.length-1].$vm.FDC="SBQ_FDC";
|
|
|
- // }
|
|
|
- // if(windpowerstationName=="青山风电场"){
|
|
|
- // page[page.length-1].$vm.FDC="QS_FDC";
|
|
|
- // }
|
|
|
- // if(windpowerstationName=="香山风电场"){
|
|
|
- // page[page.length-1].$vm.FDC="XS_FDC";
|
|
|
- // }
|
|
|
- //首页
|
|
|
- if(page[page.length-1].route=="pages/index/Index"){
|
|
|
- page[page.length-1].target_comprehensive_indicators();
|
|
|
- page[page.length-1].target_windSpeed_power();
|
|
|
- page[page.length-1].index_windturbine_status();
|
|
|
- page[page.length-1].index_electricQuantity();
|
|
|
- page[page.length-1].index_target_basic_indicators();
|
|
|
- }
|
|
|
- if(page[page.length-1].route=="components/weatherProphethomepage/WeatherProphethomepage"){
|
|
|
- page[page.length-1].viewUserid();
|
|
|
- page[page.length-1].getWeatherDataToday();
|
|
|
- page[page.length-1].getWeatherData7();
|
|
|
- page[page.length-1].getWeatherData();
|
|
|
- page[page.length-1].getWeatherData40();
|
|
|
- if(windpowerstationName=="宁夏新能源公司"){
|
|
|
- page[page.length-1].$vm.windStationName="麻黄山";
|
|
|
- }
|
|
|
- if(windpowerstationName=="麻黄山风电场"){
|
|
|
- page[page.length-1].$vm.windStationName="麻黄山";
|
|
|
- }
|
|
|
- if(windpowerstationName=="牛首山风电场"){
|
|
|
- page[page.length-1].$vm.windStationName="牛首山";
|
|
|
- }
|
|
|
- if(windpowerstationName=="石板泉风电场"){
|
|
|
- page[page.length-1].$vm.windStationName="石板泉";
|
|
|
- }
|
|
|
- if(windpowerstationName=="青山风电场"){
|
|
|
- page[page.length-1].$vm.windStationName="青山";
|
|
|
- }
|
|
|
- if(windpowerstationName=="香山风电场"){
|
|
|
- page[page.length-1].$vm.windStationName="香山";
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // uni.showModal({
|
|
|
+ }
|
|
|
+
|
|
|
+ goback(url) {
|
|
|
+ var page = getCurrentPages();
|
|
|
+ //debugger
|
|
|
+ console.log(page);
|
|
|
+ console.log(url);
|
|
|
+ let windpowerstationName = uni.getStorageSync('windpowerstationName');
|
|
|
+ page[page.length - 1].$vm.address = windpowerstationName;
|
|
|
+ // if(windpowerstationName=="宁夏新能源公司"){
|
|
|
+ // if(page[page.length-1].route=="components/weatherProphethomepage/WeatherProphethomepage"){
|
|
|
+ // page[page.length-1].$vm.FDC="MHS_FDC";
|
|
|
+ // }else{
|
|
|
+ // page[page.length-1].$vm.FDC="0";
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // if(windpowerstationName=="麻黄山风电场"){
|
|
|
+ // page[page.length-1].$vm.FDC="MHS_FDC";
|
|
|
+ // }
|
|
|
+ // if(windpowerstationName=="牛首山风电场"){
|
|
|
+ // page[page.length-1].$vm.FDC="NSS_FDC";
|
|
|
+ // }
|
|
|
+ // if(windpowerstationName=="石板泉风电场"){
|
|
|
+ // page[page.length-1].$vm.FDC="SBQ_FDC";
|
|
|
+ // }
|
|
|
+ // if(windpowerstationName=="青山风电场"){
|
|
|
+ // page[page.length-1].$vm.FDC="QS_FDC";
|
|
|
+ // }
|
|
|
+ // if(windpowerstationName=="香山风电场"){
|
|
|
+ // page[page.length-1].$vm.FDC="XS_FDC";
|
|
|
+ // }
|
|
|
+ //首页
|
|
|
+ if (page[page.length - 1].route == "pages/index/Index") {
|
|
|
+ page[page.length - 1].target_comprehensive_indicators();
|
|
|
+ page[page.length - 1].target_windSpeed_power();
|
|
|
+ page[page.length - 1].index_windturbine_status();
|
|
|
+ page[page.length - 1].index_electricQuantity();
|
|
|
+ page[page.length - 1].index_target_basic_indicators();
|
|
|
+ }
|
|
|
+ if (page[page.length - 1].route == "pages/forecast/Forecast") {
|
|
|
+
|
|
|
+ //page[page.length-1].$refs.r1.viewUserid();
|
|
|
+ page[page.length - 1].$refs.r1.getWeatherDataToday();
|
|
|
+ page[page.length - 1].$refs.r1.getWeatherData7();
|
|
|
+ page[page.length - 1].$refs.r1.getWeatherData();
|
|
|
+ page[page.length - 1].$refs.r1.getWeatherData40();
|
|
|
+ page[page.length - 1].$refs.r1.address = windpowerstationName;
|
|
|
+ if (windpowerstationName == "宁夏新能源公司") {
|
|
|
+ page[page.length - 1].$refs.r1.windStationName = "麻黄山";
|
|
|
+ page[page.length - 1].$refs.r1.FDC = "0";
|
|
|
+ }
|
|
|
+ if (windpowerstationName == "麻黄山风电场") {
|
|
|
+ page[page.length - 1].$refs.r1.windStationName = "麻黄山";
|
|
|
+ page[page.length - 1].$refs.r1.FDC = "MHS_FDC";
|
|
|
+ }
|
|
|
+ if (windpowerstationName == "牛首山风电场") {
|
|
|
+ page[page.length - 1].$refs.r1.windStationName = "牛首山";
|
|
|
+ page[page.length - 1].$refs.r1.FDC = "NSS_FDC";
|
|
|
+ }
|
|
|
+ if (windpowerstationName == "石板泉风电场") {
|
|
|
+ page[page.length - 1].$refs.r1.windStationName = "石板泉";
|
|
|
+ page[page.length - 1].$refs.r1.FDC = "SBQ_FDC";
|
|
|
+ }
|
|
|
+ if (windpowerstationName == "青山风电场") {
|
|
|
+ page[page.length - 1].$refs.r1.windStationName = "青山";
|
|
|
+ page[page.length - 1].$refs.r1.FDC = "QS_FDC";
|
|
|
+ }
|
|
|
+ if (windpowerstationName == "香山风电场") {
|
|
|
+ page[page.length - 1].$refs.r1.windStationName = "香山";
|
|
|
+ page[page.length - 1].$refs.r1.FDC = "XS_FDC";
|
|
|
+ }
|
|
|
+
|
|
|
+ if (windpowerstationName == "河北能源集团") {
|
|
|
+ page[page.length - 1].$refs.r1.windStationName = "崇礼";
|
|
|
+ page[page.length - 1].$refs.r1.FDC = "0";
|
|
|
+ }
|
|
|
+ if (windpowerstationName == "崇礼风电场") {
|
|
|
+ page[page.length - 1].$refs.r1.windStationName = "崇礼";
|
|
|
+ page[page.length - 1].$refs.r1.FDC = "CL_FDC";
|
|
|
+
|
|
|
+ }
|
|
|
+ if (windpowerstationName == "康保风电场") {
|
|
|
+ page[page.length - 1].$refs.r1.windStationName = "康保";
|
|
|
+ page[page.length - 1].$refs.r1.FDC = "KB_FDC";
|
|
|
+ }
|
|
|
+ if (windpowerstationName == "代县风电场") {
|
|
|
+ page[page.length - 1].$refs.r1.windStationName = "代县";
|
|
|
+ page[page.length - 1].$refs.r1.FDC = "YMG_FDC";
|
|
|
+ }
|
|
|
+ uni.setStorageSync('windPowerStationId',page[page.length - 1].$refs.r1.FDC);
|
|
|
+ }
|
|
|
+
|
|
|
+ // uni.showModal({
|
|
|
// title: '提示',
|
|
|
// content: page,
|
|
|
// success: function (res) {
|
|
@@ -83,21 +111,21 @@ class Common{
|
|
|
// }
|
|
|
// }
|
|
|
// });
|
|
|
-
|
|
|
+
|
|
|
// uni.switchTab({
|
|
|
-
|
|
|
+
|
|
|
// url: url,success: function(e) {
|
|
|
// //if (page[0] == undefined || page[0] == null) return;
|
|
|
// page[page.length-1].onLoad();
|
|
|
// }
|
|
|
-
|
|
|
+
|
|
|
// })
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
let common = new Common();
|
|
|
-export default common;
|
|
|
+export default common;
|