Commit 12ff6164 authored by mengcuiguang's avatar mengcuiguang

添加授权支付

parent 2ff828b3
...@@ -18,7 +18,7 @@ public class UserBean implements Serializable { ...@@ -18,7 +18,7 @@ public class UserBean implements Serializable {
private int activiteFlag=0;// 1-匹配用户 private int activiteFlag=0;// 1-匹配用户
private String openid; private String openid;
private boolean isForever;//true-永久会员 private boolean isForever;//true-永久会员
private boolean alipaySet;//支付宝授权 private boolean hasAlipayUserId;//支付宝授权
private long expireTime;// vip到期时间 0-非vip private long expireTime;// vip到期时间 0-非vip
private long pk_id;// 用户id private long pk_id;// 用户id
private long createTime;// 用户id private long createTime;// 用户id
...@@ -100,10 +100,10 @@ public class UserBean implements Serializable { ...@@ -100,10 +100,10 @@ public class UserBean implements Serializable {
} }
public boolean isAlipaySet() { public boolean isAlipaySet() {
return alipaySet; return hasAlipayUserId;
} }
public void setAlipaySet(boolean alipaySet) { public void setAlipaySet(boolean hasAlipayUserId) {
this.alipaySet = alipaySet; this.hasAlipayUserId = hasAlipayUserId;
} }
} }
...@@ -23,6 +23,7 @@ public class VipBean implements Serializable { ...@@ -23,6 +23,7 @@ public class VipBean implements Serializable {
private boolean alipay; private boolean alipay;
private boolean showCycTips;// 判断是否提示 private boolean showCycTips;// 判断是否提示
private double firstPayPrice; private double firstPayPrice;
private double trialTrialBack;
private double oldPrice; private double oldPrice;
private int days; private int days;
private int trial;//是否签约 0-没签约 1-签约 private int trial;//是否签约 0-没签约 1-签约
...@@ -113,5 +114,13 @@ public class VipBean implements Serializable { ...@@ -113,5 +114,13 @@ public class VipBean implements Serializable {
public int getTrial() { public int getTrial() {
return trial; return trial;
} }
public double getTrialTrialBack() {
return trialTrialBack;
}
public void setTrialTrialBack(double trialTrialBack) {
this.trialTrialBack = trialTrialBack;
}
} }
} }
...@@ -236,12 +236,20 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, ...@@ -236,12 +236,20 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
return return
} }
// 授权 支付 if (vipList != null && vipList!!.size > 0) {
val vipBean = vipList!![vipAdapter.getPosition()]
if (vipBean.trialTrialBack > 0) {
// 授权支付
if (userBean?.isAlipaySet!!) { if (userBean?.isAlipaySet!!) {
alipay(paramsBean) alipay(paramsBean)
} else { } else {
alipayLoginDialog(paramsBean) alipayLoginDialog(paramsBean)
} }
} else {
// 普通支付
alipay(paramsBean)
}
}
} }
} }
} }
......
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