-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathapp.js
51 lines (49 loc) · 1.52 KB
/
app.js
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//app.js
App({
onLaunch: function () {
var customTypeStr = wx.getStorageSync('customTypeStr');
if (!customTypeStr)
customTypeStr = ""
this.globalData.arrTypeDetail[this.globalData.arrTypeDetail.length - 1] = customTypeStr;
var index = wx.getStorageSync('selectIndex');
if (!index)
index = 0;
var startWorkDate = wx.getStorageSync('startWorkDate');
if (!startWorkDate)
{
startWorkDate = new Date();
startWorkDate.setHours(0, 0, 0, 0);
}
this.globalData.startWorkDate = startWorkDate;
this.globalData.workTurnTypeName = this.globalData.arrTypeName[index];
this.globalData.workTurnType = this.globalData.arrTypeDetail[index];
},
setWorkTurnType: function(name, type){
this.globalData.workTurnTypeName = name;
this.globalData.workTurnType = type;
},
globalData:{
workTurnTypeName: "",
workTurnType :"",
startWorkDate : {},
arrTypeName: [
"不显示倒班信息", //0
"五班三运转", //1
"四班两运转", //2
"上三休三", //3
"三班二运转",//4
"四班三运转(两天一倒制)",//5
"四班三运转(三天一倒制)",//6
"自定义"],
arrTypeDetail: [
"",//0
"中中白白夜夜休休休休",//1
"白白夜夜休休休休",//2
"白白全休休休",//3
"白白夜夜休休",//4
"白白中中休夜夜休",//5
"白白白中中中休夜夜夜休休",//6
""
],
}
})