feat: 首次提交

This commit is contained in:
peerless_hero
2023-08-17 21:28:49 +08:00
parent 36f80fb971
commit ec1e5e16cd
571 changed files with 95322 additions and 0 deletions

57
common/fui-app.js Normal file
View File

@ -0,0 +1,57 @@
// 本文件由FirstUI授权予新疆天衡创新研究院有限公司手机号18614 0 72 5 4 9身份证尾号5A07X5专用请尊重知识产权勿私下传播违者追究法律责任。
const fui = {
toast: function(text) {
text && uni.showToast({
title: text,
icon: 'none',
duration: 2000
})
},
modal: function(title, content, callback, showCancel, confirmColor, confirmText) {
uni.showModal({
title: title,
content: content,
showCancel: showCancel || false,
// #ifndef MP-TOUTIAO
cancelColor: "#7F7F7F",
confirmColor: confirmColor || "#465CFF",
// #endif
confirmText: confirmText || "确定",
success(res) {
if (res.confirm) {
callback && callback(true)
} else {
callback && callback(false)
}
},
fail(err){
console.log(err)
}
})
},
href(url, isMain) {
if (isMain) {
uni.switchTab({
url: url
})
} else {
uni.navigateTo({
url: url
});
}
},
jsonp: function(url, callback, callbackname) {
// #ifdef H5
window[callbackname] = callback;
let script = document.createElement("script");
script.src = url;
script.type = "text/javascript";
document.head.appendChild(script);
document.head.removeChild(script);
// #endif
},
resUrl:function(){
return 'https://res.firstui.cn/static/images'
}
}
export default fui