congzc 1 년 전
부모
커밋
c8113afada
2개의 변경된 파일46개의 추가작업 그리고 3개의 파일을 삭제
  1. +1
    -1
      package.json
  2. +45
    -2
      src/pages/login/index.vue

+ 1
- 1
package.json 파일 보기

@@ -72,4 +72,4 @@
"sass-loader": "^13.3.2",
"vite": "4.1.4"
}
}
}

+ 45
- 2
src/pages/login/index.vue 파일 보기

@@ -4,7 +4,7 @@
<view class="bottomBox">
<view class="orangeBtn" @click="toChooseStyle">拍摄数码写真</view>
<view class="IMEI" @click="Imei"
>1.0.7<text @click="reFresh">i</text>
>1.0.10<text @click="reFresh">i</text>
</view>
<!-- <view style="margin-top: 20rpx" @click="reFresh">刷新</view> -->
<!-- <view style="margin-top: 20rpx" @click="runGetAndroidId()">获取</view> -->
@@ -15,8 +15,9 @@
<script setup>
//#region 导入
import { ref } from "vue";
import { onLoad, onUnload } from "@dcloudio/uni-app";
import { isPlainObject, onLoad, onUnload } from "@dcloudio/uni-app";
import { userInfoModules } from "@/store/modules/userInfo";

const userInfoModulesPinia = userInfoModules();
//#endregion ----------------------------------

@@ -24,9 +25,51 @@ function toChooseStyle() {
uni.navigateTo({ url: "/pages/chooseStyle/index" });
}

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({
title: err,
icon: "error",
});
}
);
},
function (err) {
console.log("访问指定目录失败:" + err.message);
uni.showToast({
title: err,
icon: "error",
});
}
);
} catch (error) {
console.log(error, "error");
}
}

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


불러오는 중...
취소
저장