fix: 修复 VoiceController Map.of 兼容性 + ExploreController 参数不匹配
- VoiceController: Map.of() -> Collections.singletonMap() 兼容 Java 8 - ExploreController: 补齐 takeoutService.roll() 缺失的 taste/priceRange/allergies 参数 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
30
miniapp/app.js
Normal file
30
miniapp/app.js
Normal file
@@ -0,0 +1,30 @@
|
||||
App({
|
||||
globalData: {
|
||||
userInfo: null,
|
||||
location: null,
|
||||
baseUrl: 'http://localhost:8080'
|
||||
},
|
||||
|
||||
onLaunch() {
|
||||
// 不在 onLaunch 中直接调定位,等用户操作时再申请,符合新版隐私规范
|
||||
},
|
||||
|
||||
getLocation(callback) {
|
||||
const that = this;
|
||||
wx.getLocation({
|
||||
type: 'gcj02',
|
||||
success: (res) => {
|
||||
that.globalData.location = {
|
||||
latitude: res.latitude,
|
||||
longitude: res.longitude
|
||||
};
|
||||
if (callback) callback(null, that.globalData.location);
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('定位失败:', err);
|
||||
// 引导用户手动选择位置或开启定位
|
||||
if (callback) callback(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user