You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
750 B
54 lines
750 B
2 years ago
|
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;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|