2024-09-14 02:26:50 +00:00
|
|
|
<script setup>
|
|
|
|
import {
|
|
|
|
useUpdateApp
|
|
|
|
} from '@/store/update.js';
|
|
|
|
import {
|
|
|
|
cxcJurisdictionApi
|
2024-09-19 07:12:58 +00:00
|
|
|
} from '@/api/api.js';
|
2024-09-14 02:26:50 +00:00
|
|
|
import {
|
|
|
|
onLaunch,
|
|
|
|
onShow
|
|
|
|
} from "@dcloudio/uni-app";
|
|
|
|
import {
|
|
|
|
getLocation,
|
|
|
|
getWeather,
|
|
|
|
beforeJump
|
2024-09-19 07:12:58 +00:00
|
|
|
} from './utils/index.js';
|
2024-09-14 02:26:50 +00:00
|
|
|
import {
|
|
|
|
useStore
|
|
|
|
} from '@/store';
|
|
|
|
onLaunch(() => {
|
|
|
|
uni.onTabBarMidButtonTap(() => {
|
|
|
|
beforeJump('/pages/task/index', () => {
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/pages/task/index?id=0'
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
// 检查更新
|
|
|
|
useUpdateApp().checkAppUpdate()
|
|
|
|
// 定位
|
|
|
|
getLocation()
|
|
|
|
})
|
|
|
|
onShow(() => {
|
|
|
|
cxcJurisdictionApi({
|
|
|
|
id: "1827997127165677570"
|
|
|
|
}).then((res) => {
|
|
|
|
// 1为灰化
|
|
|
|
if (res.success) {
|
|
|
|
const store = useStore()
|
|
|
|
uni.setStorageSync('isgray', res.result.value)
|
|
|
|
store.setIsgray(res.result.value)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
/*每个页面公共css */
|
|
|
|
|
|
|
|
.gray {
|
|
|
|
filter: grayscale(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
.f-row {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
}
|
|
|
|
|
|
|
|
.f-col {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
|
|
|
|
.jca {
|
|
|
|
justify-content: space-around;
|
|
|
|
}
|
|
|
|
|
|
|
|
.jce {
|
|
|
|
justify-content: space-evenly;
|
|
|
|
}
|
|
|
|
|
|
|
|
.jcb {
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.aic {
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
</style>
|