|
|
@@ -304,20 +304,25 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
created() {
|
|
|
+ this.toastLoading(0, '加载中...', true);
|
|
|
// 授权
|
|
|
- getTicketFun().then(() => {
|
|
|
- // 获取定位
|
|
|
- getPosition()
|
|
|
- .then((res) => {
|
|
|
- let { TXisBD } = res;
|
|
|
- this.getList(TXisBD);
|
|
|
- })
|
|
|
- .catch((error) => {
|
|
|
- this.$dialog.alert({
|
|
|
- message: error,
|
|
|
+ getTicketFun()
|
|
|
+ .then(() => {
|
|
|
+ // 获取定位
|
|
|
+ getPosition()
|
|
|
+ .then((res) => {
|
|
|
+ let { TXisBD } = res;
|
|
|
+ this.getList(TXisBD);
|
|
|
+ })
|
|
|
+ .catch((error) => {
|
|
|
+ this.$dialog.alert({
|
|
|
+ message: error,
|
|
|
+ });
|
|
|
});
|
|
|
- });
|
|
|
- });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.toastLoading().clear();
|
|
|
+ });
|
|
|
this.activeName = this.activaTypeStore || '';
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -328,10 +333,15 @@ export default {
|
|
|
selectUserStoreNoVisits({
|
|
|
lat: TXisBD.lat,
|
|
|
lon: TXisBD.lon,
|
|
|
- }).then((res) => {
|
|
|
- this.list = res.data;
|
|
|
- console.log(this.list);
|
|
|
- });
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ this.toastLoading().clear();
|
|
|
+ this.list = res.data;
|
|
|
+ console.log(this.list);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.toastLoading().clear();
|
|
|
+ });
|
|
|
},
|
|
|
storeDetailFn(id) {
|
|
|
this.$router.push({
|