Commit 15a4a3db authored by 潘永坪's avatar 潘永坪

请求优化

parent 75f4af3b
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
{ {
"launchtype" : "local" "launchtype" : "local"
}, },
"mp-toutiao" :
{
"launchtype" : "local"
},
"mp-weixin" : "mp-weixin" :
{ {
"launchtype" : "local" "launchtype" : "local"
......
...@@ -58,7 +58,7 @@ export default { ...@@ -58,7 +58,7 @@ export default {
9.css单位为rpx 9.css单位为rpx
*/ */
page{font-size:28rpx;color: #333333;background: #F7F7F7;height: 100%;} page{font-size:28rpx;color: #333333;background: #F7F7F7;height: 100%;}
view,text,image{box-sizing:border-box;} view,text,image,video,button,checkbox,form,input,label,radio,switch,textarea{box-sizing:border-box;}
.btn{background:linear-gradient(132deg, #ED400C 0%, #FB862C 100%);display: inline-block;color: #FFFFFF;font-size:28rpx;border-radius:8rpx;text-align: center;} .btn{background:linear-gradient(132deg, #ED400C 0%, #FB862C 100%);display: inline-block;color: #FFFFFF;font-size:28rpx;border-radius:8rpx;text-align: center;}
/*单行溢出*/ /*单行溢出*/
.one-txt-cut{ .one-txt-cut{
......
...@@ -143,6 +143,7 @@ ...@@ -143,6 +143,7 @@
orderId:"",//订单Id orderId:"",//订单Id
paydJumpUrl:"",//页面跳转路径 paydJumpUrl:"",//页面跳转路径
companyAttribute:"",//等于5时为出租车 companyAttribute:"",//等于5时为出租车
timer:null,//定时器
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -176,6 +177,14 @@ ...@@ -176,6 +177,14 @@
this.login() this.login()
} }
}, },
// 一般页面用onUnload
// tabbar页面用onHide
onUnload() {
if(this.timer) {
clearTimeout(this.timer)
this.timer = null
}
},
methods: { methods: {
getUserBrowse(){//---获取浏览记录 getUserBrowse(){//---获取浏览记录
let queryUrl=this.$commonjs.getCurrentPageUrl() let queryUrl=this.$commonjs.getCurrentPageUrl()
...@@ -243,6 +252,9 @@ ...@@ -243,6 +252,9 @@
title:"登录失败", title:"登录失败",
icon:"none" icon:"none"
}) })
_this.timer = setTimeout(() => {
_this.login()
}, 2000)
}) })
}else{ }else{
uni.showToast({ uni.showToast({
...@@ -255,6 +267,9 @@ ...@@ -255,6 +267,9 @@
title:"登录失败", title:"登录失败",
icon:"none" icon:"none"
}) })
_this.timer = setTimeout(() => {
_this.login()
}, 2000)
}) })
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment