123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <template>
- <view>
- <u-navbar title="幸运数字" :border="true" :placeholder="true" :autoBack="true" bgColor="#fff" />
- <view class="lucky">
- <view class="lucky-number">
- <view class="flex lucky-number-circle">
- <view class="title">幸运数字</view>
- <view class="num" v-if="info.status == 1">?</view>
- <view class="">{{ info.plainLuckyNum }}</view>
- </view>
- </view>
- <view class="lucky-title">
- <view class="txt">{{ info.title }}</view>
- <view class="id">盲票序列号:{{ info.serialNo }}</view>
- </view>
- <view class="flex lucky-btn">
- <view class="pay" @click="pay">支付{{ info.facePrice / 100 }}元 立即查看</view>
- </view>
- </view>
-
- <pay-popup :pay-show="payShow" :pay-info="payInfo" @close="close" />
- </view>
- </template>
- <script>
- import env from '../../config/env.js'
- import $http from '@/utils/request.js'
- import PayPopup from '../../components/pay-popup/pay-popup.vue'
- export default {
- components:{
- PayPopup
- },
- data() {
- return {
- serialNo: '',
- info: '',
- payInfo: {},
- payShow: false
- };
- },
- onLoad(options) {
- this.serialNo = options.id
- this.getDetail()
- },
- methods: {
- getDetail() {
- $http.post('/api/v1/mp/user/ticket/queryLuckyNum', {
- serialNo: 'T2200044-0003-0000021',
- noToken: true
- }).then(res => {
- console.log(res);
- if (res.code == 0) {
- this.info = res.data
- }
- })
- },
-
- close() {
- this.payShow = false
- },
-
- pay(){
- let data = {
- couponIds: [],
- autoCoupon: 1,
- boxId: this.info.boxId,
- ticketId: this.info.ticketId,
- orderNum: 1
- }
- $http.post('/api/v1/mp/user/ticket/order/settle', data).then(res => {
- console.log(res);
- if (res.code == 0) {
- let info = {
- ... res.data,
- picUrl: env.filePublic + picUrl,
- }
- this.payInfo = info
- this.payShow = true
- console.log(info);
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .lucky {
- width: 100%;
- height: calc(100vh - 50px);
- background: url(https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic3.zhimg.com%2F50%2Fv2-a6f5c8b5b66fe87e4e79c1fc82a61a36_hd.jpg&refer=http%3A%2F%2Fpic3.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1649658373&t=f216ee4825d5b36e62aa3a490516bfb1) center center;
- &-number {
- padding-top: 400rpx;
- &-circle{
- box-sizing: border-box;
- flex-direction: column;
- width: 336rpx;
- height: 336rpx;
- background-color: $uni-bg-color;
- border-radius: 50%;
- margin: auto;
-
- .title{
- margin-bottom: 20rpx;
- }
-
- .num{
- font-size: 100rpx;
- }
- }
- }
-
- &-title{
- margin-top: 40rpx;
- margin-bottom: 70rpx;
- .txt{
- text-align: center;
- font-size: 36rpx;
- font-weight: bold;
- line-height: 50rpx;
- margin-bottom: 8rpx;
- }
- .id{
- line-height: 40rpx;
- text-align: center;
- }
- }
-
- &-btn{
- .pay{
- width: 400rpx;
- height: 60rpx;
- line-height: 60rpx;
- border-radius: 8rpx;
- background-color: rgba(235, 112, 9, 100);
- color: #FFFFFF;
- text-align: center;
- }
- }
- }
- </style>
|