let showModal = true
export function showUniModal(modalTitle, content, whetherCancel, confirmText, pageUrl, cancelUrl) {
	if (showModal) {

		showModal = false;
		uni.showModal({
			id: 'testModal',
			title: modalTitle,
			content: content,
			showCancel: whetherCancel,
			confirmText: confirmText,
			success({
				confirm
			}) {
				if (confirm) {
					uni.navigateTo({
						url: pageUrl
					});
				} else {
					if (cancelUrl != '') {
						uni.switchTab({
							url: cancelUrl
						})
					}
				}
				showModal = true
			},
			fail() {
				showModal = true
			}
		});
	}
}
