-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
27 lines (26 loc) · 762 Bytes
/
app.js
File metadata and controls
27 lines (26 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//app.js
App({
onLaunch: function () {
},
globalData: {
userInfo: null
},
showModal: function (param) {
var pages = getCurrentPages();
var currentPage = pages[pages.length - 1];
var modal = {
title: param.title || '',
subtitle: param.subtitle || '',
showCancel: param.showCancel == undefined ? true : param.showCancel,
showConfirm: param.showConfirm == undefined ? true : param.showConfirm,
cancelText: param.cancelText || '取消',
confirmText: param.confirmText || '确认',
cancelStyle: param.cancelStyle || '',
confirmStyle: param.confirmStyle || '',
complete: param.complete || function (e) { return e }
};
currentPage.setData({
modal: modal
});
},
})