This commit is contained in:
曹辉 2023-03-20 09:49:10 +08:00
parent 0bd6c66134
commit 7c7323f2fe
2 changed files with 10 additions and 8 deletions

View File

@ -24,7 +24,7 @@
<view class="titles">
积分兑换
</view>
<view class="items" v-show="goodslist.length>0">
<view class="items" v-if='goodslist'>
<view class="item" v-for="(item,index) in goodslist" :key="index">
<image :src="item.attributePitureUrl" mode=""></image>
<view class="title">
@ -43,7 +43,7 @@
</view>
</view>
</view>
<view class="noorder" v-if="goodslist.length==0">
<view class="noorder" v-else>
<u-empty mode="list" icon-size='220' text='暂无可兑换商品'></u-empty>
</view>
<u-mask :show="gainshow" @click="gainshow = false">
@ -226,7 +226,7 @@
pageNum: 1,
pageSize: 10,
goodstotal: 0,
goodslist: [],
goodslist: null,
goodsitem: null,
userid: null,
updata: {
@ -542,8 +542,10 @@
e.goodsPictureUrl = baseurl + e.goodsPictureUrl
e.attributePitureUrl = baseurl + e.attributePitureUrl
})
if (res.rows.length > 0) {
this.goodslist = res.rows
this.goodstotal = res.total
}
} else if (res.code == 9999) {
this.$refs.uToast.show({
title: '未登录,请先登录',

View File

@ -42,9 +42,9 @@
},
onShow() {
var that = this
// createMobileToken().then(res => {
// uni.setStorageSync("token", res.data.token)
// })
createMobileToken().then(res => {
uni.setStorageSync("token", res.data.token)
})
setTimeout(() => {
uni.reLaunch({
url: '/pages/homepage/homepage'