sureBuy.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <template>
  2. <view>
  3. <van-radio-group >
  4. <van-cell-group
  5. v-for="(item, index) in list"
  6. :key="index"
  7. >
  8. <van-cell
  9. :border="false"
  10. :title="item.title"
  11. @click="onChange(index)"
  12. >
  13. <template slot="right-icon">
  14. <van-radio-group style="width: 20upx;" :value="radio" >
  15. <van-radio checked-color="#D9332E" :name="index" >
  16. </van-radio>
  17. </van-radio-group>
  18. </template>
  19. </van-cell>
  20. </van-cell-group>
  21. </van-radio-group>
  22. <view v-if="radio === 0"
  23. style="border-top: 15upx solid #F5F5F5;
  24. border-bottom: 15upx solid #F5F5F5;
  25. "
  26. >
  27. <van-field
  28. :value="username"
  29. label="酒店"
  30. placeholder="请输入酒店"
  31. />
  32. <van-field
  33. :value="username"
  34. label="房间号"
  35. placeholder="请输入房间号"
  36. />
  37. <van-field
  38. :value="username"
  39. label="收货人"
  40. placeholder="请输入收货人"
  41. />
  42. <van-field
  43. :value="username"
  44. label="手机号"
  45. placeholder="请输入手机号"
  46. />
  47. </view>
  48. <view v-if="radio === 2"
  49. style="border-top: 15upx solid #F5F5F5;
  50. border-bottom: 15upx solid #F5F5F5;
  51. "
  52. >
  53. <van-field
  54. :value="username"
  55. label="预定酒店"
  56. placeholder="请输入预定酒店"
  57. />
  58. <van-field
  59. :value="username"
  60. label="入住人"
  61. placeholder="请输入入住人"
  62. />
  63. <van-field
  64. :value="username"
  65. label="手机号"
  66. placeholder="请输入手机号"
  67. />
  68. <van-field
  69. :value="username"
  70. label="备注"
  71. placeholder="请输入备注"
  72. />
  73. </view>
  74. <van-cell v-if="radio === 1" @click="goAdress" class="LinkAdress" title="选择地址" is-link/>
  75. <view @tap="goDetail()" class="cart-list">
  76. <view class="topTip">
  77. <view>
  78. <image src="" style="width: 50upx;height: 50upx; vertical-align: middle;background-color: #007AFF;"></image>
  79. <span style="padding-left: 16upx;">华南酒店</span>
  80. </view>
  81. </view>
  82. <view class="shoplist" style="background-color: #fff;">
  83. <view>
  84. <van-card
  85. title-class="changewidth"
  86. price-class ="priceClass"
  87. price="10.00"
  88. desc="描述信息"
  89. title="商品标题"
  90. thumb="https://gd3.alicdn.com/imgextra/i3/0/O1CN01IiyFQI1UGShoFKt1O_!!0-item_pic.jpg_400x400.jpg"
  91. >
  92. </van-card>
  93. </view>
  94. </view>
  95. <view class="topTip">
  96. <view style="font-size: 28upx;">合计:50</view>
  97. </view>
  98. </view>
  99. <!-- 底部付款 -->
  100. <view class="adressbutton">
  101. <view class="buttonStatus">
  102. <view @click="estimate" class="deleteOrder">应付<span>¥0.25</span></view>
  103. <view class="payOrder" @click="goPay">付款</view>
  104. </view>
  105. </view>
  106. </view>
  107. </template>
  108. <script>
  109. export default {
  110. data() {
  111. return {
  112. list:[
  113. {title:'请送到我的房间'},
  114. {title:'快递到我的地址'},
  115. {title:'处理我的客房预定'}
  116. ],
  117. username:'',
  118. radio: 0
  119. }
  120. },
  121. methods: {
  122. onChange(index) {
  123. this.radio = index;
  124. },
  125. goAdress() {
  126. console.log("dddd")
  127. uni.navigateTo({
  128. url: '../myOrder/adress',
  129. });
  130. }
  131. }
  132. }
  133. </script>
  134. <style lang="scss">
  135. .LinkAdress /deep/ .van-cell {
  136. border-top: 15upx solid #F5F5F5;
  137. border-bottom: 15upx solid #F5F5F5;
  138. }
  139. .topTip {
  140. display: flex;
  141. align-items: center;
  142. justify-content: space-between;
  143. padding: 20upx 36upx;
  144. border-bottom: 1px solid #F5F5F5;
  145. }
  146. .changewidth {
  147. color: #303133;
  148. font-size: 32upx;
  149. font-weight: 100!important;
  150. }
  151. .priceClass {
  152. color:#303133!important;
  153. font-weight: 100!important;
  154. font-size: 36upx;
  155. }
  156. .van-card {
  157. background-color: #fff!important;
  158. }
  159. .shoplist {
  160. display: flex;
  161. justify-content: space-between;
  162. align-items: center;
  163. }
  164. .adressbutton {
  165. position: fixed;
  166. bottom: 0;
  167. width: 100%;
  168. .buttonStatus {
  169. display: flex;
  170. text-align: left;
  171. .deleteOrder {
  172. flex: 3;
  173. color: #303133;
  174. font-size: 32upx;
  175. background-color: #fff;
  176. padding: 10px 0;
  177. }
  178. .payOrder {
  179. flex: 1;
  180. font-size: 32upx;
  181. color: #fff;
  182. background-color: #D9332E;
  183. padding: 10px 0;
  184. text-align: center;
  185. }
  186. }
  187. }
  188. </style>