整改跳转

main
123456 2 weeks ago
parent 1f94b45e21
commit eb94328eef
  1. 15
      pages/index/index.vue
  2. 12
      pages/peiwan/index.vue
  3. 16
      unpackage/dist/dev/app-plus/app-service.js

@ -6,7 +6,7 @@
<view class="address" v-if="city" @click="openPage(5)">
<image src="@/static/dingwei.png"></image>{{city}}
</view>
<view class="address" v-else @click="getLocation()">
<view class="address" v-else @click="toGetLocation()">
<image src="@/static/dingwei.png"></image>获取定位
</view>
<view class="search" @click="openPage(4)">
@ -76,7 +76,7 @@
<view style="padding: 250rpx 0 0;">
<u-empty v-if="!city" text="请开启定位权限" mode="data">
<view slot="bottom" style="margin-top: 30rpx;">
<u-button @click="getLocation()">获取定位</u-button>
<u-button @click="toGetLocation()">获取定位</u-button>
</view>
</u-empty>
</view>
@ -143,7 +143,11 @@
uni.stopPullDownRefresh();
},2000)
},
onLoad() {},
onLoad() {
if(uni.getSystemInfoSync().platform == 'ios') {
this.getLocation();
}
},
onReady() {
const that = this;
uni.$on("clickTap", res=>{
@ -204,8 +208,9 @@
}
},
methods: {
getLocation() {
toGetLocation() {
const that = this;
console.log(111)
// APP
if(uni.getSystemInfoSync().platform == 'android') {
plus.android.checkPermission(
@ -411,7 +416,7 @@
openPage(index,id){
const that = this;
if(!that.city){
that.getLocation();
that.toGetLocation();
return ;
}
if(index == 1){

@ -6,7 +6,7 @@
<view class="address" v-if="city" @click="openPage(2)">
<image src="@/static/dingwei.png"></image>{{city}}
</view>
<view class="address" v-else @click="getLocation()">
<view class="address" v-else @click="toGetLocation()">
<image src="@/static/dingwei.png"></image>获取定位
</view>
<view class="search" @click="openPage(3)">
@ -46,7 +46,7 @@
<view style="padding: 250rpx 0 0;">
<u-empty v-if="!city" text="请开启定位权限" mode="data">
<view slot="bottom" style="margin-top: 30rpx;">
<u-button @click="getLocation()">获取定位</u-button>
<u-button @click="toGetLocation()">获取定位</u-button>
</view>
</u-empty>
</view>
@ -93,7 +93,11 @@
uni.stopPullDownRefresh();
},2000)
},
onLoad() {},
onLoad() {
if(uni.getSystemInfoSync().platform == 'ios') {
this.getLocation();
}
},
onShow() {
if(uni.getStorageSync("userInfo").id){
this.getUserInfo();
@ -278,7 +282,7 @@
},
openPage(index,id){
if(!that.city){
that.getLocation();
that.toGetLocation();
return ;
}
if(index == 1){

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save