search-input.vue 2.6 KB

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