Commit 927f090f by wjg

添加控件点击水波纹

parent 02b964e1
...@@ -3,6 +3,7 @@ package com.ihaoin.hooloo.device; ...@@ -3,6 +3,7 @@ package com.ihaoin.hooloo.device;
import android.app.Application; import android.app.Application;
import android.util.Log; import android.util.Log;
import com.ihaoin.hooloo.device.component.PushMessageReceiver;
import com.ihaoin.hooloo.device.config.AppConfig; import com.ihaoin.hooloo.device.config.AppConfig;
import com.ihaoin.hooloo.device.data.MainData; import com.ihaoin.hooloo.device.data.MainData;
import com.ihaoin.hooloo.device.network.HttpUtil; import com.ihaoin.hooloo.device.network.HttpUtil;
...@@ -32,7 +33,7 @@ public class HLApplication extends Application { ...@@ -32,7 +33,7 @@ public class HLApplication extends Application {
JPushInterface.init(this); JPushInterface.init(this);
String registrationId = JPushInterface.getRegistrationID(this); String registrationId = JPushInterface.getRegistrationID(this);
Log.d("PushMessageReceiver", registrationId); Log.d(PushMessageReceiver.TAG, registrationId);
if (!StringUtils.isEmpty(registrationId)) { if (!StringUtils.isEmpty(registrationId)) {
HttpUtil.postRegistrationId(registrationId, null); HttpUtil.postRegistrationId(registrationId, null);
} }
......
...@@ -33,7 +33,7 @@ public class RecommendAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseVi ...@@ -33,7 +33,7 @@ public class RecommendAdapter extends BaseSectionQuickAdapter<ScrollBean, BaseVi
protected void convert(BaseViewHolder helper, ScrollBean item) { protected void convert(BaseViewHolder helper, ScrollBean item) {
ScrollBean.ScrollItemBean t = item.t; ScrollBean.ScrollItemBean t = item.t;
Recommend recommend = (Recommend) t.getObject(); Recommend recommend = (Recommend) t.getObject();
helper.setText(R.id.txt_name, recommend.getGoodsName()); helper.setText(R.id.txt_name, recommend.getTitle());
helper.setText(R.id.txt_intro, recommend.getDesc()); helper.setText(R.id.txt_intro, recommend.getDesc());
ImageView imgRecommend = helper.getView(R.id.img_recommend); ImageView imgRecommend = helper.getView(R.id.img_recommend);
......
...@@ -22,7 +22,7 @@ import cn.jpush.android.api.NotificationMessage; ...@@ -22,7 +22,7 @@ import cn.jpush.android.api.NotificationMessage;
import cn.jpush.android.service.JPushMessageReceiver; import cn.jpush.android.service.JPushMessageReceiver;
public class PushMessageReceiver extends JPushMessageReceiver { public class PushMessageReceiver extends JPushMessageReceiver {
private static final String TAG = "PushMessageReceiver"; public static final String TAG = "HL_PushMessageReceiver";
private static Map<String, Handler> subscribers = new HashMap<>(); private static Map<String, Handler> subscribers = new HashMap<>();
public static void subscribe(String key, Handler handler) { public static void subscribe(String key, Handler handler) {
......
...@@ -8,6 +8,6 @@ public class AppConfig { ...@@ -8,6 +8,6 @@ public class AppConfig {
/** 机器编码 */ /** 机器编码 */
public static String MACHINE_CODE = ""; public static String MACHINE_CODE = "";
/** 打开微信网址 */ /** 打开微信网址 */
public static String WX_URL = "https://hooloo.gdatac.com/order/create/?id=%s"; public static String WX_URL = "http://hooloo.gdatac.com/c2?id=%s";
} }
...@@ -6,7 +6,7 @@ public class Recommend implements Serializable { ...@@ -6,7 +6,7 @@ public class Recommend implements Serializable {
/** /**
* 推荐标题 * 推荐标题
*/ */
private String goodsName; private String title;
/** /**
* 推荐介绍 * 推荐介绍
...@@ -23,12 +23,12 @@ public class Recommend implements Serializable { ...@@ -23,12 +23,12 @@ public class Recommend implements Serializable {
*/ */
private Goods goods; private Goods goods;
public String getGoodsName() { public String getTitle() {
return goodsName; return title;
} }
public void setGoodsName(String goodsName) { public void setTitle(String title) {
this.goodsName = goodsName; this.title = title;
} }
public String getDesc() { public String getDesc() {
......
...@@ -2,8 +2,7 @@ package com.ihaoin.hooloo.device.network; ...@@ -2,8 +2,7 @@ package com.ihaoin.hooloo.device.network;
public class HttpParams { public class HttpParams {
private static final String HOST = "http://114.115.234.81:8080"; private static final String HOST = "https://hooloo-api.gdatac.com/";
/** 首页获取数据 */ /** 首页获取数据 */
public static final String GET_MAIN_DATA = HOST + "/application/getOrderTaking?machineCode=%s"; public static final String GET_MAIN_DATA = HOST + "/application/getOrderTaking?machineCode=%s";
/** 获取订单信息 */ /** 获取订单信息 */
......
...@@ -157,7 +157,7 @@ public class ConfirmOrderDialog extends Dialog { ...@@ -157,7 +157,7 @@ public class ConfirmOrderDialog extends Dialog {
confirmOrder.setSeqNo(genSeqNo()); confirmOrder.setSeqNo(genSeqNo());
confirmOrder.setGoods(goods); confirmOrder.setGoods(goods);
String json = JsonUtils.getMapper().writeValueAsString(confirmOrder); String json = JsonUtils.getMapper().writeValueAsString(confirmOrder);
Log.d("TEST", json); Log.d(AppConfig.DEBUG_TAG, json);
return json; return json;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -276,6 +276,7 @@ public class ConfirmOrderDialog extends Dialog { ...@@ -276,6 +276,7 @@ public class ConfirmOrderDialog extends Dialog {
} }
String id = obj.toString(); String id = obj.toString();
id = AppConfig.MACHINE_CODE;
Bitmap bitmap = genQRCode(id); Bitmap bitmap = genQRCode(id);
imgQRCode.setImageBitmap(bitmap); imgQRCode.setImageBitmap(bitmap);
startExpireThread(); startExpireThread();
......
...@@ -149,7 +149,6 @@ public class LauncherActivity extends Activity { ...@@ -149,7 +149,6 @@ public class LauncherActivity extends Activity {
class MySpanSizeLookup extends GridLayoutManager.SpanSizeLookup { class MySpanSizeLookup extends GridLayoutManager.SpanSizeLookup {
@Override @Override
public int getSpanSize(int position) { public int getSpanSize(int position) {
Log.d("TEST", "position:" + position);
if (position == 0 || position == 1) { if (position == 0 || position == 1) {
return 2; return 2;
} }
......
...@@ -178,8 +178,14 @@ public class MenuPresentation extends Presentation { ...@@ -178,8 +178,14 @@ public class MenuPresentation extends Presentation {
if (msg.what != 1) { if (msg.what != 1) {
return; return;
} }
String body = "[{\"state\":1,\"desc\":\"制作中\",\"orders\":[{\"orderId\":1011,\"orderNo\":\"N20220220A19231\",\"orderNumber\":\"Mon101\"},{\"orderId\":1012,\"orderNo\":\"N20220220A19232\",\"orderNumber\":\"Mon102\"},{\"orderId\":1013,\"orderNo\":\"N20220220A19233\",\"orderNumber\":\"Mon103\"}]},{\"state\":2,\"desc\":\"待制作\",\"orders\":[{\"orderId\":1014,\"orderNo\":\"N20220220A19234\",\"orderNumber\":\"Mon104\"},{\"orderId\":1015,\"orderNo\":\"N20220220A19235\",\"orderNumber\":\"Mon105\"},{\"orderId\":1016,\"orderNo\":\"N20220220A19236\",\"orderNumber\":\"Mon106\"},{\"orderId\":1017,\"orderNo\":\"N20220220A19237\",\"orderNumber\":\"Mon107\"},{\"orderId\":1018,\"orderNo\":\"N20220220A19238\",\"orderNumber\":\"Mon108\"}]},{\"state\":3,\"desc\":\"可取餐\",\"orders\":[{\"orderId\":1019,\"orderNo\":\"N20220220A19239\",\"orderNumber\":\"Mon109\"},{\"orderId\":1001,\"orderNo\":\"N20220220A19221\",\"orderNumber\":\"Mon121\"},{\"orderId\":1002,\"orderNo\":\"N20220220A19222\",\"orderNumber\":\"Mon122\"},{\"orderId\":1003,\"orderNo\":\"N20220220A19223\",\"orderNumber\":\"Mon123\"},{\"orderId\":1004,\"orderNo\":\"N20220220A19224\",\"orderNumber\":\"Mon124\"},{\"orderId\":1005,\"orderNo\":\"N20220220A19241\",\"orderNumber\":\"Mon141\"},{\"orderId\":1006,\"orderNo\":\"N20220220A19251\",\"orderNumber\":\"Mon151\"}]}]"; // String body = "[{\"state\":1,\"desc\":\"制作中\",\"orders\":[{\"orderId\":1011,\"orderNo\":\"N20220220A19231\",\"orderNumber\":\"Mon101\"},{\"orderId\":1012,\"orderNo\":\"N20220220A19232\",\"orderNumber\":\"Mon102\"},{\"orderId\":1013,\"orderNo\":\"N20220220A19233\",\"orderNumber\":\"Mon103\"}]},{\"state\":2,\"desc\":\"待制作\",\"orders\":[{\"orderId\":1014,\"orderNo\":\"N20220220A19234\",\"orderNumber\":\"Mon104\"},{\"orderId\":1015,\"orderNo\":\"N20220220A19235\",\"orderNumber\":\"Mon105\"},{\"orderId\":1016,\"orderNo\":\"N20220220A19236\",\"orderNumber\":\"Mon106\"},{\"orderId\":1017,\"orderNo\":\"N20220220A19237\",\"orderNumber\":\"Mon107\"},{\"orderId\":1018,\"orderNo\":\"N20220220A19238\",\"orderNumber\":\"Mon108\"}]},{\"state\":3,\"desc\":\"可取餐\",\"orders\":[{\"orderId\":1019,\"orderNo\":\"N20220220A19239\",\"orderNumber\":\"Mon109\"},{\"orderId\":1001,\"orderNo\":\"N20220220A19221\",\"orderNumber\":\"Mon121\"},{\"orderId\":1002,\"orderNo\":\"N20220220A19222\",\"orderNumber\":\"Mon122\"},{\"orderId\":1003,\"orderNo\":\"N20220220A19223\",\"orderNumber\":\"Mon123\"},{\"orderId\":1004,\"orderNo\":\"N20220220A19224\",\"orderNumber\":\"Mon124\"},{\"orderId\":1005,\"orderNo\":\"N20220220A19241\",\"orderNumber\":\"Mon141\"},{\"orderId\":1006,\"orderNo\":\"N20220220A19251\",\"orderNumber\":\"Mon151\"}]}]";
// setDatas(msg.obj.toString()); if (msg.obj == null) {
return;
}
String body = msg.obj.toString();
if (StringUtils.isEmpty(body)) {
return;
}
setDatas(body); setDatas(body);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment