去掉接口token

This commit is contained in:
zhouyanli
2026-04-27 15:27:32 +08:00
parent 855bb47ec7
commit 5936da5547
10 changed files with 16 additions and 18 deletions

View File

@@ -2,13 +2,17 @@
export default { export default {
onLaunch: function() { onLaunch: function() {
// console.log('App Launch') // console.log('App Launch')
uni.removeStorageSync('token');
}, },
onShow: function() { onShow: function() {
// console.log('App Show') // console.log('App Show')
uni.removeStorageSync('token');
}, },
onHide: function() { onHide: function() {
console.log('App Hide') console.log('App Hide')
} },
} }
</script> </script>

View File

@@ -125,7 +125,7 @@
import { ref, watch } from 'vue' import { ref, watch } from 'vue'
import { onLoad, onUnload, onShow } from '@dcloudio/uni-app' import { onLoad, onUnload, onShow } from '@dcloudio/uni-app'
import moment from 'moment'; import moment from 'moment';
import { getActivityList } from '../api/api.js' // import { getActivityList } from '../api/api.js'
// ===================== 响应式数据 ===================== // ===================== 响应式数据 =====================
const activeTab = ref('list') // 'list' 或 'my' const activeTab = ref('list') // 'list' 或 'my'

View File

@@ -212,7 +212,7 @@
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import {onLoad,onUnload} from '@dcloudio/uni-app' import {onLoad,onUnload} from '@dcloudio/uni-app'
import moment from 'moment' import moment from 'moment'
import {getActivityDetails,confirmResident,cancelActivity,getActivityLive} from '../api/api.js' // import {getActivityDetails,confirmResident,cancelActivity,getActivityLive} from '../api/api.js'
// 响应式数据 // 响应式数据
const activeTab = ref('detail') // 'detail' 或 'status' const activeTab = ref('detail') // 'detail' 或 'status'

View File

@@ -84,7 +84,7 @@
<script setup> <script setup>
import { ref, computed, onUnmounted } from 'vue'; import { ref, computed, onUnmounted } from 'vue';
import {getLoginBySms,getSendCode} from '../api/api.js' // import {getLoginBySms,getSendCode} from '../api/api.js'
// ========== 响应式数据 ========== // ========== 响应式数据 ==========
// 手机号 // 手机号

View File

@@ -67,7 +67,7 @@
<script setup> <script setup>
import { ref, computed } from 'vue'; import { ref, computed } from 'vue';
import {onLoad} from "@dcloudio/uni-app" import {onLoad} from "@dcloudio/uni-app"
import {getLoginPassword} from '../api/api.js' // import {getLoginPassword} from '../api/api.js'
// 响应式数据 // 响应式数据
const phoneNumber = ref(''); const phoneNumber = ref('');

View File

@@ -56,7 +56,7 @@
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import { onLoad ,onShow,onUnload} from '@dcloudio/uni-app' import { onLoad ,onShow,onUnload} from '@dcloudio/uni-app'
import { getNoticeList } from '../api/api.js' // import { getNoticeList } from '../api/api.js'
const noticeList = ref([]) const noticeList = ref([])
const refreshing = ref(false) const refreshing = ref(false)

View File

@@ -73,7 +73,7 @@
<script setup> <script setup>
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import { onLoad, onShow } from '@dcloudio/uni-app' import { onLoad, onShow } from '@dcloudio/uni-app'
import {getNoticeDetails} from '../api/api.js' // import {getNoticeDetails} from '../api/api.js'
const isLoading = ref(false) const isLoading = ref(false)
const noticeDetail = ref({}) const noticeDetail = ref({})

View File

@@ -55,7 +55,7 @@
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import {onLoad} from '@dcloudio/uni-app' import {onLoad} from '@dcloudio/uni-app'
import {getAccessDevices,getAccessOpen} from '../api/api.js' // import {getAccessDevices,getAccessOpen} from '../api/api.js'
// 响应式数据:选中的门索引、开门成功提示 // 响应式数据:选中的门索引、开门成功提示
const selectedDoor = ref(-1) // -1表示未选中 const selectedDoor = ref(-1) // -1表示未选中

View File

@@ -93,7 +93,7 @@
<script setup> <script setup>
import { ref, computed, onMounted, watch } from 'vue' import { ref, computed, onMounted, watch } from 'vue'
import { onLoad } from '@dcloudio/uni-app' import { onLoad } from '@dcloudio/uni-app'
import { getVillageList, getVillageSwitch } from "../api/api.js" // import { getVillageList, getVillageSwitch } from "../api/api.js"
// 响应式数据 // 响应式数据
const searchText = ref('') const searchText = ref('')

View File

@@ -197,7 +197,7 @@ const getNoticeMore = () =>{
} }
// 接收选择小区返回的参数 // 接收选择小区返回的参数
const slelctHomeData = (data) =>{ const slelctHomeData = (data) =>{
console.log('收到B页面返回的数据', data) // console.log('收到B页面返回的数据', data)
if(data.name){ if(data.name){
currentCommunity.value = data.name currentCommunity.value = data.name
} }
@@ -299,10 +299,10 @@ const payMentClick =() =>{
} }
// 点击小区选择 // 点击小区选择
const navigateToPage = () => { const navigateToPage = () => {
const token = uni.getStorageSync('token') || ''; // const token = uni.getStorageSync('token') || '';
const cachedVillageId = uni.getStorageSync('currentVillageId'); const cachedVillageId = uni.getStorageSync('currentVillageId');
// 未登录 或 未绑定小区 → 去我的页面认证 // 未登录 或 未绑定小区 → 去我的页面认证
if (!token || !cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) { if ( !cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) {
currentCommunity.value = '请去认证小区'; currentCommunity.value = '请去认证小区';
uni.setStorageSync('currentCommunity', '请去认证小区'); uni.setStorageSync('currentCommunity', '请去认证小区');
uni.showToast({ uni.showToast({
@@ -373,15 +373,10 @@ const moreClick = () =>{
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content-class{ .content-class{
// margin: 0 20rpx;
// padding: 2rpx;
background-color: #f9f9f9; background-color: #f9f9f9;
padding-bottom: 100rpx; padding-bottom: 100rpx;
box-sizing: border-box; /* 保证padding不会撑大容器 */ box-sizing: border-box; /* 保证padding不会撑大容器 */
@@ -390,7 +385,6 @@ const moreClick = () =>{
.nar-top{ .nar-top{
height: 400rpx; height: 400rpx;
width: 100%; width: 100%;
// background-color: #C0E4FB;
background: repeating-linear-gradient(to right, #EDF4FA , #C0E4FB); background: repeating-linear-gradient(to right, #EDF4FA , #C0E4FB);
position: absolute; position: absolute;