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

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

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