chair-man.vue 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <template>
  2. <view class="page-chair-man" v-if="info">
  3. <uni-nav-bar :fixed="true" height="180rpx" :title="title" color="#FFF" left-icon="left" backgroundColor="rgb(0,0,0,0)" :border="false" @clickLeft="onBack"/>
  4. <view class="chair-man-bg">
  5. <view class="chair-man-content">
  6. <view class="section1">
  7. <view class="title">{{subTitle}}</view>
  8. <view class="container">
  9. <view class="image">
  10. <image :src="info.headerImg" class="img"></image>
  11. </view>
  12. <view class="intro">
  13. <view class="name">{{info.name}}</view>
  14. <view class="tags">
  15. <block v-for="(it,index) in info.tags">
  16. <view class="tag">{{it}}</view>
  17. </block>
  18. </view>
  19. <view class="pointer">
  20. <uni-rate color="#CCCCCC" activeColor="#b11b1c" :value="info.point" readonly/>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="section2">
  26. <rich-text :nodes="info.intro"></rich-text>
  27. </view>
  28. <view class="section3">
  29. <view class="top">
  30. <view class="left">剧目排期</view>
  31. <view class="right">剧场早鸟特权卡售卖中,查看详情</view>
  32. </view>
  33. <PlanDate @onSetDate="onSetDate"></PlanDate>
  34. </view>
  35. <view class="selection">
  36. <uni-data-select class="data-select"
  37. v-model="queryForm.area"
  38. :localdata="dataArea"
  39. @change="onChangeArea"
  40. :clear="false"
  41. ></uni-data-select>
  42. <uni-data-select class="data-select"
  43. v-model="queryForm.type"
  44. :localdata="typeList"
  45. @change="onChangeType"
  46. :clear="false"
  47. ></uni-data-select>
  48. <uni-easyinput v-model="queryForm.keyword" placeholder="请输入内容" @change="onChangeKeyword"></uni-easyinput>
  49. </view>
  50. <view class="events-list">
  51. <block v-for="(it,index) in dataList">
  52. <EventItem :info="it"></EventItem>
  53. </block>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. import {
  61. mapState,
  62. mapGetters,
  63. mapMutations
  64. } from 'vuex'
  65. const app = getApp();
  66. let hideLoading = true;
  67. import PlanDate from '@/components/PlanDate/PlanDate.vue'
  68. import EventItem from '@/components/EventItem/EventItem.vue'
  69. export default {
  70. components:{
  71. EventItem,
  72. PlanDate
  73. },
  74. computed: {
  75. ...mapState(['store_id','systemInfo'])
  76. },
  77. data() {
  78. return {
  79. performId:0,
  80. info:null,
  81. list:[],
  82. keyword:'',
  83. title:'',
  84. subTitle:'',
  85. queryForm:{
  86. page:0,
  87. pageSize:10,
  88. performerId:'',
  89. planStartTime:'',
  90. planEndTime:'',
  91. keyword:'',
  92. type:'',
  93. area:'',
  94. },
  95. dataList:[],
  96. recordCount:0,
  97. dataArea:[
  98. {
  99. value:'',
  100. text:'所在区域',
  101. }
  102. ],
  103. typeList:[
  104. {
  105. value:'',
  106. text:'所有分类',
  107. },
  108. {
  109. value:'1',
  110. text:'剧场',
  111. },
  112. {
  113. value:'2',
  114. text:'活动',
  115. }
  116. ],
  117. area:'',
  118. sort:'',
  119. }
  120. },
  121. onLoad(option){
  122. this.performId=option.id||0;
  123. this.initSearchArea();
  124. if(this.performId>0){
  125. this.queryForm.page=0;
  126. this.queryForm.performerId=this.performId;
  127. this.initPerformer();
  128. this.onSearch();
  129. }
  130. },
  131. methods: {
  132. initSearchArea(){
  133. let _this=this;
  134. _this.$http.request('zc/searcharea',{}, "", "", hideLoading).then(res => {
  135. _this.dataArea=[];
  136. _this.dataArea.push({
  137. value:'',
  138. text:'所在区域',
  139. });
  140. for(var i=0;i<res.data.dataList.length;i++){
  141. _this.dataArea.push({
  142. value:res.data.dataList[i].district,
  143. text:res.data.dataList[i].district,
  144. })
  145. }
  146. }).catch(err => {})
  147. },
  148. onBack(e){
  149. uni.navigateBack(-1);
  150. },
  151. onChangeArea(e){
  152. this.queryForm.area=e;
  153. this.queryForm.page=0;
  154. this.onSearch();
  155. },
  156. onChangeType(e){
  157. this.queryForm.type=e;
  158. this.queryForm.page=0;
  159. this.onSearch();
  160. },
  161. onChangeKeyword(e){
  162. this.queryForm.keyword=e;
  163. this.queryForm.page=0;
  164. this.onSearch();
  165. },
  166. onSetDate(e){
  167. let _this=this;
  168. _this.queryForm.planStartTime=e+" 00:00:00";
  169. _this.queryForm.planEndTime=e+" 23:00:00";
  170. _this.queryForm.page=0;
  171. _this.onSearch();
  172. },
  173. onSearch(){
  174. let _this=this;
  175. if(_this.queryForm.page<1){
  176. _this.dataList=[];
  177. }
  178. _this.queryForm.page++;
  179. _this.$http.request('zc/search',_this.queryForm,'','',hideLoading).then(res=>{
  180. _this.recordCount=res.data.recordCount;
  181. _this.dataList=_this.dataList.concat(res.data.dataList);
  182. })
  183. },
  184. initPerformer(){
  185. let _this=this;
  186. _this.$http.request('zc/performer', {
  187. id:this.performId
  188. }, "", "", hideLoading).then(res => {
  189. _this.info=res.data.info;
  190. if(_this.info.type==1){
  191. _this.title="主持人介绍";
  192. _this.subTitle="当家主持人";
  193. }else{
  194. _this.title="主理人介绍";
  195. _this.subTitle="当家主理人";
  196. }
  197. }).catch(err => {
  198. })
  199. },
  200. }
  201. }
  202. </script>
  203. <style lang="scss">
  204. @import './chair-man.scss'
  205. </style>