tijiao
This commit is contained in:
@@ -55,9 +55,14 @@
|
||||
</view>
|
||||
<view class="chong_list">
|
||||
<view >
|
||||
<b>{{ userMes.peanutCoin }}</b>
|
||||
<b style="color: #11a669!important;">{{ userMes.peanutCoin }}</b>
|
||||
天医币
|
||||
</view>
|
||||
<view @click="onPageJump('/pages/mine/wallet/couponList')">
|
||||
<b style="color: #fd6004 !important;">{{ userCouponNum }}</b>
|
||||
优惠券
|
||||
</view>
|
||||
|
||||
<!-- <view v-if="iosHide">
|
||||
<b>{{ userMes.conponsCount }}</b>
|
||||
优惠券
|
||||
@@ -153,6 +158,7 @@ export default {
|
||||
return {
|
||||
showEbook: false, // 显示电子书相关
|
||||
userMes: {},
|
||||
userCouponNum: 0,
|
||||
signShow: false,
|
||||
signContent: "是否要退出登录?",
|
||||
playData: {},
|
||||
@@ -178,6 +184,7 @@ export default {
|
||||
// 隐藏原生的tabbar
|
||||
uni.hideTabBar();
|
||||
this.getData();
|
||||
|
||||
},
|
||||
components: {
|
||||
musicPlay,
|
||||
@@ -185,6 +192,33 @@ export default {
|
||||
//方法
|
||||
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.userMes.id
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
.then(async (res) => {
|
||||
if(res.code != 0) return;
|
||||
this.userCouponNum = res.couponList.total
|
||||
|
||||
}).catch(e => {
|
||||
console.log(e);
|
||||
this.$commonJS.showToast(e.errMsg);
|
||||
})
|
||||
},
|
||||
// 获得操作系统
|
||||
getOS() {
|
||||
let oprateOs = "";
|
||||
@@ -244,6 +278,7 @@ export default {
|
||||
if (this.userInfo.id != undefined) {
|
||||
this.$http.post("book/user/info/" + this.userInfo.id).then((res) => {
|
||||
this.userMes = res.user;
|
||||
this.getUserCouponList();
|
||||
if (this.userMes.vip == 1) {
|
||||
this.userMes.vipValidtime = this.userMes.vipValidtime.substring(
|
||||
0,
|
||||
|
||||
Reference in New Issue
Block a user