diff --git a/OneToOne/src/main/AndroidManifest.xml b/OneToOne/src/main/AndroidManifest.xml
index d14487836..79a59b54d 100644
--- a/OneToOne/src/main/AndroidManifest.xml
+++ b/OneToOne/src/main/AndroidManifest.xml
@@ -90,6 +90,7 @@
android:label="@string/app_name"
android:largeHeap="true"
android:preserveLegacyExternalStorage="true"
+ android:enableOnBackInvokedCallback="true"
android:requestLegacyExternalStorage="true"
android:supportsRtl="true"
android:theme="@style/AppTheme"
@@ -199,6 +200,11 @@
android:label="达人认证"
android:windowSoftInputMode="stateHidden|adjustResize" />
+
+
imageBeanList = new ArrayList<>();
+
+ private int selectIndex;
+
+ private String personImgUrl;
+
+ private LinearLayout sexLayoutMan;
+
+ private LinearLayout sexLayoutWoman;
+
+ private ImageView sexImgMan;
+ private ImageView sexImgWoman;
+
+ private int sex = 1;
+
+ private EditText editUserName;
+ private EditText editUserMobile;
+ private EditText editCardId;
+
@Override
protected int getLayoutId() {
return R.layout.activity_auth_blogger;
@@ -46,7 +86,17 @@ public class AuthBloggerActivity extends AbsActivity {
@Override
protected void main() {
- setTitle(mContext.getString(R.string.edit_profile));
+ setTitle("上傳入駐資料");
+ sexLayoutMan = findViewById(R.id.sex_man);
+ sexLayoutWoman = findViewById(R.id.sex_woman);
+ sexImgMan = findViewById(R.id.sex_img_man);
+ sexImgWoman = findViewById(R.id.sex_img_woman);
+
+ editUserName = findViewById(R.id.name);
+ editUserMobile = findViewById(R.id.mobile);
+ editCardId = findViewById(R.id.cardId);
+
+ personImg = findViewById(R.id.personImg);
submit = findViewById(R.id.submit);
submit.setOnClickListener(new View.OnClickListener() {
@Override
@@ -56,8 +106,70 @@ public class AuthBloggerActivity extends AbsActivity {
});
initCamera();
dialog = DialogUitl.loadingDialog(mContext, "上传中");
+
+ mRecyclerViewImage = findViewById(R.id.recyclerView_image);
+ mRecyclerViewImage.setLayoutManager(new GridLayoutManager(mContext, 3, GridLayoutManager.VERTICAL, false));
+ ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 15, 15);
+ decoration.setOnlySetItemOffsetsButNoDraw(true);
+ mRecyclerViewImage.addItemDecoration(decoration);
+
+ imageBeanList = new ArrayList<>();
+ for (int i = 0; i < 9; i++) {
+ imageBeanList.add(new ImageBean(i));
+ }
+
+ adapter = new ActiveAdapter(AuthBloggerActivity.this);
+ mRecyclerViewImage.setAdapter(adapter);
+ adapter.setList(imageBeanList);
+
+ personImg.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ selectIndex = -1;
+ setImage();
+ }
+ });
+
+ sexLayoutMan.setOnClickListener(new View.OnClickListener() {
+ @SuppressLint("UseCompatLoadingForDrawables")
+ @Override
+ public void onClick(View v) {
+ sex = 1;
+ sexImgMan.setImageDrawable(getResources().getDrawable(R.mipmap.sex_radio_2));
+ sexImgWoman.setImageDrawable(getResources().getDrawable(R.mipmap.sex_radio_1));
+ }
+ });
+ sexLayoutWoman.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ sex = 2;
+ sexImgMan.setImageDrawable(getResources().getDrawable(R.mipmap.sex_radio_1));
+ sexImgWoman.setImageDrawable(getResources().getDrawable(R.mipmap.sex_radio_2));
+ }
+ });
+
+ editCardId.addTextChangedListener(textWatcher);
+ editUserName.addTextChangedListener(textWatcher);
+ editUserMobile.addTextChangedListener(textWatcher);
}
+ TextWatcher textWatcher = new TextWatcher() {
+ @Override
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+ }
+
+ @Override
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
+ checkSubmit();
+ }
+
+ @Override
+ public void afterTextChanged(Editable s) {
+
+ }
+ };
+
private void initCamera() {
cameraUtil = new ProcessImageUtil(this, "com.shayu.onetoone.fileprovider");
cameraUtil.setImageResultCallback(new ImageResultCallback() {
@@ -76,12 +188,23 @@ public class AuthBloggerActivity extends AbsActivity {
OTONetManager.getInstance(mContext).updateFile(file, new HttpCallback() {
@Override
public void onSuccess(AvatarBean data) {
+ if (selectIndex == -1) {
+ personImgUrl = data.getAvatar();
+ ImgLoader.display(mContext, personImgUrl, personImg);
+ findViewById(R.id.image11).setVisibility(View.GONE);
+ checkSubmit();
+ } else {
+ imageBeanList.get(selectIndex).setFile(file);
+ imageBeanList.get(selectIndex).setUrl(data.getAvatar());
+ adapter.notifyItemChanged(selectIndex);
+ }
dialog.hide();
}
@Override
public void onError(String error) {
dialog.hide();
+ ToastUtil.show(error);
}
});
}
@@ -94,18 +217,53 @@ public class AuthBloggerActivity extends AbsActivity {
});
}
- boolean isFront = true;
+ @SuppressLint("UseCompatLoadingForDrawables")
+ public void checkSubmit() {
+ if (CheckInput()) {
+ submit.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_2));
+ submit.setEnabled(true);
+ } else {
+ submit.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_1));
+ submit.setEnabled(false);
+ }
+ }
+
+
+ private boolean CheckInput() {
+ if (StringUtils.isEmpty(editUserName.getText().toString())) {
+ return false;
+ }
+ if (StringUtils.isEmpty(editUserMobile.getText().toString())) {
+ return false;
+ }
+ if (StringUtils.isEmpty(editCardId.getText().toString())) {
+ return false;
+ }
+ if (StringUtils.isEmpty(personImgUrl)) {
+ return false;
+ }
+ return true;
+ }
private void submit() {
- /*OTONetManager.getInstance(AuthBloggerActivity.this).setAuthInfo(imgUrl1, imgUrl2, new HttpCallback() {
+ StringBuffer imgs = new StringBuffer();
+ for (int i = 0; i < imageBeanList.size(); i++) {
+ if (!StringUtils.isEmpty(imageBeanList.get(i).getUrl())) {
+ if (imgs.length() == 0) {
+ imgs.append(imageBeanList.get(i).getUrl());
+ } else {
+ imgs.append("," + imageBeanList.get(i).getUrl());
+ }
+ }
+ }
+
+ OTONetManager.getInstance(AuthBloggerActivity.this).authSage(editUserName.getText().toString(), editUserMobile.getText().toString(), editCardId.getText().toString(), personImgUrl, imgs.toString(), sex, new HttpCallback() {
@Override
public void onSuccess(HttpCallbackModel data) {
if (data.getCode() == 0) {
ToastUtil.show("已發起審核,請耐心等待審核結果");
submit.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_1));
submit.setText("審核中,請耐心等待");
- imgUrl1 = null;
- imgUrl2 = null;
} else {
ToastUtil.show(data.getMsg());
}
@@ -115,7 +273,7 @@ public class AuthBloggerActivity extends AbsActivity {
public void onError(String error) {
}
- });*/
+ });
}
public void setImage() {
@@ -138,8 +296,6 @@ public class AuthBloggerActivity extends AbsActivity {
if (cameraUtil != null) {
cameraUtil.release();
}
- //MainHttpUtil.cancel(MainHttpConsts.UPDATE_AVATAR);
- //MainHttpUtil.cancel(MainHttpConsts.UPDATE_FIELDS);
super.onDestroy();
}
@@ -172,5 +328,50 @@ public class AuthBloggerActivity extends AbsActivity {
}
}
+ public class ActiveAdapter extends RefreshAdapter {
+ public ActiveAdapter(Context context) {
+ super(context);
+ }
+
+ @NonNull
+ @Override
+ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ return new Vh(mInflater.inflate(R.layout.item_auth_img, parent, false));
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position) {
+ ((Vh) vh).setData(mList.get(position));
+ }
+
+ class Vh extends RecyclerView.ViewHolder {
+
+ ImageView img1;
+ ImageView img11;
+
+ public Vh(View itemView) {
+ super(itemView);
+ img1 = itemView.findViewById(R.id.image1);
+ img11 = itemView.findViewById(R.id.image11);
+
+ itemView.setOnClickListener(v -> {
+ ImageBean imageBean = (ImageBean) itemView.getTag();
+ selectIndex = imageBean.getIndex();
+ setImage();
+ });
+ }
+
+ void setData(ImageBean bean) {
+ itemView.setTag(bean);
+ if (bean.getFile() == null) {
+ img11.setVisibility(View.VISIBLE);
+ } else {
+ img11.setVisibility(View.INVISIBLE);
+ img1.setVisibility(View.VISIBLE);
+ ImgLoader.display(mContext, bean.getFile(), img1);
+ }
+ }
+ }
+ }
}
diff --git a/OneToOne/src/main/java/com/shayu/onetoone/activity/user/AuthBloggerInletActivity.java b/OneToOne/src/main/java/com/shayu/onetoone/activity/user/AuthBloggerInletActivity.java
new file mode 100644
index 000000000..a7676e220
--- /dev/null
+++ b/OneToOne/src/main/java/com/shayu/onetoone/activity/user/AuthBloggerInletActivity.java
@@ -0,0 +1,173 @@
+package com.shayu.onetoone.activity.user;
+
+import android.annotation.SuppressLint;
+import android.app.Dialog;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.alibaba.android.arouter.facade.annotation.Route;
+import com.shayu.onetoone.R;
+import com.shayu.onetoone.bean.AuthBean;
+import com.shayu.onetoone.bean.AuthBloggerBean;
+import com.shayu.onetoone.manager.OTONetManager;
+import com.shayu.onetoone.manager.RouteManager;
+import com.yunbao.common.Constants;
+import com.yunbao.common.activity.AbsActivity;
+import com.yunbao.common.http.base.HttpCallback;
+import com.yunbao.common.utils.Bus;
+import com.yunbao.common.utils.DialogUitl;
+
+/**
+ * 達人認證入口
+ */
+@Route(path = RouteManager.ACTIVITY_AUTH_BLOGGER_INLET)
+public class AuthBloggerInletActivity extends AbsActivity {
+
+ private LinearLayout personLayout;
+ private LinearLayout sageLayout;
+ private ImageView personImg;
+ private ImageView sageImg;
+
+ private TextView perStatus;
+ private TextView sageStatus;
+
+ @Override
+ protected int getLayoutId() {
+ return R.layout.activity_auth_blogger_inlet;
+ }
+
+ @Override
+ protected void main() {
+ setTitle("達人認證");
+ personLayout = findViewById(R.id.personLayout);
+ sageLayout = findViewById(R.id.sageLayout);
+
+ personImg = findViewById(R.id.personStatus);
+ sageImg = findViewById(R.id.sageStatus);
+
+ perStatus = findViewById(R.id.personBt);
+ sageStatus = findViewById(R.id.sageBt);
+
+ dialog = DialogUitl.loadingDialog(mContext, "查询中");
+
+ getAuthInfo();
+ }
+
+ AuthBean authBean;
+
+ AuthBloggerBean authBloggerBean;
+
+ Dialog dialog;
+
+ private void getAuthInfo() {
+ dialog.show();
+ OTONetManager.getInstance(AuthBloggerInletActivity.this).getAuthInfo(new HttpCallback() {
+ @SuppressLint("UseCompatLoadingForDrawables")
+ @Override
+ public void onSuccess(AuthBean data) {
+ authBean = data;
+ if (data.getName_auth() == 2) {//已通过
+ personLayout.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_4));
+ personImg.setImageDrawable(getResources().getDrawable(R.mipmap.icon_suc));
+ perStatus.setText("已完成");
+ perStatus.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_3));
+ } else if (data.getName_auth() == 3) {//已提交
+ personLayout.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_1));
+ personImg.setImageDrawable(getResources().getDrawable(R.mipmap.icon_fail));
+ perStatus.setText("審核中,請耐心等待");
+ perStatus.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_3));
+ } else if (data.getName_auth() == 4) {
+ personLayout.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_1));
+ personImg.setImageDrawable(getResources().getDrawable(R.mipmap.icon_fail));
+ perStatus.setText("審核失敗,去提交");
+ perStatus.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_5));
+ findViewById(R.id.personBt).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ RouteManager.forwaradAuthActivity();
+ }
+ });
+ } else {
+ personLayout.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_1));
+ personImg.setImageDrawable(getResources().getDrawable(R.mipmap.icon_suc));
+ perStatus.setText("去上傳");
+ perStatus.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_5));
+ findViewById(R.id.personBt).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ RouteManager.forwaradAuthActivity();
+ }
+ });
+ }
+
+ OTONetManager.getInstance(AuthBloggerInletActivity.this).getAuthBloggerInfo(new HttpCallback() {
+ @SuppressLint("UseCompatLoadingForDrawables")
+ @Override
+ public void onSuccess(AuthBloggerBean data) {
+ authBloggerBean = data;
+ if (data.getStatus() == 2) {//已通过
+ sageLayout.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_3));
+ sageImg.setImageDrawable(getResources().getDrawable(R.mipmap.icon_suc));
+ sageStatus.setText("已完成");
+ sageStatus.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_3));
+ } else if (data.getStatus() == 3) {//已提交
+ sageLayout.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_1));
+ sageImg.setImageDrawable(getResources().getDrawable(R.mipmap.icon_fail));
+ sageStatus.setText("審核中,請耐心等待");
+ sageStatus.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_3));
+ } else if (data.getStatus() == 4) {
+ sageLayout.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_1));
+ sageImg.setImageDrawable(getResources().getDrawable(R.mipmap.icon_fail));
+ sageStatus.setText("審核失敗,去提交");
+ sageStatus.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_5));
+ findViewById(R.id.sageBt).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ RouteManager.forwardAuthBloggerActivity();
+ }
+ });
+ } else {
+ sageLayout.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_1));
+ sageImg.setImageDrawable(getResources().getDrawable(R.mipmap.icon_fail));
+ sageStatus.setText("去上傳");
+ sageStatus.setBackground(getResources().getDrawable(R.drawable.bg_auth_submit_5));
+ findViewById(R.id.sageBt).setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ RouteManager.forwardAuthBloggerActivity();
+ }
+ });
+ }
+ dialog.hide();
+ }
+
+ @Override
+ public void onError(String error) {
+ dialog.hide();
+ }
+ });
+ }
+
+ @Override
+ public void onError(String error) {
+ dialog.hide();
+ }
+ });
+ }
+
+ @Override
+ protected void onDestroy() {
+ Bus.getOff(this);
+ super.onDestroy();
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ if (Constants.isShowPage != -1) {
+ finish();
+ }
+ }
+}
diff --git a/OneToOne/src/main/java/com/shayu/onetoone/bean/AuthBloggerBean.java b/OneToOne/src/main/java/com/shayu/onetoone/bean/AuthBloggerBean.java
new file mode 100644
index 000000000..246f34ad1
--- /dev/null
+++ b/OneToOne/src/main/java/com/shayu/onetoone/bean/AuthBloggerBean.java
@@ -0,0 +1,72 @@
+package com.shayu.onetoone.bean;
+
+import com.yunbao.common.bean.BaseModel;
+
+public class AuthBloggerBean extends BaseModel {
+ private String mobile;
+ private String card_img;
+ private String remark;
+ private String name;
+ private String card_no;
+ private int sex;
+ private int status; //审核状态 1未提交 2通过 3已提交 4驳回
+
+ public AuthBloggerBean() {
+ }
+
+ public String getMobile() {
+ return mobile;
+ }
+
+ public void setMobile(String mobile) {
+ this.mobile = mobile;
+ }
+
+ public String getCard_img() {
+ return card_img;
+ }
+
+ public void setCard_img(String card_img) {
+ this.card_img = card_img;
+ }
+
+ public String getRemark() {
+ return remark;
+ }
+
+ public void setRemark(String remark) {
+ this.remark = remark;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getCard_no() {
+ return card_no;
+ }
+
+ public void setCard_no(String card_no) {
+ this.card_no = card_no;
+ }
+
+ public int getSex() {
+ return sex;
+ }
+
+ public void setSex(int sex) {
+ this.sex = sex;
+ }
+
+ public int getStatus() {
+ return status;
+ }
+
+ public void setStatus(int status) {
+ this.status = status;
+ }
+}
diff --git a/OneToOne/src/main/java/com/shayu/onetoone/bean/ImageBean.java b/OneToOne/src/main/java/com/shayu/onetoone/bean/ImageBean.java
new file mode 100644
index 000000000..e30ee8456
--- /dev/null
+++ b/OneToOne/src/main/java/com/shayu/onetoone/bean/ImageBean.java
@@ -0,0 +1,57 @@
+package com.shayu.onetoone.bean;
+
+import java.io.File;
+
+public class ImageBean {
+ private String path;
+ private File file;
+ private String url;
+
+ private int index;
+
+ public ImageBean() {
+ }
+
+ public ImageBean(int index) {
+ this.index = index;
+ }
+
+ public ImageBean(String path, File file, String url) {
+ this.path = path;
+ this.file = file;
+ this.url = url;
+ }
+
+
+ public int getIndex() {
+ return index;
+ }
+
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public File getFile() {
+ return file;
+ }
+
+ public void setFile(File file) {
+ this.file = file;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+}
diff --git a/OneToOne/src/main/java/com/shayu/onetoone/manager/OTONetManager.java b/OneToOne/src/main/java/com/shayu/onetoone/manager/OTONetManager.java
index 6385a2a80..1af8fa3ee 100644
--- a/OneToOne/src/main/java/com/shayu/onetoone/manager/OTONetManager.java
+++ b/OneToOne/src/main/java/com/shayu/onetoone/manager/OTONetManager.java
@@ -6,6 +6,7 @@ import android.util.Log;
import com.alibaba.fastjson.JSONObject;
import com.shayu.onetoone.bean.AuthBean;
+import com.shayu.onetoone.bean.AuthBloggerBean;
import com.shayu.onetoone.bean.AvatarBean;
import com.shayu.onetoone.bean.ExchangeModel;
import com.shayu.onetoone.bean.FollowBean;
@@ -807,6 +808,67 @@ public class OTONetManager {
}
+ /**
+ * 达人认证
+ *
+ * @param callback
+ */
+ public void authSage(
+ String name, String mobile, String card_no, String card_img, String img, int sex,
+ HttpCallback callback) {
+
+ API.get().otoApi(mContext)
+ .authSage(name, mobile, card_no, card_img, img, sex)
+ .subscribeOn(Schedulers.io())
+ .observeOn(AndroidSchedulers.mainThread())
+ .subscribe(new Consumer>>() {
+ @Override
+ public void accept(ResponseModel> listResponseModel) throws Exception {
+ if (listResponseModel.getData().getCode() == 0) {
+ callback.onSuccess(new HttpCallbackModel(listResponseModel.getData().getCode(), listResponseModel.getData().getMsg()));
+ } else {
+ callback.onError(listResponseModel.getData().getMsg());
+ }
+ }
+ }, new Consumer() {
+ @Override
+ public void accept(Throwable throwable) throws Exception {
+
+ }
+ }).isDisposed();
+ }
+
+ /**
+ * 获取达人认证信息
+ *
+ * @param callback
+ */
+ public void getAuthBloggerInfo(HttpCallback callback) {
+ API.get().otoApi(mContext)
+ .getBloggerInfo()
+ .subscribeOn(Schedulers.io())
+ .observeOn(AndroidSchedulers.mainThread())
+ .subscribe(new Consumer>() {
+ @Override
+ public void accept(ResponseModel listResponseModel) throws Exception {
+ if (listResponseModel.getData().getCode() == 0) {
+ callback.onSuccess(listResponseModel.getData().getInfo());
+ } else {
+ callback.onError(listResponseModel.getData().getMsg());
+ }
+ }
+ }, new Consumer() {
+ @Override
+ public void accept(Throwable throwable) throws Exception {
+ Log.e(TAG, "accept: ", throwable);
+ if (callback != null) {
+ callback.onError(mContext.getString(com.yunbao.common.R.string.net_error));
+ }
+ }
+ }).isDisposed();
+ }
+
+
/**
* 获取系统 Label
*
diff --git a/OneToOne/src/main/java/com/shayu/onetoone/manager/RouteManager.java b/OneToOne/src/main/java/com/shayu/onetoone/manager/RouteManager.java
index e8c8cfc23..6a73669ff 100644
--- a/OneToOne/src/main/java/com/shayu/onetoone/manager/RouteManager.java
+++ b/OneToOne/src/main/java/com/shayu/onetoone/manager/RouteManager.java
@@ -36,6 +36,17 @@ public class RouteManager {
//达人认证
public static final String ACTIVITY_AUTH_BLOGGER = "/activity/AuthBloggerActivity";
+ //达人认证入口
+ public static final String ACTIVITY_AUTH_BLOGGER_INLET = "/activity/AuthBloggerInletActivity";
+
+
+ /**
+ * 达人认证入口
+ */
+ public static void forwardAuthBloggerInletActivity() {
+ ARouter.getInstance().build(ACTIVITY_AUTH_BLOGGER_INLET).navigation();
+ }
+
/**
* 达人认证
*/
diff --git a/OneToOne/src/main/java/com/shayu/onetoone/network/OneToOneApi.java b/OneToOne/src/main/java/com/shayu/onetoone/network/OneToOneApi.java
index 4245c9cab..0361dd257 100644
--- a/OneToOne/src/main/java/com/shayu/onetoone/network/OneToOneApi.java
+++ b/OneToOne/src/main/java/com/shayu/onetoone/network/OneToOneApi.java
@@ -1,6 +1,7 @@
package com.shayu.onetoone.network;
import com.shayu.onetoone.bean.AuthBean;
+import com.shayu.onetoone.bean.AuthBloggerBean;
import com.shayu.onetoone.bean.AvatarBean;
import com.shayu.onetoone.bean.ExchangeModel;
import com.shayu.onetoone.bean.FollowBean;
@@ -23,6 +24,7 @@ import com.shayu.onetoone.bean.TargetUserInfoBean;
import com.shayu.onetoone.bean.UserBean;
import com.shayu.onetoone.bean.UserItemBean;
import com.yunbao.common.bean.BaseModel;
+import com.yunbao.common.bean.HttpCallbackModel;
import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.UserAvatarSelectBean;
import com.yunbao.common.http.ResponseModel;
@@ -282,6 +284,27 @@ public interface OneToOneApi {
@GET("/api/public/?service=Friendappmsg.setTips")
Observable> updateChatTips(@Query("tuid") String tuid);
+
+ /**
+ * 達人認證
+ */
+ @GET("/api/public/?service=Friendappinfos.setSage")
+ Observable>> authSage(
+ @Query("name") String name,
+ @Query("mobile") String mobile,
+ @Query("card_no") String card_no,
+ @Query("card_img") String card_img,
+ @Query("img") String img,
+ @Query("sex") int sex
+ );
+
+
+ /**
+ * 獲取達人認證信息
+ */
+ @GET("/api/public/?service=Friendappinfos.getSage")
+ Observable> getBloggerInfo(
+ );
}
diff --git a/OneToOne/src/main/java/com/shayu/onetoone/view/MyFrameLayout2.java b/OneToOne/src/main/java/com/shayu/onetoone/view/MyFrameLayout2.java
new file mode 100644
index 000000000..6018ea8c4
--- /dev/null
+++ b/OneToOne/src/main/java/com/shayu/onetoone/view/MyFrameLayout2.java
@@ -0,0 +1,46 @@
+package com.shayu.onetoone.view;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.util.AttributeSet;
+import android.widget.FrameLayout;
+
+import androidx.annotation.AttrRes;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.shayu.onetoone.R;
+
+/**
+ * Created by cxf on 2018/9/27.
+ */
+
+public class MyFrameLayout2 extends FrameLayout {
+
+ private float mRatio;
+ private float mOffestY;
+
+ public MyFrameLayout2(@NonNull Context context) {
+ this(context, null);
+ }
+
+ public MyFrameLayout2(@NonNull Context context, @Nullable AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public MyFrameLayout2(@NonNull Context context, @Nullable AttributeSet attrs, @AttrRes int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.MyFrameLayout2);
+ mRatio = ta.getFloat(R.styleable.MyFrameLayout2_mfl_ratio, 1);
+ mOffestY = ta.getDimension(R.styleable.MyFrameLayout2_mfl_offestY, 0);
+ ta.recycle();
+ }
+
+ @Override
+ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+ int widthSize = MeasureSpec.getSize(widthMeasureSpec);
+ heightMeasureSpec = MeasureSpec.makeMeasureSpec((int) (widthSize * mRatio + mOffestY), MeasureSpec.EXACTLY);
+ super.onMeasure(widthMeasureSpec, heightMeasureSpec);
+ }
+
+}
diff --git a/OneToOne/src/main/res/drawable/bg_auth_submit_1.xml b/OneToOne/src/main/res/drawable/bg_auth_submit_1.xml
index f8b9a6cc6..30b914716 100644
--- a/OneToOne/src/main/res/drawable/bg_auth_submit_1.xml
+++ b/OneToOne/src/main/res/drawable/bg_auth_submit_1.xml
@@ -3,10 +3,10 @@
-
-
+
\ No newline at end of file
diff --git a/OneToOne/src/main/res/drawable/bg_auth_submit_3.xml b/OneToOne/src/main/res/drawable/bg_auth_submit_3.xml
new file mode 100644
index 000000000..095ed58ec
--- /dev/null
+++ b/OneToOne/src/main/res/drawable/bg_auth_submit_3.xml
@@ -0,0 +1,12 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OneToOne/src/main/res/drawable/bg_auth_submit_4.xml b/OneToOne/src/main/res/drawable/bg_auth_submit_4.xml
new file mode 100644
index 000000000..1851682eb
--- /dev/null
+++ b/OneToOne/src/main/res/drawable/bg_auth_submit_4.xml
@@ -0,0 +1,12 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OneToOne/src/main/res/drawable/bg_auth_submit_5.xml b/OneToOne/src/main/res/drawable/bg_auth_submit_5.xml
new file mode 100644
index 000000000..83a9242cc
--- /dev/null
+++ b/OneToOne/src/main/res/drawable/bg_auth_submit_5.xml
@@ -0,0 +1,12 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OneToOne/src/main/res/drawable/bg_item_active_img.xml b/OneToOne/src/main/res/drawable/bg_item_active_img.xml
new file mode 100644
index 000000000..dbe7daa74
--- /dev/null
+++ b/OneToOne/src/main/res/drawable/bg_item_active_img.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/OneToOne/src/main/res/layout/activity_auth.xml b/OneToOne/src/main/res/layout/activity_auth.xml
index 27c50a518..3c4caaa65 100644
--- a/OneToOne/src/main/res/layout/activity_auth.xml
+++ b/OneToOne/src/main/res/layout/activity_auth.xml
@@ -1,6 +1,5 @@
+ android:textSize="14sp"
+ android:visibility="gone" />
+ android:layout_height="0dp"
+ android:layout_weight="1">
@@ -58,10 +59,12 @@
android:layout_marginTop="20dp">
@@ -78,11 +81,13 @@
@@ -110,13 +115,13 @@
android:layout_centerVertical="true"
android:text="真实姓名"
android:textColor="@color/textColor"
- android:textSize="14sp"
+ android:textSize="16sp"
android:textStyle="bold" />
@@ -124,6 +129,7 @@
@@ -159,11 +165,48 @@
+
+
+
+
+
+
+
+
+
+
@@ -204,7 +247,7 @@
android:layout_weight="1">
-
+ android:layout_height="330dp"
+ android:layout_marginTop="10dp"
+ android:nestedScrollingEnabled="false"
+ android:overScrollMode="never" />
@@ -297,6 +338,7 @@
android:layout_marginLeft="70dp"
android:layout_marginTop="20dp"
android:layout_marginRight="70dp"
+ android:layout_marginBottom="20dp"
android:background="@drawable/bg_auth_submit_1"
android:gravity="center"
android:paddingTop="10dp"
diff --git a/OneToOne/src/main/res/layout/activity_auth_blogger_inlet.xml b/OneToOne/src/main/res/layout/activity_auth_blogger_inlet.xml
new file mode 100644
index 000000000..2fbf41295
--- /dev/null
+++ b/OneToOne/src/main/res/layout/activity_auth_blogger_inlet.xml
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OneToOne/src/main/res/layout/item_auth_img.xml b/OneToOne/src/main/res/layout/item_auth_img.xml
new file mode 100644
index 000000000..0e8640efd
--- /dev/null
+++ b/OneToOne/src/main/res/layout/item_auth_img.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OneToOne/src/main/res/mipmap-xxhdpi/icon_active_add.png b/OneToOne/src/main/res/mipmap-xxhdpi/icon_active_add.png
new file mode 100644
index 000000000..0597a7a39
Binary files /dev/null and b/OneToOne/src/main/res/mipmap-xxhdpi/icon_active_add.png differ
diff --git a/OneToOne/src/main/res/mipmap-xxhdpi/icon_choose_img_camera.png b/OneToOne/src/main/res/mipmap-xxhdpi/icon_choose_img_camera.png
new file mode 100644
index 000000000..73efea0ee
Binary files /dev/null and b/OneToOne/src/main/res/mipmap-xxhdpi/icon_choose_img_camera.png differ
diff --git a/OneToOne/src/main/res/mipmap-xxhdpi/icon_fail.png b/OneToOne/src/main/res/mipmap-xxhdpi/icon_fail.png
new file mode 100644
index 000000000..93d0eec21
Binary files /dev/null and b/OneToOne/src/main/res/mipmap-xxhdpi/icon_fail.png differ
diff --git a/OneToOne/src/main/res/mipmap-xxhdpi/icon_select_0.png b/OneToOne/src/main/res/mipmap-xxhdpi/icon_select_0.png
new file mode 100644
index 000000000..2340256fa
Binary files /dev/null and b/OneToOne/src/main/res/mipmap-xxhdpi/icon_select_0.png differ
diff --git a/OneToOne/src/main/res/mipmap-xxhdpi/icon_select_1.png b/OneToOne/src/main/res/mipmap-xxhdpi/icon_select_1.png
new file mode 100644
index 000000000..148bf795e
Binary files /dev/null and b/OneToOne/src/main/res/mipmap-xxhdpi/icon_select_1.png differ
diff --git a/OneToOne/src/main/res/mipmap-xxhdpi/icon_suc.png b/OneToOne/src/main/res/mipmap-xxhdpi/icon_suc.png
new file mode 100644
index 000000000..781f4068c
Binary files /dev/null and b/OneToOne/src/main/res/mipmap-xxhdpi/icon_suc.png differ
diff --git a/OneToOne/src/main/res/values-zh-rHK/strings.xml b/OneToOne/src/main/res/values-zh-rHK/strings.xml
index 3a986f997..cf1ecb521 100644
--- a/OneToOne/src/main/res/values-zh-rHK/strings.xml
+++ b/OneToOne/src/main/res/values-zh-rHK/strings.xml
@@ -14,4 +14,7 @@
上传图片(非必選)
清除设置
保存设置
+
+ 最多选 %1$s 张图片哦
+
\ No newline at end of file
diff --git a/OneToOne/src/main/res/values-zh-rTW/strings.xml b/OneToOne/src/main/res/values-zh-rTW/strings.xml
index 3a986f997..3fcdfc27a 100644
--- a/OneToOne/src/main/res/values-zh-rTW/strings.xml
+++ b/OneToOne/src/main/res/values-zh-rTW/strings.xml
@@ -14,4 +14,6 @@
上传图片(非必選)
清除设置
保存设置
+
+ 最多选 %1$s 张图片哦
\ No newline at end of file
diff --git a/OneToOne/src/main/res/values/strings.xml b/OneToOne/src/main/res/values/strings.xml
index 9a9abfb86..973a2311f 100644
--- a/OneToOne/src/main/res/values/strings.xml
+++ b/OneToOne/src/main/res/values/strings.xml
@@ -31,4 +31,5 @@
立即兌換
全額兌換
+ 最多选 %1$s 张图片哦
\ No newline at end of file