entryPage.vue 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="page-bg">
  3. <view class="btn-group">
  4. <button class="green-btn btn1" @click="routeTo('createInfo')">老人注册</button>
  5. <button class="green-btn btn2" @click="routeTo('searchState')">状态查询</button>
  6. </view>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. }
  14. },
  15. methods: {
  16. routeTo(url) {
  17. uni.navigateTo({
  18. url: `/pages/${url}/${url}`,
  19. })
  20. }
  21. }
  22. }
  23. </script>
  24. <style lang="scss" scoped>
  25. .page-bg {
  26. height: 100vh;
  27. overflow: hidden;
  28. background-image: linear-gradient(to top, #68b7e7 0%, #ffffff 100%);
  29. animation: fadeIn 1s linear;
  30. }
  31. .btn-group {
  32. padding: 1px;
  33. position: relative;
  34. top: 28%;
  35. }
  36. .green-btn {
  37. width: 60%;
  38. background: #28d87d;
  39. // background: #00c4f3;
  40. border-radius: 5px;
  41. color: white;
  42. margin: 50px auto;
  43. position: relative;
  44. }
  45. .btn1 {
  46. animation: fadeInLeft 1s ease;
  47. }
  48. .btn2 {
  49. animation: fadeInRight 1s ease;
  50. }
  51. </style>