Commit 4779721c authored by linfeng's avatar linfeng

Merge branch 'dev-member-john' of http://113.105.137.151:22280/lify/rvapp

parents 76cdca31 c88c9989
......@@ -8,8 +8,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 122
versionName "1.2.2"
versionCode 123
versionName "1.2.3"
multiDexEnabled true
//新版Gradle 是 implementation 为了兼容compile,写上这句话
......@@ -50,9 +50,24 @@ android {
debuggable true
signingConfig signingConfigs.debug
}
android.applicationVariants.all { variant ->
variant.outputs.all {
//MedicalClient_{time}_v1.0.1_{build号}.apk
if (variant.buildType.name == 'release') {
def productVersion = "RV" + releaseTime() + "V" + defaultConfig.versionName + "Release" + ".apk";
outputFileName = productVersion
}
}
}
}
}
//打包的时间
static def releaseTime() {
return new Date().format("yyyyMMddHHss", TimeZone.getTimeZone("GMT+8"))
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
api 'com.jakewharton:butterknife:9.0.0-rc1'
......
......@@ -27,7 +27,7 @@ import com.ruiwenliu.wrapper.util.listener.SwitchFragment;
import com.ruiwenliu.wrapper.weight.CustomScrollViewPager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.camp.CampFragment;
import com.rv.component.utils.Cooker;
import com.rv.component.utils.Cookie;
import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.main.home.HomeFragment;
......@@ -39,7 +39,6 @@ import com.rv.tourism.R2;
import com.rv.tourism.TourismFragment;
import com.rv.version.bean.VersionCheckBean;
import com.rv.version.util.UpdateAppUtils;
import com.sh.sdk.shareinstall.ShareInstall;
import com.xxfc.discovery.DiscoveryFragment;
import com.yuyife.okgo.OkGoUtil;
......@@ -146,10 +145,10 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
case 1:
EffectiveTimeBean bean = (EffectiveTimeBean) result;
if (bean != null && bean.isRel() && bean.getData() != null) {
Cooker.save(getApplicationContext(), "actRent", bean.getData().getActRent());
Cooker.save(getApplicationContext(), "actTour", bean.getData().getActTour());
Cooker.save(getApplicationContext(), "insurePrice", bean.getData().getInsurePrice());
Cooker.save(getApplicationContext(), "actMember", bean.getData().getActMember());
Cookie.save(getApplicationContext(), "actRent", bean.getData().getActRent());
Cookie.save(getApplicationContext(), "actTour", bean.getData().getActTour());
Cookie.save(getApplicationContext(), "insurePrice", bean.getData().getInsurePrice());
Cookie.save(getApplicationContext(), "actMember", bean.getData().getActMember());
}
break;
case 2:
......@@ -341,7 +340,7 @@ public class MainActivity extends BaseActivity<CommonPresenter> {
header.put("Authorization", OkGoUtil.getToken());
Map<String, Object> body = new HashMap<>();
body.put("code", Cooker.getStringValue(getApplicationContext(), "code"));
body.put("code", Cookie.getStringValue(getApplicationContext(), "code"));
mPresenter.postData(RvFrameConfig.HOST, 10000, ApiConfig.HTTP_URL_RELATION_BIND, null, body, header, false);
}
......
......@@ -5,7 +5,7 @@ import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils;
import com.rv.component.utils.Cooker;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.LogUtil;
import com.sh.sdk.shareinstall.ShareInstall;
import com.sh.sdk.shareinstall.listener.AppGetInfoListener;
......@@ -41,7 +41,7 @@ public class WakeUpActivity extends AppCompatActivity {
JSONObject object = new JSONObject(info);
String inviteCode = object.optString("code");
if (!TextUtils.isEmpty(inviteCode)) {
Cooker.save(getApplicationContext(), "code", inviteCode);
Cookie.save(getApplicationContext(), "code", inviteCode);
}
String url = object.optString("url");
LogUtil.d("唤醒传过来的url=" + url);
......
......@@ -8,16 +8,10 @@ import com.ruiwenliu.wrapper.base.BaseActivity;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.util.UtilsManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.Cooker;
import com.rv.component.utils.LogUtil;
import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.sh.sdk.shareinstall.ShareInstall;
import com.sh.sdk.shareinstall.listener.AppGetInfoListener;
import com.yuyife.okgo.OkGoUtil;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.concurrent.TimeUnit;
import io.reactivex.Flowable;
......
......@@ -17,15 +17,17 @@ import me.jessyan.autosize.onAdaptListener;
* Desc:
*/
public class WrapperApplication extends Application{
public class WrapperApplication extends Application {
private static WrapperApplication instance;
/*
synchronized 线程锁,当线程A调用时候,B线程必须等执行完才能使用
*/
public static synchronized WrapperApplication getInstance() {
return instance;
}
public static String TYPE_USER_TOKEN;
@Override
......@@ -41,13 +43,12 @@ public class WrapperApplication extends Application{
private void intiPlugIn() {
LogUtils.Builder lBuilder = new LogUtils.Builder(this)
.setLogSwitch(BuildConfig.DEBUG)// 设置log总开关,默认开
.setGlobalTag("CMJ")// 设置log全局标签,默认为空
// 当全局标签不为空时,我们输出的log全部为该tag,
// 为空时,如果传入的tag为空那就显示类名,否则显示tag
.setLog2FileSwitch(false)// 打印log时是否存到文件的开关,默认关
.setLog2FileSwitch(true)// 打印log时是否存到文件的开关,默认关
.setBorderSwitch(true)// 输出日志是否带边框开关,默认开
.setLogFilter(LogUtils.V);// log过滤
// LeakCanary.install(this); https://blog.csdn.net/yq5277/article/details/80172302 内存检测第三方插件
......@@ -58,7 +59,7 @@ public class WrapperApplication extends Application{
initAuto();
}
private void initAuto(){
private void initAuto() {
//当 App 中出现多进程, 并且您需要适配所有的进程, 就需要在 App 初始化时调用 initCompatMultiProcess()
//在 Demo 中跳转的三方库中的 DefaultErrorActivity 就是在另外一个进程中, 所以要想适配这个 Activity 就需要调用 initCompatMultiProcess()
......
......@@ -66,6 +66,25 @@ public class GlideManager {
}
/**
* 加载普通图片
*
* @param url
* @param image
*/
public void loadImage3(String url, ImageView image) {
GlideApp.with(mContext)
.load(url)
.placeholder(R.drawable.glide_icon_placeholder)
.error(R.drawable.glide_icon_error)
.apply(new RequestOptions()
.skipMemoryCache(true)
.disallowHardwareConfig()
.diskCacheStrategy(DiskCacheStrategy.ALL))
.into(image);
}
/**
* 加载普通图片
*
......@@ -108,7 +127,7 @@ public class GlideManager {
GlideApp.with(mContext)
.load(url)
// .apply(RequestOptions.bitmapTransform(new CenterCrop(),new RoundedCorners(round)))
.apply(RequestOptions.bitmapTransform(new GlideRoundTransform(mContext,round)))
.apply(RequestOptions.bitmapTransform(new GlideRoundTransform(mContext, round)))
.into(image);
}
......@@ -124,7 +143,7 @@ public class GlideManager {
GlideApp.with(mContext)
.load(url)
// .apply(RequestOptions.bitmapTransform(new CenterCrop(),new RoundedCorners(round)))
.apply(RequestOptions.bitmapTransform(new GlideRoundTransform(mContext,round)))
.apply(RequestOptions.bitmapTransform(new GlideRoundTransform(mContext, round)))
.into(image);
}
......
......@@ -3,7 +3,7 @@ package com.rv.component.utils;
import android.content.Context;
import android.content.SharedPreferences;
public class Cooker {
public class Cookie {
private final static String COOKIE_FILE = "cookie";
......
......@@ -14,17 +14,17 @@ import java.io.Serializable;
/******
* 缓存管理
*/
public class Cache<T extends Serializable> {
private static Cache instance = null;
public class RvCache<T extends Serializable> {
private static RvCache instance = null;
private Context mContext;
private Cache(Context context) {
private RvCache(Context context) {
this.mContext = context;
}
public static <T> Cache getInstance(Context context) {
public static <T> RvCache getInstance(Context context) {
if (instance == null) {
instance = new Cache(context);
instance = new RvCache(context);
}
return instance;
}
......
......@@ -31,7 +31,7 @@
"title": "A"
}, {
"lists": [{
"name": "北京",
"name": "北京",
"id": 110100
}, {
"name": "白银市",
......@@ -640,7 +640,7 @@
"title": "R"
}, {
"lists": [{
"name": "上海",
"name": "上海",
"id": 310100
}, {
"name": "深圳市",
......@@ -805,8 +805,8 @@
"name": "厦门市",
"id": 350200
}, {
"name": "西安",
"id": 220403
"name": "西安",
"id": 610100
}, {
"name": "西宁市",
"id": 630100
......
......@@ -74,7 +74,7 @@ public class ApiConfig {
public static String HTTP_URR_USER_POINT = RvFrameConfig.HOST + "/api/activity/integralUserTotal/getByUser";
public static String HTTP_URL_POINT_LIST = RvFrameConfig.HOST + "/api/activity/integralRule/list?page=1&limit=1000";
public static String HTTP_URL_POINT_LIST = RvFrameConfig.HOST + "/api/activity/integralRule/list?page=1&limit=100";
public static String HTTP_URL_POINT_SIGN_RULER = RvFrameConfig.HOST + "/api/activity/integralRule/one?code=%s";
......@@ -111,4 +111,6 @@ public class ApiConfig {
public static String HTTP_URL_UNAUTH_TYPES = RvFrameConfig.HOST + "/api/app/cofig/app/unauth/types/";
public static String HTTP_URL_RELATION_BIND = RvFrameConfig.HOST + "/api/admin/relation/bind";
public static String HTTP_URL_WALLETCATH_LIST = RvFrameConfig.HOST + "/api/admin/walletcath/page";
}
......@@ -5,23 +5,21 @@ import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import com.alibaba.android.arouter.launcher.ARouter;
import com.alibaba.fastjson.JSON;
import com.frame.base.bus.LoginSuccessfulEvent;
import com.frame.base.bus.LoginUserInfoEvent;
import com.frame.base.bus.RxBus;
import com.frame.base.url.Constance;
import com.frame.rv.config.RvFrameConfig;
import com.ruiwenliu.wrapper.SPConstance;
import com.ruiwenliu.wrapper.presenter.MvpPresenter;
import com.ruiwenliu.wrapper.util.UtilsManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.LogUtil;
import com.rv.home.R;
import com.rv.home.rv.module.ApiConfig;
import com.ruiwenliu.wrapper.bean.BeanUserInfo;
import com.rv.home.rv.module.ui.login.bean.RegisteredBean;
import com.rv.home.rv.module.ui.main.home.CarDetailActivity;
import com.umeng.socialize.UMAuthListener;
import com.umeng.socialize.UMShareAPI;
import com.umeng.socialize.bean.SHARE_MEDIA;
......@@ -121,6 +119,10 @@ public abstract class BaseLoginActivity<P extends MvpPresenter> extends BaseStat
LogUtil.d("登录返回的code为" + bean.getData().getCode());
RegisteredBean registeredBean = bean;
Cookie.save(getApplicationContext(), SPConstance.USER_JSON_CODE, registeredBean.getData().getCode());
Cookie.save(getApplicationContext(), SPConstance.USER_JSON_NAME, registeredBean.getData().getUsername());
Cookie.save(getApplicationContext(), SPConstance.USER_JSON_HEADERURL, registeredBean.getData().getHeaderurl());
Cookie.save(getApplicationContext(), SPConstance.USER_JSON_TOKEN, registeredBean.getToken());
UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_CODE, registeredBean.getData().getCode()).commit();
UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_NAME, registeredBean.getData().getUsername()).commit();
UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_HEADERURL, registeredBean.getData().getHeaderurl()).commit();
......@@ -128,7 +130,6 @@ public abstract class BaseLoginActivity<P extends MvpPresenter> extends BaseStat
UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_TOKEN, registeredBean.getToken()).commit();
UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_IMUSERID, registeredBean.getData().getImUserId()).commit();
UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_IMTOKEN, registeredBean.getData().getImToken()).commit();
UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_IMTOKEN, registeredBean.getData().getImToken()).commit();
UtilsManager.getInstance(OkGoUtil.application).setSharePreferencesSave(SPConstance.USER_JSON).putString(SPConstance.USER_JSON_ISCERTIFICATIONSTATUS, registeredBean.getData().getCertificationStatus()).commit();
Map<String, Object> headMap = new LinkedHashMap<>();
......
......@@ -20,8 +20,7 @@ import com.ruiwenliu.wrapper.util.RxJavaManager;
import com.ruiwenliu.wrapper.util.listener.TextChangedListener;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.CacheEnum;
import com.rv.component.utils.Cooker;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.LogUtil;
import com.rv.home.R;
import com.rv.home.R2;
......@@ -103,7 +102,7 @@ public class LoginRvActivity extends BaseLoginActivity<CommonPresenter> {
JSONObject object = new JSONObject(info);
String inviteCode = object.optString("code");
if (!TextUtils.isEmpty(inviteCode)) {
Cooker.save(getApplicationContext(), "code", inviteCode);
Cookie.save(getApplicationContext(), "code", inviteCode);
}
} catch (JSONException e) {
e.printStackTrace();
......@@ -206,7 +205,7 @@ public class LoginRvActivity extends BaseLoginActivity<CommonPresenter> {
Map<String, Object> map = new LinkedHashMap<>();
map.put("username", getPhone());
map.put("type", 4);
map.put("code", Cooker.getStringValue(getApplicationContext(), "code"));
map.put("code", Cookie.getStringValue(getApplicationContext(), "code"));
mPresenter.postData(0, ApiConfig.HTTP_URL_SEND_CODE, SendCodeBean.class, map, true);
}
......@@ -217,7 +216,7 @@ public class LoginRvActivity extends BaseLoginActivity<CommonPresenter> {
Map<String, Object> map = new LinkedHashMap<>();
map.put("openid", openid);
map.put("isQQ", isQQ);
map.put("code", Cooker.getStringValue(getApplicationContext(), "code"));
map.put("code", Cookie.getStringValue(getApplicationContext(), "code"));
mPresenter.postData(1, ApiConfig.HTTP_URL_OTHER_LOGIN, RegisteredBean.class, map, true);
}
......@@ -229,7 +228,7 @@ public class LoginRvActivity extends BaseLoginActivity<CommonPresenter> {
map.put("username", getPhone());
map.put("mobilecode", getCode());
map.put("type", 2);
map.put("code", Cooker.getStringValue(getApplicationContext(), "code"));
map.put("code", Cookie.getStringValue(getApplicationContext(), "code"));
mPresenter.postData(2, ApiConfig.HTTP_URL_PWD_LOGIN, RegisteredBean.class, map, true);
}
......
......@@ -20,7 +20,7 @@ import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.util.RxJavaManager;
import com.ruiwenliu.wrapper.util.listener.TextChangedListener;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.Cooker;
import com.rv.component.utils.Cookie;
import com.rv.home.R;
import com.rv.home.R2;
import com.rv.home.rv.module.ApiConfig;
......@@ -199,7 +199,7 @@ public class RegisteredActivity extends BaseLoginActivity<CommonPresenter> {
map.put("username", getPhone());
map.put("mobilecode", getCode());
map.put("password", getPwd());
map.put("code", Cooker.getStringValue(this, "code"));
map.put("code", Cookie.getStringValue(this, "code"));
mPresenter.postData(RvFrameConfig.AUTH_POST, 1, ApiConfig.HTTP_URL_USER_REGISTER, RegisteredBean.class, map, headMap, true);
}
......
......@@ -210,11 +210,11 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
ARouter.getInstance()
.build(Constance.ACTIVITY_URL_SELECTSHOP)
.withDouble("mLat",mLat)
.withDouble("mLon",mLon)
.withString("cityName",dataBean.getStartCityName())
.withInt("shopType",1)
.navigation(mActivity,110);
.withDouble("mLat", mLat)
.withDouble("mLon", mLon)
.withString("cityName", dataBean.getStartCityName())
.withInt("shopType", 1)
.navigation(mActivity, 110);
// startActivityForResult(SelectShopActivity.getIntent(mActivity, 1, "", dataBean.getStartCityName(), mLat, mLon), 110);
......@@ -223,14 +223,13 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
} else if (id == R.id.ll_item_out_address) {
//还车地址
ARouter.getInstance()
.build(Constance.ACTIVITY_URL_SELECTSHOP)
.withDouble("mLat",outLatitude)
.withDouble("mLon",outLongitude)
.withString("cityName",dataBean.getEndCityName())
.withInt("shopType",2)
.navigation(mActivity,110);
.withDouble("mLat", mLat)
.withDouble("mLon", mLon)
.withString("cityName", dataBean.getEndCityName())
.withInt("shopType", 2)
.navigation(mActivity, 110);
// startActivityForResult(SelectShopActivity.getIntent(mActivity, 2, "", dataBean.getEndCityName(), outLatitude, outLongitude), 110);
// startActivityForResult(SelectLocationActivity.getIntent(mActivity, 2, dataBean.getStartCityName(),dataBean.getEndCity(), outLatitude, outLongitude, "", 1), 110);
......@@ -452,27 +451,27 @@ public class CarRentalListActivity extends BaseStatusActivity<CommonPresenter> i
int type = data.getIntExtra("type", 1);
String requestData = data.getStringExtra("location");
String company = data.getStringExtra("company");
int companyId = data.getIntExtra("company_id", 1);
int cityId = data.getIntExtra("id", 0);
setRequestData(type, requestData, lat, lon, company, cityId);
String cityName = data.getStringExtra("location");
setRequestData(type, requestData, lat, lon, company, cityId, companyId, cityName);
}
}
private void setRequestData(int type, String requestData, double lat, double lon, String compangy, int cityId) {
private void setRequestData(int type, String requestData, double lat, double lon, String compangy, int cityId, int companyId, String cityName) {
if (type == 1) {
tvGetAddress.setText(compangy);
dataBean.setStartAddr(requestData);
dataBean.setStartCity(cityId);
dataBean.setStartCityName(compangy);
mLat = lat;
mLon = lon;
dataBean.setStartCityName(cityName);
dataBean.setStartCompanyId(companyId);
} else if (type == 2) {
tvOutAddress.setText(compangy);
dataBean.setEndAddr(requestData);
dataBean.setEndCity(cityId);
dataBean.setEndCityName(compangy);
outLatitude = lat;
outLongitude = lon;
dataBean.setEndCityName(cityName);
dataBean.setEndCompanyId(companyId);
}
onFresh();
}
......
......@@ -133,14 +133,14 @@ public class CityListActivity extends BaseStatusActivity<CommonPresenter> {
private List<HotCityBean> getHotCitys() {
List<HotCityBean> lists = new ArrayList<>();
lists.add(new HotCityBean("北京", 110100));
lists.add(new HotCityBean("上海", 310100));
lists.add(new HotCityBean("东莞", 441900));
lists.add(new HotCityBean("深圳", 440300));
lists.add(new HotCityBean("广州", 440100));
lists.add(new HotCityBean("杭州", 330100));
lists.add(new HotCityBean("南昌", 360100));
lists.add(new HotCityBean("西安", 610100));
lists.add(new HotCityBean("北京", 110100));
lists.add(new HotCityBean("上海", 310100));
lists.add(new HotCityBean("东莞", 441900));
lists.add(new HotCityBean("深圳", 440300));
lists.add(new HotCityBean("广州", 440100));
lists.add(new HotCityBean("杭州", 330100));
lists.add(new HotCityBean("南昌", 360100));
lists.add(new HotCityBean("西安", 610100));
return lists;
}
......
......@@ -56,10 +56,8 @@ import com.rv.component.utils.ObservableScrollView;
import com.rv.home.R;
import com.rv.home.R2;
import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.basic.WebActivity;
import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.main.home.adapter.HotCarTypeAdapter;
import com.rv.home.rv.module.ui.main.home.adapter.RVEnthusiastAdapter;
import com.rv.home.rv.module.ui.main.home.adapter.RVTourListAdapter;
import com.rv.home.rv.module.ui.main.home.adapter.RVTourListLabelAdapter;
import com.rv.home.rv.module.ui.main.home.adapter.SelectedEventsAdapter;
......@@ -597,20 +595,20 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
} else if (id == R.id.tv_get_city || id == R.id.tv_get_address || id == R.id.ll_rent) {
ARouter.getInstance()
.build(Constance.ACTIVITY_URL_SELECTSHOP)
.withDouble("mLat",latLatitude)
.withDouble("mLon",lonLongitude)
.withString("cityName",TextUtils.isEmpty(getCityName) ? nowCity : getCityName)
.withInt("shopType",1)
.navigation(_mActivity,TYPE_REQUEST_CITY);
.withDouble("mLat", latLatitude)
.withDouble("mLon", lonLongitude)
.withString("cityName", TextUtils.isEmpty(getCityName) ? nowCity : getCityName)
.withInt("shopType", 1)
.navigation(_mActivity, TYPE_REQUEST_CITY);
// startActivityForResult(SelectShopActivity.getIntent(getActivity(), 1, "", , latLatitude, lonLongitude), TYPE_REQUEST_CITY);
} else if (id == R.id.tv_out_city || id == R.id.ll_return || id == R.id.tv_out_address) {
ARouter.getInstance()
.build(Constance.ACTIVITY_URL_SELECTSHOP)
.withDouble("mLat",latLatitude)
.withDouble("mLon",lonLongitude)
.withString("cityName",TextUtils.isEmpty(outCityName) ? nowCity : outCityName)
.withInt("shopType",2)
.navigation(_mActivity,TYPE_REQUEST_CITY);
.withDouble("mLat", latLatitude)
.withDouble("mLon", lonLongitude)
.withString("cityName", TextUtils.isEmpty(outCityName) ? nowCity : outCityName)
.withInt("shopType", 2)
.navigation(_mActivity, TYPE_REQUEST_CITY);
// startActivityForResult(SelectShopActivity.getIntent(getActivity(), 2, "", TextUtils.isEmpty(outCityName) ? nowCity : outCityName, latLatitude, lonLongitude), TYPE_REQUEST_CITY);
} else if (id == R.id.ll_item_select_data) {
//选择日期
......@@ -826,6 +824,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
mTravelCityId = data.getIntExtra("id", 0);
getCityId = mTravelCityId;
outCityId = mTravelCityId;
getCityName = requestData;
outCityName = requestData;
vVTourCityId = mTravelCityId;
setRequestData(type, requestData, headTvGetCity, headTvOutCity, 0, 0);
}
......@@ -893,10 +893,10 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
headTvGetCity.setText(data);
headTvOutCity.setText(data);
tvRvCity.setText(data);
geoCoder.geocode(new GeoCodeOption()
.city(data)
.address(data));
getShopList(false);
// geoCoder.geocode(new GeoCodeOption()
// .city(data)
// .address(data));
break;
}
}
......@@ -970,8 +970,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
if (headTvGetShop != null) {
headTvGetShop.setText(bean.getData().getData().get(0).getName());
headTvGetShop.setTextColor(_mActivity.getResources().getColor(R.color.colorMain));
latLatitude = bean.getData().getData().get(0).getLatitude();
lonLongitude = bean.getData().getData().get(0).getLongitude();
getLatitude = bean.getData().getData().get(0).getLatitude();
getLongitude = bean.getData().getData().get(0).getLongitude();
getCompanyId = bean.getData().getData().get(0).getId();
}
......@@ -995,7 +995,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
/**
* 获取门店列表
*/
private void getShopList(double lat, double lon, boolean type) {
private void getShopList(boolean type) {
int addrCity = 0;
if (type) {
String json = UtilsManager.getInstance().getJson(getContext(), "city.json");
......@@ -1013,8 +1013,8 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
Map<String, Object> map = new LinkedHashMap<>();
map.put("page", 1);
map.put("limit", 1);
map.put("lat", lat);
map.put("lon", lon);
// map.put("lat", lat);
// map.put("lon", lon);
map.put("addrCity", String.valueOf(addrCity));
mPresenter.getData(RvFrameConfig.VEHICLE_POST, 0, ApiConfig.HTTP_URL_SHOP_LIST, ShopListBean.class, map, false);
}
......@@ -1139,12 +1139,12 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
latLatitude = result.getLocation().latitude;
lonLongitude = result.getLocation().longitude;
getLatitude = result.getLocation().latitude;
getLongitude = result.getLocation().latitude;
getLongitude = result.getLocation().longitude;
outLatitude = result.getLocation().latitude;
outLongitude = result.getLocation().longitude;
rvTourLatitude = result.getLocation().latitude;
rvTourLongitude = result.getLocation().longitude;
getShopList(latLatitude, lonLongitude, false);
getShopList(false);
}
//获取地理编码结果
}
......@@ -1157,12 +1157,12 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
latLatitude = result.getLocation().latitude;
lonLongitude = result.getLocation().longitude;
getLatitude = result.getLocation().latitude;
getLongitude = result.getLocation().latitude;
getLongitude = result.getLocation().longitude;
outLatitude = result.getLocation().latitude;
outLongitude = result.getLocation().longitude;
rvTourLatitude = result.getLocation().latitude;
rvTourLongitude = result.getLocation().longitude;
getShopList(latLatitude, lonLongitude, false);
getShopList(false);
}
}
});
......@@ -1205,7 +1205,7 @@ public class HomeFragment extends BaseFragment<CommonPresenter> implements Obser
rvTourLongitude = lonLongitude;
nowCity = location.getCity();
locationManager.stopLocation();
getShopList(mLatLng.latitude, mLatLng.longitude, true);
getShopList(true);
}
});
}
......
......@@ -7,8 +7,7 @@ import android.widget.ImageView;
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.ruiwenliu.wrapper.util.BaseGlideHolder;
import com.ruiwenliu.wrapper.util.TimeManager;
import com.rv.component.utils.Cooker;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.DateUtils;
import com.rv.home.R;
import com.rv.home.rv.module.ui.main.home.order.bean.OrderListBean;
......@@ -48,7 +47,7 @@ public class ForPaymentAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity
if (dataBean == null) {
return;
}
setTimes(Cooker.getLongValue(mContext, "actRent"), helper, (OrderListBean.DataBeanX.DataBean) item);
setTimes(Cookie.getLongValue(mContext, "actRent"), helper, (OrderListBean.DataBeanX.DataBean) item);
helper.setText(R.id.tv_order_time, String.format("%1$s%2$s", mContext.getString(R.string.rv_order_time), dataBean.getCrtTime()));
if (dataBean.getOrderRentVehicleDetail() != null && dataBean.getOrderRentVehicleDetail().getStart_city_name() != null) {
helper.setText(R.id.tv_city, dataBean.getOrderRentVehicleDetail().getStart_city_name());
......@@ -75,7 +74,7 @@ public class ForPaymentAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity
if (dataBean.getOrderTourDetail() == null) {
return;
}
setTimes(Cooker.getLongValue(mContext, "actTour"), helper, (OrderListBean.DataBeanX.DataBean) item);
setTimes(Cookie.getLongValue(mContext, "actTour"), helper, (OrderListBean.DataBeanX.DataBean) item);
helper.setText(R.id.tv_order_time, String.format("%1$s%2$s", mContext.getString(R.string.rv_order_time), dataBean.getCrtTime()));
helper.setText(R.id.tv_city, dataBean.getOrderTourDetail().getStartCityName());
helper.loadRoundImage(mContext, dataBean.getPicture(), (ImageView) helper.getView(R.id.iv_goods), 10);
......@@ -94,7 +93,7 @@ public class ForPaymentAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity
if (dataBean.getOrderMemberDetail() == null) {
return;
}
setTimes(Cooker.getLongValue(mContext, "actMember"), helper, (OrderListBean.DataBeanX.DataBean) item);
setTimes(Cookie.getLongValue(mContext, "actMember"), helper, (OrderListBean.DataBeanX.DataBean) item);
helper.setText(R.id.tv_order_time, String.format("%1$s%2$s", mContext.getString(R.string.rv_order_time), dataBean.getCrtTime()));
helper.loadRoundImage(mContext, dataBean.getPicture(), (ImageView) helper.getView(R.id.iv_goods), 10);
helper.setText(R.id.tv_name, dataBean.getName());
......
......@@ -7,14 +7,10 @@ import android.widget.ImageView;
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.ruiwenliu.wrapper.util.BaseGlideHolder;
import com.ruiwenliu.wrapper.util.TimeManager;
import com.rv.component.utils.Cooker;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.DateUtils;
import com.rv.home.R;
import com.rv.home.R2;
import com.rv.home.rv.module.ui.main.home.order.bean.ForPaymentBean;
import com.rv.home.rv.module.ui.main.home.order.bean.OrderListBean;
import com.rv.home.rv.module.ui.main.home.order.bean.ToTravelBean;
import com.rv.home.rv.module.ui.main.home.order.view.MyTimerView;
import java.text.ParseException;
......@@ -87,7 +83,7 @@ public class OrderListAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
helper.setText(R.id.tv_order_state, mContext.getString(R.string.rv_order_for_payment));
helper.setText(R.id.tv_process, mContext.getString(R.string.rv_to_pay_for));
helper.setVisible(R.id.tv_process, true);
setTimes(Cooker.getLongValue(mContext, "actRent"), helper, (OrderListBean.DataBeanX.DataBean) item);
setTimes(Cookie.getLongValue(mContext, "actRent"), helper, (OrderListBean.DataBeanX.DataBean) item);
break;
case 4:
helper.setText(R.id.tv_order_state, mContext.getString(R.string.rv_order_to_travel));
......@@ -153,7 +149,7 @@ public class OrderListAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
helper.setText(R.id.tv_order_state, mContext.getString(R.string.rv_order_for_payment));
helper.setText(R.id.tv_camp_process, mContext.getString(R.string.rv_to_pay_for));
helper.setVisible(R.id.tv_camp_process, true);
setTimes(Cooker.getLongValue(mContext, "actTour"), helper, (OrderListBean.DataBeanX.DataBean) item);
setTimes(Cookie.getLongValue(mContext, "actTour"), helper, (OrderListBean.DataBeanX.DataBean) item);
break;
case 4:
helper.setText(R.id.tv_order_state, mContext.getString(R.string.rv_order_to_travel));
......
......@@ -141,7 +141,7 @@
android:layout_marginLeft="@dimen/size_15"
android:layout_marginRight="@dimen/size_15"
android:layout_weight="1"
android:gravity="center"
android:gravity="left"
android:hint="@string/rv_get_car_hint"
android:textSize="@dimen/text_14" />
......@@ -190,7 +190,7 @@
android:layout_marginLeft="@dimen/size_15"
android:layout_marginRight="@dimen/size_15"
android:layout_weight="1"
android:gravity="center"
android:gravity="left"
android:hint="@string/rv_get_out_hint"
android:textSize="@dimen/text_14" />
......
......@@ -56,8 +56,8 @@
<string name="rv_full_time_driver">欣新专职司机(600/天)</string>
<string name="rv_immediately_car">立即选车</string>
<string name="rv_hot_car_type">热门车型</string>
<string name="rv_get"></string>
<string name="rv_out"></string>
<string name="rv_get"></string>
<string name="rv_out"></string>
<string name="rv_forget_pwd">忘记密码</string>
<string name="rv_reset_pwd">重置密码</string>
<string name="rv_to_shop">到店</string>
......
......@@ -35,7 +35,7 @@ import com.ruiwenliu.wrapper.util.UtilsManager;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout;
import com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshView;
import com.rv.component.utils.Cache;
import com.rv.component.utils.RvCache;
import com.rv.component.utils.CacheEnum;
import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.basic.presenter.CommonPresenter;
......@@ -457,7 +457,7 @@ public class MineFragment extends BaseFragment<CommonPresenter> implements Simpl
switch (requestType) {
case 0:
if (result != null) {
Cache.getInstance(getContext()).save((UserInfoBean) result, CacheEnum.USER);
RvCache.getInstance(getContext()).save((UserInfoBean) result, CacheEnum.USER);
}
userInfoData((UserInfoBean) result);
break;
......
......@@ -17,7 +17,7 @@ import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.login.RegisteredActivity;
import com.rv.component.utils.Cache;
import com.rv.component.utils.RvCache;
import com.rv.component.utils.CacheEnum;
import com.rv.rvmine.R;
import com.rv.rvmine.R2;
......@@ -129,7 +129,7 @@ public class SettingActivity extends BaseStatusActivity<CommonPresenter> {
//退出登录
UtilsManager.getInstance(mActivity).clearShareData("city_json");
UtilsManager.getInstance(mActivity).setShNull();
Cache.getInstance(getApplicationContext()).clear(CacheEnum.USER);
RvCache.getInstance(getApplicationContext()).clear(CacheEnum.USER);
OkGoUtil.clearToken();
setResult(201);
showToast("退出成功!");
......
......@@ -41,7 +41,8 @@
android:layout_width="match_parent"
android:layout_height="@dimen/size_50"
android:gravity="center_vertical"
android:orientation="horizontal">
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:layout_width="wrap_content"
......@@ -113,7 +114,6 @@
android:textSize="@dimen/text_16" />
<TextView
android:textSize="@dimen/sp_12"
android:id="@+id/tv_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......@@ -121,7 +121,8 @@
android:layout_centerVertical="true"
android:drawableRight="@drawable/common_icon_rig_black"
android:drawablePadding="@dimen/size_3"
android:textColor="#999999" />
android:textColor="#999999"
android:textSize="@dimen/sp_12" />
</RelativeLayout>
<include layout="@layout/common_line" />
......
......@@ -17,7 +17,7 @@ import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.main.home.order.OrderDetailActivity;
import com.rv.home.rv.module.ui.main.home.order.bean.OrderListBean;
import com.rv.member.adapter.ConsumeRecordListAdapter;
import com.rv.component.utils.Cache;
import com.rv.component.utils.RvCache;
import com.rv.component.utils.CacheEnum;
import com.yuyife.okgo.OkGoUtil;
......@@ -50,7 +50,7 @@ public class ConsumeRecordActivity extends BaseStatusActivity<CommonPresenter> i
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle("消费记录");
recyclerView.setLayoutManager(new LinearLayoutManager(mActivity));
OrderListBean bean = (OrderListBean) Cache.getInstance(getApplicationContext()).get(CacheEnum.CONSUMER_RECORD);
OrderListBean bean = (OrderListBean) RvCache.getInstance(getApplicationContext()).get(CacheEnum.CONSUMER_RECORD);
if (bean != null && bean.getData() != null && bean.getData().getData() != null) {
lists.addAll(bean.getData().getData());
}
......@@ -73,7 +73,7 @@ public class ConsumeRecordActivity extends BaseStatusActivity<CommonPresenter> i
simpleRefreshLayout.onLoadMoreComplete();
}
OrderListBean listBean = (OrderListBean) result;
Cache.getInstance(getApplicationContext()).save(listBean, CacheEnum.CONSUMER_RECORD);
RvCache.getInstance(getApplicationContext()).save(listBean, CacheEnum.CONSUMER_RECORD);
if (listBean != null && listBean.getData() != null) {
pageCount = listBean.getData().getTotalPage();
lists.addAll(listBean.getData().getData());
......
......@@ -37,7 +37,7 @@ import com.rv.member.bean.BeanTourOrderPay;
import com.rv.member.bean.MemberOrderBean;
import com.ruiwenliu.wrapper.bean.UserInfoBean;
import com.rv.member.presenter.MemberPresenter;
import com.rv.component.utils.Cache;
import com.rv.component.utils.RvCache;
import com.rv.component.utils.CacheEnum;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
......@@ -107,12 +107,12 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayout.VERTICAL, false));
// MemberListBean listBean = MemberCache.getInstance(MemberCenterActivity.this).get();
MemberListBean listBean = (MemberListBean) Cache.getInstance(MemberCenterActivity.this).get(CacheEnum.MEMBER);
MemberListBean listBean = (MemberListBean) RvCache.getInstance(MemberCenterActivity.this).get(CacheEnum.MEMBER);
if (listBean != null && listBean.getData() != null) {
adapter = new MemberListAdapter(listBean.getData(), memberLevel, freeUseDay, MemberCenterActivity.this, payListener);
recyclerView.setAdapter(adapter);
}
UserInfoBean bean = (UserInfoBean) Cache.getInstance(MemberCenterActivity.this).get(CacheEnum.USER);
UserInfoBean bean = (UserInfoBean) RvCache.getInstance(MemberCenterActivity.this).get(CacheEnum.USER);
if (bean != null) {
setUserInfoData(bean);
}
......@@ -170,7 +170,7 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
case 0:
MemberListBean listBean = (MemberListBean) result;
if (listBean != null && listBean.isRel() && listBean.getData() != null && !listBean.getData().isEmpty()) {
Cache.getInstance(getApplicationContext()).save(listBean, CacheEnum.MEMBER);
RvCache.getInstance(getApplicationContext()).save(listBean, CacheEnum.MEMBER);
// MemberCache.getInstance(getApplicationContext()).save(listBean);
if (adapter == null) {
adapter = new MemberListAdapter(listBean.getData(), memberLevel, freeUseDay, MemberCenterActivity.this, payListener);
......@@ -181,7 +181,7 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
}
break;
case 1:
Cache.getInstance(getApplicationContext()).save((UserInfoBean) result, CacheEnum.USER);
RvCache.getInstance(getApplicationContext()).save((UserInfoBean) result, CacheEnum.USER);
setUserInfoData((UserInfoBean) result);
break;
case 2:
......
......@@ -24,7 +24,7 @@ import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.bean.UserInfoBean;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.Cache;
import com.rv.component.utils.RvCache;
import com.rv.component.utils.CacheEnum;
import com.rv.component.utils.DisplayUtil;
import com.rv.home.rv.module.ApiConfig;
......@@ -70,7 +70,7 @@ public class PointsActivity extends BaseStatusActivity<PointPresenter> {
finish();
}
});
userInfo = (UserInfoBean) Cache.getInstance(getApplicationContext()).get(CacheEnum.USER);
userInfo = (UserInfoBean) RvCache.getInstance(getApplicationContext()).get(CacheEnum.USER);
if (userInfo != null && userInfo.getData() != null) {
if (!TextUtils.isEmpty(userInfo.getData().getHeadimgurl())) {
GlideManager.getInstance(getApplicationContext()).loadImage(userInfo.getData().getHeadimgurl(), imageView);
......
......@@ -5,6 +5,7 @@ import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.support.v7.widget.CardView;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
......@@ -15,10 +16,13 @@ import android.widget.TextView;
import com.base.utils.ui.image.round.RoundImageView;
import com.ruiwenliu.wrapper.SPConstance;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.bean.UserInfoBean;
import com.ruiwenliu.wrapper.util.UtilsManager;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.CacheEnum;
import com.rv.component.utils.DisplayUtil;
import com.rv.component.utils.RvCache;
import com.rv.component.utils.ZxingUtils;
import com.rv.home.rv.module.basic.BaseStatusActivity;
import com.rv.share.presenter.ReativeBillPresenter;
......@@ -41,7 +45,9 @@ public class ReativeBillActivity extends BaseStatusActivity<ReativeBillPresenter
@BindView(R2.id.btn_share)
Button btnShare;
@BindView(R2.id.ll_bill_content)
LinearLayout llBillContent;
CardView llBillContent;
@BindView(R2.id.ll_content)
LinearLayout llContent;
public static Intent getIntent(Context context, String url) {
Intent intent = new Intent(context, ReativeBillActivity.class);
......@@ -56,20 +62,23 @@ public class ReativeBillActivity extends BaseStatusActivity<ReativeBillPresenter
@Override
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle("邀请码");
titleView.setVisibility(View.GONE);
url = intent.getStringExtra("url");
if (!TextUtils.isEmpty(url)) {
Bitmap bitmap = ZxingUtils.createQRImage(url, DisplayUtil.dip2px(this, 150), DisplayUtil.dip2px(this, 150), BitmapFactory.decodeResource(getResources(), com.rv.home.R.mipmap.ic_launcher));
imgQrcode.setImageBitmap(bitmap);
}
String name = UtilsManager.getInstance(OkGoUtil.application).getSPInstance(SPConstance.USER_JSON).getString(SPConstance.USER_JSON_NAME, "");
String url = UtilsManager.getInstance(OkGoUtil.application).getSPInstance(SPConstance.USER_JSON).getString(SPConstance.USER_JSON_HEADERURL, "");
UserInfoBean userInfoBean = (UserInfoBean) RvCache.getInstance(getApplicationContext()).get(CacheEnum.USER);
String name = userInfoBean.getData().getNickname();
String url = userInfoBean.getData().getHeadimgurl();
if (!TextUtils.isEmpty(url)) {
GlideManager.getInstance(getApplicationContext()).loadImage(url, roundImageView);
GlideManager.getInstance(getApplicationContext()).loadImage3(url, roundImageView);
}
if (!TextUtils.isEmpty(name)) {
tvPhone.setText(name + " 邀请你一起参与");
tvPhone.setText(name);
}
}
......@@ -83,9 +92,9 @@ public class ReativeBillActivity extends BaseStatusActivity<ReativeBillPresenter
int id = view.getId();
if (id == R.id.btn_save_bill) {
mPresenter.saveBill(llBillContent);
mPresenter.saveBill(llContent);
} else if (id == R.id.btn_share) {
mPresenter.saveShare(llBillContent);
mPresenter.saveShare(llContent);
}
}
}
package com.rv.share;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
......@@ -12,15 +11,13 @@ import com.base.utils.ui.datetime.selector.util.TextUtil;
import com.frame.rv.config.RvFrameConfig;
import com.ruiwenliu.wrapper.SPConstance;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.util.UtilsManager;
import com.ruiwenliu.wrapper.util.glide.GlideManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.DisplayUtil;
import com.rv.component.utils.Cookie;
import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.basic.BaseStatusActivity;
import com.rv.share.bean.PersonShareBean;
import com.rv.share.presenter.SharePresenter;
import com.rv.share.presenter.WebViewPresenter;
import com.yuyife.okgo.OkGoUtil;
import java.util.HashMap;
......@@ -72,7 +69,7 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
tvPersonInval.setText(data.getInviteNumber() + "人");
tvPersonUse.setText(data.getActivatedNumber() + "人");
if (TextUtils.isEmpty(data.getLeaderHeadUrl()) && TextUtil.isEmpty(data.getLeaderUsername())) {
((View) tvParentPhone.getParent().getParent()).setVisibility(View.GONE);
((View) tvParentPhone.getParent().getParent()).setVisibility(View.INVISIBLE);
} else {
((View) tvParentPhone.getParent().getParent()).setVisibility(View.VISIBLE);
if (!TextUtils.isEmpty(data.getLeaderHeadUrl())) {
......@@ -110,11 +107,11 @@ public class ShareActivity extends BaseStatusActivity<SharePresenter> {
}
@OnClick({R2.id.tv_weixin, R2.id.tv_weixin_circle, R2.id.tv_bill, R2.id.tv_more, R2.id.tv_more_detail, R2.id.ll_activation, R2.id.ll_comein, R2.id.ll_invite,R2.id.tv_ruler})
@OnClick({R2.id.tv_weixin, R2.id.tv_weixin_circle, R2.id.tv_bill, R2.id.tv_more, R2.id.tv_more_detail, R2.id.ll_activation, R2.id.ll_comein, R2.id.ll_invite, R2.id.tv_ruler})
public void onViewClicked(View view) {
int id = view.getId();
if (TextUtils.isEmpty(shareUrl)) {
String code = UtilsManager.getInstance(OkGoUtil.application).getSPInstance(SPConstance.USER_JSON).getString(SPConstance.USER_JSON_CODE, "");
String code = Cookie.getStringValue(getApplicationContext(), SPConstance.USER_JSON_CODE, "");
shareUrl = RvFrameConfig.HOST + "/h5/appHtml/view/invitationCourtesyShare.html?code=" + code + "_P0101";
}
if (id == R.id.tv_weixin) {
......
......@@ -5,22 +5,16 @@ import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.Toast;
import com.base.utils.tools.android.NetworkUtil;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.Cooker;
import com.rv.home.rv.module.basic.BaseStatusActivity;
import com.rv.share.presenter.WebViewPresenter;
import com.rv.share.view.RvWebView;
import com.sh.sdk.shareinstall.ShareInstall;
import com.sh.sdk.shareinstall.listener.AppGetInfoListener;
import org.json.JSONException;
import org.json.JSONObject;
import butterknife.BindView;
......@@ -50,6 +44,8 @@ public class WebViewActivity extends BaseStatusActivity<WebViewPresenter> {
title = intent.getStringExtra("title");
if (!TextUtils.isEmpty(title)) {
titleView.setTitle(title);
} else {
titleView.setVisibility(View.GONE);
}
rvWebView = new RvWebView(getApplicationContext(), listener);
if (NetworkUtil.isNetworkAvailable(this)) {
......
......@@ -85,7 +85,7 @@ public class ReativeBillPresenter extends CommonPresenter {
int h = v.getHeight();
int startX = (int) v.getX();
int startY = (int) v.getY();
Bitmap bmp = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
Bitmap bmp = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_4444);
Canvas c = new Canvas(bmp);
c.drawColor(Color.WHITE);
v.layout(startX, startY, w + startX, h + startY);
......
......@@ -3,7 +3,6 @@ package com.rv.share.view;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
......@@ -18,7 +17,7 @@ import android.widget.ProgressBar;
import com.ruiwenliu.wrapper.SPConstance;
import com.ruiwenliu.wrapper.util.UtilsManager;
import com.rv.component.utils.Cooker;
import com.rv.component.utils.Cookie;
import com.rv.component.utils.LogUtil;
import com.rv.home.rv.module.ui.login.LoginRvActivity;
import com.yuyife.okgo.OkGoUtil;
......@@ -139,13 +138,13 @@ public class RvWebView extends WebView {
@JavascriptInterface
public String getUserName() {
String name = UtilsManager.getInstance(getContext()).getSPInstance(SPConstance.USER_JSON).getString(SPConstance.USER_JSON_NAME, "");
String name = Cookie.getStringValue(getContext(), SPConstance.USER_JSON_NAME, "");
return name;
}
@JavascriptInterface
public String getHeadUrl() {
String url = UtilsManager.getInstance(getContext()).getSPInstance(SPConstance.USER_JSON).getString(SPConstance.USER_JSON_HEADERURL, "");
String url = Cookie.getStringValue(getContext(), SPConstance.USER_JSON_HEADERURL, "");
return url;
}
......@@ -163,7 +162,7 @@ public class RvWebView extends WebView {
@JavascriptInterface
public String getCode() {
String code = UtilsManager.getInstance(getContext()).getSPInstance(SPConstance.USER_JSON).getString(SPConstance.USER_JSON_CODE, "");
String code = Cookie.getStringValue(getContext(), "my_code", "");
return code;
}
......
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/bg_share_new"
android:tileMode="repeat" />
\ No newline at end of file
......@@ -4,114 +4,151 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FEE8C3"
android:background="#ffffff"
android:orientation="vertical"
android:weightSum="19"
tools:context=".ReativeBillActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="@dimen/size_48"
android:drawableLeft="@drawable/rv_common_icon_back_dark"
android:drawablePadding="5dp"
android:gravity="center"
android:text="生成海报"
android:textColor="#000000"
android:textSize="@dimen/text_18"
android:textStyle="normal" />
<include layout="@layout/common_line" />
<FrameLayout
android:background="#55eeeeee"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/ll_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_10"
android:layout_marginTop="@dimen/size_15"
android:layout_marginRight="@dimen/size_10"
android:layout_marginBottom="@dimen/size_70"
android:gravity="center">
<android.support.v7.widget.CardView
android:id="@+id/ll_bill_content"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="17"
android:orientation="vertical"
android:weightSum="17">
android:layout_height="wrap_content"
android:layout_gravity="center"
app:cardCornerRadius="5dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="15"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:layout_width="match_parent"
android:layout_height="@dimen/size_140"
android:layout_height="@dimen/size_200"
android:scaleType="fitXY"
android:src="@drawable/bg_bill" />
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_weight="1"
android:background="@color/white"
app:cardCornerRadius="@dimen/size_10">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_marginTop="@dimen/size_20"
android:layout_marginBottom="@dimen/size_15"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.base.utils.ui.image.round.RoundImageView
android:id="@+id/ring_header"
android:layout_width="@dimen/dp_40"
android:layout_height="@dimen/dp_40" />
android:layout_width="@dimen/size_50"
android:layout_height="@dimen/size_50"
android:layout_marginLeft="@dimen/size_10" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_5"
android:orientation="vertical">
<TextView
android:id="@+id/tv_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/size_3"
android:text="155****5918 邀请你一起参与"
android:textColor="@color/gray_707070"
android:text="155****5918"
android:textColor="#000000"
android:textSize="@dimen/sp_16" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:text="邀请你一起参加"
android:textColor="@color/text_Gray"
android:textSize="@dimen/sp_12" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_marginRight="@dimen/size_10"
android:layout_weight="1"
android:gravity="right|center_vertical"
android:orientation="vertical">
<ImageView
android:id="@+id/img_qrcode"
android:layout_width="@dimen/size_150"
android:layout_height="@dimen/size_150" />
android:layout_width="@dimen/size_100"
android:layout_height="@dimen/size_100"
android:src="@drawable/icon_share_wx" />
<TextView
android:layout_width="wrap_content"
android:layout_width="@dimen/size_100"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_8"
android:text="长按识别二维码领奖励"
android:textSize="@dimen/sp_14" />
android:gravity="center"
android:text="长按领奖励"
android:textColor="#000000"
android:textSize="13sp" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2">
<include layout="@layout/common_line" />
<ImageView
android:layout_width="@dimen/size_80"
android:layout_height="@dimen/size_40"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/size_10"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:src="@drawable/icon_reative_bill" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2"
android:gravity="center_horizontal|top">
</android.support.v7.widget.CardView>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_height="@dimen/size_70"
android:layout_gravity="bottom"
android:layout_marginLeft="@dimen/size_10"
android:layout_marginRight="@dimen/size_10"
android:orientation="horizontal">
android:gravity="center_horizontal|bottom"
android:orientation="horizontal"
android:paddingTop="@dimen/size_20"
android:paddingBottom="@dimen/size_10">
<Button
android:id="@+id/btn_save_bill"
......@@ -138,8 +175,6 @@
</LinearLayout>
</LinearLayout>
</FrameLayout>
</LinearLayout>
\ No newline at end of file
......@@ -10,24 +10,22 @@
tools:context=".ShareActivity">
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="19">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="0dp"
android:layout_weight="7">
<ImageView
android:layout_width="match_parent"
android:layout_height="195dp"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:src="@drawable/bg_share" />
android:src="@drawable/bg_share_new1" />
<TextView
android:id="@+id/tv_ruler"
......@@ -45,8 +43,9 @@
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_margin="@dimen/dp_10"
android:layout_weight="5"
android:background="@color/white"
app:cardCornerRadius="5dp">
......@@ -67,8 +66,10 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/size_10"
android:layout_marginBottom="10dp"
android:gravity="center"
android:orientation="horizontal">
......@@ -76,7 +77,6 @@
android:id="@+id/tv_weixin"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:drawableTop="@drawable/icon_share_weixin"
android:gravity="center"
......@@ -87,7 +87,6 @@
android:id="@+id/tv_weixin_circle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:drawableTop="@drawable/icon_share_wx_circle"
android:gravity="center"
......@@ -98,7 +97,6 @@
android:id="@+id/tv_bill"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:drawableTop="@drawable/icon_share_code"
android:gravity="center"
......@@ -109,7 +107,7 @@
android:id="@+id/tv_more"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:drawableTop="@drawable/icon_share_more"
android:gravity="center"
......@@ -124,10 +122,11 @@
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
android:layout_weight="5"
android:background="@color/white"
app:cardCornerRadius="5dp">
......@@ -158,21 +157,22 @@
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:text="查看详情>" />
android:drawableRight="@drawable/common_icon_rig_black"
android:drawablePadding="3dp"
android:text="查看详情" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/size_20"
android:layout_marginBottom="@dimen/dp_10"
android:orientation="horizontal"
android:weightSum="3">
<LinearLayout
android:id="@+id/ll_comein"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
......@@ -194,15 +194,13 @@
<View
android:layout_width="0.1dp"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/size_2"
android:layout_marginBottom="@dimen/size_2"
android:layout_height="@dimen/size_50"
android:background="@color/tv_gr999999" />
<LinearLayout
android:id="@+id/ll_invite"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
......@@ -224,15 +222,13 @@
<View
android:layout_width="0.1dp"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/size_2"
android:layout_marginBottom="@dimen/size_2"
android:layout_height="@dimen/size_50"
android:background="@color/tv_gr999999" />
<LinearLayout
android:id="@+id/ll_activation"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical">
......@@ -261,10 +257,11 @@
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="0dp"
android:layout_marginLeft="@dimen/dp_10"
android:layout_marginRight="@dimen/dp_10"
android:layout_marginBottom="@dimen/dp_10"
android:layout_weight="2"
android:background="@color/white"
app:cardCornerRadius="5dp">
......@@ -310,6 +307,5 @@
</android.support.v7.widget.CardView>
</LinearLayout>
</ScrollView>
</LinearLayout>
\ No newline at end of file
......@@ -113,6 +113,7 @@ public class UpdateAppUtils {
if (updateBean.getServerVersionCode() > updateBean.getLocalVersionCode()) {
toUpdate();
} else {
// Toast.makeText(activity, "当前版本是最新版本", Toast.LENGTH_SHORT).show();
Log.i(TAG, "当前版本是最新版本" + updateBean.getServerVersionCode() + "/" + updateBean.getServerVersionName());
}
break;
......@@ -121,6 +122,7 @@ public class UpdateAppUtils {
if (!updateBean.getServerVersionName().equals(updateBean.getLocalVersionName())) {
toUpdate();
} else {
// Toast.makeText(activity, "当前版本是最新版本", Toast.LENGTH_SHORT).show();
Log.i(TAG, "当前版本是最新版本" + updateBean.getServerVersionCode() + "/" + updateBean.getServerVersionName());
}
break;
......@@ -174,7 +176,7 @@ public class UpdateAppUtils {
}
public void download() {
Toast.makeText(activity.getApplicationContext() ,"下载中...",Toast.LENGTH_SHORT).show();
Toast.makeText(activity.getApplicationContext(), "下载中...", Toast.LENGTH_SHORT).show();
DownloadAppUtils.download(activity, updateBean.getApkPath(), updateBean.getServerVersionName());
}
}
\ No newline at end of file
......@@ -53,7 +53,7 @@ public class CommissionDetailActivity extends BaseStatusActivity<CommonPresenter
@Override
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle("佣金明细");
titleView.setTitle("提现记录");
initRecyclerView();
initViewpager();
}
......
package com.xxrv.wallet.activity;
import android.content.Intent;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.content.ComponentName;
import android.content.Intent;;
import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.View;
import android.widget.LinearLayout;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.ruiwenliu.wrapper.adapter.TabAdapter;
import com.frame.rv.config.RvFrameConfig;
import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseFragment;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.ruiwenliu.wrapper.weight.horizontal.GallerySnapHelper;
import com.ruiwenliu.wrapper.weight.horizontal.SpaceItemDecoration;
import com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshLayout;
import com.ruiwenliu.wrapper.weight.refresh.SimpleRefreshView;
import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.basic.BaseStatusActivity;
import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.main.home.adapter.OrderMenuAdapter;
import com.xxrv.wallet.R;
import com.xxrv.wallet.R2;
import com.xxrv.wallet.fragment.CommisionAllFragment;
import com.xxrv.wallet.fragment.CommisionFinishFragment;
import com.xxrv.wallet.fragment.CommisionUnFinishFragment;
import com.xxrv.wallet.adapter.WalletCathAdapter;
import com.xxrv.wallet.bean.WalletcathListBean;
import com.yuyife.okgo.OkGoUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.HashMap;
import java.util.Map;
import butterknife.BindView;
/******
* 提现记录
*/
public class EnchashmentRecordActivity extends BaseStatusActivity<CommonPresenter> {
public class EnchashmentRecordActivity extends BaseStatusActivity<CommonPresenter> implements BaseQuickAdapter.RequestLoadMoreListener, SimpleRefreshLayout.OnSimpleRefreshListener {
@BindView(R2.id.recyclerview)
@BindView(R2.id.recyclerView)
RecyclerView recyclerView;
@BindView(R2.id.viewpager)
ViewPager viewpager;
private OrderMenuAdapter menuAdapter;
private TabAdapter mAdapter;
private int menuPosition;
@BindView(R2.id.refresh)
SimpleRefreshLayout simpleRefreshLayout;
private int pageNo = 1;
private int pageSize = 10;
private int pageTotal = 0;
private WalletCathAdapter adapter;
@Override
public void onShowResult(int requestType, BaseBean result) {
if (requestType == 0) {
WalletcathListBean bean = (WalletcathListBean) result;
if (bean != null && bean.isRel() && bean.getData() != null && bean.getData().getWalletCaths() != null) {
if (pageNo == 1) {
pageTotal = bean.getData().getTotalPage();
adapter.setNewData(bean.getData().getWalletCaths());
simpleRefreshLayout.onRefreshComplete();
if (bean.getData().getWalletCaths().size() == 0) {
adapter.setEmptyView(getEmptyView(recyclerView, -1, getString(R.string.rv_select_not_data)));
adapter.notifyDataSetChanged();
}
} else {
adapter.addData(bean.getData().getWalletCaths());
adapter.loadMoreComplete();
}
}
}
}
@Override
......@@ -56,66 +77,60 @@ public class EnchashmentRecordActivity extends BaseStatusActivity<CommonPresente
@Override
protected void initView(Bundle savedInstanceState, TitleView titleView, Intent intent) {
titleView.setTitle("提现记录");
initRecyclerView();
initViewpager();
}
/**
* 初始化RecyclerView
*/
private void initRecyclerView() {
recyclerView.setLayoutManager(new GridLayoutManager(mActivity, 2));
menuAdapter = new OrderMenuAdapter();
recyclerView.setAdapter(menuAdapter);
recyclerView.addItemDecoration(new SpaceItemDecoration(2));
GallerySnapHelper snapHelper = new GallerySnapHelper();
snapHelper.attachToRecyclerView(recyclerView);
List<String> list = new ArrayList<>();
String[] strs = getResources().getStringArray(R.array.enchashment_list);
for (String a : strs) {
list.add(a);
}
menuAdapter.setNewData(list);
menuAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayout.VERTICAL, false));
adapter = new WalletCathAdapter(new ArrayList<WalletcathListBean.ItemWalletcath>());
adapter.setOnLoadMoreListener(this, recyclerView);
simpleRefreshLayout.setHeaderView(new SimpleRefreshView(this));
simpleRefreshLayout.setOnSimpleRefreshListener(this);
recyclerView.setAdapter(adapter);
adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
menuAdapter.setSelectItem(position);
viewpager.setCurrentItem(position);
String url = RvFrameConfig.HOST + "/h5/appHtml/view/withdrawDetail.html?id=" + ((WalletcathListBean.ItemWalletcath) adapter.getItem(position)).getId();
ComponentName componentName = new ComponentName(getApplicationContext(), "com.rv.share.WebViewActivity");
Intent intent = new Intent();
intent.setComponent(componentName);
intent.putExtra("url", url);
intent.putExtra("title", "提现详情");
startActivity(intent);
}
});
}
/**
* 初始化Viewpager
*/
private void initViewpager() {
mAdapter = new TabAdapter(getSupportFragmentManager(), getListFragment());
viewpager.setAdapter(mAdapter);
viewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
protected void loadData(Bundle savedInstanceState, Intent intent) {
super.loadData(savedInstanceState, intent);
getData();
}
@Override
public void onPageSelected(int position) {
menuAdapter.setSelectItem(position);
public void onLoadMoreRequested() {
if (pageNo >= pageTotal) {
adapter.loadMoreEnd();
} else {
pageNo++;
getData();
}
}
@Override
public void onPageScrollStateChanged(int state) {
public void onRefresh() {
pageNo = 1;
getData();
}
});
viewpager.setOffscreenPageLimit(mAdapter.getCount());
menuAdapter.setSelectItem(menuPosition);
viewpager.setCurrentItem(menuPosition);
public void getData() {
if (!TextUtils.isEmpty(OkGoUtil.getToken())) {
Map<String, Object> header = new HashMap<>();
header.put("Authorization", OkGoUtil.getToken());
Map<String, Object> map = new HashMap<>();
map.put("pageNo", pageNo);
map.put("pageSize", pageSize);
mPresenter.getData(RvFrameConfig.HOST, 0, ApiConfig.HTTP_URL_WALLETCATH_LIST, WalletcathListBean.class, map, header, true);
}
private List<BaseFragment> getListFragment() {
List<BaseFragment> list = new ArrayList<>();
list.add(CommisionAllFragment.getInstance());
list.add(CommisionUnFinishFragment.getInstance());
return list;
}
}
......@@ -12,7 +12,6 @@ import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.frame.base.bus.RxBus;
import com.frame.rv.config.RvFrameConfig;
......@@ -20,7 +19,7 @@ import com.ruiwenliu.wrapper.base.BaseBean;
import com.ruiwenliu.wrapper.base.BaseStatusActivity;
import com.ruiwenliu.wrapper.util.RxJavaManager;
import com.ruiwenliu.wrapper.weight.TitleView;
import com.rv.component.utils.Cooker;
import com.rv.component.utils.Cookie;
import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.basic.presenter.CommonPresenter;
import com.rv.home.rv.module.ui.login.bean.SendCodeBean;
......@@ -34,7 +33,6 @@ import java.util.LinkedHashMap;
import java.util.Map;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
......@@ -179,7 +177,7 @@ public class SetPayPwdActivity extends BaseStatusActivity<CommonPresenter> {
Map<String, Object> map = new LinkedHashMap<>();
map.put("username", getPhone());
map.put("type", 4);
map.put("code", Cooker.getStringValue(getApplicationContext(), "code"));
map.put("code", Cookie.getStringValue(getApplicationContext(), "code"));
mPresenter.postData(0, ApiConfig.HTTP_URL_SEND_CODE, SendCodeBean.class, map, true);
}
......
......@@ -122,6 +122,7 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
@OnClick({R2.id.iv_back, R2.id.tv_item_withdraw, R2.id.rl_item_consumer_details, R2.id.rl_item_commission_record, R2.id.rl_item_withdrawals_record})
public void onViewClicked(View view) {
int id = view.getId();
if (id == R.id.iv_back) {
finish();
......@@ -137,7 +138,7 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
startActivity(new Intent(getApplicationContext(), CommissionDetailActivity.class));
} else if (id == R.id.rl_item_withdrawals_record) {
//提现记录
startActivity(new Intent(getApplicationContext(), SetPayPwdActivity.class));
startActivity(new Intent(getApplicationContext(), EnchashmentRecordActivity.class));
}
}
......
package com.xxrv.wallet.adapter;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.rv.component.utils.DateUtils;
import com.rv.component.utils.DisplayUtil;
import com.xxrv.wallet.R;
import com.xxrv.wallet.bean.IncomeRecordsBean;
import com.xxrv.wallet.bean.WalletcathListBean;
import java.util.List;
public class WalletCathAdapter extends BaseQuickAdapter<WalletcathListBean.ItemWalletcath, BaseViewHolder> {
public WalletCathAdapter(@Nullable List<WalletcathListBean.ItemWalletcath> data) {
super(R.layout.item_commision, data);
}
@Override
protected void convert(BaseViewHolder helper, WalletcathListBean.ItemWalletcath item) {
helper.setText(R.id.tv_consume_name, "提现" + item.getAmount() + "元");
helper.setText(R.id.tv_income_time, DateUtils.timestampToString1(item.getCrtTime()));
if (item.getStauts() == 0) {
helper.setText(R.id.tv_amount, "审核中");
helper.setTextColor(R.id.tv_amount, Color.parseColor("#cccccc"));
} else if (item.getStauts() == 1) {
helper.setText(R.id.tv_amount, "已到账");
helper.setTextColor(R.id.tv_amount, Color.parseColor("#999999"));
} else if (item.getStauts() == 2) {
helper.setText(R.id.tv_amount, "审核失败");
helper.setTextColor(R.id.tv_amount, Color.parseColor("#F25b5b"));
}
Drawable drawable = mContext.getResources().getDrawable(R.drawable.common_icon_rig_gray);
drawable.setBounds(0, 0, DisplayUtil.dip2px(mContext, 8), DisplayUtil.dip2px(mContext, 12));
((TextView) helper.itemView.findViewById(R.id.tv_amount)).setCompoundDrawables(null, null, drawable, null);
}
private String dealName(String name) {
if (!TextUtils.isEmpty(name)) {
if (name.length() == 11) {
return name.substring(0, 3) + "****" + name.substring(7, name.length());
}
}
return name;
}
}
package com.xxrv.wallet.bean;
import com.ruiwenliu.wrapper.base.BaseBean;
import java.math.BigDecimal;
import java.util.List;
/*****
* 提现记录
*/
public class WalletcathListBean extends BaseBean {
private boolean rel;
private WalletcathData data;
public boolean isRel() {
return rel;
}
public void setRel(boolean rel) {
this.rel = rel;
}
public WalletcathData getData() {
return data;
}
public void setData(WalletcathData data) {
this.data = data;
}
public static class WalletcathData {
private int totalWithdraw;
private int pageNum;
private int pageSize;
private int totalCount;
private int totalPage;
private List<ItemWalletcath> walletCaths;
public int getTotalWithdraw() {
return totalWithdraw;
}
public void setTotalWithdraw(int totalWithdraw) {
this.totalWithdraw = totalWithdraw;
}
public int getPageNum() {
return pageNum;
}
public void setPageNum(int pageNum) {
this.pageNum = pageNum;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
public int getTotalPage() {
return totalPage;
}
public void setTotalPage(int totalPage) {
this.totalPage = totalPage;
}
public List<ItemWalletcath> getWalletCaths() {
return walletCaths;
}
public void setWalletCaths(List<ItemWalletcath> walletCaths) {
this.walletCaths = walletCaths;
}
}
public static class ItemWalletcath {
private int id;
private String userId;
private int cathType;
private String orderno;
private String cono;
private BigDecimal amount;
private int stauts;
private long crtTime;
private long finishTime;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public int getCathType() {
return cathType;
}
public void setCathType(int cathType) {
this.cathType = cathType;
}
public String getOrderno() {
return orderno;
}
public void setOrderno(String orderno) {
this.orderno = orderno;
}
public String getCono() {
return cono;
}
public void setCono(String cono) {
this.cono = cono;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public int getStauts() {
return stauts;
}
public void setStauts(int stauts) {
this.stauts = stauts;
}
public long getCrtTime() {
return crtTime;
}
public void setCrtTime(long crtTime) {
this.crtTime = crtTime;
}
public long getFinishTime() {
return finishTime;
}
public void setFinishTime(long finishTime) {
this.finishTime = finishTime;
}
}
}
......@@ -10,6 +10,7 @@ import android.widget.LinearLayout;
import com.xxrv.wallet.R;
import com.xxrv.wallet.view.PayPassView;
import com.xxrv.wallet.view.SetPayPassView;
/**
* 使用弹框作为容器
......@@ -31,7 +32,7 @@ public class SetPasswordDialog {
this.mContext = context;
this.mThemeResId= R.style.dialog_pay_theme;
this.mDialogLayout = LayoutInflater.from(mContext).inflate(R.layout.view_set_paypass_layout,null);
this.mDialogLayout = LayoutInflater.from(mContext).inflate(R.layout.view_set_pay_pwd_dialog,null);
mDialog=new AlertDialog.Builder(mContext,mThemeResId).create();
mDialog.setCancelable(true);
mDialog.show();
......@@ -50,70 +51,12 @@ public class SetPasswordDialog {
* 得到PayPassView控件
* @return
*/
public PayPassView getPayViewPass() {
public SetPayPassView getPayViewPass() {
return mDialogLayout.findViewById(R.id.pay_View);
}
/**
* 自定义
* @param context
* @param themeResId 主题样式
*/
public SetPasswordDialog(Context context, int themeResId) {
this.mContext = context;
this.mThemeResId=themeResId;
this.mDialogLayout = LayoutInflater.from(mContext).inflate(R.layout.view_paypass_dialog,null);
}
/**
* 初始化Dialog
*/
public SetPasswordDialog setAlertDialog(){
mDialog=new AlertDialog.Builder(mContext,mThemeResId).create();
mDialog.setCancelable(true);//按返回键退出
mDialog.show();
return this;
}
public SetPasswordDialog setAlertDialog(boolean isBack){
mDialog=new AlertDialog.Builder(mContext,mThemeResId).create();
mDialog.setCancelable(isBack);//按返回键退出
mDialog.show();
return this;
}
/**
* 设置弹框大小 透明度
*/
public SetPasswordDialog setWindowSize(int width, int height, float amount){
mDialog.getWindow().setDimAmount(amount);//设置透明度
window = mDialog.getWindow();
window.setLayout(width,height);
window.setContentView(mDialogLayout);//设置弹框布局
return this;
}
/**
* 设置弹框宽高 透明度
* custom=2 自适应高度
* custom=其他 指定高度
*/
public SetPasswordDialog setWindowSize(int width, int height, int custom, float amount){
if(custom==2){
mDialog.getWindow().setDimAmount(amount);//设置透明度
window = mDialog.getWindow();
window.setLayout(width, LinearLayout.LayoutParams.WRAP_CONTENT);
window.setContentView(mDialogLayout);//设置弹框布局
return this;
}
else {
mDialog.getWindow().setDimAmount(amount);//设置透明度
window = mDialog.getWindow();
window.setLayout(width,height );
window.setContentView(mDialogLayout);//设置弹框布局
return this;
}
}
/**
* 点击外部消失
*/
......@@ -126,16 +69,6 @@ public class SetPasswordDialog {
}
return this;
}
/**
* 方式 与位置
*/
public SetPasswordDialog setGravity(int animation, int gravity){
window.setWindowAnimations(animation); //添加动画
window.setGravity(gravity); //底部
return this;
}
/**
* 关闭
*/
......
......@@ -31,12 +31,15 @@ public class SetPayPassView extends RelativeLayout {
private String strPass = "";//保存密码
private List<Integer> listNumber;//1,2,3---0
private View mPassLayout;//布局
private ImageView imgPackUp;
/**
* 按钮对外接口
*/
public interface OnPayClickListener {
void onPassFinish(String passContent);
void onClose();
}
private OnPayClickListener mPayClickListener;
......@@ -70,6 +73,7 @@ public class SetPayPassView extends RelativeLayout {
private void initView() {
mPassLayout = LayoutInflater.from(mContext).inflate(R.layout.view_set_paypass_layout, null);
mGridView = mPassLayout.findViewById(R.id.gv_pass);
imgPackUp = mPassLayout.findViewById(R.id.img_pack_up);
//初始化数据
listNumber = new ArrayList<>();
for (int i = 1; i < 10; i++) {
......@@ -79,6 +83,14 @@ public class SetPayPassView extends RelativeLayout {
listNumber.add(0);
listNumber.add(R.drawable.ic_pay_del0);
mGridView.setAdapter(adapter);
imgPackUp.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (mPayClickListener != null) {
mPayClickListener.onClose();
}
}
});
}
/**
......
......@@ -9,17 +9,6 @@
<include layout="@layout/common_line" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/colorWrite" />
<include layout="@layout/common_line" />
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<include layout="@layout/common_refresh" />
</LinearLayout>
\ No newline at end of file
......@@ -15,7 +15,7 @@
android:orientation="horizontal"
android:weightSum="6">
<EditText
<TextView
android:id="@+id/edt_pwd1"
android:layout_width="0dp"
android:layout_height="@dimen/size_50"
......@@ -25,7 +25,7 @@
android:gravity="center"
android:inputType="numberPassword|textPassword" />
<EditText
<TextView
android:id="@+id/edt_pwd2"
android:layout_width="0dp"
android:layout_height="@dimen/size_50"
......@@ -36,7 +36,7 @@
android:gravity="center"
android:inputType="numberPassword|textPassword" />
<EditText
<TextView
android:id="@+id/edt_pwd3"
android:layout_width="0dp"
android:layout_height="@dimen/size_50"
......@@ -47,7 +47,7 @@
android:gravity="center"
android:inputType="numberPassword|textPassword" />
<EditText
<TextView
android:id="@+id/edt_pwd4"
android:layout_width="0dp"
android:layout_height="@dimen/size_50"
......@@ -58,7 +58,7 @@
android:gravity="center"
android:inputType="numberPassword|textPassword" />
<EditText
<TextView
android:id="@+id/edt_pwd5"
android:layout_width="0dp"
android:layout_height="@dimen/size_50"
......@@ -69,7 +69,7 @@
android:gravity="center"
android:inputType="numberPassword|textPassword" />
<EditText
<TextView
android:id="@+id/edt_pwd6"
android:layout_width="0dp"
android:layout_height="@dimen/size_50"
......
......@@ -43,6 +43,7 @@
android:layout_height="match_parent"
android:layout_gravity="right"
android:layout_marginRight="@dimen/text_10"
android:drawablePadding="@dimen/size_5"
android:gravity="right|center_vertical"
android:text="11"
android:textColor="@color/gray_707070"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ywl="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.xxrv.wallet.view.SetPayPassView
android:id="@+id/pay_View"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
......@@ -10,11 +10,21 @@
android:background="@color/grayf9"
android:orientation="vertical">
<ImageView
android:id="@+id/img_pack_up"
android:scaleType="fitXY"
android:layout_width="@dimen/size_40"
android:layout_height="@dimen/size_20"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/size_5"
android:layout_marginBottom="5dp"
android:src="@drawable/rv_common_icon_up_arrow" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:background="@color/graye3">
<GridView
android:id="@+id/gv_pass"
android:layout_width="match_parent"
......
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