tencent cloud

Tencent Cloud Super App as a Service

Customizing Virtual Domain

Download
Focus Mode
Font Size
Last updated: 2025-07-04 17:33:28
AI-Translated
The mini program uses a default virtual domain, which is not a real domain and cannot be accessed in a browser. To customize it, follow the configuration below.
The default virtual domain is shown as follows:

To customize the virtual domain, override the configData method in BaseMiniAppProxyImpl class and intercept the method where configType is MiniConfigData.TYPE_DOMAIN to implement customization.
Example:
@Override
public MiniConfigData configData(Context context, int configType, JSONObject params) {
if(configType == MiniConfigData.TYPE_DOMAIN) {
// Virtual domain configuration
MiniConfigData.DomainConfig domainConfig = new MiniConfigData.DomainConfig();
domainConfig.domain = "test.com";

return new MiniConfigData
.Builder()
.domainConfig(domainConfig)
.build();
}
return new MiniConfigData
.Builder()
.build();
}





Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback