|
@@ -79,7 +79,6 @@
|
|
定位失败暂时获取不到周边酒店信息哦
|
|
定位失败暂时获取不到周边酒店信息哦
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
- <!-- || !successlogion-->
|
|
|
|
<unipopup :images="images" v-if="enable == 1" :show="ishow"/>
|
|
<unipopup :images="images" v-if="enable == 1" :show="ishow"/>
|
|
<Gobacktop @getop="getop" v-if="isTop" />
|
|
<Gobacktop @getop="getop" v-if="isTop" />
|
|
</view>
|
|
</view>
|
|
@@ -147,8 +146,9 @@
|
|
]),
|
|
]),
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- if(this.beginload) {
|
|
|
|
|
|
+ if(this.successlogion && this.hasLogin) {
|
|
this.getuserinfo();
|
|
this.getuserinfo();
|
|
|
|
+ this.firstget()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onHide() {
|
|
onHide() {
|
|
@@ -158,7 +158,6 @@
|
|
onLoad() {
|
|
onLoad() {
|
|
if(this.beginload) {
|
|
if(this.beginload) {
|
|
this.getpicture(); // 开机广告
|
|
this.getpicture(); // 开机广告
|
|
- //this.gethotelist(); // 酒店列表
|
|
|
|
if(this.allow) {
|
|
if(this.allow) {
|
|
|
|
|
|
}else {
|
|
}else {
|
|
@@ -169,9 +168,12 @@
|
|
});
|
|
});
|
|
this.isGetLocation(); // 检查是否开启定位权限
|
|
this.isGetLocation(); // 检查是否开启定位权限
|
|
this.isUserInfo(); // 检查是否允许获取用户授权
|
|
this.isUserInfo(); // 检查是否允许获取用户授权
|
|
- // 用户授全
|
|
|
|
this.getswiper(); // 获取首页轮播
|
|
this.getswiper(); // 获取首页轮播
|
|
}
|
|
}
|
|
|
|
+ if(this.successlogion && this.hasLogin) {
|
|
|
|
+ this.firstget();
|
|
|
|
+ this.getuserinfo();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
watch: {
|
|
watch: {
|
|
@@ -182,14 +184,28 @@
|
|
});
|
|
});
|
|
this.isGetLocation(); // 检查是否开启定位权限
|
|
this.isGetLocation(); // 检查是否开启定位权限
|
|
this.isUserInfo(); // 检查是否允许获取用户授权
|
|
this.isUserInfo(); // 检查是否允许获取用户授权
|
|
- this.getuserinfo();
|
|
|
|
this.getswiper(); // 获取首页轮播
|
|
this.getswiper(); // 获取首页轮播
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ 'hasLogin':function(val) {
|
|
|
|
+ if(val) {
|
|
|
|
+ this.firstget();
|
|
|
|
+ this.getuserinfo();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapMutations(['login','showDialog']),
|
|
...mapMutations(['login','showDialog']),
|
|
|
|
+ firstget() {
|
|
|
|
+ this.request({
|
|
|
|
+ url:'/v2/member/info',
|
|
|
|
+ method:'GET',
|
|
|
|
+ success: (res)=>{
|
|
|
|
+ this.msg_count = res.data.data.msg_count;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getuserinfo() {
|
|
getuserinfo() {
|
|
- let second = Math.round((Math.random()+1)*3);
|
|
|
|
|
|
+ // let second = Math.round((Math.random()+1)*3);
|
|
this.timer = setInterval(()=>{
|
|
this.timer = setInterval(()=>{
|
|
this.request({
|
|
this.request({
|
|
url:'/v2/member/info',
|
|
url:'/v2/member/info',
|
|
@@ -198,7 +214,7 @@
|
|
this.msg_count = res.data.data.msg_count;
|
|
this.msg_count = res.data.data.msg_count;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- }, second*60000);
|
|
|
|
|
|
+ }, 180000);
|
|
},
|
|
},
|
|
refeshadress() {
|
|
refeshadress() {
|
|
this.isrefesh = false;
|
|
this.isrefesh = false;
|
|
@@ -316,7 +332,6 @@
|
|
});
|
|
});
|
|
_this.amapPlugin.getRegeo({
|
|
_this.amapPlugin.getRegeo({
|
|
success: (data) => {
|
|
success: (data) => {
|
|
- console.log(data);
|
|
|
|
this.isrefesh = true;
|
|
this.isrefesh = true;
|
|
this.location = data[0].name;
|
|
this.location = data[0].name;
|
|
this.lat = data[0].latitude; // 经度
|
|
this.lat = data[0].latitude; // 经度
|