123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- <template>
- <view>
- <view class="item">
- <view class="item-one">兑换成功</view>
- <view class="item-two">已成功兑换商品,去商城看看吧</view>
- <view class="item-twotwo">当前盲豆余额:{{coinNum}}</view>
- <button class="item-three" @click="toCore()">去商城看看</button>
- <button class="item-four" @click="toPrize()">进入仓库</button>
- </view>
- </view>
- </template>
- <script>
- import $http from '@/utils/request.js'
- export default {
- data() {
- return {
- coinNum:'',
- }
- },
- onShow() {
- this.getBean()
- },
- methods: {
- getBean() {
- uni.showLoading({
- title: '加载中'
- });
- $http.post('/api/v1/mp/user/mine/init', {}).then(res => {
- uni.hideLoading();
- if (res.code == 0) {
- this.coinNum = res.data.coinNum
- }
- }).catch(() => {
- uni.hideLoading();
- })
- },
- toCore() {
- uni.switchTab({
- url: '/pages/core/index'
- })
- },
- toPrize() {
- uni.navigateBack({
- delta:2,
- url: '/packagePrize/prize/index'
- })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .item {
- text-align: center;
- &-one {
- margin-top: 450rpx;
- color: #F9822C;
- font-size: 36rpx;
- line-height: 60rpx;
- font-weight: 600;
- }
- &-two {
- margin-top: 20rpx;
- color: #333;
- font-size: 26rpx;
- font-weight: 500;
- }
-
- &-twotwo {
- margin-top: 20rpx;
- color: #999999;
- font-size: 26rpx;
- font-weight: 500;
- }
- &-three {
- margin-top: 230rpx;
- width: 540rpx;
- height: 84rpx;
- line-height: 78rpx;
- background-color: #F9822C;
- border: 2rpx solid #F9822C;
- color: #fff;
- font-size: 34rpx;
- }
- &-four {
- margin-top: 34rpx;
- width: 536rpx;
- height: 80rpx;
- line-height: 74rpx;
- background-color: #fff;
- border: 2rpx solid #bbb;
- font-size: 34rpx;
- color: #333;
- }
- }
- </style>
|