123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <template>
- <view>
- <!-- #ifdef MP-ALIPAY -->
- <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="购买成功" leftIconSize="0">
- </u-navbar>
- <!-- #endif -->
- <!-- #ifndef MP-ALIPAY -->
- <u-navbar :placeholder="true" bgColor="#fff" :autoBack="true" :border="true" title="购买成功"></u-navbar>
- <!-- #endif -->
- <view class="purchase">
- <image class="imgOne" src="https://mp-public-test-1307117429.cos.ap-shanghai.myqcloud.com/v2/buy_suc.png"
- mode="scaleToFill"></image>
- <image class="imgTwo" :src="picUrl" mode="scaleToFill"></image>
- </view>
- <view class="package">
- <button @click="toProcess()">立即抽奖</button>
- <text>已购买的商品请稍后在“我的”-“仓库”中进行查看和提货</text>
- </view>
- </view>
- </template>
- <script>
- import env from '../../config/env.js'
- import $http from '@/utils/request.js'
- export default {
- data() {
- return {
- boxId: 0,
- orderId: 0,
- picUrl: '',
- }
- },
- onLoad(opthios) {
- this.boxId = opthios.boxId
- this.orderId = opthios.orderId
- this.getPicUrl()
- },
- methods: {
- getPicUrl() {
- $http.post('/api/v1/mp/user/mall/ticket/detail', {
- boxId: this.boxId,
- noToken: true
- }).then(res => {
- if (res.code == 0) {
- this.picUrl = env.filePublic + res.data.picUrl.split(',')[0]
- }
- })
- },
- // 线上立即刮票成功,跳转到刮奖过程
- toProcess() {
- uni.navigateTo({
- url: `/packagePrize/rolling/animation?boxId=${ this.boxId }&orderId=${ this.orderId }&isTry=0`
- })
-
- //线上抽奖动画
- // uni.navigateTo({
- // url: `/packagePrize/rolling/index?boxId=${ this.boxId }&orderId=${ this.orderId }&isTry=0`
- // })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .purchase {
- position: relative;
- padding-top: 100rpx;
- width: 592rpx;
- height: 788rpx;
- margin: 0 auto;
- .imgOne {
- width: 100%;
- height: 100%;
- }
- .imgTwo {
- z-index: 10;
- width: 100%;
- width: 520rpx;
- height: 430rpx;
- position: absolute;
- top: 320rpx;
- left: 36rpx;
- }
- }
- .package {
- margin-top: 100rpx;
- text-align: center;
- button {
- margin: 0 auto;
- width: 666rpx;
- height: 98rpx;
- background: linear-gradient(180deg, #FEA052 0%, #FF8D2F 100%);
- border-radius: 56rpx;
- color: #fff;
- }
- text {
- margin-top: 54rpx;
- display: inline-block;
- width: 570rpx;
- color: #666666;
- font-size: 26rpx;
- line-height: 32rpx;
- letter-spacing: 1px;
- }
- }
- </style>
|