Compare commits
3 Commits
48ee31e542
...
5340175551
| Author | SHA1 | Date | |
|---|---|---|---|
| 5340175551 | |||
| c8cc7bbdfe | |||
| 806c537b48 |
@@ -232,6 +232,9 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".view.settings.InvitationDataActivity"
|
android:name=".view.settings.InvitationDataActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
<activity
|
||||||
|
android:name=".view.settings.WxCodeActivity"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".view.settings.SocialActivity"
|
android:name=".view.settings.SocialActivity"
|
||||||
android:screenOrientation="portrait" />
|
android:screenOrientation="portrait" />
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ public class ConstUrl {
|
|||||||
public static final String SOCKET_USERSTATIS = "wss://ws.whnuanbeinikj.cn?user_id=";
|
public static final String SOCKET_USERSTATIS = "wss://ws.whnuanbeinikj.cn?user_id=";
|
||||||
public static final String SOCKET_SPEED_DATE = DEBUG ? (DEBUG1 ? "wss://pre.ws.whnuanbeinikj.cn/speed?token=" : "wss://ws.whnuanbeinikj.cn/speed?token=") :
|
public static final String SOCKET_SPEED_DATE = DEBUG ? (DEBUG1 ? "wss://pre.ws.whnuanbeinikj.cn/speed?token=" : "wss://ws.whnuanbeinikj.cn/speed?token=") :
|
||||||
"wss://ws.whnuanbeinikj.cn/speed?token=";
|
"wss://ws.whnuanbeinikj.cn/speed?token=";
|
||||||
public final static String IMAGE_URL = "http://xqasset.whnuanbeinikj.cn/";
|
//public final static String IMAGE_URL = "http://qianyan-asset.oss-cn-shanghai.aliyuncs.com/";
|
||||||
|
public final static String IMAGE_URL = "http://oss.jindashengkj.cn/";
|
||||||
public final static String BASE_URL = BASE_ROOT + "api/";
|
public final static String BASE_URL = BASE_ROOT + "api/";
|
||||||
public final static String APP_FIELD = "app/";
|
public final static String APP_FIELD = "app/";
|
||||||
public final static String AUTH_FIELD = "passport/";
|
public final static String AUTH_FIELD = "passport/";
|
||||||
@@ -243,6 +244,10 @@ public class ConstUrl {
|
|||||||
public final static String TURNTABLE_WINNING_RECORD = getUrl(BASE_URL, "", "activity/turntableWinningRecord");
|
public final static String TURNTABLE_WINNING_RECORD = getUrl(BASE_URL, "", "activity/turntableWinningRecord");
|
||||||
public final static String YEAR_TREASURE_HUNT = getUrl(BASE_URL, "", "activity/yearTreasureHunt");
|
public final static String YEAR_TREASURE_HUNT = getUrl(BASE_URL, "", "activity/yearTreasureHunt");
|
||||||
|
|
||||||
|
public final static String up_auth_detail = getUrl(BASE_URL, "", "/attest/up_auth_detail");
|
||||||
|
public final static String up_auth_save = getUrl(BASE_URL, "", "/attest/up_auth_save");
|
||||||
|
public final static String up_auth_submit = getUrl(BASE_URL, "", "/attest/up_auth_submit");
|
||||||
|
|
||||||
public static String getUrl(String base, String field, String method) {
|
public static String getUrl(String base, String field, String method) {
|
||||||
return base + field + method;
|
return base + field + method;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,13 +127,13 @@ public class InfoEditPhotoRecyclerAdapter extends RecyclerView.Adapter implement
|
|||||||
|
|
||||||
} else if (0 == position) {
|
} else if (0 == position) {
|
||||||
dataHolder.mDeleteView.setVisibility(View.VISIBLE);
|
dataHolder.mDeleteView.setVisibility(View.VISIBLE);
|
||||||
dataHolder.mHeadPhotoView.setVisibility(View.VISIBLE);
|
dataHolder.mHeadPhotoView.setVisibility(GONE);
|
||||||
dataHolder.mPhotoView.setVisibility(GONE);
|
dataHolder.mPhotoView.setVisibility(View.VISIBLE);
|
||||||
dataHolder.mEmptyView.setVisibility(GONE);
|
dataHolder.mEmptyView.setVisibility(GONE);
|
||||||
if (imagePath.contains("uploads/")) {
|
if (imagePath.contains("uploads/")) {
|
||||||
dataHolder.mHeadPhotoView.setImageURI(StrU.getResourcePath(imagePath, mContext));
|
dataHolder.mPhotoView.setImageURI(StrU.getResourcePath(imagePath, mContext));
|
||||||
} else {
|
} else {
|
||||||
dataHolder.mHeadPhotoView.setImageURI("file://" + imagePath);
|
dataHolder.mPhotoView.setImageURI("file://" + imagePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import com.xuebiping.bolizhuzi.model.settings.SettingBrandBean;
|
|||||||
import com.xuebiping.bolizhuzi.model.settings.SignDataListBean;
|
import com.xuebiping.bolizhuzi.model.settings.SignDataListBean;
|
||||||
import com.xuebiping.bolizhuzi.model.settings.SkillSettingBean;
|
import com.xuebiping.bolizhuzi.model.settings.SkillSettingBean;
|
||||||
import com.xuebiping.bolizhuzi.model.settings.SocialListBean;
|
import com.xuebiping.bolizhuzi.model.settings.SocialListBean;
|
||||||
|
import com.xuebiping.bolizhuzi.model.settings.UpAuthDetailBean;
|
||||||
import com.xuebiping.bolizhuzi.model.settings.UserHomeBean;
|
import com.xuebiping.bolizhuzi.model.settings.UserHomeBean;
|
||||||
import com.xuebiping.bolizhuzi.model.settings.VideoRecordBean;
|
import com.xuebiping.bolizhuzi.model.settings.VideoRecordBean;
|
||||||
import com.xuebiping.bolizhuzi.model.settings.WXAccountStatusBean;
|
import com.xuebiping.bolizhuzi.model.settings.WXAccountStatusBean;
|
||||||
@@ -1561,6 +1562,426 @@ public class SettingManager {
|
|||||||
task.start();
|
task.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* up主认证详情
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_detail(BaseActivity activity, HttpUiCallBack<UpAuthDetailBean> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<UpAuthDetailBean> task = new HttpWithUiTask<UpAuthDetailBean>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<UpAuthDetailBean> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<UpAuthDetailBean>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.setUrl(ConstUrl.up_auth_detail);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存微信号
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveWxCode(BaseActivity activity,String wechat_no, HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("wechat_no", wechat_no)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存三围
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveSanwei(BaseActivity activity,String bust,String waist,String hip, HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("bust", bust)
|
||||||
|
.addParam("waist", waist)
|
||||||
|
.addParam("hip", hip)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存身高
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveHeight(BaseActivity activity,String height, HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("height", height)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存体重
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveWeight(BaseActivity activity,String weight, HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("weight", weight)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存星座
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveConstellation(BaseActivity activity,String constellation, HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("constellation", constellation)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存签名
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveSign(BaseActivity activity,String signature, HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("signature", signature)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存工作标签
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveJob(BaseActivity activity,String job, HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("job", job)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存城市
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveCity(BaseActivity activity,String city_id, HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("city_id", city_id)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存封面图
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveCover(BaseActivity activity,String cover, HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("cover_image", cover)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存身份认证信息
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveIDCard(BaseActivity activity,String real_name,String id_card_no,
|
||||||
|
String id_card_front,String id_card_back, String id_card_hold,
|
||||||
|
HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("real_name", real_name)
|
||||||
|
.addParam("id_card_no", id_card_no)
|
||||||
|
.addParam("id_card_front", id_card_front)
|
||||||
|
.addParam("id_card_back", id_card_back)
|
||||||
|
.addParam("id_card_hold", id_card_hold)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存视频认证信息
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveVideoRz(BaseActivity activity,String video_verify_code,String video_verify_text,
|
||||||
|
String video_verify_video,
|
||||||
|
HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("video_verify_code", video_verify_code)
|
||||||
|
.addParam("video_verify_text", video_verify_text)
|
||||||
|
.addParam("video_verify_video", video_verify_video)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存视频封面信息
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveVideoCover(BaseActivity activity,String video_cover_url,String video_url,
|
||||||
|
HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("video_cover_url", video_cover_url)
|
||||||
|
.addParam("video_url", video_url)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存头像
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_saveAvatar(BaseActivity activity,String avatar,
|
||||||
|
HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("avatar", avatar)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 保存相册
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_savePhotoList(BaseActivity activity,String album_images,
|
||||||
|
HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("album_images", album_images)
|
||||||
|
.setUrl(ConstUrl.up_auth_save);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交认证
|
||||||
|
*
|
||||||
|
* @param activity
|
||||||
|
* @param httpUiCallBack
|
||||||
|
*/
|
||||||
|
public static void up_auth_submit(BaseActivity activity,
|
||||||
|
String avatar,
|
||||||
|
String nickname,
|
||||||
|
String signature,
|
||||||
|
int gender,
|
||||||
|
String job,
|
||||||
|
String cover_image,
|
||||||
|
String real_name,
|
||||||
|
String id_card_no,
|
||||||
|
String id_card_front,
|
||||||
|
String id_card_back,
|
||||||
|
String id_card_hold,
|
||||||
|
String video_verify_code,
|
||||||
|
String video_verify_text,
|
||||||
|
String video_verify_video,
|
||||||
|
String birthday,
|
||||||
|
String wechat_no,
|
||||||
|
String album_images,
|
||||||
|
String video_cover_url,
|
||||||
|
String video_url,
|
||||||
|
String height,
|
||||||
|
String weight,
|
||||||
|
String bust,
|
||||||
|
String waist,
|
||||||
|
String hip,
|
||||||
|
String constellation,
|
||||||
|
String city_id,
|
||||||
|
HttpUiCallBack<Object> httpUiCallBack) {
|
||||||
|
HttpWithUiTask<Object> task = new HttpWithUiTask<Object>(activity, httpUiCallBack) {
|
||||||
|
@Override
|
||||||
|
protected HttpResult<Object> run() throws Exception {
|
||||||
|
HttpRequest.Builder builder = new HttpRequest.Builder()
|
||||||
|
.setResultType(new TType<HttpResult<Object>>() {
|
||||||
|
}).setHttpMethod(HttpMethod.POST)
|
||||||
|
.addParam("avatar", avatar)
|
||||||
|
.addParam("nickname", nickname)
|
||||||
|
.addParam("signature", signature)
|
||||||
|
.addParam("gender", gender+"")
|
||||||
|
.addParam("job", job)
|
||||||
|
.addParam("cover_image", cover_image)
|
||||||
|
.addParam("real_name", real_name)
|
||||||
|
.addParam("id_card_no", id_card_no)
|
||||||
|
.addParam("id_card_front", id_card_front)
|
||||||
|
.addParam("id_card_back", id_card_back)
|
||||||
|
.addParam("id_card_hold", id_card_hold)
|
||||||
|
.addParam("video_verify_code", video_verify_code)
|
||||||
|
.addParam("video_verify_text", video_verify_text)
|
||||||
|
.addParam("video_verify_video", video_verify_video)
|
||||||
|
.addParam("birthday", birthday)
|
||||||
|
.addParam("wechat_no", wechat_no)
|
||||||
|
.addParam("album_images", album_images)
|
||||||
|
.addParam("video_cover_url", video_cover_url)
|
||||||
|
.addParam("video_url", video_url)
|
||||||
|
.addParam("height", height)
|
||||||
|
.addParam("weight", weight)
|
||||||
|
.addParam("bust", bust)
|
||||||
|
.addParam("waist", waist)
|
||||||
|
.addParam("hip", hip)
|
||||||
|
.addParam("constellation", constellation)
|
||||||
|
.addParam("city_id", city_id)
|
||||||
|
.setUrl(ConstUrl.up_auth_submit);
|
||||||
|
HttpRequest request = builder.build();
|
||||||
|
return request.request();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
task.start();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,514 @@
|
|||||||
|
package com.xuebiping.bolizhuzi.model.settings;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class UpAuthDetailBean {
|
||||||
|
|
||||||
|
private int status;
|
||||||
|
private String status_text;
|
||||||
|
private String reject_reason;
|
||||||
|
private int submit_time;
|
||||||
|
private int audit_time;
|
||||||
|
private FormDTO form;
|
||||||
|
private SectionStatusDTO section_status;
|
||||||
|
private int can_submit;
|
||||||
|
private List<CompletionDTO> completion;
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus_text() {
|
||||||
|
return status_text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus_text(String status_text) {
|
||||||
|
this.status_text = status_text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReject_reason() {
|
||||||
|
return reject_reason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReject_reason(String reject_reason) {
|
||||||
|
this.reject_reason = reject_reason;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSubmit_time() {
|
||||||
|
return submit_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubmit_time(int submit_time) {
|
||||||
|
this.submit_time = submit_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAudit_time() {
|
||||||
|
return audit_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAudit_time(int audit_time) {
|
||||||
|
this.audit_time = audit_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FormDTO getForm() {
|
||||||
|
return form;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setForm(FormDTO form) {
|
||||||
|
this.form = form;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SectionStatusDTO getSection_status() {
|
||||||
|
return section_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSection_status(SectionStatusDTO section_status) {
|
||||||
|
this.section_status = section_status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCan_submit() {
|
||||||
|
return can_submit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCan_submit(int can_submit) {
|
||||||
|
this.can_submit = can_submit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<CompletionDTO> getCompletion() {
|
||||||
|
return completion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCompletion(List<CompletionDTO> completion) {
|
||||||
|
this.completion = completion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class FormDTO {
|
||||||
|
private String avatar;
|
||||||
|
private String nickname;
|
||||||
|
private String signature;
|
||||||
|
private int gender;
|
||||||
|
private String job;
|
||||||
|
private String tag;
|
||||||
|
private String cover_image;
|
||||||
|
private String material_image;
|
||||||
|
private String real_name;
|
||||||
|
private String id_card_no;
|
||||||
|
private String id_card_front;
|
||||||
|
private String id_card_back;
|
||||||
|
private String id_card_hold;
|
||||||
|
private String video_verify_code;
|
||||||
|
private String video_verify_text;
|
||||||
|
private String video_verify_video;
|
||||||
|
private String birthday;
|
||||||
|
private String wechat_no;
|
||||||
|
private String video_cover_url;
|
||||||
|
private String video_url;
|
||||||
|
private int height;
|
||||||
|
private int weight;
|
||||||
|
private int bust; //胸围
|
||||||
|
private int waist; //腰围
|
||||||
|
private int hip; //臀围
|
||||||
|
private String constellation;
|
||||||
|
private int city_id;
|
||||||
|
private String city_name;
|
||||||
|
private List<String> album_images;
|
||||||
|
|
||||||
|
public String getAvatar() {
|
||||||
|
return avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAvatar(String avatar) {
|
||||||
|
this.avatar = avatar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNickname() {
|
||||||
|
return nickname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNickname(String nickname) {
|
||||||
|
this.nickname = nickname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSignature() {
|
||||||
|
return signature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSignature(String signature) {
|
||||||
|
this.signature = signature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getGender() {
|
||||||
|
return gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGender(int gender) {
|
||||||
|
this.gender = gender;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJob() {
|
||||||
|
return job;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setJob(String job) {
|
||||||
|
this.job = job;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTag() {
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTag(String tag) {
|
||||||
|
this.tag = tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCover_image() {
|
||||||
|
return cover_image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCover_image(String cover_image) {
|
||||||
|
this.cover_image = cover_image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMaterial_image() {
|
||||||
|
return material_image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMaterial_image(String material_image) {
|
||||||
|
this.material_image = material_image;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getReal_name() {
|
||||||
|
return real_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReal_name(String real_name) {
|
||||||
|
this.real_name = real_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId_card_no() {
|
||||||
|
return id_card_no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId_card_no(String id_card_no) {
|
||||||
|
this.id_card_no = id_card_no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId_card_front() {
|
||||||
|
return id_card_front;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId_card_front(String id_card_front) {
|
||||||
|
this.id_card_front = id_card_front;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId_card_back() {
|
||||||
|
return id_card_back;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId_card_back(String id_card_back) {
|
||||||
|
this.id_card_back = id_card_back;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId_card_hold() {
|
||||||
|
return id_card_hold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId_card_hold(String id_card_hold) {
|
||||||
|
this.id_card_hold = id_card_hold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVideo_verify_code() {
|
||||||
|
return video_verify_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideo_verify_code(String video_verify_code) {
|
||||||
|
this.video_verify_code = video_verify_code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVideo_verify_text() {
|
||||||
|
return video_verify_text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideo_verify_text(String video_verify_text) {
|
||||||
|
this.video_verify_text = video_verify_text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVideo_verify_video() {
|
||||||
|
return video_verify_video;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideo_verify_video(String video_verify_video) {
|
||||||
|
this.video_verify_video = video_verify_video;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBirthday() {
|
||||||
|
return birthday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBirthday(String birthday) {
|
||||||
|
this.birthday = birthday;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWechat_no() {
|
||||||
|
return wechat_no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWechat_no(String wechat_no) {
|
||||||
|
this.wechat_no = wechat_no;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVideo_cover_url() {
|
||||||
|
return video_cover_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideo_cover_url(String video_cover_url) {
|
||||||
|
this.video_cover_url = video_cover_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVideo_url() {
|
||||||
|
return video_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideo_url(String video_url) {
|
||||||
|
this.video_url = video_url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeight(int height) {
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWeight(int weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBust() {
|
||||||
|
return bust;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBust(int bust) {
|
||||||
|
this.bust = bust;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWaist() {
|
||||||
|
return waist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWaist(int waist) {
|
||||||
|
this.waist = waist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getHip() {
|
||||||
|
return hip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHip(int hip) {
|
||||||
|
this.hip = hip;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getConstellation() {
|
||||||
|
return constellation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConstellation(String constellation) {
|
||||||
|
this.constellation = constellation;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCity_id() {
|
||||||
|
return city_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCity_id(int city_id) {
|
||||||
|
this.city_id = city_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCity_name() {
|
||||||
|
return city_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCity_name(String city_name) {
|
||||||
|
this.city_name = city_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getAlbum_images() {
|
||||||
|
return album_images;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlbum_images(List<String> album_images) {
|
||||||
|
this.album_images = album_images;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class SectionStatusDTO {
|
||||||
|
private IdentityDTO identity;
|
||||||
|
private VideoVerifyDTO video_verify;
|
||||||
|
private AlbumDTO album;
|
||||||
|
private VideoCoverDTO video_cover;
|
||||||
|
|
||||||
|
public IdentityDTO getIdentity() {
|
||||||
|
return identity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdentity(IdentityDTO identity) {
|
||||||
|
this.identity = identity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VideoVerifyDTO getVideo_verify() {
|
||||||
|
return video_verify;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideo_verify(VideoVerifyDTO video_verify) {
|
||||||
|
this.video_verify = video_verify;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlbumDTO getAlbum() {
|
||||||
|
return album;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAlbum(AlbumDTO album) {
|
||||||
|
this.album = album;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VideoCoverDTO getVideo_cover() {
|
||||||
|
return video_cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setVideo_cover(VideoCoverDTO video_cover) {
|
||||||
|
this.video_cover = video_cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class IdentityDTO {
|
||||||
|
private int status;
|
||||||
|
private String text;
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getText() {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setText(String text) {
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class VideoVerifyDTO {
|
||||||
|
private int status;
|
||||||
|
private String text;
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getText() {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setText(String text) {
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class AlbumDTO {
|
||||||
|
private int status;
|
||||||
|
private String text;
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getText() {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setText(String text) {
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class VideoCoverDTO {
|
||||||
|
private int status;
|
||||||
|
private String text;
|
||||||
|
|
||||||
|
public int getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(int status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getText() {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setText(String text) {
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class CompletionDTO {
|
||||||
|
private String key;
|
||||||
|
private String label;
|
||||||
|
private int filled;
|
||||||
|
private String text;
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKey(String key) {
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLabel() {
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLabel(String label) {
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFilled() {
|
||||||
|
return filled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFilled(int filled) {
|
||||||
|
this.filled = filled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getText() {
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setText(String text) {
|
||||||
|
this.text = text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -41,6 +41,8 @@ public class InvitationActivity extends BaseActivity implements
|
|||||||
private String qrImageUrl;
|
private String qrImageUrl;
|
||||||
ActivityInvitationBinding binding;
|
ActivityInvitationBinding binding;
|
||||||
private List<String> posterList;
|
private List<String> posterList;
|
||||||
|
private TextView tv_zg;
|
||||||
|
private TextView tv_my_fc_bl;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -77,6 +79,9 @@ public class InvitationActivity extends BaseActivity implements
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
tv_zg = findViewById(R.id.tv_zg);
|
||||||
|
tv_my_fc_bl = findViewById(R.id.tv_my_fc_bl);
|
||||||
|
|
||||||
mShareDialog = new BottomShareDialog(this, R.style.SelectiveDialog);
|
mShareDialog = new BottomShareDialog(this, R.style.SelectiveDialog);
|
||||||
mShareDialog.setOnButtonSelectListener(this);
|
mShareDialog.setOnButtonSelectListener(this);
|
||||||
binding.ruleBtn.setOnClickListener(new View.OnClickListener() {
|
binding.ruleBtn.setOnClickListener(new View.OnClickListener() {
|
||||||
@@ -100,6 +105,13 @@ public class InvitationActivity extends BaseActivity implements
|
|||||||
mShareDialog.show();
|
mShareDialog.show();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*binding.tv_share_btn.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
mShareDialog.show();
|
||||||
|
}
|
||||||
|
});*/
|
||||||
if (UserManager.getUserInfo().getGender() == 2) {
|
if (UserManager.getUserInfo().getGender() == 2) {
|
||||||
binding.tvManTip.setVisibility(View.GONE);
|
binding.tvManTip.setVisibility(View.GONE);
|
||||||
binding.menTip1.setVisibility(View.GONE);
|
binding.menTip1.setVisibility(View.GONE);
|
||||||
@@ -200,6 +212,9 @@ public class InvitationActivity extends BaseActivity implements
|
|||||||
binding.firstLabel.setText(result.getReward().getFirst());
|
binding.firstLabel.setText(result.getReward().getFirst());
|
||||||
binding.secondLabel.setText(result.getReward().getSecond());
|
binding.secondLabel.setText(result.getReward().getSecond());
|
||||||
binding.thirdLabel.setText(result.getReward().getThird());
|
binding.thirdLabel.setText(result.getReward().getThird());
|
||||||
|
//TODO 需要接口返回准确数据
|
||||||
|
tv_zg.setText("最高" + result.getReward().getFour() +"分成");
|
||||||
|
tv_my_fc_bl.setText(result.getReward().getThird());
|
||||||
binding.fourLabel.setText(result.getReward().getFour() + "");
|
binding.fourLabel.setText(result.getReward().getFour() + "");
|
||||||
posterList = result.getAvatar_list();
|
posterList = result.getAvatar_list();
|
||||||
binding.totalPeopleLabel.setText(result.getTotal().getTotal_invite() + "");
|
binding.totalPeopleLabel.setText(result.getTotal().getTotal_invite() + "");
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import com.fengliyan.http.httprequest.UploadFile;
|
|||||||
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
||||||
import com.fengliyan.uikit.sketch.SketchImageView;
|
import com.fengliyan.uikit.sketch.SketchImageView;
|
||||||
import com.fengliyan.uikit.toast.MaleToast;
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
|
import com.google.gson.Gson;
|
||||||
import com.hjq.permissions.OnPermissionCallback;
|
import com.hjq.permissions.OnPermissionCallback;
|
||||||
import com.hjq.permissions.XXPermissions;
|
import com.hjq.permissions.XXPermissions;
|
||||||
import com.xuebiping.bolizhuzi.R;
|
import com.xuebiping.bolizhuzi.R;
|
||||||
@@ -112,6 +113,7 @@ public class PhotoListActivity extends BaseActivity implements UserAvatarManager
|
|||||||
public static final int MULTI_SELECTOR_REQUEST = 200;
|
public static final int MULTI_SELECTOR_REQUEST = 200;
|
||||||
private HashMap<Integer, Integer> photoListIndexMap;
|
private HashMap<Integer, Integer> photoListIndexMap;
|
||||||
private StringBuilder mImages;
|
private StringBuilder mImages;
|
||||||
|
private List<String> album;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -123,6 +125,9 @@ public class PhotoListActivity extends BaseActivity implements UserAvatarManager
|
|||||||
|
|
||||||
mManager = new UserAvatarManager(this);
|
mManager = new UserAvatarManager(this);
|
||||||
|
|
||||||
|
Intent intent = getIntent();
|
||||||
|
album = intent.getStringArrayListExtra("album");
|
||||||
|
|
||||||
initView();
|
initView();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -171,46 +176,25 @@ public class PhotoListActivity extends BaseActivity implements UserAvatarManager
|
|||||||
findViewById(R.id.submit_button).setOnClickListener(new View.OnClickListener() {
|
findViewById(R.id.submit_button).setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
//TODO 这里需要调接口上传 提交
|
//这里需要调接口上传 提交
|
||||||
//updateData();
|
updateData();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
public void getUserInfo() {
|
int size = album.size();
|
||||||
SettingManager.getHomeUser(this, new HttpUiCallBack<UserHomeBean>() {
|
if (size > 0) {
|
||||||
@Override
|
for (int i = 0; i < size; i++) {
|
||||||
public void onSuccess(BaseActivity activity, UserHomeBean result, String message) {
|
mPhotoDataList.set(i, album.get(i));
|
||||||
if (result.getUserinfo() != null) {
|
mOldPhotoDataList.set(i, album.get(i));
|
||||||
|
|
||||||
List<String> album_list = result.getUserinfo().getAlbum_list();
|
|
||||||
int size = album_list.size();
|
|
||||||
if (size > 0) {
|
|
||||||
for (int i = 0; i < size; i++) {
|
|
||||||
mPhotoDataList.set(i, album_list.get(i));
|
|
||||||
mOldPhotoDataList.set(i, album_list.get(i));
|
|
||||||
|
|
||||||
}
|
|
||||||
if (size < 6) {
|
|
||||||
mPhotoDataList.set(size, "selector");
|
|
||||||
mOldPhotoDataList.set(size, "selector");
|
|
||||||
}
|
|
||||||
mPhotoAdapter.setPhotoList(mPhotoDataList);
|
|
||||||
mPhotoAdapter.notifyDataSetChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(BaseActivity activity, String tip) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if (size < 9) {
|
||||||
@Override
|
mPhotoDataList.set(size, "selector");
|
||||||
public void onException(BaseActivity activity, Throwable e) {
|
mOldPhotoDataList.set(size, "selector");
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
mPhotoAdapter.setPhotoList(mPhotoDataList);
|
||||||
|
mPhotoAdapter.notifyDataSetChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -319,8 +303,8 @@ public class PhotoListActivity extends BaseActivity implements UserAvatarManager
|
|||||||
albumList.add(path);
|
albumList.add(path);
|
||||||
|
|
||||||
for (int i = 0; i < albumList.size(); i++) {
|
for (int i = 0; i < albumList.size(); i++) {
|
||||||
if (5 - i >= 0) {
|
if (8 - i >= 0) {
|
||||||
mPhotoDataList.remove(5 - i);
|
mPhotoDataList.remove(8 - i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,6 +335,7 @@ public class PhotoListActivity extends BaseActivity implements UserAvatarManager
|
|||||||
|
|
||||||
if (!hasPhoto) {
|
if (!hasPhoto) {
|
||||||
//editProfile(null);
|
//editProfile(null);
|
||||||
|
finishActivity();
|
||||||
} else {
|
} else {
|
||||||
new Thread(new Runnable() {
|
new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@@ -366,7 +351,7 @@ public class PhotoListActivity extends BaseActivity implements UserAvatarManager
|
|||||||
List<String> photoList = mPhotoAdapter.getmPhotoList();
|
List<String> photoList = mPhotoAdapter.getmPhotoList();
|
||||||
Iterator<String> i = photoList.iterator();
|
Iterator<String> i = photoList.iterator();
|
||||||
int realSize = 0;
|
int realSize = 0;
|
||||||
int currentListCount = 6;
|
int currentListCount = 9;
|
||||||
photoListIndexMap = new HashMap<>();
|
photoListIndexMap = new HashMap<>();
|
||||||
for (int index = 0; index < photoList.size(); index++) {
|
for (int index = 0; index < photoList.size(); index++) {
|
||||||
String path = photoList.get(index);
|
String path = photoList.get(index);
|
||||||
@@ -405,21 +390,21 @@ public class PhotoListActivity extends BaseActivity implements UserAvatarManager
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final StringBuilder stringBuilder = new StringBuilder();
|
mImages = new StringBuilder();
|
||||||
for (int i1 = 0; i1 < currentListCount; i1++) {
|
for (int i1 = 0; i1 < currentListCount; i1++) {
|
||||||
String str = photoList.get(i1);
|
String str = photoList.get(i1);
|
||||||
if (TextUtils.isEmpty(str) || "selector".equals(str)) {
|
if (TextUtils.isEmpty(str) || "selector".equals(str)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
stringBuilder.append(str);
|
mImages.append(str);
|
||||||
if (i1 < currentListCount - 1) {
|
if (i1 < currentListCount - 1) {
|
||||||
stringBuilder.append(",");
|
mImages.append(",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
runOnUiThread(new Runnable() {
|
runOnUiThread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
//editProfile(stringBuilder.toString());
|
up_auth_savePhotoList(mImages.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -449,7 +434,7 @@ public class PhotoListActivity extends BaseActivity implements UserAvatarManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//editProfile(mImages.toString());
|
up_auth_savePhotoList(mImages.toString());
|
||||||
photoListIndexMap.clear();
|
photoListIndexMap.clear();
|
||||||
|
|
||||||
//上传成功后删掉本地图片
|
//上传成功后删掉本地图片
|
||||||
@@ -478,4 +463,32 @@ public class PhotoListActivity extends BaseActivity implements UserAvatarManager
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void up_auth_savePhotoList(String album_images){
|
||||||
|
SettingManager.up_auth_savePhotoList(this, album_images, new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
finishActivity();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void finishActivity() {
|
||||||
|
Intent intent = new Intent();
|
||||||
|
if(mImages != null) {
|
||||||
|
intent.putExtra("album",mImages.toString());
|
||||||
|
}
|
||||||
|
setResult(206,intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -22,6 +22,7 @@ import android.widget.LinearLayout;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.facebook.drawee.view.SimpleDraweeView;
|
import com.facebook.drawee.view.SimpleDraweeView;
|
||||||
|
import com.fengliyan.http.httprequest.UploadFile;
|
||||||
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
||||||
import com.fengliyan.uikit.photopicker.bean.Image;
|
import com.fengliyan.uikit.photopicker.bean.Image;
|
||||||
import com.fengliyan.uikit.toast.MaleToast;
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
@@ -29,15 +30,20 @@ import com.hjq.permissions.OnPermissionCallback;
|
|||||||
import com.hjq.permissions.XXPermissions;
|
import com.hjq.permissions.XXPermissions;
|
||||||
import com.xuebiping.bolizhuzi.R;
|
import com.xuebiping.bolizhuzi.R;
|
||||||
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
|
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.dynamics.manager.DynamicsManager;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
|
||||||
import com.xuebiping.bolizhuzi.controller.settings.manager.UserAvatarManager;
|
import com.xuebiping.bolizhuzi.controller.settings.manager.UserAvatarManager;
|
||||||
|
import com.xuebiping.bolizhuzi.im.uikit.common.ToastHelper;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.AttachmentStore;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.AttachmentStore;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.FileUtil;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.FileUtil;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageType;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageType;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageUtil;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageUtil;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.string.MD5;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.string.MD5;
|
||||||
|
import com.xuebiping.bolizhuzi.model.dynamics.UploadImageBean;
|
||||||
import com.xuebiping.bolizhuzi.utils.PermissionUtil;
|
import com.xuebiping.bolizhuzi.utils.PermissionUtil;
|
||||||
import com.xuebiping.bolizhuzi.utils.camera2.BitmapUtils;
|
import com.xuebiping.bolizhuzi.utils.camera2.BitmapUtils;
|
||||||
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.CustomAlertDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.CustomAlertDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.PermissionDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.PermissionDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.settings.video.VideoSelectActivity;
|
import com.xuebiping.bolizhuzi.view.settings.video.VideoSelectActivity;
|
||||||
@@ -67,8 +73,12 @@ public class RealNameTwoActivity extends BaseActivity implements UserAvatarManag
|
|||||||
|
|
||||||
private UserAvatarManager mManager;
|
private UserAvatarManager mManager;
|
||||||
|
|
||||||
String avatarPath;
|
String avatarPath1;
|
||||||
String avatarUrl;
|
String avatarPath2;
|
||||||
|
String avatarPath3;
|
||||||
|
String id_card_front;
|
||||||
|
String id_card_back;
|
||||||
|
String id_card_hold;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
@@ -98,11 +108,65 @@ public class RealNameTwoActivity extends BaseActivity implements UserAvatarManag
|
|||||||
ed_id_num.addTextChangedListener(mTextWatcher);
|
ed_id_num.addTextChangedListener(mTextWatcher);
|
||||||
ed_name.addTextChangedListener(mTextWatcher);
|
ed_name.addTextChangedListener(mTextWatcher);
|
||||||
|
|
||||||
|
Intent intent = getIntent();
|
||||||
|
String real_name = intent.getStringExtra("real_name");
|
||||||
|
String ic_card_no = intent.getStringExtra("ic_card_no");
|
||||||
|
String ic_card_front = intent.getStringExtra("ic_card_front");
|
||||||
|
String ic_card_back = intent.getStringExtra("ic_card_back");
|
||||||
|
String ic_card_hold = intent.getStringExtra("ic_card_hold");
|
||||||
|
|
||||||
|
if (!TextUtils.isEmpty(real_name)) {
|
||||||
|
ed_name.setText(real_name);
|
||||||
|
}
|
||||||
|
if (!TextUtils.isEmpty(ic_card_no)) {
|
||||||
|
ed_id_num.setText(ic_card_no);
|
||||||
|
}
|
||||||
|
if (!TextUtils.isEmpty(ic_card_front)) {
|
||||||
|
iv_card_z.setImageURI(ConstUrl.IMAGE_URL + ic_card_front);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!TextUtils.isEmpty(ic_card_back)) {
|
||||||
|
iv_card_f.setImageURI(ConstUrl.IMAGE_URL + ic_card_back);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!TextUtils.isEmpty(ic_card_hold)) {
|
||||||
|
iv_shou_z.setImageURI(ConstUrl.IMAGE_URL + ic_card_hold);
|
||||||
|
}
|
||||||
|
|
||||||
tv_commit.setOnClickListener(new View.OnClickListener() {
|
tv_commit.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
if (checkIsEnable()) {
|
if (checkIsEnable()) {
|
||||||
//TODO 调接口提交
|
//TODO 调接口提交
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(ed_name.getText().toString().trim())) {
|
||||||
|
ToastHelper.showToast(RealNameTwoActivity.this, "请输入真实姓名");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(ed_id_num.getText().toString().trim())) {
|
||||||
|
ToastHelper.showToast(RealNameTwoActivity.this, "请输入身份证号码");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(avatarPath1)) {
|
||||||
|
ToastHelper.showToast(RealNameTwoActivity.this, "未上传身份证正面图");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(avatarPath2)) {
|
||||||
|
ToastHelper.showToast(RealNameTwoActivity.this, "未上传身份证反面图");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(avatarPath3)) {
|
||||||
|
ToastHelper.showToast(RealNameTwoActivity.this, "未上传手持身份证正面图");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uploadFront(avatarPath1);
|
||||||
|
uploadFront(avatarPath2);
|
||||||
|
uploadFront(avatarPath3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -245,15 +309,96 @@ public class RealNameTwoActivity extends BaseActivity implements UserAvatarManag
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getUserImg(@Nullable @org.jetbrains.annotations.Nullable String path) {
|
public void getUserImg(@Nullable @org.jetbrains.annotations.Nullable String path) {
|
||||||
this.avatarPath = path;
|
if (type == 1) {
|
||||||
avatarUrl = null;
|
avatarPath1 = path;
|
||||||
if(type == 1) {
|
iv_card_z.setImageURI("file://" + this.avatarPath1);
|
||||||
iv_card_z.setImageURI("file://" + this.avatarPath);
|
} else if (type == 2) {
|
||||||
}else if(type == 2){
|
avatarPath2 = path;
|
||||||
iv_card_f.setImageURI("file://" + this.avatarPath);
|
iv_card_f.setImageURI("file://" + this.avatarPath2);
|
||||||
}else if(type == 3){
|
} else if (type == 3) {
|
||||||
iv_shou_z.setImageURI("file://" + this.avatarPath);
|
avatarPath3 = path;
|
||||||
|
iv_shou_z.setImageURI("file://" + this.avatarPath3);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void uploadFront(String filepath) {
|
||||||
|
UploadFile uploadFile = new UploadFile(System.currentTimeMillis() + ".jpg", filepath);
|
||||||
|
UploadFile[] files = new UploadFile[]{uploadFile};
|
||||||
|
DynamicsManager.uploadImage(this, files, "audit",
|
||||||
|
new HttpUiCallBack<List<UploadImageBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||||
|
if (filepath.equals(avatarPath1)) {
|
||||||
|
id_card_front = result.get(0).getUrl();
|
||||||
|
} else if (filepath.equals(avatarPath2)) {
|
||||||
|
id_card_back = result.get(0).getUrl();
|
||||||
|
} else if (filepath.equals(avatarPath3)) {
|
||||||
|
id_card_hold = result.get(0).getUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!TextUtils.isEmpty(id_card_front) && !TextUtils.isEmpty(id_card_back) && !TextUtils.isEmpty(id_card_hold)) {
|
||||||
|
up_auth_saveIDCard(ed_name.getText().toString().trim(),
|
||||||
|
ed_id_num.getText().toString().trim(),
|
||||||
|
id_card_front,
|
||||||
|
id_card_back,
|
||||||
|
id_card_hold);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
MaleToast.showMessage(activity, "图片上传失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
super.onBackPressed();
|
||||||
|
Intent intent = new Intent();
|
||||||
|
intent.putExtra("id_card_front", id_card_front);
|
||||||
|
intent.putExtra("id_card_back", id_card_back);
|
||||||
|
intent.putExtra("id_card_hold", id_card_hold);
|
||||||
|
intent.putExtra("real_name", ed_name.getText().toString());
|
||||||
|
intent.putExtra("id_card_no", ed_id_num.getText().toString());
|
||||||
|
setResult(203, intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void finishActivity() {
|
||||||
|
Intent intent = new Intent();
|
||||||
|
intent.putExtra("id_card_front", id_card_front);
|
||||||
|
intent.putExtra("id_card_back", id_card_back);
|
||||||
|
intent.putExtra("id_card_hold", id_card_hold);
|
||||||
|
intent.putExtra("real_name", ed_name.getText().toString());
|
||||||
|
intent.putExtra("id_card_no", ed_id_num.getText().toString());
|
||||||
|
setResult(203, intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveIDCard(String real_name, String id_card_no,
|
||||||
|
String id_card_front, String id_card_back, String id_card_hold) {
|
||||||
|
SettingManager.up_auth_saveIDCard(this, real_name, id_card_no, id_card_front, id_card_back, id_card_hold, new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
finishActivity();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
MaleToast.showMessage(activity, "网络出错");
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -671,7 +671,6 @@ public class SettingFragment2 extends Fragment implements View.OnClickListener {
|
|||||||
view.setOnClickListener(view19 -> {
|
view.setOnClickListener(view19 -> {
|
||||||
if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
if (!BaseApplication.getInstance().showCertificationDialog(getActivity())) {
|
||||||
startActivity(new Intent(getActivity(), GoddessPrivilegeActivity.class));
|
startActivity(new Intent(getActivity(), GoddessPrivilegeActivity.class));
|
||||||
// startActivity(new Intent(getActivity(), UpPrivilegeActivity.class));
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import androidx.annotation.Nullable;
|
|||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
|
import android.app.ProgressDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
@@ -12,7 +13,9 @@ import android.media.ThumbnailUtils;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
|
import android.text.Editable;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
import android.text.TextWatcher;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@@ -29,6 +32,7 @@ import com.bigkoo.pickerview.listener.OnTimeSelectListener;
|
|||||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||||
import com.bigkoo.pickerview.view.TimePickerView;
|
import com.bigkoo.pickerview.view.TimePickerView;
|
||||||
import com.facebook.drawee.view.SimpleDraweeView;
|
import com.facebook.drawee.view.SimpleDraweeView;
|
||||||
|
import com.fengliyan.http.httprequest.UploadFile;
|
||||||
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
||||||
import com.fengliyan.uikit.toast.MaleToast;
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@@ -37,19 +41,26 @@ import com.hjq.permissions.XXPermissions;
|
|||||||
import com.xuebiping.bolizhuzi.R;
|
import com.xuebiping.bolizhuzi.R;
|
||||||
import com.xuebiping.bolizhuzi.controller.constant.ConsUser;
|
import com.xuebiping.bolizhuzi.controller.constant.ConsUser;
|
||||||
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
|
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.dynamics.manager.DynamicsManager;
|
||||||
import com.xuebiping.bolizhuzi.controller.main.manager.GlobalManager;
|
import com.xuebiping.bolizhuzi.controller.main.manager.GlobalManager;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
|
||||||
import com.xuebiping.bolizhuzi.controller.settings.manager.UserAvatarManager;
|
import com.xuebiping.bolizhuzi.controller.settings.manager.UserAvatarManager;
|
||||||
|
import com.xuebiping.bolizhuzi.im.uikit.common.ToastHelper;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.AttachmentStore;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.AttachmentStore;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.FileUtil;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.FileUtil;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageType;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageType;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageUtil;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageUtil;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.SysSPUtils;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.SysSPUtils;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.string.MD5;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.string.MD5;
|
||||||
|
import com.xuebiping.bolizhuzi.model.dynamics.UploadImageBean;
|
||||||
import com.xuebiping.bolizhuzi.model.main.GlobalConfigBean;
|
import com.xuebiping.bolizhuzi.model.main.GlobalConfigBean;
|
||||||
|
import com.xuebiping.bolizhuzi.model.settings.UpAuthDetailBean;
|
||||||
|
import com.xuebiping.bolizhuzi.model.settings.UserHomeBean;
|
||||||
import com.xuebiping.bolizhuzi.utils.PermissionUtil;
|
import com.xuebiping.bolizhuzi.utils.PermissionUtil;
|
||||||
import com.xuebiping.bolizhuzi.utils.SPUtils;
|
import com.xuebiping.bolizhuzi.utils.SPUtils;
|
||||||
import com.xuebiping.bolizhuzi.utils.camera2.BitmapUtils;
|
import com.xuebiping.bolizhuzi.utils.camera2.BitmapUtils;
|
||||||
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||||
import com.xuebiping.bolizhuzi.view.main.CityPickerActivity;
|
import com.xuebiping.bolizhuzi.view.main.CityPickerActivity;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.CustomAlertDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.CustomAlertDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.PermissionDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.PermissionDialog;
|
||||||
@@ -109,7 +120,11 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
private String tizhong = "未填写";
|
private String tizhong = "未填写";
|
||||||
private String xingzuo = "未填写";
|
private String xingzuo = "未填写";
|
||||||
private String sanwwei = "未填写";
|
private String sanwwei = "未填写";
|
||||||
private String gender = "未填写";
|
private int gender = 0;
|
||||||
|
|
||||||
|
String bust = "";
|
||||||
|
String waist = "";
|
||||||
|
String hip = "";
|
||||||
|
|
||||||
private UserAvatarManager mManager;
|
private UserAvatarManager mManager;
|
||||||
private SimpleDraweeView sd_avatar;
|
private SimpleDraweeView sd_avatar;
|
||||||
@@ -130,6 +145,23 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
private TextView tv_sanwei;
|
private TextView tv_sanwei;
|
||||||
private TextView tv_gender;
|
private TextView tv_gender;
|
||||||
private Button submit_button;
|
private Button submit_button;
|
||||||
|
private SimpleDraweeView sd_cover;
|
||||||
|
private SimpleDraweeView sd_photo;
|
||||||
|
private TextView tv_card;
|
||||||
|
private TextView tv_video_rz;
|
||||||
|
private TextView tv_wxcode;
|
||||||
|
private String video_verify_code;
|
||||||
|
private String video_verify_text;
|
||||||
|
private UpAuthDetailBean.FormDTO formDTO;
|
||||||
|
private String id_card_front;
|
||||||
|
private String id_card_back;
|
||||||
|
private String id_card_hold;
|
||||||
|
private String real_name;
|
||||||
|
private String id_card_no;
|
||||||
|
private String album;
|
||||||
|
private String wxCode;
|
||||||
|
private String videoRzUrl;
|
||||||
|
private String cover;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -158,14 +190,19 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
rl_gender_layout = findViewById(R.id.rl_gender_layout);
|
rl_gender_layout = findViewById(R.id.rl_gender_layout);
|
||||||
tv_gender = findViewById(R.id.tv_gender);
|
tv_gender = findViewById(R.id.tv_gender);
|
||||||
rl_cover_layout = findViewById(R.id.rl_cover_layout);
|
rl_cover_layout = findViewById(R.id.rl_cover_layout);
|
||||||
|
sd_cover = findViewById(R.id.sd_cover);
|
||||||
rl_card_layout = findViewById(R.id.rl_card_layout);
|
rl_card_layout = findViewById(R.id.rl_card_layout);
|
||||||
|
tv_card = findViewById(R.id.tv_card);
|
||||||
rl_video_rz_layout = findViewById(R.id.rl_video_rz_layout);
|
rl_video_rz_layout = findViewById(R.id.rl_video_rz_layout);
|
||||||
|
tv_video_rz = findViewById(R.id.tv_video_rz);
|
||||||
rl_birthday_layout = findViewById(R.id.rl_birthday_layout);
|
rl_birthday_layout = findViewById(R.id.rl_birthday_layout);
|
||||||
tv_birthday = findViewById(R.id.tv_birthday);
|
tv_birthday = findViewById(R.id.tv_birthday);
|
||||||
rl_wxcode_layout = findViewById(R.id.rl_wxcode_layout);
|
rl_wxcode_layout = findViewById(R.id.rl_wxcode_layout);
|
||||||
|
tv_wxcode = findViewById(R.id.tv_wxcode);
|
||||||
rl_sanwei_layout = findViewById(R.id.rl_sanwei_layout);
|
rl_sanwei_layout = findViewById(R.id.rl_sanwei_layout);
|
||||||
tv_sanwei = findViewById(R.id.tv_sanwei);
|
tv_sanwei = findViewById(R.id.tv_sanwei);
|
||||||
rl_photo_layout = findViewById(R.id.rl_photo_layout);
|
rl_photo_layout = findViewById(R.id.rl_photo_layout);
|
||||||
|
sd_photo = findViewById(R.id.sd_photo);
|
||||||
rl_video_cover_layout = findViewById(R.id.rl_video_cover_layout);
|
rl_video_cover_layout = findViewById(R.id.rl_video_cover_layout);
|
||||||
sd_video_cover = findViewById(R.id.sd_video_cover);
|
sd_video_cover = findViewById(R.id.sd_video_cover);
|
||||||
rl_height_layout = findViewById(R.id.rl_height_layout);
|
rl_height_layout = findViewById(R.id.rl_height_layout);
|
||||||
@@ -203,6 +240,203 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
initSanWeiOptionPicker();
|
initSanWeiOptionPicker();
|
||||||
initGenderOptionPicker();
|
initGenderOptionPicker();
|
||||||
|
|
||||||
|
up_auth_detail();
|
||||||
|
|
||||||
|
tv_sign.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable editable) {
|
||||||
|
if(editable.length() > 0) {
|
||||||
|
up_auth_saveSign(editable.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
tv_zybq.addTextChangedListener(new TextWatcher() {
|
||||||
|
@Override
|
||||||
|
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void afterTextChanged(Editable editable) {
|
||||||
|
if(editable.length() > 0) {
|
||||||
|
up_auth_saveJob(editable.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void up_auth_detail(){
|
||||||
|
SettingManager.up_auth_detail(this, new HttpUiCallBack<UpAuthDetailBean>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, UpAuthDetailBean result, String tips) {
|
||||||
|
if(result != null) {
|
||||||
|
formDTO = result.getForm();
|
||||||
|
if(formDTO != null) {
|
||||||
|
sd_avatar.setImageURI(ConstUrl.IMAGE_URL + formDTO.getAvatar());
|
||||||
|
//sd_avatar.setImageURI("http://oss.jindashengkj.cn/uploads/album/202604/02/c0b2434c43939911a34f5dffb03f2101_.pic.jpg");
|
||||||
|
|
||||||
|
tv_nikename.setText(formDTO.getNickname());
|
||||||
|
tv_sign.setText(formDTO.getSignature());
|
||||||
|
tv_gender.setText(formDTO.getGender() == 1 ? "女" : "男");
|
||||||
|
tv_zybq.setText(formDTO.getJob());
|
||||||
|
sd_cover.setImageURI(ConstUrl.IMAGE_URL + formDTO.getCover_image());
|
||||||
|
|
||||||
|
avatarUrl = formDTO.getAvatar();
|
||||||
|
|
||||||
|
sd_video_cover.setImageURI(ConstUrl.IMAGE_URL + formDTO.getVideo_cover_url());
|
||||||
|
video_verify_code = formDTO.getVideo_verify_code();
|
||||||
|
video_verify_text = formDTO.getVideo_verify_text();
|
||||||
|
|
||||||
|
id_card_back = formDTO.getId_card_back();
|
||||||
|
id_card_front = formDTO.getId_card_front();
|
||||||
|
id_card_hold = formDTO.getId_card_hold();
|
||||||
|
id_card_no = formDTO.getId_card_no();
|
||||||
|
real_name = formDTO.getReal_name();
|
||||||
|
cover = formDTO.getCover_image();
|
||||||
|
|
||||||
|
gender = formDTO.getGender();
|
||||||
|
|
||||||
|
if(!TextUtils.isEmpty(formDTO.getBirthday())){
|
||||||
|
tv_birthday.setText(formDTO.getBirthday());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(formDTO.getWeight() > 0) {
|
||||||
|
tizhong = formDTO.getWeight() + "KG";
|
||||||
|
tv_tiz.setText(formDTO.getWeight()+"KG");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(formDTO.getHeight() > 0) {
|
||||||
|
height = formDTO.getHeight() +"CM";
|
||||||
|
tv_height.setText(formDTO.getHeight()+"CM");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(formDTO.getBust() > 0) {
|
||||||
|
bust = formDTO.getBust()+"";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(formDTO.getWaist() > 0) {
|
||||||
|
waist = formDTO.getWaist() + "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if(formDTO.getHip() > 0) {
|
||||||
|
hip = formDTO.getHip() + "";
|
||||||
|
}
|
||||||
|
tv_sanwei.setText(formDTO.getBust() + " " + formDTO.getWaist() + " " + formDTO.getHip());
|
||||||
|
|
||||||
|
if(!TextUtils.isEmpty(formDTO.getConstellation())){
|
||||||
|
xingzuo = formDTO.getConstellation();
|
||||||
|
tv_xz.setText(formDTO.getConstellation());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!TextUtils.isEmpty(formDTO.getCity_name())){
|
||||||
|
mCityId = formDTO.getCity_id()+"";
|
||||||
|
tv_city.setText(formDTO.getCity_name());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!TextUtils.isEmpty(formDTO.getWechat_no())){
|
||||||
|
wxCode = formDTO.getWechat_no();
|
||||||
|
tv_wxcode.setText(formDTO.getWechat_no());
|
||||||
|
}
|
||||||
|
|
||||||
|
List<String> album_images = formDTO.getAlbum_images();
|
||||||
|
if(album_images != null && album_images.size() > 0) {
|
||||||
|
sd_photo.setImageURI(ConstUrl.IMAGE_URL + album_images.get(0));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
UpAuthDetailBean.SectionStatusDTO section_status = result.getSection_status();
|
||||||
|
if(section_status != null) {
|
||||||
|
UpAuthDetailBean.SectionStatusDTO.IdentityDTO identity = section_status.getIdentity();
|
||||||
|
tv_card.setText(identity.getText());
|
||||||
|
if(identity.getStatus() == 2) {
|
||||||
|
rl_card_layout.setEnabled(false);
|
||||||
|
}else {
|
||||||
|
rl_card_layout.setEnabled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
UpAuthDetailBean.SectionStatusDTO.VideoCoverDTO video_cover = section_status.getVideo_cover();
|
||||||
|
if(video_cover != null) {
|
||||||
|
if(video_cover.getStatus() == 2) {
|
||||||
|
rl_video_cover_layout.setEnabled(false);
|
||||||
|
}else {
|
||||||
|
rl_video_cover_layout.setEnabled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
UpAuthDetailBean.SectionStatusDTO.VideoVerifyDTO video_verify = section_status.getVideo_verify();
|
||||||
|
if(video_verify != null) {
|
||||||
|
tv_video_rz.setText(video_cover.getText());
|
||||||
|
if(video_verify.getStatus() == 2) {
|
||||||
|
rl_video_rz_layout.setEnabled(false);
|
||||||
|
}else {
|
||||||
|
rl_video_rz_layout.setEnabled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(result.getStatus() == 2) { //当前已审核通过
|
||||||
|
submit_button.setText("已通过");
|
||||||
|
btnStatus(false);
|
||||||
|
}if(result.getStatus() == 1) {
|
||||||
|
submit_button.setText("审核中");
|
||||||
|
btnStatus(false);
|
||||||
|
}else {
|
||||||
|
btnStatus(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public void btnStatus(boolean status){
|
||||||
|
tv_nikename.setEnabled(status);
|
||||||
|
tv_sign.setEnabled(status);
|
||||||
|
tv_zybq.setEnabled(status);
|
||||||
|
rl_avatar_layout.setEnabled(status);
|
||||||
|
rl_gender_layout.setEnabled(status);
|
||||||
|
rl_cover_layout.setEnabled(status);
|
||||||
|
rl_card_layout.setEnabled(status);
|
||||||
|
rl_video_rz_layout.setEnabled(status);
|
||||||
|
rl_birthday_layout.setEnabled(status);
|
||||||
|
rl_wxcode_layout.setEnabled(status);
|
||||||
|
rl_sanwei_layout.setEnabled(status);
|
||||||
|
rl_photo_layout.setEnabled(status);
|
||||||
|
rl_video_cover_layout.setEnabled(status);
|
||||||
|
rl_height_layout.setEnabled(status);
|
||||||
|
rl_tiz_layout.setEnabled(status);
|
||||||
|
rl_xz_layout.setEnabled(status);
|
||||||
|
rl_city_layout.setEnabled(status);
|
||||||
|
submit_button.setEnabled(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -212,19 +446,42 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
} else if (view.getId() == R.id.rl_gender_layout) {
|
} else if (view.getId() == R.id.rl_gender_layout) {
|
||||||
pvGenderttions.show();
|
pvGenderttions.show();
|
||||||
} else if (view.getId() == R.id.rl_cover_layout) {
|
} else if (view.getId() == R.id.rl_cover_layout) {
|
||||||
startActivityForResult(new Intent(this,UploadPhotoCoverActivity.class),202);
|
Intent intent = new Intent(this, UploadPhotoCoverActivity.class);
|
||||||
|
if(formDTO != null) {
|
||||||
|
intent.putExtra("cover",formDTO.getCover_image());
|
||||||
|
}
|
||||||
|
startActivityForResult(intent,202);
|
||||||
} else if (view.getId() == R.id.rl_card_layout) {
|
} else if (view.getId() == R.id.rl_card_layout) {
|
||||||
startActivityForResult(new Intent(this,RealNameTwoActivity.class),203);
|
Intent intent = new Intent(this, RealNameTwoActivity.class);
|
||||||
|
if(formDTO != null) {
|
||||||
|
intent.putExtra("real_name",formDTO.getReal_name());
|
||||||
|
intent.putExtra("ic_card_no",formDTO.getId_card_no());
|
||||||
|
intent.putExtra("ic_card_front",formDTO.getId_card_front());
|
||||||
|
intent.putExtra("ic_card_back",formDTO.getId_card_back());
|
||||||
|
intent.putExtra("ic_card_hold",formDTO.getId_card_hold());
|
||||||
|
}
|
||||||
|
startActivityForResult(intent,203);
|
||||||
} else if (view.getId() == R.id.rl_video_rz_layout) {
|
} else if (view.getId() == R.id.rl_video_rz_layout) {
|
||||||
startActivityForResult(new Intent(this,VideoRenzhengActivity.class),204);
|
Intent intent = new Intent(this, VideoRenzhengActivity.class);
|
||||||
|
intent.putExtra("video_code",video_verify_code);
|
||||||
|
intent.putExtra("video_text",video_verify_text);
|
||||||
|
startActivityForResult(intent,204);
|
||||||
} else if (view.getId() == R.id.rl_birthday_layout) {
|
} else if (view.getId() == R.id.rl_birthday_layout) {
|
||||||
mAgePicker.show();
|
mAgePicker.show();
|
||||||
} else if (view.getId() == R.id.rl_wxcode_layout) {
|
} else if (view.getId() == R.id.rl_wxcode_layout) {
|
||||||
startActivity(new Intent(this, WXAccountActivity.class));
|
Intent intent = new Intent(this, WxCodeActivity.class);
|
||||||
|
if(formDTO != null) {
|
||||||
|
intent.putExtra("wxCode",formDTO.getWechat_no());
|
||||||
|
}
|
||||||
|
startActivityForResult(intent, 205);
|
||||||
} else if (view.getId() == R.id.rl_sanwei_layout) {
|
} else if (view.getId() == R.id.rl_sanwei_layout) {
|
||||||
pvSanWeittions.show();
|
pvSanWeittions.show();
|
||||||
} else if (view.getId() == R.id.rl_photo_layout) {
|
} else if (view.getId() == R.id.rl_photo_layout) {
|
||||||
startActivity(new Intent(this, PhotoListActivity.class));
|
Intent intent = new Intent(this, PhotoListActivity.class);
|
||||||
|
if(formDTO != null) {
|
||||||
|
intent.putStringArrayListExtra("album", (ArrayList<String>) formDTO.getAlbum_images());
|
||||||
|
}
|
||||||
|
startActivityForResult(intent,206);
|
||||||
}else if (view.getId() == R.id.rl_height_layout) {
|
}else if (view.getId() == R.id.rl_height_layout) {
|
||||||
pvHeighttions.show();
|
pvHeighttions.show();
|
||||||
}else if (view.getId() == R.id.rl_tiz_layout) {
|
}else if (view.getId() == R.id.rl_tiz_layout) {
|
||||||
@@ -237,7 +494,120 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
Intent intent = new Intent(this, CityPickerActivity.class);
|
Intent intent = new Intent(this, CityPickerActivity.class);
|
||||||
startActivityForResult(intent, 1001);
|
startActivityForResult(intent, 1001);
|
||||||
}else if (view.getId() == R.id.submit_button) {
|
}else if (view.getId() == R.id.submit_button) {
|
||||||
//TODO 这个调提交接口
|
//这个调提交接口
|
||||||
|
if(TextUtils.isEmpty(tv_nikename.getText().toString())){
|
||||||
|
ToastHelper.showToast(this,"未输入昵称");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(avatarUrl)){
|
||||||
|
ToastHelper.showToast(this,"未上传头像");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(tv_sign.getText().toString().trim())){
|
||||||
|
ToastHelper.showToast(this,"未输入签名");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(tv_gender.getText().toString().trim())){
|
||||||
|
ToastHelper.showToast(this,"未选择性别");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(tv_zybq.getText().toString().trim())){
|
||||||
|
ToastHelper.showToast(this,"未输入职业标签");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(cover)){
|
||||||
|
ToastHelper.showToast(this,"未选择封面图");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(real_name)){
|
||||||
|
ToastHelper.showToast(this,"未进行身份认证");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(videoRzUrl)){
|
||||||
|
ToastHelper.showToast(this,"未进行视频认证");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(tv_birthday.getText().toString().trim())){
|
||||||
|
ToastHelper.showToast(this,"未选择出生日期");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(wxCode)){
|
||||||
|
ToastHelper.showToast(this,"未添加微信号");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(sanwwei)){
|
||||||
|
ToastHelper.showToast(this,"未填写三围信息");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(album)){
|
||||||
|
ToastHelper.showToast(this,"未上传相册");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(videoCoverUrl)){
|
||||||
|
ToastHelper.showToast(this,"未上传视频信息");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(height)){
|
||||||
|
ToastHelper.showToast(this,"未填写身高");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(tizhong)){
|
||||||
|
ToastHelper.showToast(this,"未填写体重");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(xingzuo)){
|
||||||
|
ToastHelper.showToast(this,"未填写星座");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(tv_city.getText().toString().trim())){
|
||||||
|
ToastHelper.showToast(this,"未填写城市");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
up_auth_submit(avatarUrl,
|
||||||
|
tv_nikename.getText().toString(),
|
||||||
|
tv_sign.getText().toString(),
|
||||||
|
gender,
|
||||||
|
tv_zybq.getText().toString(),
|
||||||
|
cover,
|
||||||
|
real_name,
|
||||||
|
id_card_no,
|
||||||
|
id_card_front,
|
||||||
|
id_card_back,
|
||||||
|
id_card_hold,
|
||||||
|
video_verify_code,
|
||||||
|
video_verify_text,
|
||||||
|
videoRzUrl,
|
||||||
|
tv_birthday.getText().toString(),
|
||||||
|
wxCode,
|
||||||
|
album,
|
||||||
|
videoCoverPath,
|
||||||
|
videoCoverUrl,
|
||||||
|
tv_height.getText().toString(),
|
||||||
|
tv_tiz.getText().toString(),
|
||||||
|
bust,
|
||||||
|
waist,
|
||||||
|
hip,
|
||||||
|
tv_xz.getText().toString(),
|
||||||
|
mCityId
|
||||||
|
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,6 +693,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
|
|
||||||
if (AttachmentStore.copy(videoPath, md5Path) != -1) {
|
if (AttachmentStore.copy(videoPath, md5Path) != -1) {
|
||||||
videoFile = new File(md5Path);
|
videoFile = new File(md5Path);
|
||||||
|
uploadVideo(videoFile);
|
||||||
}
|
}
|
||||||
Bitmap bitmap = ThumbnailUtils.createVideoThumbnail(videoFile.getAbsolutePath(), MediaStore.Video.Thumbnails.FULL_SCREEN_KIND);
|
Bitmap bitmap = ThumbnailUtils.createVideoThumbnail(videoFile.getAbsolutePath(), MediaStore.Video.Thumbnails.FULL_SCREEN_KIND);
|
||||||
BitmapUtils.savePicNoRotate(BitmapUtils.toByteArray(bitmap), "video_cover",
|
BitmapUtils.savePicNoRotate(BitmapUtils.toByteArray(bitmap), "video_cover",
|
||||||
@@ -335,11 +706,10 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
public void run() {
|
public void run() {
|
||||||
List<String> paths = new ArrayList<>();
|
List<String> paths = new ArrayList<>();
|
||||||
paths.add(s);
|
paths.add(s);
|
||||||
videoUrl = null;
|
|
||||||
videoCoverUrl = null;
|
|
||||||
videoCoverPath = s;
|
|
||||||
del_video = "0";
|
del_video = "0";
|
||||||
sd_video_cover.setImageURI("file://" + videoCoverPath);
|
sd_video_cover.setImageURI("file://" + s);
|
||||||
|
|
||||||
|
uploadVideoCover(new File(s));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return null;
|
return null;
|
||||||
@@ -360,10 +730,44 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
}
|
}
|
||||||
}else if(requestCode == 202){ //上传封面图返回
|
}else if(requestCode == 202){ //上传封面图返回
|
||||||
//TODO
|
//TODO
|
||||||
|
if(data != null) {
|
||||||
|
String pathcover = data.getStringExtra("cover");
|
||||||
|
cover = data.getStringExtra("upload_cover");
|
||||||
|
sd_cover.setImageURI("file://" + pathcover);
|
||||||
|
}
|
||||||
}else if(requestCode == 203){ //修改身份认证状态
|
}else if(requestCode == 203){ //修改身份认证状态
|
||||||
//TODO
|
//TODO
|
||||||
|
if(data != null) {
|
||||||
|
id_card_front = data.getStringExtra("id_card_front");
|
||||||
|
id_card_back = data.getStringExtra("id_card_back");
|
||||||
|
id_card_hold = data.getStringExtra("id_card_hold");
|
||||||
|
real_name = data.getStringExtra("real_name");
|
||||||
|
id_card_no = data.getStringExtra("id_card_no");
|
||||||
|
tv_card.setText("已填写");
|
||||||
|
}
|
||||||
}else if(requestCode == 204){ //视频认证结果
|
}else if(requestCode == 204){ //视频认证结果
|
||||||
//TODO
|
//TODO
|
||||||
|
if(data != null) {
|
||||||
|
videoRzUrl = data.getStringExtra("videoUrl");
|
||||||
|
if(!TextUtils.isEmpty(videoRzUrl)){
|
||||||
|
tv_video_rz.setText("已填写");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else if(requestCode == 205){
|
||||||
|
if(data != null) {
|
||||||
|
wxCode = data.getStringExtra("wxCode");
|
||||||
|
tv_wxcode.setText(wxCode);
|
||||||
|
}
|
||||||
|
}else if(requestCode == 206){
|
||||||
|
if(data != null) {
|
||||||
|
album = data.getStringExtra("album");
|
||||||
|
if(!TextUtils.isEmpty(album) && album.contains(",")) {
|
||||||
|
String[] split = album.split(",");
|
||||||
|
if (split.length > 0) {
|
||||||
|
sd_photo.setImageURI(ConstUrl.IMAGE_URL + split[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (requestCode == 1001 && resultCode == RESULT_OK) {
|
} else if (requestCode == 1001 && resultCode == RESULT_OK) {
|
||||||
if (null != data) {
|
if (null != data) {
|
||||||
String city = data.getStringExtra("city");
|
String city = data.getStringExtra("city");
|
||||||
@@ -371,6 +775,8 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
tv_city.setText(city);
|
tv_city.setText(city);
|
||||||
if (!TextUtils.isEmpty(city)) {
|
if (!TextUtils.isEmpty(city)) {
|
||||||
mCityId = GlobalManager.getCityMap().get(city);
|
mCityId = GlobalManager.getCityMap().get(city);
|
||||||
|
|
||||||
|
up_auth_saveCity(mCityId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -382,6 +788,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
this.avatarPath = path;
|
this.avatarPath = path;
|
||||||
avatarUrl = null;
|
avatarUrl = null;
|
||||||
sd_avatar.setImageURI("file://" + this.avatarPath);
|
sd_avatar.setImageURI("file://" + this.avatarPath);
|
||||||
|
uploadAvatar(avatarPath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -435,6 +842,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
String occupation = heightLists.get(options1);
|
String occupation = heightLists.get(options1);
|
||||||
tv_height.setText(occupation);
|
tv_height.setText(occupation);
|
||||||
height = heightLists.get(options1);
|
height = heightLists.get(options1);
|
||||||
|
up_auth_saveHeight(height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -475,6 +883,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
String occupation = tiZhongLists.get(options1);
|
String occupation = tiZhongLists.get(options1);
|
||||||
tv_tiz.setText(occupation);
|
tv_tiz.setText(occupation);
|
||||||
tizhong = tiZhongLists.get(options1);
|
tizhong = tiZhongLists.get(options1);
|
||||||
|
up_auth_saveWeight(tizhong);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -523,6 +932,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
String occupation = xzuoLists.get(options1);
|
String occupation = xzuoLists.get(options1);
|
||||||
tv_xz.setText(occupation);
|
tv_xz.setText(occupation);
|
||||||
xingzuo = xzuoLists.get(options1);
|
xingzuo = xzuoLists.get(options1);
|
||||||
|
up_auth_saveConstellation(xingzuo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -570,6 +980,11 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
String occupation = xwLists.get(options1);
|
String occupation = xwLists.get(options1);
|
||||||
tv_sanwei.setText(occupation + " " + ywLists.get(options2) +" " + twLists.get(options3));
|
tv_sanwei.setText(occupation + " " + ywLists.get(options2) +" " + twLists.get(options3));
|
||||||
sanwwei = xwLists.get(options1) + " " + ywLists.get(options2) +" " + twLists.get(options3);
|
sanwwei = xwLists.get(options1) + " " + ywLists.get(options2) +" " + twLists.get(options3);
|
||||||
|
bust = xwLists.get(options1);
|
||||||
|
waist = ywLists.get(options2);
|
||||||
|
hip = twLists.get(options3);
|
||||||
|
|
||||||
|
up_auth_saveSanwei(bust,waist,hip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -609,7 +1024,7 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
if (genderLists.size() > 0) {
|
if (genderLists.size() > 0) {
|
||||||
String occupation = genderLists.get(options1);
|
String occupation = genderLists.get(options1);
|
||||||
tv_gender.setText(occupation);
|
tv_gender.setText(occupation);
|
||||||
gender = genderLists.get(options1);
|
gender = genderLists.get(options1).equals("女") ? 1 : 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -631,4 +1046,307 @@ public class UpPrivilegeActivity extends BaseActivity implements View.OnClickLis
|
|||||||
pvGenderttions.setPicker(genderLists);//二级选择器
|
pvGenderttions.setPicker(genderLists);//二级选择器
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
void up_auth_submit(String avatar,
|
||||||
|
String nickname,
|
||||||
|
String signature,
|
||||||
|
int gender,
|
||||||
|
String job,
|
||||||
|
String cover_image,
|
||||||
|
String real_name,
|
||||||
|
String id_card_no,
|
||||||
|
String id_card_front,
|
||||||
|
String id_card_back,
|
||||||
|
String id_card_hold,
|
||||||
|
String video_verify_code,
|
||||||
|
String video_verify_text,
|
||||||
|
String video_verify_video,
|
||||||
|
String birthday,
|
||||||
|
String wechat_no,
|
||||||
|
String album_images,
|
||||||
|
String video_cover_url,
|
||||||
|
String video_url,
|
||||||
|
String height,
|
||||||
|
String weight,
|
||||||
|
String bust,
|
||||||
|
String waist,
|
||||||
|
String hip,
|
||||||
|
String constellation,
|
||||||
|
String city_id){
|
||||||
|
SettingManager.up_auth_submit(this, avatar, nickname, signature, gender, job, cover_image, real_name,
|
||||||
|
id_card_no, id_card_front, id_card_back, id_card_hold, video_verify_code,
|
||||||
|
video_verify_text, video_verify_video, birthday, wechat_no, album_images, video_cover_url, video_url, height,
|
||||||
|
weight, bust, waist, hip, constellation, city_id, new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
ToastHelper.showToast(UpPrivilegeActivity.this,"UP主认证已提交");
|
||||||
|
finishActivity();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void uploadVideo(File videoFile) {
|
||||||
|
UploadFile uploadFile = new UploadFile(System.currentTimeMillis() + ".mp4", videoFile);
|
||||||
|
UploadFile[] files = new UploadFile[]{uploadFile};
|
||||||
|
DynamicsManager.uploadImage(this, files, "cover_video",
|
||||||
|
new HttpUiCallBack<List<UploadImageBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||||
|
if (result.size() > 0) {
|
||||||
|
videoCoverUrl = result.get(0).getUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!TextUtils.isEmpty(videoCoverUrl) && !TextUtils.isEmpty(videoCoverPath)){
|
||||||
|
up_auth_saveVideoCover(videoCoverUrl,videoCoverPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
MaleToast.showMessage(activity, "视频上传失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void uploadVideoCover(File filepath) {
|
||||||
|
UploadFile uploadFile = new UploadFile(System.currentTimeMillis() + ".jpg", filepath);
|
||||||
|
UploadFile[] files = new UploadFile[]{uploadFile};
|
||||||
|
DynamicsManager.uploadImage(this, files, "cover_video",
|
||||||
|
new HttpUiCallBack<List<UploadImageBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||||
|
if (result.size() > 0) {
|
||||||
|
videoCoverPath = result.get(0).getUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!TextUtils.isEmpty(videoCoverUrl) && !TextUtils.isEmpty(videoCoverPath)){
|
||||||
|
up_auth_saveVideoCover(videoCoverUrl,videoCoverPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
MaleToast.showMessage(activity, "视频上传失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveVideoCover(String video_cover_url,String video_url){
|
||||||
|
SettingManager.up_auth_saveVideoCover(this, video_cover_url, video_url, new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void uploadAvatar(String filepath) {
|
||||||
|
UploadFile uploadFile = new UploadFile(System.currentTimeMillis() + ".jpg", filepath);
|
||||||
|
UploadFile[] files = new UploadFile[]{uploadFile};
|
||||||
|
DynamicsManager.uploadImage(this, files, "album",
|
||||||
|
new HttpUiCallBack<List<UploadImageBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||||
|
if (result.size() > 0) {
|
||||||
|
avatarUrl = result.get(0).getUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
up_auth_saveAvatar(avatarUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
MaleToast.showMessage(activity, "视频上传失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveAvatar(String avatar){
|
||||||
|
SettingManager.up_auth_saveAvatar(this, avatar,new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveSanwei(String bust,String waist,String hip){
|
||||||
|
SettingManager.up_auth_saveSanwei(this, bust,waist,hip,new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveHeight(String height){
|
||||||
|
SettingManager.up_auth_saveHeight(this, height,new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveWeight(String weight){
|
||||||
|
SettingManager.up_auth_saveWeight(this, weight,new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveConstellation(String constellation){
|
||||||
|
SettingManager.up_auth_saveConstellation(this, constellation,new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveCity(String city){
|
||||||
|
SettingManager.up_auth_saveCity(this, city,new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveSign(String sign){
|
||||||
|
SettingManager.up_auth_saveSign(this, sign,new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveJob(String job){
|
||||||
|
SettingManager.up_auth_saveJob(this, job,new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,26 +11,32 @@ import android.media.ThumbnailUtils;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
|
|
||||||
import com.facebook.drawee.view.SimpleDraweeView;
|
import com.facebook.drawee.view.SimpleDraweeView;
|
||||||
|
import com.fengliyan.http.httprequest.UploadFile;
|
||||||
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
import com.fengliyan.uikit.photopicker.MultiImageSelector;
|
||||||
import com.fengliyan.uikit.toast.MaleToast;
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
import com.hjq.permissions.OnPermissionCallback;
|
import com.hjq.permissions.OnPermissionCallback;
|
||||||
import com.hjq.permissions.XXPermissions;
|
import com.hjq.permissions.XXPermissions;
|
||||||
import com.xuebiping.bolizhuzi.R;
|
import com.xuebiping.bolizhuzi.R;
|
||||||
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
|
import com.xuebiping.bolizhuzi.controller.constant.ConstUrl;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.dynamics.manager.DynamicsManager;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
|
||||||
import com.xuebiping.bolizhuzi.controller.settings.manager.UserAvatarManager;
|
import com.xuebiping.bolizhuzi.controller.settings.manager.UserAvatarManager;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.AttachmentStore;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.AttachmentStore;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.FileUtil;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.file.FileUtil;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageType;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageType;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageUtil;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.storage.StorageUtil;
|
||||||
import com.xuebiping.bolizhuzi.im.uikit.common.util.string.MD5;
|
import com.xuebiping.bolizhuzi.im.uikit.common.util.string.MD5;
|
||||||
|
import com.xuebiping.bolizhuzi.model.dynamics.UploadImageBean;
|
||||||
import com.xuebiping.bolizhuzi.utils.PermissionUtil;
|
import com.xuebiping.bolizhuzi.utils.PermissionUtil;
|
||||||
import com.xuebiping.bolizhuzi.utils.camera2.BitmapUtils;
|
import com.xuebiping.bolizhuzi.utils.camera2.BitmapUtils;
|
||||||
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.CustomAlertDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.CustomAlertDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.PermissionDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.PermissionDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.settings.video.VideoSelectActivity;
|
import com.xuebiping.bolizhuzi.view.settings.video.VideoSelectActivity;
|
||||||
@@ -48,12 +54,9 @@ public class UploadPhotoCoverActivity extends BaseActivity implements UserAvatar
|
|||||||
private SimpleDraweeView sd_cover;
|
private SimpleDraweeView sd_cover;
|
||||||
private Button submit_button;
|
private Button submit_button;
|
||||||
|
|
||||||
private String[] permissions = {Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.READ_PHONE_STATE};
|
private String[] permissions = {Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.READ_PHONE_STATE};
|
||||||
private PermissionDialog permissionDialog;
|
private PermissionDialog permissionDialog;
|
||||||
|
|
||||||
private boolean isChooseAvatar = false;
|
|
||||||
boolean isChooseVideo = false;
|
|
||||||
|
|
||||||
private MultiImageSelector mSelector;
|
private MultiImageSelector mSelector;
|
||||||
private UserAvatarManager mManager;
|
private UserAvatarManager mManager;
|
||||||
|
|
||||||
@@ -73,6 +76,14 @@ public class UploadPhotoCoverActivity extends BaseActivity implements UserAvatar
|
|||||||
sd_cover = findViewById(R.id.sd_cover);
|
sd_cover = findViewById(R.id.sd_cover);
|
||||||
submit_button = findViewById(R.id.submit_button);
|
submit_button = findViewById(R.id.submit_button);
|
||||||
|
|
||||||
|
|
||||||
|
Intent intent = getIntent();
|
||||||
|
String cover = intent.getStringExtra("cover");
|
||||||
|
if (!TextUtils.isEmpty(cover)) {
|
||||||
|
sd_cover.setImageURI(ConstUrl.IMAGE_URL + cover);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
sd_cover.setOnClickListener(new View.OnClickListener() {
|
sd_cover.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
@@ -84,6 +95,13 @@ public class UploadPhotoCoverActivity extends BaseActivity implements UserAvatar
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
//TODO 做上传操作并返回前个界面
|
//TODO 做上传操作并返回前个界面
|
||||||
|
|
||||||
|
if (TextUtils.isEmpty(avatarPath)) {
|
||||||
|
MaleToast.showMessage(UploadPhotoCoverActivity.this, "未上传封面图");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
uploadCover(avatarPath);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -131,8 +149,6 @@ public class UploadPhotoCoverActivity extends BaseActivity implements UserAvatar
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void startImageSelector(boolean isChooseAvatar) {
|
public void startImageSelector(boolean isChooseAvatar) {
|
||||||
isChooseVideo = false;
|
|
||||||
this.isChooseAvatar = isChooseAvatar;
|
|
||||||
mSelector.multi();
|
mSelector.multi();
|
||||||
mSelector.count(1);
|
mSelector.count(1);
|
||||||
mSelector.start(this, 200);
|
mSelector.start(this, 200);
|
||||||
@@ -157,11 +173,61 @@ public class UploadPhotoCoverActivity extends BaseActivity implements UserAvatar
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getUserImg(@Nullable @org.jetbrains.annotations.Nullable String path) {
|
public void getUserImg(@Nullable @org.jetbrains.annotations.Nullable String path) {
|
||||||
if (isChooseAvatar) {
|
this.avatarPath = path;
|
||||||
this.avatarPath = path;
|
avatarUrl = null;
|
||||||
avatarUrl = null;
|
sd_cover.setImageURI("file://" + this.avatarPath);
|
||||||
sd_cover.setImageURI("file://" + this.avatarPath);
|
submit_button.setEnabled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void finishActivity() {
|
||||||
|
Intent intent = new Intent();
|
||||||
|
intent.putExtra("cover", avatarPath);
|
||||||
|
intent.putExtra("upload_cover", avatarUrl);
|
||||||
|
setResult(202, intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
void uploadCover(String filepath) {
|
||||||
|
UploadFile uploadFile = new UploadFile(System.currentTimeMillis() + ".jpg", filepath);
|
||||||
|
UploadFile[] files = new UploadFile[]{uploadFile};
|
||||||
|
DynamicsManager.uploadImage(this, files, "album",
|
||||||
|
new HttpUiCallBack<List<UploadImageBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||||
|
avatarUrl = result.get(0).getUrl();
|
||||||
|
up_auth_saveCover(avatarUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
MaleToast.showMessage(activity, "图片上传失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveCover(String cover) {
|
||||||
|
SettingManager.up_auth_saveCover(this, cover, new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
finishActivity();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.xuebiping.bolizhuzi.view.settings;
|
package com.xuebiping.bolizhuzi.view.settings;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
|
import android.app.ProgressDialog;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
import android.hardware.Camera;
|
import android.hardware.Camera;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -11,11 +13,17 @@ import android.widget.RelativeLayout;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.fengliyan.http.httprequest.UploadFile;
|
||||||
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
import com.hjq.permissions.OnPermissionCallback;
|
import com.hjq.permissions.OnPermissionCallback;
|
||||||
import com.hjq.permissions.XXPermissions;
|
import com.hjq.permissions.XXPermissions;
|
||||||
import com.xuebiping.bolizhuzi.R;
|
import com.xuebiping.bolizhuzi.R;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.dynamics.manager.DynamicsManager;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
|
||||||
|
import com.xuebiping.bolizhuzi.model.dynamics.UploadImageBean;
|
||||||
import com.xuebiping.bolizhuzi.utils.PermissionUtil;
|
import com.xuebiping.bolizhuzi.utils.PermissionUtil;
|
||||||
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.CustomAlertDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.CustomAlertDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.main.dialog.PermissionDialog;
|
import com.xuebiping.bolizhuzi.view.main.dialog.PermissionDialog;
|
||||||
import com.xuebiping.bolizhuzi.view.settings.video.CameraPreview;
|
import com.xuebiping.bolizhuzi.view.settings.video.CameraPreview;
|
||||||
@@ -44,6 +52,12 @@ public class VideoRenzhengActivity extends BaseActivity implements CameraPreview
|
|||||||
private Camera camera;
|
private Camera camera;
|
||||||
private FrameLayout previewLayout;
|
private FrameLayout previewLayout;
|
||||||
private CameraPreview cameraPreview;
|
private CameraPreview cameraPreview;
|
||||||
|
private String video_code;
|
||||||
|
private String video_text;
|
||||||
|
private TextView tv_txt;
|
||||||
|
private TextView tv_tips;
|
||||||
|
private ProgressDialog progressDialog;
|
||||||
|
private String videoUrl;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -53,12 +67,18 @@ public class VideoRenzhengActivity extends BaseActivity implements CameraPreview
|
|||||||
|
|
||||||
setTitleName("视频认证");
|
setTitleName("视频认证");
|
||||||
|
|
||||||
|
Intent intent = getIntent();
|
||||||
|
video_code = intent.getStringExtra("video_code");
|
||||||
|
video_text = intent.getStringExtra("video_text");
|
||||||
|
|
||||||
initView();
|
initView();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initView() {
|
private void initView() {
|
||||||
tv_rz_code = findViewById(R.id.tv_rz_code);
|
tv_rz_code = findViewById(R.id.tv_rz_code);
|
||||||
|
tv_txt = findViewById(R.id.tv_txt);
|
||||||
|
tv_tips = findViewById(R.id.tv_tips);
|
||||||
tv_time = findViewById(R.id.tv_time);
|
tv_time = findViewById(R.id.tv_time);
|
||||||
rl_take_video = findViewById(R.id.rl_take_video);
|
rl_take_video = findViewById(R.id.rl_take_video);
|
||||||
rl_zanti_video = findViewById(R.id.rl_zanti_video);
|
rl_zanti_video = findViewById(R.id.rl_zanti_video);
|
||||||
@@ -70,12 +90,8 @@ public class VideoRenzhengActivity extends BaseActivity implements CameraPreview
|
|||||||
|
|
||||||
checkPermission();
|
checkPermission();
|
||||||
|
|
||||||
iv_fanz.setOnClickListener(new View.OnClickListener() {
|
// tv_rz_code.setText("我的认证验证码是:"+video_code);
|
||||||
@Override
|
tv_txt.setText(video_text);
|
||||||
public void onClick(View view) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
onViewClick();
|
onViewClick();
|
||||||
}
|
}
|
||||||
@@ -111,7 +127,8 @@ public class VideoRenzhengActivity extends BaseActivity implements CameraPreview
|
|||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
File outputFile = cameraPreview.getOutputFile(); //获取到录制输出文件
|
File outputFile = cameraPreview.getOutputFile(); //获取到录制输出文件
|
||||||
//TODO 提交视频
|
//提交视频
|
||||||
|
uploadVideo(outputFile);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -267,4 +284,70 @@ public class VideoRenzhengActivity extends BaseActivity implements CameraPreview
|
|||||||
cameraPreview.setRecordingTimerListener(null);
|
cameraPreview.setRecordingTimerListener(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void uploadVideo(File videoFile) {
|
||||||
|
progressDialog = ProgressDialog.show(this, "正在上传视频", "请稍后...");
|
||||||
|
UploadFile uploadFile = new UploadFile(System.currentTimeMillis() + ".mp4", videoFile);
|
||||||
|
UploadFile[] files = new UploadFile[]{uploadFile};
|
||||||
|
DynamicsManager.uploadImage(this, files, "cover_video",
|
||||||
|
new HttpUiCallBack<List<UploadImageBean>>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, List<UploadImageBean> result, String message) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
if (result.size() > 0) {
|
||||||
|
videoUrl = result.get(0).getUrl();
|
||||||
|
}
|
||||||
|
|
||||||
|
up_auth_saveVideoRz(video_code,video_text,videoUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, tip);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
progressDialog.dismiss();
|
||||||
|
MaleToast.showMessage(activity, "视频上传失败");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
Intent intent = new Intent();
|
||||||
|
intent.putExtra("videoUrl",videoUrl);
|
||||||
|
setResult(204,intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void finishActivity() {
|
||||||
|
Intent intent = new Intent();
|
||||||
|
intent.putExtra("videoUrl",videoUrl);
|
||||||
|
setResult(204,intent);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
void up_auth_saveVideoRz(String video_verify_code,String video_verify_text,
|
||||||
|
String video_verify_video){
|
||||||
|
SettingManager.up_auth_saveVideoRz(this, video_verify_code, video_verify_text, video_verify_video, new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
finishActivity();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
package com.xuebiping.bolizhuzi.view.settings;
|
||||||
|
|
||||||
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
import android.view.KeyEvent;
|
||||||
|
import android.view.View;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import com.fengliyan.uikit.dialog.BaseMessageDialog;
|
||||||
|
import com.fengliyan.uikit.toast.MaleToast;
|
||||||
|
import com.xuebiping.bolizhuzi.R;
|
||||||
|
import com.xuebiping.bolizhuzi.controller.settings.manager.SettingManager;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.BaseActivity;
|
||||||
|
import com.xuebiping.bolizhuzi.view.base.utils.HttpUiCallBack;
|
||||||
|
import com.xuebiping.bolizhuzi.view.settings.dialog.WQTipsDialog;
|
||||||
|
|
||||||
|
|
||||||
|
public class WxCodeActivity extends BaseActivity implements View.OnClickListener{
|
||||||
|
private EditText mNickNameEdit;
|
||||||
|
private Button mConfirmButton;
|
||||||
|
private String mName;
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle onSavedInstance){
|
||||||
|
super.onCreate(onSavedInstance);
|
||||||
|
setTitleName("添加微信");
|
||||||
|
setDefaultTitle();
|
||||||
|
setContentView(R.layout.activity_wx_code);
|
||||||
|
mName = getIntent().getStringExtra("wxCode");
|
||||||
|
initView();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView(){
|
||||||
|
mNickNameEdit = findViewById(R.id.nick_name_edit_input);
|
||||||
|
mConfirmButton = findViewById(R.id.nick_name_edit_button_confirm);
|
||||||
|
mNickNameEdit.setText(mName);
|
||||||
|
mConfirmButton.setOnClickListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View view) {
|
||||||
|
if(view == mConfirmButton){
|
||||||
|
if(TextUtils.isEmpty(mNickNameEdit.getText())){
|
||||||
|
MaleToast.showMessage(WxCodeActivity.this, "输入你的微信号");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Intent intent = new Intent();
|
||||||
|
intent.putExtra("wxCode", mNickNameEdit.getText().toString());
|
||||||
|
setResult(RESULT_OK, intent);
|
||||||
|
// MaleToast.showMessage(NickNameEditActivity.this, "修改成功");
|
||||||
|
finish();*/
|
||||||
|
|
||||||
|
up_auth_saveWxCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void finishActivity() {
|
||||||
|
// super.finishActivity();
|
||||||
|
if(TextUtils.isEmpty(mNickNameEdit.getText())){
|
||||||
|
MaleToast.showMessage(WxCodeActivity.this, "输入你的微信号");
|
||||||
|
}else {
|
||||||
|
if (mName.equals(mNickNameEdit.getText().toString())) { //相等
|
||||||
|
finish();
|
||||||
|
}else {
|
||||||
|
saveDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
|
if(keyCode ==KeyEvent.KEYCODE_BACK){
|
||||||
|
|
||||||
|
if(TextUtils.isEmpty(mNickNameEdit.getText())){
|
||||||
|
MaleToast.showMessage(WxCodeActivity.this, "输入你的微信号");
|
||||||
|
}else {
|
||||||
|
if (mName.equals(mNickNameEdit.getText().toString())) { //相等
|
||||||
|
finish();
|
||||||
|
}else {
|
||||||
|
saveDialog();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
return super.onKeyDown(keyCode, event);
|
||||||
|
}
|
||||||
|
|
||||||
|
private BaseMessageDialog saveDialog;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除
|
||||||
|
*/
|
||||||
|
public void saveDialog() {
|
||||||
|
saveDialog = new BaseMessageDialog.Builder(this).setMessage("是否保存?")
|
||||||
|
.setCancelable(true)
|
||||||
|
.setPositiveButtonListener(new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
|
up_auth_saveWxCode();
|
||||||
|
}
|
||||||
|
}).setNegative("取消").setNegativeButtonListener(new DialogInterface.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
|
saveDialog.dismiss();
|
||||||
|
finish();
|
||||||
|
|
||||||
|
}
|
||||||
|
}).build();
|
||||||
|
|
||||||
|
saveDialog.show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void up_auth_saveWxCode(){
|
||||||
|
SettingManager.up_auth_saveWxCode(this, mNickNameEdit.getText().toString().trim(), new HttpUiCallBack<Object>() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(BaseActivity activity, Object result, String tips) {
|
||||||
|
Intent intent = new Intent();
|
||||||
|
intent.putExtra("wxCode", mNickNameEdit.getText().toString());
|
||||||
|
setResult(205, intent);
|
||||||
|
if(saveDialog != null) {
|
||||||
|
saveDialog.dismiss();
|
||||||
|
}
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(BaseActivity activity, String tip) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onException(BaseActivity activity, Throwable e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
app/src/main/res/drawable-xhdpi/ic_zg_invite_bg.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_zg_invite_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
6
app/src/main/res/drawable/bg_e9403d.xml
Normal file
6
app/src/main/res/drawable/bg_e9403d.xml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#1AE9403D"/>
|
||||||
|
<stroke android:color="@color/white" android:width="@dimen/dp1"/>
|
||||||
|
<corners android:radius="@dimen/dp8"/>
|
||||||
|
</shape>
|
||||||
13
app/src/main/res/drawable/bg_invite.xml
Normal file
13
app/src/main/res/drawable/bg_invite.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="@dimen/dp8"/>
|
||||||
|
<gradient android:startColor="#FCF3EA"
|
||||||
|
android:endColor="#FDF7FB"
|
||||||
|
android:angle="270"
|
||||||
|
/>
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="#FFFFFF" />
|
||||||
|
|
||||||
|
</shape>
|
||||||
13
app/src/main/res/drawable/bg_invite_share.xml
Normal file
13
app/src/main/res/drawable/bg_invite_share.xml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:shape="rectangle">
|
||||||
|
<corners android:radius="@dimen/dp50"/>
|
||||||
|
<gradient android:startColor="#F1A364"
|
||||||
|
android:endColor="#E9413C"
|
||||||
|
android:angle="0"
|
||||||
|
/>
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="#FFFFFF" />
|
||||||
|
|
||||||
|
</shape>
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:scrollbars="none"
|
||||||
android:fillViewport="true">
|
android:fillViewport="true">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
@@ -55,11 +56,63 @@
|
|||||||
android:src="@mipmap/invitaion_bg" />
|
android:src="@mipmap/invitaion_bg" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
|
android:id="@+id/iv_title_img"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="@dimen/dp45"
|
android:layout_marginTop="@dimen/dp45"
|
||||||
android:src="@mipmap/ic_invite_01"/>
|
android:src="@mipmap/ic_invite_01" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_zg"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/dp14"
|
||||||
|
android:layout_below="@+id/iv_title_img"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:background="@drawable/ic_zg_invite_bg"
|
||||||
|
android:textStyle="bold"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_my_fc_title"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/dp14"
|
||||||
|
android:layout_below="@+id/tv_zg"
|
||||||
|
android:layout_marginTop="@dimen/dp35"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:textColor="#9A6222"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="我的分成比例"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_my_fc_bl_tt"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/dp14"
|
||||||
|
android:layout_below="@+id/tv_my_fc_title"
|
||||||
|
android:layout_marginTop="@dimen/dp40"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:textColor="#E95340"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="永久分成"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_my_fc_bl"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="@dimen/dp45"
|
||||||
|
android:layout_below="@+id/tv_my_fc_bl_tt"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:textColor="#E95340"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="0%"/>
|
||||||
|
|
||||||
<com.flyco.roundview.RoundTextView
|
<com.flyco.roundview.RoundTextView
|
||||||
android:id="@+id/ruleBtn"
|
android:id="@+id/ruleBtn"
|
||||||
@@ -72,24 +125,26 @@
|
|||||||
android:paddingEnd="6dp"
|
android:paddingEnd="6dp"
|
||||||
android:paddingBottom="4dp"
|
android:paddingBottom="4dp"
|
||||||
android:text="规则详情"
|
android:text="规则详情"
|
||||||
|
android:visibility="gone"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14dp"
|
android:textSize="14dp"
|
||||||
app:rv_backgroundColor="#7A69FE"
|
app:rv_backgroundColor="#7A69FE"
|
||||||
app:rv_cornerRadius_BL="36dp"
|
app:rv_cornerRadius_BL="36dp"
|
||||||
app:rv_cornerRadius_TL="36dp" />
|
app:rv_cornerRadius_TL="36dp" />
|
||||||
|
|
||||||
<com.flyco.roundview.RoundLinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/container"
|
android:id="@+id/container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/bgImageView"
|
android:layout_below="@+id/tv_tip"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
|
android:visibility="visible"
|
||||||
|
android:layout_marginTop="@dimen/dp10"
|
||||||
|
android:background="@drawable/bg_invite"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp">
|
||||||
app:rv_backgroundColor="#FCF3EA"
|
|
||||||
app:rv_cornerRadius="12dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/lin_label"
|
android:id="@+id/lin_label"
|
||||||
@@ -310,13 +365,13 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_marginTop="20dp"
|
||||||
android:layout_marginBottom="32dp"
|
android:layout_marginBottom="25dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<com.flyco.roundview.RoundTextView
|
<TextView
|
||||||
android:id="@+id/shareLinkBtn"
|
android:id="@+id/shareLinkBtn"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="38dp"
|
android:layout_height="45dp"
|
||||||
android:layout_marginEnd="5dp"
|
android:layout_marginEnd="5dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
@@ -324,13 +379,12 @@
|
|||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="16dp"
|
android:textSize="16dp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:rv_backgroundColor="#FE3846"
|
android:background="@drawable/bg_invite_share" />
|
||||||
app:rv_cornerRadius="36dp" />
|
|
||||||
|
|
||||||
<com.flyco.roundview.RoundTextView
|
<TextView
|
||||||
android:id="@+id/sharePosterBtn"
|
android:id="@+id/sharePosterBtn"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="38dp"
|
android:layout_height="45dp"
|
||||||
android:layout_marginStart="5dp"
|
android:layout_marginStart="5dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
@@ -338,15 +392,13 @@
|
|||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="16dp"
|
android:textSize="16dp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:rv_backgroundColor="#FE3846"
|
android:background="@drawable/bg_invite_share" />
|
||||||
app:rv_cornerRadius="36dp" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.flyco.roundview.RoundLinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@+id/bgImageView"
|
|
||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginTop="-34dp"
|
android:layout_marginTop="-34dp"
|
||||||
android:src="@mipmap/icon_invitation_tip"
|
android:src="@mipmap/icon_invitation_tip"
|
||||||
@@ -359,6 +411,7 @@
|
|||||||
android:layout_below="@+id/container"
|
android:layout_below="@+id/container"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
|
android:visibility="gone"
|
||||||
android:layout_marginRight="16dp">
|
android:layout_marginRight="16dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -380,22 +433,21 @@
|
|||||||
android:textSize="12dp" />
|
android:textSize="12dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<com.flyco.roundview.RoundRelativeLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/ll_mine_invite"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="120dp"
|
android:layout_height="@dimen/dp130"
|
||||||
android:layout_below="@+id/ruleContainer"
|
android:layout_below="@+id/bgImageView"
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:layout_marginBottom="10dp"
|
android:orientation="vertical"
|
||||||
app:rv_backgroundColor="#FCF3EA"
|
android:background="@drawable/bg_invite">
|
||||||
app:rv_cornerRadius="12dp">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:text="我的收益"
|
android:text="我的邀请"
|
||||||
android:textColor="@color/one_text"
|
android:textColor="@color/one_text"
|
||||||
android:textSize="14dp"
|
android:textSize="14dp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
@@ -408,14 +460,15 @@
|
|||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:drawableRight="@mipmap/indicator_right"
|
android:drawableRight="@mipmap/indicator_right"
|
||||||
android:text="我邀请的人"
|
android:text="我邀请的人"
|
||||||
|
android:visibility="gone"
|
||||||
android:textColor="#ffc3342b"
|
android:textColor="#ffc3342b"
|
||||||
android:textSize="12dp" />
|
android:textSize="12dp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_marginTop="40dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
|
android:gravity="center"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -430,8 +483,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="0"
|
android:text="0"
|
||||||
android:textColor="@color/one_text"
|
android:textColor="#E95340"
|
||||||
android:textSize="24dp"
|
android:textSize="30dp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -443,19 +496,25 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="累计邀请"
|
android:text="共邀请用户"
|
||||||
android:textColor="@color/one_text"
|
android:textColor="#E95340"
|
||||||
android:textSize="12dp" />
|
android:textSize="12dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text=" (人)"
|
android:text=" (人)"
|
||||||
|
android:visibility="gone"
|
||||||
android:textColor="#C3342B"
|
android:textColor="#C3342B"
|
||||||
android:textSize="12dp" />
|
android:textSize="12dp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0.5dp"
|
||||||
|
android:layout_height="@dimen/dp55"
|
||||||
|
android:background="#E95340"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@@ -468,8 +527,8 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="0"
|
android:text="0"
|
||||||
android:textColor="@color/one_text"
|
android:textColor="#E95340"
|
||||||
android:textSize="24dp"
|
android:textSize="30dp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@@ -481,8 +540,8 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="累计充值"
|
android:text="邀请分红"
|
||||||
android:textColor="@color/one_text"
|
android:textColor="#E95340"
|
||||||
android:textSize="12dp" />
|
android:textSize="12dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -499,6 +558,7 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:visibility="gone"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -532,7 +592,70 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</com.flyco.roundview.RoundRelativeLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/rule_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/ll_mine_invite"
|
||||||
|
android:layout_marginLeft="16dp"
|
||||||
|
android:layout_marginRight="16dp"
|
||||||
|
android:layout_marginTop="@dimen/dp10"
|
||||||
|
android:background="@drawable/bg_invite"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:text="邀请规则"
|
||||||
|
android:textColor="@color/one_text"
|
||||||
|
android:textSize="14dp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp46"
|
||||||
|
android:layout_below="@+id/rule_layout"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="@dimen/dp13"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginTop="@dimen/dp20"
|
||||||
|
android:background="@drawable/bg_e9403d"
|
||||||
|
android:text="邀请用户时请确保用户从分享链接或图片下载APP"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_tip"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_below="@+id/rule_layout"
|
||||||
|
android:textColor="#E95340"
|
||||||
|
android:textSize="@dimen/dp13"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginTop="@dimen/dp20"
|
||||||
|
android:text="最终解释权归平台所有"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_share_btn"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp50"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:text="立即邀请"
|
||||||
|
android:textSize="@dimen/dp20"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_marginBottom="@dimen/dp20"
|
||||||
|
android:layout_marginTop="@dimen/dp25"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_below="@+id/tv_tip"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp20"
|
||||||
|
android:background="@drawable/bg_invite_share"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@@ -355,7 +355,7 @@
|
|||||||
android:layout_toLeftOf="@+id/iv_card_right"
|
android:layout_toLeftOf="@+id/iv_card_right"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="未填写"
|
android:hint="未填写"
|
||||||
android:textColor="#666666"
|
android:textColor="#666666"
|
||||||
android:textSize="@dimen/dp14" />
|
android:textSize="@dimen/dp14" />
|
||||||
|
|
||||||
@@ -426,7 +426,7 @@
|
|||||||
android:layout_toLeftOf="@+id/iv_video_rz_right"
|
android:layout_toLeftOf="@+id/iv_video_rz_right"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="未填写"
|
android:hint="未填写"
|
||||||
android:textColor="#666666"
|
android:textColor="#666666"
|
||||||
android:textSize="@dimen/dp14" />
|
android:textSize="@dimen/dp14" />
|
||||||
|
|
||||||
@@ -472,7 +472,7 @@
|
|||||||
android:layout_toLeftOf="@+id/iv_birthday_right"
|
android:layout_toLeftOf="@+id/iv_birthday_right"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="未填写"
|
android:hint="未填写"
|
||||||
android:textColor="#666666"
|
android:textColor="#666666"
|
||||||
android:textSize="@dimen/dp14" />
|
android:textSize="@dimen/dp14" />
|
||||||
|
|
||||||
@@ -518,7 +518,7 @@
|
|||||||
android:layout_toLeftOf="@+id/iv_wxcode_right"
|
android:layout_toLeftOf="@+id/iv_wxcode_right"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="未填写"
|
android:hint="未填写"
|
||||||
android:textColor="#666666"
|
android:textColor="#666666"
|
||||||
android:textSize="@dimen/dp14" />
|
android:textSize="@dimen/dp14" />
|
||||||
|
|
||||||
@@ -564,7 +564,7 @@
|
|||||||
android:layout_toLeftOf="@+id/iv_sanwei_right"
|
android:layout_toLeftOf="@+id/iv_sanwei_right"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="未填写"
|
android:hint="未填写"
|
||||||
android:textColor="#666666"
|
android:textColor="#666666"
|
||||||
android:textSize="@dimen/dp14" />
|
android:textSize="@dimen/dp14" />
|
||||||
|
|
||||||
@@ -741,7 +741,7 @@
|
|||||||
android:layout_toLeftOf="@+id/iv_height_right"
|
android:layout_toLeftOf="@+id/iv_height_right"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="未填写"
|
android:hint="未填写"
|
||||||
android:textColor="#666666"
|
android:textColor="#666666"
|
||||||
android:textSize="@dimen/dp14" />
|
android:textSize="@dimen/dp14" />
|
||||||
|
|
||||||
@@ -787,7 +787,7 @@
|
|||||||
android:layout_toLeftOf="@+id/iv_tiz_right"
|
android:layout_toLeftOf="@+id/iv_tiz_right"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="未填写"
|
android:hint="未填写"
|
||||||
android:textColor="#666666"
|
android:textColor="#666666"
|
||||||
android:textSize="@dimen/dp14" />
|
android:textSize="@dimen/dp14" />
|
||||||
|
|
||||||
@@ -833,7 +833,7 @@
|
|||||||
android:layout_toLeftOf="@+id/iv_xz_right"
|
android:layout_toLeftOf="@+id/iv_xz_right"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="未填写"
|
android:hint="未填写"
|
||||||
android:textColor="#666666"
|
android:textColor="#666666"
|
||||||
android:textSize="@dimen/dp14" />
|
android:textSize="@dimen/dp14" />
|
||||||
|
|
||||||
@@ -879,7 +879,7 @@
|
|||||||
android:layout_toLeftOf="@+id/iv_city_right"
|
android:layout_toLeftOf="@+id/iv_city_right"
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:text="未填写"
|
android:hint="未填写"
|
||||||
android:textColor="#666666"
|
android:textColor="#666666"
|
||||||
android:textSize="@dimen/dp14" />
|
android:textSize="@dimen/dp14" />
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
android:text="请按照要求进行视频认证:请你本人正脸上半身入镜宣读下面文本内容"/>
|
android:text="请按照要求进行视频认证:请你本人正脸上半身入镜宣读下面文本内容"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_tips"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="其中:xxx替换为您的真实姓名"
|
android:text="其中:xxx替换为您的真实姓名"
|
||||||
@@ -36,6 +37,7 @@
|
|||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_txt"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/dp10"
|
android:layout_margin="@dimen/dp10"
|
||||||
@@ -50,7 +52,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="@dimen/dp10"
|
android:layout_margin="@dimen/dp10"
|
||||||
android:text="我的认证验证码是:6907"
|
android:text=""
|
||||||
android:layout_marginHorizontal="@dimen/dp15"
|
android:layout_marginHorizontal="@dimen/dp15"
|
||||||
android:layout_marginTop="@dimen/dp5"
|
android:layout_marginTop="@dimen/dp5"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
|
|||||||
38
app/src/main/res/layout/activity_wx_code.xml
Normal file
38
app/src/main/res/layout/activity_wx_code.xml
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical" android:layout_width="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
tools:viewBindingIgnore="true"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/white">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="54dp"
|
||||||
|
android:layout_marginTop="@dimen/dp20"
|
||||||
|
android:background="@drawable/shape_f9fafc_bg_r14"
|
||||||
|
android:layout_marginHorizontal="@dimen/dp20">
|
||||||
|
<EditText
|
||||||
|
android:maxLength="10"
|
||||||
|
android:id="@+id/nick_name_edit_input"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="54dp"
|
||||||
|
android:background="@null"
|
||||||
|
android:hint="输入你的微信号"
|
||||||
|
android:text=""
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@android:color/black"
|
||||||
|
android:layout_marginLeft="16dp"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/nick_name_edit_button_confirm"
|
||||||
|
android:layout_width="295dp"
|
||||||
|
android:layout_height="48dp"
|
||||||
|
android:layout_marginTop="80dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:text="保存"
|
||||||
|
android:textSize="17sp"
|
||||||
|
android:enabled="true"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
@@ -17,7 +17,7 @@ import java.util.List;
|
|||||||
|
|
||||||
public class GiftRecycleAdapter extends RecyclerView.Adapter {
|
public class GiftRecycleAdapter extends RecyclerView.Adapter {
|
||||||
// public final static String IMAGE_URL = "http://xqasset.whnuanbeinikj.cn/";
|
// public final static String IMAGE_URL = "http://xqasset.whnuanbeinikj.cn/";
|
||||||
public final static String IMAGE_URL = "http://xqasset.whnuanbeinikj.cn/";
|
public final static String IMAGE_URL = "http://qianyan-asset.oss-cn-shanghai.aliyuncs.com/";
|
||||||
private List<DialogGiftBean> mGiftBeanList = new ArrayList<>();
|
private List<DialogGiftBean> mGiftBeanList = new ArrayList<>();
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private OnGiftClickListener mListener;
|
private OnGiftClickListener mListener;
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
android:textSize="13sp" />
|
android:textSize="13sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/share_weixin"
|
android:id="@+id/share_weixin"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|||||||
Reference in New Issue
Block a user