1.22
This commit is contained in:
-3888
File diff suppressed because it is too large
Load Diff
@@ -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
@@ -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
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// function subscribeMsg(id){
|
||||
// let id=id.toSring();
|
||||
// wx.requestSubscribeMessage({
|
||||
// tmplIds: [id],
|
||||
// success (res) {
|
||||
// console.log(res);
|
||||
// }
|
||||
// })
|
||||
// };
|
||||
// module.exports={
|
||||
// subscribeMsg
|
||||
// }
|
||||
Reference in New Issue
Block a user