Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
81df450b
authored
5 years ago
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sale
parent
c03ca250
master
…
dev
dev_xx
dev_xx_241116
dev_xx_250108_toast
dev_xx_250224_report
dev_xx_web
v2.7.2
v2.7.1
v2.7.0
v2.6.9
v2.6.7
v2.6.6
v2.6.5
v2.6.4
v2.6.3
v2.6.2
v2.6.1
v2.6.0
v2.5.9
v2.5.7
v2.5.5
v2.5.4
v2.5.3
v2.5.2
v2.5.0
v2.4.6
v2.4.5
v2.4.0
v_2.4.0
dev20230405
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1041 additions
and
76 deletions
baseSDK/src/main/java/com/dayu/base/ui/presenter/BasePresenter.java
baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
saleCenter/src/main/java/com/bigfish/salecenter/adapter/SaleProductAdapter.java
saleCenter/src/main/java/com/bigfish/salecenter/api/SaleService.java
saleCenter/src/main/java/com/bigfish/salecenter/model/CollectProductData.java
saleCenter/src/main/java/com/bigfish/salecenter/model/ProductDetailBean.java
saleCenter/src/main/java/com/bigfish/salecenter/model/ProductListBean.java
saleCenter/src/main/java/com/bigfish/salecenter/presenter/homesale/HomeSalePresenter.java
saleCenter/src/main/java/com/bigfish/salecenter/presenter/saleorder/SaleOrderPresent.java
saleCenter/src/main/java/com/bigfish/salecenter/presenter/saleproduct/SaleProductPresent.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/activity/ProductDetailActivity.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/ProductInstructionFragment.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleInstructionFragment.java
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleProductFragment.java
saleCenter/src/main/res/layout/fragment_product_instruction.xml
saleCenter/src/main/res/layout/item_sale_order.xml
saleCenter/src/main/res/layout/item_sale_product.xml
userCenter/src/main/java/com/dayu/usercenter/presenter/homeuser/HomeUserPresenter.java
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/HomeUserFragment.java
userCenter/src/main/res/layout/fragment_home_user.xml
baseSDK/src/main/java/com/dayu/base/ui/presenter/BasePresenter.java
View file @
81df450b
...
...
@@ -7,6 +7,7 @@ import com.dayu.base.ui.activity.BaseActivity;
import
com.dayu.base.ui.fragment.BaseFragment
;
import
com.dayu.common.BaseView
;
import
com.dayu.common.Constants
;
import
com.dayu.utils.LogUtils
;
import
com.dayu.utils.ProgressUtil
;
import
io.reactivex.Observer
;
...
...
@@ -61,6 +62,7 @@ public abstract class BasePresenter<V> {
public
void
onError
(
Throwable
e
)
{
ProgressUtil
.
stopLoad
();
processException
(
e
);
LogUtils
.
e
(
"requestError: "
+
e
.
toString
());
}
@Override
...
...
This diff is collapsed.
Click to expand it.
baseSDK/src/main/java/com/dayu/utils/CommonUtils.java
View file @
81df450b
...
...
@@ -55,12 +55,21 @@ public class CommonUtils {
* 拨打电话(跳转到拨号界面,用户手动点击拨打)
*/
public
static
void
dialPhone
(
Context
context
,
String
phoneNum
)
{
if
(
TextUtils
.
isEmpty
(
phoneNum
))
return
;
Intent
intent
=
new
Intent
(
Intent
.
ACTION_DIAL
);
Uri
data
=
Uri
.
parse
(
"tel:"
+
phoneNum
);
intent
.
setData
(
data
);
context
.
startActivity
(
intent
);
}
/**
* 获取带汉字描述的价格
*/
public
static
String
getMoneyStr
(
Context
context
,
double
money
)
{
return
money
+
context
.
getString
(
R
.
string
.
money
);
}
//计算并设置时间
public
static
String
getTimeDesc
(
Context
context
,
String
time
)
{
if
(
TextUtils
.
isEmpty
(
time
)
)
{
...
...
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/adapter/SaleProductAdapter.java
View file @
81df450b
package
com
.
bigfish
.
salecenter
.
adapter
;
import
com.bigfish.salecenter.R
;
import
com.bigfish.salecenter.databinding.ItemSaleProductBinding
;
import
com.bigfish.salecenter.model.CollectProductData
;
import
com.bigfish.salecenter.model.ProductListBean
;
import
com.bigfish.salecenter.presenter.saleproduct.SaleProductPresent
;
import
com.dayu.base.ui.adapter.CoreAdapter
;
import
com.dayu.utils.CommonUtils
;
import
com.dayu.utils.GlideImageLoader
;
import
com.dayu.utils.ToastUtils
;
/**
* Created by mReturn
* on 2020/2/13
**/
public
class
SaleProductAdapter
extends
CoreAdapter
<
String
,
ItemSaleProductBinding
>
{
public
class
SaleProductAdapter
extends
CoreAdapter
<
ProductListBean
,
ItemSaleProductBinding
>
{
private
SaleProductPresent
mPresenter
;
public
SaleProductAdapter
(
boolean
needFoot
)
{
super
(
needFoot
);
}
@Override
protected
void
onBind
(
ItemSaleProductBinding
holder
,
String
item
,
int
position
)
{
protected
void
onBind
(
ItemSaleProductBinding
holder
,
ProductListBean
item
,
int
position
)
{
super
.
onBind
(
holder
,
item
,
position
);
holder
.
tvBrandModel
.
setText
(
item
);
holder
.
tvBrandModel
.
setText
(
item
.
getGoodsModel
());
GlideImageLoader
.
load
(
mContext
,
holder
.
ivImg
,
item
.
getFirstUrl
(),
R
.
drawable
.
icon_img_default
);
holder
.
tvSinglePrice
.
setText
(
CommonUtils
.
getMoneyStr
(
mContext
,
item
.
getPrice
()));
holder
.
tvCommision
.
setText
(
CommonUtils
.
getMoneyStr
(
mContext
,
item
.
getSalesPrice
()));
holder
.
btnCollect
.
setOnClickListener
(
v
->
{
mPresenter
.
onCollectClick
(
item
).
subscribe
(
mPresenter
.
baseObserver
(
success
->{
ToastUtils
.
showShortToast
(
"collect: "
+
success
);
}
));
});
holder
.
btnShare
.
setOnClickListener
(
v
->
mPresenter
.
onShareClick
(
item
));
}
public
void
initPresenter
(
SaleProductPresent
presenter
)
{
mPresenter
=
presenter
;
}
}
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/api/SaleService.java
0 → 100644
View file @
81df450b
package
com
.
bigfish
.
salecenter
.
api
;
import
com.bigfish.salecenter.model.CollectProductData
;
import
com.bigfish.salecenter.model.ProductDetailBean
;
import
com.bigfish.salecenter.model.ProductListBean
;
import
com.dayu.base.api.protocol.BasePageBean
;
import
com.dayu.base.api.protocol.BaseResponse
;
import
com.dayu.common.Constants
;
import
io.reactivex.Observable
;
import
retrofit2.http.Body
;
import
retrofit2.http.GET
;
import
retrofit2.http.POST
;
import
retrofit2.http.Path
;
import
retrofit2.http.Query
;
/**
* Created by mReturn
* on 2020/2/21
**/
public
interface
SaleService
{
String
kaApi
=
"api-ka-base"
;
/**
* 商品列表
* @param engineerId
* @param page
* @param pageSize
* @return
*/
@GET
(
kaApi
+
"/goods/mobileGoods"
)
Observable
<
BaseResponse
<
BasePageBean
<
ProductListBean
>>>
getProducts
(
@Query
(
"engineerId"
)
int
engineerId
,
@Query
(
"page"
)
int
page
,
@Query
(
"pageSize"
)
int
pageSize
);
/**
* 收藏列表
* @param engineerId
* @param page
* @param pageSize
* @return
*/
@GET
(
kaApi
+
"/goods/mobileCollectionGoods"
)
Observable
<
BaseResponse
<
BasePageBean
<
ProductListBean
>>>
getCollections
(
@Query
(
"engineerId"
)
int
engineerId
,
@Query
(
"page"
)
int
page
,
@Query
(
"pageSize"
)
int
pageSize
);
/**
* 商品详情
*/
@GET
(
kaApi
+
"/goods/{goodsId}"
)
Observable
<
BaseResponse
<
ProductDetailBean
>>
getProductDetail
(
@Path
(
"goodsId"
)
int
goodId
);
/**
* 商品是否能分享
*/
@GET
(
kaApi
+
"/goodsCollections/goodsId/{goodsId}/engineerId/{engineerId}"
)
Observable
<
BaseResponse
<
Boolean
>>
canShare
(
@Path
(
"goodsId"
)
int
goodsId
,
@Path
(
"engineerId"
)
int
engineerId
);
/**
* 取消收藏商品
*/
@GET
(
kaApi
+
"/goodsCollections/cancel/goodsId/{goodsId}/engineerId/{engineerId}"
)
Observable
<
BaseResponse
<
Boolean
>>
unCollectProdcut
(
@Path
(
"goodsId"
)
int
goodsId
,
@Path
(
"engineerId"
)
int
engineerId
);
/**
* 收藏商品
*/
@POST
(
kaApi
+
"/goodsCollections"
)
Observable
<
BaseResponse
<
Boolean
>>
collectProdcut
(
@Body
CollectProductData
data
);
}
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/model/CollectProductData.java
0 → 100644
View file @
81df450b
package
com
.
bigfish
.
salecenter
.
model
;
/**
* Created by mReturn
* on 2020/2/23
**/
public
class
CollectProductData
{
public
int
collectionStatus
;
public
String
createTime
;
public
int
engineerId
;
public
int
goodsId
;
public
int
id
;
public
CollectProductData
(
int
collectionStatus
,
String
createTime
,
int
engineerId
,
int
goodsId
,
int
id
)
{
this
.
collectionStatus
=
collectionStatus
;
this
.
createTime
=
createTime
;
this
.
engineerId
=
engineerId
;
this
.
goodsId
=
goodsId
;
this
.
id
=
id
;
}
}
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/model/ProductDetailBean.java
0 → 100644
View file @
81df450b
package
com
.
bigfish
.
salecenter
.
model
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* Created by mReturn
* on 2020/2/23
**/
public
class
ProductDetailBean
implements
Serializable
{
/**
* id : 1
* goodsNum : DYPN20200221105316000003
* goodsModel : string
* pn : string
* price : 0
* salesPrice : 0
* customerRebate : 0
* brief : string
* sellingPoint1 : string
* sellingPoint2 : string
* sellingPoint3 : string
* customerPortrait : string
* salesHot : string
* firstUrl : string
* goodsVideo : string
* providerId : 0
* providerName : string
* salesPeople : 0
* salesCount : 0
* created : string
* createTime : 2020-02-21 10:53:17
* modified : string
* modifyTime : null
* status : 0
* goodsCategorys : [{"id":1,"goodsId":1,"categoryId":0,"categoryName":"string"}]
* goodsPics : [{"id":1,"goodsId":1,"goodsUrl":"string"}]
* key : null
* orderBy : null
*/
private
int
id
;
private
String
goodsNum
;
private
String
goodsModel
;
private
String
pn
;
private
int
price
;
private
int
salesPrice
;
private
int
customerRebate
;
private
String
brief
;
private
String
sellingPoint1
;
private
String
sellingPoint2
;
private
String
sellingPoint3
;
private
String
customerPortrait
;
private
String
salesHot
;
private
String
firstUrl
;
private
String
goodsVideo
;
private
int
providerId
;
private
String
providerName
;
private
int
salesPeople
;
private
int
salesCount
;
private
String
created
;
private
String
createTime
;
private
String
modified
;
private
Object
modifyTime
;
private
int
status
;
private
Object
key
;
private
Object
orderBy
;
private
List
<
GoodsCategorysBean
>
goodsCategorys
;
private
List
<
GoodsPicsBean
>
goodsPics
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
String
getGoodsNum
()
{
return
goodsNum
;
}
public
void
setGoodsNum
(
String
goodsNum
)
{
this
.
goodsNum
=
goodsNum
;
}
public
String
getGoodsModel
()
{
return
goodsModel
;
}
public
void
setGoodsModel
(
String
goodsModel
)
{
this
.
goodsModel
=
goodsModel
;
}
public
String
getPn
()
{
return
pn
;
}
public
void
setPn
(
String
pn
)
{
this
.
pn
=
pn
;
}
public
int
getPrice
()
{
return
price
;
}
public
void
setPrice
(
int
price
)
{
this
.
price
=
price
;
}
public
int
getSalesPrice
()
{
return
salesPrice
;
}
public
void
setSalesPrice
(
int
salesPrice
)
{
this
.
salesPrice
=
salesPrice
;
}
public
int
getCustomerRebate
()
{
return
customerRebate
;
}
public
void
setCustomerRebate
(
int
customerRebate
)
{
this
.
customerRebate
=
customerRebate
;
}
public
String
getBrief
()
{
return
brief
;
}
public
void
setBrief
(
String
brief
)
{
this
.
brief
=
brief
;
}
public
String
getSellingPoint1
()
{
return
sellingPoint1
;
}
public
void
setSellingPoint1
(
String
sellingPoint1
)
{
this
.
sellingPoint1
=
sellingPoint1
;
}
public
String
getSellingPoint2
()
{
return
sellingPoint2
;
}
public
void
setSellingPoint2
(
String
sellingPoint2
)
{
this
.
sellingPoint2
=
sellingPoint2
;
}
public
String
getSellingPoint3
()
{
return
sellingPoint3
;
}
public
void
setSellingPoint3
(
String
sellingPoint3
)
{
this
.
sellingPoint3
=
sellingPoint3
;
}
public
String
getCustomerPortrait
()
{
return
customerPortrait
;
}
public
void
setCustomerPortrait
(
String
customerPortrait
)
{
this
.
customerPortrait
=
customerPortrait
;
}
public
String
getSalesHot
()
{
return
salesHot
;
}
public
void
setSalesHot
(
String
salesHot
)
{
this
.
salesHot
=
salesHot
;
}
public
String
getFirstUrl
()
{
return
firstUrl
;
}
public
void
setFirstUrl
(
String
firstUrl
)
{
this
.
firstUrl
=
firstUrl
;
}
public
String
getGoodsVideo
()
{
return
goodsVideo
;
}
public
void
setGoodsVideo
(
String
goodsVideo
)
{
this
.
goodsVideo
=
goodsVideo
;
}
public
int
getProviderId
()
{
return
providerId
;
}
public
void
setProviderId
(
int
providerId
)
{
this
.
providerId
=
providerId
;
}
public
String
getProviderName
()
{
return
providerName
;
}
public
void
setProviderName
(
String
providerName
)
{
this
.
providerName
=
providerName
;
}
public
int
getSalesPeople
()
{
return
salesPeople
;
}
public
void
setSalesPeople
(
int
salesPeople
)
{
this
.
salesPeople
=
salesPeople
;
}
public
int
getSalesCount
()
{
return
salesCount
;
}
public
void
setSalesCount
(
int
salesCount
)
{
this
.
salesCount
=
salesCount
;
}
public
String
getCreated
()
{
return
created
;
}
public
void
setCreated
(
String
created
)
{
this
.
created
=
created
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getModified
()
{
return
modified
;
}
public
void
setModified
(
String
modified
)
{
this
.
modified
=
modified
;
}
public
Object
getModifyTime
()
{
return
modifyTime
;
}
public
void
setModifyTime
(
Object
modifyTime
)
{
this
.
modifyTime
=
modifyTime
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
Object
getKey
()
{
return
key
;
}
public
void
setKey
(
Object
key
)
{
this
.
key
=
key
;
}
public
Object
getOrderBy
()
{
return
orderBy
;
}
public
void
setOrderBy
(
Object
orderBy
)
{
this
.
orderBy
=
orderBy
;
}
public
List
<
GoodsCategorysBean
>
getGoodsCategorys
()
{
return
goodsCategorys
;
}
public
void
setGoodsCategorys
(
List
<
GoodsCategorysBean
>
goodsCategorys
)
{
this
.
goodsCategorys
=
goodsCategorys
;
}
public
List
<
GoodsPicsBean
>
getGoodsPics
()
{
return
goodsPics
;
}
public
void
setGoodsPics
(
List
<
GoodsPicsBean
>
goodsPics
)
{
this
.
goodsPics
=
goodsPics
;
}
public
static
class
GoodsCategorysBean
{
/**
* id : 1
* goodsId : 1
* categoryId : 0
* categoryName : string
*/
private
int
id
;
private
int
goodsId
;
private
int
categoryId
;
private
String
categoryName
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getGoodsId
()
{
return
goodsId
;
}
public
void
setGoodsId
(
int
goodsId
)
{
this
.
goodsId
=
goodsId
;
}
public
int
getCategoryId
()
{
return
categoryId
;
}
public
void
setCategoryId
(
int
categoryId
)
{
this
.
categoryId
=
categoryId
;
}
public
String
getCategoryName
()
{
return
categoryName
;
}
public
void
setCategoryName
(
String
categoryName
)
{
this
.
categoryName
=
categoryName
;
}
}
public
static
class
GoodsPicsBean
{
/**
* id : 1
* goodsId : 1
* goodsUrl : string
*/
private
int
id
;
private
int
goodsId
;
private
String
goodsUrl
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
int
getGoodsId
()
{
return
goodsId
;
}
public
void
setGoodsId
(
int
goodsId
)
{
this
.
goodsId
=
goodsId
;
}
public
String
getGoodsUrl
()
{
return
goodsUrl
;
}
public
void
setGoodsUrl
(
String
goodsUrl
)
{
this
.
goodsUrl
=
goodsUrl
;
}
}
}
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/model/ProductListBean.java
0 → 100644
View file @
81df450b
package
com
.
bigfish
.
salecenter
.
model
;
import
java.io.Serializable
;
/**
* Created by mReturn
* on 2020/2/21
**/
public
class
ProductListBean
implements
Serializable
{
/**
* id : 1
* goodsNum : DYPN20200221105316000003
* goodsModel : string
* pn : string
* price : 0.0
* salesPrice : 0.0
* customerRebate : 0.0
* brief : string
* sellingPoint1 : string
* sellingPoint2 : string
* sellingPoint3 : string
* customerPortrait : string
* salesHot : string
* firstUrl : string
* goodsVideo : string
* providerId : 0
* providerName : string
* salesPeople : 0
* salesCount : 0
* created : string
* createTime : 2020-02-21 10:53:17
* modified : string
* modifyTime : null
* status : 0
* collectionStatus : null
* engineerId : null
* key : null
* orderBy : null
*/
private
int
id
;
private
String
goodsNum
;
private
String
goodsModel
;
private
String
pn
;
private
double
price
;
private
double
salesPrice
;
private
double
customerRebate
;
private
String
brief
;
private
String
sellingPoint1
;
private
String
sellingPoint2
;
private
String
sellingPoint3
;
private
String
customerPortrait
;
private
String
salesHot
;
private
String
firstUrl
;
private
String
goodsVideo
;
private
int
providerId
;
private
String
providerName
;
private
int
salesPeople
;
private
int
salesCount
;
private
String
created
;
private
String
createTime
;
private
String
modified
;
private
Object
modifyTime
;
private
int
status
;
private
Object
collectionStatus
;
private
Object
engineerId
;
private
Object
key
;
private
Object
orderBy
;
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
String
getGoodsNum
()
{
return
goodsNum
;
}
public
void
setGoodsNum
(
String
goodsNum
)
{
this
.
goodsNum
=
goodsNum
;
}
public
String
getGoodsModel
()
{
return
goodsModel
;
}
public
void
setGoodsModel
(
String
goodsModel
)
{
this
.
goodsModel
=
goodsModel
;
}
public
String
getPn
()
{
return
pn
;
}
public
void
setPn
(
String
pn
)
{
this
.
pn
=
pn
;
}
public
double
getPrice
()
{
return
price
;
}
public
void
setPrice
(
double
price
)
{
this
.
price
=
price
;
}
public
double
getSalesPrice
()
{
return
salesPrice
;
}
public
void
setSalesPrice
(
double
salesPrice
)
{
this
.
salesPrice
=
salesPrice
;
}
public
double
getCustomerRebate
()
{
return
customerRebate
;
}
public
void
setCustomerRebate
(
double
customerRebate
)
{
this
.
customerRebate
=
customerRebate
;
}
public
String
getBrief
()
{
return
brief
;
}
public
void
setBrief
(
String
brief
)
{
this
.
brief
=
brief
;
}
public
String
getSellingPoint1
()
{
return
sellingPoint1
;
}
public
void
setSellingPoint1
(
String
sellingPoint1
)
{
this
.
sellingPoint1
=
sellingPoint1
;
}
public
String
getSellingPoint2
()
{
return
sellingPoint2
;
}
public
void
setSellingPoint2
(
String
sellingPoint2
)
{
this
.
sellingPoint2
=
sellingPoint2
;
}
public
String
getSellingPoint3
()
{
return
sellingPoint3
;
}
public
void
setSellingPoint3
(
String
sellingPoint3
)
{
this
.
sellingPoint3
=
sellingPoint3
;
}
public
String
getCustomerPortrait
()
{
return
customerPortrait
;
}
public
void
setCustomerPortrait
(
String
customerPortrait
)
{
this
.
customerPortrait
=
customerPortrait
;
}
public
String
getSalesHot
()
{
return
salesHot
;
}
public
void
setSalesHot
(
String
salesHot
)
{
this
.
salesHot
=
salesHot
;
}
public
String
getFirstUrl
()
{
return
firstUrl
;
}
public
void
setFirstUrl
(
String
firstUrl
)
{
this
.
firstUrl
=
firstUrl
;
}
public
String
getGoodsVideo
()
{
return
goodsVideo
;
}
public
void
setGoodsVideo
(
String
goodsVideo
)
{
this
.
goodsVideo
=
goodsVideo
;
}
public
int
getProviderId
()
{
return
providerId
;
}
public
void
setProviderId
(
int
providerId
)
{
this
.
providerId
=
providerId
;
}
public
String
getProviderName
()
{
return
providerName
;
}
public
void
setProviderName
(
String
providerName
)
{
this
.
providerName
=
providerName
;
}
public
int
getSalesPeople
()
{
return
salesPeople
;
}
public
void
setSalesPeople
(
int
salesPeople
)
{
this
.
salesPeople
=
salesPeople
;
}
public
int
getSalesCount
()
{
return
salesCount
;
}
public
void
setSalesCount
(
int
salesCount
)
{
this
.
salesCount
=
salesCount
;
}
public
String
getCreated
()
{
return
created
;
}
public
void
setCreated
(
String
created
)
{
this
.
created
=
created
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getModified
()
{
return
modified
;
}
public
void
setModified
(
String
modified
)
{
this
.
modified
=
modified
;
}
public
Object
getModifyTime
()
{
return
modifyTime
;
}
public
void
setModifyTime
(
Object
modifyTime
)
{
this
.
modifyTime
=
modifyTime
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
Object
getCollectionStatus
()
{
return
collectionStatus
;
}
public
void
setCollectionStatus
(
Object
collectionStatus
)
{
this
.
collectionStatus
=
collectionStatus
;
}
public
Object
getEngineerId
()
{
return
engineerId
;
}
public
void
setEngineerId
(
Object
engineerId
)
{
this
.
engineerId
=
engineerId
;
}
public
Object
getKey
()
{
return
key
;
}
public
void
setKey
(
Object
key
)
{
this
.
key
=
key
;
}
public
Object
getOrderBy
()
{
return
orderBy
;
}
public
void
setOrderBy
(
Object
orderBy
)
{
this
.
orderBy
=
orderBy
;
}
}
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/presenter/homesale/HomeSalePresenter.java
View file @
81df450b
...
...
@@ -30,5 +30,6 @@ public class HomeSalePresenter extends HomeSaleContract.Presenter{
public
void
onAttached
()
{
UserInfo
userInfo
=
UserManager
.
getInstance
().
getUser
();
mUserId
=
Integer
.
parseInt
(
userInfo
.
getAccountId
());
ToastUtils
.
showShortToast
(
"sale: "
+
mUserId
);
}
}
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/presenter/saleorder/SaleOrderPresent.java
View file @
81df450b
...
...
@@ -39,11 +39,11 @@ public class SaleOrderPresent extends SaleOrderContract.Presenter {
public
void
refresh
()
{
super
.
refresh
();
mPage
=
1
;
if
(
type
==
1
)
{
ToastUtils
.
showShortToast
(
"in sale"
);
}
else
{
ToastUtils
.
showShortToast
(
"sale done"
);
}
//
if (type == 1) {
//
ToastUtils.showShortToast("in sale");
//
} else {
//
ToastUtils.showShortToast("sale done");
//
}
//test data
List
<
String
>
items
=
new
ArrayList
<>();
...
...
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/presenter/saleproduct/SaleProductPresent.java
View file @
81df450b
...
...
@@ -2,14 +2,16 @@ package com.bigfish.salecenter.presenter.saleproduct;
import
android.databinding.ObservableField
;
import
com.bigfish.salecenter.api.SaleService
;
import
com.bigfish.salecenter.model.CollectProductData
;
import
com.bigfish.salecenter.model.ProductListBean
;
import
com.dayu.base.api.Api
;
import
com.dayu.common.Constants
;
import
com.dayu.event.UserInfo
;
import
com.dayu.utils.ProgressUtil
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UserManager
;
import
java.util.ArrayList
;
import
java.util.List
;
import
io.reactivex.Observable
;
/**
* Created by mReturn
...
...
@@ -41,21 +43,63 @@ public class SaleProductPresent extends SaleProductContract.Presenter {
super
.
refresh
();
mPage
=
1
;
if
(
type
==
1
)
{
ToastUtils
.
showShortToast
(
"product"
);
getProducts
(
);
}
else
{
ToastUtils
.
showShortToast
(
"collect"
);
getCollections
(
);
}
//test data
List
<
String
>
items
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
10
;
i
++){
items
.
add
(
"product item-"
+
i
+
"-"
+
type
);
}
datas
.
set
(
items
);
}
//商品列表
private
void
getProducts
()
{
Api
.
getService
(
SaleService
.
class
).
getProducts
(
mUserId
,
mPage
,
Constants
.
PAGESIZE
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
products
->
{
// ToastUtils.showShortToast(products.getData().size() + " ");
datas
.
set
(
products
);
mPage
++;
},
responeThrowable
->
datas
.
set
(
Constants
.
FAILED
)
));
}
//收藏列表
private
void
getCollections
()
{
Api
.
getService
(
SaleService
.
class
).
getCollections
(
mUserId
,
mPage
,
Constants
.
PAGESIZE
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
products
->
{
// ToastUtils.showShortToast("collections: " + products.getData().size());
datas
.
set
(
products
);
mPage
++;
},
responeThrowable
->
datas
.
set
(
Constants
.
FAILED
)
));
}
//点击收藏按钮
public
Observable
<
Boolean
>
onCollectClick
(
ProductListBean
item
)
{
CollectProductData
data
=
new
CollectProductData
(
1
,
""
,
mUserId
,
item
.
getId
(),
item
.
getId
());
return
Api
.
getService
(
SaleService
.
class
).
collectProdcut
(
data
).
compose
(
Api
.
applySchedulers
());
// return Api.getService(SaleService.class).unCollectProdcut(item.getId(), mUserId).compose(Api.applySchedulers());
}
//点击分享按钮
public
void
onShareClick
(
ProductListBean
item
)
{
Api
.
getService
(
SaleService
.
class
).
canShare
(
item
.
getId
(),
mUserId
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
baseObserver
(
success
->
{
ToastUtils
.
showShortToast
(
"canShare: "
+
success
);
})
);
}
@Override
public
void
loadMore
()
{
super
.
loadMore
();
if
(
type
==
1
)
{
getProducts
();
}
else
{
getCollections
();
}
}
}
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/ui/activity/ProductDetailActivity.java
View file @
81df450b
...
...
@@ -5,9 +5,12 @@ import android.support.v4.app.FragmentManager;
import
android.support.v4.app.FragmentTransaction
;
import
com.bigfish.salecenter.R
;
import
com.bigfish.salecenter.api.SaleService
;
import
com.bigfish.salecenter.databinding.ActivityProductDetailsBinding
;
import
com.bigfish.salecenter.model.ProductDetailBean
;
import
com.bigfish.salecenter.ui.fragment.ProductInstructionFragment
;
import
com.bigfish.salecenter.ui.fragment.SaleInstructionFragment
;
import
com.dayu.base.api.Api
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.umeng.analytics.MobclickAgent
;
...
...
@@ -20,12 +23,13 @@ import cn.jzvd.JzvdStd;
* Created by mReturn
* on 2020/2/13
**/
public
class
ProductDetailActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityProductDetailsBinding
>
{
public
class
ProductDetailActivity
extends
BaseActivity
<
SImplePresenter
,
ActivityProductDetailsBinding
>
{
private
FragmentManager
mFragmentManger
;
private
ArrayList
<
Fragment
>
mFragments
=
new
ArrayList
<>();
private
int
mPosition
;
private
int
mId
;
@Override
public
void
setPresenter
()
{
...
...
@@ -38,12 +42,26 @@ public class ProductDetailActivity extends BaseActivity<SImplePresenter,Activity
@Override
public
void
initView
()
{
mFragments
.
add
(
ProductInstructionFragment
.
newInstance
());
mFragments
.
add
(
SaleInstructionFragment
.
newInstance
());
mId
=
getIntent
().
getIntExtra
(
"id"
,
0
);
initBtn
();
getDetailData
();
}
private
void
getDetailData
()
{
showDialog
();
Api
.
getService
(
SaleService
.
class
).
getProductDetail
(
mId
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
detail
->
{
initFragment
(
detail
);
}));
}
private
void
initFragment
(
ProductDetailBean
detail
)
{
mFragments
.
add
(
ProductInstructionFragment
.
newInstance
(
detail
));
mFragments
.
add
(
SaleInstructionFragment
.
newInstance
(
detail
));
addFragment
();
}
public
void
initBtn
()
{
mBind
.
titleBack
.
setOnClickListener
(
v
->
dumpBack
());
mBind
.
btnGoods
.
setSelected
(
true
);
...
...
@@ -84,6 +102,7 @@ public class ProductDetailActivity extends BaseActivity<SImplePresenter,Activity
}
private
void
showHideFragment
(
int
showPosition
,
int
hidePosition
)
{
if
(
mFragments
.
size
()<
showPosition
+
1
)
return
;
if
(
showPosition
==
hidePosition
)
return
;
JzvdStd
.
goOnPlayOnPause
();
mFragmentManger
.
beginTransaction
()
...
...
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/ProductInstructionFragment.java
View file @
81df450b
package
com
.
bigfish
.
salecenter
.
ui
.
fragment
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.View
;
import
com.bigfish.salecenter.R
;
import
com.bigfish.salecenter.api.SaleService
;
import
com.bigfish.salecenter.databinding.FragmentProductInstructionBinding
;
import
com.bigfish.salecenter.model.ProductDetailBean
;
import
com.bigfish.salecenter.model.ProductListBean
;
import
com.dayu.base.api.Api
;
import
com.dayu.base.ui.fragment.BaseFragment
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.dayu.common.Constants
;
import
com.dayu.event.UserInfo
;
import
com.dayu.utils.BannerImgLoader
;
import
com.dayu.utils.CommonUtils
;
import
com.dayu.utils.GlideImageLoader
;
import
com.dayu.utils.ToastUtils
;
import
com.dayu.utils.UserManager
;
import
com.youth.banner.BannerConfig
;
import
java.util.ArrayList
;
...
...
@@ -17,31 +28,62 @@ import java.util.List;
* Created by mReturn
* on 2020/2/13
**/
public
class
ProductInstructionFragment
extends
BaseFragment
<
SImplePresenter
,
FragmentProductInstructionBinding
>
{
public
class
ProductInstructionFragment
extends
BaseFragment
<
SImplePresenter
,
FragmentProductInstructionBinding
>
{
ProductDetailBean
mDetail
;
int
mUserId
;
public
static
ProductInstructionFragment
newInstance
()
{
public
static
ProductInstructionFragment
newInstance
(
ProductDetailBean
detail
)
{
Bundle
args
=
new
Bundle
();
args
.
putSerializable
(
"data"
,
detail
);
ProductInstructionFragment
fragment
=
new
ProductInstructionFragment
();
fragment
.
setArguments
(
args
);
return
fragment
;
}
@Override
public
void
setPresenter
()
{
}
@Override
public
void
initView
()
{
UserInfo
userInfo
=
UserManager
.
getInstance
().
getUser
();
mUserId
=
Integer
.
parseInt
(
userInfo
.
getAccountId
());
if
(
getArguments
()
!=
null
)
{
mDetail
=
(
ProductDetailBean
)
getArguments
().
getSerializable
(
"data"
);
}
if
(
mDetail
!=
null
)
{
initDataView
();
mBind
.
btnShare
.
setOnClickListener
(
v
->
onShareClick
());
mBind
.
btnContact
.
setOnClickListener
(
v
->
CommonUtils
.
dialPhone
(
mActivity
,
mDetail
.
getSalesHot
())
);
}
}
//点击分享按钮
public
void
onShareClick
()
{
Api
.
getService
(
SaleService
.
class
).
canShare
(
mDetail
.
getId
(),
mUserId
).
compose
(
Api
.
applySchedulers
())
.
subscribe
(
mPresenter
.
baseObserver
(
success
->
{
ToastUtils
.
showShortToast
(
"canShare: "
+
success
);
})
);
}
private
void
initDataView
()
{
setBannerView
();
setVideoView
();
mBind
.
tvModel
.
setText
(
mDetail
.
getGoodsModel
());
mBind
.
tvCompany
.
setText
(
mDetail
.
getProviderName
());
mBind
.
tvCompanyPn
.
setText
(
mDetail
.
getPn
());
mBind
.
tvSinglePrice
.
setText
(
CommonUtils
.
getMoneyStr
(
mActivity
,
mDetail
.
getPrice
()));
mBind
.
tvDesc
.
setText
(
mDetail
.
getBrief
());
}
private
void
setBannerView
()
{
String
tempImg
=
"https://"
;
List
<
String
>
bannerImgs
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
bannerImgs
.
add
(
tempImg
);
for
(
int
i
=
0
;
i
<
mDetail
.
getGoodsPics
().
size
()
;
i
++)
{
bannerImgs
.
add
(
mDetail
.
getGoodsPics
().
get
(
i
).
getGoodsUrl
()
);
}
mBind
.
banner
.
setImages
(
bannerImgs
)
.
setImageLoader
(
new
BannerImgLoader
())
...
...
@@ -51,11 +93,16 @@ public class ProductInstructionFragment extends BaseFragment<SImplePresenter,Fra
}).
start
();
}
private
void
setVideoView
(){
// http://dl.kf.ai/online/ka/spu/serviceDetailVideo/09ee6818825f705cf106b3c497d40af9.mp4
String
url
=
"http://dl.kf.ai/online/ka/spu/serviceDetailVideo/09ee6818825f705cf106b3c497d40af9.mp4"
;
mBind
.
jzVideo
.
setUp
(
url
,
""
);
GlideImageLoader
.
load
(
mActivity
,
mBind
.
jzVideo
.
thumbImageView
,
url
,
R
.
drawable
.
icon_app_logo
);
private
void
setVideoView
()
{
// String url = "http://dl.kf.ai/online/ka/spu/serviceDetailVideo/09ee6818825f705cf106b3c497d40af9.mp4";
String
url
=
mDetail
.
getGoodsVideo
();
if
(
TextUtils
.
isEmpty
(
url
))
{
mBind
.
llVideo
.
setVisibility
(
View
.
GONE
);
}
else
{
mBind
.
llVideo
.
setVisibility
(
View
.
VISIBLE
);
mBind
.
jzVideo
.
setUp
(
url
,
""
);
GlideImageLoader
.
load
(
mActivity
,
mBind
.
jzVideo
.
thumbImageView
,
url
,
R
.
drawable
.
icon_app_logo
);
}
}
@Override
...
...
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleInstructionFragment.java
View file @
81df450b
...
...
@@ -5,12 +5,13 @@ import android.support.v7.widget.GridLayoutManager;
import
android.widget.CheckBox
;
import
com.bigfish.salecenter.R
;
import
com.bigfish.salecenter.databinding.FragmentProductInstructionBinding
;
import
com.bigfish.salecenter.databinding.FragmentSaleInstructionBinding
;
import
com.bigfish.salecenter.model.ProductDetailBean
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.dayu.base.ui.fragment.BaseFragment
;
import
com.dayu.base.ui.presenter.SImplePresenter
;
import
com.dayu.utils.CommonUtils
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -21,10 +22,13 @@ import java.util.List;
**/
public
class
SaleInstructionFragment
extends
BaseFragment
<
SImplePresenter
,
FragmentSaleInstructionBinding
>
{
List
<
String
>
testList
=
new
ArrayList
<>();
List
<
String
>
sceneList
=
new
ArrayList
<>();
List
<
String
>
pointList
=
new
ArrayList
<>();
ProductDetailBean
mDetail
;
public
static
SaleInstructionFragment
newInstance
()
{
public
static
SaleInstructionFragment
newInstance
(
ProductDetailBean
detail
)
{
Bundle
args
=
new
Bundle
();
args
.
putSerializable
(
"data"
,
detail
);
SaleInstructionFragment
fragment
=
new
SaleInstructionFragment
();
fragment
.
setArguments
(
args
);
return
fragment
;
...
...
@@ -37,9 +41,24 @@ public class SaleInstructionFragment extends BaseFragment<SImplePresenter, Fragm
@Override
public
void
initView
()
{
for
(
int
i
=
0
;
i
<
3
;
i
++)
{
testList
.
add
(
"智能办公"
+
i
);
if
(
getArguments
()
!=
null
)
{
mDetail
=
(
ProductDetailBean
)
getArguments
().
getSerializable
(
"data"
);
}
if
(
mDetail
!=
null
)
{
initDataView
();
}
}
private
void
initDataView
()
{
mBind
.
tvBonus
.
setText
(
CommonUtils
.
getMoneyStr
(
mActivity
,
mDetail
.
getSalesPrice
()));
mBind
.
tvFace
.
setText
(
mDetail
.
getCustomerPortrait
());
for
(
int
i
=
0
;
i
<
mDetail
.
getGoodsCategorys
().
size
();
i
++){
sceneList
.
add
(
mDetail
.
getGoodsCategorys
().
get
(
i
).
getCategoryName
());
}
pointList
.
add
(
mDetail
.
getSellingPoint1
());
pointList
.
add
(
mDetail
.
getSellingPoint2
());
pointList
.
add
(
mDetail
.
getSellingPoint3
());
setSceneAdapter
();
setPointAdapter
();
...
...
@@ -47,7 +66,7 @@ public class SaleInstructionFragment extends BaseFragment<SImplePresenter, Fragm
private
void
setSceneAdapter
()
{
BaseQuickAdapter
<
String
,
BaseViewHolder
>
sceneAdapter
=
new
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_product_scene
,
test
List
)
{
new
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_product_scene
,
scene
List
)
{
@Override
protected
void
convert
(
BaseViewHolder
helper
,
String
item
)
{
CheckBox
cbScene
=
helper
.
getView
(
R
.
id
.
cb_scene
);
...
...
@@ -61,7 +80,7 @@ public class SaleInstructionFragment extends BaseFragment<SImplePresenter, Fragm
private
void
setPointAdapter
()
{
BaseQuickAdapter
<
String
,
BaseViewHolder
>
pointdapter
=
new
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_sale_point
,
tes
tList
)
{
new
BaseQuickAdapter
<
String
,
BaseViewHolder
>(
R
.
layout
.
item_sale_point
,
poin
tList
)
{
@Override
protected
void
convert
(
BaseViewHolder
helper
,
String
item
)
{
helper
.
setText
(
R
.
id
.
tv_point_item
,
item
);
...
...
This diff is collapsed.
Click to expand it.
saleCenter/src/main/java/com/bigfish/salecenter/ui/fragment/SaleProductFragment.java
View file @
81df450b
...
...
@@ -7,6 +7,8 @@ import android.support.v7.widget.LinearLayoutManager;
import
com.bigfish.salecenter.R
;
import
com.bigfish.salecenter.adapter.SaleProductAdapter
;
import
com.bigfish.salecenter.databinding.FragmentCommonSaleBinding
;
import
com.bigfish.salecenter.databinding.ItemSaleProductBinding
;
import
com.bigfish.salecenter.model.ProductListBean
;
import
com.bigfish.salecenter.presenter.saleproduct.SaleProductPresent
;
import
com.bigfish.salecenter.ui.activity.ProductDetailActivity
;
import
com.dayu.base.ui.fragment.BaseFragment
;
...
...
@@ -38,6 +40,11 @@ public class SaleProductFragment extends BaseFragment<SaleProductPresent,Fragmen
mBind
.
setPresenter
(
mPresenter
);
}
@Override
protected
void
lazyLoad
()
{
super
.
lazyLoad
();
mPresenter
.
refresh
();
}
@Override
...
...
@@ -49,17 +56,23 @@ public class SaleProductFragment extends BaseFragment<SaleProductPresent,Fragmen
mAdapter
=
new
SaleProductAdapter
(
true
);
mAdapter
.
setViewType
(
R
.
layout
.
item_sale_product
);
mAdapter
.
initPresenter
(
mPresenter
);
mBind
.
recyclerView
.
setAdapter
(
mAdapter
);
mPresenter
.
refresh
();
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
()
{
mBind
.
recyclerView
.
setOnItemClickListener
(
new
OnItemClickListener
<
ProductListBean
,
ItemSaleProductBinding
>
()
{
@Override
public
void
OnItemClick
(
Object
item
,
Object
bind
)
{
startActivity
(
new
Intent
(
mActivity
,
ProductDetailActivity
.
class
)
);
public
void
OnItemClick
(
ProductListBean
item
,
ItemSaleProductBinding
bind
)
{
toDetail
(
item
);
}
});
}
private
void
toDetail
(
ProductListBean
item
)
{
Intent
intent
=
new
Intent
(
mActivity
,
ProductDetailActivity
.
class
);
intent
.
putExtra
(
"id"
,
item
.
getId
());
mActivity
.
startActivity
(
intent
);
}
@Override
public
int
getLayoutId
()
{
return
R
.
layout
.
fragment_common_sale
;
...
...
This diff is collapsed.
Click to expand it.
saleCenter/src/main/res/layout/fragment_product_instruction.xml
View file @
81df450b
...
...
@@ -71,6 +71,7 @@
<TextView
android:id=
"@+id/tv_single_price"
android:textColor=
"@color/cl_order_item_date"
style=
"@style/sale_item_text2"
/>
</LinearLayout>
...
...
This diff is collapsed.
Click to expand it.
saleCenter/src/main/res/layout/item_sale_order.xml
View file @
81df450b
...
...
@@ -31,13 +31,13 @@
<TextView
style=
"@style/sale_item_text"
android:text
Style=
"bold
"
android:text
=
"@string/brand_model
"
/>
android:text
=
"@string/brand_model
"
android:text
Style=
"bold
"
/>
<TextView
android:id=
"@+id/tv_brand_model"
android:textStyle=
"bold
"
style=
"@style/sale_item_text2
"
/>
style=
"@style/sale_item_text2
"
android:textStyle=
"bold
"
/>
</LinearLayout>
...
...
@@ -45,7 +45,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"
1
5dp"
>
android:layout_marginRight=
"5dp"
>
<LinearLayout
android:layout_width=
"wrap_content"
...
...
@@ -55,13 +55,15 @@
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/sale_order_price"
/>
android:text=
"@string/sale_order_price"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_price"
style=
"@style/sale_item_text2"
android:text=
"00"
android:textColor=
"@color/bg_button"
/>
android:textColor=
"@color/bg_button"
android:textSize=
"12sp"
/>
</LinearLayout>
...
...
@@ -73,13 +75,15 @@
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/sale_commision"
/>
android:text=
"@string/sale_commision"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_commision"
style=
"@style/sale_item_text2"
android:text=
"00"
android:textColor=
"@color/cl_order_item_date"
/>
android:textColor=
"@color/cl_order_item_date"
android:textSize=
"12sp"
/>
</LinearLayout>
</RelativeLayout>
...
...
This diff is collapsed.
Click to expand it.
saleCenter/src/main/res/layout/item_sale_product.xml
View file @
81df450b
...
...
@@ -17,8 +17,7 @@
android:id=
"@+id/iv_img"
android:layout_width=
"@dimen/dp_89"
android:layout_height=
"@dimen/dp_89"
android:src=
"@drawable/icon_img_default"
/>
android:src=
"@drawable/icon_img_default"
/>
<LinearLayout
android:layout_width=
"0dp"
...
...
@@ -27,18 +26,17 @@
android:layout_weight=
"1"
android:orientation=
"vertical"
>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<LinearLayout
style=
"@style/sale_linearlayout"
>
<TextView
style=
"@style/sale_item_text"
android:text
Style=
"bold
"
android:text
=
"@string/brand_model
"
/>
android:text
=
"@string/brand_model
"
android:text
Style=
"bold
"
/>
<TextView
android:id=
"@+id/tv_brand_model"
android:textStyle=
"bold
"
style=
"@style/sale_item_text2
"
/>
style=
"@style/sale_item_text2
"
android:textStyle=
"bold
"
/>
</LinearLayout>
...
...
@@ -46,7 +44,7 @@
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginTop=
"5dp"
android:layout_marginRight=
"
1
5dp"
>
android:layout_marginRight=
"5dp"
>
<LinearLayout
android:layout_width=
"wrap_content"
...
...
@@ -56,13 +54,15 @@
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/sale_single_price"
/>
android:text=
"@string/sale_single_price"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_single_price"
style=
"@style/sale_item_text2"
android:text=
"00"
android:textColor=
"@color/bg_button"
/>
android:textColor=
"@color/bg_button"
android:textSize=
"12sp"
/>
</LinearLayout>
...
...
@@ -74,13 +74,15 @@
<TextView
style=
"@style/sale_item_text"
android:text=
"@string/commision_str"
/>
android:text=
"@string/commision_str"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/tv_commision"
style=
"@style/sale_item_text2"
android:text=
"00"
android:textColor=
"@color/cl_order_item_date"
/>
android:textColor=
"@color/cl_order_item_date"
android:textSize=
"12sp"
/>
</LinearLayout>
</RelativeLayout>
...
...
@@ -89,7 +91,7 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"15dp"
android:layout_marginRight=
"
10
dp"
android:layout_marginRight=
"
5
dp"
android:orientation=
"horizontal"
>
<Button
...
...
@@ -110,8 +112,8 @@
android:layout_weight=
"1"
android:background=
"@color/cl_order_item_date"
android:gravity=
"center"
android:text
Color=
"@color/white
"
android:text
=
"@string/share_recommend
"
/>
android:text
=
"@string/share_recommend
"
android:text
Color=
"@color/white
"
/>
</LinearLayout>
...
...
This diff is collapsed.
Click to expand it.
userCenter/src/main/java/com/dayu/usercenter/presenter/homeuser/HomeUserPresenter.java
View file @
81df450b
...
...
@@ -14,6 +14,7 @@ import com.dayu.usercenter.ui.activity.QualityCertificationActivity;
import
com.dayu.usercenter.ui.activity2.BusinessTypeActivity
;
import
com.dayu.usercenter.ui.activity2.SaleRecordActivity
;
import
com.dayu.usercenter.ui.activity2.ServiceRecordActivity
;
import
com.dayu.usercenter.ui.activity2.UserInfoActivity
;
import
com.dayu.usercenter.ui.activity2.UserLicenceActivity
;
import
com.umeng.analytics.MobclickAgent
;
...
...
@@ -60,10 +61,13 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
public
void
dumpToSetting
()
{
mView
.
dumpToSetting
();
}
public
void
toUserSetting
()
{
mView
.
startActivity
(
UserInfoActivity
.
class
);
}
@Override
public
void
dumpToOrderRecord
()
{
mView
.
startActivity
(
ServiceRecordActivity
.
class
);
//
mView.startActivity(ServiceRecordActivity.class);
}
@Override
...
...
@@ -73,7 +77,7 @@ public class HomeUserPresenter extends HomeUserContract.Presenter {
@Override
public
void
dumpToSaleRecord
()
{
mView
.
startActivity
(
SaleRecordActivity
.
class
);
//
mView.startActivity(SaleRecordActivity.class);
}
@Override
...
...
This diff is collapsed.
Click to expand it.
userCenter/src/main/java/com/dayu/usercenter/ui/fragment/HomeUserFragment.java
View file @
81df450b
...
...
@@ -9,10 +9,12 @@ import android.view.ViewGroup;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
com.alibaba.android.arouter.launcher.ARouter
;
import
com.dayu.base.ui.fragment.BaseFragment
;
import
com.dayu.common.Constants
;
import
com.dayu.event.UserInfo
;
import
com.dayu.provider.event.CertificationEvent
;
import
com.dayu.provider.router.RouterPath
;
import
com.dayu.usercenter.R
;
import
com.dayu.usercenter.data.protocol.EngineerInfo
;
import
com.dayu.usercenter.data.protocol.OrderRecord
;
...
...
@@ -154,8 +156,8 @@ public class HomeUserFragment extends BaseFragment<HomeUserPresenter, FragmentHo
@Override
public
void
dumpToSetting
()
{
//
ARouter.getInstance().build(RouterPath.PATH_SETTING).navigation();
startActivity
(
UserInfoActivity
.
class
);
ARouter
.
getInstance
().
build
(
RouterPath
.
PATH_SETTING
).
navigation
();
//
startActivity(UserInfoActivity.class);
MobclickAgent
.
onEvent
(
mActivity
,
"setting"
);
}
...
...
This diff is collapsed.
Click to expand it.
userCenter/src/main/res/layout/fragment_home_user.xml
View file @
81df450b
...
...
@@ -46,8 +46,18 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@drawable/personal_center_selector"
android:onClick=
"@{()->presenter.toUserSetting()}"
android:padding=
"15dp"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@drawable/icon_arrow_right"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"10dp"
/>
<com.dayu.widgets.CircleImageView
android:id=
"@+id/iv_header"
imageUrl=
"@{presenter.mUrl}"
...
...
This diff is collapsed.
Click to expand it.
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