//設(shè)置微信的基本配置
????????????Vue.wechat.config({
??????????????debug:?false,?//?開啟調(diào)試模式,調(diào)用的所有api的返回值會(huì)在客戶端alert出來,若要查看傳入的參數(shù)挑豌,可以在pc端打開排苍,參數(shù)信息會(huì)通過log打出趁猴,僅在pc端時(shí)才會(huì)打印糖耸。
??????????????appId:?data.appId,?//?必填,公眾號(hào)的唯一標(biāo)識(shí)APPID
??????????????timestamp:?data.timestamp,?//?必填蛛勉,生成簽名的時(shí)間戳?10位
??????????????nonceStr:?data.noncestr,?//?必填鹿寻,生成簽名的隨機(jī)串
??????????????signature:?data.signature,?//?必填,簽名
??????????????jsApiList:?[
????????????????'hideMenuItems'?//?隱藏微信菜單按鈕
??????????????]?//?必填诽凌,需要使用的JS接口列表
????????????})
????????????Vue.wechat.ready(()?=>?{
??????????????console.log('微信效驗(yàn)成功')
??????????????Vue.wechat.hideMenuItems({
????????????menuList:?[
??????????????'menuItem:share:appMessage',?
??????????????'menuItem:share:timeline',?
??????????????'menuItem:share:qq',?
??????????????'menuItem:share:QZone',?
??????????????'menuItem:openWithSafari',
??????????????'menuItem:openWithQQBrowser',
??????????????'menuItem:favorite',
??????????????'menuItem:copyUrl'
????????????]
??????????})
????????????});
菜單項(xiàng)列表
基本類
舉報(bào): "menuItem:exposeArticle"
調(diào)整字體: "menuItem:setFont"
日間模式: "menuItem:dayMode"
夜間模式: "menuItem:nightMode"
刷新: "menuItem:refresh"
查看公眾號(hào)(已添加): "menuItem:profile"
查看公眾號(hào)(未添加): "menuItem:addContact"
傳播類
發(fā)送給朋友: "menuItem:share:appMessage"
分享到朋友圈: "menuItem:share:timeline"
分享到QQ: "menuItem:share:qq"
分享到Weibo: "menuItem:share:weiboApp"
收藏: "menuItem:favorite"
分享到FB: "menuItem:share:facebook"
分享到 QQ 空間:menuItem:share:QZone
保護(hù)類
編輯標(biāo)簽: "menuItem:editTag"
刪除: "menuItem:delete"
復(fù)制鏈接: "menuItem:copyUrl"
原網(wǎng)頁: "menuItem:originPage"
閱讀模式: "menuItem:readMode"
在QQ瀏覽器中打開: "menuItem:openWithQQBrowser"
在Safari中打開: "menuItem:openWithSafari"
郵件: "menuItem:share:email"
一些特殊公眾號(hào): "menuItem:share:brand"