Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
lify
RvApp
Commits
073956c6
Commit
073956c6
authored
Jul 20, 2019
by
jianglx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
个人中心分享有礼的完善
parent
dc7993c9
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
603 additions
and
230 deletions
+603
-230
WelcomeActivity.java
RvClient/src/main/java/com/xxfc/rv/WelcomeActivity.java
+1
-0
ApiConfig.java
...e_home/src/main/java/com/rv/home/rv/module/ApiConfig.java
+3
-1
activity_mine.xml
module_mine/src/main/res/layout/activity_mine.xml
+20
-1
ReativeBillActivity.java
...share/src/main/java/com/rv/share/ReativeBillActivity.java
+18
-3
ShareActivity.java
plugin_share/src/main/java/com/rv/share/ShareActivity.java
+14
-8
WebViewActivity.java
plugin_share/src/main/java/com/rv/share/WebViewActivity.java
+1
-4
IncomeListAdapter.java
...src/main/java/com/rv/share/adapter/IncomeListAdapter.java
+18
-2
IncomeRecordsBean.java
...re/src/main/java/com/rv/share/bean/IncomeRecordsBean.java
+93
-110
ActivationFragment.java
...c/main/java/com/rv/share/fragment/ActivationFragment.java
+86
-3
InComeRecordFragment.java
...main/java/com/rv/share/fragment/InComeRecordFragment.java
+61
-7
InviteFragment.java
...e/src/main/java/com/rv/share/fragment/InviteFragment.java
+113
-8
BillPresenter.java
...e/src/main/java/com/rv/share/presenter/BillPresenter.java
+8
-2
activity_reative_bill.xml
plugin_share/src/main/res/layout/activity_reative_bill.xml
+103
-76
activity_share.xml
plugin_share/src/main/res/layout/activity_share.xml
+3
-3
fragment_income_record.xml
plugin_share/src/main/res/layout/fragment_income_record.xml
+9
-1
item_income.xml
plugin_share/src/main/res/layout/item_income.xml
+52
-1
No files found.
RvClient/src/main/java/com/xxfc/rv/WelcomeActivity.java
View file @
073956c6
...
...
@@ -51,6 +51,7 @@ public class WelcomeActivity extends BaseActivity<CommonPresenter> {
public
void
onGetInfoFinish
(
String
info
)
{
// 客户端获取到的参数是json字符串格式
LogUtil
.
d
(
"ShareInstall"
,
"info = "
+
info
);
// info ="{\"from\":\"singlemessage\",\"code\":\"qRj5igja_P0101\"}";
if
(
info
.
contains
(
"code"
))
try
{
JSONObject
object
=
new
JSONObject
(
info
);
...
...
module_home/src/main/java/com/rv/home/rv/module/ApiConfig.java
View file @
073956c6
...
...
@@ -86,5 +86,7 @@ public class ApiConfig {
public
static
String
HTTP_URL_PERSON_SHARE_INFO
=
RvFrameConfig
.
HOST
+
"/api/admin/team/promote"
;
public
static
String
HTTP_URL_INCOME_RECORD
=
RvFrameConfig
.
HOST
+
"api/activity/activityPopularize/app/unauth/popularize-list"
;
public
static
String
HTTP_URL_INCOME_RECORD
=
RvFrameConfig
.
HOST
+
"/api/admin/sellingwater/page"
;
public
static
String
HTTP_URL_INVITE_LIST
=
RvFrameConfig
.
HOST
+
"/api/admin/relation/pages"
;
}
module_mine/src/main/res/layout/activity_mine.xml
View file @
073956c6
...
...
@@ -538,10 +538,29 @@
</RelativeLayout>
<RelativeLayout
android:id=
"@+id/rl_item_share"
android:layout_width=
"0dp"
android:layout_height=
"@dimen/size_60"
android:layout_weight=
"1"
android:orientation=
"vertical"
></RelativeLayout>
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerHorizontal=
"true"
android:src=
"@drawable/mycenter_icon_visitors"
/>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"@dimen/size_18"
android:text=
"分享有礼"
android:textColor=
"@color/colorMain"
android:textSize=
"@dimen/size_12"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"0dp"
...
...
plugin_share/src/main/java/com/rv/share/ReativeBillActivity.java
View file @
073956c6
...
...
@@ -4,11 +4,12 @@ import android.content.Context;
import
android.content.Intent
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.support.v7.app.AppCompatActivity
;
import
android.os.Bundle
;
import
android.text.TextUtils
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
com.base.utils.ui.image.round.RoundImageView
;
...
...
@@ -20,12 +21,14 @@ import com.ruiwenliu.wrapper.weight.TitleView;
import
com.rv.component.utils.DisplayUtil
;
import
com.rv.component.utils.ZxingUtils
;
import
com.rv.home.rv.module.basic.BaseStatusActivity
;
import
com.rv.
home.rv.module.basic.presenter.Common
Presenter
;
import
com.rv.
share.presenter.ReativeBill
Presenter
;
import
com.yuyife.okgo.OkGoUtil
;
import
butterknife.BindView
;
import
butterknife.OnClick
;
public
class
ReativeBillActivity
extends
BaseStatusActivity
<
ReativeBillPresenter
>
{
public
class
ReativeBillActivity
extends
BaseStatusActivity
<
CommonPresenter
>
{
private
String
url
;
@BindView
(
R2
.
id
.
ring_header
)
RoundImageView
roundImageView
;
...
...
@@ -37,6 +40,8 @@ public class ReativeBillActivity extends BaseStatusActivity<CommonPresenter> {
Button
btnSaveBill
;
@BindView
(
R2
.
id
.
btn_share
)
Button
btnShare
;
@BindView
(
R2
.
id
.
ll_bill_content
)
LinearLayout
llBillContent
;
public
static
Intent
getIntent
(
Context
context
,
String
url
)
{
Intent
intent
=
new
Intent
(
context
,
ReativeBillActivity
.
class
);
...
...
@@ -71,6 +76,16 @@ public class ReativeBillActivity extends BaseStatusActivity<CommonPresenter> {
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
}
@OnClick
({
R2
.
id
.
btn_save_bill
,
R2
.
id
.
btn_share
})
public
void
onViewClicked
(
View
view
)
{
int
id
=
view
.
getId
();
if
(
id
==
R
.
id
.
btn_save_bill
)
{
mPresenter
.
saveBill
(
llBillContent
);
}
else
if
(
id
==
R
.
id
.
btn_share
)
{
mPresenter
.
saveShare
(
llBillContent
);
}
}
}
plugin_share/src/main/java/com/rv/share/ShareActivity.java
View file @
073956c6
...
...
@@ -10,7 +10,9 @@ import android.widget.TextView;
import
com.base.utils.ui.datetime.selector.util.TextUtil
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.SPConstance
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.util.UtilsManager
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.component.utils.DisplayUtil
;
...
...
@@ -50,7 +52,7 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
@BindView
(
R2
.
id
.
tv_more_detail
)
TextView
tvMoreDetail
;
private
String
shareUrl
;
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
...
...
@@ -68,8 +70,9 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
tvPersonInval
.
setText
(
data
.
getInviteNumber
()
+
"人"
);
tvPersonUse
.
setText
(
data
.
getActivatedNumber
()
+
"人"
);
if
(
TextUtils
.
isEmpty
(
data
.
getLeaderHeadUrl
())
&&
TextUtil
.
isEmpty
(
data
.
getLeaderUsername
()))
{
//
((View) tvParentPhone.getParent().getParent()).setVisibility(View.GONE);
((
View
)
tvParentPhone
.
getParent
().
getParent
()).
setVisibility
(
View
.
GONE
);
}
else
{
((
View
)
tvParentPhone
.
getParent
().
getParent
()).
setVisibility
(
View
.
VISIBLE
);
if
(!
TextUtils
.
isEmpty
(
data
.
getLeaderHeadUrl
()))
{
GlideManager
.
getInstance
(
getApplicationContext
()).
loadImage
(
data
.
getLeaderHeadUrl
(),
imgParent
);
}
...
...
@@ -108,15 +111,18 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
@OnClick
({
R2
.
id
.
tv_weixin
,
R2
.
id
.
tv_weixin_circle
,
R2
.
id
.
tv_bill
,
R2
.
id
.
tv_more
,
R2
.
id
.
tv_more_detail
})
public
void
onViewClicked
(
View
view
)
{
int
id
=
view
.
getId
();
if
(
TextUtils
.
isEmpty
(
shareUrl
))
{
String
code
=
UtilsManager
.
getInstance
(
OkGoUtil
.
application
).
getSPInstance
(
SPConstance
.
USER_JSON
).
getString
(
SPConstance
.
USER_JSON_CODE
,
""
);
shareUrl
=
RvFrameConfig
.
HOST
+
"/h5/appHtml/view/download.html?code="
+
code
+
"_P0101"
;
}
if
(
id
==
R
.
id
.
tv_weixin
)
{
mPresenter
.
shareWx
(
RvFrameConfig
.
HOST
+
"/h5/appHtml/view/download.html"
,
"【滴房车】"
,
"新人专享大礼包,快去领!"
);
mPresenter
.
shareWx
(
shareUrl
,
"【滴房车】"
,
"新人专享大礼包,快去领!"
);
}
else
if
(
id
==
R
.
id
.
tv_weixin_circle
)
{
mPresenter
.
shareWxC
(
RvFrameConfig
.
HOST
+
"/h5/appHtml/view/download.html"
,
"【滴房车】"
,
"新人专享大礼包,快去领!"
);
mPresenter
.
shareWxC
(
shareUrl
,
"【滴房车】"
,
"新人专享大礼包,快去领!"
);
}
else
if
(
id
==
R
.
id
.
tv_bill
)
{
startActivity
(
ReativeBillActivity
.
getIntent
(
this
,
RvFrameConfig
.
HOST
+
"/h5/appHtml/view/download.html"
));
startActivity
(
ReativeBillActivity
.
getIntent
(
this
,
shareUrl
));
}
else
if
(
id
==
R
.
id
.
tv_more
)
{
mPresenter
.
shareMore
(
RvFrameConfig
.
HOST
+
"/h5/appHtml/view/download.html"
,
"【滴房车】"
,
"新人专享大礼包,快去领!"
);
mPresenter
.
shareMore
(
shareUrl
,
"【滴房车】"
,
"新人专享大礼包,快去领!"
);
}
else
if
(
id
==
R
.
id
.
tv_more_detail
)
{
startActivity
(
new
Intent
(
this
,
PopularizeActivity
.
class
));
}
...
...
plugin_share/src/main/java/com/rv/share/WebViewActivity.java
View file @
073956c6
...
...
@@ -9,14 +9,11 @@ import android.widget.LinearLayout;
import
android.widget.Toast
;
import
com.base.utils.tools.android.NetworkUtil
;
import
com.ruiwenliu.wrapper.SPConstance
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.util.UtilsManager
;
import
com.ruiwenliu.wrapper.weight.TitleView
;
import
com.rv.home.rv.module.basic.BaseStatusActivity
;
import
com.rv.share.presenter.WebViewPresenter
;
import
com.rv.share.view.RvWebView
;
import
com.yuyife.okgo.OkGoUtil
;
import
butterknife.BindView
;
...
...
@@ -92,7 +89,7 @@ public class WebViewActivity extends BaseStatusActivity<WebViewPresenter> {
private
RvWebView
.
WebViewListener
listener
=
new
RvWebView
.
WebViewListener
()
{
@Override
public
void
share
(
String
url
,
String
title
,
String
desc
)
{
mPresenter
.
showShareDialog
(
url
+
UtilsManager
.
getInstance
(
OkGoUtil
.
application
).
getSPInstance
(
SPConstance
.
USER_JSON
).
getString
(
SPConstance
.
USER_JSON_CODE
,
""
)
,
title
,
desc
);
mPresenter
.
showShareDialog
(
url
,
title
,
desc
);
}
@Override
...
...
plugin_share/src/main/java/com/rv/share/adapter/IncomeListAdapter.java
View file @
073956c6
package
com
.
rv
.
share
.
adapter
;
import
android.support.annotation.Nullable
;
import
android.widget.TextView
;
import
com.base.utils.ui.image.round.RoundImageView
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseViewHolder
;
import
com.ruiwenliu.wrapper.util.glide.GlideManager
;
import
com.rv.component.utils.DateUtils
;
import
com.rv.home.rv.module.ui.main.home.order.bean.OrderListBean
;
import
com.rv.share.R
;
import
com.rv.share.bean.IncomeRecordsBean
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
IncomeListAdapter
extends
BaseQuickAdapter
<
IncomeRecordsBean
.
IncomeItem
,
BaseViewHolder
>
{
public
IncomeListAdapter
()
{
super
(
R
.
layout
.
item_income
,
null
);
public
IncomeListAdapter
(
@Nullable
List
<
IncomeRecordsBean
.
IncomeItem
>
data
)
{
super
(
R
.
layout
.
item_income
,
data
);
}
@Override
protected
void
convert
(
BaseViewHolder
helper
,
IncomeRecordsBean
.
IncomeItem
item
)
{
StringBuilder
buffer
=
new
StringBuilder
();
buffer
.
append
(
item
.
getUsername
()).
append
(
"成交"
).
append
(
item
.
getPrice
()).
append
(
"元"
);
helper
.
setText
(
R
.
id
.
tv_income_record
,
buffer
.
toString
());
helper
.
setText
(
R
.
id
.
tv_income_time
,
DateUtils
.
timestampToString1
(
item
.
getCrtTime
()));
StringBuilder
builder
=
new
StringBuilder
();
builder
.
append
(
"+"
).
append
(
item
.
getCommission
()).
append
(
"元"
);
helper
.
setText
(
R
.
id
.
tv_income_price
,
builder
.
toString
());
GlideManager
.
getInstance
(
mContext
).
loadImage
(
item
.
getHeadUrl
(),
(
RoundImageView
)
helper
.
itemView
.
findViewById
(
R
.
id
.
rimg_header
));
}
}
plugin_share/src/main/java/com/rv/share/bean/IncomeRecordsBean.java
View file @
073956c6
...
...
@@ -2,6 +2,7 @@ package com.rv.share.bean;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
java.math.BigDecimal
;
import
java.util.List
;
public
class
IncomeRecordsBean
extends
BaseBean
{
...
...
@@ -25,188 +26,170 @@ public class IncomeRecordsBean extends BaseBean {
}
public
static
class
IncomeRecordData
{
private
int
id
;
private
long
crtTime
;
private
long
updTime
;
private
String
name
;
private
String
descr
;
private
String
value
;
private
int
progress
;
private
int
type
;
private
String
code
;
private
List
<
IncomeItem
>
items
;
private
BigDecimal
totalIncome
;
private
List
<
IncomeItem
>
sellingWaters
;
private
int
pageNum
;
private
int
pageSize
;
private
int
totalCount
;
private
int
totalPage
;
public
int
get
Id
()
{
return
id
;
public
int
get
PageNum
()
{
return
pageNum
;
}
public
void
set
Id
(
int
id
)
{
this
.
id
=
id
;
public
void
set
PageNum
(
int
pageNum
)
{
this
.
pageNum
=
pageNum
;
}
public
long
getCrtTim
e
()
{
return
crtTim
e
;
public
int
getPageSiz
e
()
{
return
pageSiz
e
;
}
public
void
set
CrtTime
(
long
crtTim
e
)
{
this
.
crtTime
=
crtTim
e
;
public
void
set
PageSize
(
int
pageSiz
e
)
{
this
.
pageSize
=
pageSiz
e
;
}
public
long
getUpdTime
()
{
return
updTime
;
}
public
void
setUpdTime
(
long
updTime
)
{
this
.
updTime
=
updTime
;
public
int
getTotalCount
()
{
return
totalCount
;
}
public
String
getName
(
)
{
return
name
;
public
void
setTotalCount
(
int
totalCount
)
{
this
.
totalCount
=
totalCount
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
nam
e
;
public
int
getTotalPage
(
)
{
return
totalPag
e
;
}
public
String
getDescr
(
)
{
return
descr
;
public
void
setTotalPage
(
int
totalPage
)
{
this
.
totalPage
=
totalPage
;
}
public
void
setDescr
(
String
descr
)
{
this
.
descr
=
descr
;
public
BigDecimal
getTotalIncome
(
)
{
return
totalIncome
;
}
public
String
getValue
(
)
{
return
valu
e
;
public
void
setTotalIncome
(
BigDecimal
totalIncome
)
{
this
.
totalIncome
=
totalIncom
e
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
public
List
<
IncomeItem
>
getSellingWaters
(
)
{
return
sellingWaters
;
}
public
int
getProgress
(
)
{
return
progres
s
;
public
void
setSellingWaters
(
List
<
IncomeItem
>
sellingWaters
)
{
this
.
sellingWaters
=
sellingWater
s
;
}
public
void
setProgress
(
int
progress
)
{
this
.
progress
=
progress
;
}
public
int
getType
()
{
return
type
;
}
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
}
public
static
class
IncomeItem
{
private
BigDecimal
commission
;
private
long
crtTime
;
private
int
goodNumber
;
private
String
headUrl
;
private
String
img
;
private
String
nickName
;
private
BigDecimal
price
;
private
int
status
;
private
String
title
;
private
long
updTime
;
private
String
username
;
private
int
waiting
;
public
String
getCode
()
{
return
co
de
;
public
BigDecimal
getCommission
()
{
return
co
mmission
;
}
public
void
setCo
de
(
String
code
)
{
this
.
co
de
=
code
;
public
void
setCo
mmission
(
BigDecimal
commission
)
{
this
.
co
mmission
=
commission
;
}
public
List
<
IncomeItem
>
getItems
()
{
return
items
;
public
long
getCrtTime
()
{
return
crtTime
;
}
public
void
setItems
(
List
<
IncomeItem
>
items
)
{
this
.
items
=
items
;
}
public
void
setCrtTime
(
long
crtTime
)
{
this
.
crtTime
=
crtTime
;
}
public
static
class
IncomeItem
{
private
int
id
;
private
long
crtTime
;
private
long
updTime
;
private
String
name
;
private
String
descr
;
private
int
popularizeId
;
private
int
progress
;
private
int
type
;
private
int
sort
;
private
int
status
;
public
int
getId
()
{
return
id
;
public
int
getGoodNumber
()
{
return
goodNumber
;
}
public
void
set
Id
(
int
id
)
{
this
.
id
=
id
;
public
void
set
GoodNumber
(
int
goodNumber
)
{
this
.
goodNumber
=
goodNumber
;
}
public
long
getCrtTime
()
{
return
crtTime
;
public
String
getHeadUrl
()
{
return
headUrl
;
}
public
void
set
CrtTime
(
long
crtTime
)
{
this
.
crtTime
=
crtTime
;
public
void
set
HeadUrl
(
String
headUrl
)
{
this
.
headUrl
=
headUrl
;
}
public
long
getUpdTime
()
{
return
updTime
;
public
String
getImg
()
{
return
img
;
}
public
void
set
UpdTime
(
long
updTime
)
{
this
.
updTime
=
updTime
;
public
void
set
Img
(
String
img
)
{
this
.
img
=
img
;
}
public
String
getName
()
{
return
name
;
public
String
getN
ickN
ame
()
{
return
n
ickN
ame
;
}
public
void
setN
ame
(
String
n
ame
)
{
this
.
n
ame
=
n
ame
;
public
void
setN
ickName
(
String
nickN
ame
)
{
this
.
n
ickName
=
nickN
ame
;
}
public
String
getDescr
()
{
return
descr
;
public
BigDecimal
getPrice
()
{
return
price
;
}
public
void
set
Descr
(
String
descr
)
{
this
.
descr
=
descr
;
public
void
set
Price
(
BigDecimal
price
)
{
this
.
price
=
price
;
}
public
int
get
PopularizeId
()
{
return
popularizeId
;
public
int
get
Status
()
{
return
status
;
}
public
void
set
PopularizeId
(
int
popularizeId
)
{
this
.
popularizeId
=
popularizeId
;
public
void
set
Status
(
int
status
)
{
this
.
status
=
status
;
}
public
int
getProgress
()
{
return
progress
;
public
String
getTitle
()
{
return
title
;
}
public
void
set
Progress
(
int
progress
)
{
this
.
progress
=
progress
;
public
void
set
Title
(
String
title
)
{
this
.
title
=
title
;
}
public
int
getTyp
e
()
{
return
typ
e
;
public
long
getUpdTim
e
()
{
return
updTim
e
;
}
public
void
set
Type
(
int
typ
e
)
{
this
.
type
=
typ
e
;
public
void
set
UpdTime
(
long
updTim
e
)
{
this
.
updTime
=
updTim
e
;
}
public
int
getSort
()
{
return
sort
;
public
String
getUsername
()
{
return
username
;
}
public
void
set
Sort
(
int
sort
)
{
this
.
sort
=
sort
;
public
void
set
Username
(
String
username
)
{
this
.
username
=
username
;
}
public
int
get
Status
()
{
return
status
;
public
int
get
Waiting
()
{
return
waiting
;
}
public
void
set
Status
(
int
status
)
{
this
.
status
=
status
;
public
void
set
Waiting
(
int
waiting
)
{
this
.
waiting
=
waiting
;
}
}
}
plugin_share/src/main/java/com/rv/share/fragment/ActivationFragment.java
View file @
073956c6
package
com
.
rv
.
share
.
fragment
;
import
android.os.Bundle
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.text.TextUtils
;
import
android.widget.LinearLayout
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseFragment
;
import
com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
;
import
com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshView
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.basic.presenter.CommonPresenter
;
import
com.rv.share.R
;
import
com.rv.share.R2
;
import
com.rv.share.adapter.ActivationListAdapter
;
import
com.rv.share.adapter.InviteListAdapter
;
import
com.rv.share.bean.InviteListBean
;
import
com.yuyife.okgo.OkGoUtil
;
public
class
ActivationFragment
extends
BaseFragment
<
CommonPresenter
>
{
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
import
butterknife.BindView
;
public
class
ActivationFragment
extends
BaseFragment
<
CommonPresenter
>
implements
BaseQuickAdapter
.
RequestLoadMoreListener
,
SimpleRefreshLayout
.
OnSimpleRefreshListener
{
@BindView
(
R2
.
id
.
recyclerView
)
RecyclerView
recyclerView
;
@BindView
(
R2
.
id
.
refresh
)
SimpleRefreshLayout
refreshLayout
;
private
ActivationListAdapter
adapter
;
private
int
currentPage
=
1
;
private
int
pageSize
=
10
;
private
int
pageTotal
=
0
;
public
static
ActivationFragment
getInstance
()
{
ActivationFragment
fragment
=
new
ActivationFragment
();
...
...
@@ -16,21 +47,73 @@ public class ActivationFragment extends BaseFragment<CommonPresenter> {
@Override
public
int
getViewLayout
()
{
return
R
.
layout
.
fragment_
activation
;
return
R
.
layout
.
fragment_
income_record
;
}
@Override
protected
void
initView
(
Bundle
savedInstanceState
)
{
recyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
(),
LinearLayout
.
VERTICAL
,
false
));
adapter
=
new
ActivationListAdapter
(
new
ArrayList
<
InviteListBean
.
inviteMember
>());
adapter
.
setOnLoadMoreListener
(
this
,
recyclerView
);
refreshLayout
.
setHeaderView
(
new
SimpleRefreshView
(
getContext
()));
refreshLayout
.
setOnSimpleRefreshListener
(
this
);
recyclerView
.
setAdapter
(
adapter
);
}
@Override
protected
void
loadData
(
Bundle
savedInstanceState
)
{
getActivationData
();
}
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
if
(
requestType
==
0
)
{
InviteListBean
bean
=
(
InviteListBean
)
result
;
if
(
bean
.
isRel
()
&&
bean
.
getData
()
!=
null
&&
bean
.
getData
().
getInviteMembers
()
!=
null
)
{
if
(
currentPage
==
1
)
{
pageTotal
=
bean
.
getData
().
getTotalPage
();
refreshLayout
.
onRefreshComplete
();
if
(
bean
.
getData
().
getInviteMembers
().
size
()
==
0
)
{
adapter
.
setEmptyView
(
getEmptyView
(
recyclerView
,
-
1
,
getString
(
R
.
string
.
rv_select_not_data
)));
adapter
.
notifyDataSetChanged
();
}
else
{
adapter
.
setNewData
(
bean
.
getData
().
getInviteMembers
());
}
}
else
{
adapter
.
addData
(
bean
.
getData
().
getInviteMembers
());
adapter
.
loadMoreComplete
();
}
}
}
}
private
void
getActivationData
()
{
if
(!
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
Map
<
String
,
Object
>
header
=
new
HashMap
<>();
header
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"state"
,
1
);
map
.
put
(
"page"
,
currentPage
);
map
.
put
(
"limit"
,
pageSize
);
mPresenter
.
getData
(
RvFrameConfig
.
HOST
,
0
,
ApiConfig
.
HTTP_URL_INVITE_LIST
,
InviteListBean
.
class
,
map
,
header
,
true
);
}
}
@Override
public
void
onLoadMoreRequested
()
{
if
(
currentPage
>=
pageTotal
)
{
adapter
.
loadMoreEnd
();
}
else
{
currentPage
++;
getActivationData
();
}
}
@Override
public
void
onRefresh
()
{
currentPage
=
1
;
getActivationData
();
}
}
plugin_share/src/main/java/com/rv/share/fragment/InComeRecordFragment.java
View file @
073956c6
package
com
.
rv
.
share
.
fragment
;
import
android.os.Bundle
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.text.TextUtils
;
import
android.widget.LinearLayout
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.google.gson.Gson
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseFragment
;
import
com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
;
import
com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshView
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.basic.presenter.CommonPresenter
;
import
com.rv.share.R
;
import
com.rv.share.R2
;
import
com.rv.share.adapter.IncomeListAdapter
;
import
com.rv.share.bean.IncomeRecordsBean
;
import
com.yuyife.okgo.OkGoUtil
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
InComeRecordFragment
extends
BaseFragment
<
CommonPresenter
>
{
import
butterknife.BindView
;
public
class
InComeRecordFragment
extends
BaseFragment
<
CommonPresenter
>
implements
BaseQuickAdapter
.
RequestLoadMoreListener
,
SimpleRefreshLayout
.
OnSimpleRefreshListener
{
@BindView
(
R2
.
id
.
recyclerView
)
RecyclerView
recyclerView
;
@BindView
(
R2
.
id
.
refresh
)
SimpleRefreshLayout
refreshLayout
;
private
IncomeListAdapter
adapter
;
private
int
currentPage
=
1
;
private
int
pageSize
=
10
;
private
int
pageTotal
=
0
;
public
static
InComeRecordFragment
getInstance
()
{
InComeRecordFragment
fragment
=
new
InComeRecordFragment
();
...
...
@@ -29,14 +52,17 @@ public class InComeRecordFragment extends BaseFragment<CommonPresenter> {
@Override
protected
void
initView
(
Bundle
savedInstanceState
)
{
recyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
(),
LinearLayout
.
VERTICAL
,
false
));
adapter
=
new
IncomeListAdapter
(
new
ArrayList
<
IncomeRecordsBean
.
IncomeItem
>());
adapter
.
setOnLoadMoreListener
(
this
,
recyclerView
);
refreshLayout
.
setHeaderView
(
new
SimpleRefreshView
(
getContext
()));
refreshLayout
.
setOnSimpleRefreshListener
(
this
);
recyclerView
.
setAdapter
(
adapter
);
}
@Override
protected
void
loadData
(
Bundle
savedInstanceState
)
{
getIncomeData
();
}
private
void
getIncomeData
()
{
...
...
@@ -45,7 +71,8 @@ public class InComeRecordFragment extends BaseFragment<CommonPresenter> {
header
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"code"
,
"0101"
);
map
.
put
(
"pageNo"
,
currentPage
);
map
.
put
(
"pageSize"
,
pageSize
);
mPresenter
.
getData
(
RvFrameConfig
.
HOST
,
0
,
ApiConfig
.
HTTP_URL_INCOME_RECORD
,
IncomeRecordsBean
.
class
,
map
,
header
,
true
);
}
}
...
...
@@ -54,10 +81,37 @@ public class InComeRecordFragment extends BaseFragment<CommonPresenter> {
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
if
(
requestType
==
0
)
{
IncomeRecordsBean
bean
=
(
IncomeRecordsBean
)
result
;
if
(
bean
.
isRel
()
&&
bean
.
getData
()
!=
null
)
{
if
(
bean
.
isRel
()
&&
bean
.
getData
()
!=
null
&&
bean
.
getData
().
getSellingWaters
()
!=
null
)
{
if
(
currentPage
==
1
)
{
pageTotal
=
bean
.
getData
().
getTotalPage
();
adapter
.
setNewData
(
bean
.
getData
().
getSellingWaters
());
refreshLayout
.
onRefreshComplete
();
if
(
bean
.
getData
().
getSellingWaters
().
size
()
==
0
)
{
adapter
.
setEmptyView
(
getEmptyView
(
recyclerView
,
-
1
,
getString
(
R
.
string
.
rv_select_not_data
)));
adapter
.
notifyDataSetChanged
();
}
}
else
{
adapter
.
addData
(
bean
.
getData
().
getSellingWaters
());
adapter
.
loadMoreComplete
();
}
}
}
}
@Override
public
void
onLoadMoreRequested
()
{
if
(
currentPage
>=
pageTotal
)
{
adapter
.
loadMoreEnd
();
}
else
{
currentPage
++;
getIncomeData
();
}
}
@Override
public
void
onRefresh
()
{
currentPage
=
1
;
getIncomeData
();
}
}
plugin_share/src/main/java/com/rv/share/fragment/InviteFragment.java
View file @
073956c6
package
com
.
rv
.
share
.
fragment
;
import
android.os.Bundle
;
import
android.support.v7.widget.LinearLayoutManager
;
import
android.support.v7.widget.RecyclerView
;
import
android.text.TextUtils
;
import
android.widget.LinearLayout
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.frame.rv.config.RvFrameConfig
;
import
com.google.gson.Gson
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
com.ruiwenliu.wrapper.base.BaseFragment
;
import
com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout
;
import
com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshView
;
import
com.rv.home.rv.module.ApiConfig
;
import
com.rv.home.rv.module.basic.presenter.CommonPresenter
;
import
com.rv.share.R
;
import
com.rv.share.R2
;
import
com.rv.share.adapter.InviteListAdapter
;
import
com.rv.share.bean.InviteListBean
;
import
com.yuyife.okgo.OkGoUtil
;
public
class
InviteFragment
extends
BaseFragment
<
CommonPresenter
>
{
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.Map
;
import
butterknife.BindView
;
public
class
InviteFragment
extends
BaseFragment
<
CommonPresenter
>
implements
BaseQuickAdapter
.
RequestLoadMoreListener
,
SimpleRefreshLayout
.
OnSimpleRefreshListener
{
@BindView
(
R2
.
id
.
recyclerView
)
RecyclerView
recyclerView
;
@BindView
(
R2
.
id
.
refresh
)
SimpleRefreshLayout
refreshLayout
;
private
InviteListAdapter
adapter
;
private
int
currentPage
=
1
;
private
int
pageSize
=
10
;
private
int
pageTotal
=
0
;
private
long
failureTime
;
public
static
InviteFragment
getInstance
()
{
InviteFragment
fragment
=
new
InviteFragment
();
...
...
@@ -16,27 +48,100 @@ public class InviteFragment extends BaseFragment<CommonPresenter> {
@Override
public
int
getViewLayout
()
{
return
R
.
layout
.
fragment_in
vite
;
return
R
.
layout
.
fragment_in
come_record
;
}
@Override
protected
void
initView
(
Bundle
savedInstanceState
)
{
recyclerView
.
setLayoutManager
(
new
LinearLayoutManager
(
getContext
(),
LinearLayout
.
VERTICAL
,
false
));
adapter
=
new
InviteListAdapter
(
new
ArrayList
<
InviteListBean
.
inviteMember
>());
adapter
.
setOnLoadMoreListener
(
this
,
recyclerView
);
refreshLayout
.
setHeaderView
(
new
SimpleRefreshView
(
getContext
()));
refreshLayout
.
setOnSimpleRefreshListener
(
this
);
recyclerView
.
setAdapter
(
adapter
);
}
@Override
protected
void
loadData
(
Bundle
savedInstanceState
)
{
getIn
com
eData
();
getIn
vit
eData
();
}
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
if
(
requestType
==
0
)
{
InviteListBean
bean
=
(
InviteListBean
)
result
;
if
(
bean
.
isRel
()
&&
bean
.
getData
()
!=
null
&&
bean
.
getData
().
getInviteMembers
()
!=
null
)
{
if
(
currentPage
==
1
)
{
failureTime
=
bean
.
getData
().
getFailureTime
();
pageTotal
=
bean
.
getData
().
getTotalPage
();
refreshLayout
.
onRefreshComplete
();
if
(
bean
.
getData
().
getInviteMembers
().
size
()
==
0
)
{
adapter
.
setEmptyView
(
getEmptyView
(
recyclerView
,
-
1
,
getString
(
R
.
string
.
rv_select_not_data
)));
adapter
.
notifyDataSetChanged
();
}
else
{
adapter
.
setEffTime
(
failureTime
*
1000
);
adapter
.
setNewData
(
bean
.
getData
().
getInviteMembers
());
}
}
else
{
adapter
.
addData
(
bean
.
getData
().
getInviteMembers
());
adapter
.
loadMoreComplete
();
}
}
}
}
//
// private void getInviteData() {
// String result = "{\"status\":200,\"message\":\"Success\",\"data\":{\"failureTime\":5184000,\"inviteMembers\":[ {\n" +
// " \"username\": \"15814005696\",\n" +
// " \"headUrl\": \"https://xxtest.upyuns.com/image/app/default_%20avatar.png\",\n" +
// " \"joinTime\": 1562402775992,\n" +
// " \"bindTime\": 1562402775992\n" +
// " },\n" +
// " {\n" +
// " \"username\": \"18552854696\",\n" +
// " \"headUrl\": \"https://xxtest.upyuns.com/image/app/default_%20avatar.png\",\n" +
// " \"joinTime\": 1563346993152,\n" +
// " \"bindTime\": 1563346993152\n" +
// " },\n" +
// " {\n" +
// " \"username\": \"17612025866\",\n" +
// " \"headUrl\": \"http://thirdwx.qlogo.cn/mmopen/vi_32/IEiawcHX9Y3HpqxALj6cFL7WSc8UxH7BDIHUf9gthntPdM7Ly0xnZ6sVpXic281kPb1w3oTHVbosTjc7z7Ef7naQ/132\",\n" +
// " \"joinTime\": 1563346993152,\n" +
// " \"bindTime\": 1563346993152\n" +
// " }],\"page\":1,\"limit\":10},\"rel\":true}";
// InviteListBean bean = new Gson().fromJson(result, InviteListBean.class);
// onShowResult(0, bean);
// }
private
void
getInviteData
()
{
if
(!
TextUtils
.
isEmpty
(
OkGoUtil
.
getToken
()))
{
Map
<
String
,
Object
>
header
=
new
HashMap
<>();
header
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"state"
,
2
);
map
.
put
(
"page"
,
currentPage
);
map
.
put
(
"limit"
,
pageSize
);
mPresenter
.
getData
(
RvFrameConfig
.
HOST
,
0
,
ApiConfig
.
HTTP_URL_INVITE_LIST
,
InviteListBean
.
class
,
map
,
header
,
true
);
}
}
@Override
public
void
onLoadMoreRequested
()
{
if
(
currentPage
>=
pageTotal
)
{
adapter
.
loadMoreEnd
();
}
else
{
currentPage
++;
getInviteData
();
}
}
/*****
* 获取收益记录记录
*/
private
void
getIncomeData
()
{
@Override
public
void
onRefresh
()
{
currentPage
=
1
;
getInviteData
();
}
}
plugin_share/src/main/java/com/rv/share/presenter/BillPresenter.java
View file @
073956c6
...
...
@@ -171,13 +171,19 @@ public class BillPresenter extends CommonPresenter {
shareDeal
();
}
if
(
image
!=
null
)
{
share
(
SHARE_MEDIA
.
WEIXIN
,
image
,
"
hello
"
);
share
(
SHARE_MEDIA
.
WEIXIN
,
image
,
""
);
}
}
@Override
public
void
wxCShare
()
{
share
(
SHARE_MEDIA
.
WEIXIN_CIRCLE
,
"hello"
);
if
(
image
==
null
)
{
shareDeal
();
}
if
(
image
!=
null
)
{
share
(
SHARE_MEDIA
.
WEIXIN_CIRCLE
,
image
,
""
);
}
}
@Override
...
...
plugin_share/src/main/res/layout/activity_reative_bill.xml
View file @
073956c6
...
...
@@ -4,27 +4,38 @@
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#FEE8C3"
android:orientation=
"vertical"
android:weightSum=
"19"
tools:context=
".ReativeBillActivity"
>
<LinearLayout
android:id=
"@+id/ll_bill_content"
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"17"
android:orientation=
"vertical"
android:weightSum=
"17"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"15"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_140"
android:scaleType=
"fitXY"
android:src=
"@drawable/bg_bill"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"#FEE8C3"
android:orientation=
"vertical"
android:padding=
"@dimen/dp_10"
android:weightSum=
"15"
>
<android.support.v7.widget.CardView
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"11"
android:layout_marginLeft=
"@dimen/dp_10"
android:layout_marginTop=
"@dimen/dp_10"
android:layout_marginRight=
"@dimen/dp_10"
android:layout_weight=
"1"
android:background=
"@color/white"
app:cardCornerRadius=
"@dimen/size_10"
>
...
...
@@ -71,15 +82,33 @@
</android.support.v7.widget.CardView>
</LinearLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"2"
>
<ImageView
android:layout_width=
"@dimen/size_80"
android:layout_height=
"@dimen/size_40"
android:layout_alignParentBottom=
"true"
android:layout_centerHorizontal=
"true"
android:src=
"@drawable/icon_reative_bill"
/>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"0dp"
android:layout_weight=
"4
"
android:gravity=
"center_horizontal|bottom
"
>
android:layout_weight=
"2
"
android:gravity=
"center_horizontal|top
"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"match_parent"
android:gravity=
"center_vertical"
android:layout_marginLeft=
"@dimen/size_10"
android:layout_marginRight=
"@dimen/size_10"
android:orientation=
"horizontal"
>
...
...
@@ -112,7 +141,5 @@
</LinearLayout>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
plugin_share/src/main/res/layout/activity_share.xml
View file @
073956c6
...
...
@@ -159,7 +159,7 @@
android:id=
"@+id/tv_amount"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
1
0元"
/>
android:text=
"0元"
/>
<TextView
android:layout_width=
"wrap_content"
...
...
@@ -188,7 +188,7 @@
android:id=
"@+id/tv_person_inval"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
1
0人"
/>
android:text=
"0人"
/>
<TextView
android:layout_width=
"wrap_content"
...
...
@@ -217,7 +217,7 @@
android:id=
"@+id/tv_person_use"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"
1
0人"
/>
android:text=
"0人"
/>
<TextView
android:layout_width=
"wrap_content"
...
...
plugin_share/src/main/res/layout/fragment_income_record.xml
View file @
073956c6
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<View
android:layout_width=
"match_parent"
android:layout_height=
"8dp"
android:background=
"@color/white"
/>
<include
layout=
"@layout/common_refresh"
/>
</LinearLayout>
plugin_share/src/main/res/layout/item_income.xml
View file @
073956c6
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/size_50"
>
android:layout_height=
"@dimen/size_60"
android:gravity=
"center"
>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/size_10"
android:layout_marginTop=
"@dimen/size_5"
android:layout_marginRight=
"@dimen/size_10"
android:layout_marginBottom=
"@dimen/size_5"
android:background=
"@drawable/bg_income_item"
>
<com.base.utils.ui.image.round.RoundImageView
android:id=
"@+id/rimg_header"
android:layout_width=
"@dimen/size_30"
android:layout_height=
"@dimen/size_30"
android:layout_alignParentLeft=
"true"
android:layout_centerVertical=
"true"
android:layout_marginLeft=
"@dimen/size_5"
/>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginLeft=
"@dimen/size_5"
android:layout_toRightOf=
"@id/rimg_header"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tv_income_record"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textSize=
"@dimen/sp_14"
/>
<TextView
android:id=
"@+id/tv_income_time"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/colorGray"
android:textSize=
"@dimen/text_10"
/>
</LinearLayout>
<TextView
android:id=
"@+id/tv_income_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_alignParentRight=
"true"
android:layout_centerVertical=
"true"
android:layout_marginRight=
"@dimen/text_10"
android:textColor=
"@color/gray_707070"
android:textSize=
"@dimen/sp_14"
/>
</RelativeLayout>
</LinearLayout>
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