Uniapp’s method of determining the current environment: 1. To determine if it is Apple, the code is [uni.getSystemInfoSync().platform=='ios']; 2. To determine if it is Android, the code is [uni.getSystemInfoSync() .platform=andr].
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, Dell G3 computer.
Recommendation (free): uni-app development tutorial
How uniapp determines the current environment:
Judgment is Apple:
uni.getSystemInfoSync().platform == 'ios'
Android:
uni.getSystemInfoSync().platform === 'android'
Related free learning recommendations: Programming video
The above is the detailed content of How uniapp determines the current environment. For more information, please follow other related articles on the PHP Chinese website!