codecamp

tt.hideLoading

从基础库 1.0.0 开始支持。

隐藏 loading 提示框。


参数

Object object

属性类型默认值必填说明
successfunction接口调用成功后的回调函数
failfunction接口调用失败后的回调函数
completefunction接口调用结束后的回调函数(调用成功、失败都会执行)


代码示例

tt.hideLoading({
  success(res) {
    console.log(`${res}`);
  },
  fail(res) {
    console.log(`hideLoading调用失败`);
  }
});


Bug & Tip

  • loading 的实现基于 toast,所以hideLoading也会将 toast 隐藏。
tt.showActionSheet
showFavoriteGuide
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

无标题目录

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题文章

无标题目录

无标题文章

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }