weixin:// 打開微信
weixin://dl/scan 掃一掃
weixin://dl/feedback 反饋
weixin://dl/moments 朋友圈
weixin://dl/settings 設置
weixin://dl/notifications 消息通知設置
weixin://dl/chat 聊天設置
weixin://dl/general 通用設置
weixin://dl/officialaccounts 公衆號
weixin://dl/games 遊戲
weixin://dl/help 幫助
weixin://dl/feedback 反饋
weixin://dl/profile 個人信息
weixin://dl/features 功能插件
data(){
return{
url: 'weixin://'
}
},
methods:{
clickWechat() { //打開外部微信
plus.runtime.openURL(this.url, function(res) {
console.log(res);
});
}
}
判斷是否爲微信內置瀏覽器
var agent = navigator.userAgent.toLowerCase();
if (agent.match(/MicroMessenger/i) == "micromessenger") {
console.log("是在微信內置瀏覽器裏面")
} else {
console.log("不在微信內置瀏覽器裏面")
}