Commit 0f8ff26c by wjg

修改购物车数据格式

parent 235a6e22
......@@ -3,12 +3,13 @@ package com.ihaoin.hooloo.device.config;
public class AppConfig {
public static Boolean DEBUG = true; // TODO false
public static String TAG = "HL_TEST";
public static String TAG_PUSH = TAG + "_PUSH";
public static String TAG_NETWORK = TAG + "_NETWORK";
public static String HL = "HL";
public static String TAG = HL + "_TEST";
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 = "";
/** 打开微信网址 */
......
......@@ -72,7 +72,7 @@ public class SettingsActivity extends Activity {
private void showEditScreen() {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
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) -> {
SharedPreferencesUtils.setScreenNo(SettingsActivity.this, items[which]);
txtScreenNo.setText(SharedPreferencesUtils.getScreenNo(SettingsActivity.this));
......
......@@ -94,7 +94,7 @@ public class TrolleyView extends RelativeLayout {
public void handleMessage(@NonNull Message msg) {
super.handleMessage(msg);
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;
}
addGoods(goods, sku, count);
......
......@@ -10,4 +10,5 @@
<string name="error_price">商品金额错误</string>
<string name="error_sku_state">本商品已售罄或已经下架</string>
<string name="error_load_main_data">获取数据失败</string>
<string name="error_check_sku">商品状态获取失败</string>
</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