夺宝精灵:1.赠送精灵 2.UI切图调整

This commit is contained in:
huangjian
2023-02-24 18:41:18 +08:00
parent 30fdd43119
commit 96e3aa67af
62 changed files with 660 additions and 125 deletions

View File

@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
public class FairySendAttachment extends CustomAttachment {
private long uid;
private String nick;
private long targetUid;
private String targetNick;
private long elfId;
@@ -22,11 +23,12 @@ public class FairySendAttachment extends CustomAttachment {
@Override
protected void parseData(JSONObject jsonObject) {
uid = jsonObject.getLongValue("uid");
uid = jsonObject.getLongValue("targetUid");
uid = jsonObject.getLongValue("elfId");
targetUid = jsonObject.getLongValue("targetUid");
elfId = jsonObject.getLongValue("elfId");
elfPicUrl = jsonObject.getString("elfPicUrl");
msgContent = jsonObject.getString("msgContent");
targetNick = jsonObject.getString("targetNick");
nick = jsonObject.getString("nick");
elfName = jsonObject.getString("elfName");
}
@@ -86,6 +88,14 @@ public class FairySendAttachment extends CustomAttachment {
this.elfName = elfName;
}
public String getNick() {
return nick;
}
public void setNick(String nick) {
this.nick = nick;
}
@Override
protected JSONObject packData() {
return null;

View File

@@ -11,20 +11,6 @@ data class PrizeInfo(
val rewardUnit: String = "",
val drawTime: Long = 0,
val poolLevel: Int = 0,
val propType: Int? = null
) {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as PrizeInfo
if (rewardId != other.rewardId) return false
return true
}
override fun hashCode(): Int {
return rewardId
}
}
val propType: Int? = null,
val itemIndex:Int = 0,
)

View File

@@ -0,0 +1,13 @@
package com.mango.core.treasurefairy
data class SendFairyInfo(
val createTime: Long = 0,
val elfId: Long = 0,
val elfName: String = "",
val elfPicUrl: String = "",
val recordId: Int = 0,
val targetAvatar: String = "",
val targetNick: String = "",
val targetUid: Long = 0,
val type: Int = 0
)

View File

@@ -46,8 +46,8 @@ object TreasureFairyModel {
api.getMyFairyInfo()
}
suspend fun getFriendsList(): List<SimpleUserInfo>? = launchRequest {
api.getFriendsList()
suspend fun getFriendsList(nick: String?): List<SimpleUserInfo>? = launchRequest {
api.getFriendsList(nick)
}
suspend fun askForFairy(elfId: Long, targetUid: Long): String? = launchRequest {
@@ -58,6 +58,13 @@ object TreasureFairyModel {
api.sendFairy(elfId, targetUid)
}
suspend fun getSendFairyList(
page: Int,
pageSize: Int
): List<SendFairyInfo>? = launchRequest {
api.getSendFairyList(page, pageSize)
}
private interface Api {
@@ -135,7 +142,7 @@ object TreasureFairyModel {
*
*/
@GET("fans/friend/list")
suspend fun getFriendsList(): ServiceResult<List<SimpleUserInfo>>
suspend fun getFriendsList(@Query("nick") nick: String?): ServiceResult<List<SimpleUserInfo>>
/**
* 精灵-索要
@@ -159,6 +166,16 @@ object TreasureFairyModel {
@Field("targetUid") targetUid: Long
): ServiceResult<String>
/**
* 精灵-赠予/获赠记录
*
*/
@GET("act/seize-treasure/elf/record")
suspend fun getSendFairyList(
@Query("page") page: Int,
@Query("pageSize") pageSize: Int
): ServiceResult<List<SendFairyInfo>>
}
}