my.getRunScene
Note:
- The basic library 1.10.0 and above versions support this interface. The lower versions need to complete compatibility process. For the operation, see Mini program basic library.
- mPaaS 1.10.60 and above versions support this interface.
This interface is used to obtain the current running version of the Mini Program.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
success|Function| No |The callback function for a successful API call.fail|Function |No |The callback function for a failed API call.complete|Function |No |The callback function used when the API call is completed. This function is always executed no matter the call succeeds or fails.
Return value on success
Parameter | Type | Description |
---|---|---|
envVersion | String | The current running version of the Mini program. Enumerated types include: develop (development version), trial (experience version), release (release version). |
Error code
Error code | Description |
---|---|
3 | Unknown error occurred. |
Code sample
my.getRunScene({
success(result) {
my.alert({
title: 'Mini program version',
content:`${result.envVersion}`
});
},
})