This commit is contained in:
zoujiandong
2024-01-22 08:42:14 +08:00
parent 3a2b2cd3b1
commit 4948f35fb3
573 changed files with 640 additions and 24515 deletions
-3888
View File
File diff suppressed because it is too large Load Diff
-57
View File
@@ -1,57 +0,0 @@
const showModal=function(content, successCallback = function() {}, title = '提示', showCancel = false, comfirmText = '知道了', confirmColor = '#03a9f4', hasCancel = false, cancelText = '取消', cancelColor = '#000') {
var params = {
title: title,
content: content,
showCancel: showCancel,
confirmText: comfirmText,
confirmColor: confirmColor,
success: function(res) {
if (res.confirm) {
successCallback();
}
}
}
if (hasCancel == true) {
params.cancelText = cancelText;
params.cancelColor = cancelColor;
}
wx.showModal(params);
}
/**
* 封装toast
*/
function showToast (type, text, obj) {
let param = { duration: (obj && obj.duration) || 1500, mask: (obj && obj.isMask) || false }
switch(type) {
case 'text': {
param['title'] = text || ''
param['icon'] = 'none'
break
}
case 'loading': {
param['title'] = text || ''
param['icon'] = 'loading'
break
}
case 'success': {
param['title'] = text || ''
param['icon'] = 'success'
break
}
case 'error': {
param['title'] = text || ''
param['image'] = '/images/emoji.png'
break
}
default: {
break
}
}
wx.showToast(param)
}
module.exports={
showModal,
showToast
}
+2 -2
View File
@@ -26,7 +26,7 @@ function request(url, method, data, loding = false) {
if(!isLock){
isLock=true;
wx.reLaunch({
url: '/pages/login/login?redirectUrl='+redirectUrl
url: '/patient/pages/login/login?redirectUrl='+redirectUrl
});
}
}
@@ -84,7 +84,7 @@ function request(url, method, data, loding = false) {
if(!isLock){
isLock=true;
wx.reLaunch({
url: '/pages/login/login?redirectUrl='+redirectUrl
url: '/patient/pages/login/login?redirectUrl='+redirectUrl
});
}
-12
View File
@@ -1,12 +0,0 @@
// function subscribeMsg(id){
// let id=id.toSring();
// wx.requestSubscribeMessage({
// tmplIds: [id],
// success (res) {
// console.log(res);
// }
// })
// };
// module.exports={
// subscribeMsg
// }