短通知 + 上部消息

This commit is contained in:
limqhz
2022-12-12 18:05:49 +08:00
parent 44df516337
commit 0efe64d1bb
34 changed files with 1262 additions and 58 deletions

View File

@@ -1,4 +1,6 @@
// pages/message/index.js
import Toast from '../../components/toast/index';
import Message from '../../components/message/index';
Page({
/**
@@ -7,60 +9,27 @@ Page({
data: {
aIconList: ['check-rectangle','star','notification-filled','circle'],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
toast(option) {
Toast({
context: this,
selector: '#t-toast',
...option,
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
startVipButton(e){
this.toast({
message: '已获得会员资格!',
theme: 'success',
placement: 'bottom',
direction: 'column',
});
Message.info({
context: this,
offset: [20, 32],
marquee: { speed: 50, loop: -1, delay: 5000 },
icon: false,
content: '请关注微信公众号Quinn,回复"VIP"',
duration: -1,
});
}
})