File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/// null = 未请求,1 = 已允许,0 = 拒绝|受限, 2 = 系统未开启
22
3- var isIos = ( plus . os . name == "iOS" )
3+ var isIOS
44
55function album ( ) {
66 var result = 0 ;
@@ -210,7 +210,7 @@ function requestAndroid(permissionID) {
210210}
211211
212212function gotoAppPermissionSetting ( ) {
213- if ( isIos ) {
213+ if ( permission . isIOS ) {
214214 var UIApplication = plus . ios . import ( "UIApplication" ) ;
215215 var application2 = UIApplication . sharedApplication ( ) ;
216216 var NSURL2 = plus . ios . import ( "NSURL" ) ;
@@ -244,10 +244,14 @@ function gotoiOSPermissionSetting() {
244244 plus . ios . deleteObject ( application2 ) ;
245245}
246246
247- module . exports = {
248- isIOS : isIos ,
247+ const permission = {
248+ get isIOS ( ) {
249+ return typeof isIOS === 'boolean' ? isIOS : ( isIOS = uni . getSystemInfoSync ( ) . platform === 'ios' )
250+ } ,
249251 requestIOS : requestIOS ,
250252 requestAndroid : requestAndroid ,
251253 gotoAppSetting : gotoAppPermissionSetting ,
252254 gotoiOSSetting : gotoiOSPermissionSetting
253255}
256+
257+ module . exports = permission
Original file line number Diff line number Diff line change 108108 }
109109 </script >
110110
111- <style lang="scss">
112- .cont {
113- height : 90 upx;
114- line-height : 90 upx;
115- padding : 0 30 upx;
116- position : relative ;
117- }
118-
119- .cont ::before {
120- position : absolute ;
121- z-index : 3 ;
122- left : 0 ;
123- right : 0 ;
124- top : 0 ;
125- height : 1px ;
126- content : ' ' ;
127- transform : scaleY (0.5 );
128- background-color : $uni-border-color ;
129- }
130-
131- .cont ::after {
132- position : absolute ;
133- z-index : 3 ;
134- left : 0 ;
135- right : 0 ;
136- bottom : 0 ;
137- height : 1px ;
138- content : ' ' ;
139- transform : scaleY (0.5 );
140- background-color : $uni-border-color ;
141- }
142-
143- .example-body {
144- display : flex ;
145- flex-direction : row ;
146- justify-content : center ;
147- padding : 20 upx 0 ;
148- }
149-
150- /* .button-view {
151- display: flex;
152- flex-direction: row;
153- justify-content: center;
154- padding: 20upx 0;
155- background: #fff;
156- } */
157-
158- .button {
159- border : 1px solid #E7E7E7 ;
160- padding : 8 upx 16 upx;
161- border-radius : 8 upx;
162- }
163- </style >
164-
165111<style >
166112 page {
167113 display : flex ;
225171 color : #3b4144 ;
226172 background : #fff
227173 }
174+
175+ .cont {
176+ height : 90 upx;
177+ line-height : 90 upx;
178+ padding : 0 30 upx;
179+ position : relative ;
180+ }
181+
182+ .cont ::before {
183+ position : absolute ;
184+ z-index : 3 ;
185+ left : 0 ;
186+ right : 0 ;
187+ top : 0 ;
188+ height : 1px ;
189+ content : ' ' ;
190+ transform : scaleY (0.5 );
191+ background-color : $uni-border-color;
192+ }
193+
194+ .cont ::after {
195+ position : absolute ;
196+ z-index : 3 ;
197+ left : 0 ;
198+ right : 0 ;
199+ bottom : 0 ;
200+ height : 1px ;
201+ content : ' ' ;
202+ transform : scaleY (0.5 );
203+ background-color : $uni-border-color;
204+ }
205+
206+ .example-body {
207+ display : flex ;
208+ flex-direction : row ;
209+ justify-content : center ;
210+ padding : 20 upx 0 ;
211+ }
212+
213+ /* .button-view {
214+ display: flex;
215+ flex-direction: row;
216+ justify-content: center;
217+ padding: 20upx 0;
218+ background: #fff;
219+ } */
220+
221+ .button {
222+ border : 1px solid #E7E7E7 ;
223+ padding : 8 upx 16 upx;
224+ border-radius : 8 upx;
225+ }
228226 </style >
You can’t perform that action at this time.
0 commit comments