swan.setMetaKeywords

不推荐使用。 解释: 设置 web 版小程序 keywords meta 信息。此方法为 web 版小程序专用方法,使用前需判断方法是否存在。

方法参数

Object object

object参数说明

示例

在开发者工具中预览效果

扫码体验

在开发者工具中,单击“预览”,输入您的APPID,单击“WEB预览”,百度APP中扫码体验。

图片示例

代码示例

-

  1. <view class="wrap"> <button type="primary" bindtap="setMetaKeywords">setMetaKeywords</button></view>

-

  1. Page({ onShow() { swan.setMetaKeywords({ content: '小程序, 关键字', success: res => { console.log('setMetaKeywords success', res); }, fail: err => { console.log('setMetaKeywords fail', err); } }); }});

-

  1. .wrap { padding: 50rpx 30rpx;}