摘要: 1.<!DOCTYPE html>声明有助于浏览器中正确显示网页 HTML5<!DOCTYPE html>HTML 4.01<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html 阅读全文
posted @ 2017-06-28 18:24 jun_zx 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 在react native项目中,有时候调用接口会出现这样的错误提示:“Network Request Failed”。 一.模拟器上报“Network Request Failed”解决办法,也是官网有提到的: 1. 在Info.plist中添加NSAppTransportSecurity类型Di 阅读全文
posted @ 2017-06-23 11:13 jun_zx 阅读(3892) 评论(0) 推荐(0) 编辑
摘要: 解决方法:进入开发者中心查看红色提示信息,同意就行 阅读全文
posted @ 2017-06-21 15:09 jun_zx 阅读(467) 评论(0) 推荐(0) 编辑
摘要: 解决方法:在 终端执行如下命令 sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/ 注意:前提是你已经安装了xcode 阅读全文
posted @ 2017-06-21 11:06 jun_zx 阅读(370) 评论(0) 推荐(0) 编辑
摘要: react-native-fs插件是文件对上传和下载时使用的,iOS和android都可使用,File upload (iOS only)。 安装命令: 安装后执行: 在android/app/src/main/AndroidManifest.xml,里添加android读写文件的权限 进行完上述安 阅读全文
posted @ 2017-06-20 18:04 jun_zx 阅读(12523) 评论(17) 推荐(1) 编辑
摘要: 调用react-native-fs插件时,如果数据的接口是需要验证信息的,在android上运行报错,而在iOS上运行没问题。原因是因为接口是有验证信息的,而调用这个插件时没有传入,在iOS上会自动加上验证信息,而 android需要手动设置。 此错误的解决方法: 1.在调用登录接口时,保存下coo 阅读全文
posted @ 2017-06-19 11:54 jun_zx 阅读(2429) 评论(0) 推荐(0) 编辑
摘要: function _generateUUID() { var d = new Date().getTime(); var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { var r = (d + Math.random()*16)%16 | 0; ... 阅读全文
posted @ 2017-05-02 14:45 jun_zx 阅读(285) 评论(0) 推荐(0) 编辑
摘要: <key>NSPhotoLibraryUsageDescription</key> <string>This app requires access to the photo library.</string> <key>NSMicrophoneUsageDescription</key> <str 阅读全文
posted @ 2017-03-10 10:43 jun_zx 阅读(1015) 评论(0) 推荐(0) 编辑
摘要: android:screenOrientation="portrait" 阅读全文
posted @ 2017-03-03 10:45 jun_zx 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 计时器是经常用到的功能,下面以react nativ的例子简介来写一个倒计时60s的小demo。 代码如下: 阅读全文
posted @ 2017-02-05 10:35 jun_zx 阅读(351) 评论(0) 推荐(0) 编辑
摘要: iOS 1.通过xcode将‘xxx.ttf’文件引入项目,如图: 2.在node_modules/react-native-vector-icons下新建Icomoon.js文件,复制一份Icomoon.ttf到node_modules/react-native-vector-icons/Font 阅读全文
posted @ 2017-01-17 16:00 jun_zx 阅读(4645) 评论(1) 推荐(0) 编辑
摘要: 在项目中需要获取到当前设备,例如手机的ID,联网状态,等,然后这个Cordova里有这个插件可以用,就是$cordovaDevice,下面我来介绍一下怎么来使用它 阅读全文
posted @ 2016-03-25 11:13 jun_zx 阅读(1857) 评论(0) 推荐(0) 编辑
摘要: 详情请看:http://www.ncloud.hk/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/cordova-5-cordovageolocation/ $cordovaGeolocation是可以获取当前位置的ngCordova插件,在项目中应用到,在这里讲解一下: 阅读全文
posted @ 2016-03-18 17:37 jun_zx 阅读(5444) 评论(0) 推荐(0) 编辑
摘要: 今天还是要讲一下关于二维码的知识,前几篇讲解中有讲到我使用的可以生成二维码的js是qrcode.js,然后结合Cordovad的插件$cordovaBarcodeScanner插件可以扫描二维码,这样就基本完成了简单的扫一扫功能。后来在项目进行,开始要调用后台数据和传参数到接口的时候发现qrcode.js它只能解析英文或者数字,并且只能解析一个字符串! 阅读全文
posted @ 2016-03-11 08:47 jun_zx 阅读(3472) 评论(0) 推荐(0) 编辑
摘要: 在前面几篇文章中简单写了一下,在项目中怎么实现扫描的功能和将信息转化为二维码的功能,现在来介绍一下怎么将生成的二维码保存到手机的本地,这样关于二维码的内容基本上就全面了,好开心~~! 同样的,我还是想说,首先我这个是做基于ionic+ngCordova+Anjularjs的项目,所以,希望大家在看之前已经了解了这三块内容了,不然,可能看起来会有难度的。 阅读全文
posted @ 2016-03-04 18:13 jun_zx 阅读(4109) 评论(0) 推荐(0) 编辑