<template>
<view class="content">
<button @tap="push">发送推送</button>
<button @tap="push2">使用变量</button>
</view>
</template>
<script>
export default {
data() {
return {
title: '我是变量'
}
},
onLoad() {
},
methods: {
push() {
uni.createPushMessage({
title: '测试',
cover: false,
content: '测试',
sound: "system"
})
},
push2() {
uni.createPushMessage({
title: this.title,
cover: false,
content: this.title,
sound: "system"
})
}
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
</style>