修复押金充值后页面闪烁问题

This commit is contained in:
Sliverber 2024-08-09 20:10:57 +08:00
parent 77175a85d0
commit c9456a3b85
2 changed files with 54 additions and 38 deletions

View File

@ -211,22 +211,22 @@
// ... A // ... A
] ]
}, },
{ // {
"root": "pages_adminSet", // A // "root": "pages_adminSet", // A
"pages": [ // "pages": [
{ // {
"path": "shgl", // "path": "shgl",
"style": { // "style": {
"navigationBarTitleText": "上传", // "navigationBarTitleText": "上传",
"enablePullDownRefresh": false, // "enablePullDownRefresh": false,
"navigationStyle": "custom" // "navigationStyle": "custom"
} // }
} // }
// ... A // // ... A
] // ]
}, // },
{ {
"root": "page_user", "root": "page_user",
"pages": [{ "pages": [{

View File

@ -1069,7 +1069,13 @@
this.$nextTick(() => { this.$nextTick(() => {
this.initScroll(); this.initScroll();
}); });
} },
showdevice(newValue, oldValue) {
console.log('showdevice变化了', newValue, oldValue);
},
deviceIndex(newValue, oldValue) {
console.log('deviceIndex变化了', newValue, oldValue);
},
}, },
@ -1134,9 +1140,9 @@
} }
} }
setTimeout(() => { // setTimeout(() => {
this.$store.commit('SET_SHOWTIPS', true); // this.$store.commit('SET_SHOWTIPS', true);
}, 500) // }, 500)
}, },
onShow() { onShow() {
this.timestare() this.timestare()
@ -1208,7 +1214,8 @@
that.longitude = lb.longitude; that.longitude = lb.longitude;
that.deviceGps.latitude = lb.latitude; that.deviceGps.latitude = lb.latitude;
that.deviceGps.longitude = lb.longitude; that.deviceGps.longitude = lb.longitude;
console.log(that.areaInfo, 'that.areaInfo'); // console.log(that.areaInfo, 'that.areaInfo');
console.log('进入了1111111111111');
that.getArea() that.getArea()
if (that.qParam != 'null' && that.showagre == false) { if (that.qParam != 'null' && that.showagre == false) {
let qParam = that.qParam let qParam = that.qParam
@ -1279,6 +1286,8 @@
} else { } else {
this.getinfo() this.getinfo()
} }
}, },
@ -1288,7 +1297,7 @@
if (this.timers) { if (this.timers) {
clearInterval(this.timers); clearInterval(this.timers);
this.timers = null; this.timers = null;
console.log('定时器已清除'); console.log('定时器已清除1');
} }
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent); xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
xBlufi.notifyStartDiscoverBle({ xBlufi.notifyStartDiscoverBle({
@ -1300,7 +1309,7 @@
if (this.timers) { if (this.timers) {
clearInterval(this.timers); clearInterval(this.timers);
this.timers = null; this.timers = null;
console.log('定时器已清除'); console.log('定时器已清除2');
} }
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent); xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
xBlufi.notifyStartDiscoverBle({ xBlufi.notifyStartDiscoverBle({
@ -1312,7 +1321,7 @@
if (this.timers) { if (this.timers) {
clearInterval(this.timers); clearInterval(this.timers);
this.timers = null; this.timers = null;
console.log('定时器已清除'); console.log('定时器已清除3');
} }
xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent); xBlufi.listenDeviceMsgEvent(false, this.funListenDeviceMsgEvent);
xBlufi.notifyStartDiscoverBle({ xBlufi.notifyStartDiscoverBle({
@ -4382,18 +4391,25 @@
getinfo() { getinfo() {
if (uni.getStorageSync('token')) { if (uni.getStorageSync('token')) {
this.$u.get("/getAppInfo").then((res) => { this.$u.get("/getAppInfo").then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.$store.commit('SET_USERID', res.user.userId); this.$store.commit('SET_USERID', res.user.userId);
this.userinfo = res.user this.userinfo = res.user
setTimeout(()=>{
console.log(this.userinfo.balance,this.deviceIndex,this.showdevice,'this.userinfo.balancethis.userinfo.balancethis.userinfo.balance');
if(this.userinfo.balance!=0&&this.deviceIndex==1&&this.showdevice==true){
this.taploadmask(1)
}
},300)
} else { } else {
setTimeout(() => { // setTimeout(() => {
this.getinfo() // this.getinfo()
}, ) // }, 200)
} }
}); });
} }
@ -4430,11 +4446,10 @@
this.gps.sn = this.sn this.gps.sn = this.sn
} }
this.$u.get('/app/area/info?', this.gps).then((res) => { this.$u.get('/app/area/info?', this.gps).then((res) => {
// this.showmap = true // this.showmap = true
if (res.code === 200) { if (res.code === 200) {
// 线 // 线
const polylines = this.convertBoundaryToPolyline(res.data.boundaryStr) const polylines = this.convertBoundaryToPolyline(res.data.boundaryStr)
// console.log(polylines,'polylinespolylinespolylines'); // console.log(polylines,'polylinespolylinespolylines');
@ -4445,11 +4460,11 @@
setTimeout(() => { setTimeout(() => {
let abb = this.cleanedText() let abb = this.cleanedText()
console.log(abb.length, 'cleanedTextcleanedTextcleanedText'); console.log(abb.length, 'cleanedTextcleanedTextcleanedText');
// //
this.duration = abb.length * 0.3; // 50 px/s this.duration = abb.length * 0.3; // 50 px/s
}, 200) }, 200)
this.polyline.push(polylines) this.polyline.push(polylines)
console.log(); console.log();
// console.log(this.areaInfo, 'areaInfoareaInfo'); // console.log(this.areaInfo, 'areaInfoareaInfo');
@ -4460,14 +4475,14 @@
this.getParking() this.getParking()
if (uni.getStorageSync('token')) { if (uni.getStorageSync('token')) {
this.getisInOrder() this.getisInOrder()
} }
const hasShownPopup = uni.getStorageSync('hasShownPopup'); const hasShownPopup = uni.getStorageSync('hasShownPopup');
console.log(hasShownPopup, 'hasShownPopup'); console.log(hasShownPopup, 'hasShownPopup');
if (hasShownPopup === '' || hasShownPopup === null) { if (hasShownPopup === '' || hasShownPopup === null) {
console.log('1111111111'); console.log('1111111111');
this.showTips = true; this.showTips = true;
this.startCountdown(); this.startCountdown();
uni.setStorageSync('hasShownPopup', true); uni.setStorageSync('hasShownPopup', true);
@ -4476,7 +4491,7 @@
this.showTips = uni.getStorageSync('hasShownPopup'); this.showTips = uni.getStorageSync('hasShownPopup');
console.log(this.showTips, 'this.showTips'); console.log(this.showTips, 'this.showTips');
this.startCountdown(); this.startCountdown();
} }
if (this.sn) { if (this.sn) {
setTimeout(()=>{ setTimeout(()=>{
@ -4490,7 +4505,7 @@
},800) },800)
} }
// if(!hasShownPopup){ // if(!hasShownPopup){
// console.log(typeof(hasShownPopup),'hasShownPopuphasShownPopup'); // console.log(typeof(hasShownPopup),'hasShownPopuphasShownPopup');
// this.showTips=uni.getStorageSync('hasShownPopup') // this.showTips=uni.getStorageSync('hasShownPopup')
@ -4498,7 +4513,7 @@
// this.showTips=true // this.showTips=true
// uni.setStorageSync('hasShownPopup', true); // uni.setStorageSync('hasShownPopup', true);
// } // }
// this.$store.commit('SET_SHOWTIPS', true); // this.$store.commit('SET_SHOWTIPS', true);
// console.log(this.polyline); // console.log(this.polyline);
} else { } else {
@ -4511,6 +4526,7 @@
}).catch(error => { }).catch(error => {
console.error("Error fetching area data:", error); console.error("Error fetching area data:", error);
}); });
}, },
convertBoundaryToPolyline(boundary) { convertBoundaryToPolyline(boundary) {