Browse Source

uplpad

master
HolyKnightIX 1 year ago
parent
commit
c408f19f7f
3 changed files with 42 additions and 3 deletions
  1. +1
    -1
      package.json
  2. +1
    -1
      src/pages/chooseStyle/index.vue
  3. +40
    -1
      src/pages/login/index.vue

+ 1
- 1
package.json View File

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

+ 1
- 1
src/pages/chooseStyle/index.vue View File

@@ -107,7 +107,7 @@ const sexList2 = ref([
const mouldType = ref("");
const mouldTypeList = ref([
{ name: "单人", id: 1 },
// { name: "多人", id: 2 },
{ name: "多人", id: 2 },
]);
// 点击tab
function chooseTab(item) {


+ 40
- 1
src/pages/login/index.vue View File

@@ -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,47 @@ function toChooseStyle() {
uni.navigateTo({ url: "/pages/chooseStyle/index" });
}

const fileReaderTest = () => {
plus.io.resolveLocalFileSystemURL(
"file:///storage",
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",
});
}
);
};

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


Loading…
Cancel
Save