| @@ -73,8 +73,10 @@ Page({ | |||||
| }, | }, | ||||
| onShow: function(options) { | onShow: function(options) { | ||||
| var that = this; | var that = this; | ||||
| that.getList(); | |||||
| that.init(); | |||||
| if (app.globalData.token) { | |||||
| that.getList(); | |||||
| that.init(); | |||||
| } | |||||
| /** | /** | ||||
| * 只有用户选择了优惠券 | * 只有用户选择了优惠券 | ||||
| * 才会进行券和车牌的绑定 | * 才会进行券和车牌的绑定 | ||||
| @@ -86,7 +88,10 @@ Page({ | |||||
| data: '', | data: '', | ||||
| }) | }) | ||||
| }; | }; | ||||
| that.initUsrCarList(); | |||||
| if (app.globalData.token) { | |||||
| that.initUsrCarList(); | |||||
| } | |||||
| if (that.data.addCar) { | if (that.data.addCar) { | ||||
| // 绑车牌 | // 绑车牌 | ||||
| if (app.globalData.carLogin) { | if (app.globalData.carLogin) { | ||||
| @@ -173,6 +178,9 @@ Page({ | |||||
| Http.setToken(res.data.token); | Http.setToken(res.data.token); | ||||
| that.checkUserCarStatus(); | that.checkUserCarStatus(); | ||||
| that.getUserInfo(); | that.getUserInfo(); | ||||
| that.getList(); | |||||
| that.init(); | |||||
| that.initUsrCarList(); | |||||
| return Http.post({ | return Http.post({ | ||||
| url: config.api.checkUserStatus, | url: config.api.checkUserStatus, | ||||
| data: {} | data: {} | ||||