Browse Source

upload

master
HolyKnightIX 1 year ago
parent
commit
dbbaeed991
1 changed files with 39 additions and 35 deletions
  1. +39
    -35
      src/pages/login/index.vue

+ 39
- 35
src/pages/login/index.vue View File

@@ -4,7 +4,7 @@
<view class="bottomBox"> <view class="bottomBox">
<view class="orangeBtn" @click="toChooseStyle">拍摄数码写真</view> <view class="orangeBtn" @click="toChooseStyle">拍摄数码写真</view>
<view class="IMEI" @click="Imei" <view class="IMEI" @click="Imei"
>1.0.8<text @click="reFresh">i</text>
>1.0.10<text @click="reFresh">i</text>
</view> </view>
<!-- <view style="margin-top: 20rpx" @click="reFresh">刷新</view> --> <!-- <view style="margin-top: 20rpx" @click="reFresh">刷新</view> -->
<!-- <view style="margin-top: 20rpx" @click="runGetAndroidId()">获取</view> --> <!-- <view style="margin-top: 20rpx" @click="runGetAndroidId()">获取</view> -->
@@ -25,47 +25,51 @@ function toChooseStyle() {
uni.navigateTo({ url: "/pages/chooseStyle/index" }); uni.navigateTo({ url: "/pages/chooseStyle/index" });
} }


const fileReaderTest = () => {
plus.io.resolveLocalFileSystemURL(
"file:///storage/Document",
function (entry) {
/* 获取文件目录 */
var directoryReader = entry.createReader(); //获取读取对象
directoryReader.readEntries(
function (entries) {
//历遍子目录即可
for (var i = 0; i < entries.length; i++) {
console.log("文件信息:" + entries[i].name);
function fileReaderTest() {
try {
plus.io.resolveLocalFileSystemURL(
"file:///storage/Documents",
function (entry) {
/* 获取文件目录 */
var directoryReader = entry.createReader(); //获取读取对象
directoryReader.readEntries(
function (entries) {
//历遍子目录即可
for (var i = 0; i < entries.length; i++) {
console.log("文件信息:" + entries[i].name);
uni.showToast({
// title: uni.getStorageSync("androidId"),
title: "文件信息:" + entries[i].name,
icon: "success",
});
}
},
function (err) {
console.log("访问目录失败");
uni.showToast({ uni.showToast({
// title: uni.getStorageSync("androidId"),
title: "文件信息:" + entries[i].name,
icon: "success",
title: err,
icon: "error",
}); });
} }
},
function (err) {
console.log("访问目录失败");
uni.showToast({
title: err,
icon: "error",
});
}
);
},
function (err) {
console.log("访问指定目录失败:" + err.message);
uni.showToast({
title: err,
icon: "error",
});
}
);
};
);
},
function (err) {
console.log("访问指定目录失败:" + err.message);
uni.showToast({
title: err,
icon: "error",
});
}
);
} catch (error) {
console.log(error, "error");
}
}


//#region 初始化 //#region 初始化
onLoad(() => { onLoad(() => {
runGetAndroidId(); runGetAndroidId();
fileReaderTest();
// fileReaderTest();
userInfoModulesPinia.clearStorage(); userInfoModulesPinia.clearStorage();
}); });
//#endregion ---------------------------------- //#endregion ----------------------------------


Loading…
Cancel
Save