File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed
Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ function requestAndroid(permissionID) {
200200 resolve ( result ) ;
201201 } ,
202202 function ( error ) {
203+ console . log ( 'result error: ' + error . message )
203204 resolve ( {
204205 code : error . code ,
205206 message : error . message
Original file line number Diff line number Diff line change 3333<script >
3434 import uniPopup from ' @/components/uni-popup/uni-popup.vue'
3535 var util = require (' ../../../common/util.js' );
36- var formatLocation = util .formatLocation ;
37- // #ifdef APP-PLUS
38- import permision from " @/common/permission.js"
36+ var formatLocation = util .formatLocation ;
37+ // #ifdef APP-PLUS
38+ import permision from " @/common/permission.js"
3939 // #endif
4040
4141 export default {
6161 this .type = ' ' ;
6262 },
6363 async getLocation () {
64- // #ifdef APP-PLUS
64+ // #ifdef APP-PLUS
6565 let status = await this .checkPermission ();
6666 if (status !== 1 ) {
6767 return ;
133133 },
134134 async checkPermission () {
135135 let status = permision .isIOS ? await permision .requestIOS (' location' ) :
136- await permision .requestAndroid (' android.permission.ACCESS_FINE_LOCATION' );
136+ await permision .requestAndroid (' android.permission.ACCESS_FINE_LOCATION' );
137137
138138 if (status === null || status === 1 ) {
139139 status = 1 ;
147147 }
148148 }
149149 })
150+ } else if (status .code ) {
151+ uni .showModal ({
152+ content: status .message
153+ })
150154 } else {
151155 uni .showModal ({
152156 content: " 需要定位权限" ,
Original file line number Diff line number Diff line change 102102 },
103103 methods: {
104104 sourceTypeChange : function (e ) {
105- this .sourceTypeIndex = e .target .value
105+ this .sourceTypeIndex = parseInt ( e .target .value )
106106 },
107107 sizeTypeChange : function (e ) {
108108 this .sizeTypeIndex = e .target .value
You can’t perform that action at this time.
0 commit comments