[FEAT] General 接通取貨碼入口(供實機測試)

- General SaleFlowHandler.onPickupRequested() 開啟 FontendPickupCodeDialog
  (原為空,導致取貨碼點不到)
- 前台取貨碼浮鈕改由 flavor 資源 show_pickup_code_button 控制顯示:
  General=true 顯示,main/晟崴/中國醫=false 維持原本隱藏行為

至此 General 取貨碼與通行碼皆可實機測試。三 flavor 編譯/打包通過。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
sky121113 2026-06-10 09:42:30 +08:00
parent e8856d0a8b
commit f10f6f5879
4 changed files with 11 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import com.unibuy.smartdevice.R;
import com.unibuy.smartdevice.structure.SlotStructure;
import com.unibuy.smartdevice.tools.HandlerMain;
import com.unibuy.smartdevice.ui.dialog.BuyDialog;
import com.unibuy.smartdevice.ui.dialog.FontendPickupCodeDialog;
import com.unibuy.v2.UnibuyHelper;
import com.unibuy.v2.ui.ShoppingCartFragment;
@ -71,6 +72,7 @@ public class SaleFlowHandler {
}
public void onPickupRequested() {
// 通用版不處理取貨碼
// 通用版取貨碼開啟取貨碼輸入 Dialog
new FontendPickupCodeDialog(context, handlerMain).show();
}
}

View File

@ -8,4 +8,6 @@
<bool name="devset_default_shopping_cart">true</bool>
<bool name="devset_default_cash">true</bool>
<bool name="devset_default_line_pay">true</bool>
<!-- General 顯示前台取貨碼浮鈕 -->
<bool name="show_pickup_code_button">true</bool>
</resources>

View File

@ -713,7 +713,9 @@ public class FontendActivity extends AppCompatActivityAbstract implements SaleFl
}
});
binding.floatButtonPickupCode.setVisibility(View.GONE);
// 前台取貨碼浮鈕 flavor 設定決定是否顯示General 顯示其餘維持隱藏
binding.floatButtonPickupCode.setVisibility(
getResources().getBoolean(R.bool.show_pickup_code_button) ? VISIBLE : View.GONE);
binding.floatButtonShoppingCart.setOnClickListener(view -> {
// 改由 flavor SaleFlowHandler 決定General 開多品項購物車 Fragment

View File

@ -19,4 +19,7 @@
<bool name="devset_default_tap_pay_32">true</bool>
<bool name="devset_default_tap_pay_33">true</bool>
<bool name="devset_default_tap_pay_34">true</bool>
<!-- 前台「取貨碼」浮鈕是否顯示(各 flavor 可覆寫main 預設隱藏,維持原行為) -->
<bool name="show_pickup_code_button">false</bool>
</resources>