|
|
|
@ -19,7 +19,6 @@ import com.example.leudaemialikeme.Model.Blog;
|
|
|
|
|
import com.example.leudaemialikeme.Model.Comment;
|
|
|
|
|
import com.example.leudaemialikeme.Model.User;
|
|
|
|
|
import com.example.leudaemialikeme.R;
|
|
|
|
|
import com.example.leudaemialikeme.Utils.Data;
|
|
|
|
|
import com.example.leudaemialikeme.Utils.OkHttpUtil;
|
|
|
|
|
import com.google.gson.Gson;
|
|
|
|
|
import com.google.gson.reflect.TypeToken;
|
|
|
|
@ -86,15 +85,7 @@ public class BlogDetailActivity extends BaseActivity {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private Blog getBlogByBid(String bid){
|
|
|
|
|
new Thread(new Runnable() {
|
|
|
|
|
@Override
|
|
|
|
|
public void run() {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).start();
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void initComments() {
|
|
|
|
|
new Thread(new Runnable() {
|
|
|
|
@ -190,7 +181,7 @@ public class BlogDetailActivity extends BaseActivity {
|
|
|
|
|
private void setData(){
|
|
|
|
|
setBlogAuthorName(String.valueOf(blog.getUid()));
|
|
|
|
|
// setBColNumViewImage(blog.getBid(),BaseActivity.owner.getNetId()); 需要传入登录用户的id
|
|
|
|
|
setBColNumViewImage(blog.getBid(),1,2);
|
|
|
|
|
setBColNumViewImage(blog.getBid(),BaseActivity.owner.getNetId(),2);
|
|
|
|
|
bViewNumView.setText(String.valueOf(blog.getBbrowse()));
|
|
|
|
|
bTitleView.setText(blog.getBtittle());
|
|
|
|
|
bContentView.setText(blog.getBcontent());
|
|
|
|
@ -246,10 +237,9 @@ public class BlogDetailActivity extends BaseActivity {
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
String cont = comEditView.getText().toString();
|
|
|
|
|
|
|
|
|
|
//获取已登录的用户的信息获取后的结果为user:需要把这两句改成owner获取的user对象。
|
|
|
|
|
Data app= (Data) getApplication();
|
|
|
|
|
User user=app.getUser();
|
|
|
|
|
|
|
|
|
|
User user=new User();
|
|
|
|
|
user.setIduser(BaseActivity.owner.getNetId());
|
|
|
|
|
user.setUsername(BaseActivity.owner.getUsername());
|
|
|
|
|
|
|
|
|
|
long timeCurrent = System.currentTimeMillis();
|
|
|
|
|
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
|
|
|
|
@ -296,7 +286,7 @@ public class BlogDetailActivity extends BaseActivity {
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
Map<String,Integer> paramMap=new HashMap<String, Integer>();
|
|
|
|
|
paramMap.put("bid",blog.getBid());
|
|
|
|
|
paramMap.put("uid", 1);
|
|
|
|
|
paramMap.put("uid", BaseActivity.owner.getNetId());
|
|
|
|
|
paramMap.put("type",2);
|
|
|
|
|
String url_collect=BaseActivity.SERVER_URL+"/collect-servlet?action=InsertCollect";
|
|
|
|
|
|
|
|
|
|