Commit 290ba320 authored by 赵鹏翔's avatar 赵鹏翔

查看系统信息功能完善,渠道配置处理

parent c265d99c
...@@ -27,6 +27,8 @@ android { ...@@ -27,6 +27,8 @@ android {
versionName VERSION_NAME.toString() versionName VERSION_NAME.toString()
multiDexEnabled true multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildConfigField 'String', "CHANNEL", "\"$CHANNEL\""
buildConfigField "String", "appType", "\"mpos\""
} }
buildTypes { buildTypes {
...@@ -112,5 +114,5 @@ static String buildTime() { ...@@ -112,5 +114,5 @@ static String buildTime() {
} }
String getAppChannel() { String getAppChannel() {
return project.channel return project.CHANNEL
} }
\ No newline at end of file
...@@ -7,10 +7,13 @@ import android.view.View; ...@@ -7,10 +7,13 @@ import android.view.View;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.TextView; import android.widget.TextView;
import com.miya.fastcashier.BuildConfig;
import com.miya.fastcashier.R; import com.miya.fastcashier.R;
import com.miya.fastcashier.beans.SelfCashierAccountInfo; import com.miya.fastcashier.beans.SelfCashierAccountInfo;
import com.miya.fastcashier.databinding.DialogSystemParameterBinding; import com.miya.fastcashier.databinding.DialogSystemParameterBinding;
import com.miya.fastcashier.service.AccountService; import com.miya.fastcashier.service.AccountService;
import com.miya.fastcashier.service.LoginService;
import com.miya.print.PrinterManager;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
...@@ -38,15 +41,15 @@ public class SystemParameterDialog extends Dialog { ...@@ -38,15 +41,15 @@ public class SystemParameterDialog extends Dialog {
setInfo(viewBinding.tvMerchantNum, accountInfo.getShopInfo().getHhMerchant()); setInfo(viewBinding.tvMerchantNum, accountInfo.getShopInfo().getHhMerchant());
setInfo(viewBinding.tvPos, accountInfo.getShopInfo().getPosId()); setInfo(viewBinding.tvPos, accountInfo.getShopInfo().getPosId());
setInfo(viewBinding.tvCashier, accountInfo.getShopInfo().getOperatorId()); setInfo(viewBinding.tvCashier, accountInfo.getShopInfo().getOperatorId());
// setInfo(viewBinding.tvVersionType, "fastCashier_" + BuildConfig.appType); setInfo(viewBinding.tvVersionType, "fastCashier_" + BuildConfig.appType);
setInfo(viewBinding.tvEquipment, "sunmi_v2pro"); setInfo(viewBinding.tvEquipment, "sunmi_v2pro");
// setInfo(viewBinding.tvServerUrl, LoginService.Companion.getBaseUrl()); setInfo(viewBinding.tvServerUrl, LoginService.Companion.getBaseUrl());
// setInfo(viewBinding.tvWifiName, BaseFunctionKt.getWifyName(getContext())); // setInfo(viewBinding.tvWifiName, BaseFunctionKt.getWifyName(getContext()));
// setInfo(viewBinding.tvNetIp, BaseFunctionKt.getNetIp(getContext()) == null ? "未知" : BaseFunctionKt.getNetIp(getContext())); // setInfo(viewBinding.tvNetIp, BaseFunctionKt.getNetIp(getContext()) == null ? "未知" : BaseFunctionKt.getNetIp(getContext()));
// setInfo(viewBinding.tvPrintType, PrinterManager.getInstance().getPrinter() == null ? setInfo(viewBinding.tvPrintType, PrinterManager.getInstance().getPrinter() == null ?
// getContext().getResources().getString(R.string.app_unkown) : getContext().getResources().getString(R.string.app_unkown) :
// PrinterManager.getInstance().getPrinter().getPrinterName()); PrinterManager.getInstance().getPrinter().getPrinterName());
// setInfo(viewBinding.tvChannel, BuildConfig.CHANNEL); setInfo(viewBinding.tvChannel, BuildConfig.CHANNEL);
viewBinding.ivClose.setOnClickListener(new View.OnClickListener() { viewBinding.ivClose.setOnClickListener(new View.OnClickListener() {
@Override @Override
......
...@@ -47,6 +47,9 @@ interface LoginService { ...@@ -47,6 +47,9 @@ interface LoginService {
return service!! return service!!
} }
fun getBaseUrl():String{
return BASE_URL
}
} }
} }
\ No newline at end of file
...@@ -22,4 +22,4 @@ android.jetifier.blacklist=miya-print ...@@ -22,4 +22,4 @@ android.jetifier.blacklist=miya-print
android.useDeprecatedNdk=true android.useDeprecatedNdk=true
#区别品牌 #区别品牌
channel=CONVERSE CHANNEL=converse
\ No newline at end of file \ No newline at end of file
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