📅  最后修改于: 2023-12-03 14:39:32.854000             🧑  作者: Mango
Boon是一款基于地图的应用程序,通过智能的分析和推荐系统,帮助用户快速找到周围的商家、活动、景点等信息,为用户提供更好的服务。
# Java代码示例
@RestController
@RequestMapping("/api")
public class MapController {
@Autowired
private MapService mapService;
@GetMapping("/business")
public List<Business> getBusinessByLocation(@RequestParam("longitude") double longitude,
@RequestParam("latitude") double latitude,
@RequestParam("radius") double radius,
@RequestParam("category") String category) {
return mapService.getBusinessByLocation(longitude, latitude, radius, category);
}
}
// Vue.js代码示例
<template>
<div>
<el-button type="primary" @click="search">搜索</el-button>
<el-input v-model="searchText"></el-input>
<el-select v-model="category" placeholder="请选择分类">
<el-option label="餐饮" value="restaurant"></el-option>
<el-option label="景点" value="scenic_spot"></el-option>
<el-option label="购物" value="shopping"></el-option>
</el-select>
</div>
</template>
<script>
export default {
data() {
return {
searchText: '',
category: '',
};
},
methods: {
search() {
const params = {
searchText: this.searchText,
category: this.category,
};
// 发送搜索请求
},
},
};
</script>