Commit 4bec4cec authored by jyx's avatar jyx

更新我的页面样式

parent 8ca14cf2
......@@ -274,6 +274,26 @@
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.CommonDataActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.DrawCashActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.BindAliPayActivity"
android:exported="false"
android:screenOrientation="portrait" />
<activity
android:name=".ui.activitys.AuthCenterActivity"
android:exported="false"
android:screenOrientation="portrait" />
<service
android:name=".ui.service.UpdateService"
android:exported="true" />
......
......@@ -33,6 +33,16 @@
},
{
"sort": "交通运输",
"name": [
"航空",
"铁路",
"航运/船舶",
"公共交通",
"物流运输"
]
},
{
"sort": "信息技术",
"name": [
"互联网",
"IT",
......@@ -77,5 +87,11 @@
"装修/装潢",
"侦探"
]
},
{
"sort": "无",
"name": [
"无"
]
}
]
\ No newline at end of file
......@@ -65,6 +65,16 @@ object Constant {
const val USER_LABEL_DATA = "USER_LABEL_DATA"
const val WECHAT_DRAW_CASH = "WECHAT_DRAW_CASH"
const val ALI_DRAW_CASH = "ALI_DRAW_CASH"
const val WECHAT_PAY = "WEIXIN"
const val ALI_PAY = "ALIPAY"
const val USER_COMMON_DATA_TYPE = "USER_COMMON_DATA_TYPE"
const val FLAVOR_LOCAL = "local"
const val USERINFO = "userInfo"
const val FLAVOR_INTERNATIONAL = "international"
......
......@@ -69,9 +69,9 @@ public class TrackManager {
}
}
public void getMyInfo() {
public void getBaseMsg() {
if (trackPresenter != null) {
trackPresenter.getMyInfo();
trackPresenter.getBaseMsg();
}
}
......
......@@ -50,7 +50,7 @@ public class UserManager {
/**
* 头像
*/
private static final String HEAD = "head";
private static final String HEAD_URL = "head_url";
/**
* vip是否有效
*/
......@@ -81,8 +81,8 @@ public class UserManager {
private static final String USER_BEANS = "USER_BEANS";
//年龄
private static final String USER_AGE = "USER_AGE";
//奖励金
private static final String USER_REWARD_CASH = "USER_REWARD_CASH";
//奖励金
private static final String USER_REWARD_COIN = "USER_REWARD_COIN";
//城市
private static final String USER_CITY = "USER_CITY";
//头像
......@@ -138,7 +138,7 @@ public class UserManager {
ps.put(SHARE_CODE, user.getShareCode());
ps.put(VIP_FOREVER, user.isForever());
ps.put(REAL_NAME, user.getNickName());
ps.put(HEAD, user.getHead());
ps.put(HEAD_URL, user.getHeaderUrl());
ps.put(USER_ID, uid);
ps.put(USER_PK_ID, user.getPk_id());
ps.put(MOBILE, user.getMobile());
......@@ -149,13 +149,36 @@ public class UserManager {
ps.put(USER_SEX, user.getSex());
ps.put(USER_BEANS, user.getBeans());
ps.put(USER_REWARD_COIN, user.getRewardCoin());
ps.put(HAS_BASE, user.isHasBase());
ps.put(IDCARD_STATUS, user.getIdcardStatus());
ps.put(SHARE_CODE, user.getShareCode());
}
/**
* 判断用户是否填写基础资料
* 金币
*/
public int getUserBeans() {
if (ps == null) {
return 0;
}
return ps.getInt(USER_BEANS, 0);
}
/**
* 奖励金额
*/
public int getUserRewardCoin() {
if (ps == null) {
return 0;
}
return ps.getInt(USER_REWARD_COIN, 0);
}
/**
* 判断用户是否认证
*/
public int getIdcardStatus() {
if (ps == null) {
......@@ -255,7 +278,7 @@ public class UserManager {
if (ps == null) {
return null;
}
return ps.getString(HEAD, "");
return ps.getString(HEAD_URL, "");
}
public String getWxOpenid() {
......@@ -320,7 +343,7 @@ public class UserManager {
ps.remove(MOBILE);
ps.remove(TOKEN_ID);
ps.remove(REAL_NAME);
ps.remove(HEAD);
ps.remove(HEAD_URL);
ps.remove(IS_TEMP_USER);
ps.remove(VIP_FLAG);
ps.remove(VIP_FOREVER);
......
package com.duben.roseplaylet.mvp.model
/**
* @author Assen
* @date 2025/1/17
* @desc
*/
data class DrawCashBean(
val allMoney: Double,
val canCashoutMoney: Double,
val cashOutMinLimit: Int,
val frozenMoney: Double,
val miniLimit: Int,
val rewardCoin: Int
) : java.io.Serializable
data class AlipayMsgBean(
val idcard: Int,
val alipayAccount: Int,
val idcardName: String
) : java.io.Serializable
\ No newline at end of file
......@@ -14,7 +14,6 @@ public class UserBean implements Serializable {
private String nickName;
private String mobile;
private String idcode;
private String head;
private int activiteFlag = 0;// 1-匹配用户
private String openid;
private boolean isForever;//true-永久会员
......@@ -28,7 +27,7 @@ public class UserBean implements Serializable {
private boolean hasBase;// 是否填写基础资料
private int idcardStatus;//认证状态,1 已认证
private int beans;//金币,买各种虚拟资产证
private double rewardCash;//奖励金额
private int rewardCoin;//奖励金额
private String city;//城市
private String age;//年龄
private String headerUrl;//头像
......@@ -66,12 +65,12 @@ public class UserBean implements Serializable {
this.beans = beans;
}
public double getRewardCash() {
return rewardCash;
public int getRewardCoin() {
return rewardCoin;
}
public void setRewardCash(double rewardCash) {
this.rewardCash = rewardCash;
public void setRewardCoin(int rewardCoin) {
this.rewardCoin = rewardCoin;
}
public String getCity() {
......@@ -170,14 +169,6 @@ public class UserBean implements Serializable {
this.idcode = idcode;
}
public String getHead() {
return head;
}
public void setHead(String head) {
this.head = head;
}
public long getCreateTime() {
return createTime;
}
......
package com.duben.roseplaylet.mvp.model
data class UserList(
val list: ArrayList<UserData>
) : java.io.Serializable
data class UserData(
val age: String = "",
val birthday: String = "",
val career: String = "",
val distance: String = "",
val hallTime: String = "",
val headerUrl: String = "",
val idcardStatus: Int = 0,
val lastCity: String = "",
val likeStatus: Int = 0,
val nickName: String = "",
val online: Boolean = false,
val rtime: String = "",
val sex: Int = 1,
val uid: Long = 0
) : java.io.Serializable
data class UserHallMsg(
val image_count: Int = 0,
val like_count: Int = 0,
val likeme_count: Int = 0,
val seeme_count: Int = 0,
) : java.io.Serializable
......@@ -5,7 +5,8 @@ import java.util.List;
public class VipBean implements Serializable {
private List<ListBean> list;
private List<ListBean> vipList;
private List<ListBean> beansList;
private boolean needClick;// 是否勾选协议 true-勾选
......@@ -13,12 +14,23 @@ public class VipBean implements Serializable {
return needClick;
}
public List<ListBean> getList() {
return list;
public List<ListBean> getVipList() {
return vipList;
}
public class ListBean implements Serializable {
public void setVipList(List<ListBean> vipList) {
this.vipList = vipList;
}
public List<ListBean> getBeansList() {
return beansList;
}
public void setBeansList(List<ListBean> beansList) {
this.beansList = beansList;
}
public class ListBean implements Serializable {
private boolean weixin;
private boolean alipay;
private boolean showCycTips;// 判断是否提示
......@@ -42,6 +54,9 @@ public class VipBean implements Serializable {
//带uid转支付宝小程序 挽留用的第二个小程序
private String payToModel2SecondAlipayAppid;
public double getFirstPayPrice() {
return firstPayPrice;
}
public String getButtonText() {
return buttonText;
......
package com.duben.roseplaylet.mvp.presenters
import com.duben.library.net.neterror.BaseSubscriber
import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.manager.AppHttpManager
import com.duben.roseplaylet.mvp.model.BaseResponse
import com.duben.roseplaylet.mvp.model.UserList
import com.duben.roseplaylet.mvp.views.CommonView
import com.google.gson.JsonObject
import java.util.HashMap
class CommonPresenter : BasePresenter<CommonView>() {
fun toLike(toUid: String, status: Int) {
val vo = hashMapOf<String, Any>()
vo["toUid"] = toUid
vo["status"] = status
AppHttpManager.getInstance(loanApplication)
.call(loanService.toLike(vo), object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {}
else -> {
view.showToast(message)
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
}
})
}
fun getILikeList(page: Int, size: Int) {
val vo = HashMap<String, Any>()
vo["page"] = page
vo["size"] = size
AppHttpManager.getInstance(loanApplication)
.call(loanService.getILikeList(vo),
object : BaseSubscriber<BaseResponse<UserList>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
view.getCommonDataFail()
}
override fun onNext(baseResponse: BaseResponse<UserList>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.getCommonDataSuc(baseResponse.data)
}
else -> {
view.showToast(message)
view.getCommonDataFail()
}
}
}
})
}
fun getLikeMeList(page: Int, size: Int) {
val vo = HashMap<String, Any>()
vo["page"] = page
vo["size"] = size
AppHttpManager.getInstance(loanApplication)
.call(loanService.getLikeMeList(vo),
object : BaseSubscriber<BaseResponse<UserList>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
view.getCommonDataFail()
}
override fun onNext(baseResponse: BaseResponse<UserList>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.getCommonDataSuc(baseResponse.data)
}
else -> {
view.showToast(message)
view.getCommonDataFail()
}
}
}
})
}
fun getSeeMeList(page: Int, size: Int) {
val vo = HashMap<String, Any>()
vo["page"] = page
vo["size"] = size
AppHttpManager.getInstance(loanApplication)
.call(loanService.getSeeMeList(vo),
object : BaseSubscriber<BaseResponse<UserList>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
view.getCommonDataFail()
}
override fun onNext(baseResponse: BaseResponse<UserList>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.getCommonDataSuc(baseResponse.data)
}
else -> {
view.showToast(message)
view.getCommonDataFail()
}
}
}
})
}
}
\ No newline at end of file
package com.duben.roseplaylet.mvp.presenters
import com.duben.library.net.neterror.BaseSubscriber
import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.manager.AppHttpManager
import com.duben.roseplaylet.mvp.model.*
import com.duben.roseplaylet.mvp.views.DrawCashView
import com.google.gson.JsonObject
import java.util.HashMap
class DrawCashPresenter : BasePresenter<DrawCashView>() {
fun getVipProducts() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.vipProducts, object : BaseSubscriber<BaseResponse<VipBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<VipBean>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.getVipProductSuc(baseResponse.data)
}
else -> {
view.getCashouBaseMsgFail()
view.showToast(message)
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
view.getCashouBaseMsgFail()
}
})
}
fun getCashouBaseMsg() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.cashouBaseMsg, object : BaseSubscriber<BaseResponse<DrawCashBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<DrawCashBean>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.getCashouBaseMsgSuc(baseResponse.data)
}
else -> {
view.getCashouBaseMsgFail()
view.showToast(message)
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
view.getCashouBaseMsgFail()
}
})
}
fun getAlipayMsg() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.alipayMsg, object : BaseSubscriber<BaseResponse<AlipayMsgBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<AlipayMsgBean>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.getAlipayMsgSuc(baseResponse.data)
}
else -> {
view.showToast(message)
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
}
})
}
fun addCashoutReq(cash: String) {
val vo = HashMap<String, Any>()
vo["cash"] = cash
AppHttpManager.getInstance(loanApplication)
.call(loanService.addCashoutReq(vo),
object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
view.addCashoutReqFail()
}
override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.addCashoutReqSuc()
}
else -> {
view.showToast(message)
view.addCashoutReqFail()
}
}
}
})
}
fun updateAlipayMsg(alipayAccount: String, idcardName: String, idcard: String) {
val vo = HashMap<String, Any>()
vo["alipayAccount"] = alipayAccount
vo["idcardName"] = idcardName
vo["idcard"] = idcard
AppHttpManager.getInstance(loanApplication)
.call(loanService.updateAlipayMsg(vo),
object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {
if (isLinkView) return
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.showToast(e.message)
view.updateAlipayMsgFail()
}
override fun onNext(baseResponse: BaseResponse<JsonObject>) {
if (isLinkView) return
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {
view.updateAlipayMsgSuc()
}
else -> {
view.showToast(message)
view.updateAlipayMsgFail()
}
}
}
})
}
fun getVipPayParams(payChannel: String, pid: String, enter: String) {
val vo = HashMap<String, Any>()
vo["payChannel"] = payChannel
vo["pid"] = pid
AppHttpManager.getInstance(loanApplication)
.call(loanService.getVipPayParams(vo),
object : BaseSubscriber<BaseResponse<WxPayParamBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.hideLoading()
view.showToast(e.message)
}
override fun onNext(baseResponse: BaseResponse<WxPayParamBean>) {
if (isLinkView) return
val code: Int = baseResponse.getStatus()
when (code) {
200 -> {
view.getVipPayParamsSuc(payChannel, baseResponse.data, enter)
}
else -> {
view.showToast(baseResponse.message)
}
}
}
})
}
fun queryVipOrder(tid: String, isPay: Boolean) {
val vo = HashMap<String, Any>()
vo["tid"] = tid
AppHttpManager.getInstance(loanApplication)
.call(loanService.queryVipOrder(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<Any>) {
if (isLinkView) return
val code: Int = baseResponse.status
when (code) {
200 -> {
view.queryVipOrderSuc(isPay)
}
}
}
})
}
fun payError(code: Int) {
val vo = HashMap<String, Any>()
vo["code"] = code
AppHttpManager.getInstance(loanApplication)
.call(loanService.payError(vo),
object : BaseSubscriber<BaseResponse<Any>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<Any>) {
if (isLinkView) return
val code: Int = baseResponse.status
}
})
}
}
\ No newline at end of file
......@@ -45,7 +45,6 @@ class EditProfilePresenter : BasePresenter<EditProfileView>() {
})
}
fun setUserInfo(userProfileData: UserProfileData) {
val vo = HashMap<String, Any>()
vo["info"] = userProfileData
......
......@@ -11,7 +11,6 @@ import com.duben.library.net.neterror.BaseSubscriber
import com.duben.library.net.neterror.Throwable
class MyPresenter : BasePresenter<MyView>() {
/**
* 游客登录
*/
......@@ -82,19 +81,18 @@ class MyPresenter : BasePresenter<MyView>() {
val code = baseResponse.status
when (code) {
200 -> {
// showTurn()
getMyInfo()
getBaseMsg()
}
}
}
})
}
fun getMyInfo() {
fun getBaseMsg() {
val vo = HashMap<String, Any>()
vo["os"] = "android"
AppHttpManager.getInstance(loanApplication)
.call(loanService.getMyInfo(vo),
.call(loanService.getBaseMsg(vo),
object : BaseSubscriber<BaseResponse<UserBean>>() {
override fun onCompleted() {
if (isLinkView)
......@@ -117,8 +115,42 @@ class MyPresenter : BasePresenter<MyView>() {
when (code) {
200 -> {
UserManager.getInstance().saveUserInfo(baseResponse.data)
view.getUserSuc(baseResponse.data)
view.getBaseMsgSuc(baseResponse.data)
}
else -> {
view.showToast(message)
}
}
}
})
}
fun getUserHallMsg() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.userHallMsg,
object : BaseSubscriber<BaseResponse<UserHallMsg>>() {
override fun onCompleted() {
if (isLinkView)
return
view.hideLoading()
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<UserHallMsg>) {
if (isLinkView) return
val code: Int = baseResponse.status
val message: String = baseResponse.message
when (code) {
200 -> {
view.getUserHallMsgSuc(baseResponse.data)
}
else -> {
view.showToast(message)
......
......@@ -3,14 +3,117 @@ package com.duben.roseplaylet.mvp.presenters
import com.duben.library.net.neterror.BaseSubscriber
import com.duben.library.net.neterror.Throwable
import com.duben.roseplaylet.manager.AppHttpManager
import com.duben.roseplaylet.mvp.model.BaseResponse
import com.duben.roseplaylet.mvp.model.FaceParam
import com.duben.roseplaylet.mvp.model.FaceResult
import com.duben.roseplaylet.mvp.model.*
import com.duben.roseplaylet.mvp.views.RealAuthView
import com.google.gson.JsonObject
import java.util.HashMap
class RealAuthPresenter : BasePresenter<RealAuthView>() {
fun getUserInfo() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.userInfo,
object : BaseSubscriber<BaseResponse<UserProfileDataInfo>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<UserProfileDataInfo>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.getUserInfoSuc(baseResponse.data)
else -> {
view.showToast(message)
view.getUserInfoFail()
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
view.getUserInfoFail()
}
})
}
fun setUserInfo(userProfileData: UserProfileData) {
val vo = HashMap<String, Any>()
vo["info"] = userProfileData
AppHttpManager.getInstance(loanApplication)
.call(loanService.setUserInfo(vo),
object : BaseSubscriber<BaseResponse<UserProfileData>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<UserProfileData>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> view.setUserInfoSuc()
else -> {
view.showToast(message)
view.setUserInfoFail()
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
view.setUserInfoFail()
}
})
}
fun setWechatQRCode(qrCode: String) {
val vo = hashMapOf<String, Any>()
vo["qrCode"] = qrCode
AppHttpManager.getInstance(loanApplication)
.call(loanService.setWechatQRCode(vo),
object : BaseSubscriber<BaseResponse<FaceParam>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onNext(baseResponse: BaseResponse<FaceParam>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.status
val message = baseResponse.message
when (code) {
200 -> {}
else -> {
view.showToast(message)
}
}
}
override fun onError(e: Throwable?) {
if (isLinkView) return
view.hideLoading()
view.showToast(e?.message)
}
})
}
fun getFaceParam(imgUrl: String) {
val vo = hashMapOf<String, Any>()
vo["imgUrl"] = imgUrl
......
......@@ -49,11 +49,11 @@ public class TrackPresenter extends BaseTrackPresenter {
});
}
public void getMyInfo() {
public void getBaseMsg() {
HashMap<String, Object> vo = new HashMap<>();
vo.put("os", "android");
AppHttpManager.getInstance(loanApplication)
.call(loanService.getMyInfo(vo),
.call(loanService.getBaseMsg(vo),
new BaseSubscriber<BaseResponse<UserBean>>() {
@Override
public void onCompleted() {
......@@ -106,7 +106,7 @@ public class TrackPresenter extends BaseTrackPresenter {
switch (baseResponse.getStatus()) {
case 200: {
getMyInfo();
getBaseMsg();
}
}
}
......
......@@ -16,9 +16,8 @@ class VideoPresenter : BasePresenter<VideoView>() {
fun getVipProducts() {
val vo = HashMap<String, Any>()
vo["isInstallAlipay"] = true
AppHttpManager.getInstance(loanApplication)
.call(loanService.getVipProducts(vo),
.call(loanService.vipProducts,
object : BaseSubscriber<BaseResponse<VipBean>>() {
override fun onCompleted() {
if (isLinkView) return
......
......@@ -53,7 +53,7 @@ class VipPresenter : BasePresenter<VipView>() {
/**
* 游客登录
*/
fun userLogin(isInstallAlipay: Boolean) {
fun userLogin() {
val vo = HashMap<String, Any>()
vo["device"] = DeviceUuidFactory().deviceUuid.toString()
AppHttpManager.getInstance(loanApplication)
......@@ -70,13 +70,13 @@ class VipPresenter : BasePresenter<VipView>() {
override fun onNext(baseResponse: BaseResponse<UserBean>) {
if (isLinkView) return
view.hideLoading()
val code = baseResponse.getStatus()
val message = baseResponse.getMessage()
val data: UserBean? = baseResponse.getData()
val code = baseResponse.status
val message = baseResponse.message
val data: UserBean? = baseResponse.data
when (code) {
200 -> if (data != null) {
UserManager.getInstance().saveUserInfo(data)
saveTerminalInfo(isInstallAlipay)
saveTerminalInfo()
}
else -> view.showToast(message)
}
......@@ -89,7 +89,7 @@ class VipPresenter : BasePresenter<VipView>() {
*
* @param context
*/
fun saveTerminalInfo(isInstallAlipay: Boolean) {
fun saveTerminalInfo() {
val vo = HashMap<String, Any>()
val deviceInfo: DeviceInfo = DeviceInfo.instance
val macAddress: String = deviceInfo.getMacAddress()
......@@ -119,7 +119,7 @@ class VipPresenter : BasePresenter<VipView>() {
if (isLinkView) return
val code = baseResponse.status
when (code) {
200 -> getVipProducts(isInstallAlipay)
200 -> getVipProducts()
}
}
})
......@@ -143,18 +143,15 @@ class VipPresenter : BasePresenter<VipView>() {
override fun onNext(baseResponse: BaseResponse<Any>) {
if (isLinkView) return
val code: Int = baseResponse.getStatus()
val code: Int = baseResponse.status
}
})
}
fun getVipProducts(isInstallAlipay: Boolean) {
val vo = HashMap<String, Any>()
vo["isInstallAlipay"] = isInstallAlipay
fun getVipProducts() {
view.showLoading("加载中...")
AppHttpManager.getInstance(loanApplication)
.call(loanService.getVipProducts(vo),
.call(loanService.vipProducts,
object : BaseSubscriber<BaseResponse<VipBean>>() {
override fun onCompleted() {
if (isLinkView) return
......@@ -182,12 +179,10 @@ class VipPresenter : BasePresenter<VipView>() {
})
}
fun getVipPayParams(payChannel: String, pid: String, isInstallAlipay: Boolean,enter:String) {
fun getVipPayParams(payChannel: String, pid: String, enter: String) {
val vo = HashMap<String, Any>()
vo["payChannel"] = payChannel
vo["payChannel"] = "ALIPAY"
vo["pid"] = pid
vo["isInstallAlipay"] = isInstallAlipay
AppHttpManager.getInstance(loanApplication)
.call(loanService.getVipPayParams(vo),
object : BaseSubscriber<BaseResponse<WxPayParamBean>>() {
......@@ -207,7 +202,7 @@ class VipPresenter : BasePresenter<VipView>() {
val code: Int = baseResponse.getStatus()
when (code) {
200 -> {
view.getVipPayParamsSuc("ALIPAY", baseResponse.data,enter)
view.getVipPayParamsSuc("ALIPAY", baseResponse.data, enter)
}
else -> {
view.showToast(baseResponse.getMessage())
......@@ -235,7 +230,7 @@ class VipPresenter : BasePresenter<VipView>() {
override fun onNext(baseResponse: BaseResponse<Any>) {
if (isLinkView) return
val code: Int = baseResponse.getStatus()
val code: Int = baseResponse.status
when (code) {
200 -> {
view.queryVipOrderSuc(isPay)
......
package com.duben.roseplaylet.mvp.views
import com.duben.roseplaylet.mvp.model.UserList
interface CommonView : BaseView {
fun getCommonDataSuc(data: UserList)
fun getCommonDataFail()
}
\ No newline at end of file
package com.duben.roseplaylet.mvp.views
import com.duben.roseplaylet.mvp.model.AlipayMsgBean
import com.duben.roseplaylet.mvp.model.DrawCashBean
import com.duben.roseplaylet.mvp.model.VipBean
import com.duben.roseplaylet.mvp.model.WxPayParamBean
interface DrawCashView : BaseView {
fun getVipProductSuc(data: VipBean)
fun getCashouBaseMsgSuc(data: DrawCashBean)
fun getCashouBaseMsgFail()
fun addCashoutReqSuc()
fun addCashoutReqFail()
fun getAlipayMsgSuc(data: AlipayMsgBean)
fun getAlipayMsgFail()
fun queryVipOrderSuc(isPay: Boolean)
fun getVipPayParamsSuc(payChannel: String, data: WxPayParamBean, enter: String)
fun updateAlipayMsgSuc()
fun updateAlipayMsgFail()
}
\ No newline at end of file
package com.duben.roseplaylet.mvp.views
import com.duben.roseplaylet.mvp.model.UserBean
import com.duben.roseplaylet.mvp.model.UserHallMsg
interface MyView : BaseView {
fun getUserSuc(data: UserBean)
fun getBaseMsgSuc(data: UserBean)
fun getUserHallMsgSuc(data: UserHallMsg)
}
package com.duben.roseplaylet.mvp.views
import com.duben.roseplaylet.mvp.model.FaceParam
import com.duben.roseplaylet.mvp.model.UserProfileDataInfo
interface RealAuthView : BaseView {
......@@ -8,4 +9,11 @@ interface RealAuthView : BaseView {
fun getFaceParamFail()
fun faceResultSuc()
fun faceResultFail()
fun getUserInfoSuc(data: UserProfileDataInfo)
fun getUserInfoFail()
fun setUserInfoSuc()
fun setUserInfoFail()
}
\ No newline at end of file
......@@ -3,11 +3,14 @@ package com.duben.roseplaylet.net;
import android.content.Context;
import android.text.TextUtils;
import com.duben.roseplaylet.mvp.model.AlipayMsgBean;
import com.duben.roseplaylet.mvp.model.DrawCashBean;
import com.duben.roseplaylet.mvp.model.FaceParam;
import com.duben.roseplaylet.mvp.model.HallList;
import com.duben.roseplaylet.mvp.model.RecommendBannerList;
import com.duben.roseplaylet.mvp.model.SeeWechat;
import com.duben.roseplaylet.mvp.model.ShareRankList;
import com.duben.roseplaylet.mvp.model.UserList;
import com.duben.roseplaylet.mvp.model.UserProfileData;
import com.duben.roseplaylet.mvp.model.UserProfileDataInfo;
import com.google.gson.JsonObject;
......@@ -95,8 +98,8 @@ public interface LoanService {
/**
* 查询vip产品
*/
@POST("api/vip/getVipProducts/appv2")
Observable<BaseResponse<VipBean>> getVipProducts(@Body Map<String, Object> vo);
@POST("roseApi/vip/getVipProducts/rose")
Observable<BaseResponse<VipBean>> getVipProducts();
/**
* 查询失败
......@@ -111,7 +114,7 @@ public interface LoanService {
*
* @return
*/
@POST("api/vip/getVipPayParams")
@POST("roseApi/vip/getVipPayParams/rose")
Observable<BaseResponse<WxPayParamBean>> getVipPayParams(@Body Map<String, Object> vo);
/**
......@@ -136,7 +139,7 @@ public interface LoanService {
* @return
*/
@POST("roseApi/user/baseMsg")
Observable<BaseResponse<UserBean>> getMyInfo(@Body Map<String, Object> vo);
Observable<BaseResponse<UserBean>> getBaseMsg(@Body Map<String, Object> vo);
/**
* 申请退款
......@@ -202,7 +205,6 @@ public interface LoanService {
@POST("api/vedioV1/orders")
Observable<BaseResponse<BannerList>> orders();
/**
* 剧情列表
*
......@@ -366,12 +368,18 @@ public interface LoanService {
@POST("api/user/reportAlipayMsg")
Observable<BaseResponse<Object>> reportAlipayMsg(@Body Map<String, Object> vo);
/*
/**
* 获得活体sdk初始化参数
*/
@POST("roseApi/face/getFaceParam")
Observable<BaseResponse<FaceParam>> getFaceParam(@Body Map<String, Object> vo);
/**
* 更新用户实名认证状态
*/
@POST("roseApi/user/updateIdcardStatus")
Observable<BaseResponse<JsonObject>> updateIdcardStatus(@Body Map<String, Object> vo);
/**
* 通知服务端活体完成,在sdk的回调中触发
*/
......@@ -435,20 +443,20 @@ public interface LoanService {
/**
* 我喜欢的
*/
@POST("roseApi/user/ilikeList")
Observable<BaseResponse<JsonObject>> getILikeList(@Body Map<String, Object> vo);
@POST("roseApi/hall/ilikeList")
Observable<BaseResponse<UserList>> getILikeList(@Body Map<String, Object> vo);
/**
* 喜欢我的
*/
@POST("roseApi/user/likeMeList")
Observable<BaseResponse<JsonObject>> getLikeMeList(@Body Map<String, Object> vo);
@POST("roseApi/hall/likeMeList")
Observable<BaseResponse<UserList>> getLikeMeList(@Body Map<String, Object> vo);
/**
* 看过我的
*/
@POST("roseApi/user/seeMeList")
Observable<BaseResponse<JsonObject>> getSeeMeList(@Body Map<String, Object> vo);
@POST("roseApi/hall/seeMeList")
Observable<BaseResponse<UserList>> getSeeMeList(@Body Map<String, Object> vo);
/**
* 用金币解锁用户资料
......@@ -516,6 +524,42 @@ public interface LoanService {
@POST("roseApi/user/setImages")
Observable<BaseResponse<JsonObject>> setImages(@Body Map<String, Object> vo);
/**
* 提现页面接口
*/
@POST("roseApi/share/getCashouBaseMsg")
Observable<BaseResponse<DrawCashBean>> getCashouBaseMsg();
/**
* 提现接口
*/
@POST("roseApi/share/addCashoutReq")
Observable<BaseResponse<JsonObject>> addCashoutReq(@Body Map<String, Object> vo);
/**
* 获取当前支付宝信息
*/
@POST("roseApi/user/getAlipayMsg")
Observable<BaseResponse<AlipayMsgBean>> getAlipayMsg();
/**
* 绑定支付宝信息/修改支付宝信息
*/
@POST("roseApi/user/updateAlipayMsg")
Observable<BaseResponse<JsonObject>> updateAlipayMsg(@Body Map<String, Object> vo);
/**
* 上传微信二维码
*/
@POST("roseApi/user/setWechatQRCode")
Observable<BaseResponse<JsonObject>> setWechatQRCode(@Body Map<String, Object> vo);
/**
* 用户页基本信息
*/
@POST("roseApi/hall/userHallMsg")
Observable<BaseResponse<JsonObject>> getUserHallMsg();
/**
* 默认http工厂
*/
......
package com.duben.roseplaylet.ui.activitys
import android.graphics.Color
import android.view.View
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.R
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import kotlinx.android.synthetic.main.activity_auth_center.*
import kotlinx.android.synthetic.main.header_layout.*
class AuthCenterActivity : BaseActivity(), View.OnClickListener {
override fun getContentViewLayoutID() = R.layout.activity_auth_center
override fun initViewsAndEvents() {
initHeader()
initListener()
}
private fun initHeader() {
tv_title.text = "认证中心"
tv_title.setTextColor(Color.WHITE)
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_white)
line.visibility = View.GONE
}
private fun initListener() {
iv_left_icon.setOnClickListener(this)
iv_auth_avatar.setOnClickListener(this)
iv_auth_beauty.setOnClickListener(this)
}
override fun isApplyKitKatTranslucency() = false
override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) {
R.id.iv_left_icon -> finish()
R.id.iv_auth_avatar -> {
readyGo(RealAuthActivity::class.java)
}
}
}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.activitys
import android.graphics.Color
import android.text.TextUtils
import android.view.View
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.AlipayMsgBean
import com.duben.roseplaylet.mvp.model.DrawCashBean
import com.duben.roseplaylet.mvp.model.VipBean
import com.duben.roseplaylet.mvp.model.WxPayParamBean
import com.duben.roseplaylet.mvp.presenters.DrawCashPresenter
import com.duben.roseplaylet.mvp.views.DrawCashView
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import kotlinx.android.synthetic.main.activity_bind_alipay.*
import kotlinx.android.synthetic.main.header_layout.*
/**
* @author Assen
* @date 2024/1/8
* @desc 绑定支付宝
*/
class BindAliPayActivity : BaseActivity(), View.OnClickListener, DrawCashView {
private val drawCashPresenter by lazy { DrawCashPresenter() }
override fun getContentViewLayoutID() = R.layout.activity_bind_alipay
override fun initViewsAndEvents() {
drawCashPresenter.attachView(this)
initHeader()
initView()
initListener()
}
private fun initView() {}
private fun initHeader() {
tv_title.text = "绑定账号"
tv_title.setTextColor(Color.WHITE)
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_white)
line.visibility = View.GONE
}
private fun initListener() {
iv_left_icon.setOnClickListener(this)
btn_submit.setOnClickListener(this)
}
override fun isApplyKitKatTranslucency() = false
override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) {
R.id.iv_left_icon -> finish()
R.id.btn_submit -> {
// 绑定支付宝
val account = et_account.text.toString()
val name = et_name.text.toString()
val idcard_no = et_idcard_no.text.toString()
if (TextUtils.isEmpty(account)) {
showToast("请填写支付宝账号")
return
}
if (TextUtils.isEmpty(name)) {
showToast("请填写您的真实姓名")
return
}
if (TextUtils.isEmpty(idcard_no)) {
showToast("请填写真实身份证号")
return
}
drawCashPresenter.updateAlipayMsg(account, name, idcard_no)
}
}
}
override fun onDestroy() {
super.onDestroy()
drawCashPresenter.detachView()
}
override fun getVipProductSuc(data: VipBean) {}
override fun getCashouBaseMsgSuc(data: DrawCashBean) {}
override fun getCashouBaseMsgFail() {}
override fun addCashoutReqSuc() {}
override fun addCashoutReqFail() {}
override fun getAlipayMsgSuc(data: AlipayMsgBean) {}
override fun getAlipayMsgFail() {}
override fun queryVipOrderSuc(isPay: Boolean) {}
override fun getVipPayParamsSuc(payChannel: String, data: WxPayParamBean, enter: String) {}
override fun updateAlipayMsgSuc() {
showToast("支付宝绑定成功!")
finish()
}
override fun updateAlipayMsgFail() {}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.activitys
import android.graphics.Color
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import androidx.recyclerview.widget.LinearLayoutManager
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.R
import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.manager.UserManager
import com.duben.roseplaylet.mvp.model.UserList
import com.duben.roseplaylet.mvp.presenters.CommonPresenter
import com.duben.roseplaylet.mvp.views.CommonView
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.roseplaylet.ui.adapter.CommonListAdapter
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener
import com.scwang.smartrefresh.layout.listener.OnRefreshListener
import kotlinx.android.synthetic.main.activity_common_data.*
import kotlinx.android.synthetic.main.header_layout.*
class CommonDataActivity : BaseActivity(), View.OnClickListener, OnRefreshListener, CommonView,
OnLoadMoreListener {
private var mType = 0
private var page = 1 // 分页
private var pageSize = Constant.PAGE_SIZE // 分页
private lateinit var commonListAdapter: CommonListAdapter
private val commonPresenter by lazy { CommonPresenter() }
override fun getBundleExtras(extras: Bundle?) {
super.getBundleExtras(extras)
extras?.let {
mType = it.getInt(Constant.USER_COMMON_DATA_TYPE, 0)
}
}
override fun getContentViewLayoutID() = R.layout.activity_common_data
override fun isApplyKitKatTranslucency() = false
override fun initViewsAndEvents() {
commonPresenter.attachView(this)
tv_title.setTextColor(Color.WHITE)
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_white)
line.visibility = View.GONE
when (mType) {
0 -> {
// 我喜欢的
tv_title.text = "我喜欢的"
}
1 -> {
// 喜欢我的
tv_title.text = "喜欢我的"
}
2 -> {
// 看过我的
tv_title.text = "看过我的"
if (!UserManager.getInstance().vipFlag && UserManager.getInstance().userSex == 1) {
tv_see_vip.visibility = View.VISIBLE
}
}
}
initRecy()
initListener()
srl_data.autoRefresh()
}
private fun initRecy() {
commonListAdapter = CommonListAdapter()
if (mType == 2 && !UserManager.getInstance().vipFlag) {
commonListAdapter.setIsBlur(true)
commonListAdapter.setIsLike(false)
} else {
commonListAdapter.setIsBlur(false)
commonListAdapter.setIsLike(true)
}
commonListAdapter.animationEnable = false
rv_data.layoutManager = LinearLayoutManager(this)
rv_data.adapter = commonListAdapter
val emptyView = LayoutInflater.from(this).inflate(R.layout.item_empty_data, null)
commonListAdapter.setEmptyView(emptyView)
commonListAdapter.setOnItemClickListener { _, _, position ->
val bundle = Bundle()
if (mType == 2) {
if (UserManager.getInstance().userSex == 1) {
if (UserManager.getInstance().vipFlag) {
bundle.putString(
Constant.TO_UID,
commonListAdapter.data[position].uid.toString()
)
readyGo(UserProfileActivity::class.java, bundle)
} else {
readyGo(VipActivity::class.java)
}
} else {
bundle.putString(
Constant.TO_UID,
commonListAdapter.data[position].uid.toString()
)
readyGo(UserProfileActivity::class.java, bundle)
}
return@setOnItemClickListener
}
bundle.putString(Constant.TO_UID, commonListAdapter.data[position].uid.toString())
readyGo(UserProfileActivity::class.java, bundle)
}
commonListAdapter.setOnClickLikeListener(object : CommonListAdapter.OnClickLikeListener {
override fun onClickLike(position: Int) {
commonPresenter.toLike(
commonListAdapter.data[position].uid.toString(),
commonListAdapter.data[position].likeStatus
)
}
})
}
override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) {
R.id.iv_left_icon -> finish()
R.id.tv_see_vip -> {
readyGo(VipActivity::class.java)
}
}
}
private fun initListener() {
iv_left_icon.setOnClickListener(this)
tv_see_vip.setOnClickListener(this)
srl_data.setEnableRefresh(true)
srl_data.setOnLoadMoreListener(this)
srl_data.setOnRefreshListener(this)
}
override fun onDestroy() {
super.onDestroy()
commonPresenter.detachView()
}
private fun loadData() {
when (mType) {
0 -> {
// 我喜欢的
commonPresenter.getILikeList(page, pageSize)
}
1 -> {
// 喜欢我的
commonPresenter.getLikeMeList(page, pageSize)
}
2 -> {
// 看过我的
commonPresenter.getSeeMeList(page, pageSize)
}
}
}
override fun onRefresh(refreshLayout: RefreshLayout) {
page = 1
loadData()
}
override fun onLoadMore(refreshLayout: RefreshLayout) {
page = ++page
loadData()
}
override fun getCommonDataSuc(data: UserList) {
srl_data.finishRefresh(true)
if (::commonListAdapter.isInitialized) {
if (page == 1) {
if (data.list.size > 0 && mType == 2) {
// 谁看过我
tv_see_count.visibility = View.VISIBLE
if (data.list.size > 10) {
tv_see_count.text = "10+位小姐姐对你感兴趣"
} else {
tv_see_count.text = "" + data.list.size + "位小姐姐对你感兴趣"
}
} else if (data.list.size > 0 && (mType == 0 || mType == 1)) {
tv_tips.visibility = View.VISIBLE
}
srl_data.finishRefresh(true)
commonListAdapter.setNewInstance(data.list)
} else {
if (data.list.size < pageSize) {
srl_data.finishLoadMoreWithNoMoreData()
} else {
srl_data.finishLoadMore()
}
commonListAdapter.addData(data.list)
}
}
}
override fun getCommonDataFail() {}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.activitys
import android.graphics.Color
import android.text.Editable
import android.text.TextUtils
import android.text.TextWatcher
import android.view.View
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.R
import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.mvp.model.AlipayMsgBean
import com.duben.roseplaylet.mvp.model.DrawCashBean
import com.duben.roseplaylet.mvp.model.VipBean
import com.duben.roseplaylet.mvp.model.WxPayParamBean
import com.duben.roseplaylet.mvp.presenters.DrawCashPresenter
import com.duben.roseplaylet.mvp.views.DrawCashView
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import kotlinx.android.synthetic.main.activity_drawcash.*
import kotlinx.android.synthetic.main.header_layout.*
/**
* @author Assen
* @date 2024/1/8
* @desc 提现
*/
class DrawCashActivity : BaseActivity(), View.OnClickListener, DrawCashView {
private var maxInput = 0
private var minInput = 0
private var drawCashType = Constant.ALI_DRAW_CASH// 提现类型
private val drawCashPresenter by lazy { DrawCashPresenter() }
override fun getContentViewLayoutID() = R.layout.activity_drawcash
override fun initViewsAndEvents() {
drawCashPresenter.attachView(this)
initHeader()
initView()
initListener()
drawCashPresenter.getAlipayMsg()
drawCashPresenter.getCashouBaseMsg()
}
private fun initView() {
et_draw_cash.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
}
override fun afterTextChanged(s: Editable?) {
val inputSize = s.toString().length
if (inputSize < minInput) {
// et_draw_cash.setText(minInput)
showToast("" + minInput + "元起提现!")
} else if (inputSize > maxInput) {
// et_draw_cash.setText(maxInput)
showToast("最多可提现" + maxInput + "元!")
}
}
})
}
private fun initHeader() {
tv_title.text = "我的收益"
tv_title.setTextColor(Color.WHITE)
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_white)
line.visibility = View.GONE
tv_right.visibility = View.VISIBLE
tv_right.text = "明细"
}
private fun initListener() {
iv_left_icon.setOnClickListener(this)
tv_right.setOnClickListener(this)
btn_drawcash.setOnClickListener(this)
tv_all_balance.setOnClickListener(this)
ll_draw_cash_alipay.setOnClickListener(this)
ll_draw_cash_wx.setOnClickListener(this)
}
override fun isApplyKitKatTranslucency() = false
override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) {
R.id.iv_left_icon -> finish()
R.id.tv_right -> {
}
R.id.btn_drawcash -> {
// 提现
drawCashPresenter.addCashoutReq(et_draw_cash.text.toString())
}
R.id.tv_all_balance -> {
et_draw_cash.setText("" + maxInput)
}
R.id.ll_draw_cash_alipay -> {
// 绑定支付宝
readyGo(BindAliPayActivity::class.java)
}
R.id.ll_draw_cash_wx -> {
}
}
}
private fun setDrawCashContent(type: String, isBind: Boolean) {
if (TextUtils.equals(type, Constant.WECHAT_DRAW_CASH)) {
drawCashType = Constant.WECHAT_DRAW_CASH
iv_draw_cash_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
iv_draw_cash_alipay.setImageResource(R.mipmap.ic_vip_none)
if (isBind) {
tv_bind_alipay.text = "已绑定"
}
} else {
drawCashType = Constant.ALI_DRAW_CASH
iv_draw_cash_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
iv_draw_cash_wx.setImageResource(R.mipmap.ic_vip_none)
if (isBind) {
tv_bind_wx.text = "已绑定"
}
}
}
override fun getVipProductSuc(data: VipBean) {}
override fun getCashouBaseMsgSuc(data: DrawCashBean) {
tv_balance.text = "" + data.canCashoutMoney
tv_cash.text = "" + data.frozenMoney
if (data.cashOutMinLimit == 0) {
minInput = 0
maxInput = 0
} else {
minInput = data.miniLimit
maxInput = data.cashOutMinLimit
}
et_draw_cash.setText("" + data.miniLimit)
}
override fun getCashouBaseMsgFail() {}
override fun addCashoutReqSuc() {
}
override fun addCashoutReqFail() {}
override fun getAlipayMsgSuc(data: AlipayMsgBean) {
if (data.alipayAccount > 0) {
setDrawCashContent(Constant.ALI_DRAW_CASH, true)
} else {
setDrawCashContent(Constant.ALI_DRAW_CASH, false)
}
}
override fun getAlipayMsgFail() {}
override fun queryVipOrderSuc(isPay: Boolean) {}
override fun getVipPayParamsSuc(payChannel: String, data: WxPayParamBean, enter: String) {}
override fun updateAlipayMsgSuc() {}
override fun updateAlipayMsgFail() {}
}
\ No newline at end of file
......@@ -249,7 +249,6 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
tvNickname.setText("")
} else {
tvNickname.hint = "填写昵称"
tvNickname.setText("")
}
// 个性签名
......@@ -416,7 +415,7 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
pvOptions.show()
}
private fun showPickDialog(pickerType: String, defaultValue: String) {
private fun showPickDialog(pickerType: String, defaultValue: String?) {
when (pickerType) {
UserProfile.PROFILE_SG.str -> {
mSinglePickDialog = SinglePickDialog(
......@@ -527,25 +526,25 @@ class EditProfileActivity : BaseActivity(), View.OnClickListener, EditProfileVie
readyGoForResult(WriteSignatureActivity::class.java, Constant.EDIT_PROFILE_CODE)
}
R.id.layout_nl -> {
showPickDialog(UserProfile.PROFILE_NL.str, "")
showPickDialog(UserProfile.PROFILE_NL.str, userProfileData?.age)
}
R.id.layout_zy -> {
showJobPick()
}
R.id.layout_sg -> {
showPickDialog(UserProfile.PROFILE_SG.str, "")
showPickDialog(UserProfile.PROFILE_SG.str, userProfileData?.userHeight)
}
R.id.layout_tz -> {
showPickDialog(UserProfile.PROFILE_TZ.str, "")
showPickDialog(UserProfile.PROFILE_TZ.str, userProfileData?.bodyWeight)
}
R.id.layout_sx -> {
showPickDialog(UserProfile.PROFILE_SX.str, "")
showPickDialog(UserProfile.PROFILE_SX.str, userProfileData?.appearance)
}
R.id.layout_jyfw -> {
showAddressDialog()
}
R.id.layout_jyjm -> {
showPickDialog(UserProfile.PROFILE_JYJM.str, "")
showPickDialog(UserProfile.PROFILE_JYJM.str, userProfileData?.findCity)
}
R.id.layout_gxbq -> {
readyGoForResult(UserLabelActivity::class.java, Constant.USER_LABEL_REQUEST_CODE)
......
......@@ -31,7 +31,6 @@ class MainActivity : BaseActivity(), View.OnClickListener {
// 底部标签切换的Fragment
private var videoFragment: Fragment? = null
private var squareFragment: Fragment? = null
private var inviteFragment: Fragment? = null
private var msgFragment: Fragment? = null
private var myFragment: Fragment? = null
......@@ -140,8 +139,8 @@ class MainActivity : BaseActivity(), View.OnClickListener {
tab_tv_video.isSelected = true
tab_iv_square.isSelected = false
tab_tv_square.isSelected = false
tab_iv_invite.isSelected = false
tab_tv_invite.isSelected = false
// tab_iv_invite.isSelected = false
// tab_tv_invite.isSelected = false
tab_iv_msg.isSelected = false
tab_tv_msg.isSelected = false
tab_iv_my.isSelected = false
......@@ -161,8 +160,8 @@ class MainActivity : BaseActivity(), View.OnClickListener {
tab_tv_video.isSelected = false
tab_iv_square.isSelected = true
tab_tv_square.isSelected = true
tab_iv_invite.isSelected = false
tab_tv_invite.isSelected = false
// tab_iv_invite.isSelected = false
// tab_tv_invite.isSelected = false
tab_iv_msg.isSelected = false
tab_tv_msg.isSelected = false
tab_iv_my.isSelected = false
......@@ -173,25 +172,7 @@ class MainActivity : BaseActivity(), View.OnClickListener {
* 点击第三个tab
*/
fun clickTab3Layout() {
// AppConfig.fragmentClickFlag = Constant.FRAGMENT_CLICK_THREE
// if (inviteFragment == null) {
// inviteFragment = InviteFragment()
// }
// addOrShowFragment(supportFragmentManager.beginTransaction(), inviteFragment!!)
readyGo(ShareActivity::class.java)
tab_iv_video.isSelected = false
tab_tv_video.isSelected = false
tab_iv_square.isSelected = false
tab_tv_square.isSelected = false
tab_iv_invite.isSelected = true
tab_tv_invite.isSelected = true
tab_iv_msg.isSelected = false
tab_tv_msg.isSelected = false
tab_iv_my.isSelected = false
tab_tv_my.isSelected = false
}
/**
......@@ -207,8 +188,8 @@ class MainActivity : BaseActivity(), View.OnClickListener {
tab_tv_video.isSelected = false
tab_iv_square.isSelected = false
tab_tv_square.isSelected = false
tab_iv_invite.isSelected = false
tab_tv_invite.isSelected = false
// tab_iv_invite.isSelected = false
// tab_tv_invite.isSelected = false
tab_iv_msg.isSelected = true
tab_tv_msg.isSelected = true
tab_iv_my.isSelected = false
......@@ -228,8 +209,8 @@ class MainActivity : BaseActivity(), View.OnClickListener {
tab_tv_video.isSelected = false
tab_iv_square.isSelected = false
tab_tv_square.isSelected = false
tab_iv_invite.isSelected = false
tab_tv_invite.isSelected = false
// tab_iv_invite.isSelected = false
// tab_tv_invite.isSelected = false
tab_iv_msg.isSelected = false
tab_tv_msg.isSelected = false
tab_iv_my.isSelected = true
......
......@@ -4,6 +4,7 @@ import android.content.Intent
import android.graphics.Color
import android.os.Bundle
import android.view.View
import androidx.core.content.ContextCompat
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.R
import com.duben.roseplaylet.common.Constant
......@@ -11,6 +12,7 @@ import com.duben.roseplaylet.common.UserProfile
import com.duben.roseplaylet.manager.UserManager
import com.duben.roseplaylet.ui.activitys.base.BaseActivity
import com.duben.roseplaylet.ui.adapter.FlowTagAdapter
import com.duben.roseplaylet.utils.SpanUtils
import com.google.gson.Gson
import kotlinx.android.synthetic.main.activity_user_label.*
import kotlinx.android.synthetic.main.header_layout.*
......@@ -48,7 +50,7 @@ class UserLabelActivity : BaseActivity(), View.OnClickListener {
tv_right.visibility = View.VISIBLE
tv_right.text = "确定"
tv_title.setTextColor(Color.WHITE)
tv_right.setTextColor(Color.WHITE)
tv_right.setTextColor(ContextCompat.getColor(this, R.color.color_E8CF83))
iv_left_icon.visibility = View.VISIBLE
iv_left_icon.setImageResource(R.mipmap.ic_arrow_white)
......@@ -57,7 +59,6 @@ class UserLabelActivity : BaseActivity(), View.OnClickListener {
tv_title.text = UserProfile.SPECIAL_LIKE_FEMALE.str
tv_label1.visibility = View.GONE
tv_label2.visibility = View.GONE
view_line.visibility = View.GONE
UserProfile.SPECIAL_LIKE_FEMALE.arr?.let {
likeData.addAll(it)
......@@ -96,6 +97,13 @@ class UserLabelActivity : BaseActivity(), View.OnClickListener {
}
}
tv_select.text =
SpanUtils()
.append("已选择")
.append("${selectCount}/${MAX_SELECT_COUNT}")
.setForegroundColor(ContextCompat.getColor(this, R.color.color_E8CF83))
.create()
initListener()
}
......@@ -152,7 +160,12 @@ class UserLabelActivity : BaseActivity(), View.OnClickListener {
flowlayout_usual.setMaxSelectCount(MAX_SELECT_COUNT - flowlayout_special.selectedList.size)
}
}
tv_select.text = String.format("已选择${selectCount}/${MAX_SELECT_COUNT}")
tv_select.text =
SpanUtils()
.append("已选择")
.append("${selectCount}/${MAX_SELECT_COUNT}")
.setForegroundColor(ContextCompat.getColor(this, R.color.color_E8CF83))
.create()
}
override fun onClick(v: View?) {
......
......@@ -50,14 +50,12 @@ import com.youth.banner.listener.OnPageChangeListener
import kotlinx.android.synthetic.main.activity_new_vip.*
import java.net.URLEncoder
/**
* 描述:支付
* 作者:孟崔广
* 时间:2022/12/22 14:48
*/
class VipActivity : BaseActivity(), VipView, View.OnClickListener,
VipAdapter.OnItemClickListener,
class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.OnItemClickListener,
CompoundButton.OnCheckedChangeListener {
companion object {
......@@ -69,6 +67,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
const val ALIPAY = "ALIPAY"
const val THIRD_ID = "THIRD_ID"
const val VEDIO_ID = "VEDIO_ID"
const val USER_ID = "USER_ID"
const val ENTER_TYPE_DIALOG = "ENTER_TYPE_DIALOG"
const val ENTER_TYPE_ACTIVITY = "ENTER_TYPE_ACTIVITY"
}
......@@ -89,6 +88,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
private var isRecommend: Boolean = false
private var payType = WEIXIN_PAY// 支付类型
private var vedioId = ""
private var userId = ""
private var thirdId = ""
private val mainHandler = Handler(Looper.getMainLooper())
......@@ -109,15 +109,16 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
isRecommend = it.getBoolean(IS_RECOMMEND, false)
thirdId = it.getString(THIRD_ID, "")
vedioId = it.getString(VEDIO_ID, "")
userId = it.getString(USER_ID, "")
}
}
override fun initViewsAndEvents() {
vipPresenter.attachView(this)
if (!TextUtils.isEmpty(UserManager.getInstance().userID)) {
vipPresenter.getVipProducts(isAliPayInstalled())
vipPresenter.getVipProducts()
} else {
vipPresenter.userLogin(isAliPayInstalled())
vipPresenter.userLogin()
}
if (isDetail && UserManager.getInstance().newFlag) {
AppConfig.showVipAdDialog = true
......@@ -162,8 +163,8 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
override fun getVipProductSuc(data: VipBean) {
if (!isFinishing) {
if (data.list != null && data.list.size > 0) {
vipList = data.list
if (data.vipList != null && data.vipList.size > 0) {
vipList = data.vipList
//设置content样式
if (vipList != null && vipList!!.size > 0) {
......@@ -179,33 +180,12 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
* 设置content样式
*/
private fun setVipContent(bean: VipBean.ListBean) {
// if (bean.isAlipay && bean.isWeixin) {
// ll_vip_alipay.visibility = View.VISIBLE
// ll_vip_wx.visibility = View.VISIBLE
// payType = WEIXIN_PAY
// iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
// iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
// } else if (bean.isAlipay && !bean.isWeixin) {
// ll_vip_alipay.visibility = View.VISIBLE
// ll_vip_wx.visibility = View.GONE
// payType = ALIPAY
// iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
// iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
// } else if (!bean.isAlipay && bean.isWeixin) {
// ll_vip_alipay.visibility = View.GONE
// ll_vip_wx.visibility = View.VISIBLE
// payType = WEIXIN_PAY
// iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
// iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
// }
ll_vip_alipay.visibility = View.VISIBLE
ll_vip_wx.visibility = View.GONE
payType = ALIPAY
iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
if (!TextUtils.isEmpty(bean.remarks)) {
tv_vip_hint.text = bean.remarks
tv_vip_hint.visibility = View.VISIBLE
......@@ -221,7 +201,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
}
if (bean.isShowCycTips) {
tv_vip_back.visibility = View.VISIBLE
}else{
} else {
tv_vip_back.visibility = View.GONE
}
......@@ -300,18 +280,6 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
if (isPay) {
showToast("支付成功")
// if (isRecommend) {
// finish()
// } else {
// if (!UserManager.getInstance().userIsLogin()) {
// val b = Bundle()
// b.putString(MobileLoginActivity.TYPE, "vip")
// readyGoThenKill(MobileLoginActivity::class.java, b)
// } else {
// readyGoThenKill(MainActivity::class.java)
// }
// }
if (!UserManager.getInstance().userIsLogin()) {
val b = Bundle()
b.putString(BindMobileActivity.TYPE, "vip")
......@@ -403,11 +371,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
if (vipBean.isShowCycTips) {
agreementPayDialog()
} else {
vipPresenter.getVipPayParams(
payType,
vipBean.pid, isAliPayInstalled(),
ENTER_TYPE_ACTIVITY
)
vipPresenter.getVipPayParams(payType, vipBean.pid, ENTER_TYPE_ACTIVITY)
}
} else {
showToast("产品未配置")
......@@ -555,23 +519,6 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
})
}
/**
* 检测是否安装支付宝
*
* true-安装支付宝
*/
fun isAliPayInstalled(): Boolean {
try {
val uri: Uri = Uri.parse("alipays://platformapi/startApp")
val intent = Intent(Intent.ACTION_VIEW, uri)
val componentName = intent.resolveActivity(context.getPackageManager())
return componentName != null
} catch (e: Exception) {
e.printStackTrace()
return false
}
}
/**
* 自动续费
*/
......@@ -606,7 +553,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
val vipBean = vipList!![vipAdapter.getPosition()]
vipPresenter.getVipPayParams(
payType,
vipBean.pid, isAliPayInstalled(),
vipBean.pid,
ENTER_TYPE_DIALOG
)
......@@ -626,7 +573,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
private fun agreementPayDialog() {
payAgreementDialog = PayAgreementDialog(context, object : DialogListener() {
override fun onClick(v: View) {
if (!isFinishing() && payAgreementDialog != null && payAgreementDialog!!.isShowing()) {
if (!isFinishing && payAgreementDialog != null && payAgreementDialog!!.isShowing) {
payAgreementDialog!!.dismiss()
}
when (v.id) {
......@@ -654,7 +601,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
R.id.tv_agreement_next -> {
vipPresenter.getVipPayParams(
payType,
vipBean.pid, isAliPayInstalled(),
vipBean.pid,
ENTER_TYPE_ACTIVITY
)
}
......@@ -696,7 +643,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
} else {
vipPresenter.getVipPayParams(
payType,
vipBean.pid, isAliPayInstalled(),
vipBean.pid,
ENTER_TYPE_ACTIVITY
)
}
......@@ -799,7 +746,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
val link = URLEncoder.encode(path, "UTF-8")//这里是encode传的参数
val url =
// "alipays://platformapi/startapp?appId=2021004129666486&page=pages/loading&query=" + link
"alipays://platformapi/startapp?appId=" + alipayAppId + "&page=pages/loading&query=" + link
"alipays://platformapi/startapp?appId=$alipayAppId&page=pages/loading&query=$link"
val uri = Uri.parse(url) // url为你要链接的地址
val intent = Intent(Intent.ACTION_VIEW, uri)
startActivity(intent)
......@@ -811,7 +758,7 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener,
private fun openWxApp() {
// AppConfig.enterAlipay = true
try {
val appId = "wx263e5304a9a67d7c" // 填移动应用(App)的 AppId,非小程序的 AppID
val appId = "wx6f4215662bbee3cf" // 填移动应用(App)的 AppId,非小程序的 AppID
val api: IWXAPI = WXAPIFactory.createWXAPI(context, appId)
val req = WXLaunchMiniProgram.Req()
req.userName = "gh_439c32026e1b" // 填小程序原始id
......
......@@ -50,20 +50,12 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
) {
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
} else if (TextUtils.equals(getClass().getSimpleName(), "VideoActivity")
|| TextUtils.equals(getClass().getSimpleName(), "RealAuthActivity")
|| TextUtils.equals(getClass().getSimpleName(), "EditProfileActivity")
|| TextUtils.equals(getClass().getSimpleName(), "WriteSignatureActivity")
|| TextUtils.equals(getClass().getSimpleName(), "EditProfileActivity")
|| TextUtils.equals(getClass().getSimpleName(), "UserProfileActivity")
|| TextUtils.equals(getClass().getSimpleName(), "MainActivity")
|| TextUtils.equals(getClass().getSimpleName(), "AlbumActivity")
|| TextUtils.equals(getClass().getSimpleName(), "ShareActivity")
} else if (
TextUtils.equals(getClass().getSimpleName(), "VideoActivity")
) {
setDarkStatusBar();
setLightStatusBar();
} else {
StatusBarUtil.StatusBarLightMode(this);
// setLightStatusBar();
setDarkStatusBar();
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
......
package com.duben.roseplaylet.ui.adapter
import android.widget.TextView
import androidx.core.content.ContextCompat
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.*
class CoinAdapter : BaseQuickAdapter<VipBean.ListBean, BaseViewHolder>(R.layout.item_coin) {
var selectPosition: Int = 0
init {
if (data.size > 0) {
for (i in 0 until data.size) {
if (data[i].activityType == 1) {
selectPosition = i
break
}
}
}
}
override fun convert(holder: BaseViewHolder, item: VipBean.ListBean) {
val viewCoin = holder.getView<TextView>(R.id.item_coin)
viewCoin.text = item.title
holder.getView<TextView>(R.id.item_cash).text = "" + item.firstPayPrice
if (holder.adapterPosition == selectPosition) {
viewCoin.setTextColor(ContextCompat.getColor(context, R.color.color_EBCA7B))
} else {
viewCoin.setTextColor(ContextCompat.getColor(context, R.color.graya))
}
}
fun getPosition() = selectPosition
fun setPosition(selectPosition: Int) {
this.selectPosition = selectPosition
}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.adapter
import android.view.View
import android.widget.ImageView
import android.widget.TextView
import com.airbnb.lottie.LottieAnimationView
import com.airbnb.lottie.LottieComposition
import com.airbnb.lottie.LottieCompositionFactory
import com.airbnb.lottie.LottieDrawable
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.duben.library.utils.GlideUtils
import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.*
class CommonListAdapter : BaseQuickAdapter<UserData, BaseViewHolder>(R.layout.item_common_data) {
private var isBlur = false
private var isLike = false
override fun convert(holder: BaseViewHolder, item: UserData) {
holder.getView<TextView>(R.id.tv_recommend_name).text = item.nickName
holder.getView<TextView>(R.id.tv_recommend_info).text =
item.age + " " + item.lastCity + " " + item.career
val tvRealLabel = holder.getView<TextView>(R.id.tv_real_label)
if (item.idcardStatus == 1) {
tvRealLabel.visibility = View.VISIBLE
} else {
tvRealLabel.visibility = View.GONE
}
if (isBlur) {
GlideUtils.loadBlurImageView(
holder.itemView.context,
item.headerUrl,
holder.getView(R.id.iv_recommend_header)
)
} else {
GlideUtils.loadImageViewNoAnim2(
holder.itemView.context,
item.headerUrl,
holder.getView(R.id.iv_recommend_header)
)
}
val viewDate = holder.getView<TextView>(R.id.tv_recommend_date)
val viewHeart = holder.getView<LottieAnimationView>(R.id.iv_recommend_heart)
if (isLike) {
viewHeart.visibility = View.VISIBLE
viewDate.visibility = View.GONE
if (item.likeStatus == 0) {
playCancelCollectAnim(viewHeart)
} else {
playCollectAnim(viewHeart)
}
holder.getView<ImageView>(R.id.iv_recommend_heart).setOnClickListener {
mOnClickLikeListener?.onClickLike(holder.adapterPosition)
if (item.likeStatus == 0) {
playCollectAnim(holder.getView(R.id.iv_recommend_heart))
} else {
playCancelCollectAnim(holder.getView(R.id.iv_recommend_heart))
}
}
} else {
viewDate.text = item.rtime
viewHeart.visibility = View.GONE
viewDate.visibility = View.VISIBLE
}
}
fun setIsBlur(isBlur: Boolean) {
this.isBlur = isBlur
}
fun setIsLike(isLike: Boolean) {
this.isLike = isLike
}
private fun playCollectAnim(view: LottieAnimationView) {
val lottieDrawable = LottieDrawable()
LottieCompositionFactory.fromAsset(context, "home_collect.json")
.addListener { result: LottieComposition? ->
lottieDrawable.setImagesAssetsFolder("images/")
lottieDrawable.composition = result
lottieDrawable.repeatCount = 0
lottieDrawable.playAnimation()
}
view.setImageDrawable(lottieDrawable)
}
private fun playCancelCollectAnim(view: LottieAnimationView) {
val lottieDrawable = LottieDrawable()
LottieCompositionFactory.fromAsset(context, "home_cancel_collect.json")
.addListener { result: LottieComposition? ->
lottieDrawable.setImagesAssetsFolder("images/")
lottieDrawable.composition = result
lottieDrawable.repeatCount = 0
lottieDrawable.playAnimation()
}
view.setImageDrawable(lottieDrawable)
}
private var mOnClickLikeListener: OnClickLikeListener? = null
fun setOnClickLikeListener(onClickLikeListener: OnClickLikeListener) {
this.mOnClickLikeListener = onClickLikeListener
}
interface OnClickLikeListener {
fun onClickLike(position: Int)
}
}
\ No newline at end of file
......@@ -33,8 +33,6 @@ class SquareAdapter : BaseQuickAdapter<HallList.ListDTO, BaseViewHolder>(R.layou
tvRealLabel.visibility = View.GONE
}
holder.getView<TextView>(R.id.tv_recommend_location).text
if (isBlur) {
GlideUtils.loadBlurImageView(
holder.itemView.context,
......
......@@ -3,20 +3,18 @@ package com.duben.roseplaylet.ui.fragment
import android.os.Bundle
import androidx.fragment.app.Fragment
import com.duben.roseplaylet.R
import com.duben.roseplaylet.mvp.model.HallList
import com.duben.roseplaylet.mvp.model.UserList
import com.duben.roseplaylet.mvp.presenters.CommonPresenter
import com.duben.roseplaylet.mvp.views.CommonView
import com.duben.roseplaylet.ui.activitys.CommonTabActivity
import com.duben.roseplaylet.ui.fragment.base.LazyLoadBaseFragment
import com.scwang.smartrefresh.layout.api.RefreshLayout
import com.scwang.smartrefresh.layout.listener.OnRefreshListener
/**
* @author Assen
* @date 2024/1/5
* @desc
*/
class CommonListFragment : LazyLoadBaseFragment(), OnRefreshListener {
class CommonListFragment : LazyLoadBaseFragment(), OnRefreshListener, CommonView {
companion object {
private const val FRAGMENT_COMMON_TYPE = "FRAGMENT_COMMON_TYPE"
fun newInstance(type: String): Fragment {
......@@ -29,9 +27,13 @@ class CommonListFragment : LazyLoadBaseFragment(), OnRefreshListener {
}
private val commonPresenter by lazy { CommonPresenter() }
private var mType = CommonTabActivity.ACTIVITY_TYPE_YZR
override fun initViewsAndEvents() {
commonPresenter.attachView(this)
arguments?.run {
mType = getString(FRAGMENT_COMMON_TYPE, CommonTabActivity.ACTIVITY_TYPE_YZR)
}
......@@ -56,4 +58,18 @@ class CommonListFragment : LazyLoadBaseFragment(), OnRefreshListener {
override fun onRefresh(refreshLayout: RefreshLayout) {
refreshLayout.finishRefresh()
}
override fun onDestroyView() {
super.onDestroyView()
commonPresenter.detachView()
}
override fun getCommonDataSuc(data: UserList) {
TODO("Not yet implemented")
}
override fun getCommonDataFail() {
}
}
\ No newline at end of file
package com.duben.roseplaylet.ui.fragment
import android.os.Bundle
import android.text.TextUtils
import android.view.View
import android.widget.FrameLayout
import androidx.core.content.ContextCompat
import com.duben.library.utils.GlideUtils
import com.duben.library.utils.nodoubleclick.AntiShake
import com.duben.roseplaylet.R
import com.duben.roseplaylet.ad.express.ExpressAdCallback
......@@ -11,20 +14,15 @@ import com.duben.roseplaylet.common.AppConfig
import com.duben.roseplaylet.common.Constant
import com.duben.roseplaylet.manager.UserManager
import com.duben.roseplaylet.mvp.model.UserBean
import com.duben.roseplaylet.mvp.model.UserHallMsg
import com.duben.roseplaylet.mvp.presenters.MyPresenter
import com.duben.roseplaylet.mvp.views.MyView
import com.duben.roseplaylet.ui.activitys.*
import com.duben.roseplaylet.ui.fragment.base.LazyLoadBaseFragment
import com.duben.roseplaylet.utils.SpanUtils
import com.duben.roseplaylet.utils.TimeRender
import com.duben.roseplaylet.utils.UIUtils
import kotlinx.android.synthetic.main.fragment_main_my.*
/**
* 描述:我
* 作者:孟崔广
* 时间:2023/7/7 11:30
*/
class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
private val myPresenter by lazy { MyPresenter() }
......@@ -36,21 +34,19 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
override fun initViewsAndEvents() {
myPresenter.attachView(this)
initView()
initListener()
}
private fun initView() {
tv_contact.text = SpanUtils()
.append("如有问题,请直接联系")
.append("在线客服\n")
.setForegroundColor(resources.getColor(R.color.main_mints))
.setForegroundColor(ContextCompat.getColor(requireContext(), R.color.color_E8CF83))
.append("处理速度更快,")
.append("无需联系支付宝")
.setForegroundColor(resources.getColor(R.color.main_mints))
.setForegroundColor(ContextCompat.getColor(requireContext(), R.color.color_E8CF83))
.create()
initListener()
}
override fun onFragmentFirstVisible() {
super.onFragmentFirstVisible()
}
override fun onDestroy() {
......@@ -60,109 +56,125 @@ class MyFragment : LazyLoadBaseFragment(), MyView, View.OnClickListener {
override fun onFragmentResume() {
super.onFragmentResume()
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_FIVE) {
if (AntiShake.check(ll_my_record?.id)) return
if (AntiShake.check(ll_edit_profile?.id)) return
if (userManager.vipFlag) {
MyExpressManager.instance.preLoadAd()
showAd()
}
if (!TextUtils.isEmpty(userManager?.userID)) {
myPresenter.getMyInfo()
myPresenter.getBaseMsg()
} else {
myPresenter.userLogin()
}
}
}
override fun onClick(v: View?) {
if (AntiShake.check(v?.id)) return
when (v?.id) {
R.id.tv_my_btn -> {
// if (!userManager.vipFlag) {
// readyGo(VipActivity::class.java)
// }
R.id.ll_edit_profile -> {
readyGo(EditProfileActivity::class.java)
}
R.id.ll_my_setting -> {
// readyGo(SettingsActivity::class.java)
readyGo(RealAuthActivity::class.java)
}
R.id.tv_my_account, R.id.ll_my_login -> {
if (!userManager.userIsLogin()) {
readyGo(BindMobileActivity::class.java)
R.id.ll_my_vip -> {
if (!userManager.vipFlag) {
readyGo(VipActivity::class.java)
}
}
R.id.ll_my_record -> {
// readyGo(WatchRecordActivity::class.java)
// readyGo(UserProfileActivity::class.java)
R.id.ll_my_ilike -> {
val bundle = Bundle()
bundle.putInt(Constant.USER_COMMON_DATA_TYPE, 0)
readyGo(CommonDataActivity::class.java, bundle)
}
R.id.ll_my_likeme -> {
val bundle = Bundle()
bundle.putInt(Constant.USER_COMMON_DATA_TYPE, 1)
readyGo(CommonDataActivity::class.java, bundle)
}
R.id.ll_my_seeme -> {
val bundle = Bundle()
bundle.putInt(Constant.USER_COMMON_DATA_TYPE, 2)
readyGo(CommonDataActivity::class.java, bundle)
}
R.id.ll_my_feed -> {
// readyGo(FeedbackActivity::class.java)
readyGo(UserLabelActivity::class.java)
R.id.ll_my_wallet -> {
readyGo(WalletActivity::class.java)
}
R.id.ll_contactus -> {
// (requireActivity() as MainActivity).backPhoneDialog()
R.id.ll_my_invite -> {
readyGo(ShareActivity::class.java)
}
R.id.ll_my_payrecord -> {
// readyGo(OrderRecordActivity::class.java)
R.id.ll_my_album -> {
readyGo(AlbumActivity::class.java)
}
R.id.ll_my_auth -> {
readyGo(AuthCenterActivity::class.java)
}
R.id.ll_my_community -> {}
R.id.ll_my_wechat -> {}
R.id.ll_my_contactus -> {
(requireActivity() as MainActivity).backPhoneDialog()
}
R.id.ll_my_feedback -> {
readyGo(FeedbackActivity::class.java)
}
R.id.ll_my_settings -> {
readyGo(SettingsActivity::class.java)
}
// R.id.tv_my_account -> {
// if (!userManager.userIsLogin()) {
// readyGo(BindMobileActivity::class.java)
// }
// }
}
}
override fun getUserSuc(data: UserBean) {
loginStatus(data)
}
private fun loginStatus(consumer: UserBean) {
toUid = consumer.idcode
// 2-是否有手机号
if (!TextUtils.isEmpty(userManager.mobile)) {
tv_my_account.text =
"手机号:" + consumer.mobile.substring(0, 3) + "****" + consumer.mobile.substring(
consumer.mobile.length - 4
)
iv_my_bind.visibility = View.GONE
override fun getBaseMsgSuc(data: UserBean) {
toUid = data.idcode
tv_my_nickname.text = data.nickName
tv_my_label.text = "" + data.age + "岁 " + data.city
tv_my_id.text = "ID:" + data.idcode
GlideUtils.loadImageView(requireContext(), data.headerUrl, civ_my_avatar)
if (data.sex == 1) {
// 男性无认证页面
ll_my_auth.visibility = View.GONE
// 男性展示充值的金币
tv_my_coin.text = "" + data.beans
} else {
tv_my_account.text = "绑定手机号"
iv_my_bind.visibility = View.VISIBLE
}
tv_my_id.text = "用户ID:" + consumer.idcode
// 3-vip
if (consumer.expireTime > 0) {
tv_my_vip.text = "VIP会员"
tv_my_btn.visibility = View.GONE
if (consumer.isForever) {
tv_my_status.text = "有效期: 永久有效"
// 女性展示奖励的金币
tv_my_coin.text = "" + data.rewardCoin
if (data.idcardStatus == 0) {
// 女性展示认证页面
ll_my_auth.visibility = View.VISIBLE
} else {
tv_my_status.text =
"到期时间 ${TimeRender.formatDate(consumer.expireTime, TimeRender.DEFAULT_FORMAT)}"
ll_my_auth.visibility = View.GONE
}
} else {
tv_my_vip.text = "开通VIP会员"
tv_my_status.text = "解锁全部短剧"
tv_my_btn.visibility = View.VISIBLE
tv_my_btn.text = "立即开通"
}
}
override fun getUserHallMsgSuc(data: UserHallMsg) {
tv_my_ilike.text = "" + data.like_count
tv_my_likeme.text = "" + data.likeme_count
tv_my_seeme.text = "" + data.seeme_count
tv_my_album_count.text = "" + data.image_count + "张"
}
private fun initListener() {
ll_my_login.setOnClickListener(this)
tv_my_btn.setOnClickListener(this)
tv_my_account.setOnClickListener(this)
ll_my_record.setOnClickListener(this)
ll_my_feed.setOnClickListener(this)
ll_my_payrecord.setOnClickListener(this)
ll_my_setting.setOnClickListener(this)
ll_contactus.setOnClickListener(this)
ll_edit_profile.setOnClickListener(this)
ll_my_ilike.setOnClickListener(this)
ll_my_likeme.setOnClickListener(this)
ll_my_seeme.setOnClickListener(this)
ll_my_vip.setOnClickListener(this)
ll_my_wallet.setOnClickListener(this)
ll_my_invite.setOnClickListener(this)
ll_my_album.setOnClickListener(this)
ll_my_auth.setOnClickListener(this)
ll_my_community.setOnClickListener(this)
ll_my_wechat.setOnClickListener(this)
ll_my_contactus.setOnClickListener(this)
ll_my_feedback.setOnClickListener(this)
ll_my_settings.setOnClickListener(this)
}
private fun showAd() {
......
......@@ -22,7 +22,7 @@ class SinglePickDialog(
val activity: Activity,
title: String,
var data: MutableList<PickBean>,
defaultValue: String = ""
defaultValue: String? = ""
) :
Dialog(activity, R.style.dialog) {
......
......@@ -272,11 +272,11 @@ class TxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
}
override fun getVipProductSuc(data: VipBean) {
if (data.list != null && data.list.size > 0) {
if (data.list[0].payToModel == 2) {
AppConfig.firstVipPrice = data.list[0].oldPrice
if (data.vipList != null && data.vipList.size > 0) {
if (data.vipList[0].payToModel == 2) {
AppConfig.firstVipPrice = data.vipList[0].oldPrice
} else {
AppConfig.firstVipPrice = data.list[0].price
AppConfig.firstVipPrice = data.vipList[0].price
}
}
}
......
......@@ -246,11 +246,11 @@ class NewTxVideoActivity : BaseActivity(), View.OnClickListener, VideoView,
}
override fun getVipProductSuc(data: VipBean) {
if (data.list != null && data.list.size > 0) {
if (data.list[0].payToModel == 2) {
AppConfig.firstVipPrice = data.list[0].oldPrice
if (data.vipList != null && data.vipList.size > 0) {
if (data.vipList[0].payToModel == 2) {
AppConfig.firstVipPrice = data.vipList[0].oldPrice
} else {
AppConfig.firstVipPrice = data.list[0].price
AppConfig.firstVipPrice = data.vipList[0].price
}
}
}
......
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/white" android:state_checked="true" />
<item android:color="@color/gray" android:state_checked="false" />
<item android:color="@color/black" android:state_checked="true" />
<item android:color="@color/color_9C9AA5" android:state_checked="false" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/main_mints"/>
<stroke
android:width="0.5dp"
android:color="@color/color_84C6FA"/>
<corners android:radius="4dp"/>
<solid android:color="@color/color_E9D07E" />
<corners android:radius="10dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<stroke
android:width="0.5dp"
android:color="@color/color_84C6FA"/>
<corners android:radius="4dp"/>
<corners android:radius="10dp" />
<solid android:color="@color/color_272530" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_999999" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="30dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke
android:width="1dp"
android:color="#FFFFFF" />
<corners android:radius="10dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<!-- 填充的颜色 -->
<solid android:color="@color/color_E8C265" />
<!-- 设置按钮的四个角为弧形 -->
<!-- android:radius 弧形的半径 -->
<corners android:radius="30dip" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"
android:orientation="vertical">
<include layout="@layout/header_layout" />
<com.duben.roseplaylet.ui.widgets.ElasticScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="20dp"
android:paddingEnd="20dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="280dp"
android:scaleType="fitXY"
android:src="@mipmap/bg_auth_avatar" />
<ImageView
android:id="@+id/iv_auth_avatar"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="bottom"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:layout_marginBottom="20dp"
android:scaleType="fitXY"
android:src="@mipmap/ic_auth_btn" />
</FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:visibility="gone">
<ImageView
android:layout_width="match_parent"
android:layout_height="280dp"
android:scaleType="fitXY"
android:src="@mipmap/bg_auth_beauty" />
<ImageView
android:id="@+id/iv_auth_beauty"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_gravity="bottom"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
android:layout_marginBottom="20dp"
android:scaleType="fitXY"
android:src="@mipmap/ic_auth_btn" />
</FrameLayout>
</LinearLayout>
</com.duben.roseplaylet.ui.widgets.ElasticScrollView>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_232122"
android:orientation="vertical">
<include layout="@layout/header_layout" />
<com.duben.roseplaylet.ui.widgets.ElasticScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
android:overScrollMode="never">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="30dp"
android:text="选择提现方式"
android:textColor="@color/white"
android:textSize="16sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:background="@drawable/shape_bg_write"
android:drawableEnd="@mipmap/ic_alipay"
android:gravity="center_vertical"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:text="支付宝"
android:textColor="@color/black"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="30dp"
android:text="账号"
android:textColor="@color/white"
android:textSize="16sp" />
<EditText
android:id="@+id/et_account"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:background="@drawable/shape_bg_write"
android:hint="请填写支付宝账号"
android:inputType="number"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="30dp"
android:text="姓名"
android:textColor="@color/white"
android:textSize="16sp" />
<EditText
android:id="@+id/et_name"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:background="@drawable/shape_bg_write"
android:hint="请填写您的真实姓名"
android:inputType="text"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:textSize="16sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="30dp"
android:text="身份证号"
android:textColor="@color/white"
android:textSize="16sp" />
<EditText
android:id="@+id/et_idcard_no"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginStart="20dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="20dp"
android:background="@drawable/shape_bg_write"
android:hint="请填写真实身份证号"
android:inputType="number"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:textSize="16sp" />
<Button
android:id="@+id/btn_submit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginTop="80dp"
android:layout_marginEnd="30dp"
android:background="@drawable/btn_index_submit"
android:text="确认提交"
android:textColor="@color/black"
android:textSize="16sp"
android:textStyle="bold" />
</LinearLayout>
</com.duben.roseplaylet.ui.widgets.ElasticScrollView>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black">
<include
android:id="@+id/head"
layout="@layout/header_layout" />
<TextView
android:id="@+id/tv_tips"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_below="@id/head"
android:background="@color/gray"
android:gravity="center"
android:text="为保护用户隐私,已隐身的用户会被隐藏"
android:textSize="12sp"
android:visibility="gone" />
<com.scwang.smartrefresh.layout.SmartRefreshLayout
android:id="@+id/srl_data"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/tv_tips"
app:srlAccentColor="@color/black">
<com.scwang.smartrefresh.header.MaterialHeader
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_data"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never" />
</FrameLayout>
<com.scwang.smartrefresh.layout.footer.ClassicsFooter
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:srlAccentColor="@color/graya"
app:srlPrimaryColor="@color/black" />
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
<TextView
android:id="@+id/tv_see_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@id/tv_see_vip"
android:layout_centerHorizontal="true"
android:layout_marginBottom="50dp"
android:text="2位小姐姐对你感兴趣"
android:textColor="@color/white"
android:textSize="20sp"
android:visibility="gone" />
<TextView
android:id="@+id/tv_see_vip"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_alignParentBottom="true"
android:layout_marginStart="30dp"
android:layout_marginEnd="30dp"
android:layout_marginBottom="50dp"
android:background="@drawable/shape_chat_tips"
android:gravity="center"
android:text="VIP查看谁看过"
android:textColor="@color/color_232122"
android:textStyle="bold"
android:visibility="gone" />
</RelativeLayout>
This diff is collapsed.
......@@ -367,6 +367,8 @@
android:overScrollMode="never"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
<View style="@style/view_bottom" />
</LinearLayout>
</LinearLayout>
</com.duben.roseplaylet.ui.widgets.ElasticScrollView>
......
......@@ -21,23 +21,21 @@
<TextView
android:id="@+id/tv_select"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@color/gray"
android:paddingStart="10dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:text="已选择0/6"
android:textColor="@color/white" />
android:layout_marginStart="10dp"
android:layout_marginTop="20dp"
android:textColor="@color/white"
android:textSize="20sp" />
<TextView
android:id="@+id/tv_label1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="30dp"
android:paddingStart="10dp"
android:textColor="@color/white"
android:textSize="20sp" />
android:textSize="18sp" />
<com.duben.roseplaylet.ui.widgets.TouchInterceptingFrameLayout
android:id="@+id/fl_usual"
......@@ -52,21 +50,13 @@
app:max_select="6" />
</com.duben.roseplaylet.ui.widgets.TouchInterceptingFrameLayout>
<View
android:id="@+id/view_line"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_marginTop="15dp"
android:layout_marginBottom="15dp"
android:background="@color/gray" />
<TextView
android:id="@+id/tv_label2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="10dp"
android:layout_marginStart="10dp"
android:textColor="@color/white"
android:textSize="20sp" />
android:textSize="18sp" />
<com.duben.roseplaylet.ui.widgets.TouchInterceptingFrameLayout
android:id="@+id/fl_special"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="10dp"
android:layout_marginBottom="20dp"
android:background="@drawable/shape_chat_gray"
android:gravity="center_horizontal"
android:orientation="vertical">
<TextView
android:id="@+id/item_coin"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:drawablePadding="6dp"
android:gravity="center"
android:text="210"
android:textColor="@color/graya"
android:textSize="18sp"
app:drawableStartCompat="@mipmap/ic_call_wx" />
<TextView
android:id="@+id/item_cash"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="20dp"
android:text="¥30"
android:textColor="@color/graya" />
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ll_recommend_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/black"
android:orientation="horizontal"
android:padding="10dp"
android:paddingStart="10dp"
android:paddingEnd="10dp">
<com.duben.roseplaylet.ui.widgets.CircleImageView
android:id="@+id/iv_recommend_header"
android:layout_width="60dp"
android:layout_height="60dp"
android:src="@mipmap/ic_my_avat" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="10dp">
<TextView
android:id="@+id/tv_recommend_name"
android:layout_width="wrap_content"
android:layout_height="30dp"
android:ellipsize="end"
android:lines="1"
android:maxLength="5"
android:singleLine="true"
android:text="张三"
android:textColor="@color/white"
android:textSize="18sp" />
<TextView
android:id="@+id/tv_real_label"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_marginStart="10dp"
android:layout_marginTop="5dp"
android:layout_toEndOf="@id/tv_recommend_name"
android:background="@drawable/shape_green"
android:gravity="center"
android:paddingStart="10dp"
android:paddingEnd="10dp"
android:text="真人"
android:textColor="@color/white"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_recommend_info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/tv_recommend_name"
android:gravity="center"
android:text="308.1km"
android:textColor="@color/color_D2D2D2"
android:textSize="12sp" />
<TextView
android:id="@+id/tv_recommend_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:gravity="center"
android:text="2025-1-1"
android:textColor="@color/color_D2D2D2"
android:textSize="12sp" />
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/iv_recommend_heart"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_gravity="end"
android:layout_marginEnd="10dp"
android:src="@mipmap/home_collect_img_0"
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>
\ No newline at end of file
......@@ -4,12 +4,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:background="@drawable/shape_chat_tips"
android:background="@drawable/flow_tv_shape"
android:gravity="center"
android:paddingStart="15dp"
android:paddingTop="2dp"
android:paddingEnd="15dp"
android:paddingBottom="2dp"
android:text="1"
android:textColor="@color/black"
android:textColor="@color/color_999999"
android:textSize="12sp" />
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
......@@ -16,8 +17,8 @@
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="QQ"
android:textColor="@color/gray"
android:textSize="18sp" />
android:textColor="@color/color_999999"
android:textSize="16sp" />
<TextView
android:id="@+id/label_start2"
......@@ -34,14 +35,21 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginEnd="30dp"
android:layout_toEndOf="@id/label_start"
android:drawableEnd="@mipmap/ic_label_right"
android:gravity="end"
android:textColor="@color/white"
android:textColor="@color/color_999999"
android:textSize="18sp" />
<ImageView
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:src="@mipmap/ic_arrow_right_gray" />
<View
style="@style/view_line_E6E6E6"
style="@style/view_line_28282E"
android:layout_alignParentBottom="true" />
</RelativeLayout>
......
......@@ -5,9 +5,9 @@
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:background="@drawable/tagflow_selector"
android:paddingLeft="16dp"
android:paddingTop="6dp"
android:paddingRight="16dp"
android:paddingBottom="6dp"
android:paddingLeft="12dp"
android:paddingTop="4dp"
android:paddingRight="12dp"
android:paddingBottom="4dp"
android:textColor="@color/tagflow_tv_text"
android:textSize="14sp" />
......@@ -75,7 +75,16 @@
<color name="color_159823">#159823</color>
<color name="color_E2EAE0">#E2EAE0</color>
<color name="color_E8C46E">#E8C46E</color>
<color name="color_E9D07E">#E9D07E</color>
<color name="color_9C9AA5">#9C9AA5</color>
<color name="color_272530">#272530</color>
<color name="color_8E8E8E">#8E8E8E</color>
<color name="color_515151">#515151</color>
<color name="color_CFCFCF">#CFCFCF</color>
<color name="color_F0F0F0">#F0F0F0</color>
<color name="color_999999">#999999</color>
<color name="color_818181">#818181</color>
<color name="color_E8C265">#E8C265</color>
<color name="color_252429">#252429</color>
......
<resources>
<style name="view_bottom">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">30dp</item>
</style>
<style name="view_line_column_E6E6E6">
<item name="android:layout_width">1dp</item>
<item name="android:layout_height">match_parent</item>
<item name="android:background">#E6E6E6</item>
</style>
<!--浅灰色line-->
<style name="view_line_E6E6E6">
<item name="android:layout_width">match_parent</item>
......@@ -7,6 +18,12 @@
<item name="android:background">#E6E6E6</item>
</style>
<style name="view_line_28282E">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">1dp</item>
<item name="android:background">#28282E</item>
</style>
<style name="dialog" parent="@android:style/Theme.Dialog">
<item name="android:windowBackground">@color/full_transparent</item>
<item name="android:windowFrame">@null</item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment