12
12
overflow : hidden ;
13
13
min-height : 100px ;
14
14
box-sizing : border-box ;
15
+ HEIGHT :100% ;
15
16
}
16
17
textarea {
17
18
width : auto ;
34
35
.padding-15 {
35
36
padding : 15px ;
36
37
}
38
+ .padding-top-15 {
39
+ padding-top :15px ;
40
+ }
37
41
.margin-auto {
38
42
margin : 0 auto ;
39
43
}
43
47
.full-height {
44
48
height :100% ;
45
49
}
50
+ .zan-loadmore__tips {
51
+ background : #f1f2f7 !important ;
52
+ }
46
53
</style >
47
54
48
55
<script >
@@ -58,22 +65,7 @@ export default class extends wepy.app {
58
65
// 这里只能是静态数据
59
66
config = {
60
67
pages: [
61
- ' pages/customer/index' ,
62
- ' pages/customer/login' ,
63
- ' pages/business/index' ,
64
- ' pages/business/login' ,
65
- ' pages/index' ,
66
- ' pages/customer/authentication' ,
67
- ' pages/customer/auth_success' ,
68
- ' pages/customer/contract' ,
69
- ' pages/customer/progress' ,
70
- ' pages/business/pact/index' ,
71
- ' pages/business/pact/add' ,
72
- ' pages/business/pact/detail' ,
73
- ' pages/business/pact/submit' ,
74
- ' pages/business/progress/index' ,
75
- ' pages/business/progress/add' ,
76
- ' pages/business/progress/submit'
68
+ ' pages/login'
77
69
],
78
70
window : {
79
71
backgroundTextStyle: ' light' ,
@@ -86,15 +78,15 @@ export default class extends wepy.app {
86
78
constructor () {
87
79
super ();
88
80
this .use (' requestfix' );
89
- console .log (this )
90
81
}
91
82
92
83
onLaunch (options ) {
93
- console .log (this )
94
- console .log (options)
95
84
let _self = this ;
96
85
this .intercept (' request' , {
97
86
config (res ) {
87
+ if (! res .data ) {
88
+ res .data = {}
89
+ }
98
90
res .data .token = G .token ;
99
91
res .data = qs .stringify (res .data );
100
92
@@ -122,7 +114,7 @@ export default class extends wepy.app {
122
114
case 401 :
123
115
G .token = ' ' ;
124
116
wx .redirectTo ({
125
- url: ' ../index '
117
+ url: ' login '
126
118
});
127
119
return false ;
128
120
break ;
@@ -135,7 +127,11 @@ export default class extends wepy.app {
135
127
break ;
136
128
default :
137
129
if (res .data .ret ) {
138
- Tip .errorToast (' 数据格式错误' + res .data .msg );
130
+ wx .showToast ({
131
+ title: res .data .msg ,
132
+ icon: ' none' ,
133
+ duration: 2000
134
+ });
139
135
return false ;
140
136
}
141
137
return res .data ;
@@ -188,11 +184,11 @@ export default class extends wepy.app {
188
184
wx .login ({
189
185
success : async function (res ) {
190
186
if (res .code ) {
191
- let result = await api .miniProgramLogin ({ code: res .code });
187
+ let result = await api .miniProgramLogin ({ code: res .code });
192
188
if (result) {
193
- wepy . G .openId = result .openid ;
189
+ G .openId = result .openid ;
194
190
if (callback) {
195
- callback ();
191
+ callback (res );
196
192
}
197
193
}
198
194
} else {
@@ -202,19 +198,19 @@ export default class extends wepy.app {
202
198
});
203
199
}
204
200
205
- getUserInfo () {
206
- wx .getSetting ({
207
- success : function (res ) {
208
- if (res .authSetting [' scope.userInfo' ]) {
209
- // 已经授权,可以直接调用 getUserInfo 获取头像昵称
210
- wx .getUserInfo ({
211
- success : function (res ) {
212
- console .log (res);
213
- }
214
- });
215
- }
216
- }
217
- });
218
- }
201
+ // getUserInfo() {
202
+ // wx.getSetting({
203
+ // success: function(res) {
204
+ // if (res.authSetting['scope.userInfo']) {
205
+ // // 已经授权,可以直接调用 getUserInfo 获取头像昵称
206
+ // wx.getUserInfo({
207
+ // success: function(res) {
208
+ // console.log(res);
209
+ // }
210
+ // });
211
+ // }
212
+ // }
213
+ // });
214
+ // }
219
215
}
220
216
</script >
0 commit comments