Property | Type | Default value | Description |
unit-id | string | - | Ad unit ID, which can be created in the ad module of the console. Required. |
bindload | eventhandler | - | Callback for successful ad load. |
binderror | eventhandler | - | Callback for ad load failure, event.detail = {errCode: 1002} |
Error code | Description | Reason |
1000 | Failed to call the backend API | This error is not caused by the developer. |
1001 | Parameter error | Incorrect usage. |
1002 | Invalid ad unit | Incorrect ad unit ID spelling or accidental use of another app's ad unit ID. |
1003 | Internal error | This error is not caused by the developer. |
1004 | No suitable ad | Ads do not appear every time; this time it might not appear because there are no ads that match the user's preferences. |
1010 | Ad feature disabled | The ad feature has been disabled. |
Property | Type | Default value | Description |
src | string | - | The URL of the HTML5-based web page that the web-view component points to. Configure the HTML5-based web page domain in the mini program management backend. When loading an offline HTML5-based web page, the src should start with file:// or / (pointing to an HTML page, e.g., file://xxx/index.html). You need to configure the staticPath property (an array of strings) in app.json, e.g. ["xxx"]. |
use-web-title | boolean | true | The title of the navigation bar of the page where the web-view component is located, whether or not to display the title of the H5 page. |
bindmessage | eventhandler | - | Triggered when the HTML5-based web page uses the wx.miniProgram.postMessage to send a message to the mini program. This occurs during back navigation, component destruction, or sharing. e.detail = { data }, where data is an array of parameters from multiple postMessage calls. |
bindload | eventhandler | - | Triggered when the HTML5-based web page is loaded successfully. e.detail = { src } |
binderror | eventhandler | - | Triggered when the HTML5-based web page fails to load. e.detail = { url, fullUrl }, where fullUrl is the complete URL that failed to load. |
bindevent | eventhandler | - | Triggered when the HTML5-based web page uses the wx.miniProgram.sendWebviewEvent to send a message to the mini program. e.detail = { data }, where data is the parameter from sendWebviewEvent. |
<title></title>(HTML5 with title configured and use-web-title is true) > navigationBarTitleText(page.json)> navigationBarTitleText(app.json)Scope | APIs | Description |
scope.userinfo | wx.getUserInfo | User information. |
scope.userLocation | wx.getLocation、wx.startLocationUpdate、wx.startLocationUpdateBackground | Gets geographic location information. |
scope.userFuzzyLocation | wx.getFuzzyLocation | Gets approximate geographic location information. |
scope.record | live-pusher component or wx.startRecord, wx.operateRecorder | Live streaming or recording. |
scope.camera | Camera component | Camera component. |
scope.addPhoneCalendar | wx.addPhoneCalendar | Adds logs. |
scope.writePhotosAlbum | wx.saveImageToPhotosAlbum | Saves images to an album. |
scope.bluetooth | wx.openBluetoothAdapter | Bluetooth. |
scope.chooseImage | wx.chooseImage | Selects images in the album. |
scope.chooseVideo | wx.chooseVideo | Selects videos in the album. |
scope.chooseMedia | wx.chooseMedia | Selects images or videos from the album. |
scope.makeMedia | wx.makeMedia | Takes photos or videos. |
scope.addPhoneContact | wx.addPhoneContact、wx.chooseContact | Adds/selects contacts. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback