使用uni.showToast()无法满足项目要求,因为项目要求使用特定的字体样式。
plus.nativeUI.toast() 可以满足,仅适用app端的 唯一注意引入字体方式需要直接使用 static/... 路径,前面不需要添加其他绝对/相对路径修饰符。
api地址参考:https://www.html5plus.org/doc/zh_cn/nativeui.html#plus.nativeUI.ToastStyles
plus.nativeUI.toast("<font style=\"font-size:14px\">再按一次返回键退出<br/>点此可<a onclick=\"console.log('clicked')\">反馈意见</a></font>",
{type:'richtext',
duration:'long',
richTextStyle:{
align:'center',
fontSrc: 'static/font/...otf'
}
});