百富门答题小程序
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.

288 lines
5.2 KiB

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