Commit 221b04cd authored by linfeng's avatar linfeng

bug修复

parent f5a303ef
......@@ -14,12 +14,12 @@
<item name="android:windowBackground">@color/colorPrimary</item>
</style>
<!-- App启动样式 -->
<style name="SplashTheme" parent="ResourceBaseAppTheme">
<item name="android:windowBackground">@color/colorPrimary</item>
<item name="android:windowFullscreen">true</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="android:windowIsTranslucent">true</item>
</style>
<!--&lt;!&ndash; App启动样式 &ndash;&gt;-->
<!--<style name="SplashTheme" parent="ResourceBaseAppTheme">-->
<!--<item name="android:windowBackground">@color/colorPrimary</item>-->
<!--<item name="android:windowFullscreen">true</item>-->
<!--<item name="windowNoTitle">true</item>-->
<!--<item name="windowActionBar">false</item>-->
<!--<item name="android:windowIsTranslucent">true</item>-->
<!--</style>-->
</resources>
......@@ -26,10 +26,10 @@ android {
storePassword rootProject.ext.sign_xinxin.storePassword
}
debug {
keyAlias rootProject.ext.sign_xinxin_debug.keyAlias
keyPassword rootProject.ext.sign_xinxin_debug.keyPassword
storeFile file(rootProject.ext.sign_xinxin_debug.storeDebugFile)
storePassword rootProject.ext.sign_xinxin_debug.storePassword
keyAlias 'xinxin'
keyPassword '123456'
storeFile file('E:/git/rvapp/keystore/xinxin.jks')
storePassword '123456'
}
}
buildTypes {
......@@ -37,18 +37,21 @@ android {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
signingConfig signingConfigs.debug
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation fileTree(include: ['*.jar'], dir: 'libs')
api 'com.jakewharton:butterknife:9.0.0-rc1'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
// api project(path: ':RvTravel')
// api project(path: ':RvTravel')
api project(path: ':module_home')
api project(path: ':module_mine')
api project(path: ':module_camp')
api project(path: ':module_tourism')
}
......@@ -194,7 +194,8 @@
android:screenOrientation="portrait" />
<activity
android:name="com.rv.home.rv.module.ui.main.home.order.OrderListActivity"
android:screenOrientation="portrait" />
android:screenOrientation="portrait"
android:launchMode="singleTop"/>
<activity
android:name="com.rv.home.rv.module.ui.login.BingPhoneActivity"
android:screenOrientation="portrait" />
......
......@@ -70,6 +70,7 @@ public class WXPayEntryActivity extends BaseStatusActivity<CommonPresenter> impl
switch (resp.errCode) {
case 0:
RxBus.post(new PaymentSuccessfulEvent());
finish();
break;
case -1:
finish();
......
......@@ -14,4 +14,24 @@ public class ScaleUtils {
public static int px2dip(Context context, int pxValue) {
return ((int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, pxValue, context.getResources().getDisplayMetrics()));
}
/*****
* sp转px
* @param context
* @param spValue
* @return
*/
public static int sp2px(Context context,float spValue) {
return (int) (spValue * context.getResources().getDisplayMetrics().scaledDensity + 0.5f);
}
/*******
* px转sp
* @param pxValue
* @return
*/
public static float px2sp(Context context,int pxValue) {
return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX, pxValue, context.getResources().getDisplayMetrics());
}
}
......@@ -23,6 +23,6 @@
android:layout_centerHorizontal="true"
android:text="@string/empty_no_data"
android:textColor="#ffcd00"
android:textSize="24px" />
android:textSize="@dimen/sp_14" />
</RelativeLayout>
\ No newline at end of file
......@@ -363,6 +363,25 @@ public class OrderListBean extends BaseBean {
private String startAddr;
private int orderId;
private int endCity;
private int freeDays;
private int rebate;
public int getFreeDays() {
return freeDays;
}
public void setFreeDays(int freeDays) {
this.freeDays = freeDays;
}
public int getRebate() {
return rebate;
}
public void setRebate(int rebate) {
this.rebate = rebate;
}
public String getStart_city_name() {
return startCityName;
......@@ -539,6 +558,8 @@ public class OrderListBean extends BaseBean {
public void setEnd_city(int end_city) {
this.endCity = end_city;
}
}
public static class OrderTourDetail implements Serializable {
......
......@@ -26,6 +26,7 @@ android {
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.jakewharton:butterknife:9.0.0-rc1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
annotationProcessor 'com.jakewharton:butterknife-compiler:9.0.0-rc1'
implementation 'com.android.support:appcompat-v7:28.0.0'
testImplementation 'junit:junit:4.12'
......
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rv.member" >
package="com.rv.member">
<application>
<activity android:name="com.rv.member.MemberCenterActivity"></activity>
<activity android:name=".MemberCenterActivity" />
<activity android:name=".ConsumeRecordActivity" />
<activity android:name=".FreesDayActivity" />
<activity android:name=".PurchaseRecordActivity"></activity>
</application>
</manifest>
\ No newline at end of file
......@@ -29,6 +29,7 @@ import com.rv.component.dialog.PaymentTypeSelection;
import com.rv.home.rv.module.ApiConfig;
import com.rv.home.rv.module.basic.BaseStatusActivity;
import com.rv.home.rv.module.ui.login.LoginRvActivity;
import com.rv.home.rv.module.ui.main.home.order.OrderListActivity;
import com.rv.member.bean.MemberListBean;
import com.rv.member.adapter.MemberListAdapter;
......@@ -57,6 +58,7 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
private static final int REQUEST_LOGIN = 10000;
private static final int REQUEST_VERIFIED = 10001;
private static final int REQUEST_PAY = 10002;
@BindView(R2.id.iv_avatar)
RoundImageView ivAvatar;
......@@ -101,12 +103,13 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
@SuppressLint("CheckResult")
private void initRxBus() {
RxBus.tObservable(PaymentSuccessfulEvent.class)
.observeOn(Schedulers.newThread())
.observeOn(Schedulers.io())
.subscribe(new Consumer<PaymentSuccessfulEvent>() {
@Override
public void accept(PaymentSuccessfulEvent payEvent) throws Exception {
getUserData();
startActivityForResult(OrderListActivity.getIntent(MemberCenterActivity.this, 3), REQUEST_PAY);
}
});
......@@ -149,7 +152,7 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
}
@OnClick({R2.id.iv_avatar, R2.id.tv_login, R2.id.tv_verified, R2.id.iv_title})
@OnClick({R2.id.iv_avatar, R2.id.tv_login, R2.id.tv_verified, R2.id.iv_title, R2.id.tv_consume_record, R2.id.tv_purchase_record, R2.id.tv_free_day})
public void onViewClicked(View view) {
int id = view.getId();
if (id == R.id.iv_avatar) {
......@@ -166,6 +169,12 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
startActivityForResult(intent, REQUEST_VERIFIED);
} else if (id == R.id.iv_title) {
finish();
} else if (id == R.id.tv_consume_record) {
startActivity(new Intent(MemberCenterActivity.this, ConsumeRecordActivity.class));
} else if (id == R.id.tv_purchase_record) {
startActivity(new Intent(MemberCenterActivity.this, PurchaseRecordActivity.class));
} else if (id == R.id.tv_free_day) {
// startActivity(new Intent(MemberCenterActivity.this, FreesDayActivity.class));
}
}
......@@ -223,8 +232,8 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
}
tvConsumeRecord.setText(info.getPayCount() + "\n 消费记录");
tvPurchaseRecord.setText(info.getRentFreeDays() + "\n 可免费租车 (天)");
tvFreeDay.setText(info.getBuyCount() + "\n 购买记录 (次)");
tvFreeDay.setText(info.getRentFreeDays() + "\n 可免费租车 (天)");
tvPurchaseRecord.setText(info.getBuyCount() + "\n 购买记录 (次)");
}
if (TextUtils.isEmpty(OkGoUtil.getToken())) {
......@@ -277,6 +286,9 @@ public class MemberCenterActivity extends BaseStatusActivity<MemberPresenter> {
getMemberData();
} else if (requestCode == REQUEST_VERIFIED) {
getUserData();
} else if (requestCode == REQUEST_PAY) {
getUserData();
getMemberData();
}
}
......
package com.rv.member.bean;
import com.google.gson.annotations.SerializedName;
import com.ruiwenliu.wrapper.base.BaseBean;
import java.io.Serializable;
......@@ -7,7 +8,8 @@ import java.io.Serializable;
/**
* 获取用户信息
*/
public class UserInfoBean extends BaseBean {
public class UserInfoBean extends BaseBean implements Serializable {
private static final long serialVersionUID = -2037885960862296967L;
private UserInfo data;
private boolean rel;
......@@ -67,11 +69,11 @@ public class UserInfoBean extends BaseBean {
//备注
private String remark;
// 剩余天数
private int rentFreeDays ;
private int rentFreeDays;
// 会员消费次数
private int payCount;
// 购买会员册数
private int buyCount ;
private int buyCount;
// 会员等级
private int memberLevel;
......
......@@ -9,4 +9,12 @@
<string name="tv_please_wait">敬请期待</string>
<string name="tv_login">登录</string>
<string name="tv_title_consume_record">消费记录</string>
<string name="tv_no_consume_data">无消费记录</string>
<string-array name="free_day_list">
<item>使用明细</item>
<item>赠送明细</item>
<item>总天数明细</item>
</string-array>
</resources>
package com.rv.plugin.time;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.rv.plugin.time.test", appContext.getPackageName());
}
}
......@@ -24,13 +24,7 @@ public class DownloadAppUtils {
String packageName = context.getPackageName();
String rootPath = null;
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {//外部存储卡
rootPath = Environment.getExternalStorageDirectory() + File.separator + Environment.DIRECTORY_DOWNLOADS + File.separator + packageName + File.separator;
} else {
Toast.makeText(context, "没有SD卡", Toast.LENGTH_SHORT).show();
Log.i(TAG, "没有SD卡");
return;
}
rootPath = context.getExternalCacheDir().getPath() + File.separator + Environment.DIRECTORY_DOWNLOADS + File.separator ;
send(context, -1, serverVersionName);
File file = new File(rootPath);
if (!file.exists()) {
......
......@@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
......
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