addSite.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <template>
  2. <view class="wrap">
  3. <view class="top">
  4. <view class="item">
  5. <view class="left">收货人</view>
  6. <input type="text" placeholder-class="line" placeholder="请填写收货人姓名" />
  7. </view>
  8. <view class="item">
  9. <view class="left">手机号码</view>
  10. <input type="text" placeholder-class="line" placeholder="请填写收货人手机号" />
  11. </view>
  12. <view class="item" @tap="showRegionPicker">
  13. <view class="left">所在地区</view>
  14. <input disabled type="text" placeholder-class="line" placeholder="省市区县、乡镇等" />
  15. </view>
  16. <view class="item address">
  17. <view class="left">详细地址</view>
  18. <textarea type="text" placeholder-class="line" placeholder="街道、楼牌等" />
  19. </view>
  20. <!-- <view class="site-clipboard">
  21. <textarea placeholder-class="line" value="" placeholder="粘贴文本,可自动识别姓名和地址等" />
  22. <view class="clipboard">
  23. 地址粘贴板
  24. <u-icon name="arrow-down" class="icon" :size="20"></u-icon>
  25. </view>
  26. </view> -->
  27. </view>
  28. <view class="bottom">
  29. <view class="tag">
  30. <view class="left">标签</view>
  31. <view class="right">
  32. <text class="tags">家</text>
  33. <text class="tags">公司</text>
  34. <text class="tags">学校</text>
  35. <view class="tags plus"><u-icon size="22" name="plus"></u-icon></view>
  36. </view>
  37. </view>
  38. <view class="default">
  39. <view class="left">
  40. <view class="set">设置默认地址</view>
  41. <view class="tips">提醒:每次下单会默认推荐该地址</view>
  42. </view>
  43. <view class="right"><switch color="red" @change="setDefault" /></view>
  44. </view>
  45. </view>
  46. <u-picker mode="region" ref="uPicker" v-model="show" />
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. data() {
  52. return {
  53. show: false
  54. };
  55. },
  56. methods: {
  57. setDefault() {},
  58. showRegionPicker() {
  59. this.show = true;
  60. }
  61. }
  62. };
  63. </script>
  64. <style lang="scss" scoped>
  65. :v-deep(.line) {
  66. color: $u-light-color;
  67. font-size: 28rpx;
  68. }
  69. .wrap {
  70. background-color: #f2f2f2;
  71. .top {
  72. background-color: #ffffff;
  73. border-top: solid 2rpx $u-border-color;
  74. padding: 22rpx;
  75. .item {
  76. display: flex;
  77. font-size: 32rpx;
  78. line-height: 100rpx;
  79. align-items: center;
  80. border-bottom: solid 2rpx $u-border-color;
  81. .left {
  82. width: 180rpx;
  83. }
  84. input {
  85. text-align: left;
  86. }
  87. }
  88. .address {
  89. padding: 20rpx 0;
  90. textarea {
  91. // width: 100%;
  92. height: 150rpx;
  93. background-color: #f7f7f7;
  94. line-height: 60rpx;
  95. margin: 40rpx auto;
  96. padding: 20rpx;
  97. }
  98. }
  99. .site-clipboard {
  100. padding-right: 40rpx;
  101. textarea {
  102. // width: 100%;
  103. height: 150rpx;
  104. background-color: #f7f7f7;
  105. line-height: 60rpx;
  106. margin: 40rpx auto;
  107. padding: 20rpx;
  108. }
  109. .clipboard {
  110. display: flex;
  111. justify-content: center;
  112. align-items: center;
  113. font-size: 26rpx;
  114. color: $u-tips-color;
  115. height: 80rpx;
  116. .icon {
  117. margin-top: 6rpx;
  118. margin-left: 10rpx;
  119. }
  120. }
  121. }
  122. }
  123. .bottom {
  124. margin-top: 20rpx;
  125. padding: 40rpx;
  126. padding-right: 0;
  127. background-color: #ffffff;
  128. font-size: 28rpx;
  129. .tag {
  130. display: flex;
  131. .left {
  132. width: 160rpx;
  133. }
  134. .right {
  135. display: flex;
  136. flex-wrap: wrap;
  137. .tags {
  138. width: 140rpx;
  139. padding: 16rpx 8rpx;
  140. border: solid 2rpx $u-border-color;
  141. text-align: center;
  142. border-radius: 50rpx;
  143. margin: 0 10rpx 20rpx;
  144. display: flex;
  145. font-size: 28rpx;
  146. align-items: center;
  147. justify-content: center;
  148. color: $u-content-color;
  149. line-height: 1;
  150. }
  151. .plus {
  152. //padding: 10rpx 0;
  153. }
  154. }
  155. }
  156. .default {
  157. margin-top: 50rpx;
  158. display: flex;
  159. justify-content: space-between;
  160. border-bottom: solid 2rpx $u-border-color;
  161. line-height: 64rpx;
  162. .tips {
  163. font-size: 24rpx;
  164. }
  165. .right {
  166. }
  167. }
  168. }
  169. }
  170. </style>