index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <template>
  2. <div class="af-reserve">
  3. <van-pull-refresh
  4. v-model="isLoading"
  5. @refresh="onRefresh">
  6. <van-list
  7. v-model="loading"
  8. :finished="finished"
  9. finished-text="没有更多了"
  10. @load="onLoad"
  11. class="content">
  12. <ul>
  13. <li>
  14. <p class="status-wrap">
  15. <span>04月19日 周一 19:45</span>
  16. <span>待支付</span>
  17. </p>
  18. <p class="place-name">10人卡座(舞台左侧)</p>
  19. <p class="outlet">AF House音乐现场(西子广场山姆会员店)</p>
  20. <div class="payment">
  21. <p class="number">订位人数:1</p>
  22. <p class="amount">
  23. <span>合计:100</span>
  24. <img src="./image/ic_Alipay_nor@2x.png" alt="">
  25. </p>
  26. </div>
  27. <div class="btn-wrap">
  28. <van-button class="pay" type="danger">支付</van-button>
  29. <van-button class="check-code" type="danger">我的订座二维码</van-button>
  30. <van-button class="cancel" type="default">取消</van-button>
  31. <van-button class="hide" type="default">隐藏订单</van-button>
  32. </div>
  33. </li>
  34. </ul>
  35. </van-list>
  36. </van-pull-refresh>
  37. </div>
  38. </template>
  39. <script>
  40. import axios from 'axios'
  41. import qs from 'qs'
  42. import { PullRefresh, List, Button } from 'vant'
  43. export default {
  44. components: {
  45. 'van-pull-refresh': PullRefresh,
  46. 'van-list': List,
  47. 'van-button': Button
  48. },
  49. data () {
  50. return {
  51. saleDataList: [],
  52. isLoading: false,
  53. loading: false,
  54. finished: false
  55. }
  56. },
  57. methods: {
  58. onRefresh () {
  59. // this.getList()
  60. },
  61. onLoad () {
  62. // this.getList()
  63. },
  64. /**
  65. * 请求数据方法
  66. */
  67. async getList () {
  68. try {
  69. const { data } = await axios.post('/Journalism/lst', qs.stringify({
  70. Page: 1,
  71. PageSize: 15,
  72. mode: 'web'
  73. }))
  74. this.list = data.Data.articles
  75. this.saleDataList = this.saleDataList.concat(data.Data.articles)
  76. // 加载状态结束
  77. this.loading = false
  78. this.isLoading = false
  79. // 数据全部加载完成
  80. if (this.saleDataList.length >= 40) {
  81. this.finished = true
  82. }
  83. } catch (err) {
  84. console.log(err)
  85. }
  86. }
  87. }
  88. }
  89. </script>
  90. <style scoped lang="scss">
  91. .af-reserve {
  92. background: #F2F2F2;
  93. .content {
  94. min-height: 100vh;
  95. padding-bottom: 30px;
  96. }
  97. }
  98. ul {
  99. li {
  100. width: 100%;
  101. padding: 16px 20px 10px;
  102. margin: 6px auto;
  103. background: #fff;
  104. &:nth-of-type(1) {
  105. margin-top: 0;
  106. }
  107. }
  108. }
  109. .status-wrap {
  110. display: flex;
  111. justify-content: space-between;
  112. align-items: center;
  113. span {
  114. font-size: 12px;
  115. font-family: PingFangSC-Medium, PingFang SC;
  116. font-weight: 500;
  117. line-height: 17px;
  118. &:nth-of-type(1) {
  119. color: #1F1E1E;
  120. }
  121. &:nth-of-type(2) {
  122. color: #D32323;
  123. }
  124. }
  125. }
  126. .place-name {
  127. margin-top: 16px;
  128. font-size: 18px;
  129. font-family: PingFangSC-Medium, PingFang SC;
  130. font-weight: 500;
  131. color: #1F1E1E;
  132. line-height: 25px;
  133. letter-spacing: 1px;
  134. }
  135. .outlet {
  136. margin-top: 4px;
  137. font-size: 14px;
  138. color: #736F6F;
  139. line-height: 20px;
  140. }
  141. .number {
  142. font-size: 14px;
  143. color: #736F6F;
  144. line-height: 20px;
  145. }
  146. .payment {
  147. display: flex;
  148. justify-content: space-between;
  149. align-items: center;
  150. margin-top: 12px;
  151. }
  152. .amount {
  153. display: flex;
  154. align-items: center;
  155. span {
  156. font-size: 14px;
  157. color: #736F6F;
  158. line-height: 20px;
  159. }
  160. img {
  161. width: 21px;
  162. height: 21px;
  163. margin-left: 10px;
  164. }
  165. }
  166. .btn-wrap {
  167. ::v-deep .van-button {
  168. .van-button__text {
  169. font-size: 12px;
  170. color: #FFFFFF;
  171. line-height: 24px;
  172. }
  173. }
  174. .pay {
  175. width: 64px;
  176. height: 24px;
  177. background: #D32323;
  178. border-radius: 12px;
  179. border: none;
  180. }
  181. .check-code {
  182. width: 118px;
  183. height: 24px;
  184. background: #D32323;
  185. border-radius: 20px;
  186. }
  187. .cancel {
  188. width: 64px;
  189. height: 24px;
  190. background: #FFFFFF;
  191. border-radius: 12px;
  192. border: 1px solid #F2F2F2;
  193. .van-button__text {
  194. color: #736F6F;
  195. }
  196. }
  197. .hide {
  198. width: 82px;
  199. height: 24px;
  200. background: #FFFFFF;
  201. border-radius: 12px;
  202. border: 1px solid #F2F2F2;
  203. .van-button__text {
  204. color: #736F6F;
  205. }
  206. }
  207. }
  208. </style>