酒店桌布为微信小程序
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.

248 lines
4.5 KiB

9 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. </view>
  60. <!-- 费用明细 -->
  61. <view class="">
  62. </view>
  63. <!-- 提交按钮 -->
  64. <view class="">
  65. </view>
  66. <uv-popup ref="addressPopup" :round="30">
  67. <addressList
  68. :addressList="addressList"
  69. @select="selectAddress"
  70. />
  71. </uv-popup>
  72. </uv-popup>
  73. </template>
  74. <script>
  75. import addressList from '../address/addressList.vue'
  76. export default {
  77. components : {
  78. addressList
  79. },
  80. data() {
  81. return {
  82. unitIndex : 0,
  83. addressList: [
  84. {
  85. id : 1,
  86. name : 'xx',
  87. phone : '1305xxxx802',
  88. address : '广东省广州市越秀区',
  89. addressDetail : '城南故事C3栋2802',
  90. },
  91. {
  92. id : 2,
  93. name : 'xx',
  94. phone : '1305xxxx802',
  95. address : '广东省广州市越秀区',
  96. addressDetail : '城南故事C3栋2802',
  97. },
  98. {
  99. id : 3,
  100. name : 'xx',
  101. phone : '1305xxxx802',
  102. address : '广东省广州市越秀区',
  103. addressDetail : '城南故事C3栋2802',
  104. },
  105. ],
  106. address : {
  107. name : '请选择联系人',
  108. addressDetail : '',
  109. },
  110. num : 1,
  111. unit : {},
  112. }
  113. },
  114. methods: {
  115. // 打开
  116. open(){
  117. this.$refs.popup.open('bottom')
  118. },
  119. // 关闭
  120. close(){
  121. this.$refs.popup.close()
  122. },
  123. // 打开选择地址
  124. openAddress(){
  125. if (!this.addressList.length) {
  126. return uni.navigateTo({
  127. url: '/pages_order/mine/address'
  128. })
  129. }
  130. this.$refs.addressPopup.open('bottom')
  131. },
  132. // 选择地址
  133. selectAddress(e){
  134. this.address = e
  135. this.$refs.addressPopup.close()
  136. },
  137. // 选择规格
  138. selectUnit(item, index){
  139. this.unit = item
  140. this.unitIndex = index
  141. },
  142. }
  143. }
  144. </script>
  145. <style scoped lang="scss">
  146. .content{
  147. max-height: 80vh;
  148. overflow: hidden;
  149. overflow-y: auto;
  150. .address{
  151. display: flex;
  152. padding: 20rpx;
  153. background-color: #fff;
  154. image{
  155. width: 30rpx;
  156. height: 30rpx;
  157. margin: 20rpx;
  158. }
  159. view{
  160. margin: 20rpx;
  161. overflow:hidden; //超出的文本隐藏
  162. text-overflow:ellipsis; //溢出用省略号显示
  163. white-space:nowrap; //溢出不换行
  164. }
  165. .icon{
  166. margin-left: auto;
  167. }
  168. }
  169. .submit-info{
  170. background-color: #fff;
  171. padding: 30rpx;
  172. margin-top: 20rpx;
  173. .title{
  174. font-size: 30rpx;
  175. padding: 10rpx;
  176. font-weight: 600;
  177. }
  178. .box{
  179. display: flex;
  180. margin-top: 10rpx;
  181. .image{
  182. width: 200rpx;
  183. height: 200rpx;
  184. border-radius: 20rpx;
  185. margin-right: 20rpx;
  186. }
  187. .info{
  188. flex: 1;
  189. .unit{
  190. font-size: 24rpx;
  191. padding: 10rpx 20rpx;
  192. color: #717171;
  193. display: flex;
  194. align-items: center;
  195. }
  196. .price{
  197. color: $uni-color;
  198. font-size: 28rpx;
  199. padding: 10rpx 20rpx;
  200. text{
  201. font-size: 36rpx;
  202. font-weight: 900;
  203. }
  204. }
  205. }
  206. }
  207. }
  208. .submit-unit{
  209. padding: 30rpx;
  210. background-color: #fff;
  211. .title{
  212. font-size: 28rpx;
  213. font-weight: 600;
  214. }
  215. .list{
  216. display: flex;
  217. flex-wrap: wrap;
  218. font-size: 22rpx;
  219. .act{
  220. color: $uni-color;
  221. border: 1px solid $uni-color;
  222. background-color: #F9E7DE;
  223. }
  224. view{
  225. border-radius: 15rpx;
  226. width: 320rpx;
  227. background-color: #F3F3F3;
  228. border: 1px solid #F3F3F3;
  229. margin: 10rpx;
  230. display: flex;
  231. justify-content: center;
  232. padding: 15rpx 0;
  233. }
  234. }
  235. }
  236. }
  237. </style>