App.vue 483 B

1234567891011121314151617181920212223242526
  1. <script>
  2. import dutyApi from '@/api/duty.js'
  3. import {selectGroupUser} from '@/api/system.js'
  4. export default {
  5. onLaunch: function() {
  6. },
  7. onShow: function() {
  8. if(uni.getStorageSync('dutys')) return
  9. dutyApi.getByList().then((res)=>{
  10. uni.setStorageSync("dutys",res.data)
  11. })
  12. selectGroupUser().then((res)=>{
  13. uni.setStorageSync("groupUser",res.data)
  14. })
  15. }
  16. }
  17. </script>
  18. <style>
  19. /*每个页面公共css */
  20. page{
  21. background-color: #f5f5f5;
  22. }
  23. </style>