配合安卓调试

This commit is contained in:
李彪 2025-04-14 10:47:49 +08:00
parent 024daa062a
commit 6af89f9f75
2 changed files with 8 additions and 4 deletions

View File

@ -6,7 +6,7 @@ import appUpdate from "@/components/appUpdate/appUpdate.js";
export default {
onLaunch: function () {
console.log("%c%s", "color:red", "onLaunch---");
// uni.showLoading({ title: "" });
uni.showLoading({ title: "加载中" });
// uni.setStorageSync("token", "");
window.initFn = this.initFn;
// this.initFn();
@ -63,6 +63,7 @@ export default {
onHide: function () {},
methods: {
initFn(data) {
uni.hideLoading(); // Loading
if (!data) {
return uni.showToast({ title: "未传入参数 initFn", icon: "none" });
}

View File

@ -1,7 +1,8 @@
<template>
<view class="content">
<view style="border:1px solid red;height:50rpx;">
<view v-if="true" style="display:flex">
<u-button type="error" @click="testFn">调试录入卡片</u-button>
<u-button type="error" @click="test1Fn">调试token过期</u-button>
</view>
<daySelect @dateChange="onDateChange" />
<view v-if="isToday" class="task-info">
@ -163,9 +164,11 @@ export default {
console.log(e, "e-----判断安卓苹果类型出错");
}
},
test1Fn(){
uni.setStorageSync("token", "Bearer ");
this.getPlanByDate();
},
onDateChange({ date, isToday }) {
//
// return
this.isToday = isToday;
this.currentDate = date;
this.getPlanByDate();