|
|
@@ -19,16 +19,21 @@
|
|
|
</div>
|
|
|
<div class="card qupiao">
|
|
|
<div class="tit">取电影票</div>
|
|
|
- <div class="codebar">
|
|
|
+ <div class="codebar" v-if="ticket.orderStatus=='GENERATE_SUCCESS'">
|
|
|
<swiper class="swiper" circular>
|
|
|
<swiper-item v-for="(i,s) in ticket.ticketCode" :key="s">
|
|
|
- <block v-for="(a,b) in i.code" :key="b" v-show="a.text=='取票码'">
|
|
|
- <Uqrcode ref="uqcode" :code="a.value" :size="150" class="code-img"/>
|
|
|
+ <block v-for="(a,b) in i.code" :key="b" v-show="a.text=='取票码'">
|
|
|
+ <Uqrcode ref="uqcode" :code="a.value" :size="150" :class="{'code-img':true,opacity:HaveBeenShown}" />
|
|
|
<div class="ticketCode">取票码:<span class="dinB">{{ a.value }}</span></div>
|
|
|
+ <span class="ico" v-if="HaveBeenShown">已放映</span>
|
|
|
</block>
|
|
|
</swiper-item>
|
|
|
</swiper>
|
|
|
</div>
|
|
|
+ <div class="await" v-else-if="ticket.orderStatus=='DEALING'">
|
|
|
+ <img class="await_img" src="http://teaclub.oss-cn-chengdu.aliyuncs.com/CloudShop/head_pic/416c89124df9a69bb1cbfb55b1007b086031a57fpng" alt="">
|
|
|
+ <div class="txt">待出票</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="card detail">
|
|
|
<div class="tit">订单详情</div>
|
|
|
@@ -55,10 +60,10 @@
|
|
|
<div class="head_tit">{{ order.cinemaName }}</div>
|
|
|
<div class="head_con flex_r flex_jb">
|
|
|
<div class="info flex_c flex_jb">
|
|
|
- <p class="pt">{{ order.movieName }}</p>
|
|
|
- <p class="p">{{ order.amount }}张</p>
|
|
|
- <p class="p">原价 ¥{{ order.order_amount }}</p>
|
|
|
- <p class="p">{{ order.seatInfos }}</p>
|
|
|
+ <p class="pt">{{ order.movieName }}</p>
|
|
|
+ <p class="p">{{ order.amount }}张</p>
|
|
|
+ <p class="p">原价 ¥{{ order.order_amount }}</p>
|
|
|
+ <p class="p">{{ order.seatInfos }}</p>
|
|
|
</div>
|
|
|
<image class="poster" mode="aspectFill" :src="order.posterUrl" />
|
|
|
</div>
|
|
|
@@ -87,7 +92,6 @@
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
import { ToPayOpre } from "@/utils/reqTools.js";
|
|
|
let toPayOpre = new ToPayOpre();
|
|
|
@@ -107,18 +111,20 @@ export default {
|
|
|
userinfo: uni.getStorageSync("userinfo"),
|
|
|
|
|
|
ispay: false,
|
|
|
+ HaveBeenShown: false, //是否放映
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- getTicket(da){
|
|
|
+ getTicket(da) {
|
|
|
// da = { tradeNo: "ML20230602756506924" }
|
|
|
- post("local/orderMovie",da).then(res=>{
|
|
|
+ post("local/orderMovie", da).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
- if(res.data.detail.code == 200){
|
|
|
+ if (res.data.detail.code == 200) {
|
|
|
this.ticket = res.data.detail.data
|
|
|
+ this.HaveBeenShown = this.$day().unix() > this.$day(this.ticket.showTime).unix()
|
|
|
}
|
|
|
- let da = res.data.order
|
|
|
- if(da){
|
|
|
+ let da = res.data.order
|
|
|
+ if (da) {
|
|
|
let arr = JSON.parse(da.product_detail)
|
|
|
let obj = {
|
|
|
trade_no: da.trade_no,
|
|
|
@@ -139,25 +145,25 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getIntegral(){
|
|
|
- post("local/getIntegral",{type:2}).then(res=>{
|
|
|
+ getIntegral() {
|
|
|
+ post("local/getIntegral", { type: 2 }).then(res => {
|
|
|
if (res.code == 0) {
|
|
|
let i1 = res.data.integral;
|
|
|
- this.Integral = this.$h.Mul(i1,100);
|
|
|
- this.deduction = this.$h.Mul(this.order.order_amount,i1).toFixed(2);
|
|
|
+ this.Integral = this.$h.Mul(i1, 100);
|
|
|
+ this.deduction = this.$h.Mul(this.order.order_amount, i1).toFixed(2);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
pay() {
|
|
|
- post("local/goOrderPay", {trade_no: this.order.trade_no}).then(res => {
|
|
|
+ post("local/goOrderPay", { trade_no: this.order.trade_no }).then(res => {
|
|
|
if (res.code == 0 && res.data.data.prepayid) {
|
|
|
toPayOpre.toPay(res.data.data, (rea) => {
|
|
|
- if (!rea) {
|
|
|
- // 支付成功
|
|
|
- this.getTicket(this.pda);
|
|
|
- } else {
|
|
|
- // 支付失败
|
|
|
- }
|
|
|
+ if (!rea) {
|
|
|
+ // 支付成功
|
|
|
+ this.getTicket(this.pda);
|
|
|
+ } else {
|
|
|
+ // 支付失败
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
@@ -173,119 +179,165 @@ export default {
|
|
|
mounted() {},
|
|
|
};
|
|
|
</script>
|
|
|
-
|
|
|
<style scoped lang='scss'>
|
|
|
-.cinemaTicket{
|
|
|
+.cinemaTicket {
|
|
|
padding: 28rpx 30rpx;
|
|
|
}
|
|
|
-.head{
|
|
|
+
|
|
|
+.head {
|
|
|
border-radius: 20rpx;
|
|
|
background-color: #fff;
|
|
|
box-shadow: 4rpx 4rpx 26rpx 2rpx rgba(17, 18, 29, 0.1);
|
|
|
- .head_tit{
|
|
|
+
|
|
|
+ .head_tit {
|
|
|
font-size: 28rpx;
|
|
|
padding: 25rpx 28rpx;
|
|
|
// background-color: rgba($color: #000, $alpha: 0.05);
|
|
|
}
|
|
|
- .head_con{
|
|
|
+
|
|
|
+ .head_con {
|
|
|
padding: 25rpx 28rpx;
|
|
|
}
|
|
|
- .info,.poster{
|
|
|
+
|
|
|
+ .info,
|
|
|
+ .poster {
|
|
|
vertical-align: text-top;
|
|
|
}
|
|
|
- .info{
|
|
|
+
|
|
|
+ .info {
|
|
|
width: calc(100% - 150rpx);
|
|
|
padding-right: 30rpx;
|
|
|
min-height: 220rpx;
|
|
|
- p{
|
|
|
+
|
|
|
+ p {
|
|
|
font-size: 26rpx;
|
|
|
color: #666;
|
|
|
margin-bottom: 8rpx;
|
|
|
}
|
|
|
- .pt{
|
|
|
+
|
|
|
+ .pt {
|
|
|
font-weight: bold;
|
|
|
color: #000;
|
|
|
font-size: 30rpx;
|
|
|
margin-bottom: 8rpx;
|
|
|
}
|
|
|
- .p{
|
|
|
+
|
|
|
+ .p {
|
|
|
color: #000;
|
|
|
}
|
|
|
}
|
|
|
- .poster{
|
|
|
+
|
|
|
+ .poster {
|
|
|
width: 150rpx;
|
|
|
height: 220rpx;
|
|
|
border-radius: 12rpx;
|
|
|
}
|
|
|
}
|
|
|
-.qupiao{
|
|
|
+
|
|
|
+.qupiao {
|
|
|
+ position: relative;
|
|
|
.code-img {
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: center;
|
|
|
- margin: 0 auto;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: center;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .opacity {
|
|
|
+ opacity: 0.25;
|
|
|
}
|
|
|
- .opacity{
|
|
|
- opacity: 0.3;
|
|
|
+ .ico{
|
|
|
+ padding: 5rpx 16rpx;
|
|
|
+ color: #EB5A5F;
|
|
|
+ border: 4rpx solid #EB5A5F;
|
|
|
+ border-radius: 12rpx;
|
|
|
+ font-size: 30rpx;
|
|
|
+ font-weight: bold;
|
|
|
+ position: absolute;
|
|
|
+ left: calc(50% - 65rpx);
|
|
|
+ top: 130rpx;
|
|
|
+ }
|
|
|
+ .await{
|
|
|
+ text-align: center;
|
|
|
+ .await_img{
|
|
|
+ width: 280rpx;
|
|
|
+ height: 280rpx;
|
|
|
+ }
|
|
|
+ .txt{
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #666;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-.detail{
|
|
|
- .label{
|
|
|
+
|
|
|
+.detail {
|
|
|
+ .label {
|
|
|
margin-top: 15rpx;
|
|
|
}
|
|
|
- .title,.nums{
|
|
|
+
|
|
|
+ .title,
|
|
|
+ .nums {
|
|
|
display: inline-block;
|
|
|
font-size: 26rpx;
|
|
|
}
|
|
|
- .title{
|
|
|
+
|
|
|
+ .title {
|
|
|
color: #888;
|
|
|
width: 160rpx;
|
|
|
}
|
|
|
}
|
|
|
-.money{
|
|
|
- .li{
|
|
|
+
|
|
|
+.money {
|
|
|
+ .li {
|
|
|
margin-bottom: 16rpx;
|
|
|
- &:last-child{
|
|
|
+
|
|
|
+ &:last-child {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
- span{
|
|
|
+
|
|
|
+ span {
|
|
|
font-size: 30rpx;
|
|
|
}
|
|
|
}
|
|
|
- .corg{
|
|
|
+
|
|
|
+ .corg {
|
|
|
color: #EB5A5F;
|
|
|
margin-left: 5rpx;
|
|
|
}
|
|
|
}
|
|
|
-.btnbar{
|
|
|
- width: calc(100% - 60rpx);
|
|
|
- height: 80rpx;
|
|
|
- background: #EB5A5F;
|
|
|
- border-radius: 45rpx;
|
|
|
- position: fixed;
|
|
|
- bottom: 50rpx;
|
|
|
- left: 30rpx;
|
|
|
- color: #fff;
|
|
|
- font-size: 36rpx;
|
|
|
- text-align: center;
|
|
|
- line-height: 80rpx;
|
|
|
- .msg{
|
|
|
- position: absolute;
|
|
|
- top: -80rpx;
|
|
|
- left: 0;
|
|
|
- font-size: 25rpx;
|
|
|
- color: #666;
|
|
|
- width: 100%;
|
|
|
+
|
|
|
+.btnbar {
|
|
|
+ width: calc(100% - 60rpx);
|
|
|
+ height: 80rpx;
|
|
|
+ background: #EB5A5F;
|
|
|
+ border-radius: 45rpx;
|
|
|
+ position: fixed;
|
|
|
+ bottom: 50rpx;
|
|
|
+ left: 30rpx;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 36rpx;
|
|
|
text-align: center;
|
|
|
- }
|
|
|
+ line-height: 80rpx;
|
|
|
+
|
|
|
+ .msg {
|
|
|
+ position: absolute;
|
|
|
+ top: -80rpx;
|
|
|
+ left: 0;
|
|
|
+ font-size: 25rpx;
|
|
|
+ color: #666;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
.card {
|
|
|
background-color: #fff;
|
|
|
border-radius: 16rpx;
|
|
|
margin-top: 30rpx;
|
|
|
padding: 28rpx 30rpx;
|
|
|
font-size: 32rpx;
|
|
|
- .tit{
|
|
|
+
|
|
|
+ .tit {
|
|
|
height: 30rpx;
|
|
|
line-height: 30rpx;
|
|
|
font-size: 30rpx;
|
|
|
@@ -295,13 +347,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-.swiper{
|
|
|
+.swiper {
|
|
|
height: 360rpx;
|
|
|
- .ticketCode{
|
|
|
+
|
|
|
+ .ticketCode {
|
|
|
font-size: 25rpx;
|
|
|
margin-top: 30rpx;
|
|
|
text-align: center;
|
|
|
- .dinB{
|
|
|
+
|
|
|
+ .dinB {
|
|
|
font-size: 28rpx;
|
|
|
}
|
|
|
}
|