quickPickUp.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <!-- .设置了自提模式的商户展示该模块,没有自提模式的不展示; -->
  3. <view class="quick-pick-up-wrapper">
  4. <view class="quick-pick-up-wrapper__text">快速提货</view>
  5. <view class="quick-pick-up-wrapper__input">
  6. <!-- 输入框 -->
  7. <input
  8. class="input-box"
  9. type="text"
  10. placeholder="请输入提货码"
  11. v-model="pickupCode"
  12. />
  13. <!-- 查询按钮 -->
  14. <button
  15. type="primary"
  16. class="query-btn"
  17. @click="handleQuery"
  18. >查询</button>
  19. </view>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. pickupCode:""
  27. };
  28. },
  29. methods:{
  30. handleQuery(){
  31. if (!this.pickupCode){
  32. uni.showToast({
  33. title: '请输入提货码',
  34. icon: 'none'
  35. })
  36. return
  37. }
  38. console.log(this.pickupCode)
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss">
  44. .quick-pick-up-wrapper{
  45. width: 100%;
  46. min-height: 222rpx;
  47. background: #FFFFFF;
  48. border-radius: 16rpx;
  49. display: flex;
  50. flex-direction: column;
  51. &__text{
  52. font-size: 36rpx;
  53. font-weight: bold;
  54. color: #333;
  55. margin: 32rpx 0rpx 26rpx 26rpx;
  56. user-select: none;
  57. }
  58. &__input{
  59. display: flex;
  60. flex-direction: row;
  61. width: calc(100% - 0rpx);
  62. height: 74rpx;
  63. border-radius: 6rpx;
  64. padding: 0 26rpx;
  65. box-sizing: border-box;
  66. .input-box {
  67. width: 85%;
  68. border-radius: 12rpx;
  69. padding: 0 20rpx;
  70. font-size: 32rpx;
  71. height: 74rpx;
  72. background: #F5F5F5;
  73. border-radius: 6rpx;
  74. box-sizing: border-box;
  75. }
  76. .query-btn {
  77. user-select: none;
  78. display: flex;
  79. align-items: center;
  80. justify-content: center;
  81. width: 150rpx;
  82. height: 74rpx;
  83. background: #1F7CFF;
  84. border-radius: 6rpx;
  85. font-family: PingFangSC, PingFang SC;
  86. font-weight: 400;
  87. font-size: 28rpx;
  88. color: #FFFFFF;
  89. }
  90. }
  91. }
  92. </style>