|
@@ -867,23 +867,7 @@
|
|
|
|
|
|
},
|
|
},
|
|
onReady() {
|
|
onReady() {
|
|
- // if (this.carhelp.get("getElderModeClass")) {
|
|
|
|
- // if(this.carhelp.get("getElderModeClass") == "长辈模式") {
|
|
|
|
- // this.fontMode = '1';
|
|
|
|
- // } else {
|
|
|
|
- // this.fontMode = '0';
|
|
|
|
- // }
|
|
|
|
- // API.changeFont({fontMode: this.fontMode}).then((res) => {
|
|
|
|
-
|
|
|
|
- // }).catch(error => {
|
|
|
|
- // uni.showToast({
|
|
|
|
- // title: error,
|
|
|
|
- // icon: "none"
|
|
|
|
- // })
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
- //this.getUserInfo();
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
|
|
WxJsApi.getWxConfig(['getLocation', 'addEventListener', 'scanQRCode']).then((res) => {
|
|
@@ -913,25 +897,29 @@
|
|
},
|
|
},
|
|
onPageScroll(e) {
|
|
onPageScroll(e) {
|
|
|
|
|
|
|
|
+ this.onPageScrollMethod()
|
|
|
|
|
|
-
|
|
|
|
- const query = uni.createSelectorQuery().in(this);
|
|
|
|
- query.select('#options-item').boundingClientRect(data => {
|
|
|
|
- // console.log("节点离页面顶部的距离为" + data.top);
|
|
|
|
- //console.log(this.windowHeight,e.scrollTop ,data.top)
|
|
|
|
- if (this.windowHeight>= data.top+80) {
|
|
|
|
- this.flag =false;
|
|
|
|
- } else {
|
|
|
|
- this.flag = true;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }).exec();
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ updated(){
|
|
|
|
+ this.onPageScrollMethod()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
|
|
+ onPageScrollMethod(){
|
|
|
|
+ const query = uni.createSelectorQuery().in(this);
|
|
|
|
+ query.select('#options-item').boundingClientRect(data => {
|
|
|
|
+ // console.log("节点离页面顶部的距离为" + data.top);
|
|
|
|
+ console.log("onPageScrollMethod" );
|
|
|
|
+ //console.log(this.windowHeight,e.scrollTop ,data.top)
|
|
|
|
+ if(data){
|
|
|
|
+ if (this.windowHeight>= data.top+80) {
|
|
|
|
+ this.flag =false;
|
|
|
|
+ } else {
|
|
|
|
+ this.flag = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }).exec();
|
|
|
|
+ },
|
|
getChargingStationDetail(){
|
|
getChargingStationDetail(){
|
|
var defaultStation=process.car.defaultStation
|
|
var defaultStation=process.car.defaultStation
|
|
for(var item in defaultStation){
|
|
for(var item in defaultStation){
|
|
@@ -1560,7 +1548,8 @@
|
|
},
|
|
},
|
|
getFindChargeData() {
|
|
getFindChargeData() {
|
|
|
|
|
|
- API.findChargeData().then((res) => {
|
|
|
|
|
|
+ API.findChargeData().then((res) => {
|
|
|
|
+ //this.onPageScrollMethod()
|
|
this.chargeList = res.data.chargingRecordList;
|
|
this.chargeList = res.data.chargingRecordList;
|
|
|
|
|
|
var list = res.data.chargingRecordList;
|
|
var list = res.data.chargingRecordList;
|
|
@@ -1742,7 +1731,7 @@
|
|
this.loading = false
|
|
this.loading = false
|
|
siteApi.searchStationData(data).then((response) => {
|
|
siteApi.searchStationData(data).then((response) => {
|
|
|
|
|
|
-
|
|
|
|
|
|
+ //this.onPageScrollMethod()
|
|
if (this.pageIndex2 == 1) {
|
|
if (this.pageIndex2 == 1) {
|
|
this.stationList = response.data.data;
|
|
this.stationList = response.data.data;
|
|
|
|
|