优惠券
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<view class="setIcon" @click="goSetting">
|
||||
<u-icon class="" labelColor="#258feb" labelPos="bottom" label="设置" name="setting"
|
||||
<u-icon class="" labelColor="#258feb" labelPos="bottom" label="设置" name="setting"
|
||||
:style="`top:${(10 + statusBarHeight) * 2}rpx`" color="#258feb" size="28"></u-icon>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="bg_top flex_box flex_between">
|
||||
<view class="per_mes">
|
||||
<view class="per_mes_user">
|
||||
@@ -19,7 +19,7 @@
|
||||
class="per_mes_img color_shandow"></image>
|
||||
<image src="@/static/icon/home_icon_logo.png" v-if="userMes.avatar == null"
|
||||
class="per_mes_img color_shandow"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="user_vip_box ">
|
||||
<view v-if="userMes.vip == 1" class="user_vip super">超级VIP</view>
|
||||
<view v-if="userMes.vip == 3" class="user_vip">众妙之门VIP</view>
|
||||
@@ -46,7 +46,7 @@
|
||||
</view>
|
||||
<br clear="both" />
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
<view class="mine_box" :style="`top:${(45 + statusBarHeight) * 2}rpx`">
|
||||
@@ -145,6 +145,20 @@
|
||||
userMes.jf ? userMes.jf : 0
|
||||
}}</view>
|
||||
</view>
|
||||
<view class="chong_list_item" style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
" @click="onPageJump('/pages/mine/wallet/couponList')">
|
||||
<view class="pay_item_img">
|
||||
优惠券
|
||||
</view>
|
||||
|
||||
<view class="text" style="line-height: 40rpx">{{
|
||||
userCouponNum
|
||||
}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- v-if="iosHide" -->
|
||||
|
||||
@@ -268,6 +282,7 @@
|
||||
signShow: false,
|
||||
signContent: "是否要退出登录?",
|
||||
playData: {},
|
||||
userCouponNum:0, // 优惠券数量
|
||||
directorShow: false, // 主任是否显示班级入口
|
||||
monitorShow: false, // 其他管理是否显示班级入口
|
||||
isAndorid: true,
|
||||
@@ -335,10 +350,11 @@
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
//页面显示
|
||||
onShow() {
|
||||
async onShow() {
|
||||
// console.log(this.userInfo, "11111111111111");
|
||||
this.getData();
|
||||
this.getUserRole()
|
||||
await this.getUserCouponList()
|
||||
// 隐藏原生的tabbar
|
||||
// uni.hideTabBar();
|
||||
},
|
||||
@@ -348,6 +364,34 @@
|
||||
//方法
|
||||
methods: {
|
||||
...mapMutations(["setUserInfo"]),
|
||||
// 获取用户优惠券列表
|
||||
async getUserCouponList(){
|
||||
await this.$http
|
||||
.request({
|
||||
url: "common/coupon/getCouponHistoryList",
|
||||
method: "POST", // POST、GET、PUT、DELETE,具体说明查看官方文档
|
||||
data: {
|
||||
"page":1,
|
||||
"limit":10,
|
||||
"getType":"",//获取类型 0 后台赠送 1 主动获取
|
||||
"status":"0",//使用状态 0 未使用 1 已使用 2 已过期
|
||||
"userInfo":"",//用户信息
|
||||
"userId":this.userInfo.id
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
if(res.code != 0) return this.$commonJS.showToast(res.errMsg);
|
||||
this.userCouponNum = res.couponList.total
|
||||
|
||||
}).catch(e => {
|
||||
console.log(e);
|
||||
this.$commonJS.showToast(e.errMsg);
|
||||
})
|
||||
},
|
||||
openInfo() {
|
||||
this.infoShow = true;
|
||||
},
|
||||
@@ -588,8 +632,11 @@
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "@/style/mixin.scss";
|
||||
|
||||
.per_mes_user{display: block !important;}
|
||||
|
||||
.per_mes_user {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.per_mes {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
@@ -898,14 +945,16 @@
|
||||
overflow: hidden;
|
||||
// position: relative;
|
||||
|
||||
|
||||
|
||||
}
|
||||
.setIcon {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 70rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.setIcon {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 70rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.mine_box {
|
||||
width: 100%;
|
||||
|
||||
|
||||
22
pages/mine/wallet/couponList.vue
Normal file
22
pages/mine/wallet/couponList.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<template>
|
||||
<view>
|
||||
优惠券列表
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user