大幅変更&環境バージョンアップ

This commit is contained in:
2024-08-22 14:35:09 +09:00
parent 56e9861c7a
commit dc58dc0584
446 changed files with 29645 additions and 8315 deletions

View File

@ -1,24 +1,22 @@
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:rogapp/utils/const.dart';
import 'package:gifunavi/utils/const.dart';
class ActionService{
static Future<Map<String, dynamic>> makeAction(int userId, int locationId, bool wanttogo, bool like, bool checkin) async {
print("----- action is ---- $like-- $wanttogo-- $checkin");
class ActionService {
static Future<Map<String, dynamic>> makeAction(int userId, int locationId,
bool wanttogo, bool like, bool checkin) async {
//print("----- action is ---- $like-- $wanttogo-- $checkin");
Map<String, dynamic> cats = {};
String serverUrl = ConstValues.currentServer();
String url = "$serverUrl/api/makeaction/?user_id=$userId&location_id=$locationId&wanttogo=$wanttogo&like=$like&checkin=$checkin";
String url =
"$serverUrl/api/makeaction/?user_id=$userId&location_id=$locationId&wanttogo=$wanttogo&like=$like&checkin=$checkin";
//String url = "http://localhost:8100/api/makeaction/?user_id=${user_id}&location_id=${location_id}&wanttogo=${wanttogo}&like=${like}&checkin=${checkin}";
print('++++++++$url');
print("url is ------ $url");
final http.Response response = await http.get(
Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
}
);
//print('++++++++$url');
//print("url is ------ $url");
final http.Response response =
await http.get(Uri.parse(url), headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
});
if (response.statusCode == 200) {
cats = json.decode(utf8.decode(response.bodyBytes));
@ -26,27 +24,23 @@ class ActionService{
return cats;
}
static Future<List<dynamic>?> userAction(int userId, int locationId) async {
static Future<List<dynamic>?> userAction(int userId, int locationId) async {
List<dynamic> cats = [];
String serverUrl = ConstValues.currentServer();
String url = '$serverUrl/api/useraction/?user_id=$userId&location_id=$locationId';
print('++++++++$url');
String url =
'$serverUrl/api/useraction/?user_id=$userId&location_id=$locationId';
//print('++++++++$url');
//String url = 'http://localhost:8100/api/useraction/?user_id=${user_id}&location_id=${location_id}';
final response = await http.get(Uri.parse(url),
final response = await http.get(
Uri.parse(url),
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
);
if (response.statusCode == 200) {
cats = json.decode(utf8.decode(response.bodyBytes));
}
return cats;
}
}