修改转赠钻石逻辑和ui
This commit is contained in:
@@ -852,6 +852,18 @@
|
||||
<activity
|
||||
android:name=".ui.wallet.sendgold.SendGoldActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".pay.activity.GiveGoldActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".pay.activity.GiveGoldToUserActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" />
|
||||
<activity
|
||||
android:name=".pay.activity.GiveGoldSearchActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" /> <!-- 隐私设置 -->
|
||||
<activity
|
||||
android:name=".ui.setting.PrivacySettingActivity"
|
||||
|
@@ -198,7 +198,7 @@ public class XChatApplication extends Application {
|
||||
String channel = "";
|
||||
channel = ChannelReaderUtil.getChannel(instance);
|
||||
if (TextUtils.isEmpty(channel)) {
|
||||
channel = "official";
|
||||
channel = "google";
|
||||
}
|
||||
|
||||
BasicConfig.INSTANCE.setOriginalChannel(channel);
|
||||
|
@@ -5,15 +5,16 @@ import com.yizhuan.erban.base.BaseViewModel
|
||||
import com.yizhuan.xchat_android_core.home.bean.BannerInfo
|
||||
import com.yizhuan.xchat_android_core.home.model.HomeModel
|
||||
import com.yizhuan.xchat_android_core.room.bean.MeCenterInfo
|
||||
import com.yizhuan.xchat_android_core.user.bean.DiamondGiveHistoryInfo
|
||||
|
||||
class MeViewModel : BaseViewModel() {
|
||||
|
||||
private val _bannerLiveData = MutableLiveData<List<BannerInfo>?>()
|
||||
val bannerLiveData: MutableLiveData<List<BannerInfo>?> = _bannerLiveData
|
||||
|
||||
private val _meCenterInfoLiveData = MutableLiveData<List<MeCenterInfo>?>()
|
||||
val meCenterInfoLiveData: MutableLiveData<List<MeCenterInfo>?> = _meCenterInfoLiveData
|
||||
|
||||
private val _bannerLiveData = MutableLiveData<List<BannerInfo>?>()
|
||||
val bannerLiveData: MutableLiveData<List<BannerInfo>?> = _bannerLiveData
|
||||
|
||||
init {
|
||||
refreshData()
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@ import com.yizhuan.erban.home.helper.BannerHelper
|
||||
import com.yizhuan.erban.home.helper.OpenRoomHelper
|
||||
import com.yizhuan.erban.module_hall.hall.activity.ModuleClanActivity
|
||||
import com.yizhuan.erban.module_hall.hall.activity.ModuleHallActivity
|
||||
import com.yizhuan.erban.pay.activity.GiveGoldActivity
|
||||
import com.yizhuan.erban.ui.pay.ChargeActivity
|
||||
import com.yizhuan.erban.ui.relation.AttentionListActivity
|
||||
import com.yizhuan.erban.ui.relation.FansListActivity
|
||||
@@ -383,6 +384,9 @@ class MeFragment : BaseFragment(), View.OnClickListener {
|
||||
Constants.WXPAY_REFERER + "peko/modules/myincome/index.html#/DiamondLog"
|
||||
)
|
||||
}
|
||||
R.id.ll_clean_diamonds -> {
|
||||
GiveGoldActivity.start(mContext)
|
||||
}
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
41
app/src/main/java/com/yizhuan/erban/pay/GiveGoldModel.kt
Normal file
41
app/src/main/java/com/yizhuan/erban/pay/GiveGoldModel.kt
Normal file
@@ -0,0 +1,41 @@
|
||||
package com.yizhuan.erban.pay
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.yizhuan.erban.base.BaseViewModel
|
||||
import com.yizhuan.xchat_android_core.bean.response.ListResult
|
||||
import com.yizhuan.xchat_android_core.home.model.HomeModel
|
||||
import com.yizhuan.xchat_android_core.user.bean.DiamondGiveHistoryInfo
|
||||
import com.yizhuan.xchat_android_core.user.bean.SearchUserInfo
|
||||
|
||||
class GiveGoldModel : BaseViewModel() {
|
||||
|
||||
private val _diamondGiveHistoryLiveData = MutableLiveData<ListResult<DiamondGiveHistoryInfo>?>()
|
||||
val diamondGiveHistoryLiveData: MutableLiveData<ListResult<DiamondGiveHistoryInfo>?> = _diamondGiveHistoryLiveData
|
||||
|
||||
private val _searchUserLiveData = MutableLiveData<SearchUserInfo?>()
|
||||
val searchUserLiveData: MutableLiveData<SearchUserInfo?> = _searchUserLiveData
|
||||
|
||||
fun getDiamondListInfo(pageNum:Int, pageSize: Int) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_diamondGiveHistoryLiveData.value = ListResult.failed(pageNum)
|
||||
},
|
||||
block = {
|
||||
val result = HomeModel.getDiamondGiveHistory(pageNum, pageSize)
|
||||
_diamondGiveHistoryLiveData.value = ListResult.success(result, pageNum)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun getSearchUserInfo(erbanNo:Long) {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_searchUserLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
_searchUserLiveData.value = HomeModel.getSearchUser(erbanNo)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@@ -1,67 +1,121 @@
|
||||
package com.yizhuan.erban.pay.activity
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
import android.view.KeyEvent
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.TextView.OnEditorActionListener
|
||||
import androidx.activity.viewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.yinyuan.doudou.pay.activity.GiveGoldSearchActivity
|
||||
import com.yinyuan.doudou.pay.adapter.LatelyGiveAdapter
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseActivity
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.common.EmptyViewHelper
|
||||
import com.yizhuan.xchat_android_core.room.bean.SearchRoomInfo
|
||||
import com.yizhuan.xchat_android_core.user.UserModel
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
||||
import com.yizhuan.erban.databinding.ActivityGiveGoldBinding
|
||||
import com.yizhuan.erban.pay.GiveGoldModel
|
||||
import com.yizhuan.erban.pay.adapter.LatelyGiveAdapter
|
||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||
import com.yizhuan.xchat_android_core.user.bean.DiamondGiveHistoryInfo
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import kotlinx.android.synthetic.main.activity_give_gold.*
|
||||
|
||||
/**
|
||||
* 轉贈鉆石頁面
|
||||
*/
|
||||
class GiveGoldActivity : BaseViewBindingActivity<ActivityGiveGoldBinding>() {
|
||||
|
||||
class GiveGoldActivity : BaseActivity() {
|
||||
private var pageNum: Int = 1
|
||||
private val pageSize = 20
|
||||
private lateinit var mAdapter: LatelyGiveAdapter
|
||||
private lateinit var rvDelegate: RVDelegate<DiamondGiveHistoryInfo>
|
||||
|
||||
private lateinit var adapter: LatelyGiveAdapter
|
||||
private val giveGoldModel: GiveGoldModel by viewModels()
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_give_gold)
|
||||
initTitleBar(ResUtil.getString(R.string.pay_activity_givegoldactivity_01))
|
||||
recyclerView.layoutManager = LinearLayoutManager(this)
|
||||
adapter = LatelyGiveAdapter()
|
||||
adapter.bindToRecyclerView(recyclerView)
|
||||
adapter.emptyView = EmptyViewHelper.createEmptyView(this, ResUtil.getString(R.string.pay_activity_givegoldactivity_02))
|
||||
adapter.setOnItemClickListener { _, _, position ->
|
||||
adapter.getItem(position)?.let {
|
||||
companion object {
|
||||
fun start(context: Context) {
|
||||
val intent = Intent(context, GiveGoldActivity::class.java)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
initTitleBar(ResUtil.getString(R.string.me_clean_diamond))
|
||||
binding.etSearch.setOnEditorActionListener(OnEditorActionListener { v, actionId, event -> //以下方法防止两次发送请求
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH && event != null || event != null && event.keyCode == KeyEvent.KEYCODE_ENTER) {
|
||||
if (event.action == KeyEvent.ACTION_UP) { //发送请求
|
||||
val newStr: String = binding.etSearch.text.toString().trim { it <= ' ' }
|
||||
if (!TextUtils.isEmpty(newStr)) {
|
||||
giveGoldModel.getSearchUserInfo(newStr.toLong())
|
||||
}
|
||||
return@OnEditorActionListener true //自己消费
|
||||
}
|
||||
return@OnEditorActionListener true
|
||||
}
|
||||
false
|
||||
})
|
||||
binding.mTvSearch.setOnClickListener {
|
||||
val newStr: String = binding.etSearch.text.toString().trim { it <= ' ' }
|
||||
if (!TextUtils.isEmpty(newStr)) {
|
||||
giveGoldModel.getSearchUserInfo(newStr.toLong())
|
||||
}
|
||||
}
|
||||
|
||||
mAdapter = LatelyGiveAdapter()
|
||||
rvDelegate = RVDelegate.Builder<DiamondGiveHistoryInfo>()
|
||||
.setAdapter(mAdapter)
|
||||
.setLayoutManager(LinearLayoutManager(this))
|
||||
.setPageSize(20)
|
||||
.setEmptyView(
|
||||
EmptyViewHelper.createEmptyView(
|
||||
this,
|
||||
ResUtil.getString(R.string.me_give_gold_empty)
|
||||
)
|
||||
)
|
||||
.setRefreshLayout(binding.refreshLayout)
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.build()
|
||||
mAdapter.setOnItemClickListener { _, _, position ->
|
||||
mAdapter.getItem(position)?.let {
|
||||
GiveGoldToUserActivity.start(this, it)
|
||||
}
|
||||
}
|
||||
llSearch.setOnClickListener { GiveGoldSearchActivity.start(this) }
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
UserModel.get().giveUserList
|
||||
.compose(bindToLifecycle())
|
||||
.doOnError { toast(it.message) }
|
||||
.subscribe { users ->
|
||||
adapter.setNewData(users.filterNotNull())
|
||||
}
|
||||
}
|
||||
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
if (resultCode == Activity.RESULT_OK && requestCode == GiveGoldSearchActivity.REQUEST_CODE) {
|
||||
GiveGoldToUserActivity.start(this, UserInfo().apply {
|
||||
val room = data?.getParcelableExtra<SearchRoomInfo>("searchRoomInfo")
|
||||
room?.let {
|
||||
birth = it.birth
|
||||
erbanNo = it.erbanNo
|
||||
uid = it.uid
|
||||
nick = it.nick
|
||||
avatar = it.avatar
|
||||
}
|
||||
})
|
||||
mAdapter.setOnLoadMoreListener({
|
||||
loadData(false)
|
||||
}, binding.recyclerView)
|
||||
binding.refreshLayout.setOnRefreshListener {
|
||||
loadData(true)
|
||||
}
|
||||
giveGoldModel.diamondGiveHistoryLiveData.observe(this) {
|
||||
rvDelegate.loadData(it)
|
||||
}
|
||||
giveGoldModel.searchUserLiveData.observe(this) {
|
||||
it?.let {
|
||||
GiveGoldToUserActivity.start(this, it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
loadData(true)
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
fun loadData(isRefresh: Boolean) {
|
||||
binding.refreshLayout.isRefreshing = isRefresh
|
||||
pageNum = if (isRefresh) 1 else (pageNum + 1)
|
||||
giveGoldModel.getDiamondListInfo(pageNum, pageSize)
|
||||
}
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
StatusBarUtil.StatusBarLightMode(this)
|
||||
}
|
||||
|
||||
override fun needSteepStateBar(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package com.yinyuan.doudou.pay.activity
|
||||
package com.yizhuan.erban.pay.activity
|
||||
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
@@ -9,10 +9,10 @@ import android.os.Parcelable
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.yinyuan.doudou.pay.adapter.GiveSearchAdapter
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseActivity
|
||||
import com.yizhuan.erban.common.EmptyViewHelper
|
||||
import com.yizhuan.erban.pay.adapter.GiveSearchAdapter
|
||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||
import com.yizhuan.xchat_android_core.room.bean.SearchRoomInfo
|
||||
import com.yizhuan.xchat_android_core.room.model.AvRoomModel
|
||||
|
@@ -7,12 +7,15 @@ import android.os.Bundle
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import com.jungly.gridpasswordview.GridPasswordView
|
||||
import com.netease.nim.uikit.StatusBarUtil
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseActivity
|
||||
import com.yizhuan.erban.pay.password.GiveGoldPassWordFragment
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils
|
||||
import com.yizhuan.xchat_android_core.DemoCache
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel
|
||||
import com.yizhuan.xchat_android_core.user.bean.DiamondGiveHistoryInfo
|
||||
import com.yizhuan.xchat_android_core.user.bean.SearchUserInfo
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import kotlinx.android.synthetic.main.activity_give_gold_to_user.*
|
||||
@@ -21,27 +24,68 @@ class GiveGoldToUserActivity : BaseActivity(), GridPasswordView.OnPasswordChange
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun start(context: Context, user: UserInfo) {
|
||||
fun start(context: Context, user: DiamondGiveHistoryInfo) {
|
||||
val intent = Intent(context, GiveGoldToUserActivity::class.java)
|
||||
intent.putExtra("user", user)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun start(context: Context, searchUser: SearchUserInfo) {
|
||||
val intent = Intent(context, GiveGoldToUserActivity::class.java)
|
||||
intent.putExtra("searchUser", searchUser)
|
||||
context.startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
private var userInfo: UserInfo? = null
|
||||
private var userInfo: DiamondGiveHistoryInfo? = null
|
||||
private var searchUserInfo: SearchUserInfo? = null
|
||||
private var passWordFragment: GiveGoldPassWordFragment? = null
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_give_gold_to_user)
|
||||
userInfo = intent.getSerializableExtra("user") as UserInfo?
|
||||
userInfo = intent.getSerializableExtra("user") as DiamondGiveHistoryInfo?
|
||||
searchUserInfo = intent.getSerializableExtra("searchUser") as SearchUserInfo?
|
||||
init()
|
||||
}
|
||||
|
||||
override fun setStatusBar() {
|
||||
super.setStatusBar()
|
||||
StatusBarUtil.transparencyBar(this)
|
||||
StatusBarUtil.StatusBarLightMode(this)
|
||||
}
|
||||
|
||||
override fun needSteepStateBar(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun init() {
|
||||
initTitleBar(ResUtil.getString(R.string.pay_activity_givegoldtouseractivity_01))
|
||||
initTitleBar(ResUtil.getString(R.string.me_clean_diamond))
|
||||
userInfo?.apply {
|
||||
tvId.text = "Id:${targetErbanNo}"
|
||||
tvNickname.text = targetNick
|
||||
ImageLoadUtils.loadAvatar(context, targetAvatar, ivAvatar)
|
||||
val initInfo = DemoCache.readInitInfo()
|
||||
editGold.hint = if (initInfo.redEnvelopeConfig.rate == 0.0) ResUtil.getString(R.string.pay_activity_givegoldtouseractivity_02) else ResUtil.getString(R.string.pay_activity_givegoldtouseractivity_03)
|
||||
tv_desc.text = if (initInfo.redEnvelopeConfig.rate == 0.0) ResUtil.getString(R.string.pay_activity_givegoldtouseractivity_04) else ResUtil.getString(R.string.pay_activity_givegoldtouseractivity_05)
|
||||
|
||||
tvSure.setOnClickListener {
|
||||
val gold = editGold.text.toString().toInt()
|
||||
if (gold <= 0) {
|
||||
toast(ResUtil.getString(R.string.pay_activity_givegoldtouseractivity_06))
|
||||
return@setOnClickListener
|
||||
}
|
||||
val rateGold = gold * initInfo.redEnvelopeConfig.rate / 100
|
||||
GiveGoldPassWordFragment.newInstance(supportFragmentManager, gold.toString(), targetNick, if (rateGold == 0.0) "" else "手續費:(${initInfo.redEnvelopeConfig.rate.toInt()}%): ${rateGold}鉆石")
|
||||
.apply {
|
||||
passWordFragment = this
|
||||
setListener(this@GiveGoldToUserActivity)
|
||||
}
|
||||
}
|
||||
}
|
||||
searchUserInfo?.apply {
|
||||
tvId.text = "Id:${erbanNo}"
|
||||
tvNickname.text = nick
|
||||
ImageLoadUtils.loadAvatar(context, avatar, ivAvatar)
|
||||
@@ -50,12 +94,12 @@ class GiveGoldToUserActivity : BaseActivity(), GridPasswordView.OnPasswordChange
|
||||
tv_desc.text = if (initInfo.redEnvelopeConfig.rate == 0.0) ResUtil.getString(R.string.pay_activity_givegoldtouseractivity_04) else ResUtil.getString(R.string.pay_activity_givegoldtouseractivity_05)
|
||||
|
||||
tvSure.setOnClickListener {
|
||||
var gold = editGold.text.toString().toInt()
|
||||
val gold = editGold.text.toString().toInt()
|
||||
if (gold <= 0) {
|
||||
toast(ResUtil.getString(R.string.pay_activity_givegoldtouseractivity_06))
|
||||
return@setOnClickListener
|
||||
}
|
||||
var rateGold = gold * initInfo.redEnvelopeConfig.rate / 100
|
||||
val rateGold = gold * initInfo.redEnvelopeConfig.rate / 100
|
||||
GiveGoldPassWordFragment.newInstance(supportFragmentManager, gold.toString(), nick, if (rateGold == 0.0) "" else "手續費:(${initInfo.redEnvelopeConfig.rate.toInt()}%): ${rateGold}鉆石")
|
||||
.apply {
|
||||
passWordFragment = this
|
||||
@@ -71,12 +115,29 @@ class GiveGoldToUserActivity : BaseActivity(), GridPasswordView.OnPasswordChange
|
||||
override fun onInputFinish(psw: String) {
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun onTextChanged(psw: String) {
|
||||
val password = passWordFragment?.password?.password ?: ""
|
||||
if (password.length == 6) {
|
||||
userInfo?.apply {
|
||||
dialogManager.showProgressDialog(context)
|
||||
PayModel.get().giveGold(uid, editGold.text.toString(), password)
|
||||
PayModel.get().giveGold(targetUid, editGold.text.toString(), DESAndBase64(password))
|
||||
.compose(bindToLifecycle())
|
||||
.doOnError {
|
||||
toast(it.message)
|
||||
passWordFragment?.password?.clearPassword()
|
||||
dialogManager.dismissDialog()
|
||||
}
|
||||
.subscribe { _ ->
|
||||
passWordFragment?.dismissAllowingStateLoss()
|
||||
dialogManager.dismissDialog()
|
||||
finish()
|
||||
GiveGoldSuccessActivity.start(context, editGold.text.toString(), targetNick)
|
||||
}
|
||||
}
|
||||
searchUserInfo?.apply {
|
||||
dialogManager.showProgressDialog(context)
|
||||
PayModel.get().giveGold(uid, editGold.text.toString(), DESAndBase64(password))
|
||||
.compose(bindToLifecycle())
|
||||
.doOnError {
|
||||
toast(it.message)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package com.yinyuan.doudou.pay.adapter
|
||||
package com.yizhuan.erban.pay.adapter
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
@@ -18,20 +18,7 @@ class GiveSearchAdapter : BaseQuickAdapter<SearchRoomInfo, BaseViewHolder>(R.lay
|
||||
override fun convert(helper: BaseViewHolder, item: SearchRoomInfo) {
|
||||
helper.getView<TextView>(R.id.tv_id).text = "Id:${item.erbanNo}"
|
||||
helper.getView<TextView>(R.id.tv_nickname).text = item.nick
|
||||
setGenderAndBirth(helper.getView(R.id.tv_gender), item.gender, item.birth)
|
||||
ImageLoadUtils.loadAvatar(mContext, item.avatar, helper.getView(R.id.iv_avatar))
|
||||
}
|
||||
|
||||
private fun setGenderAndBirth(tvGender: SuperTextView, gender: Int, birth: Long) {
|
||||
if (gender == 1) {
|
||||
tvGender.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_man_white, 0, 0, 0)
|
||||
tvGender.solid = Color.parseColor("#FF72D1E7")
|
||||
}
|
||||
if (gender == 2) {
|
||||
tvGender.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_women_white, 0, 0, 0)
|
||||
tvGender.solid = Color.parseColor("#FFEF82B6")
|
||||
}
|
||||
tvGender.text = ((CurrentTimeUtils.getCurrentTime() - birth) / 1000 / 60 / 60 / 24 / 365).toString()
|
||||
|
||||
}
|
||||
}
|
@@ -1,37 +1,22 @@
|
||||
package com.yinyuan.doudou.pay.adapter
|
||||
package com.yizhuan.erban.pay.adapter
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.widget.TextView
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.coorchice.library.SuperTextView
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
||||
import com.yizhuan.xchat_android_core.utils.CurrentTimeUtils
|
||||
import com.yizhuan.xchat_android_core.user.bean.DiamondGiveHistoryInfo
|
||||
|
||||
|
||||
class LatelyGiveAdapter : BaseQuickAdapter<UserInfo, BaseViewHolder>(R.layout.item_lately_give) {
|
||||
class LatelyGiveAdapter :
|
||||
BaseQuickAdapter<DiamondGiveHistoryInfo, BaseViewHolder>(R.layout.item_lately_give) {
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun convert(helper: BaseViewHolder, item: UserInfo) {
|
||||
helper.getView<TextView>(R.id.tv_id).text = "Id:${item.erbanNo}"
|
||||
helper.getView<TextView>(R.id.tv_nickname).text = item.nick
|
||||
setGenderAndBirth(helper.getView(R.id.tv_gender), item.gender, item.birth)
|
||||
ImageLoadUtils.loadAvatar(mContext, item.avatar, helper.getView(R.id.iv_avatar))
|
||||
override fun convert(helper: BaseViewHolder, item: DiamondGiveHistoryInfo) {
|
||||
helper.getView<TextView>(R.id.tv_id).text = "Id:${item.targetErbanNo}"
|
||||
helper.getView<TextView>(R.id.tv_nickname).text = item.targetNick
|
||||
ImageLoadUtils.loadAvatar(mContext, item.targetAvatar, helper.getView(R.id.iv_avatar))
|
||||
}
|
||||
|
||||
private fun setGenderAndBirth(tvGender: SuperTextView, gender: Int, birth: Long) {
|
||||
if (gender == 1) {
|
||||
tvGender.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_man_white, 0, 0, 0)
|
||||
tvGender.solid = Color.parseColor("#FF72D1E7")
|
||||
}
|
||||
if (gender == 2) {
|
||||
tvGender.setCompoundDrawablesRelativeWithIntrinsicBounds(R.drawable.ic_women_white, 0, 0, 0)
|
||||
tvGender.solid = Color.parseColor("#FFEF82B6")
|
||||
}
|
||||
tvGender.text = ((CurrentTimeUtils.getCurrentTime() - birth) / 1000 / 60 / 60 / 24 / 365).toString()
|
||||
|
||||
}
|
||||
}
|
@@ -90,7 +90,7 @@ public class SimpleJSInterface {
|
||||
String channel;
|
||||
channel = ChannelReaderUtil.getChannel(XChatApplication.instance());
|
||||
if (TextUtils.isEmpty(channel)) {
|
||||
channel = "official";
|
||||
channel = "google";
|
||||
}
|
||||
return channel;
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable-xhdpi/me_clean_diamond.webp
Normal file
BIN
app/src/main/res/drawable-xhdpi/me_clean_diamond.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
@@ -12,6 +12,7 @@
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
|
@@ -300,12 +300,12 @@
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
tools:text="999" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diamond_text"
|
||||
@@ -320,11 +320,11 @@
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/ic_diamond_arrow"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_marginStart="@dimen/dp_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_3"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:src="@drawable/ic_diamond_arrow" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -377,10 +377,10 @@
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_vip_desc"
|
||||
@@ -394,11 +394,11 @@
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
<ImageView
|
||||
android:src="@drawable/ic_vip_arrow"
|
||||
android:layout_marginTop="2dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginTop="2dp"
|
||||
android:src="@drawable/ic_vip_arrow" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -463,16 +463,16 @@
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:onClick="@{click}"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/default_avatar" />
|
||||
android:src="@drawable/default_avatar"
|
||||
android:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_guide"
|
||||
android:src="@drawable/icon_guild"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:visibility="visible"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:src="@drawable/icon_guild"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_association_message"
|
||||
@@ -501,7 +501,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cs_my_center"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
@@ -525,10 +525,11 @@
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_room"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="horizontal"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ll_gain"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
@@ -543,7 +544,8 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_18"
|
||||
android:text="@string/me_my_room"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
@@ -554,11 +556,12 @@
|
||||
android:id="@+id/ll_gain"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="horizontal"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ll_clean_diamonds"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintStart_toEndOf="@+id/ll_room"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_my_center">
|
||||
@@ -571,13 +574,44 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_18"
|
||||
android:text="@string/me_gain_recording"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_clean_diamonds"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintStart_toEndOf="@+id/ll_gain"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_my_center">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/me_clean_diamond" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_18"
|
||||
android:text="@string/me_clean_diamond"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
@@ -2,50 +2,28 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_gender"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="14dp"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:adjustViewBounds="true"
|
||||
android:drawableLeft="@drawable/ic_man_white"
|
||||
android:drawablePadding="2dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingLeft="6dp"
|
||||
android:paddingRight="6dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10sp"
|
||||
app:corner="6dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_nickname"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_nickname"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_nickname"
|
||||
app:solid="#EF82B6"
|
||||
tools:text="12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:textColor="#ff333333"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_id"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar"
|
||||
@@ -57,11 +35,11 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:textColor="#ff999999"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/color_b3b3b3"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_gender"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_nickname"
|
||||
tools:text="ID:123456" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -965,6 +965,7 @@
|
||||
<string name="me_personal_center">個人中心</string>
|
||||
<string name="me_my_room">我的房間</string>
|
||||
<string name="me_gain_recording">收益記錄</string>
|
||||
<string name="me_clean_diamond">轉贈鉆石</string>
|
||||
|
||||
<!--登錄-->
|
||||
<string name="login_contact_service">請聯系客服處理</string>
|
||||
@@ -4905,5 +4906,6 @@
|
||||
<string name="share_link">複製鏈接</string>
|
||||
<string name="association_list">公會周榜</string>
|
||||
<string name="association_list_empty">還沒有公會榜單哦</string>
|
||||
<string name="me_give_gold_empty">暫無轉贈記錄</string>
|
||||
|
||||
</resources>
|
BIN
app/src/module_community/res/drawable-xhdpi/bg_search_user.webp
Normal file
BIN
app/src/module_community/res/drawable-xhdpi/bg_search_user.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@@ -9,35 +9,55 @@
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llSearch"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/bg_search_edit"
|
||||
android:background="@drawable/bg_search_user"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title_bar">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@null"
|
||||
android:drawableStart="@mipmap/icon_little_search"
|
||||
android:drawablePadding="5dp"
|
||||
<EditText
|
||||
android:id="@+id/etSearch"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="30dp"
|
||||
android:background="@android:color/transparent"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLength="20"
|
||||
android:text="@string/search_hint"
|
||||
android:textColor="@color/color_999999"
|
||||
android:imeOptions="actionSearch"
|
||||
android:singleLine="true"
|
||||
android:hint="@string/search_hint"
|
||||
android:paddingStart="@dimen/dp_15"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textColorHint="@color/text_color_secondary"
|
||||
android:textSize="14sp" />
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/mTvSearch"
|
||||
android:text="@string/search"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_white"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
android:paddingTop="@dimen/dp_3"
|
||||
android:paddingBottom="@dimen/dp_3"
|
||||
android:layout_marginEnd="@dimen/dp_3"
|
||||
android:background="@drawable/bg_common_confirm_press"
|
||||
android:layout_marginTop="@dimen/dp_3"
|
||||
android:layout_marginBottom="@dimen/dp_3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -53,13 +73,20 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/llSearch" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
||||
android:id="@+id/refreshLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="15dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvLately"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvLately"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/recyclerView"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout >
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -12,6 +12,8 @@ import com.yizhuan.xchat_android_core.room.bean.HomeLiveTopInfo
|
||||
import com.yizhuan.xchat_android_core.room.bean.MeCenterInfo
|
||||
import com.yizhuan.xchat_android_core.room.bean.SingleRoomSortInfo
|
||||
import com.yizhuan.xchat_android_core.room.game.GameInfo
|
||||
import com.yizhuan.xchat_android_core.user.bean.DiamondGiveHistoryInfo
|
||||
import com.yizhuan.xchat_android_core.user.bean.SearchUserInfo
|
||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper
|
||||
import com.yizhuan.xchat_android_core.utils.net.launchRequest
|
||||
@@ -101,6 +103,16 @@ object HomeModel : BaseModel() {
|
||||
)
|
||||
}
|
||||
|
||||
suspend fun getDiamondGiveHistory(page: Int, pageSize: Int): List<DiamondGiveHistoryInfo>? =
|
||||
launchRequest {
|
||||
api.getRecord(page, pageSize)
|
||||
}
|
||||
|
||||
suspend fun getSearchUser(erbanNo: Long): SearchUserInfo? =
|
||||
launchRequest {
|
||||
api.getSearchUser(erbanNo)
|
||||
}
|
||||
|
||||
suspend fun getHotRoom(): List<HomeRoomInfo>? =
|
||||
launchRequest {
|
||||
api.getHotRoom()
|
||||
@@ -394,6 +406,27 @@ object HomeModel : BaseModel() {
|
||||
@GET("/home/playV2")
|
||||
suspend fun apiHomePlayV2(): ServiceResult<List<HomeRoomInfo>>
|
||||
|
||||
/**
|
||||
* 轉贈鉆石歷史記錄
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("/user/diamond/giveRecord")
|
||||
suspend fun getRecord(
|
||||
@Query("pageNum") pageNum: Int?,
|
||||
@Query("pageSize") pageSize: Int?
|
||||
): ServiceResult<List<DiamondGiveHistoryInfo>>
|
||||
|
||||
/**
|
||||
* 精確搜索用戶
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@POST("/user/diamond/searchUser")
|
||||
suspend fun getSearchUser(
|
||||
@Query("erbanNo") erbanNo: Long?
|
||||
): ServiceResult<SearchUserInfo>
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -27,6 +27,13 @@ public class InitInfo implements Serializable {
|
||||
private NobleResourceComponent nobleResource;
|
||||
|
||||
private List<MonsterInitInfo> monsters;
|
||||
private List<Long> giveDiamondErbanNoList;
|
||||
/** 每日转赠钻石总额限制 */
|
||||
private Long giveDiamondDailyNum;
|
||||
/** 转赠钻石单笔最大限额 */
|
||||
private Long giveDiamondOnceLimitNum;
|
||||
/** 转赠手续费率 */
|
||||
private Double giveDiamondRate;
|
||||
private double exchangeGoldRate;// 钻石兑换钻石比率
|
||||
private double exchangeRate;// 钻石兑换钻石比率
|
||||
|
||||
|
@@ -627,10 +627,10 @@ public class PayModel extends BaseModel implements IPayModel {
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/user/gold/give")
|
||||
@POST("/user/diamond/give")
|
||||
Single<ServiceResult<String>> giveGold(@Field("toUid") long toUid,
|
||||
@Field("goldNum") String goldNum,
|
||||
@Field("password") String password);
|
||||
@Field("diamondNum") String diamondNum,
|
||||
@Field("payPwd") String payPwd);
|
||||
|
||||
/**
|
||||
* 获取首充产品列表
|
||||
|
@@ -6,6 +6,7 @@ import com.yizhuan.xchat_android_core.base.IModel;
|
||||
import com.yizhuan.xchat_android_core.bean.RoomHistoryInfo;
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
||||
import com.yizhuan.xchat_android_core.home.bean.VisitorInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.DiamondGiveHistoryInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.GiftAchievementInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.GiftWallInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.NewUserInfo;
|
||||
@@ -217,7 +218,7 @@ public interface IUserModel extends IModel {
|
||||
*/
|
||||
Single<String> getRandomAvatar();
|
||||
|
||||
Single<List<UserInfo>> getGiveUserList();
|
||||
Single<List<DiamondGiveHistoryInfo>> getGiveUserList(int page, int pageSize);
|
||||
|
||||
@Nullable
|
||||
String getPreFillInviteCode();
|
||||
|
@@ -21,6 +21,7 @@ import com.yizhuan.xchat_android_core.home.bean.VisitorInfo;
|
||||
import com.yizhuan.xchat_android_core.level.event.CharmLevelUpEvent;
|
||||
import com.yizhuan.xchat_android_core.level.event.LevelUpEvent;
|
||||
import com.yizhuan.xchat_android_core.noble.NobleUtil;
|
||||
import com.yizhuan.xchat_android_core.user.bean.DiamondGiveHistoryInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.GiftAchievementInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.GiftWallInfo;
|
||||
import com.yizhuan.xchat_android_core.user.bean.NewUserInfo;
|
||||
@@ -769,8 +770,8 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<List<UserInfo>> getGiveUserList() {
|
||||
return api.getGiveUserList()
|
||||
public Single<List<DiamondGiveHistoryInfo>> getGiveUserList(int page, int pageSize) {
|
||||
return api.getGiveUserList(page, pageSize)
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
@@ -1014,8 +1015,9 @@ public final class UserModel extends BaseModel implements IUserModel {
|
||||
*
|
||||
* @return -
|
||||
*/
|
||||
@GET("user/gold/give/recent")
|
||||
Single<ServiceResult<List<UserInfo>>> getGiveUserList();
|
||||
@GET("/user/diamond/giveRecord")
|
||||
Single<ServiceResult<List<DiamondGiveHistoryInfo>>> getGiveUserList(@Query("page") int page,
|
||||
@Query("pageSize") int pageSize);
|
||||
|
||||
|
||||
/**
|
||||
|
@@ -0,0 +1,22 @@
|
||||
package com.yizhuan.xchat_android_core.user.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DiamondGiveHistoryInfo implements Serializable {
|
||||
|
||||
private Long id;//记录 id
|
||||
private Long fromUid;//用户uid
|
||||
private Long targetUid;//对方用户uid
|
||||
private Long targetErbanNo;//对方平台id
|
||||
private String targetNick;//对方用户信息
|
||||
private String targetAvatar;//對方用戶頭像
|
||||
|
||||
private Long diamondNum;//转赠给对方的数量
|
||||
private Double realDiamondNum;//转赠实际支出的数量,包含手续费
|
||||
private String createTime;//创建时间
|
||||
private String updateTime;//更新时间
|
||||
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
package com.yizhuan.xchat_android_core.user.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SearchUserInfo implements Serializable {
|
||||
|
||||
/**
|
||||
* 用户uid
|
||||
*/
|
||||
private Long uid;
|
||||
/**
|
||||
* 平台号
|
||||
*/
|
||||
private Long erbanNo;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
private String nick;
|
||||
/**
|
||||
* 性别 1.男 2.女
|
||||
*/
|
||||
private Byte gender;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
private String birth;
|
||||
|
||||
}
|
@@ -26,7 +26,7 @@ public class AppMetaDataUtil {
|
||||
*/
|
||||
public static String getChannelID() {
|
||||
String channelID = BasicConfig.INSTANCE.getChannel();
|
||||
channelID = TextUtils.isEmpty(channelID) ? "official" : channelID;
|
||||
channelID = TextUtils.isEmpty(channelID) ? "google" : channelID;
|
||||
return channelID;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user