quickPickUp.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <template>
  2. <!-- .设置了自提模式的商户展示该模块,没有自提模式的不展示; -->
  3. <view class="card-list-wrapper">
  4. <view class="card-list-wrapper__text">快速提货</view>
  5. <view class="card-list-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" scoped>
  44. .card-list-wrapper{
  45. min-height: 222rpx;
  46. background: #FFFFFF;
  47. border-radius: 16rpx;
  48. display: flex;
  49. flex-direction: column;
  50. &__text{
  51. font-size: 36rpx;
  52. font-weight: bold;
  53. color: #333;
  54. margin: 32rpx 0rpx 26rpx 26rpx;
  55. user-select: none;
  56. }
  57. &__input{
  58. display: flex;
  59. flex-direction: row;
  60. width: calc(100% - 0rpx);
  61. height: 74rpx;
  62. border-radius: 6rpx;
  63. padding: 0 26rpx;
  64. box-sizing: border-box;
  65. .input-box {
  66. width: 85%;
  67. border-radius: 12rpx;
  68. padding: 0 20rpx;
  69. font-size: 32rpx;
  70. height: 74rpx;
  71. background: #F5F5F5;
  72. border-radius: 6rpx;
  73. box-sizing: border-box;
  74. }
  75. .query-btn {
  76. user-select: none;
  77. display: flex;
  78. align-items: center;
  79. justify-content: center;
  80. width: 150rpx;
  81. height: 74rpx;
  82. background: #1F7CFF;
  83. border-radius: 6rpx;
  84. font-family: PingFangSC, PingFang SC;
  85. font-weight: 400;
  86. font-size: 28rpx;
  87. color: #FFFFFF;
  88. white-space: nowrap;
  89. }
  90. }
  91. }
  92. </style>