Commit 12ff6164 authored by mengcuiguang's avatar mengcuiguang

添加授权支付

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