|
@@ -22,14 +22,19 @@
|
|
|
<image src="../../static/lucky/lucky_ok.png" mode="" v-else></image>
|
|
|
<view class="luck-info-content-ticket-info flex">
|
|
|
<view class="title" :class="{ 'action': info.status == 2 }">{{ info.title }}</view>
|
|
|
- <view class="serialNo" :class="{ 'action': info.status == 2 }">盲票序列号:{{ info.serialNo }}</view>
|
|
|
+ <view class="serialNo" :class="{ 'action': info.status == 2 }">盲票序列号:{{ info.serialNo }}
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="luck-info-content-btn" @click="pay" v-if="info.status == 1">支付{{ info.salePrice / 100 }}元 立即查看</view>
|
|
|
+ <view class="luck-info-content-btn" @click="pay" v-if="info.status == 1 && info.salePrice != 0">
|
|
|
+ 支付{{ info.salePrice / 100 }}元 立即查看</view>
|
|
|
+ <view class="luck-info-content-btn" @click="payDetail"
|
|
|
+ v-else-if="info.status == 1 && info.salePrice == 0">收下盲票,查看幸运数字</view>
|
|
|
<view class="luck-info-content-btn code" @click="scanCode" v-else>扫码兑奖</view>
|
|
|
</view>
|
|
|
<view class="luck-info-close flex">
|
|
|
- <navigator open-type="exit" target="miniProgram" hover-class="none" class="luck-info-close-content flex">
|
|
|
+ <navigator open-type="exit" target="miniProgram" hover-class="none"
|
|
|
+ class="luck-info-close-content flex">
|
|
|
<u-icon name="close" color="#fff" size="20"></u-icon>
|
|
|
</navigator>
|
|
|
</view>
|
|
@@ -62,7 +67,9 @@
|
|
|
import env from '../../config/env.js'
|
|
|
import $http from '@/utils/request.js'
|
|
|
import PayPopup from '../../components/pay-popup/pay-popup.vue'
|
|
|
-
|
|
|
+ import {
|
|
|
+ urlParameter
|
|
|
+ } from '@/utils/util.js'
|
|
|
export default {
|
|
|
components: {
|
|
|
PayPopup
|
|
@@ -88,12 +95,15 @@
|
|
|
}
|
|
|
|
|
|
if (options.q) {
|
|
|
- let url = JSON.stringify(options.q)
|
|
|
- this.serialNo = url.substring(url.length - 22, url.length - 1)
|
|
|
+ let obj = urlParameter(decodeURIComponent(options.q))
|
|
|
+ this.serialNo = obj.id
|
|
|
this.getDetail()
|
|
|
+ // let url = JSON.stringify(options.q)
|
|
|
+ // this.serialNo = url.substring(url.length - 22, url.length - 1)
|
|
|
+ // this.getDetail()
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
methods: {
|
|
|
scanCode() {
|
|
|
let _this = this
|
|
@@ -101,7 +111,8 @@
|
|
|
scanType: ['qrCode'],
|
|
|
success(res) {
|
|
|
let url = res.result
|
|
|
- _this.serialNo = url.substring(url.length - 21, url.length)
|
|
|
+ // _this.serialNo = url.substring(url.length - 21, url.length)
|
|
|
+ _this.serialNo = urlParameter(url).id
|
|
|
_this.getDetail()
|
|
|
},
|
|
|
fail() {
|
|
@@ -213,6 +224,38 @@
|
|
|
close() {
|
|
|
this.payShow = false
|
|
|
},
|
|
|
+ payDetail() {
|
|
|
+ let data = {
|
|
|
+ ticketId: this.info.ticketId,
|
|
|
+ autoCoupon: 0,
|
|
|
+ userCouponIds: [],
|
|
|
+ orderNum: 1
|
|
|
+ }
|
|
|
+ uni.showLoading();
|
|
|
+ $http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ if (res.code == 0) {
|
|
|
+ if (res.data.payAmt == 0) {
|
|
|
+ $http.post('/api/v1/mp/user/ticket/order/submit', {
|
|
|
+ suid: uni.getStorageSync('shareUid'),
|
|
|
+ type: uni.getStorageSync('shareType')
|
|
|
+ }).then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ if (res.code == 0) {
|
|
|
+ this.getDetailInfo()
|
|
|
+ }else {
|
|
|
+ this.showNull = true
|
|
|
+ this.luckyShow = false
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ uni.hideLoading();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ uni.hideLoading();
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
pay() {
|
|
|
let data = {
|
|
@@ -244,7 +287,7 @@
|
|
|
uni.hideLoading();
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
toUser() {
|
|
|
uni.switchTab({
|
|
|
url: '/pages/user/index'
|
|
@@ -267,17 +310,17 @@
|
|
|
width: 87vw;
|
|
|
height: 60vh;
|
|
|
// background-color: #fff;
|
|
|
-
|
|
|
+
|
|
|
&-bg {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
-
|
|
|
+
|
|
|
image {
|
|
|
width: 87vw;
|
|
|
height: 60vh;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
&-content {
|
|
|
flex-direction: column;
|
|
|
justify-content: flex-start;
|
|
@@ -286,21 +329,21 @@
|
|
|
z-index: 10;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
-
|
|
|
+
|
|
|
&-num {
|
|
|
position: relative;
|
|
|
width: 60%;
|
|
|
height: 10vh;
|
|
|
margin-top: 17vh;
|
|
|
margin-bottom: 2vh;
|
|
|
-
|
|
|
+
|
|
|
image {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
&__content {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
@@ -313,14 +356,14 @@
|
|
|
color: #FD3331;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
&-title {
|
|
|
font-size: 40rpx;
|
|
|
line-height: 40rpx;
|
|
|
color: #FEFEFE;
|
|
|
margin-bottom: 1vh;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
&-tip {
|
|
|
width: 80%;
|
|
|
font-size: 26rpx;
|
|
@@ -328,29 +371,29 @@
|
|
|
text-align: center;
|
|
|
color: #fff;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
&-ticket {
|
|
|
position: relative;
|
|
|
width: 96%;
|
|
|
height: 14vh;
|
|
|
margin-bottom: 2vh;
|
|
|
-
|
|
|
+
|
|
|
image {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
&-info {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
z-index: 5;
|
|
|
-
|
|
|
+
|
|
|
flex-direction: column;
|
|
|
-
|
|
|
+
|
|
|
.title {
|
|
|
font-size: 36rpx;
|
|
|
line-height: 36rpx;
|
|
@@ -358,18 +401,18 @@
|
|
|
color: #FF6D2C;
|
|
|
margin-bottom: 2vh;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.serialNo {
|
|
|
font-size: 26rpx;
|
|
|
color: #FF6D2C;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.action {
|
|
|
color: #FFCBAA;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
&-btn {
|
|
|
padding: 0 13%;
|
|
|
height: 8vh;
|
|
@@ -381,17 +424,17 @@
|
|
|
color: #FEFEFE;
|
|
|
font-size: 40rpx;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
.code {
|
|
|
padding: 0 20%;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
&-close {
|
|
|
width: 100%;
|
|
|
position: absolute;
|
|
|
bottom: -140rpx;
|
|
|
-
|
|
|
+
|
|
|
&-content {
|
|
|
width: 70rpx;
|
|
|
height: 70rpx;
|