| | |
| | | |
| | | import android.content.Context; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.gold.base.BasePresenter; |
| | | import com.tejia.lijin.app.ui.gold.contract.GoldExchangeContract; |
| | | import com.tejia.lijin.app.ui.gold.model.GoldExchangeModel; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | |
| | | import org.json.JSONObject; |
| | | |
| | |
| | | 金币兑换列表数据获取 |
| | | */ |
| | | public void getGoldExchangeList(Context context, int page) { |
| | | String uid = context.getSharedPreferences("user", |
| | | Context.MODE_PRIVATE).getString("uid", ""); |
| | | model.getGoldExchangeList(context, uid, page, new GoldExchangeContract.goldExchangeListCallback() { |
| | | |
| | | model.getGoldExchangeList(context, UserUtil.getUid(ShoppingApplication.application), page, new GoldExchangeContract.goldExchangeListCallback() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | | mView.get().onGainListDataSuccess(jsonObject); |
| | |
| | | 金币兑换物品验证V |
| | | */ |
| | | public void goExchangeGoodsVerify(Context context, String id) { |
| | | String uid = context.getSharedPreferences("user", |
| | | Context.MODE_PRIVATE).getString("uid", ""); |
| | | model.goExchangeGoodsVerify(context, uid, id, new GoldExchangeContract.goldExchangeListCallback() { |
| | | |
| | | model.goExchangeGoodsVerify(context, UserUtil.getUid(ShoppingApplication.application), id, new GoldExchangeContract.goldExchangeListCallback() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | | mView.get().onGoExchangeVerifySuccess(jsonObject); |
| | |
| | | 金币兑换物品 |
| | | */ |
| | | public void goExchangeGoods(Context context, final String id) { |
| | | String uid = context.getSharedPreferences("user", |
| | | Context.MODE_PRIVATE).getString("uid", ""); |
| | | model.goExchangeGoods(context, uid, id, new GoldExchangeContract.goldExchangeListCallback() { |
| | | |
| | | model.goExchangeGoods(context, UserUtil.getUid(ShoppingApplication.application), id, new GoldExchangeContract.goldExchangeListCallback() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | | mView.get().onGoExchangeSuccess(jsonObject, id); |