update shop detail

parent 18c95738
...@@ -8,6 +8,7 @@ import 'package:feelverapp/ui/login/login.dart'; ...@@ -8,6 +8,7 @@ import 'package:feelverapp/ui/login/login.dart';
import 'package:feelverapp/ui/my_reviews/my_reviews_page.dart'; import 'package:feelverapp/ui/my_reviews/my_reviews_page.dart';
import 'package:feelverapp/ui/review_shop/review_shop_page.dart'; import 'package:feelverapp/ui/review_shop/review_shop_page.dart';
import 'package:feelverapp/ui/shop/shop_list.dart'; import 'package:feelverapp/ui/shop/shop_list.dart';
import 'package:feelverapp/ui/shop/shop_list_detail.dart';
import 'package:feelverapp/ui/shop/shop_main.dart'; import 'package:feelverapp/ui/shop/shop_main.dart';
import 'package:feelverapp/ui/splashscreen/splash_screen_page.dart'; import 'package:feelverapp/ui/splashscreen/splash_screen_page.dart';
...@@ -32,7 +33,7 @@ class MyApp extends StatelessWidget { ...@@ -32,7 +33,7 @@ class MyApp extends StatelessWidget {
), ),
home: MainShop() home: SplashScreenPage()
......
...@@ -29,7 +29,7 @@ class Api<T> { ...@@ -29,7 +29,7 @@ class Api<T> {
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYmFja2VuZC11YXQuZmVlbHZlci5jb21cL2FwaVwvbG9naW4iLCJpYXQiOjE1OTYxMDAzNTgsImV4cCI6MTYwMzMwMDM1OCwibmJmIjoxNTk2MTAwMzU4LCJqdGkiOiJ2YjA2S0FHR1JtZDFseEw1Iiwic3ViIjozNzMsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.UkY70AshvW5O4M63XY_Iv2IPBohSUUwnRF1oi46p2zs", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYmFja2VuZC11YXQuZmVlbHZlci5jb21cL2FwaVwvbG9naW4iLCJpYXQiOjE1OTYxMDAzNTgsImV4cCI6MTYwMzMwMDM1OCwibmJmIjoxNTk2MTAwMzU4LCJqdGkiOiJ2YjA2S0FHR1JtZDFseEw1Iiwic3ViIjozNzMsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.UkY70AshvW5O4M63XY_Iv2IPBohSUUwnRF1oi46p2zs",
}; };
static final String baseApi = "https://backend-uat.feelver.com/api"; static final String baseApi = "https://backend-uat.feelver.com/api/storage/";
Future<Response<T>> favorite(Object body) async { Future<Response<T>> favorite(Object body) async {
var _model; var _model;
var _fail; var _fail;
......
import 'package:feelverapp/service/api.dart';
import 'package:feelverapp/ui/nearme/near_me_detail.dart'; import 'package:feelverapp/ui/nearme/near_me_detail.dart';
import 'package:feelverapp/ui/nearme/near_me_list_presenter.dart'; import 'package:feelverapp/ui/nearme/near_me_list_presenter.dart';
import 'package:feelverapp/util/SizeConfig.dart'; import 'package:feelverapp/util/SizeConfig.dart';
...@@ -217,7 +218,7 @@ class _NearmeListState extends State<NearmeList> with TickerProviderStateMixin { ...@@ -217,7 +218,7 @@ class _NearmeListState extends State<NearmeList> with TickerProviderStateMixin {
), ),
Expanded( Expanded(
child: Image.network( child: Image.network(
'https://backend.feelver.com/storage/' + img, Api.baseApi + img,
// width: SizeConfig.getWidth(50), // width: SizeConfig.getWidth(50),
height: SizeConfig.getHeight(160), height: SizeConfig.getHeight(160),
fit: BoxFit.fitHeight, fit: BoxFit.fitHeight,
......
import 'package:feelverapp/service/api.dart';
import 'package:feelverapp/ui/nearme/near_me_detail.dart'; import 'package:feelverapp/ui/nearme/near_me_detail.dart';
import 'package:feelverapp/ui/nearme/near_me_list_presenter.dart'; import 'package:feelverapp/ui/nearme/near_me_list_presenter.dart';
import 'package:feelverapp/ui/shop/shop_main.dart'; import 'package:feelverapp/ui/shop/shop_main.dart';
...@@ -234,7 +235,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>with TickerP ...@@ -234,7 +235,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>with TickerP
fit: BoxFit.cover, fit: BoxFit.cover,
) )
: Image.network( : Image.network(
'https://backend.feelver.com/storage/' + img, Api.baseApi + img,
fit: BoxFit.cover, fit: BoxFit.cover,
),), ),),
), ),
......
...@@ -76,7 +76,7 @@ class _ShopServicePageState extends State<ShopServicePage> ...@@ -76,7 +76,7 @@ class _ShopServicePageState extends State<ShopServicePage>
fit: BoxFit.cover, fit: BoxFit.cover,
) )
: Image.network( : Image.network(
'https://backend.feelver.com/storage/' + image, Api.baseApi + image,
fit: BoxFit.cover, fit: BoxFit.cover,
),), ),),
), ),
......
import 'package:feelverapp/model/shoplistdetail/shoplistdetail_Model.dart'; import 'package:feelverapp/model/shoplistdetail/shoplistdetail_Model.dart';
import 'package:feelverapp/service/Loading.dart';
import 'package:feelverapp/service/api.dart'; import 'package:feelverapp/service/api.dart';
import 'package:feelverapp/service/base_presenter.dart'; import 'package:feelverapp/service/base_presenter.dart';
import 'package:feelverapp/ui/shop/shop_list_detail.dart'; import 'package:feelverapp/ui/shop/shop_list_detail.dart';
...@@ -8,16 +9,24 @@ import 'package:flutter/material.dart'; ...@@ -8,16 +9,24 @@ import 'package:flutter/material.dart';
class ShoplistdetailPresenter extends BasePresenter<ShopListDetail>{ class ShoplistdetailPresenter extends BasePresenter<ShopListDetail>{
Api _api; Api _api;
final formkey = GlobalKey<FormState>(); final formkey = GlobalKey<FormState>();
shoplistdetailModel model;
ShoplistdetailPresenter(State<ShopListDetail> state) : super(state); ShoplistdetailPresenter(State<ShopListDetail> state) : super(state);
Detai() async{ Detai(String id) async{
_api = Api<shoplistdetailModel>(); _api = Api<shoplistdetailModel>();
var res = await _api.shoplistDetail({ var res = await _api.shoplistDetail({
"id": "406", "id": id,
}); });
if (res.fail == null) { if (res.fail == null) {
setState(() {
model = res.success;
print("complete");
});
print('res Success'); print('res Success');
} else { } else {
print('res Fail'); print('res Fail');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment