|
@@ -1,10 +1,18 @@
|
|
|
<template>
|
|
|
<div id="personal">
|
|
|
<!-- 用户信息-->
|
|
|
- <div :class="{userinfoYellow:userinfo.isActive, userinfoGrey:userinfo.isntActive}" >
|
|
|
+ <div
|
|
|
+ :class="{
|
|
|
+ userinfoYellow: userinfo.isActive,
|
|
|
+ userinfoGrey: userinfo.isntActive,
|
|
|
+ }"
|
|
|
+ >
|
|
|
<van-row class="padding">
|
|
|
<van-col span="3" offset="2">
|
|
|
- <view class="cu-avatar radius lg" :style="'background-image:url('+userinfo.portrait+');'"></view>
|
|
|
+ <view
|
|
|
+ class="cu-avatar radius lg"
|
|
|
+ :style="'background-image:url(' + userinfo.portrait + ');'"
|
|
|
+ ></view>
|
|
|
</van-col>
|
|
|
<van-col span="12" offset="1">
|
|
|
<div class="flex flex-direction align-start justify-start">
|
|
@@ -12,11 +20,18 @@
|
|
|
<text class="text-black text-bold">{{ userinfo.user_name }}</text>
|
|
|
</div>
|
|
|
<div class="flex justify-between align-center">
|
|
|
- <button class="cu-btn sm round" :class="{level_btn_yellow:userinfo.isActive, level_btn_grey:userinfo.isntActive}">
|
|
|
+ <button
|
|
|
+ class="cu-btn sm round"
|
|
|
+ :class="{
|
|
|
+ level_btn_yellow: userinfo.isActive,
|
|
|
+ level_btn_grey: userinfo.isntActive,
|
|
|
+ }"
|
|
|
+ >
|
|
|
{{ userinfo.level_name }}
|
|
|
-
|
|
|
</button>
|
|
|
- <view class="text-xs padding-left" v-if="userinfo.level == 11">有效期至 {{ userinfo['validity_time_formatted'] }}</view>
|
|
|
+ <view class="text-xs padding-left" v-if="userinfo.level == 11"
|
|
|
+ >有效期至 {{ userinfo["validity_time_formatted"] }}</view
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</van-col>
|
|
@@ -28,7 +43,7 @@
|
|
|
</van-col>
|
|
|
</van-row>
|
|
|
<van-row class="padding">
|
|
|
- <view style="opacity: 1;">
|
|
|
+ <view style="opacity: 1">
|
|
|
<van-col span="4" class="lg" offset="2">
|
|
|
<text class="cuIcon-selection"></text>
|
|
|
卡号:
|
|
@@ -37,26 +52,22 @@
|
|
|
<text class="text-white text-bold text-lg">{{ invite_code }}</text>
|
|
|
</van-col>
|
|
|
</view>
|
|
|
-
|
|
|
</van-row>
|
|
|
<van-row>
|
|
|
<van-col span="6" offset="1">
|
|
|
<div class="flex flex-direction align-center">
|
|
|
-
|
|
|
<text class="text-xxl">{{ userinfo.play_time }}</text>
|
|
|
<text class="font-sm">可用时长(分钟)</text>
|
|
|
</div>
|
|
|
</van-col>
|
|
|
<van-col span="7" offset="2" @click="to_coupons">
|
|
|
<div class="flex flex-direction align-center">
|
|
|
-
|
|
|
<text class="text-xxl">{{ userinfo.coupon }}</text>
|
|
|
<text class="font-sm">已领券数量</text>
|
|
|
</div>
|
|
|
</van-col>
|
|
|
<van-col span="6" offset="2">
|
|
|
<div class="flex flex-direction align-center">
|
|
|
-
|
|
|
<text class="text-xxl">{{ userinfo.experience }}</text>
|
|
|
<text class="font-sm">次卡</text>
|
|
|
</div>
|
|
@@ -64,8 +75,12 @@
|
|
|
</van-row>
|
|
|
</div>
|
|
|
|
|
|
- <view class="text-center font-sm" v-if="userinfo.level >= 3 && userinfo.level <= 7">
|
|
|
- <text class="text-gray">今日专注力免费训练时长还有:
|
|
|
+ <view
|
|
|
+ class="text-center font-sm"
|
|
|
+ v-if="userinfo.level >= 3 && userinfo.level <= 7"
|
|
|
+ >
|
|
|
+ <text class="text-gray"
|
|
|
+ >今日专注力免费训练时长还有:
|
|
|
<text class="text-yellow">{{ userinfo.free_time }}</text>
|
|
|
</text>
|
|
|
</view>
|
|
@@ -109,83 +124,120 @@
|
|
|
z-index="99"
|
|
|
>
|
|
|
<div class="quan_container padding-tb-xl">
|
|
|
- <view class="margin-top-xl flex justify-center">
|
|
|
- <text class="title">{{outCouponData.name}}</text>
|
|
|
- </view>
|
|
|
- <view class="flex justify-center margin-top">
|
|
|
- <text class="text-xs" v-if="outCouponData.validity_time.type==1">{{outCouponData.validity_time.time_format}} 之前领取有效</text>
|
|
|
- <text class="text-xs" v-else>{{outCouponData.validity_time.start_time_format}} 至 {{outCouponData.validity_time.end_time_format}} 之前领取有效</text>
|
|
|
- </view>
|
|
|
- <!-- 核销 -->
|
|
|
- <view class="flex justify-center margin-top" v-if="outCouponData.type==1">
|
|
|
- <div class="flex justify-center quan_container_lil">
|
|
|
- <div style="display: flex;align-items: baseline">
|
|
|
- <text class="hexiao time margin-right-xs">{{ outCouponData.discount.time }}</text>
|
|
|
- <text class="time_text" v-if="outCouponData.discount.type==0">分钟</text>
|
|
|
- <text class="time_text" v-else>次</text>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </view>
|
|
|
- <!-- 满减 -->
|
|
|
- <view class="flex justify-center margin-top" v-if="outCouponData.type==2">
|
|
|
- <div class="flex justify-center quan_container_lil">
|
|
|
- <div style="display: flex;align-items: baseline">
|
|
|
- <text class="time_text">满</text>
|
|
|
- <text class="manjian time margin-lr-xs">{{ outCouponData.discount.full }}</text>
|
|
|
- <text class="time_text">减</text>
|
|
|
- <text class="manjian time margin-left-xs">{{ outCouponData.discount.reduce }}</text>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </view>
|
|
|
- <!-- 折扣 -->
|
|
|
- <view class="flex justify-center margin-top" v-if="outCouponData.type==3">
|
|
|
- <div class="flex justify-center quan_container_lil">
|
|
|
- <div style="display: flex;align-items: baseline">
|
|
|
- <text class="time_text">打</text>
|
|
|
- <text class="discount time margin-lr-sm">{{ outCouponData.discount.discount*10 }}</text>
|
|
|
- <text class="time_text">折</text>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </view>
|
|
|
- <!-- 随机 -->
|
|
|
- <view class="flex justify-center margin-top" v-if="outCouponData.type==4">
|
|
|
- <div class="flex justify-center quan_container_lil">
|
|
|
- <div style="display: flex;align-items: baseline">
|
|
|
- <text class="time_text">随机</text>
|
|
|
- <text class="random time margin-lr-xs">{{ outCouponData.discount.start }}</text>
|
|
|
- <text class="time_text">至</text>
|
|
|
- <text class="random time margin-lr-xs">{{ outCouponData.discount.end }}</text>
|
|
|
- <text class="time_text">元</text>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </view>
|
|
|
- </div>
|
|
|
- <view class="flex justify-center margin-top-xl">
|
|
|
- <button class="cu-btn get_btn text-white" @click="get_coupon">领取</button>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
+ <view class="margin-top-xl flex justify-center">
|
|
|
+ <text class="title">{{ outCouponData.name }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="flex justify-center margin-top">
|
|
|
+ <text class="text-xs" v-if="outCouponData.validity_time.type == 1"
|
|
|
+ >{{
|
|
|
+ outCouponData.validity_time.time_format
|
|
|
+ }} 之前领取有效</text
|
|
|
+ >
|
|
|
+ <text class="text-xs" v-else
|
|
|
+ >{{ outCouponData.validity_time.start_time_format }} 至 {{
|
|
|
+ outCouponData.validity_time.end_time_format
|
|
|
+ }} 之前领取有效</text
|
|
|
+ >
|
|
|
+ </view>
|
|
|
+ <!-- 核销 -->
|
|
|
+ <view
|
|
|
+ class="flex justify-center margin-top"
|
|
|
+ v-if="outCouponData.type == 1"
|
|
|
+ >
|
|
|
+ <div class="flex justify-center quan_container_lil">
|
|
|
+ <div style="display: flex; align-items: baseline">
|
|
|
+ <text class="hexiao time margin-right-xs">{{
|
|
|
+ outCouponData.discount.time
|
|
|
+ }}</text>
|
|
|
+ <text class="time_text" v-if="outCouponData.discount.type == 0"
|
|
|
+ >分钟</text
|
|
|
+ >
|
|
|
+ <text class="time_text" v-else>次</text>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </view>
|
|
|
+ <!-- 满减 -->
|
|
|
+ <view
|
|
|
+ class="flex justify-center margin-top"
|
|
|
+ v-if="outCouponData.type == 2"
|
|
|
+ >
|
|
|
+ <div class="flex justify-center quan_container_lil">
|
|
|
+ <div style="display: flex; align-items: baseline">
|
|
|
+ <text class="time_text">满</text>
|
|
|
+ <text class="manjian time margin-lr-xs">{{
|
|
|
+ outCouponData.discount.full
|
|
|
+ }}</text>
|
|
|
+ <text class="time_text">减</text>
|
|
|
+ <text class="manjian time margin-left-xs">{{
|
|
|
+ outCouponData.discount.reduce
|
|
|
+ }}</text>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </view>
|
|
|
+ <!-- 折扣 -->
|
|
|
+ <view
|
|
|
+ class="flex justify-center margin-top"
|
|
|
+ v-if="outCouponData.type == 3"
|
|
|
+ >
|
|
|
+ <div class="flex justify-center quan_container_lil">
|
|
|
+ <div style="display: flex; align-items: baseline">
|
|
|
+ <text class="time_text">打</text>
|
|
|
+ <text class="discount time margin-lr-sm">{{
|
|
|
+ outCouponData.discount.discount * 10
|
|
|
+ }}</text>
|
|
|
+ <text class="time_text">折</text>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </view>
|
|
|
+ <!-- 随机 -->
|
|
|
+ <view
|
|
|
+ class="flex justify-center margin-top"
|
|
|
+ v-if="outCouponData.type == 4"
|
|
|
+ >
|
|
|
+ <div class="flex justify-center quan_container_lil">
|
|
|
+ <div style="display: flex; align-items: baseline">
|
|
|
+ <text class="time_text">随机</text>
|
|
|
+ <text class="random time margin-lr-xs">{{
|
|
|
+ outCouponData.discount.start
|
|
|
+ }}</text>
|
|
|
+ <text class="time_text">至</text>
|
|
|
+ <text class="random time margin-lr-xs">{{
|
|
|
+ outCouponData.discount.end
|
|
|
+ }}</text>
|
|
|
+ <text class="time_text">元</text>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </view>
|
|
|
+ </div>
|
|
|
+ <view class="flex justify-center margin-top-xl">
|
|
|
+ <button class="cu-btn get_btn text-white" @click="get_coupon">
|
|
|
+ 领取
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
</van-popup>
|
|
|
|
|
|
<!-- 窗口弹出-->
|
|
|
<van-popup :show="pop_show" @close="close_pop" round>
|
|
|
- <div class="err_container flex flex-direction align-center justify-around">
|
|
|
+ <div
|
|
|
+ class="err_container flex flex-direction align-center justify-around"
|
|
|
+ >
|
|
|
<view>
|
|
|
- <text class="title">
|
|
|
- 您当前剩余时间不足
|
|
|
- </text>
|
|
|
+ <text class="title"> 您当前剩余时间不足 </text>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <text class="sub-title">
|
|
|
- 请充值后进行游戏
|
|
|
- </text>
|
|
|
+ <text class="sub-title"> 请充值后进行游戏 </text>
|
|
|
</view>
|
|
|
- <img src="https://img.shuimuai.com/web/sign_notimeJfish.png" class="err_img" alt="">
|
|
|
- <button class="cu-btn lg bg-primary text-white" @click="to_recharge">立即充值</button>
|
|
|
+ <img
|
|
|
+ src="https://img.shuimuai.com/web/sign_notimeJfish.png"
|
|
|
+ class="err_img"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ <button class="cu-btn lg bg-primary text-white" @click="to_recharge">
|
|
|
+ 立即充值
|
|
|
+ </button>
|
|
|
</div>
|
|
|
</van-popup>
|
|
|
- <van-toast id="van-toast"/>
|
|
|
-
|
|
|
+ <van-toast id="van-toast" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -349,11 +401,11 @@ export default {
|
|
|
// 判断外发哪种券
|
|
|
if (wx.getStorageSync("is_other") == false) {
|
|
|
outputCoupon().then((res) => {
|
|
|
- handle_coupon_data(res)
|
|
|
+ handle_coupon_data(res);
|
|
|
});
|
|
|
} else {
|
|
|
outCardCoupon().then((res) => {
|
|
|
- handle_coupon_data(res)
|
|
|
+ handle_coupon_data(res);
|
|
|
});
|
|
|
}
|
|
|
}
|