Merge remote-tracking branch 'origin/master'

# Conflicts:
#	app/src/main/res/layout/activity_main.xml
master
hanxueqing 5 years ago
parent da1c5fe6ce
commit 7b0f069d3e

@ -52,7 +52,9 @@ public class SearchServiceGet {
//开始解析返回的数据
JSONObject jo=JSONObject.fromObject(response.toString());
code=jo.getInt("code");
System.out.println("code==@@@@@@@@@@20"+code);
if(code!=0){ //查询成功,在开始解析数据
System.out.println("code==@@@@@@@@@@20"+code);
name_back=jo.getString("message");//查询的主语
//把data看作一个JSONObject无论里面由多少元素都转换为JSONArray存在数组里
JSONObject jo_data=jo.getJSONObject("data");

@ -8,8 +8,8 @@ public interface ConditionCode {
* MedicineToOperation
* MedicineToSympton
*/
public final int DiseaseToSymptom=100;
public final int DiseaseToMedicines=200;
public final int DiseaseToSymptom=200;
public final int DiseaseToMedicines=100;
public final int MedicineToOperation=300;
public final int MedicineToSymptom=400;

@ -36,12 +36,19 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
Log.i("haha", "=======Oncli");
// //点击查找按钮之后,取出输入的句子,传给后台
String inputContent = search_edit.getText().toString();
// SearchServiceGet.executeSearchGet(inputContent);
SearchServiceGet.exxcuteTest(inputContent);
new Thread(new Runnable() {
@Override
public void run() {
SearchServiceGet.executeSearchGet(inputContent);
Intent intent = new Intent();
intent.setClass(getActivity(), SearchEntryActivity.class);
startActivity(intent);
}
}).start();
// SearchServiceGet.exxcuteTest(inputContent);
// //执行到这里已经把data里的数据取出来了或没有但是都要跳转页面到SearchEntryActivity页面
Intent intent = new Intent();
intent.setClass(getActivity(), SearchEntryActivity.class);
startActivity(intent);
}
});
}

Loading…
Cancel
Save