chosenposition.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <view class="pages">
  3. <view class="" :style="{height: navHeight+'px' }"></view>
  4. <view class="navbar-box">
  5. <u-navbar title="选择区域" :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}" leftIconColor="#fff" bgColor="#EF1818"></u-navbar>
  6. </view>
  7. <view class="page-wrap">
  8. <view class="base-info">
  9. <view class="name">{{params.performName}}</view>
  10. <view class="time u-flex">
  11. <view class="title">{{params.day|checkDate}}</view>
  12. <text>{{$u.timeFormat(pageData.performTimeStart, 'hh:MM')}} - {{$u.timeFormat(pageData.performTimeEnd, 'hh:MM')}}</text>
  13. </view>
  14. </view>
  15. <view class="position-wrap u-flex u-row-center">
  16. <view class="u-flex item" :class="{active:positionIndex==index}" @click="positionClick(index)" v-for="(item,index) in positionArr" :key="index">
  17. <image class="icon" :src="item.icon" ></image>
  18. <text>¥{{item.price}}</text>
  19. </view>
  20. </view>
  21. <image class="position-img" :src="staticUrl+'/img/position-img.png'" mode="widthFix"></image>
  22. <view class="btn" @click="book">确定区域</view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import { systemInfo } from "@/mixin.js";
  28. export default {
  29. mixins: [systemInfo],
  30. data() {
  31. return {
  32. staticUrl:this.$commonConfig.staticUrl,
  33. params:{
  34. day:'',
  35. goodsId:'',
  36. performId:'',
  37. performName:'',
  38. time:'',
  39. },
  40. positionArr:[
  41. {price:120,positionName:'vip区',icon:this.$commonConfig.staticUrl+'/img/position-1.png'},
  42. {price:360,positionName:'vip区',icon:this.$commonConfig.staticUrl+'/img/position-2.png'},
  43. {price:240,positionName:'vip区',icon:this.$commonConfig.staticUrl+'/img/position-3.png'}
  44. ],
  45. positionIndex:0,
  46. pageData:{},
  47. }
  48. },
  49. onShow() {
  50. },
  51. onLoad(page) {
  52. console.log('page',page);
  53. this.pageData = page;
  54. this.params.day = page.day;
  55. this.params.goodsId = page.goodsId;
  56. this.params.performId = page.performId;
  57. this.params.performName = page.performName;
  58. this.params.time = page.time;
  59. this.getSystemInfo();
  60. },
  61. methods: {
  62. leftClick(e){
  63. let pages = getCurrentPages();
  64. if(pages.length==1){
  65. uni.$u.route('/pages/index/index')
  66. }else{
  67. uni.navigateBack()
  68. };
  69. },
  70. book(){
  71. this.params.price = this.positionArr[this.positionIndex].price;
  72. this.params.positionName = this.positionArr[this.positionIndex].positionName;
  73. uni.$u.route('pages/bookticket',this.params)
  74. },
  75. positionClick(index){
  76. this.positionIndex = index;
  77. }
  78. }
  79. }
  80. </script>
  81. <style>
  82. page{
  83. background-color: #F7F7F9;
  84. }
  85. </style>
  86. <style lang="scss" scoped>
  87. .page-wrap{
  88. padding-top: 36rpx;
  89. }
  90. .base-info{
  91. background: #FFFFFF;
  92. box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(221,221,221,0.4);
  93. border-radius: 16rpx;
  94. padding: 38rpx 28rpx;
  95. margin-bottom: 54rpx;
  96. .name{
  97. font-size: 28rpx;
  98. font-weight: bold;
  99. color: #2D2D2D;
  100. line-height: 42rpx;
  101. margin-bottom: 24rpx;
  102. }
  103. .time{
  104. font-size: 24rpx;
  105. font-weight: 400;
  106. color: #7F7F7F;
  107. .title{
  108. font-size: 24rpx;
  109. font-weight: 500;
  110. color: #F01414;
  111. margin-right: 26rpx;
  112. }
  113. }
  114. }
  115. .position-wrap{
  116. margin-bottom: 80rpx;
  117. .item{
  118. padding: 20rpx 24rpx 14rpx;
  119. border-radius: 8rpx;
  120. border: 2rpx solid #D9D9D9;
  121. margin: 0 24rpx;
  122. font-size: 24rpx;
  123. font-weight: 500;
  124. color: #EF1D1E;
  125. .icon{
  126. display: block;
  127. width: 36rpx;
  128. height: 36rpx;
  129. margin-right: 20rpx;
  130. }
  131. &.active{
  132. border-color: #EF1D1E;
  133. }
  134. }
  135. }
  136. .position-img{
  137. width: 100%;
  138. margin-bottom: 40rpx;
  139. }
  140. .btn{
  141. height: 92rpx;
  142. line-height: 92rpx;
  143. background: linear-gradient(90deg, #FF7878 0%, #ED0000 100%);
  144. border-radius: 46rpx;
  145. text-align: center;
  146. font-size: 28rpx;
  147. font-weight: 400;
  148. color: #FFFFFF;
  149. }
  150. </style>