苹果上线
This commit is contained in:
@@ -257,8 +257,27 @@
|
||||
<view class="text" style="line-height: 40rpx">{{
|
||||
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" -->
|
||||
|
||||
<!-- <view v-if="iosHide" class="chong_list_item">
|
||||
@@ -393,6 +412,7 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userCouponNum: 0,
|
||||
come: "1",
|
||||
orderList: [{
|
||||
title: "全部",
|
||||
@@ -513,12 +533,12 @@
|
||||
...mapState(["userInfo"]),
|
||||
},
|
||||
//页面显示
|
||||
onShow() {
|
||||
async onShow() {
|
||||
console.log(this.userInfo, "11111111111111");
|
||||
// 隐藏原生的tabbar
|
||||
// uni.hideTabBar();
|
||||
this.getBookList();
|
||||
this.getData();
|
||||
this.getData();await this.getUserCouponList();
|
||||
},
|
||||
async onTabItemTap() {
|
||||
this.getBookList();
|
||||
@@ -530,6 +550,33 @@
|
||||
//方法
|
||||
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);
|
||||
});
|
||||
},
|
||||
getBookList(flag, refreshflag) {
|
||||
this.isLoadingHide = false;
|
||||
var that = this;
|
||||
|
||||
Reference in New Issue
Block a user