ticketlist.vue 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416
  1. <template>
  2. <view class="pages">
  3. <view class="navbar-box">
  4. <u-navbar title=" " :safeAreaInsetTop="true" @leftClick="leftClick" :titleStyle="{color:'#fff'}" leftIconColor="#fff" bgColor="transparent"></u-navbar>
  5. </view>
  6. <view class="banner">
  7. <!-- <image class="img" :src="staticUrl+'/img/bookticket-banner.png'" alt=""> -->
  8. <!-- <image class="img" :src="theatre.showImg" alt=""> -->
  9. <u-swiper
  10. :list="performInfo.photoList"
  11. height="554rpx"
  12. indicatorMode="dot"
  13. :indicatorStyle="{bottom:'100rpx'}"
  14. keyName="imageUrl"
  15. radius="0"
  16. @click="previewBanner"
  17. :indicator="false"
  18. circular
  19. ></u-swiper>
  20. <!-- <view class="content">
  21. <view class="share" @click="openShare()">
  22. <image class="icon" :src="staticUrl+'/img/share-ico.png'" ></image>
  23. </view>
  24. </view> -->
  25. </view>
  26. <view class="base-info">
  27. <view class="inner">
  28. <view class="name">{{performInfo.name}}</view>
  29. <view class="addr u-flex u-row-between">
  30. <view class="text">演出地址:{{theatre.address||''}}</view>
  31. <view class="menu u-flex">
  32. <view class="item" @click="goMap">
  33. <image class="icon" :src="staticUrl+'/img/map-ico.png'" ></image>
  34. <text>导航</text>
  35. </view>
  36. <view class="item" @click="phoneCall">
  37. <image class="icon" :src="staticUrl+'/img/phone-call-ico.png'" ></image>
  38. <text>电话</text>
  39. </view>
  40. <view class="item" @click="openShare()">
  41. <image class="icon" :src="staticUrl+'/img/share-ico-v2.png'" ></image>
  42. <text>分享</text>
  43. </view>
  44. <!-- <u-icon name="arrow-right" color="#ffffff" size="36rpx" @click="goMap"></u-icon>
  45. <u-icon name="arrow-right" color="#ffffff" size="36rpx" @click="goMap"></u-icon> -->
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="tabs-wrap">
  51. <view class="inner">
  52. <u-tabs
  53. :list="tabsArr"
  54. @click="tabsClick"
  55. lineColor="#ED0000"
  56. lineWidth="82rpx"
  57. :activeStyle="{color: '#2D2D2D',fontWeight: 'bold'}"
  58. itemStyle="width:33%; height: 46px;box-sizing:border-box"
  59. >
  60. </u-tabs>
  61. </view>
  62. </view>
  63. <view class="page-wrap">
  64. <view class="ticket" v-if="tabsIndex==0">
  65. <view class="date-block">
  66. <view class="title">演出日期</view>
  67. <view class="date-list u-flex">
  68. <view class="date-item"
  69. :class="{active:dateIndex==index,dot:performDateList.find(item => item.performDate === `${date.year}-${date.month}-${date.day}`) !== undefined}"
  70. @click="dateClick(index)"
  71. v-for="(date,index) in dateList" :key="index">
  72. <!-- <view class="name">{{ date.name || ' ' }}</view> -->
  73. <!-- <view class="name">
  74. {{ performDateList.find(item => item.performDate === date.fullDay ) !== undefined?'有演出':'无演出' }}
  75. </view> -->
  76. <view class="name">
  77. {{date.fullDay|checkWeekDate}}
  78. </view>
  79. <view class="date">{{ date.month }} - {{ date.day }}</view>
  80. <image class="selected-img" :src="staticUrl+'/img/selected.png'"></image>
  81. </view>
  82. <view class="date-item more-date u-flex u-row-center" @click="calendarShow = true">
  83. <view class="text">
  84. <view class="">更多</view>
  85. <view class="">日期</view>
  86. </view>
  87. <u-icon name="arrow-right" color="#7F7F7F" size="24rpx"></u-icon>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="date-block auditorium generic-block" v-show="false">
  92. <view class="title">演出厅</view>
  93. <view class="date-list u-flex u-flex-wrap">
  94. <view class="date-item" :class="{active:auditoriumIndex==index}" @click="auditoriumClick(index)" v-for="(date,index) in auditoriumList" :key="index">
  95. <view class="name">{{ date.name }}</view>
  96. </view>
  97. </view>
  98. </view>
  99. <view class="date-block session-wrap generic-block">
  100. <view class="title">演出场次</view>
  101. <view class="empty" v-if="auditoriumList.length>=1&&sessionList.length<1">
  102. 当前日期暂无演出场次,请重新选择
  103. </view>
  104. <view class="date-list u-flex u-flex-wrap" v-else>
  105. <view class="date-item" :class="{active:sessionIndex==index,disabled:!date.ifVaild}" @click="sessionClick(index,date)" v-for="(date,index) in sessionList" :key="index">
  106. <view class="name">{{ date.performTimeStart}} - {{date.performTimeEnd}}</view>
  107. </view>
  108. </view>
  109. </view>
  110. <!-- <view class="date-block generic-block session-wrap">
  111. <view class="title">演出场次</view>
  112. <view class="session">
  113. <view class="session-item" :class="{active:sessionIndex==index}" @click="sessionClick(index)" v-for="(date,index) in sessionList" :key="index">
  114. {{ date.performTimeStart}} - {{date.performTimeEnd}}
  115. </view>
  116. </view>
  117. <view class="empty" v-if="auditoriumList.length>=1&&sessionList.length<1">
  118. 当前日期暂无演出场次,请重新选择
  119. </view>
  120. </view> -->
  121. <view class="date-block ticket-type generic-block" v-if="sessionList.length>=1">
  122. <view class="title">票档</view>
  123. <view class="empty" v-if="ticketTypeList.length<1">
  124. 暂无门票
  125. </view>
  126. <view class="date-list u-flex u-flex-wrap">
  127. <view class="date-item" :class="{active:ticketTypeIndex==index,'disabled':date.stockNum<1&&date.stockNum!==-1}" @click="ticketTypeClick(index,date)" v-for="(date,index) in ticketTypeList" :key="index">
  128. <view class="name">{{ date.name }}</view>
  129. <view class="sold-out" v-if="date.stockNum<1&&date.stockNum!==-1">售罄</view>
  130. </view>
  131. </view>
  132. <view class="goodsSnapshot" v-if="ticketTypeList.length>0&&goodsSnapshot">
  133. 票务说明:{{goodsSnapshot}}
  134. </view>
  135. <!-- <view class="type-item" :class="{active:sessionIndex==index}" v-for="(item,index) in ticketTypeList" :key="index">
  136. <view class="name-price u-flex u-row-between">
  137. <view class="name">{{item.goodsName}}</view>
  138. <view class="prices">¥ {{item.salePrice}} 起</view>
  139. </view>
  140. <view class="bottom u-flex u-row-between">
  141. <view class="left u-flex" v-html="item.goodsSnapshot||''">
  142. </view>
  143. <view class="btn" @click="book(item)" v-if="item.quantity!==0&&sessionList.length>=1">预定</view>
  144. <view class="btn disabled" v-else>无票</view>
  145. </view>
  146. </view> -->
  147. </view>
  148. <view class="date-block position-select generic-block" v-if="sessionList.length>=1">
  149. <view class="title u-flex u-row-between">
  150. <view class="">票种</view>
  151. <view v-if="positionData.seatImg" class="" style="font-size: 24rpx;color: #aaa" @click="showSeatImg">票区图</view>
  152. </view>
  153. <view class="empty" v-if="positionArr.length<1">
  154. 没有座位信息
  155. </view>
  156. <!-- <view class="date-list u-flex u-flex-wrap">
  157. <view class="date-item" :class="{active:positionIndex==index,'stock-over':date.stockNum<1&&date.stockNum!==-1}" @click="positionClick(index,date)" v-for="(date,index) in positionArr" :key="index">
  158. <view class="name">{{ date.seatTypeName }} <br />¥ {{date.salePrice}}</view>
  159. <view class="sold-out" v-if="date.stockNum<1&&date.stockNum!==-1">售罄</view>
  160. </view>
  161. </view> -->
  162. <view class="ticket-type-list">
  163. <view class="ticket-type-item" v-for="(item, index) in positionArr" :key="index">
  164. <view class="type-info u-flex u-row-between">
  165. <view class="type-name">{{item.goodsName}}</view>
  166. <view class="type-price">
  167. <text class="salePrice-price">¥{{item.salePrice}}</text>
  168. <text class="original-price" v-if="item.originalPrice">¥{{item.originalPrice}}</text>
  169. </view>
  170. </view>
  171. <view class="type-desc" v-if="item.goodsSnapshot">{{item.goodsSnapshot}}</view>
  172. <view class="ticket-control u-flex u-row-right">
  173. <view class="minus" :class="{disabled: !item.saleNum}"
  174. @click.stop="changeTicketNum(item, 'minus')">-</view>
  175. <!-- <view class="num">{{item.saleNum || 0}}</view> -->
  176. <input
  177. border="none"
  178. type="number"
  179. style="width: 40px;text-align: center;"
  180. v-model="item.saleNum"
  181. ></input>
  182. <view class="plus" :class="{disabled: item.stockNum === item.saleNum}"
  183. @click.stop="changeTicketNum(item, 'plus')">+</view>
  184. </view>
  185. </view>
  186. </view>
  187. </view>
  188. <!-- <view class="book-btn full-btn" v-if="positionArr.length>=1&&sessionList.length>=1&&(positionIndex||positionIndex===0)" @click="book()">确定</view>
  189. <view class="full-btn gray" v-else>确定</view> -->
  190. <!-- 底部浮动条 -->
  191. <view class="bottom-bar">
  192. <view class="inner">
  193. <view class="price-info">
  194. <view class="total-price">
  195. <text>¥{{totalPrice}}</text>
  196. <text class="original">¥{{originalPrice}}</text>
  197. </view>
  198. </view>
  199. <view class="submit-btn" :class="{active: hasSelectedTicket}" @click="book">
  200. {{hasSelectedTicket ? '去支付' : '请选择票'}}
  201. </view>
  202. </view>
  203. </view>
  204. </view>
  205. <!-- ticket end -->
  206. <view class="details" v-if="tabsIndex==1">
  207. <view class="details-block">
  208. <view class="title">剧情简介</view>
  209. <view class="intro parse-content">
  210. <u-parse :content="performInfo.performSnapshot"></u-parse>
  211. </view>
  212. </view>
  213. <view class="details-block actors">
  214. <view class="title u-flex u-row-between">
  215. 演职人员
  216. <view class="right u-flex" @click="$u.route('pages/actors',{performId:performId})">
  217. <text>更多</text>
  218. <u-icon name="arrow-right" color="#7F7F7F" size="24rpx"></u-icon>
  219. </view>
  220. </view>
  221. <view class="actor-list">
  222. <u-scroll-list :indicator="false">
  223. <view class="item" v-for="(item, index) in actorsArr" :key="index" @click="$u.route('/pages/actorsinfo',{id:item.id})">
  224. <image class="img" :src="item.performerHead||staticUrl+'/img/actors.png'"></image>
  225. <view class="text">
  226. <view class="name">{{item.performerName}}</view>
  227. <view class="role u-line-1">{{item.performerRole}}</view>
  228. </view>
  229. </view>
  230. </u-scroll-list>
  231. <u-empty text="暂无" v-if="actorsArr.length<1"></u-empty>
  232. </view>
  233. </view>
  234. </view>
  235. <view class="viewingTips parse-content" v-if="tabsIndex==2">
  236. <u-parse :content="formerNotice"></u-parse>
  237. </view>
  238. </view>
  239. <!-- :maxDate="maxDate" -->
  240. <u-calendar
  241. ref="calendar"
  242. :formatter="formatter"
  243. :maxDate="maxDate"
  244. monthNum="12"
  245. :show="calendarShow"
  246. color="#EF1010"
  247. :closeOnClickOverlay="true"
  248. @close="closeCalendar"
  249. @confirm="confirmCalendar">
  250. </u-calendar>
  251. <!-- 分享选择弹出内容 -->
  252. <view class="share-option" :class="{shareShow:shareShow}">
  253. <view class="overlay" v-if="shareShow" @click="shareShow=false"></view>
  254. <!-- #ifdef MP-WEIXIN -->
  255. <button class="share-option-item wx-share" data-name="shareBtn" open-type="share">
  256. 发送给朋友
  257. </button>
  258. <!-- #endif -->
  259. <view class="share-option-item" @click="getPoster">生成海报</view>
  260. <view class="share-option-item" @click="shareShow=false">取消</view>
  261. </view>
  262. <u-popup :show="posterShow" @close="posterShow=false" ref="uni-popup">
  263. <view class="poster-wrap u-flex u-col-center">
  264. <view class="poster-inner">
  265. <view class="close-wrap" @click="posterShow=false">
  266. <u-icon name="close-circle" color="#fff" size="56rpx"></u-icon>
  267. </view>
  268. <view class="poster" id="poster" ref="poster" >
  269. <u--image :showLoading="false" :src="posterSrc" width="100%" height="65vh" mode="aspectFit"></u--image>
  270. </view>
  271. <!-- savePoster -->
  272. <view class="poster-btn" @click="saveImage">保存图片</view>
  273. </view>
  274. </view>
  275. </u-popup>
  276. <canvas canvas-id="canvas" class="canvas" style="width: 574px; height: 1042px;"></canvas>
  277. </view>
  278. </template>
  279. <script>
  280. import moment from 'moment';
  281. import { systemInfo } from "@/mixin.js";
  282. // 日历
  283. const d = new Date()
  284. const year = d.getFullYear()
  285. let month = d.getMonth() + 1
  286. month = month < 10 ? `0${month}` : month
  287. const date = d.getDate()
  288. // 日历
  289. // 算最大日期
  290. const maxd = new Date()
  291. maxd.setMonth(maxd.getMonth() + 12) // 将月份加3
  292. const maxdyear = maxd.getFullYear()
  293. let maxdmonth = maxd.getMonth() + 1
  294. maxdmonth = maxdmonth < 10 ? `0${maxdmonth}` : maxdmonth
  295. const maxddate = maxd.getDate()
  296. const theMaxDate = `${maxdyear}-${maxdmonth}-${maxddate}`
  297. // console.log('theMaxDate=============================',theMaxDate) //输出:
  298. //算最大日期
  299. let parentThis= null;
  300. let sharePath = '/pages/index/index';
  301. export default {
  302. onShareAppMessage(res) {
  303. if (res.from === 'button') {// 来自页面内分享按钮
  304. console.log(res.target)
  305. }
  306. return {
  307. title: this.$isDevelop?'剧场票务':'伟大转折演艺',
  308. path: sharePath
  309. }
  310. },
  311. onShareTimeline(res) {
  312. if (res.from === 'button') {// 来自页面内分享按钮
  313. console.log(res.target)
  314. }
  315. return {
  316. title: this.$isDevelop?'剧场票务':'伟大转折演艺',
  317. path: '/pages/ticketlist'
  318. }
  319. },
  320. mixins:[systemInfo],
  321. data() {
  322. return {
  323. performId:'',
  324. staticUrl:this.$commonConfig.staticUrl,
  325. tabsArr:[
  326. {name:'票务购买'},
  327. {name:'演出详情'},
  328. {name:'观影须知'}
  329. ],
  330. theatre:{},
  331. tabsIndex:0,
  332. dateList:[],
  333. dateIndex:0,
  334. calendarShow:false,//日历
  335. // maxDate:`${year}-${month}-${date + 30}`,
  336. maxDate:theMaxDate,
  337. auditoriumList:[],//演艺厅
  338. auditoriumIndex:0,
  339. sessionList:[],//演出场次
  340. sessionIndex:0,
  341. ticketTypeList:[],//门票
  342. actorsArr:[],
  343. shareShow:false,
  344. posterShow:false,
  345. posterSrc:'',
  346. posterSrcType:null,
  347. performInfo:{},//节目详情
  348. formerNotice:{},//节目观影须知
  349. performDateList:[],//有票的日期
  350. // firstGet:0,
  351. ticketTypeIndex:0,
  352. positionData:{},//座位信息接口
  353. positionArr:[],
  354. positionIndex:null,
  355. scene:null,
  356. retailId:null,//分销码
  357. label:null,//scene解析出来的
  358. goodsSnapshot:null,//票务说明
  359. retailId:null,
  360. }
  361. },
  362. onShow() {
  363. if(this.auditoriumList.length>=1){
  364. this.getPositionData();
  365. }
  366. },
  367. onLoad(page) {
  368. // console.log('ticketlist page',page);
  369. parentThis = this;
  370. const scene = decodeURIComponent(page.scene);
  371. if(scene&&scene!='undefined'){
  372. uni.setStorage({
  373. key:'scene',
  374. data:scene
  375. });
  376. }
  377. // console.log('scene=========',scene);
  378. if(scene&&scene!='undefined'){
  379. this.$u.api.uncompress({scene:scene}).then(res=>{
  380. this.performId = res.data.performId;
  381. sharePath=`/pages/ticketlist?id=${res.data.performId}`;
  382. this.getPerformData();
  383. // this.getSystemInfo();
  384. let today = new Date();
  385. this.setDate(today);
  386. this.getPerformInfo();
  387. this.getPerformerNotice();
  388. // this.label = res.data.label;
  389. // console.log('uncompress',res.data);
  390. }).catch(err=>{
  391. console.log('uncompress',err);
  392. })
  393. }else{
  394. this.performId = page.id;
  395. sharePath=`/pages/ticketlist?id=${page.id}`;
  396. this.getPerformData();
  397. // this.getSystemInfo();
  398. let today = new Date();
  399. this.setDate(today);
  400. this.getPerformInfo();
  401. this.getPerformerNotice();
  402. }
  403. },
  404. onReady() {
  405. // 如果需要兼容微信小程序的话,需要用此写法
  406. this.$refs.calendar.setFormatter(this.formatter);
  407. },
  408. methods: {
  409. leftClick(e){
  410. let pages = getCurrentPages();
  411. if(pages.length==1){
  412. uni.$u.route('/pages/index/index')
  413. }else{
  414. uni.navigateBack()
  415. };
  416. },
  417. uncompress(scene){
  418. this.$u.api.uncompress({scene:scene}).then(res=>{
  419. this.performId = res.data.performId;
  420. // this.label = res.data.label;
  421. // console.log('uncompress',res.data);
  422. }).catch(err=>{
  423. console.log('uncompress',err);
  424. })
  425. },
  426. getPerformData(){
  427. this.$u.api.performSell({performId:this.performId}).then(res=>{
  428. // console.log('getPerformData',res.data);
  429. this.theatre = res.data.theatreList[0];
  430. this.auditoriumList = res.data.theatreList[0].auditoriumList;
  431. // this.ticketTypeList = res.data.goodsList;
  432. // this.goodsSnapshot = this.ticketTypeList[this.ticketTypeIndex]?.goodsSnapshot;
  433. this.performDateList = this.auditoriumList[this.auditoriumIndex].performDateList;
  434. this.getDate()
  435. // console.log('auditoriumList',this.auditoriumList);
  436. }).catch(err=>{
  437. console.log('getPoster',err);
  438. })
  439. },
  440. getPerformInfo(){
  441. this.$u.api.performInfo({id:this.performId}).then(res=>{
  442. // console.log('getPerformInfo',res.data);
  443. this.performInfo = res.data;
  444. this.actorsArr = res.data.performerList;
  445. }).catch(err=>{
  446. console.log('getPerformInfo',err);
  447. })
  448. },
  449. getPerformerNotice(){
  450. this.$u.api.performerNotice({performId:this.performId}).then(res=>{
  451. // console.log('getPerformerNotice',res.data);
  452. this.formerNotice = res.data.performNotice;
  453. }).catch(err=>{
  454. console.log('getPerformerNotice',err);
  455. })
  456. },
  457. getDate(){
  458. let param = {
  459. auditoriumId:this.auditoriumList[this.auditoriumIndex]?.id,//演艺厅ID(演艺厅列表)
  460. performId:this.performId,
  461. };
  462. this.$u.api.getAuditoriumDate(param).then(res=>{
  463. // console.log('getDate',res.data);
  464. this.performDateList = res.data.list||[];
  465. this.setDate();
  466. // this.getTimes();
  467. }).catch(err=>{
  468. console.log('getDate',err);
  469. })
  470. },
  471. getTimes(){
  472. // this.firstGet++;
  473. uni.showLoading();
  474. let auditoriumId= this.auditoriumList[this.auditoriumIndex]?.id;
  475. if(!auditoriumId){return}
  476. // console.log('this.dateList',this.dateList);
  477. // console.log('this.dateIndex',this.dateIndex);
  478. let dateOBJ = this.dateList[this.dateIndex];
  479. let param = {
  480. auditoriumId:auditoriumId,//演艺厅ID(演艺厅列表)
  481. performId:this.performId,
  482. date:`${dateOBJ.year}-${dateOBJ.month}-${dateOBJ.day}`
  483. };
  484. // console.log('param',param);
  485. this.$u.api.getAuditoriumTimes(param).then(res=>{
  486. // console.log('getTimes',res.data);
  487. this.sessionList = res.data.list.map(item=>{
  488. item.performTimeStart = item.performTimeStart;
  489. item.performTimeEnd = item.performTimeEnd;
  490. return item
  491. });
  492. console.log('this.sessionList',this.sessionList);
  493. // this.sessionIndex = 0;
  494. this.sessionIndex = this.sessionList.findIndex(item => item.ifVaild === 1);
  495. if (this.sessionIndex !== -1) {
  496. this.getPositionData();
  497. }
  498. // let session = this.sessionList[this.sessionIndex];
  499. }).catch(err=>{
  500. console.log('getPoster',err);
  501. })
  502. },
  503. formatter: (day) => {
  504. if(!parentThis){
  505. return
  506. }
  507. day.date = moment(day.date).format("YYYY-MM-DD HH:mm:ss")
  508. // console.log('day',day);
  509. // console.log('thisthisthisthisthisthisthisthisthis',parentThis);
  510. // console.log('==================================',day.date.toISOString().split('T')[0]);
  511. let ticket = parentThis.performDateList.find(item => item.performDate === day.date.split(' ')[0]);
  512. if(ticket){
  513. day.dot = true
  514. }
  515. // if(ticket&&ticket.ishave){
  516. // day.bottomInfo = '有票'
  517. // day.dot = true
  518. // }else if(ticket){
  519. // day.dot = true
  520. // }
  521. return day
  522. },
  523. setDate(firstDay,isSelect){
  524. // console.log('this.performDateList',this.performDateList);
  525. if(this.performDateList[0]?.performDate&&!isSelect){
  526. // firstDay = new Date(this.performDateList[0].performDate);
  527. const uniquePerformDateList = Array.from(new Set(this.performDateList.map(JSON.stringify))).map(JSON.parse);//去重
  528. // console.log('uniquePerformDateList',uniquePerformDateList);
  529. let arr = uniquePerformDateList.slice(0, 3);//只要前三项
  530. this.dateList = arr.map(item=>{
  531. // console.log('uniquePerformDateList item',item);
  532. let day = item.performDate.split('-');
  533. // console.log('setDate day',day);
  534. return { year:day[0],month:String(day[1]),day:String(day[2]), fullDay:`${day[0]}-${String(day[1])}-${String(day[2])}`}
  535. });
  536. // console.log('this.dateList',this.dateList);
  537. this.dateIndex = 0;
  538. this.getTimes();
  539. //
  540. return
  541. }
  542. // console.log('this.dateListthis.dateListthis.dateListthis.dateList',this.dateList);
  543. // 前端写演出日期(今天,明天,后天)
  544. let today = firstDay||new Date();
  545. // console.log('today=========',today);
  546. let tomorrow = new Date(today.getTime());
  547. tomorrow.setDate(today.getDate() + 1);
  548. let afterTomorrow = new Date(today.getTime());
  549. afterTomorrow.setDate(today.getDate() + 2);
  550. this.dateList = [
  551. {
  552. year: today.getFullYear(),
  553. month: String(today.getMonth() + 1).padStart(2, '0'),
  554. day: String(today.getDate()).padStart(2, '0'),
  555. name: '日期',
  556. fullDay:`${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, '0')}-${ String(today.getDate()).padStart(2, '0')}`
  557. },
  558. {
  559. year: tomorrow.getFullYear(),
  560. month: String(tomorrow.getMonth() + 1).padStart(2, '0'),
  561. day: String(tomorrow.getDate()).padStart(2, '0'),
  562. name: '日期',
  563. fullDay:`${tomorrow.getFullYear()}-${String(tomorrow.getMonth() + 1).padStart(2, '0')}-${ String(tomorrow.getDate()).padStart(2, '0')}`
  564. },
  565. {
  566. year: afterTomorrow.getFullYear(),
  567. month: String(afterTomorrow.getMonth() + 1).padStart(2, '0'),
  568. day: String(afterTomorrow.getDate()).padStart(2, '0'),
  569. name: '日期',
  570. fullDay:`${afterTomorrow.getFullYear()}-${String(afterTomorrow.getMonth() + 1).padStart(2, '0')}-${ String(afterTomorrow.getDate()).padStart(2, '0')}`
  571. }
  572. ];
  573. this.getTimes()
  574. // console.log('this.dateList ',this.dateList);
  575. },
  576. dateClick(index){
  577. this.dateIndex = index;
  578. this.ticketTypeIndex = 0;
  579. this.positionIndex = 0;
  580. this.getTimes()
  581. },
  582. auditoriumClick(index){
  583. this.auditoriumIndex = index;
  584. this.getDate();
  585. },
  586. confirmCalendar(e){
  587. // console.log('confirmCalendar',e);
  588. // this.getDate(e)
  589. this.dateIndex = 0;
  590. this.setDate( new Date(e),true );
  591. // console.log('maxDate',this.maxDate);
  592. // console.log('dateList',this.dateList);
  593. this.calendarShow = false;
  594. },
  595. closeCalendar(){
  596. this.calendarShow = false;
  597. },
  598. tabsClick(e){
  599. // console.log('tabsClick',e);
  600. this.tabsIndex = e.index;
  601. },
  602. sessionClick(index,data){
  603. // console.log('sessionClick index',index);
  604. console.log('sessionClick data',data);
  605. if(!data.ifVaild){
  606. uni.showToast({
  607. title:'该场次不可用',
  608. icon:'none'
  609. })
  610. return
  611. }
  612. if(this.sessionIndex==index){
  613. // console.log('不变');
  614. return
  615. }
  616. this.sessionIndex = index;
  617. let session = this.sessionList[this.sessionIndex];
  618. this.getPositionData();
  619. this.ticketTypeIndex = 0;
  620. this.positionIndex = 0;
  621. let sellableTicketTypeIndex = this.findFirstSellableTicketTypeIndex();
  622. this.ticketTypeIndex = sellableTicketTypeIndex;
  623. // console.log('sessionClick',this.sessionList[this.sessionIndex]);
  624. },
  625. async getPositionData(){
  626. let _this = this;
  627. let retailId = null;
  628. try {
  629. retailId = await new Promise((resolve, reject) => {
  630. uni.getStorage({
  631. key: 'retailId',
  632. success: function (res) {
  633. // console.log('getPositionData retailId====', res.data);
  634. resolve(res.data);
  635. },
  636. fail: function (error) {
  637. reject(error);
  638. }
  639. });
  640. });
  641. console.log('getPositionData retailId', retailId);
  642. } catch (error) {
  643. console.error('获取retailId失败', error);
  644. // 在这里可以添加处理失败的逻辑
  645. }
  646. this.retailId = retailId;
  647. // console.log('getPositionData this.retailId',this.retailId);
  648. // if(this.scene&&this.scene!='undefined'){
  649. // await this.$u.api.uncompress({scene:this.scene}).then(res=>{
  650. // // data.performId = res.data.performId;
  651. // this.label = res.data.label;
  652. // this.retailId = res.data.retailId;
  653. // console.log('uncompress',res.data);
  654. // }).catch(err=>{
  655. // console.log('uncompress',err);
  656. // })
  657. // }
  658. let session = this.sessionList[this.sessionIndex]||{};
  659. let ticketType = this.ticketTypeList[this.ticketTypeIndex];
  660. let params ={
  661. performId:this.performId,
  662. // goodsId:ticketType.id,
  663. auditoriumId:this.auditoriumList[this.auditoriumIndex].id,
  664. performTimeId:session.id,
  665. label:this.label,
  666. retailId:this.retailId
  667. }
  668. // console.log('getPositionData params',params);
  669. this.$u.api.selectRegionV2(params).then(res=>{
  670. // console.log('getPositionData',res.data);
  671. this.positionData = res.data;
  672. // this.positionArr = res.data.regionPriceList||[];
  673. this.ticketTypeList = res.data.seatList||[];
  674. let sellableTicketTypeIndex = this.findFirstSellableTicketTypeIndex();
  675. this.ticketTypeIndex = sellableTicketTypeIndex;
  676. this.goodsSnapshot = this.ticketTypeList[this.ticketTypeIndex]?.goodsSnapshot;
  677. this.positionArr = this.ticketTypeList[this.ticketTypeIndex]?.goodsList||[];
  678. this.positionArr = this.positionArr.map(obj => {
  679. return {
  680. ...obj, // 保留原有的字段
  681. saleNum: 0 // 新增的字段
  682. };
  683. });
  684. // let sellableProductIndex = this.findFirstSellableProductIndex();
  685. // this.positionIndex = sellableProductIndex;
  686. // console.log('this.positionIndex',this.positionIndex);
  687. uni.hideLoading();
  688. }).catch(err=>{
  689. uni.hideLoading();
  690. console.log('getPositionData',err);
  691. })
  692. },
  693. // 改变票数
  694. changeTicketNum(item, type) {
  695. // console.log('changeTicketNum===',item, type);
  696. const currentNum = item.saleNum;
  697. if(type === 'minus' && currentNum > 0) {
  698. item.saleNum=item.saleNum-1
  699. // 直接修改数值
  700. // console.log('item.saleNum',item.saleNum)
  701. }
  702. if(type === 'plus') {
  703. // && currentNum < item.stockNum
  704. // console.log('item.saleNum',item.saleNum)
  705. item.saleNum=item.saleNum+1
  706. // console.log('item.saleNum',item.saleNum)
  707. }
  708. console.log('this.positionArr',this.positionArr)
  709. },
  710. ticketTypeClick(index,date){
  711. if(this.ticketTypeIndex==index){
  712. // console.log('不变');
  713. return
  714. }else if(date.stockNum<1&&date.stockNum!==-1){
  715. uni.showToast({
  716. title:'已售罄',
  717. icon:'none'
  718. })
  719. return
  720. }
  721. this.ticketTypeIndex = index;
  722. this.goodsSnapshot = this.ticketTypeList[this.ticketTypeIndex]?.goodsSnapshot;
  723. this.positionArr = this.ticketTypeList[this.ticketTypeIndex]?.goodsList||[];
  724. this.positionArr = this.positionArr.map(obj => {
  725. return {
  726. ...obj, // 保留原有的字段
  727. saleNum: 0 // 新增的字段
  728. };
  729. });
  730. // let sellableProductIndex = this.findFirstSellableProductIndex();
  731. // this.positionIndex = sellableProductIndex;
  732. // this.getPositionData()
  733. },
  734. positionClick(index,date){
  735. if(this.positionIndex==index){
  736. // console.log('不变');
  737. return
  738. }else if(date.stockNum<1&&date.stockNum!==-1){
  739. uni.showToast({
  740. title:'已售罄',
  741. icon:'none'
  742. })
  743. return
  744. }
  745. this.positionIndex = index;
  746. },
  747. findFirstSellableProductIndex(){
  748. console.log('this.positionArr',this.positionArr);
  749. // 检查数组是否为空
  750. if (!Array.isArray(this.positionArr) || this.positionArr.length === 0) {
  751. return null;
  752. }
  753. // 遍历数组,找到第一个可售的产品
  754. for (let i = 0; i < this.positionArr.length; i++) {
  755. if (this.positionArr[i].stockNum > 0 || this.positionArr[i].stockNum === -1) {
  756. return i; // 返回第一个可售产品的索引
  757. }
  758. }
  759. return null;
  760. },
  761. findFirstSellableTicketTypeIndex(){
  762. console.log('this.ticketTypeList',this.ticketTypeList);
  763. // 检查数组是否为空
  764. if (!Array.isArray(this.ticketTypeList) || this.ticketTypeList.length === 0) {
  765. return null;
  766. }
  767. // 遍历数组,找到第一个可售的产品
  768. for (let i = 0; i < this.ticketTypeList.length; i++) {
  769. if (this.ticketTypeList[i].stockNum > 0 || this.ticketTypeList[i].stockNum === -1) {
  770. return i; // 返回第一个可售产品的索引
  771. }
  772. }
  773. return null;
  774. },
  775. book(item){
  776. if(!this.hasSelectedTicket){
  777. return
  778. }
  779. // console.log('book',item);
  780. // console.log('performInfo',this.performInfo);
  781. let session = this.sessionList[this.sessionIndex];
  782. // console.log('session',session);
  783. let performTimeStart = session.performTimeStart;
  784. let performTimeEnd = session.performTimeEnd;
  785. let dateOBJ = this.dateList[this.dateIndex];
  786. let ticketType = this.ticketTypeList[this.ticketTypeIndex];
  787. console.log('this.positionArr',this.positionArr);
  788. console.log('this.positionIndex',this.positionIndex);
  789. let seatType = this.ticketTypeList[this.ticketTypeIndex];
  790. // console.log('ticketType',ticketType);
  791. let params ={
  792. performId:this.performId,
  793. goodsId:ticketType.id,
  794. auditoriumId:this.auditoriumList[this.auditoriumIndex].id,
  795. performTimeId:session.id,
  796. seatTypeId:seatType.seatTypeId,
  797. salePrice:seatType.salePrice
  798. }
  799. let selectGoodsList = this.positionArr.reduce((acc, item) => {
  800. if (item.saleNum > 0) {
  801. acc.push({
  802. goodsId: item.goodsId,
  803. saleNum: item.saleNum
  804. });
  805. }
  806. return acc;
  807. }, []);
  808. // console.log('selectGoodsList',selectGoodsList)
  809. uni.setStorage({
  810. key:'selectGoodsList',
  811. data:JSON.stringify(selectGoodsList)
  812. });
  813. // console.log('book params',params);
  814. uni.$u.route('pages/bookticket',params)
  815. // 调整选择位置类型页面
  816. // uni.$u.route('pages/chosenposition',{
  817. // goodsId:item.id,
  818. // performId:this.performId,
  819. // performName:this.performInfo.name,
  820. // day:`${dateOBJ.year}-${dateOBJ.month}-${dateOBJ.day}`,
  821. // performTimeStart:session.performTimeStart,
  822. // performTimeEnd:session.performTimeEnd,
  823. // performTimeId:session.id,
  824. // auditoriumId:this.auditoriumList[this.auditoriumIndex].id
  825. // })
  826. },
  827. openShare(){
  828. if(!this.performInfo.posterImg){
  829. uni.$u.toast('没有节目信息');
  830. return false
  831. }
  832. this.shareShow = true;
  833. },
  834. // 海报相关开始
  835. getPoster(item){
  836. this.posterShow = true;
  837. this.shareShow = false;
  838. // 后端生成海报
  839. // this.$u.api.performQrcode({performId:this.performId}).then(res=>{
  840. // this.posterSrc = res.data.imageUrl;
  841. // // console.log('getPoster',res.data);
  842. // }).catch(err=>{
  843. // console.log('getPoster',err);
  844. // })
  845. //前端生成海报
  846. uni.showLoading({
  847. title: '生成海报中'
  848. });
  849. // 前端生成海报开始
  850. let that = this;
  851. const ctx = uni.createCanvasContext('canvas', this);
  852. // 加载海报背景图
  853. uni.getImageInfo({
  854. src: this.performInfo.posterImg,
  855. success: res1 => {
  856. const img1 = res1.path;
  857. // 加载海报二维码
  858. uni.getImageInfo({
  859. src: this.performInfo.appletQrcode,
  860. success: res2 => {
  861. const img2 = res2.path;
  862. // 绘制海报背景图
  863. ctx.drawImage(img1, 0, 0, 574, 1042);
  864. // 绘制海报二维码
  865. ctx.drawImage(img2, 428, 888, 114, 114);
  866. // 绘制完成后导出图片并显示
  867. ctx.draw(false, () => {
  868. uni.canvasToTempFilePath({
  869. canvasId: 'canvas',
  870. success: res3 => {
  871. this.posterSrc = res3.tempFilePath;
  872. this.posterSrcType = 'local';
  873. },
  874. fail: err => {
  875. console.error(err);
  876. },
  877. }, this);
  878. });
  879. },
  880. fail: err2 => {
  881. console.error(err2);
  882. },
  883. });
  884. },
  885. fail: err1 => {
  886. console.error(err1);
  887. },
  888. complete: () => {
  889. uni.hideLoading()
  890. }
  891. });
  892. // 前端生成海报结束
  893. },
  894. saveImage() {
  895. let that = this;
  896. uni.showLoading({
  897. title: '保存中'
  898. });
  899. if(this.posterSrcType == 'local'){
  900. let params = {
  901. tempFilePath:that.posterSrc
  902. }
  903. that.saveImageToPhotosAlbum(params);
  904. return
  905. }
  906. uni.downloadFile({
  907. url: this.posterSrc,
  908. success(res) {
  909. if (res.statusCode === 200) {
  910. that.saveImageToPhotosAlbum(res)
  911. } else {
  912. uni.showToast({
  913. title: '下载图片失败',
  914. icon: 'none'
  915. });
  916. }
  917. },
  918. fail(e) {
  919. console.log('下载图片失败', e);
  920. console.log('posterSrc',that.posterSrc);
  921. uni.showToast({
  922. title: '下载图片失败',
  923. icon: 'none'
  924. });
  925. }
  926. });
  927. },
  928. saveImageToPhotosAlbum(res){
  929. let that = this;
  930. uni.saveImageToPhotosAlbum({
  931. filePath: res.tempFilePath,
  932. success() {
  933. uni.showToast({
  934. title: '保存相册成功!',
  935. icon: 'success'
  936. });
  937. },
  938. fail(err) {
  939. console.log('保存图片失败',err);
  940. if (err.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
  941. uni.getSetting({
  942. success(res) {
  943. if (!res.authSetting['scope.writePhotosAlbum']) {
  944. uni.showModal({
  945. title: '提示',
  946. content: '您还没有授权访问相册,请前往设置页面打开权限。',
  947. confirmText: '去设置',
  948. success(res) {
  949. if (res.confirm) {
  950. uni.openSetting();
  951. }
  952. }
  953. });
  954. } else {
  955. uni.showToast({
  956. title: '保存图片失败',
  957. icon: 'none'
  958. });
  959. }
  960. }
  961. });
  962. } else {
  963. uni.showToast({
  964. title: '保存图片失败',
  965. icon: 'none'
  966. });
  967. }
  968. },
  969. complete() {
  970. setTimeout(()=>{
  971. uni.hideLoading();
  972. that.posterShow = false;
  973. },1500)
  974. }
  975. });
  976. },
  977. // 海报相关结束
  978. goMap(){
  979. uni.openLocation({
  980. latitude:Number(this.theatre.latitude), //维度
  981. longitude: Number(this.theatre.longitude), //经度
  982. name: this.theatre.name, //目的地定位名称
  983. scale: 15, //缩放比例
  984. address: this.theatre.address //导航详细地址
  985. })
  986. },
  987. phoneCall(){
  988. // console.log('this.theatre',this.theatre);
  989. uni.makePhoneCall({
  990. phoneNumber: this.theatre.customerServiceMobile,
  991. success() {
  992. console.log('success');
  993. },
  994. fail() {
  995. console.log('fail');
  996. }
  997. });
  998. },
  999. showSeatImg(){
  1000. if(!this.positionData.seatImg){
  1001. uni.$u.toast('没有图片')
  1002. return
  1003. }
  1004. let urls = [];
  1005. urls.push(this.positionData.seatImg)
  1006. uni.previewImage({
  1007. urls: urls,
  1008. })
  1009. },
  1010. previewBanner(index){
  1011. let urls = this.performInfo.photoList.map(item=>{
  1012. return item.imageUrl
  1013. });
  1014. // console.log('urls',urls);
  1015. uni.previewImage({
  1016. urls: urls,
  1017. current:index
  1018. })
  1019. }
  1020. },
  1021. computed: {
  1022. // 是否已选择票
  1023. hasSelectedTicket() {
  1024. return this.positionArr.some(item => item.saleNum > 0);
  1025. },
  1026. // 总价
  1027. totalPrice() {
  1028. return this.positionArr.reduce((total, item) => {
  1029. return total + (item.saleNum * item.salePrice);
  1030. }, 0).toFixed(2);
  1031. },
  1032. // 原价
  1033. originalPrice() {
  1034. return this.positionArr.reduce((total, item) => {
  1035. // 如果有原价就用原价,没有就用售价
  1036. const price = item.originalPrice || item.salePrice;
  1037. return total + (item.saleNum * price);
  1038. }, 0).toFixed(2);
  1039. }
  1040. }
  1041. }
  1042. </script>
  1043. <style lang="scss" scoped>
  1044. .banner{
  1045. position: relative;
  1046. .img{
  1047. width: 750rpx;
  1048. height: 554rpx;
  1049. display: block;
  1050. }
  1051. .content{
  1052. position: absolute;
  1053. // width: 100%;
  1054. box-sizing: border-box;
  1055. padding: 0 32rpx;
  1056. right: 0;
  1057. bottom: 200rpx;
  1058. }
  1059. .share{
  1060. overflow: hidden;
  1061. margin-bottom: 100rpx;
  1062. float: right;
  1063. .icon{
  1064. float: right;
  1065. display: block;
  1066. width: 32rpx;
  1067. height: 32rpx;
  1068. padding: 10rpx;
  1069. border-radius: 50%;
  1070. background-color: rgba(0,0,0,0.4);
  1071. }
  1072. }
  1073. }
  1074. .base-info{
  1075. position: relative;
  1076. // margin-bottom: 54rpx;
  1077. .inner{
  1078. position: relative;
  1079. padding: 50rpx 38rpx 58rpx 40rpx;
  1080. background-color: #FFFFFF;
  1081. border-radius: 32rpx 32rpx 0rpx 0rpx;
  1082. margin-top: -30px;
  1083. border-bottom: 12rpx solid #F7F8F9;
  1084. }
  1085. .name{
  1086. font-size: 40rpx;
  1087. font-weight: 800;
  1088. color: #2D2D2D;
  1089. margin-bottom: 26rpx;
  1090. }
  1091. .addr{
  1092. font-size: 26rpx;
  1093. font-weight: 400;
  1094. color: #606060;
  1095. }
  1096. .menu{
  1097. .item{
  1098. margin-left: 18rpx;
  1099. font-size: 18rpx;
  1100. font-weight: 400;
  1101. color: #999999;
  1102. text-align: center;
  1103. }
  1104. .icon{
  1105. width: 62rpx;
  1106. height: 64rpx;
  1107. display: block;
  1108. margin-bottom: 4rpx;
  1109. }
  1110. }
  1111. }
  1112. .tabs-wrap{
  1113. position: relative;
  1114. margin-bottom: 54rpx;
  1115. &::after{
  1116. content: '';
  1117. width: 100%;
  1118. height: 1px;
  1119. background-color: #eee;
  1120. position: absolute;
  1121. left: 0;
  1122. right: 0;
  1123. bottom: -46rpx;
  1124. }
  1125. .inner{
  1126. position: relative;
  1127. padding-top: 48rpx;
  1128. background-color: #FFFFFF;
  1129. // border-radius: 32rpx 32rpx 0rpx 0rpx;
  1130. height: 46rpx;
  1131. // margin-top: -30px;
  1132. }
  1133. }
  1134. .date-block{
  1135. margin-bottom: 64rpx;
  1136. }
  1137. .title{
  1138. font-size: 32rpx;
  1139. font-weight: bold;
  1140. color: #2D2D2D;
  1141. line-height: 48rpx;
  1142. margin-bottom: 38rpx;
  1143. }
  1144. .empty{
  1145. background-color: #636363;
  1146. color: #979797;
  1147. border-radius: 8rpx;
  1148. padding: 24rpx;
  1149. text-align: center;
  1150. }
  1151. .session-wrap{
  1152. }
  1153. .session{
  1154. display: grid;
  1155. grid-template-columns: repeat(3, 1fr);
  1156. gap: 20rpx;
  1157. .session-item{
  1158. height: 80rpx;
  1159. line-height: 80rpx;
  1160. border-radius: 12rpx;
  1161. border: 2rpx solid #636363;
  1162. text-align: center;
  1163. font-size: 24rpx;
  1164. font-weight: 400;
  1165. color: #636363;
  1166. &.active{
  1167. color: #ED0000;
  1168. border-color: #ED0000;
  1169. }
  1170. }
  1171. }
  1172. .ticket-type{
  1173. .type-item{
  1174. background: #FFFFFF;
  1175. box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(180,180,180,0.5);
  1176. border-radius: 20rpx;
  1177. margin-bottom: 20rpx;
  1178. padding: 38rpx 40rpx;
  1179. .name-price{
  1180. margin-bottom: 26rpx;
  1181. }
  1182. .name{
  1183. font-size: 28rpx;
  1184. font-weight: 500;
  1185. color: #363636;
  1186. }
  1187. .prices{
  1188. font-size: 36rpx;
  1189. font-weight: bold;
  1190. color: #ED0000;
  1191. }
  1192. .ishave{
  1193. margin-bottom: 26rpx;
  1194. .text{
  1195. height: 30rpx;
  1196. line-height: 30rpx;
  1197. padding: 0 22rpx;
  1198. background: #FFC8C8;
  1199. border-radius: 20rpx;
  1200. font-size: 20rpx;
  1201. font-weight: 400;
  1202. color: #ED0000;
  1203. }
  1204. }
  1205. .bottom{
  1206. font-size: 22rpx;
  1207. font-weight: 400;
  1208. color: #7F7F7F;
  1209. .btn{
  1210. height: 60rpx;
  1211. line-height: 60rpx;
  1212. background: linear-gradient(90deg, #FF7979 0%, #ED0000 100%);
  1213. border-radius: 30rpx;
  1214. padding: 0 36rpx;
  1215. font-size: 28rpx;
  1216. font-weight: 500;
  1217. color: #FFFFFF;
  1218. &.disabled{
  1219. background: #979797;
  1220. }
  1221. }
  1222. }
  1223. }
  1224. .goodsSnapshot{
  1225. font-size: 24rpx;
  1226. color: #750000;
  1227. line-height: 1.5;
  1228. margin-top: 24rpx;
  1229. padding-bottom: 24rpx;
  1230. // border-bottom: 1px solid #750000;
  1231. }
  1232. }
  1233. .details{
  1234. .title{}
  1235. .details-block{
  1236. background: #FFFFFF;
  1237. box-shadow: 0rpx 2rpx 12rpx 2rpx rgba(221,221,221,0.5);
  1238. border-radius: 20rpx;
  1239. margin-bottom: 24rpx;
  1240. padding: 36rpx;
  1241. &.actors{
  1242. .title{
  1243. .right{
  1244. font-size: 24rpx;
  1245. font-weight: 400;
  1246. color: #7F7F7F;
  1247. }
  1248. }
  1249. }
  1250. }
  1251. .intro{
  1252. font-size: 26rpx;
  1253. font-weight: 400;
  1254. color: #4E4E4E;
  1255. line-height: 40rpx;
  1256. }
  1257. .actor-list{
  1258. .item{
  1259. flex-shrink: 0;
  1260. width: 160rpx;
  1261. text-align: center;
  1262. margin-right: 24rpx;
  1263. }
  1264. .img{
  1265. display: block;
  1266. width: 100%;
  1267. height: 200rpx;
  1268. margin-bottom: 16rpx;
  1269. }
  1270. .name{
  1271. font-size: 28rpx;
  1272. font-weight: 500;
  1273. color: #2D2D2D;
  1274. line-height: 42rpx;
  1275. margin-bottom: 4rpx;
  1276. }
  1277. .role{
  1278. font-size: 24rpx;
  1279. font-weight: 400;
  1280. color: #7F7F7F;
  1281. line-height: 36rpx;
  1282. }
  1283. }
  1284. }
  1285. .canvas{
  1286. position: fixed;
  1287. left: -99999px;
  1288. }
  1289. .ticket-type-list{
  1290. .ticket-type-item{
  1291. border-radius: 10rpx;
  1292. border:1px solid #7F7F7F;
  1293. padding: 20rpx;
  1294. margin-bottom: 24rpx;
  1295. box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(211,211,211,0.5);
  1296. }
  1297. .type-info{
  1298. margin-bottom: 40rpx;
  1299. .type-name{
  1300. font-size: 28rpx;
  1301. }
  1302. .salePrice-price{
  1303. color: #ED0000;
  1304. }
  1305. .original-price{
  1306. color: #7F7F7F;
  1307. text-decoration: line-through;
  1308. margin-left: 10rpx;
  1309. }
  1310. }
  1311. .type-desc{
  1312. color: #7F7F7F;
  1313. font-size: 26rpx;
  1314. }
  1315. .ticket-control {
  1316. display: flex;
  1317. align-items: center;
  1318. .minus, .plus {
  1319. width: 50rpx;
  1320. height: 50rpx;
  1321. line-height: 46rpx;
  1322. text-align: center;
  1323. border: 1px solid #ddd;
  1324. border-radius: 50%;
  1325. &.disabled {
  1326. color: #ccc;
  1327. background: #f5f5f5;
  1328. }
  1329. }
  1330. .num {
  1331. min-width: 60rpx;
  1332. text-align: center;
  1333. margin: 0 20rpx;
  1334. }
  1335. }
  1336. }
  1337. /* 底部浮动条样式 */
  1338. .bottom-bar {
  1339. height: 100rpx;
  1340. .inner{
  1341. position: fixed;
  1342. left: 0;
  1343. right: 0;
  1344. bottom: 0;
  1345. height: 100rpx;
  1346. background: #fff;
  1347. display: flex;
  1348. align-items: center;
  1349. padding: 0 30rpx;
  1350. box-shadow: 0 -2rpx 10rpx rgba(0,0,0,0.05);
  1351. z-index: 100;
  1352. }
  1353. .price-info {
  1354. flex: 1;
  1355. .total-price {
  1356. font-size: 36rpx;
  1357. color: #f00;
  1358. font-weight: bold;
  1359. .original {
  1360. font-size: 24rpx;
  1361. color: #999;
  1362. text-decoration: line-through;
  1363. margin-left: 10rpx;
  1364. font-weight: normal;
  1365. }
  1366. }
  1367. }
  1368. .submit-btn {
  1369. width: 200rpx;
  1370. height: 80rpx;
  1371. line-height: 80rpx;
  1372. text-align: center;
  1373. background: #eee;
  1374. color: #999;
  1375. border-radius: 40rpx;
  1376. &.active {
  1377. background: #f00;
  1378. color: #fff;
  1379. }
  1380. }
  1381. }
  1382. </style>