景徳镇旅游微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

261 lines
4.6 KiB

8 months ago
8 months ago
8 months ago
  1. <template>
  2. <uv-popup ref="popup"
  3. :round="30"
  4. bgColor="#f7f7f7">
  5. <view class="content">
  6. <!-- 地址 -->
  7. <view class="address"
  8. @click="openAddress">
  9. <image src="../../static/address/selectIcon.png" mode=""></image>
  10. <view class="">
  11. {{ address.name }}
  12. </view>
  13. <view class="">
  14. {{ address.addressDetail }}
  15. </view>
  16. <view class="icon">
  17. <uv-icon
  18. size="30rpx"
  19. name="arrow-right"></uv-icon>
  20. </view>
  21. </view>
  22. <!-- 商品信息和数量 -->
  23. <view class="submit-info">
  24. <view class="title">
  25. 桌布租赁
  26. </view>
  27. <view class="box">
  28. <image
  29. class="image"
  30. src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg"
  31. mode=""></image>
  32. <view class="info">
  33. <view class="price">
  34. <text>299</text>
  35. </view>
  36. <view class="unit">
  37. 请选择规格
  38. </view>
  39. <view class="">
  40. <uv-number-box v-model="num"></uv-number-box>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 规格 -->
  46. <view class="submit-unit">
  47. <view class="title">
  48. 规格选择
  49. </view>
  50. <view class="list">
  51. <view :class="{act : unitIndex == index}"
  52. v-for="(item, index) in 10"
  53. @click="selectUnit(item, index)"
  54. :key="index">
  55. 120*40*75桌子尺寸
  56. </view>
  57. </view>
  58. </view>
  59. <!-- 费用明细 -->
  60. <view class="expense-detail">
  61. <view class="title">
  62. 费用明细
  63. </view>
  64. <view class="detail">
  65. 押金200
  66. </view>
  67. </view>
  68. <!-- 提交按钮 -->
  69. <view class="submit-btn">
  70. {{ submiitTitle }}
  71. </view>
  72. </view>
  73. <uv-popup ref="addressPopup" :round="30">
  74. <addressList
  75. ref="addressList"
  76. height="60vh"
  77. @select="selectAddress"
  78. />
  79. </uv-popup>
  80. </uv-popup>
  81. </template>
  82. <script>
  83. import addressList from '../address/addressList.vue'
  84. export default {
  85. components : {
  86. addressList
  87. },
  88. props : {
  89. submiitTitle : {
  90. default : '立即租赁',
  91. type : String,
  92. }
  93. },
  94. data() {
  95. return {
  96. unitIndex : 0,
  97. address : {
  98. name : '请选择联系人',
  99. addressDetail : '',
  100. },
  101. num : 1,
  102. unit : {},
  103. }
  104. },
  105. methods: {
  106. // 打开
  107. open(){
  108. this.$refs.popup.open('bottom')
  109. },
  110. // 关闭
  111. close(){
  112. this.$refs.popup.close()
  113. },
  114. // 打开选择地址
  115. openAddress(){
  116. this.$refs.addressPopup.open('bottom')
  117. },
  118. // 选择地址
  119. selectAddress(e){
  120. this.address = e
  121. this.$refs.addressPopup.close()
  122. },
  123. // 选择规格
  124. selectUnit(item, index){
  125. this.unit = item
  126. this.unitIndex = index
  127. },
  128. }
  129. }
  130. </script>
  131. <style scoped lang="scss">
  132. .content{
  133. max-height: 80vh;
  134. overflow: hidden;
  135. overflow-y: auto;
  136. .address{
  137. display: flex;
  138. padding: 20rpx;
  139. background-color: #fff;
  140. image{
  141. width: 30rpx;
  142. height: 30rpx;
  143. margin: 20rpx;
  144. }
  145. view{
  146. margin: 20rpx;
  147. overflow:hidden; //超出的文本隐藏
  148. text-overflow:ellipsis; //溢出用省略号显示
  149. white-space:nowrap; //溢出不换行
  150. }
  151. .icon{
  152. margin-left: auto;
  153. }
  154. }
  155. .submit-info{
  156. background-color: #fff;
  157. padding: 30rpx;
  158. margin-top: 20rpx;
  159. .title{
  160. font-size: 30rpx;
  161. padding: 10rpx;
  162. font-weight: 600;
  163. }
  164. .box{
  165. display: flex;
  166. margin-top: 10rpx;
  167. .image{
  168. width: 200rpx;
  169. height: 200rpx;
  170. border-radius: 20rpx;
  171. margin-right: 20rpx;
  172. }
  173. .info{
  174. flex: 1;
  175. .unit{
  176. font-size: 24rpx;
  177. padding: 10rpx 20rpx;
  178. color: #717171;
  179. display: flex;
  180. align-items: center;
  181. }
  182. .price{
  183. color: $uni-color;
  184. font-size: 28rpx;
  185. padding: 10rpx 20rpx;
  186. text{
  187. font-size: 36rpx;
  188. font-weight: 900;
  189. }
  190. }
  191. }
  192. }
  193. }
  194. .submit-unit{
  195. padding: 30rpx;
  196. background-color: #fff;
  197. .title{
  198. font-size: 28rpx;
  199. font-weight: 600;
  200. }
  201. .list{
  202. display: flex;
  203. flex-wrap: wrap;
  204. font-size: 22rpx;
  205. .act{
  206. color: $uni-color;
  207. border: 1px solid $uni-color;
  208. background-color: #F9E7DE;
  209. }
  210. view{
  211. border-radius: 15rpx;
  212. width: 320rpx;
  213. background-color: #F3F3F3;
  214. border: 1px solid #F3F3F3;
  215. margin: 10rpx;
  216. display: flex;
  217. justify-content: center;
  218. padding: 15rpx 0;
  219. }
  220. }
  221. }
  222. .expense-detail{
  223. padding: 30rpx;
  224. background-color: #fff;
  225. font-size: 28rpx;
  226. .title{
  227. font-weight: 600;
  228. }
  229. .detail{
  230. background-color: #F6F6F6;
  231. color: #717171;
  232. margin: 10rpx 0;
  233. padding: 10rpx 20rpx;
  234. }
  235. }
  236. .submit-btn{
  237. background: $uni-color;
  238. width: 600rpx;
  239. height: 80rpx;
  240. color: #fff;
  241. border-radius: 40rpx;
  242. font-size: 28rpx;
  243. margin: 20rpx auto;
  244. display: flex;
  245. justify-content: center;
  246. align-items: center;
  247. }
  248. }
  249. </style>