let dialog = {};

/**
 * 封装模态框
 */
dialog.showModal=(content,isShowCancel=true,title='提示',)=>{
    return new Promise((resolve,reject)=>{
        uni.showModal({
			title: title,
			content: content,
			confirmColor:"#5a3ee8",
			showCancel:isShowCancel,
			success: (res)=>{
				if (res.confirm) {
					resolve(res)
				} 
			}
		});
	})
}
dialog.showLoading=(title='加载中...')=>{
	uni.showLoading({
		title
	})
}


export default dialog
