index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view class="pages">
  3. <view class="search-wrap">
  4. <u-search
  5. placeholder="请输入关键词"
  6. :clearabled="true"
  7. :showAction="true"
  8. height="60rpx"
  9. @search="search"
  10. @custom="search"
  11. @clear="reloadList"
  12. bgColor="#fff"
  13. borderColor="#fff"
  14. v-model="params.keyword">
  15. </u-search>
  16. </view>
  17. <view class="page-wrap">
  18. <view class="star-title u-flex u-row-between">
  19. <view class="left u-flex">
  20. <!-- <image class="icon" :src="staticUrl+'/img/title-star.png'" ></image> -->
  21. <text class="text">剧目</text>
  22. </view>
  23. </view>
  24. <swiper class="swiper" :autoplay="true" style="height: 400rpx;margin-bottom: 34rpx" >
  25. <swiper-item :item-id="item.id" v-for="(item,index) in theatreList" :key="index">
  26. <view class="programme-wrap">
  27. <view class="programme">
  28. <image class="img" :src="item.showImg" ></image>
  29. <!-- <image class="img" :src="item.showImg" ></image> -->
  30. <view class="text u-flex u-row-between">
  31. <view class="left">
  32. <view class="name">{{item.name}}</view>
  33. <!-- <view class="addr">演出地点:{{item.address}}</view> -->
  34. </view>
  35. <view class="btn" @click="bookticket(item)">立即报名</view>
  36. </view>
  37. <!-- <view class="share" @click="getPoster(item)">
  38. <image class="icon" :src="staticUrl+'/img/share-ico.png'" ></image>
  39. </view> -->
  40. </view>
  41. </view>
  42. </swiper-item>
  43. </swiper>
  44. </view>
  45. <u-toast ref="uToast"></u-toast>
  46. <tabbar :tabbarIndexProps='0' />
  47. </view>
  48. </template>
  49. <script>
  50. import { systemInfo } from "@/mixin.js";
  51. import tabbar from "../../components/tabbar.vue";
  52. export default {
  53. components:{
  54. tabbar,
  55. // cartfixed
  56. },
  57. mixins:[systemInfo],
  58. data() {
  59. return {
  60. staticUrl:this.$commonConfig.staticUrl,
  61. params:{
  62. keyword:''
  63. },
  64. theatreList:[],//剧院信息列表
  65. }
  66. },
  67. computed: {
  68. },
  69. onShow() {
  70. },
  71. beforeRouteLeave() {
  72. },
  73. onLoad(query) {
  74. this.getSystemInfo();
  75. // console.log('statusBarHeight',this.statusBarHeight);
  76. // console.log('navigationBarHeight',this.navigationBarHeight);
  77. // console.log('windowHeight',this.windowHeight);
  78. // console.log('navHeight',this.navHeight);
  79. // console.log('vuex_member_info=======',this.vuex_member_info);
  80. this.getClientIndex();
  81. },
  82. onReady() {
  83. },
  84. onUnload() {
  85. },
  86. methods: {
  87. getMemberInfo(){
  88. this.$u.api.memberInfo({id:this.vuex_member_info.id}).then(res=>{
  89. this.memberInfo = res.data;
  90. this.avatar = res.data.avatar;
  91. this.$u.vuex('vuex_member_info', res.data);
  92. // console.log('memberInfo',this.memberInfo);
  93. }).catch(err=>{
  94. // console.log('memberInfo',err.data);
  95. })
  96. },
  97. getClientIndex(){
  98. this.$u.api.teamIndex(this.params).then(res=>{
  99. // console.log('res',res);
  100. this.theatreList = res.data.performList;
  101. }).catch(err=>{
  102. console.log('getClientIndex',err.data);
  103. })
  104. },
  105. goLogin(){
  106. uni.$u.route('/pages/login/login')
  107. },
  108. bookticket(item){
  109. // console.log('bookticket',item);
  110. uni.$u.route('pages/ticketlist',{id:item.id})
  111. },
  112. search(e){
  113. uni.$u.route('pages/searchpage',{keyword:e})
  114. },
  115. reloadList(){
  116. console.log('reloadList');
  117. }
  118. }
  119. }
  120. </script>
  121. <style>
  122. page{
  123. background-color: #fff;
  124. }
  125. </style>
  126. <style lang="scss" scoped>
  127. $pagegap:32rpx;
  128. .page-wrap{
  129. position: relative;
  130. }
  131. .search-wrap{
  132. background-color: #EF2121;
  133. /deep/ .u-search__action{
  134. color: #fff;
  135. }
  136. }
  137. .star-title{
  138. margin-bottom: 32rpx;
  139. .left{
  140. .icon{
  141. width: 28rpx;
  142. height: 28rpx;
  143. margin-right: 8rpx;
  144. }
  145. .text{
  146. font-size: 32rpx;
  147. font-weight: bold;
  148. color: #2D2D2D;
  149. line-height: 48rpx;
  150. }
  151. }
  152. .right{
  153. .text{
  154. font-size: 24rpx;
  155. font-weight: 400;
  156. color: #C79191;
  157. }
  158. }
  159. }
  160. .swiper{
  161. box-shadow:
  162. 0px 0.6px 0.8px rgba(0, 0, 0, 0.022),
  163. 0px 1.5px 2.1px rgba(0, 0, 0, 0.031),
  164. 0px 3px 4.3px rgba(0, 0, 0, 0.039),
  165. 0px 6.2px 8.8px rgba(0, 0, 0, 0.048),
  166. 0px 17px 24px rgba(0, 0, 0, 0.07)
  167. ;
  168. border-radius: 30rpx;
  169. }
  170. </style>