Commit 6e80e712 authored by jianglx's avatar jianglx

添加会员使用代金券;修改QQ海报分享不了的问题

parent e4582669
......@@ -4,6 +4,7 @@ package com.frame.base.url;
* ARouter上面的注解需要我们写路径标识
*/
public final class Constance {
public static final String ACTIVITY_URL_ORDERLIST ="/order/OrderListActivity";
public static final String ACTIVITY_URL_CHOOSEAVISITOR ="/traveler/ChooseAVisitorActivity";
......
......@@ -8,8 +8,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
flavorDimensions "default"
versionCode 151
versionName "1.5.1"
versionCode 152
versionName "1.5.2"
multiDexEnabled true
......
......@@ -40,5 +40,5 @@ dependencies {
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc1'
api project(':RvWrapper')
api project(':component_resource')
implementation project(':component_control')
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content"
android:background="@color/colorWrite"
android:layout_height="wrap_content">
android:orientation="vertical">
<RelativeLayout
android:paddingRight="@dimen/size_15"
android:layout_width="match_parent"
android:layout_height="@dimen/size_60">
android:layout_height="@dimen/size_60"
android:paddingRight="@dimen/size_15">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:textSize="@dimen/text_16"
android:text="请选择支付方式"
android:textColor="@color/textMain"
android:text="请选择支付方式"/>
android:textSize="@dimen/text_16" />
<ImageView
android:id="@+id/iv_close"
android:layout_width="@dimen/size_30"
android:layout_height="@dimen/size_30"
android:padding="@dimen/size_5"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:src="@drawable/common_btn_close"/>
android:padding="@dimen/size_5"
android:src="@drawable/common_btn_close" />
</RelativeLayout>
<include layout="@layout/common_line"/>
<include layout="@layout/common_line" />
<LinearLayout
android:layout_width="match_parent"
......@@ -38,41 +40,41 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/text_16"
android:text="实付金额:"
android:textColor="@color/textMain"
android:text="实付金额:"/>
android:textSize="@dimen/text_16" />
<TextView
android:id="@+id/tv_amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/text_16"
android:text="¥0"
android:textColor="@color/colorAuxiliaryRed"
android:text="¥0"/>
android:textSize="@dimen/text_16" />
</LinearLayout>
<LinearLayout
android:id="@+id/ll_item_wechat"
android:layout_width="match_parent"
android:layout_height="@dimen/size_70"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="@dimen/size_15"
android:paddingRight="@dimen/size_15"
android:gravity="center_vertical">
android:paddingRight="@dimen/size_15">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/text_16"
android:textColor="@color/textMain"
android:drawablePadding="@dimen/size_8"
android:drawableLeft="@drawable/common_icon_wechat_pay"
android:text="微信支付"/>
android:drawablePadding="@dimen/size_8"
android:text="微信支付"
android:textColor="@color/textMain"
android:textSize="@dimen/text_16" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
android:layout_weight="1" />
<ImageView
android:id="@+id/iv_wx_select"
......@@ -84,32 +86,33 @@
<View
android:layout_width="match_parent"
android:layout_height="@dimen/size_half"
android:layout_marginLeft="@dimen/size_15"
android:layout_marginRight="@dimen/size_15"
android:layout_height="@dimen/size_half"
android:background="@color/colorLine"/>
android:background="@color/colorLine" />
<LinearLayout
android:id="@+id/ll_item_alipay"
android:layout_width="match_parent"
android:layout_height="@dimen/size_70"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="@dimen/size_15"
android:paddingRight="@dimen/size_15"
android:gravity="center_vertical">
android:paddingRight="@dimen/size_15">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/text_16"
android:textColor="@color/textMain"
android:drawablePadding="@dimen/size_8"
android:drawableLeft="@drawable/common_icon_alipay"
android:text="支付宝支付"/>
android:drawablePadding="@dimen/size_8"
android:text="支付宝支付"
android:textColor="@color/textMain"
android:textSize="@dimen/text_16" />
<View
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"/>
android:layout_weight="1" />
<ImageView
android:id="@+id/iv_alipy_select"
......@@ -120,24 +123,61 @@
<View
android:layout_width="match_parent"
android:layout_height="@dimen/size_half"
android:layout_marginLeft="@dimen/size_15"
android:layout_marginRight="@dimen/size_15"
android:background="@color/colorLine" />
<LinearLayout
android:id="@+id/ll_item_coupon"
android:layout_width="match_parent"
android:layout_height="@dimen/size_70"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingLeft="@dimen/size_15"
android:paddingRight="@dimen/size_15"
android:visibility="gone">
<TextView
android:id="@+id/tv_coupon_number"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="@dimen/size_8"
android:textColor="@color/textMain"
android:textSize="@dimen/text_16" />
<com.rv.component.control.SwitchButton
android:id="@+id/sb_coupon_select"
android:layout_width="@dimen/size_45"
android:layout_height="@dimen/size_28"
app:sb_button_color="@color/colorWrite"
app:sb_checked_color="@color/gray_FFB74B"
app:sb_show_indicator="false"
app:sb_uncheckcircle_color="@color/textLightGrey" />
</LinearLayout>
<View
android:id="@+id/line_coupon"
android:layout_width="match_parent"
android:layout_height="@dimen/size_half"
android:background="@color/colorLine"/>
android:layout_marginLeft="@dimen/size_15"
android:layout_marginRight="@dimen/size_15"
android:background="@color/colorLine"
android:visibility="gone" />
<TextView
android:id="@+id/tv_pay_immediately"
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:text="立即支付"
android:gravity="center"
android:layout_marginLeft="@dimen/size_15"
android:layout_marginTop="@dimen/size_20"
android:layout_marginRight="@dimen/size_15"
android:layout_marginBottom="@dimen/size_15"
android:layout_marginTop="@dimen/size_20"
android:background="@drawable/shape_rv_bg_yellow"
android:gravity="center"
android:text="立即支付"
android:textColor="@color/colorWrite"
android:textSize="@dimen/text_16"
/>
android:textSize="@dimen/text_16" />
</LinearLayout>
\ No newline at end of file
This diff is collapsed.
package com.xxrv.coupon.adapter;
import android.text.TextUtils;
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
......@@ -46,7 +48,9 @@ public class CarCouponAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
CarCouponBean.DataBean.CarCouponTypeDataBean.CarCouponDataBean item = (CarCouponBean.DataBean.CarCouponTypeDataBean.CarCouponDataBean) bean;
helper.setText(R.id.tv_name,item.getTitle());
helper.setText(R.id.tv_type,item.getSubtitle());
helper.setText(R.id.tv_date,"有效期至" + DateUtils.timestampToString2(item.getExpireTime()));
if (!TextUtils.isEmpty(item.getExpireDate()))
helper.setText(R.id.tv_date, item.getExpireDate());
// helper.setText(R.id.tv_date,"有效期至" + DateUtils.timestampToString2(item.getExpireTime()));
helper.setText(R.id.tv_amount,String.valueOf(item.getUsedAmount()));
if ("1".equals(item.getType())){ //1满减券 2叠加满减券 3无门槛券
helper.setText(R.id.tv_condition,"满"+item.getWithAmount()+"减"+item.getUsedAmount()+"元");
......
package com.xxrv.coupon.adapter;
import android.text.TextUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.rv.component.utils.DateUtils;
......@@ -7,7 +9,7 @@ import com.xxrv.coupon.R;
import com.xxrv.coupon.bean.CouponBean;
/**
* 优惠券 已过期
* 优惠券 已过期
*/
public class ExpiredCouponAdapter extends BaseQuickAdapter<CouponBean.DataBean, BaseViewHolder> {
......@@ -18,15 +20,17 @@ public class ExpiredCouponAdapter extends BaseQuickAdapter<CouponBean.DataBean,
@Override
protected void convert(BaseViewHolder helper, CouponBean.DataBean item) {
if (item !=null){
helper.setText(R.id.tv_name,item.getTitle());
helper.setText(R.id.tv_type,item.getSubtitle());
helper.setText(R.id.tv_date,"有效期至" + DateUtils.timestampToString2(item.getExpireTime()));
helper.setText(R.id.tv_amount,String.valueOf(item.getUsedAmount()));
if ("1".equals(item.getType())){ //1满减券 2叠加满减券 3无门槛券
helper.setText(R.id.tv_condition,"满"+item.getWithAmount()+"减"+item.getUsedAmount()+"元");
}else if ("3".equals(item.getType())){
helper.setText(R.id.tv_condition,"无门槛");
if (item != null) {
helper.setText(R.id.tv_name, item.getTitle());
helper.setText(R.id.tv_type, item.getSubtitle());
if (!TextUtils.isEmpty(item.getExpireDate()))
helper.setText(R.id.tv_date, item.getExpireDate());
// helper.setText(R.id.tv_date,"有效期至" + DateUtils.timestampToString2(item.getExpireTime()));
helper.setText(R.id.tv_amount, String.valueOf(item.getUsedAmount()));
if ("1".equals(item.getType())) { //1满减券 2叠加满减券 3无门槛券
helper.setText(R.id.tv_condition, "满" + item.getWithAmount() + "减" + item.getUsedAmount() + "元");
} else if ("3".equals(item.getType())) {
helper.setText(R.id.tv_condition, "无门槛");
}
}
......
package com.xxrv.coupon.adapter;
import android.text.TextUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.rv.component.utils.DateUtils;
......@@ -21,7 +23,9 @@ public class UsedCouponAdapter extends BaseQuickAdapter<CouponBean.DataBean, Bas
if (item !=null){
helper.setText(R.id.tv_name,item.getTitle());
helper.setText(R.id.tv_type,item.getSubtitle());
helper.setText(R.id.tv_date,"有效期至" + DateUtils.timestampToString2(item.getExpireTime()));
if (!TextUtils.isEmpty(item.getExpireDate()))
helper.setText(R.id.tv_date, item.getExpireDate());
// helper.setText(R.id.tv_date,"有效期至" + DateUtils.timestampToString2(item.getExpireTime()));
helper.setText(R.id.tv_amount,String.valueOf(item.getUsedAmount()));
if ("1".equals(item.getType())){ //1满减券 2叠加满减券 3无门槛券
helper.setText(R.id.tv_condition,"满"+item.getWithAmount()+"减"+item.getUsedAmount()+"元");
......
package com.xxrv.coupon.adapter;
import android.text.TextUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.rv.component.utils.DateUtils;
......@@ -7,7 +9,7 @@ import com.xxrv.coupon.R;
import com.xxrv.coupon.bean.CouponBean;
/**
*优惠券 待使用
* 优惠券 待使用
*/
public class WaitCouponAdapter extends BaseQuickAdapter<CouponBean.DataBean, BaseViewHolder> {
......@@ -18,17 +20,17 @@ public class WaitCouponAdapter extends BaseQuickAdapter<CouponBean.DataBean, Bas
@Override
protected void convert(BaseViewHolder helper, CouponBean.DataBean item) {
if (item !=null){
helper.setText(R.id.tv_name,item.getTitle());
helper.setText(R.id.tv_type,item.getSubtitle());
helper.setText(R.id.tv_date,"有效期至" + DateUtils.timestampToString2(item.getExpireTime()));
helper.setText(R.id.tv_amount,String.valueOf(item.getUsedAmount()));
if ("1".equals(item.getType())){ //1满减券 2叠加满减券 3无门槛券
helper.setText(R.id.tv_condition,"满"+item.getWithAmount()+"减"+item.getUsedAmount()+"元");
}else if ("3".equals(item.getType())){
helper.setText(R.id.tv_condition,"无门槛");
}
}
if (item != null) {
helper.setText(R.id.tv_name, item.getTitle());
helper.setText(R.id.tv_type, item.getSubtitle());
if (!TextUtils.isEmpty(item.getExpireDate()))
helper.setText(R.id.tv_date, item.getExpireDate());
helper.setText(R.id.tv_amount, String.valueOf(item.getUsedAmount()));
if ("1".equals(item.getType())) { //1满减券 2叠加满减券 3无门槛券
helper.setText(R.id.tv_condition, "满" + item.getWithAmount() + "减" + item.getUsedAmount() + "元");
} else if ("3".equals(item.getType())) {
helper.setText(R.id.tv_condition, "无门槛");
}
}
}
}
......@@ -80,6 +80,7 @@ public class CarCouponBean extends BaseBean {
private long crtTime;// ": 1563350412834,
private long startTime;// ": 1563331306739,
private long expireTime;// ": 1577760103000, 到期时间
private String expireDate ;
private String useTime;// ": 0,
private String title;// ": "租车券", 优惠券标题
private String subtitle;// ": "租车券", 副标题
......@@ -281,6 +282,14 @@ public class CarCouponBean extends BaseBean {
this.isChecked = isChecked;
}
public String getExpireDate() {
return expireDate;
}
public void setExpireDate(String expireDate) {
this.expireDate = expireDate;
}
@Override
public int getItemType() {
return CarCouponAdapter.TYPE_CARCOUPON_NAME;
......
......@@ -35,6 +35,7 @@ public class CouponBean extends BaseBean {
private long crtTime;// ": 1563350412834,
private long startTime;// ": 1563331306739,
private long expireTime;// ": 1577760103000, 到期时间
private String expireDate ;
private String useTime;// ": 0,
private String title;// ": "租车券", 优惠券标题
private String subtitle;// ": "租车券", 副标题
......@@ -226,5 +227,13 @@ public class CouponBean extends BaseBean {
public void setSubtitle(String subtitle) {
this.subtitle = subtitle;
}
public String getExpireDate() {
return expireDate;
}
public void setExpireDate(String expireDate) {
this.expireDate = expireDate;
}
}
}
......@@ -77,6 +77,11 @@ public class WaitCouponFragment extends BaseFragment<CouponAllPresenter> impleme
intent.setComponent(new ComponentName(getContext(), "com.xxfc.rv.MainActivity"));
intent.putExtra("to", "travel");
startActivity(intent);
} else if ("4".equals(bean.getChannel())){
Intent intent = new Intent();
intent.setComponent(new ComponentName(getContext(), "com.rv.member.MemberCenterActivity"));
startActivity(intent);
_mActivity.finish();
}
}
});
......
......@@ -5,17 +5,17 @@ package com.rv.member.bean;
* 会员卡支付请求订单
*/
public class MemberOrderPostBodyBean {
private String couponIds;
private String tickerNos;
private int memberLevel;
private int memberLevelId;
private String facilitatePhone;
public String getCouponIds() {
return couponIds;
public String getTickerNos() {
return tickerNos;
}
public void setCouponIds(String couponIds) {
this.couponIds = couponIds;
public void setTickerNos(String tickerNos) {
this.tickerNos = tickerNos;
}
public int getMemberLevel() {
......@@ -42,8 +42,8 @@ public class MemberOrderPostBodyBean {
this.facilitatePhone = facilitatePhone;
}
public MemberOrderPostBodyBean(String couponIds, int memberLevel, int memberLevelId, String inviterPhone) {
this.couponIds = couponIds;
public MemberOrderPostBodyBean(String tickerNos, int memberLevel, int memberLevelId, String inviterPhone) {
this.tickerNos = tickerNos;
this.memberLevel = memberLevel;
this.memberLevelId = memberLevelId;
this.facilitatePhone = inviterPhone;
......
......@@ -52,9 +52,9 @@ public class MemberPresenter extends CommonPresenter {
}
}
public void createOrder(MemberListBean.MemberCard card,String phone ,int position) {
public void createOrder(MemberListBean.MemberCard card, String couponIds, String phone, int position) {
MemberOrderPostBodyBean memberOrderPostBodyBean = new MemberOrderPostBodyBean("", card.getLevel(), card.getId(),phone);
MemberOrderPostBodyBean memberOrderPostBodyBean = new MemberOrderPostBodyBean(couponIds, card.getLevel(), card.getId(), phone);
Map<String, Object> headMap = new LinkedHashMap<>();
if (OkGoUtil.getToken() != null)
headMap.put("Authorization", OkGoUtil.getToken());
......
......@@ -167,7 +167,6 @@ public class BillActivity extends BaseStatusActivity<BillPresenter> {
case 1001:
if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
mPresenter.showShareDialog(llContent, rvWebView);
;
} else {
Toast.makeText(getApplicationContext(), "授权失败,无法分享海报", Toast.LENGTH_SHORT).show();
}
......
......@@ -58,6 +58,7 @@ public class PopularizeActivity extends BaseStatusActivity<CommonPresenter> impl
listAdapter = new PopularizeListAdapter(new ArrayList<PopularizeBean.PopularizeItem>());
refresh.setHeaderView(new SimpleRefreshView(this));
refresh.setOnSimpleRefreshListener(this);
listAdapter.setOnLoadMoreListener(this, recyclerView);
recyclerView.setAdapter(listAdapter);
}
......@@ -87,7 +88,7 @@ public class PopularizeActivity extends BaseStatusActivity<CommonPresenter> impl
PopularizeBean bean = (PopularizeBean) result;
if (bean.isRel() && bean.getData() != null && bean.getData().getUserTeamMemberBos() != null) {
if (currentPage == 1) {
pageTotal = bean.getData().getPageNum();
pageTotal = bean.getData().getTotalPage();
refresh.onRefreshComplete();
if (bean.getData().getUserTeamMemberBos().size() == 0) {
listAdapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.rv_select_not_data)));
......
......@@ -16,21 +16,17 @@ import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import com.base.utils.ui.image.round.RoundImageView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.ruiwenliu.wrapper.SPConstance;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.bean.UserInfoBean;
import com.ruiwenliu.wrapper.util.UtilsManager;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.ruiwenliu.wrapper.util.glide.GlideOptions;
import com.ruiwenliu.wrapper.weight.TitleView;
......@@ -40,11 +36,13 @@ import com.rv.component.utils.RvCache;
import com.rv.component.utils.ZxingUtils;
import com.rv.share.presenter.ReativeBillPresenter;
import com.rv.share.utils.TransformationUtils;
import com.yuyife.okgo.OkGoUtil;
import butterknife.BindView;
import butterknife.OnClick;
/*******
* 原始生成海报界面
*/
public class ReativeBillActivity extends BaseStatusActivity<ReativeBillPresenter> {
private String url;
......
......@@ -30,6 +30,7 @@ public class PopularizeBean extends BaseBean {
private BigDecimal totalIncome;
private int pageNum ;
private int pageSize ;
private int totalPage ;
private List<PopularizeItem> userTeamMemberBos ;
......@@ -64,6 +65,14 @@ public class PopularizeBean extends BaseBean {
public void setUserTeamMemberBos(List<PopularizeItem> userTeamMemberBos) {
this.userTeamMemberBos = userTeamMemberBos;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
}
public static class PopularizeItem {
......
......@@ -120,7 +120,12 @@ public class ReativeBillPresenter extends CommonPresenter {
@Override
public void qqShare() {
if (image == null) {
shareDeal();
}
if (image != null) {
share(SHARE_MEDIA.QQ, image, "");
}
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment