export default { goHome() { uni.reLaunch({ url: '../index/index' }) }, getRemoveOption() { let options = [{ text: '移除', style: { backgroundColor: '#F56C6C' } }] return options; }, //提示是否消息 showConfirmMsg(content, callback) { uni.showModal({ title: '提示', cancelText: '否', confirmText: '是', content: content, success: function(res) { if (res.confirm) { callback(true); } else { callback(false); } } }) }, compare(key) { return function(a, b) { var val1 = a[key]; var val2 = b[key]; return val2 - val1; } }, compareDesc(key) { return function(a, b) { var val1 = a[key]; var val2 = b[key]; return val1 - val2; } } }