Commit db3a7fcf by Mobile : Art

update

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