2021-08-10 工作记录--apiCloud-封装消息提示的方法
作者:互联网
一、apiCloud-封装消息提示的方法
/*** 消息提示 ****/
function showMsg(type, data, call) {
switch (type) {
case "success":
api.toast({
msg: data,
duration: 2000,
location: 'middle'
}, call);
break;
case "fail":
api.toast({
msg: data,
duration: 2000,
location: 'middle'
}, call);
break;
case "loading":
api.showProgress({
title: '努力加载中...',
text: '先喝杯茶...',
modal: false
});
break;
case "zdy":
api.toast({
msg: data,
duration: 2000,
location: 'middle'
}, call);
break;
case "zdy1":
api.toast({
msg: data,
duration: 2000,
location: 'middle'
}, call);
break;
case "zdy2":
api.toast({
msg: data,
duration: 2000,
location: 'bottom'
}, call);
break;
default:
break;
}
}
举例:
标签:case,10,apiCloud,--,break,api,call,duration,data 来源: https://blog.csdn.net/weixin_48850734/article/details/121432283