Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
feelver
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2F-ART
feelver
Commits
4d86403a
Commit
4d86403a
authored
Aug 05, 2020
by
Mobile : Ball (Apprentice)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
9773dcd7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
31 deletions
+96
-31
lib/home_search/searchhomepage_model.dart
+0
-0
lib/model/shoplistdetail/shoplistdetail_Model.dart
+28
-28
lib/service/api.dart
+23
-0
lib/ui/home/home.dart
+2
-0
lib/ui/home/home_presenter.dart
+40
-0
lib/ui/shop/shop_list.dart
+3
-3
No files found.
lib/home_search/searchhomepage_model.dart
0 → 100644
View file @
4d86403a
This diff is collapsed.
Click to expand it.
lib/model/shoplistdetail/shoplistdetail_Model.dart
View file @
4d86403a
...
@@ -49,9 +49,9 @@ class Result {
...
@@ -49,9 +49,9 @@ class Result {
String
star
;
String
star
;
List
<
StoreProduct
>
storeProduct
;
List
<
StoreProduct
>
storeProduct
;
List
<
Comment
>
comment
;
List
<
Comment
>
comment
;
List
<
Null
>
commentReview
;
List
<
dynamic
>
commentReview
;
List
<
OpenHour
>
openHour
;
List
<
OpenHour
>
openHour
;
List
<
Null
>
image
;
List
<
dynamic
>
image
;
Ratings
ratings
;
Ratings
ratings
;
Result
({
this
.
id
,
this
.
storeCode
,
this
.
storeName
,
this
.
storeCover
,
this
.
displayCover
,
this
.
isActive
,
this
.
storeOrder
,
this
.
customerGroupId
,
this
.
vendorId
,
this
.
createdAt
,
this
.
updatedAt
,
this
.
location
,
this
.
email
,
this
.
phone
,
this
.
mobile
,
this
.
address
,
this
.
city
,
this
.
country
,
this
.
zipCode
,
this
.
website
,
this
.
allowRoute
,
this
.
excerpt
,
this
.
detail
,
this
.
storeLogo
,
this
.
isFacilities
,
this
.
distanceWithLocation
,
this
.
star
,
this
.
storeProduct
,
this
.
comment
,
this
.
commentReview
,
this
.
openHour
,
this
.
image
,
this
.
ratings
});
Result
({
this
.
id
,
this
.
storeCode
,
this
.
storeName
,
this
.
storeCover
,
this
.
displayCover
,
this
.
isActive
,
this
.
storeOrder
,
this
.
customerGroupId
,
this
.
vendorId
,
this
.
createdAt
,
this
.
updatedAt
,
this
.
location
,
this
.
email
,
this
.
phone
,
this
.
mobile
,
this
.
address
,
this
.
city
,
this
.
country
,
this
.
zipCode
,
this
.
website
,
this
.
allowRoute
,
this
.
excerpt
,
this
.
detail
,
this
.
storeLogo
,
this
.
isFacilities
,
this
.
distanceWithLocation
,
this
.
star
,
this
.
storeProduct
,
this
.
comment
,
this
.
commentReview
,
this
.
openHour
,
this
.
image
,
this
.
ratings
});
...
@@ -155,7 +155,7 @@ class StoreProduct {
...
@@ -155,7 +155,7 @@ class StoreProduct {
int
vendorId
;
int
vendorId
;
String
status
;
String
status
;
int
sortOrders
;
int
sortOrders
;
Null
createdAt
;
dynamic
createdAt
;
String
updatedAt
;
String
updatedAt
;
String
typeRateService
;
String
typeRateService
;
String
priceRateService
;
String
priceRateService
;
...
@@ -206,20 +206,20 @@ class Product {
...
@@ -206,20 +206,20 @@ class Product {
String
price
;
String
price
;
String
specialPrice
;
String
specialPrice
;
String
sku
;
String
sku
;
Null
tax
;
dynamic
tax
;
int
quantity
;
int
quantity
;
Null
weight
;
dynamic
weight
;
String
visibility
;
String
visibility
;
Null
newsFromDate
;
dynamic
newsFromDate
;
Null
newsToDate
;
dynamic
newsToDate
;
Null
layout
;
dynamic
layout
;
Null
theme
;
dynamic
theme
;
String
duration
;
String
duration
;
Null
sellingStartTime
;
dynamic
sellingStartTime
;
Null
sellingEndTime
;
dynamic
sellingEndTime
;
Null
redemptionStartTime
;
dynamic
redemptionStartTime
;
Null
redemptionEndTime
;
dynamic
redemptionEndTime
;
Null
availibility
;
dynamic
availibility
;
String
isFeatured
;
String
isFeatured
;
String
isDeal
;
String
isDeal
;
String
hasTeam
;
String
hasTeam
;
...
@@ -353,12 +353,12 @@ class CategoryFeelverByProductId {
...
@@ -353,12 +353,12 @@ class CategoryFeelverByProductId {
String
displayName
;
String
displayName
;
String
cover
;
String
cover
;
String
detail
;
String
detail
;
Null
type
;
dynamic
type
;
String
status
;
String
status
;
int
sortOrder
;
int
sortOrder
;
Null
storeId
;
dynamic
storeId
;
Null
vendorId
;
dynamic
vendorId
;
Null
createdAt
;
dynamic
createdAt
;
String
updatedAt
;
String
updatedAt
;
String
visibility
;
String
visibility
;
Pivot
pivot
;
Pivot
pivot
;
...
@@ -438,19 +438,19 @@ class Comment {
...
@@ -438,19 +438,19 @@ class Comment {
int
commentItemsId
;
int
commentItemsId
;
String
commentAuthor
;
String
commentAuthor
;
String
commentEmail
;
String
commentEmail
;
Null
commentUrl
;
dynamic
commentUrl
;
String
commentIp
;
String
commentIp
;
String
commentDate
;
String
commentDate
;
String
commentContent
;
String
commentContent
;
String
commentApproved
;
String
commentApproved
;
String
commentType
;
String
commentType
;
Null
commentParent
;
dynamic
commentParent
;
String
status
;
String
status
;
int
userId
;
int
userId
;
int
storeId
;
int
storeId
;
int
vendorId
;
int
vendorId
;
Null
createdAt
;
dynamic
createdAt
;
Null
updatedAt
;
dynamic
updatedAt
;
int
shopScore
;
int
shopScore
;
int
flagShop
;
int
flagShop
;
List
<
Null
>
tagShop
;
List
<
Null
>
tagShop
;
...
@@ -522,7 +522,7 @@ class Comment {
...
@@ -522,7 +522,7 @@ class Comment {
class
InfoCustomer
{
class
InfoCustomer
{
int
id
;
int
id
;
Null
prefix
;
dynamic
prefix
;
String
name
;
String
name
;
String
lastname
;
String
lastname
;
String
displayName
;
String
displayName
;
...
@@ -533,10 +533,10 @@ class InfoCustomer {
...
@@ -533,10 +533,10 @@ class InfoCustomer {
String
phone
;
String
phone
;
String
address
;
String
address
;
String
socialRegister
;
String
socialRegister
;
Null
socialType
;
dynamic
socialType
;
String
status
;
String
status
;
String
approved
;
String
approved
;
Null
createdAt
;
dynamic
createdAt
;
String
updatedAt
;
String
updatedAt
;
int
userId
;
int
userId
;
...
@@ -597,8 +597,8 @@ class OpenHour {
...
@@ -597,8 +597,8 @@ class OpenHour {
String
halftime
;
String
halftime
;
int
vendorId
;
int
vendorId
;
int
storeId
;
int
storeId
;
Null
createdAt
;
dynamic
createdAt
;
Null
updatedAt
;
dynamic
updatedAt
;
OpenHour
({
this
.
id
,
this
.
name
,
this
.
code
,
this
.
dayName
,
this
.
open
,
this
.
closed
,
this
.
halftime
,
this
.
vendorId
,
this
.
storeId
,
this
.
createdAt
,
this
.
updatedAt
});
OpenHour
({
this
.
id
,
this
.
name
,
this
.
code
,
this
.
dayName
,
this
.
open
,
this
.
closed
,
this
.
halftime
,
this
.
vendorId
,
this
.
storeId
,
this
.
createdAt
,
this
.
updatedAt
});
...
@@ -641,7 +641,7 @@ class Ratings {
...
@@ -641,7 +641,7 @@ class Ratings {
String
rateTb
;
String
rateTb
;
int
rateRowId
;
int
rateRowId
;
String
isCustom
;
String
isCustom
;
Null
customScore
;
dynamic
customScore
;
int
rateRange
;
int
rateRange
;
int
storeId
;
int
storeId
;
int
vendorId
;
int
vendorId
;
...
...
lib/service/api.dart
View file @
4d86403a
import
'dart:convert'
;
import
'dart:convert'
;
import
'package:feelverapp/home_search/searchhomepage_model.dart'
;
import
'package:feelverapp/model/Login/login_model.dart'
;
import
'package:feelverapp/model/Login/login_model.dart'
;
import
'package:feelverapp/model/base/base.dart'
;
import
'package:feelverapp/model/base/base.dart'
;
...
@@ -23,6 +25,27 @@ class Api<T> {
...
@@ -23,6 +25,27 @@ class Api<T> {
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYmFja2VuZC11YXQuZmVlbHZlci5jb21cL2FwaVwvbG9naW4iLCJpYXQiOjE1OTYxMDAzNTgsImV4cCI6MTYwMzMwMDM1OCwibmJmIjoxNTk2MTAwMzU4LCJqdGkiOiJ2YjA2S0FHR1JtZDFseEw1Iiwic3ViIjozNzMsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.UkY70AshvW5O4M63XY_Iv2IPBohSUUwnRF1oi46p2zs"
,
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYmFja2VuZC11YXQuZmVlbHZlci5jb21cL2FwaVwvbG9naW4iLCJpYXQiOjE1OTYxMDAzNTgsImV4cCI6MTYwMzMwMDM1OCwibmJmIjoxNTk2MTAwMzU4LCJqdGkiOiJ2YjA2S0FHR1JtZDFseEw1Iiwic3ViIjozNzMsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.UkY70AshvW5O4M63XY_Iv2IPBohSUUwnRF1oi46p2zs"
,
};
};
Future
<
Response
<
T
>>
homesearch
(
Object
body
)
async
{
var
_model
;
var
_fail
;
var
result
;
// (body as Map)['lang'] = allTranslations.currentLanguage;
await
_httpConnection
(
"
${this._baseApi}
/store/shop-list"
,
this
.
_headerApi
,
body
)
.
then
((
response
){
print
(
"ผลลัพ เท่ากับบบบ "
+
"
${response.body}
"
);
if
(
response
.
statusCode
==
200
){
_model
=
SearchhomeModel
.
fromJson
(
json
.
decode
(
response
.
body
));
}
else
{
_fail
=
FailModel
.
fromJson
(
json
.
decode
(
response
.
body
));
}
result
=
new
Response
<
T
>(
_model
,
_fail
);
});
return
result
;
}
Future
<
Response
<
T
>>
getprofile
(
Object
body
)
async
{
Future
<
Response
<
T
>>
getprofile
(
Object
body
)
async
{
var
_model
;
var
_model
;
var
_fail
;
var
_fail
;
...
...
lib/ui/home/home.dart
View file @
4d86403a
...
@@ -33,6 +33,8 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -33,6 +33,8 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
// presenter.getid();
// presenter.getid();
presenter
.
getprofile
();
presenter
.
getprofile
();
presenter
.
Search
();
}
}
...
...
lib/ui/home/home_presenter.dart
View file @
4d86403a
import
'package:feelverapp/home_search/searchhomepage_model.dart'
;
import
'package:feelverapp/model/Login/login_model.dart'
;
import
'package:feelverapp/model/Login/login_model.dart'
;
import
'package:feelverapp/model/category/category_model.dart'
;
import
'package:feelverapp/model/category/category_model.dart'
;
import
'package:feelverapp/model/editprofile/getprofilemodel.dart'
;
import
'package:feelverapp/model/editprofile/getprofilemodel.dart'
;
...
@@ -32,6 +33,45 @@ class HomePresenter extends BasePresenter<HomePage> {
...
@@ -32,6 +33,45 @@ class HomePresenter extends BasePresenter<HomePage> {
}
}
}
}
Search
()
async
{
_api
=
Api
<
SearchhomeModel
>();
var
res
=
await
_api
.
homesearch
({
"keyword_shop"
:
"spa"
,
"lang"
:
"all"
,
"access"
:
"portal"
,
});
if
(
res
.
fail
==
null
)
{
print
(
'res Success'
);
}
else
{
Alert
(
style:
AlertStyle
(
animationType:
AnimationType
.
fromTop
,
isCloseButton:
false
,
),
context:
state
.
context
,
title:
"ไม่สามารถติดต่อ
\n
เซิร์ฟเวอร์ได้"
,
content:
Icon
(
Icons
.
warning
,
color:
Colors
.
orange
,
size:
80
,
),
buttons:
[
DialogButton
(
color:
Color
.
fromRGBO
(
106
,
179
,
170
,
1
),
onPressed:
()
=>
Navigator
.
pop
(
state
.
context
),
child:
Text
(
"ค้นหาใหม่อีกครั้ง"
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
20
),
),
)
]).
show
();
}
}
getid
()
async
{
getid
()
async
{
SharedPreferences
pref
=
await
SharedPreferences
.
getInstance
();
SharedPreferences
pref
=
await
SharedPreferences
.
getInstance
();
setState
(()
{
uid
=
pref
.
getString
(
'Id'
);});
setState
(()
{
uid
=
pref
.
getString
(
'Id'
);});
...
...
lib/ui/shop/shop_list.dart
View file @
4d86403a
...
@@ -13,7 +13,7 @@ class ShopList extends StatefulWidget {
...
@@ -13,7 +13,7 @@ class ShopList extends StatefulWidget {
}
}
class
_ShopListState
extends
State
<
ShopList
>
with
TickerProviderStateMixin
{
class
_ShopListState
extends
State
<
ShopList
>
with
TickerProviderStateMixin
{
var
entries
=
new
List
<
String
>.
generate
(
2
,
(
i
)
=>
"Item
$i
"
);
var
entries
=
new
List
<
String
>.
generate
(
1
,
(
i
)
=>
"Item
$i
"
);
ShoplistPresenter
presenter
;
ShoplistPresenter
presenter
;
...
@@ -277,12 +277,12 @@ class _ShopListState extends State<ShopList> with TickerProviderStateMixin {
...
@@ -277,12 +277,12 @@ class _ShopListState extends State<ShopList> with TickerProviderStateMixin {
child:
new
Text
(
child:
new
Text
(
'Load more ...'
,
'Load more ...'
,
style:
new
TextStyle
(
style:
new
TextStyle
(
color:
Colors
.
white
,
color:
Colors
.
black
,
fontWeight:
FontWeight
.
bold
,
fontWeight:
FontWeight
.
bold
,
),
),
),
),
onPressed:
()
{
onPressed:
()
{
var
nextItems
=
new
List
<
String
>.
generate
(
2
,
(
i
)
{
var
nextItems
=
new
List
<
String
>.
generate
(
1
,
(
i
)
{
var
itemId
=
i
+
entries
.
length
;
var
itemId
=
i
+
entries
.
length
;
return
"Item
$itemId
"
;
return
"Item
$itemId
"
;
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment