|
|
-
- function showLoading(title= '加载中...'){
- uni.showLoading({
- title: title,
- duration: 10000,
- mask: true
- })
- }
-
- function hideLoading(){
- uni.hideLoading();
- }
-
-
- function showToast (title) {
- uni.showToast({
- title:title,
- icon:"none",
- duration: 2000,
- mask: false
- })
- }
-
- function showToastSuccess(title){
- uni.showToast({
- title: title,
- icon: "success",
- duration: 2000,
- mask:false
- })
- }
-
- function isExist(value) {
- if (value !== null && value !== undefined && value !== "undefined" && value !== "null" && value.length > 0) {
- return true;
- } else {
- return false;
- }
- }
-
- export default {
- showToast: showToast,
- showLoading: showLoading,
- hideLoading: hideLoading,
- showToastSuccess: showToastSuccess,
- isExist: isExist
- }
-
|