| | |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | |
| | | if (mInfo.getGoods() == null) |
| | | return; |
| | | |
| | | if (!LoginAndInviteStatusUtil.acessNext(activity, UserUtil.getUid(activity) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(activity, UserUtil.getUid(activity), true)) |
| | | return; |
| | | |
| | | if (!DuplicateEventFilterUtil.allowEvent("sendOrder", 3000)) { |
| | |
| | | } |
| | | |
| | | final ShapeLoadingDialog pd = new ShapeLoadingDialog.Builder(activity).build(); |
| | | String uid = activity.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.sendGoodsOrder(activity, goodsId, uid, mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.sendGoodsOrder(activity, goodsId, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | |
| | | /** |
| | | * 设置券信息 |
| | | * |
| | | * @param tv_coupon_amount |
| | | * @param tv_coupon_condition |
| | | * @param tv_coupon_date |
| | | * @param info |
| | | */ |
| | | public static void setCouponInfo(TextView tv_coupon_amount, TextView tv_coupon_condition, TextView tv_coupon_date, CouponInfo info){ |
| | | tv_coupon_amount.setText( info.getAmount()); |
| | | public static void setCouponInfo(TextView tv_coupon_amount, TextView tv_coupon_condition, TextView tv_coupon_date, CouponInfo info) { |
| | | tv_coupon_amount.setText(info.getAmount()); |
| | | tv_coupon_condition.setText(String.format("满%s元可用", info.getStartFee())); |
| | | tv_coupon_condition.setVisibility(View.VISIBLE); |
| | | if (!StringUtils.isEmpty(info.getStartTime()) && !StringUtils.isEmpty(info.getEndTime())) { |
| | | tv_coupon_date.setVisibility(View.VISIBLE); |
| | | tv_coupon_date.setText("有效期: "+info.getStartTime() + "-" + info.getEndTime()); |
| | | tv_coupon_date.setText("有效期: " + info.getStartTime() + "-" + info.getEndTime()); |
| | | } else { |
| | | tv_coupon_date.setVisibility(View.GONE); |
| | | } |