修改页面

This commit is contained in:
浅念
2025-03-22 16:35:45 +08:00
parent 24d77cc5b9
commit da30bda3b0
9 changed files with 819 additions and 41 deletions
+27 -1
View File
@@ -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')},