Commit 0f8ff26c by wjg

修改购物车数据格式

parent 235a6e22
...@@ -3,12 +3,13 @@ package com.ihaoin.hooloo.device.config; ...@@ -3,12 +3,13 @@ package com.ihaoin.hooloo.device.config;
public class AppConfig { public class AppConfig {
public static Boolean DEBUG = true; // TODO false public static Boolean DEBUG = true; // TODO false
public static String TAG = "HL_TEST"; public static String HL = "HL";
public static String TAG_PUSH = TAG + "_PUSH"; public static String TAG = HL + "_TEST";
public static String TAG_NETWORK = TAG + "_NETWORK"; public static String TAG_PUSH = HL + "_PUSH";
public static String TAG_NETWORK = HL + "_NETWORK";
/** 点单屏编码 */ /** 点单屏编码 */
public static String DEFAULT_SCREEN_NO = "A"; public static String DEFAULT_SCREEN_NO = "1";
/** 机器编码 */ /** 机器编码 */
public static String MACHINE_CODE = ""; public static String MACHINE_CODE = "";
/** 打开微信网址 */ /** 打开微信网址 */
......
...@@ -72,7 +72,7 @@ public class SettingsActivity extends Activity { ...@@ -72,7 +72,7 @@ public class SettingsActivity extends Activity {
private void showEditScreen() { private void showEditScreen() {
AlertDialog.Builder builder = new AlertDialog.Builder(this); AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("修改点单屏编码"); builder.setTitle("修改点单屏编码");
String[] items = new String[]{"A", "B"}; String[] items = new String[]{"1", "2"};
builder.setSingleChoiceItems(items, StringUtils.indexOf(items, SharedPreferencesUtils.getScreenNo(SettingsActivity.this)), (dialog, which) -> { builder.setSingleChoiceItems(items, StringUtils.indexOf(items, SharedPreferencesUtils.getScreenNo(SettingsActivity.this)), (dialog, which) -> {
SharedPreferencesUtils.setScreenNo(SettingsActivity.this, items[which]); SharedPreferencesUtils.setScreenNo(SettingsActivity.this, items[which]);
txtScreenNo.setText(SharedPreferencesUtils.getScreenNo(SettingsActivity.this)); txtScreenNo.setText(SharedPreferencesUtils.getScreenNo(SettingsActivity.this));
......
...@@ -94,7 +94,7 @@ public class TrolleyView extends RelativeLayout { ...@@ -94,7 +94,7 @@ public class TrolleyView extends RelativeLayout {
public void handleMessage(@NonNull Message msg) { public void handleMessage(@NonNull Message msg) {
super.handleMessage(msg); super.handleMessage(msg);
if (msg.what != 1) { if (msg.what != 1) {
Toast.makeText(getContext(), ((Exception) msg.obj).getMessage(), Toast.LENGTH_SHORT).show(); Toast.makeText(getContext(), R.string.error_check_sku, Toast.LENGTH_SHORT).show();
return; return;
} }
addGoods(goods, sku, count); addGoods(goods, sku, count);
......
...@@ -10,4 +10,5 @@ ...@@ -10,4 +10,5 @@
<string name="error_price">商品金额错误</string> <string name="error_price">商品金额错误</string>
<string name="error_sku_state">本商品已售罄或已经下架</string> <string name="error_sku_state">本商品已售罄或已经下架</string>
<string name="error_load_main_data">获取数据失败</string> <string name="error_load_main_data">获取数据失败</string>
<string name="error_check_sku">商品状态获取失败</string>
</resources> </resources>
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