search-input.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <view class="search-input dir-left-nowrap">
  3. <view class="input-view main-center dir-top-nowrap">
  4. <view class="input" @click="route_jump('/plugins/advance/search/search')">
  5. <app-form-id>
  6. <view class="input-in dir-left-nowrap main-center cross-center">
  7. <image class="icon" src="/static/image/icon/search.png"></image>
  8. <text class="font">搜索</text>
  9. </view>
  10. </app-form-id>
  11. </view>
  12. </view>
  13. <view class="jump-button">
  14. <app-form-id @click="route_jump('/plugins/advance/order/order')">
  15. <div class="jump-button dir-left-wrap main-center cross-center">
  16. <image class="icon" :class="theme+ '-m-back ' + theme" src="../image/pre-sale-logo.png"></image>
  17. <text class="font" :class="theme+ '-m-text ' + theme">我的预定</text>
  18. </div>
  19. </app-form-id>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. name: "search-input",
  26. methods: {
  27. route_jump(data) {
  28. if (this.$user.isLogin() && data === '/plugins/advance/order/order') {
  29. uni.navigateTo({
  30. url: data,
  31. })
  32. } else if (!this.$user.isLogin() && data === '/plugins/advance/order/order') {
  33. this.$user.getInfo().then(info => {
  34. uni.navigateTo({
  35. url: data,
  36. })
  37. }).catch(error => {
  38. });
  39. } else {
  40. uni.navigateTo({
  41. url: data,
  42. })
  43. }
  44. }
  45. },
  46. props: {
  47. theme: String,
  48. }
  49. }
  50. </script>
  51. <style scoped lang="scss">
  52. .search-input {
  53. height: #{88rpx};
  54. box-shadow: inset 0 0 1px 0 rgba(0, 0, 0, 0.15);
  55. background-color: #efeff4;
  56. position: fixed;
  57. top: 0;
  58. left: 0;
  59. z-index: 1500;
  60. }
  61. .jump-button {
  62. width: #{224rpx};
  63. height: #{88rpx};
  64. .icon {
  65. width: #{42rpx};
  66. height: #{42rpx};
  67. margin-right: #{8rpx};
  68. }
  69. .font {
  70. font-size: #{26rpx};
  71. text-align: center;
  72. }
  73. }
  74. .input-view {
  75. width: #{526rpx};
  76. .input {
  77. width: #{503rpx};
  78. height: #{56rpx};
  79. margin-left: #{23rpx};
  80. background-color: #ffffff;
  81. border-radius: #{25rpx};
  82. .input-in {
  83. width: #{503rpx};
  84. height: #{56rpx};
  85. .icon {
  86. width: #{26rpx};
  87. height: #{26rpx};
  88. margin-right: #{12rpx};
  89. }
  90. .font {
  91. font-size: #{26rpx};
  92. color: #b2b2b2;
  93. }
  94. }
  95. }
  96. }
  97. </style>