Commit db3a7fcf by Mobile : Art

update

parent 9e266a4a
......@@ -38,11 +38,8 @@ class Api<T> {
static final String baseApi = "https://backend-uat.feelver.com/api";
<<<<<<< HEAD
static final String baseApiforimage = "https://backend.feelver.com/storage/";
=======
static final String baseApiforimage = "https://backend-uat.feelver.com/api/storage/";
Future<Response<T>> reviewshop(Object body) async {
......@@ -62,7 +59,6 @@ class Api<T> {
});
return result;
}
>>>>>>> baadf91b2b909230e56f29edefbed7cfd2f5e949
Future<Response<T>> deletefavorite(Object body) async {
......@@ -109,7 +105,10 @@ class Api<T> {
var result;
print("this is body"+body.toString());
// (body as Map)['lang'] = allTranslations.currentLanguage;
await _httpConnection("${this._baseApi}/product/getListsProductFormat?vendor_id=16&store_id=406&is_paginate=1&per_page=8&v=2", this._headerApi, null)
await _httpConnection("${this._baseApi}/product/getListsProductFormat?vendor_id=9&store_id=284&is_paginate=1&per_page=1&v=1", this._headerApi, null)
.then((response){
print("ผลลัพท์ เท่ากับ" + "${response.body}");
if(response.statusCode == 200){
......@@ -199,7 +198,7 @@ class Api<T> {
print("this is body " + body.toString());
// (body as Map)['lang'] = allTranslations.currentLanguage;
await http.get(Uri.encodeFull("https://backend.feelver.com/api/portal/product/?id=5"), headers: this._headerApi ).then((response) {
await http.get(Uri.encodeFull("https://backend.feelver.com/api/product/1000?store_id=284&vendor_id=9"), headers: this._headerApi ).then((response) {
print("ผลลัพ เท่ากับบบบ2 " + "${response.body}");
print("statusCode=${response.statusCode}");
if (response.statusCode == 200) {
......
......@@ -18,6 +18,8 @@ class BookingDetailtPresenter extends BasePresenter<BookingDetail> {
Api _api;
String type = '3';
int getid;
int vendor_id;
int store_id;
ProductModel getmodel;
......@@ -25,9 +27,12 @@ class BookingDetailtPresenter extends BasePresenter<BookingDetail> {
getDetail() async {
print(getid);
print(store_id);
print(vendor_id);
_api = Api<ProductModel>();
var res = await _api.getProductDetail({getid});
var res = await _api.getProductDetail({});
if (res.fail == null) {
if (res.success.status) {
......@@ -35,8 +40,7 @@ class BookingDetailtPresenter extends BasePresenter<BookingDetail> {
() {
print("AAAA :${res.success}");
getmodel = res.success;
// print(getmodel.results.data.length);
// print("getmodel" + getmodel[0].results.data[0].storeName);
},
);
}
......
......@@ -10,9 +10,10 @@ import 'dart:math';
class MainShop extends StatefulWidget {
int getid;
int vendor_id;
int store_id;
MainShop({Key key, this.title,this.getid}) : super(key: key);
MainShop({Key key, this.title,this.getid,this.vendor_id,this.store_id}) : super(key: key);
final String title;
......@@ -176,7 +177,7 @@ class _MainShopState extends State<MainShop>
controller: _controller,
children: <Widget>[
Container(
child: BookingDetail(getid: widget.getid,),
child: BookingDetail(getid: widget.getid,vendor_id: widget.vendor_id,store_id: widget.store_id,),
// child: getlist(),
//width: 20,
),
......
......@@ -50,6 +50,8 @@ class _ShopServicePageState extends State<ShopServicePage>
presenter.serviceModel.data[i].specialPrice == null
? ""
: presenter.serviceModel.data[i].specialPrice,
presenter.serviceModel.data[i].vendorId,
presenter.serviceModel.data[i].storeId,
);
},
),
......@@ -57,7 +59,7 @@ class _ShopServicePageState extends State<ShopServicePage>
}
Widget myCard(String title, String image, String price, String time, int id,
String special_price) {
String special_price , int vendor_id,int store_id) {
return InkWell(
onTap: () {
setState(
......@@ -66,7 +68,8 @@ class _ShopServicePageState extends State<ShopServicePage>
context,
CupertinoPageRoute(
builder: (context) => MainShop(
getid: id,
getid: id,vendor_id: vendor_id,store_id: store_id,
),
),
);
......
......@@ -14,11 +14,11 @@ class ShopServicePresenter extends BasePresenter<ShopServicePage> {
Servicelistitem() async {
_api = Api<shopserviceModel>();
var res = await _api.shopservice({
"vendor_id": "16",
"store_id": "406",
"vendor_id": "9",
"store_id": "284",
"is_paginate": "1",
"per_page": "8",
"v": "2",
"per_page": "1",
"v": "1",
});
if (res.fail == null) {
......
......@@ -162,7 +162,7 @@ packages:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.7+4"
version: "0.6.7+6"
image_picker_platform_interface:
dependency: transitive
description:
......@@ -281,14 +281,14 @@ packages:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.8"
version: "0.5.10"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.2+1"
version: "0.0.2+2"
shared_preferences_macos:
dependency: transitive
description:
......
......@@ -14,7 +14,7 @@ description: A new Flutter project.
version: 1.0.0+1
environment:
sdk: ">=2.1.0 <3.0.0"
sdk: ">=2.2.0 <3.0.0"
dependencies:
flutter:
......
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