my.setNavigationBar

Set the navigation bar text and style.

Sample Code

copy
my.setNavigationBar({
  title: 'hello',
  backgroundColor: '#108ee9',
  success() {
    my.alert({
      content: 'Success', 
    });
  },
  fail() {
    my.alert({
      content: 'Failed',
    });
  },
});

Parameters

NameTypeMandatoryDescription
titleStringNoNavigation bar title
imageStringNoPicture link address, must be https. Use 3x high-definition pictures. If the image is set, the title parameter is inactive.
backgroundColorStringNoNavigation bar background color, supporting hex color value
borderBottomColorStringNoNavigation bar bottom border color, supporting hex color value If the backgroundColor is set, the borderBottomColor does not take effect. The backgroundColor is used by default.
resetBooleanNoIf the navigation bar is reset to the default color scheme of Alipay, false by default.
successFunctionNoCallback function upon call success
failFunctionNoCallback function upon call failure
completeFunctionNoCallback function upon call completion (to be executed upon either call success or failure)