File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
pages/API/add-phone-contact Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,9 @@ function contact() {
8585 var result = 0 ;
8686 var CNContactStore = plus . ios . import ( "CNContactStore" ) ;
8787 var cnAuthStatus = CNContactStore . authorizationStatusForEntityType ( 0 ) ;
88- if ( authStatus === 0 ) {
88+ if ( cnAuthStatus === 0 ) {
8989 result = null ;
90- } else if ( authStatus == 3 ) {
90+ } else if ( cnAuthStatus == 3 ) {
9191 result = 1 ;
9292 } else {
9393 result = 0 ;
Original file line number Diff line number Diff line change 4747 phoneChange : function (e ) {
4848 this .phone = e .detail .value
4949 },
50- add () {
50+ async add () {
5151 // #ifdef APP-PLUS
52- if (this .checkPermission () !== 1 ) {
53- return ;
52+ let status = await this .checkPermission ();
53+ if (status !== 1 ) {
54+ return ;
5455 }
5556 // #endif
5657
You can’t perform that action at this time.
0 commit comments