update
This commit is contained in:
parent
e56dec3b9d
commit
229c902273
@ -100,15 +100,15 @@ public class MapTopActivity extends AppCompatActivity {
|
|||||||
intent.putExtra("chapterName", nodes.get(position));
|
intent.putExtra("chapterName", nodes.get(position));
|
||||||
intent.putExtra("mapNode", com.alibaba.fastjson.JSONObject.toJSONString(mapNodes.get(position)));
|
intent.putExtra("mapNode", com.alibaba.fastjson.JSONObject.toJSONString(mapNodes.get(position)));
|
||||||
intent.putExtra("data", 1);
|
intent.putExtra("data", 1);
|
||||||
} else {
|
|
||||||
intent = new Intent(MapTopActivity.this, MapUserTeamActivity.class);
|
|
||||||
intent.putExtra("data", teamData);
|
|
||||||
}
|
}
|
||||||
} else if (model == -1) {
|
} else if (model == -1) {
|
||||||
intent = new Intent(MapTopActivity.this, MapTopActivity.class);
|
intent = new Intent(MapTopActivity.this, MapTopActivity.class);
|
||||||
intent.putExtra("level_name", level_name);
|
intent.putExtra("level_name", level_name);
|
||||||
intent.putExtra("chapterName", nodes.get(position));
|
intent.putExtra("chapterName", nodes.get(position));
|
||||||
intent.putExtra("data", 0);
|
intent.putExtra("data", 0);
|
||||||
|
} else if (model == 1) {
|
||||||
|
intent = new Intent(MapTopActivity.this, MapUserTeamActivity.class);
|
||||||
|
intent.putExtra("data", JSON.toJSONString(logs.get(position)));
|
||||||
}
|
}
|
||||||
if (intent != null)
|
if (intent != null)
|
||||||
startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(MapTopActivity.this, name, "transitionTitle").toBundle());
|
startActivity(intent, ActivityOptions.makeSceneTransitionAnimation(MapTopActivity.this, name, "transitionTitle").toBundle());
|
||||||
|
@ -9,6 +9,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.yutou.jianr_mg.Adapters.MapUserTeamRecyclierAdapter;
|
import com.yutou.jianr_mg.Adapters.MapUserTeamRecyclierAdapter;
|
||||||
|
import com.yutou.jianr_mg.Data.GameInfoLog;
|
||||||
import com.yutou.jianr_mg.Data.MapNode;
|
import com.yutou.jianr_mg.Data.MapNode;
|
||||||
import com.yutou.jianr_mg.Interfaces.HttpInterface;
|
import com.yutou.jianr_mg.Interfaces.HttpInterface;
|
||||||
import com.yutou.jianr_mg.Network.HttpApi;
|
import com.yutou.jianr_mg.Network.HttpApi;
|
||||||
@ -24,7 +25,7 @@ import cn.lemon.view.RefreshRecyclerView;
|
|||||||
public class MapUserTeamActivity extends AppCompatActivity {
|
public class MapUserTeamActivity extends AppCompatActivity {
|
||||||
private RefreshRecyclerView recyclerView;
|
private RefreshRecyclerView recyclerView;
|
||||||
private MapUserTeamRecyclierAdapter adapter;
|
private MapUserTeamRecyclierAdapter adapter;
|
||||||
private MapNode mapNode;
|
private GameInfoLog mapNode;
|
||||||
private int limit=0;
|
private int limit=0;
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
@ -32,15 +33,15 @@ public class MapUserTeamActivity extends AppCompatActivity {
|
|||||||
setContentView(R.layout.activity_favorite);
|
setContentView(R.layout.activity_favorite);
|
||||||
recyclerView = findViewById(R.id.recyclerView);
|
recyclerView = findViewById(R.id.recyclerView);
|
||||||
try {
|
try {
|
||||||
mapNode= JSON.parseObject(getIntent().getStringExtra("data"),MapNode.class);
|
mapNode= JSON.parseObject(getIntent().getStringExtra("data"), GameInfoLog.class);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Utils.toast(this,"数据异常");
|
Utils.toast(this,"数据异常");
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
System.out.println(mapNode.toString());
|
initView();
|
||||||
|
initData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void initView() {
|
void initView() {
|
||||||
@ -50,23 +51,6 @@ public class MapUserTeamActivity extends AppCompatActivity {
|
|||||||
recyclerView.setAdapter(adapter);
|
recyclerView.setAdapter(adapter);
|
||||||
}
|
}
|
||||||
void initData(){
|
void initData(){
|
||||||
try{
|
|
||||||
JSONObject json=new JSONObject();
|
|
||||||
json.put("node",mapNode.getId());
|
|
||||||
json.put("limit",limit);
|
|
||||||
HttpUtils.post(HttpApi.HOME_URL + HttpApi.MAPTOP_USER_TEAM, json, new HttpInterface() {
|
|
||||||
@Override
|
|
||||||
public void httpGetData(String string, int code) {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void httpError(Exception e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}catch (Exception e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user