|
[多端开发]
文件读取和写入 卸载后在安装就获取不到之前写入的值
[复制链接]
// var getappid='';
// if (api.systemType=='ios') {
// return api.deviceId;
//
// }else {
// getappid = api.readFile({
// sync: true,
// path: 'fs://../../NewAppsnID/appid.txt'
// });
// console.log('getappid '+getappid);
// setTimeout(function() {
// if (!base.isNull(getappid)) {
// console.log('1111' +getappid);
// } else {
// api.writeFile({
// path: 'fs://../../NewAppsnID/appid.txt',
// data: api.deviceId
// }, function(ret, err) {
// var status = ret.status;
// if (status) {
// getappid= api.deviceId;
// } else {
// getappid= api.deviceId;
//
// }
// });
//
// }
//
// }, 1000);
// return getappid;
// }
|
|