common.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. class Common{
  2. constructor() {
  3. }
  4. //跳转
  5. navTo(url){
  6. uni.navigateTo({
  7. url:url
  8. })
  9. }
  10. goback(url){
  11. var page = getCurrentPages();
  12. let windpowerstationName = uni.getStorageSync('windpowerstationName');
  13. page[0].$vm.address = windpowerstationName;
  14. if(windpowerstationName=="宁夏新能源公司"){
  15. page[0].$vm.FDC="0";
  16. }
  17. if(windpowerstationName=="麻黄山风电场"){
  18. page[0].$vm.FDC="MHS_FDC";
  19. }
  20. if(windpowerstationName=="牛首山风电场"){
  21. page[0].$vm.FDC="NSS_FDC";
  22. }
  23. if(windpowerstationName=="石板泉风电场"){
  24. page[0].$vm.FDC="SBQ_FDC";
  25. }
  26. if(windpowerstationName=="青山风电场"){
  27. page[0].$vm.FDC="QS_FDC";
  28. }
  29. if(windpowerstationName=="香山风电场"){
  30. page[0].$vm.FDC="XS_FDC";
  31. }
  32. page[0].target_comprehensive_indicators();
  33. page[0].target_windSpeed_power();
  34. page[0].index_windturbine_status();
  35. page[0].index_electricQuantity();
  36. page[0].index_target_basic_indicators();
  37. // uni.showModal({
  38. // title: '提示',
  39. // content: page,
  40. // success: function (res) {
  41. // if (res.confirm) {
  42. // console.log('用户点击确定');
  43. // } else if (res.cancel) {
  44. // console.log('用户点击取消');
  45. // }
  46. // }
  47. // });
  48. // uni.switchTab({
  49. // url: url,success: function(e) {
  50. // //if (page[0] == undefined || page[0] == null) return;
  51. // page[page.length-1].onLoad();
  52. // }
  53. // })
  54. }
  55. }
  56. let common = new Common();
  57. export default common;