|
@@ -120,6 +120,7 @@ import com.sheep.jiuyan.samllsheep.utils.ClassFileHelper;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
import com.sheep.jiuyan.samllsheep.utils.G;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.GlideApp;
|
|
import com.sheep.jiuyan.samllsheep.utils.GlideApp;
|
|
|
import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
|
|
import com.sheep.jiuyan.samllsheep.utils.PackageUtil;
|
|
|
|
|
+import com.sheep.jiuyan.samllsheep.utils.SpUtils;
|
|
|
import com.umeng.socialize.ShareAction;
|
|
import com.umeng.socialize.ShareAction;
|
|
|
import com.umeng.socialize.UMShareListener;
|
|
import com.umeng.socialize.UMShareListener;
|
|
|
import com.umeng.socialize.bean.SHARE_MEDIA;
|
|
import com.umeng.socialize.bean.SHARE_MEDIA;
|
|
@@ -1817,18 +1818,27 @@ public class ViewUtil {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public static void showVipWillOver(Context context, String flag, int days) {
|
|
|
|
|
- int curr = DataUtil.getAsInt("vip_" + flag, -1);
|
|
|
|
|
- if (curr == -1 || days < curr) {
|
|
|
|
|
- DataUtil.putAsInt("vip_" + flag, days);
|
|
|
|
|
- showConfirmDialog(context, "温馨提示", "您的会员剩余" + days + "天过期, 为保障您的会员权益请立即续费~!",
|
|
|
|
|
- "下次再说", "立即续费", diag -> {
|
|
|
|
|
|
|
+ public static void showVipWillOver(Context context) {
|
|
|
|
|
+ CommonUtil.getInstance().getUserInfo(false, (user) -> {
|
|
|
|
|
+ if (!user.isVIP()) return;
|
|
|
|
|
+ long days = (user.getVip_time() - System.currentTimeMillis() / 1000) / (24 * 60 * 60);
|
|
|
|
|
+ LogUtil.logI("VIP has " + days + " days");
|
|
|
|
|
+ if (days >= 0 && days <= 7) {
|
|
|
|
|
+ String flag = user.getId() + "_" + user.getVip_time();
|
|
|
|
|
+ int curr = SpUtils.getAsInt("vip_" + flag, -1);
|
|
|
|
|
+ LogUtil.logI("VIP has " + days + " days"+", record "+curr+" days");
|
|
|
|
|
+ if (curr == -1 || days < curr) {
|
|
|
|
|
+ SpUtils.putAsInt("vip_" + flag, (int)days);
|
|
|
|
|
+ showConfirmDialog(context, "温馨提示", "您的会员剩余" + days + "天过期, 为保障您的会员权益请立即续费~!",
|
|
|
|
|
+ "下次再说", "立即续费", diag -> {
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
- dialog -> {
|
|
|
|
|
- Jump2View.getInstance().gotoVip(context);
|
|
|
|
|
- }).show();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ dialog -> {
|
|
|
|
|
+ Jump2View.getInstance().gotoVip(context);
|
|
|
|
|
+ }).show();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//3.4.7添加 -- 展示商城优惠券领取对话框
|
|
//3.4.7添加 -- 展示商城优惠券领取对话框
|