微信小程序如何做到跳转和提示

小程序返回弹框
出现确定
  wx.showModal({
      title: '提示',
      content: '请选择规格~',
      showCancel: false
   });
直接显示自动消失
  wx.showToast({
        title: '请选择规格!',
        icon: 'none',  //none | success  https://blog.csdn.net/qq_39702981/article/details/86707520
        duration: 2000
   })
小程序跳转
toIndexPage:function(){
    wx.switchTab({
           url: "/pages/index/index"
    });
}
微信小程序如何做到跳转和提示

相关文章:

你感兴趣的文章:

标签云: