<template>
<view class=”content”>
<button @tap=”test”> 跳转微信 </button>
</view>
</template>
<script>
export default {
data() {
return {
};
},
onReady: function() {},
methods: {
test() {
console.log(‘1’);
var UIApplication = plus.ios.import(‘UIApplication’);
var NSURL = plus.ios.import(‘NSURL’);
var setting = NSURL.URLWithString(‘weixin://’);
var application = UIApplication.sharedApplication();
application.openURL(setting);
plus.ios.deleteObject(setting);
plus.ios.deleteObject(application);
},
}
};
</script>
<style>
</style>