查看: 102|回复: 0

[代码片段] 小程序震动核心代码

[复制链接]

117

主题

121

帖子

464

积分

管理员

子枫

Rank: 9Rank: 9Rank: 9

积分
464
发表于 2019-6-26 20:17:52 | 显示全部楼层 |阅读模式
[AppleScript] 纯文本查看 复制代码
a1: function(t) {
        this.hideModal(), wx.showToast({
            title: "渣男模式,启动中...",
            image: "/images/app/error.png",
            duration: 2e3
        }), this.setData({
            advise: "一堆渣男正在为你服务..."
        }), clearInterval(this.a), this.a = setInterval(function() {
            wx.vibrateLong({});
        }, 2e3);
    },
    a2: function(t) {
        this.hideModal(), wx.showToast({
            title: "屌丝模式,启动中...",
            image: "/images/app/error.png",
            duration: 2e3
        }), this.setData({
            advise: "一枚屌丝正在为你服务..."
        }), clearInterval(this.a), this.a = setInterval(function() {
            wx.vibrateLong({});
        }, 1500);
    },
    a3: function(t) {
        this.hideModal(), wx.showToast({
            title: "男友模式,启动中...",
            image: "/images/app/error.png",
            duration: 2e3
        }), this.setData({
            advise: "一个男友正在为你服务..."
        }), clearInterval(this.a), this.a = setInterval(function() {
            wx.vibrateShort({});
        }, 1e3);
    },
    a4: function(t) {
        this.hideModal(), wx.showToast({
            title: "男神模式,启动中...",
            image: "/images/app/error.png",
            duration: 2e3
        }), this.setData({
            advise: "一只男神正在为你服务..."
        }), clearInterval(this.a), this.a = setInterval(function() {
            wx.vibrateLong({});
        }, 600);
    },
    a5: function(t) {
        this.hideModal(), wx.showToast({
            title: "男优模式,启动中...",
            image: "/images/app/error.png",
            duration: 2e3
        }), this.setData({
            advise: "一号男优正在为你服务..."
        }), clearInterval(this.a), this.a = setInterval(function() {
            wx.vibrateLong({});
        }, 300);
    },
    a6: function(t) {
        this.hideModal(), wx.showToast({
            title: "刺激模式,启动中...",
            image: "/images/app/error.png",
            duration: 2e3
        }), this.setData({
            advise: "超级男友正在为你服务..."
        }), clearInterval(this.a), this.a = setInterval(function() {
            wx.vibrateShort({}), wx.vibrateLong({});
        }, 100);
    },
    vigorously: function() {
        wx.showToast({
            title: "你按疼我了",
            icon: "none"
        });
    },
    minusIntegral: function() {
        var t = this, e = this.data.USER;
        if (e.integral < 1) return this.a0(), wx.showModal({
            title: "积分不足",
            content: "观看视频,快速获得10积分",
            showCancel: !1,
            confirmText: "立即观看",
            success: function(e) {
                e.confirm && t.showVideo();
            }
        }), !1;
        var a = e;
        a.integral = e.integral - 1, n.dbsave("user", a).then(function(e) {
            wx.showToast({
                title: "积分-1",
                icon: "none",
                duration: 2e3
            }), n.putIn("USER", e), t.setData({
                USER: e
            });
        });
    },

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则