App.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <script>
  2. import { ref, getCurrentInstance } from 'vue'
  3. export default {
  4. onLaunch: function () {
  5. const { $Http } = getCurrentInstance().proxy;
  6. if (uni.getStorageSync('WuserMsg').token) {
  7. {
  8. $Http.basic({
  9. "classname": "webmanage.site.site",
  10. "method": "querySite_Parameter", //查询站点数据
  11. content: {
  12. nocache: true
  13. }
  14. }).then(res => {
  15. if (res.code == 1) {
  16. uni.removeStorageSync('WsiteP');
  17. uni.setStorageSync("WsiteP", res.data)
  18. $Http.isLoad = true;
  19. $Http.basic({
  20. "id": "2025082114391803",
  21. "content": {
  22. "phonenumber": uni.getStorageSync('WuserMsg').phonenumber
  23. }
  24. }).then(res => {
  25. console.log("用户档案", res)
  26. if (res.code == 1) {
  27. uni.removeStorageSync('WuserRecord');
  28. uni.setStorageSync("WuserRecord", res.data)
  29. }
  30. })
  31. } else {
  32. $Http.isLoad = false;
  33. }
  34. })
  35. }
  36. } else {
  37. $Http.isLoad = false
  38. }
  39. },
  40. onShow: function () {
  41. },
  42. onHide: function () {
  43. }
  44. }
  45. </script>
  46. <style lang="scss">
  47. /* 注意要写在第一行,注意不能引入至uni.scss,同时给style标签加入lang="scss"属性 */
  48. @import "@/uni_modules/uview-plus/index.scss";
  49. @import '/static/iconfont.css';
  50. page {
  51. background-color: #F7F7FF;
  52. }
  53. .navigator-hover {
  54. background-color: rgba(0, 0, 0, 0.1) !important;
  55. opacity: 0.7 !important;
  56. }
  57. </style>