怎么在分享成功的会回调里执行api外的自定义函数?
发布于 7 年前 作者 weigao 10438 次浏览 来自 问答
wx.shareAppMessage({
                title: "",
                path: '/pages/share/share?id=123',
                imageUrl: '',
                success(res){
                    console.log("转发成功!!!");
                        this.test();
                    }
                },

……


test: function(){
       console.log("-----------2222222");
   },

要执行这样的效果要怎么做?  现在这样就是就是直接报:this.test is not a function; at api shareAppMessage success callback function……

跪求各位大牛指点一二!!!

1 回复

外面定义 var that=this,里面的this换成that

回到顶部