'对接接口部分'

This commit is contained in:
2024-08-24 17:38:03 +08:00
parent 49226941c4
commit 2278766962
8 changed files with 483 additions and 322 deletions

26
utils/ui.js Normal file
View File

@@ -0,0 +1,26 @@
export const showToast = function(content,duration) {
if(!duration) duration = 2000
wx.showToast({
title: content,
icon: 'none',
duration: duration,
})
}
var isShowLoading = false
export const showLoading = function(title) {
if(isShowLoading) return
wx.showLoading({
title: title?title:'',
mask:true,
success:()=>{
isShowLoading = true
}
})
}
export const hideLoading = function() {
if(!isShowLoading) return
isShowLoading = false
wx.hideLoading()
}