修改页面
This commit is contained in:
@@ -282,6 +282,32 @@
|
||||
});
|
||||
},
|
||||
getlocahost(){
|
||||
// 检查定位权限
|
||||
uni.getSetting({
|
||||
success: (res) => {
|
||||
if (!res.authSetting['scope.userLocation']) {
|
||||
// 未授权,请求权限
|
||||
uni.authorize({
|
||||
scope: 'scope.userLocation',
|
||||
success: () => {
|
||||
this.getlocahost();
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '定位权限未授权',
|
||||
icon: 'none',
|
||||
});
|
||||
},
|
||||
});
|
||||
} else {
|
||||
// 已授权,直接获取定位
|
||||
this.getlocahost();
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
getlocahost(){
|
||||
|
||||
var that = this
|
||||
uni.getLocation({
|
||||
type: 'wgs84', // 默认为 wgs84 坐标系,可选 gcj02
|
||||
@@ -406,7 +432,7 @@
|
||||
var that = this;
|
||||
uni.uploadFile({
|
||||
// url: 'http://api.crm.hnxinyouhe.com/upload',
|
||||
url: 'http://219.157.255.213:9007',
|
||||
url: 'http://219.157.255.213:9007/upload/uploadImage',
|
||||
filePath: imgUrl,
|
||||
name: 'files',
|
||||
header:{'content-type': 'application/x-www-form-urlencoded','Authorization': 'Bearer ' + uni.getStorageSync('token')},
|
||||
|
||||
Reference in New Issue
Block a user