ticketlist.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  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. :indicator="false"
  17. circular
  18. ></u-swiper>
  19. <view class="content">
  20. <view class="share" @click="openShare(item)">
  21. <image class="icon" :src="staticUrl+'/img/share-ico.png'" ></image>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="base-info">
  26. <view class="inner">
  27. <view class="name">{{performInfo.name}}</view>
  28. <view class="addr u-flex u-row-between">
  29. <view class="text">演出地址:{{theatre.address||''}}</view>
  30. <view class="menu u-flex">
  31. <view class="item" @click="goMap">
  32. <image class="icon" :src="staticUrl+'/img/map-ico.png'" ></image>
  33. <text>导航</text>
  34. </view>
  35. <view class="item" @click="phoneCall">
  36. <image class="icon" :src="staticUrl+'/img/phone-call-ico.png'" ></image>
  37. <text>电话</text>
  38. </view>
  39. <!-- <u-icon name="arrow-right" color="#ffffff" size="36rpx" @click="goMap"></u-icon>
  40. <u-icon name="arrow-right" color="#ffffff" size="36rpx" @click="goMap"></u-icon> -->
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="tabs-wrap">
  46. <view class="inner">
  47. <u-tabs
  48. :list="tabsArr"
  49. @click="tabsClick"
  50. lineColor="#ED0000"
  51. lineWidth="82rpx"
  52. :activeStyle="{color: '#2D2D2D',fontWeight: 'bold'}"
  53. itemStyle="width:33%; height: 46px;box-sizing:border-box"
  54. >
  55. </u-tabs>
  56. </view>
  57. </view>
  58. <view class="page-wrap">
  59. <view class="ticket" v-if="tabsIndex==0">
  60. <view class="date-block">
  61. <view class="title">演出日期</view>
  62. <view class="date-list u-flex">
  63. <view class="date-item"
  64. :class="{active:dateIndex==index,dot:performDateList.find(item => item.performDate === `${date.year}-${date.month}-${date.day}`) !== undefined}"
  65. @click="dateClick(index)"
  66. v-for="(date,index) in dateList" :key="index">
  67. <!-- <view class="name">{{ date.name || ' ' }}</view> -->
  68. <!-- <view class="name">
  69. {{ performDateList.find(item => item.performDate === date.fullDay ) !== undefined?'有演出':'无演出' }}
  70. </view> -->
  71. <view class="name">
  72. {{date.fullDay|checkWeekDate}}
  73. </view>
  74. <view class="date">{{ date.month }} - {{ date.day }}</view>
  75. <image class="selected-img" :src="staticUrl+'/img/selected.png'"></image>
  76. </view>
  77. <view class="date-item more-date u-flex u-row-center" @click="calendarShow = true">
  78. <view class="text">
  79. <view class="">更多</view>
  80. <view class="">日期</view>
  81. </view>
  82. <u-icon name="arrow-right" color="#7F7F7F" size="24rpx"></u-icon>
  83. </view>
  84. </view>
  85. </view>
  86. <view class="date-block auditorium">
  87. <view class="title">演出厅</view>
  88. <view class="date-list u-flex u-flex-wrap">
  89. <view class="date-item" :class="{active:auditoriumIndex==index}" @click="auditoriumClick(index)" v-for="(date,index) in auditoriumList" :key="index">
  90. <view class="name">{{ date.name }}</view>
  91. </view>
  92. </view>
  93. </view>
  94. <view class="date-block session-wrap">
  95. <view class="title">演出场次</view>
  96. <view class="session">
  97. <view class="session-item" :class="{active:sessionIndex==index}" @click="sessionClick(index)" v-for="(date,index) in sessionList" :key="index">
  98. {{ date.performTimeStart}} - {{date.performTimeEnd}}
  99. </view>
  100. </view>
  101. <view class="empty" v-if="auditoriumList.length>=1&&sessionList.length<1">
  102. 当前日期暂无演出场次,请重新选择
  103. </view>
  104. </view>
  105. <view class="date-block ticket-type">
  106. <view class="title">门票</view>
  107. <view class="empty" v-if="ticketTypeList.length<1">
  108. 暂无门票
  109. </view>
  110. <view class="type-item" :class="{active:sessionIndex==index}" v-for="(item,index) in ticketTypeList" :key="index">
  111. <view class="name-price u-flex u-row-between">
  112. <view class="name">{{item.goodsName}}</view>
  113. <view class="prices">¥ {{item.salePrice}} 起</view>
  114. </view>
  115. <!-- <view class="ishave">
  116. <text class="text">{{(item.quantity>0&&sessionList.length>=1)?'有票':'无票'}}</text>
  117. </view> -->
  118. <view class="bottom u-flex u-row-between">
  119. <view class="left u-flex" v-html="item.goodsSnapshot||''">
  120. <!-- 购票须知
  121. <u-icon name="arrow-right" color="#7F7F7F" size="24rpx"></u-icon> -->
  122. <!-- {{item.goodsSnapshot||''}} -->
  123. </view>
  124. <view class="btn" @click="book(item)" v-if="item.quantity!==0&&sessionList.length>=1">预定</view>
  125. <view class="btn disabled" v-else>无票</view>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <!-- ticket end -->
  131. <view class="details" v-if="tabsIndex==1">
  132. <view class="details-block">
  133. <view class="title">剧情简介</view>
  134. <view class="intro parse-content">
  135. <u-parse :content="performInfo.performSnapshot"></u-parse>
  136. </view>
  137. </view>
  138. <view class="details-block actors">
  139. <view class="title u-flex u-row-between">
  140. 演职人员
  141. <view class="right u-flex" @click="$u.route('pages/actors',{performId:performId})">
  142. <text>更多</text>
  143. <u-icon name="arrow-right" color="#7F7F7F" size="24rpx"></u-icon>
  144. </view>
  145. </view>
  146. <view class="actor-list">
  147. <u-scroll-list :indicator="false">
  148. <view class="item" v-for="(item, index) in actorsArr" :key="index">
  149. <image class="img" :src="item.performerHead||staticUrl+'/img/actors.png'"></image>
  150. <view class="text">
  151. <view class="name">{{item.performerName}}</view>
  152. <view class="role u-line-1">{{item.performerRole}}</view>
  153. </view>
  154. </view>
  155. </u-scroll-list>
  156. <u-empty text="暂无" v-if="actorsArr.length<1"></u-empty>
  157. </view>
  158. </view>
  159. </view>
  160. <view class="viewingTips parse-content" v-if="tabsIndex==2">
  161. <u-parse :content="formerNotice"></u-parse>
  162. </view>
  163. </view>
  164. <!-- :maxDate="maxDate" -->
  165. <u-calendar
  166. ref="calendar"
  167. :formatter="formatter"
  168. :maxDate="maxDate"
  169. monthNum="12"
  170. :show="calendarShow"
  171. color="#EF1010"
  172. :closeOnClickOverlay="true"
  173. @close="closeCalendar"
  174. @confirm="confirmCalendar">
  175. </u-calendar>
  176. <!-- 分享选择弹出内容 -->
  177. <view class="share-option" :class="{shareShow:shareShow}">
  178. <view class="overlay" v-if="shareShow" @click="shareShow=false"></view>
  179. <button class="share-option-item wx-share" data-name="shareBtn" open-type="share">
  180. 发送给朋友
  181. </button>
  182. <view class="share-option-item" @click="getPoster">生成海报</view>
  183. <view class="share-option-item" @click="shareShow=false">取消</view>
  184. </view>
  185. <u-popup :show="posterShow" @close="posterShow=false" ref="uni-popup">
  186. <view class="poster-wrap u-flex u-col-center">
  187. <view class="poster-inner">
  188. <view class="close-wrap" @click="posterShow=false">
  189. <u-icon name="close-circle" color="#fff" size="56rpx"></u-icon>
  190. </view>
  191. <view class="poster" id="poster" ref="poster" >
  192. <u--image :showLoading="true" :src="posterSrc" width="100%" height="65vh" mode="aspectFit"></u--image>
  193. </view>
  194. <!-- savePoster -->
  195. <view class="poster-btn" @click="saveImage">保存图片</view>
  196. </view>
  197. </view>
  198. </u-popup>
  199. <canvas canvas-id="canvas" class="canvas" style="width: 670px; height: 900px;"></canvas>
  200. </view>
  201. </template>
  202. <script>
  203. import moment from 'moment';
  204. import { systemInfo } from "@/mixin.js";
  205. // 日历
  206. const d = new Date()
  207. const year = d.getFullYear()
  208. let month = d.getMonth() + 1
  209. month = month < 10 ? `0${month}` : month
  210. const date = d.getDate()
  211. // 日历
  212. // 算最大日期
  213. const maxd = new Date()
  214. maxd.setMonth(maxd.getMonth() + 12) // 将月份加3
  215. const maxdyear = maxd.getFullYear()
  216. let maxdmonth = maxd.getMonth() + 1
  217. maxdmonth = maxdmonth < 10 ? `0${maxdmonth}` : maxdmonth
  218. const maxddate = maxd.getDate()
  219. const theMaxDate = `${maxdyear}-${maxdmonth}-${maxddate}`
  220. // console.log('theMaxDate=============================',theMaxDate) //输出:
  221. //算最大日期
  222. let parentThis= null;
  223. export default {
  224. mixins:[systemInfo],
  225. data() {
  226. return {
  227. performId:'',
  228. staticUrl:this.$commonConfig.staticUrl,
  229. tabsArr:[
  230. {name:'票务购买'},
  231. {name:'演出详情'},
  232. {name:'观影须知'}
  233. ],
  234. theatre:{},
  235. tabsIndex:0,
  236. dateList:[],
  237. dateIndex:0,
  238. calendarShow:false,//日历
  239. // maxDate:`${year}-${month}-${date + 30}`,
  240. maxDate:theMaxDate,
  241. auditoriumList:[],//演艺厅
  242. auditoriumIndex:0,
  243. sessionList:[],//演出场次
  244. sessionIndex:0,
  245. ticketTypeList:[],//门票
  246. actorsArr:[],
  247. shareShow:false,
  248. posterShow:false,
  249. posterSrc:'',
  250. posterSrcType:null,
  251. performInfo:{},//节目详情
  252. formerNotice:{},//节目观影须知
  253. performDateList:[],//有票的日期
  254. firstGet:0,
  255. }
  256. },
  257. onShow() {
  258. },
  259. onLoad(page) {
  260. parentThis = this;
  261. console.log('page',page);
  262. this.performId = page.id;
  263. this.getPerformData();
  264. // this.getSystemInfo();
  265. let today = new Date();
  266. this.setDate(today);
  267. this.getPerformInfo();
  268. this.getPerformerNotice();
  269. },
  270. onReady() {
  271. // 如果需要兼容微信小程序的话,需要用此写法
  272. this.$refs.calendar.setFormatter(this.formatter);
  273. },
  274. methods: {
  275. leftClick(e){
  276. let pages = getCurrentPages();
  277. if(pages.length==1){
  278. uni.$u.route('/pages/index/index')
  279. }else{
  280. uni.navigateBack()
  281. };
  282. },
  283. getPerformData(){
  284. this.$u.api.performSell({performId:this.performId}).then(res=>{
  285. // console.log('getPerformData',res.data);
  286. this.theatre = res.data.theatreList[0];
  287. this.auditoriumList = res.data.theatreList[0].auditoriumList;
  288. this.ticketTypeList = res.data.goodsList;
  289. this.performDateList = this.auditoriumList[this.auditoriumIndex].performDateList;
  290. this.getTimes()
  291. // console.log('auditoriumList',this.auditoriumList);
  292. }).catch(err=>{
  293. console.log('getPoster',err);
  294. })
  295. },
  296. getPerformInfo(){
  297. this.$u.api.performInfo({id:this.performId}).then(res=>{
  298. // console.log('getPerformInfo',res.data);
  299. this.performInfo = res.data;
  300. this.actorsArr = res.data.performerList;
  301. }).catch(err=>{
  302. console.log('getPerformInfo',err);
  303. })
  304. },
  305. getPerformerNotice(){
  306. this.$u.api.performerNotice({performId:this.performId}).then(res=>{
  307. // console.log('getPerformerNotice',res.data);
  308. this.formerNotice = res.data.performNotice;
  309. }).catch(err=>{
  310. console.log('getPerformerNotice',err);
  311. })
  312. },
  313. getTimes(){
  314. this.firstGet++;
  315. uni.showLoading();
  316. let auditoriumId= this.auditoriumList[this.auditoriumIndex]?.id;
  317. if(!auditoriumId){return}
  318. let dateOBJ = this.dateList[this.dateIndex];
  319. let param = {
  320. auditoriumId:auditoriumId,//演艺厅ID(演艺厅列表)
  321. performId:this.performId,
  322. date:`${dateOBJ.year}-${dateOBJ.month}-${dateOBJ.day}`
  323. };
  324. // console.log('param',param);
  325. this.$u.api.getAuditoriumTimes(param).then(res=>{
  326. // console.log('getTimes',res.data);
  327. this.performDateList = res.data.performDateList||[];
  328. this.sessionList = res.data.list.map(item=>{
  329. item.performTimeStart = item.performTimeStart;
  330. item.performTimeEnd = item.performTimeEnd;
  331. return item
  332. });
  333. this.setDate();
  334. uni.hideLoading();
  335. }).catch(err=>{
  336. console.log('getPoster',err);
  337. })
  338. },
  339. formatter: (day) => {
  340. day.date = moment(day.date).format("YYYY-MM-DD HH:mm:ss")
  341. // console.log('day',day);
  342. // console.log('thisthisthisthisthisthisthisthisthis',parentThis);
  343. // console.log('==================================',day.date.toISOString().split('T')[0]);
  344. let ticket = parentThis.performDateList.find(item => item.performDate === day.date.split(' ')[0]);
  345. if(ticket){
  346. day.dot = true
  347. }
  348. // if(ticket&&ticket.ishave){
  349. // day.bottomInfo = '有票'
  350. // day.dot = true
  351. // }else if(ticket){
  352. // day.dot = true
  353. // }
  354. return day
  355. },
  356. setDate(firstDay,isSelect){
  357. if(this.performDateList[0]?.performDate&&!isSelect){
  358. // firstDay = new Date(this.performDateList[0].performDate);
  359. const uniquePerformDateList = Array.from(new Set(this.performDateList.map(JSON.stringify))).map(JSON.parse);//去重
  360. // console.log('uniquePerformDateList',uniquePerformDateList);
  361. let arr = uniquePerformDateList.slice(0, 3);//只要前三项
  362. this.dateList = arr.map(item=>{
  363. // console.log('uniquePerformDateList item',item);
  364. let day = item.performDate.split('-');
  365. // console.log('setDate day',day);
  366. return { year:day[0],month:String(day[1]),day:String(day[2]), fullDay:`${day[0]}-${String(day[1])}-${String(day[2])}`}
  367. });
  368. // console.log('this.firstGet',this.firstGet);
  369. if(this.firstGet<=1){
  370. this.getTimes();
  371. }
  372. //
  373. return
  374. }
  375. // console.log('this.dateListthis.dateListthis.dateListthis.dateList',this.dateList);
  376. // 前端写演出日期(今天,明天,后天)
  377. let today = firstDay;
  378. let tomorrow = new Date();
  379. tomorrow.setDate(today.getDate() + 1);
  380. let afterTomorrow = new Date();
  381. afterTomorrow.setDate(today.getDate() + 2);
  382. this.dateList = [
  383. {
  384. year: today.getFullYear(),
  385. month: String(today.getMonth() + 1).padStart(2, '0'),
  386. day: String(today.getDate()).padStart(2, '0'),
  387. name: '日期',
  388. fullDay:`${today.getFullYear()}-${String(today.getMonth() + 1).padStart(2, '0')}-${ String(today.getDate()).padStart(2, '0')}`
  389. },
  390. {
  391. year: tomorrow.getFullYear(),
  392. month: String(tomorrow.getMonth() + 1).padStart(2, '0'),
  393. day: String(tomorrow.getDate()).padStart(2, '0'),
  394. name: '日期',
  395. fullDay:`${tomorrow.getFullYear()}-${String(tomorrow.getMonth() + 1).padStart(2, '0')}-${ String(tomorrow.getDate()).padStart(2, '0')}`
  396. },
  397. {
  398. year: afterTomorrow.getFullYear(),
  399. month: String(afterTomorrow.getMonth() + 1).padStart(2, '0'),
  400. day: String(afterTomorrow.getDate()).padStart(2, '0'),
  401. name: '日期',
  402. fullDay:`${afterTomorrow.getFullYear()}-${String(afterTomorrow.getMonth() + 1).padStart(2, '0')}-${ String(afterTomorrow.getDate()).padStart(2, '0')}`
  403. }
  404. ];
  405. // console.log('this.dateList ',this.dateList);
  406. },
  407. dateClick(index){
  408. this.dateIndex = index;
  409. this.getTimes()
  410. },
  411. auditoriumClick(index){
  412. this.auditoriumIndex = index;
  413. this.getTimes();
  414. },
  415. confirmCalendar(e){
  416. // console.log('confirmCalendar',e);
  417. this.setDate( new Date(e),true );
  418. this.dateIndex = 0;
  419. // console.log('maxDate',this.maxDate);
  420. // console.log('dateList',this.dateList);
  421. this.calendarShow = false;
  422. },
  423. closeCalendar(){
  424. this.calendarShow = false;
  425. },
  426. tabsClick(e){
  427. // console.log('tabsClick',e);
  428. this.tabsIndex = e.index;
  429. },
  430. sessionClick(index){
  431. this.sessionIndex = index;
  432. },
  433. book(item){
  434. // console.log('book',item);
  435. // console.log('performInfo',this.performInfo);
  436. let session = this.sessionList[this.sessionIndex];
  437. // console.log('session',session);
  438. let performTimeStart = session.performTimeStart;
  439. let performTimeEnd = session.performTimeEnd;
  440. let dateOBJ = this.dateList[this.dateIndex];
  441. uni.$u.route('pages/chosenposition',{
  442. goodsId:item.id,
  443. performId:this.performId,
  444. performName:this.performInfo.name,
  445. day:`${dateOBJ.year}-${dateOBJ.month}-${dateOBJ.day}`,
  446. performTimeStart:session.performTimeStart,
  447. performTimeEnd:session.performTimeEnd,
  448. performTimeId:session.id,
  449. auditoriumId:this.auditoriumList[this.auditoriumIndex].id
  450. })
  451. },
  452. openShare(){
  453. this.shareShow = true;
  454. },
  455. // 海报相关开始
  456. getPoster(item){
  457. this.posterShow = true;
  458. this.shareShow = false;
  459. // 后端生成海报
  460. // this.$u.api.performQrcode({performId:this.performId}).then(res=>{
  461. // this.posterSrc = res.data.imageUrl;
  462. // // console.log('getPoster',res.data);
  463. // }).catch(err=>{
  464. // console.log('getPoster',err);
  465. // })
  466. //前端生成海报
  467. uni.showLoading({
  468. title: '生成海报中'
  469. });
  470. // 前端生成海报开始
  471. let that = this;
  472. const ctx = uni.createCanvasContext('canvas', this);
  473. // 加载海报背景图
  474. uni.getImageInfo({
  475. src: this.performInfo.posterImg,
  476. success: res1 => {
  477. const img1 = res1.path;
  478. // 加载海报二维码
  479. uni.getImageInfo({
  480. src: this.performInfo.appletQrcode,
  481. success: res2 => {
  482. const img2 = res2.path;
  483. // 绘制海报背景图
  484. ctx.drawImage(img1, 0, 0, 670, 900);
  485. // 绘制海报二维码
  486. ctx.drawImage(img2, 468, 724, 188, 166);
  487. // 绘制完成后导出图片并显示
  488. ctx.draw(false, () => {
  489. uni.canvasToTempFilePath({
  490. canvasId: 'canvas',
  491. success: res3 => {
  492. this.posterSrc = res3.tempFilePath;
  493. this.posterSrcType = 'local';
  494. },
  495. fail: err => {
  496. console.error(err);
  497. },
  498. }, this);
  499. });
  500. },
  501. fail: err2 => {
  502. console.error(err2);
  503. },
  504. });
  505. },
  506. fail: err1 => {
  507. console.error(err1);
  508. },
  509. complete: () => {
  510. uni.hideLoading()
  511. }
  512. });
  513. // 前端生成海报结束
  514. },
  515. saveImage() {
  516. let that = this;
  517. uni.showLoading({
  518. title: '保存中'
  519. });
  520. if(this.posterSrcType == 'local'){
  521. let params = {
  522. tempFilePath:that.posterSrc
  523. }
  524. that.saveImageToPhotosAlbum(params);
  525. return
  526. }
  527. uni.downloadFile({
  528. url: this.posterSrc,
  529. success(res) {
  530. if (res.statusCode === 200) {
  531. that.saveImageToPhotosAlbum(res)
  532. } else {
  533. uni.showToast({
  534. title: '下载图片失败',
  535. icon: 'none'
  536. });
  537. }
  538. },
  539. fail(e) {
  540. console.log('下载图片失败', e);
  541. console.log('posterSrc',that.posterSrc);
  542. uni.showToast({
  543. title: '下载图片失败',
  544. icon: 'none'
  545. });
  546. }
  547. });
  548. },
  549. saveImageToPhotosAlbum(res){
  550. let that = this;
  551. uni.saveImageToPhotosAlbum({
  552. filePath: res.tempFilePath,
  553. success() {
  554. uni.showToast({
  555. title: '保存到相册成功',
  556. icon: 'success'
  557. });
  558. },
  559. fail(err) {
  560. console.log('保存图片失败',err);
  561. if (err.errMsg === 'saveImageToPhotosAlbum:fail auth deny') {
  562. uni.getSetting({
  563. success(res) {
  564. if (!res.authSetting['scope.writePhotosAlbum']) {
  565. uni.showModal({
  566. title: '提示',
  567. content: '您还没有授权访问相册,请前往设置页面打开权限。',
  568. confirmText: '去设置',
  569. success(res) {
  570. if (res.confirm) {
  571. uni.openSetting();
  572. }
  573. }
  574. });
  575. } else {
  576. uni.showToast({
  577. title: '保存图片失败',
  578. icon: 'none'
  579. });
  580. }
  581. }
  582. });
  583. } else {
  584. uni.showToast({
  585. title: '保存图片失败',
  586. icon: 'none'
  587. });
  588. }
  589. },
  590. complete() {
  591. uni.hideLoading();
  592. that.posterShow = false;
  593. }
  594. });
  595. },
  596. // 海报相关结束
  597. goMap(){
  598. uni.openLocation({
  599. latitude:Number(this.theatre.latitude), //维度
  600. longitude: Number(this.theatre.longitude), //经度
  601. name: this.theatre.name, //目的地定位名称
  602. scale: 15, //缩放比例
  603. address: this.theatre.address //导航详细地址
  604. })
  605. },
  606. phoneCall(){
  607. // console.log('this.theatre',this.theatre);
  608. uni.makePhoneCall({
  609. phoneNumber: this.theatre.customerServiceMobile,
  610. success() {
  611. console.log('success');
  612. },
  613. fail() {
  614. console.log('fail');
  615. }
  616. });
  617. }
  618. }
  619. }
  620. </script>
  621. <style lang="scss" scoped>
  622. .banner{
  623. position: relative;
  624. .img{
  625. width: 750rpx;
  626. height: 554rpx;
  627. display: block;
  628. }
  629. .content{
  630. position: absolute;
  631. width: 100%;
  632. box-sizing: border-box;
  633. padding: 0 32rpx;
  634. left: 0;
  635. bottom: 200rpx;
  636. }
  637. .share{
  638. overflow: hidden;
  639. margin-bottom: 100rpx;
  640. .icon{
  641. float: right;
  642. display: block;
  643. width: 32rpx;
  644. height: 32rpx;
  645. padding: 10rpx;
  646. border-radius: 50%;
  647. background-color: rgba(0,0,0,0.4);
  648. }
  649. }
  650. }
  651. .base-info{
  652. position: relative;
  653. // margin-bottom: 54rpx;
  654. .inner{
  655. position: relative;
  656. padding: 50rpx 38rpx 58rpx 40rpx;
  657. background-color: #FFFFFF;
  658. border-radius: 32rpx 32rpx 0rpx 0rpx;
  659. margin-top: -30px;
  660. border-bottom: 12rpx solid #F7F8F9;
  661. }
  662. .name{
  663. font-size: 40rpx;
  664. font-weight: 800;
  665. color: #2D2D2D;
  666. margin-bottom: 26rpx;
  667. }
  668. .addr{
  669. font-size: 26rpx;
  670. font-weight: 400;
  671. color: #606060;
  672. }
  673. .menu{
  674. .item{
  675. margin-left: 18rpx;
  676. font-size: 18rpx;
  677. font-weight: 400;
  678. color: #999999;
  679. text-align: center;
  680. }
  681. .icon{
  682. width: 62rpx;
  683. height: 64rpx;
  684. display: block;
  685. margin-bottom: 4rpx;
  686. }
  687. }
  688. }
  689. .tabs-wrap{
  690. position: relative;
  691. margin-bottom: 54rpx;
  692. &::after{
  693. content: '';
  694. width: 100%;
  695. height: 1px;
  696. background-color: #eee;
  697. position: absolute;
  698. left: 0;
  699. right: 0;
  700. bottom: -46rpx;
  701. }
  702. .inner{
  703. position: relative;
  704. padding-top: 48rpx;
  705. background-color: #FFFFFF;
  706. // border-radius: 32rpx 32rpx 0rpx 0rpx;
  707. height: 46rpx;
  708. // margin-top: -30px;
  709. }
  710. }
  711. .date-block{
  712. margin-bottom: 64rpx;
  713. }
  714. .title{
  715. font-size: 32rpx;
  716. font-weight: bold;
  717. color: #2D2D2D;
  718. line-height: 48rpx;
  719. margin-bottom: 38rpx;
  720. }
  721. .empty{
  722. background-color: #636363;
  723. color: #979797;
  724. border-radius: 8rpx;
  725. padding: 24rpx;
  726. text-align: center;
  727. }
  728. .session-wrap{
  729. }
  730. .session{
  731. display: grid;
  732. grid-template-columns: repeat(3, 1fr);
  733. gap: 20rpx;
  734. .session-item{
  735. height: 80rpx;
  736. line-height: 80rpx;
  737. border-radius: 12rpx;
  738. border: 2rpx solid #636363;
  739. text-align: center;
  740. font-size: 24rpx;
  741. font-weight: 400;
  742. color: #636363;
  743. &.active{
  744. color: #ED0000;
  745. border-color: #ED0000;
  746. }
  747. }
  748. }
  749. .ticket-type{
  750. .type-item{
  751. background: #FFFFFF;
  752. box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(180,180,180,0.5);
  753. border-radius: 20rpx;
  754. margin-bottom: 20rpx;
  755. padding: 38rpx 40rpx;
  756. .name-price{
  757. margin-bottom: 26rpx;
  758. }
  759. .name{
  760. font-size: 28rpx;
  761. font-weight: 500;
  762. color: #363636;
  763. }
  764. .prices{
  765. font-size: 36rpx;
  766. font-weight: bold;
  767. color: #ED0000;
  768. }
  769. .ishave{
  770. margin-bottom: 26rpx;
  771. .text{
  772. height: 30rpx;
  773. line-height: 30rpx;
  774. padding: 0 22rpx;
  775. background: #FFC8C8;
  776. border-radius: 20rpx;
  777. font-size: 20rpx;
  778. font-weight: 400;
  779. color: #ED0000;
  780. }
  781. }
  782. .bottom{
  783. font-size: 22rpx;
  784. font-weight: 400;
  785. color: #7F7F7F;
  786. .btn{
  787. height: 60rpx;
  788. line-height: 60rpx;
  789. background: linear-gradient(90deg, #FF7979 0%, #ED0000 100%);
  790. border-radius: 30rpx;
  791. padding: 0 36rpx;
  792. font-size: 28rpx;
  793. font-weight: 500;
  794. color: #FFFFFF;
  795. &.disabled{
  796. background: #979797;
  797. }
  798. }
  799. }
  800. }
  801. }
  802. .details{
  803. .title{}
  804. .details-block{
  805. background: #FFFFFF;
  806. box-shadow: 0rpx 2rpx 12rpx 2rpx rgba(221,221,221,0.5);
  807. border-radius: 20rpx;
  808. margin-bottom: 24rpx;
  809. padding: 36rpx;
  810. &.actors{
  811. .title{
  812. .right{
  813. font-size: 24rpx;
  814. font-weight: 400;
  815. color: #7F7F7F;
  816. }
  817. }
  818. }
  819. }
  820. .intro{
  821. font-size: 26rpx;
  822. font-weight: 400;
  823. color: #4E4E4E;
  824. line-height: 40rpx;
  825. }
  826. .actor-list{
  827. .item{
  828. flex-shrink: 0;
  829. width: 160rpx;
  830. text-align: center;
  831. margin-right: 24rpx;
  832. }
  833. .img{
  834. display: block;
  835. width: 100%;
  836. height: 200rpx;
  837. margin-bottom: 16rpx;
  838. }
  839. .name{
  840. font-size: 28rpx;
  841. font-weight: 500;
  842. color: #2D2D2D;
  843. line-height: 42rpx;
  844. margin-bottom: 4rpx;
  845. }
  846. .role{
  847. font-size: 24rpx;
  848. font-weight: 400;
  849. color: #7F7F7F;
  850. line-height: 36rpx;
  851. }
  852. }
  853. }
  854. .canvas{
  855. position: absolute;
  856. left: -99999px;
  857. }
  858. </style>