修改小程序bug

This commit is contained in:
邓洁
2023-02-24 12:20:41 +08:00
parent e5c257ed2d
commit afccd4c183
9 changed files with 32 additions and 24 deletions

View File

@@ -14,7 +14,7 @@
<view style="padding: 14rpx 22rpx;">
<view class="title_box">
<text class="title">{{item.name}}</text>
<u-tag :text="item.tag" type="warning" shape="circle"></u-tag>
<u-tag :text="item.tags" type="warning" shape="circle"></u-tag>
</view>
<view class="product_desc">
{{item.title}}
@@ -24,7 +24,7 @@
:lazy-load="true">
</u-image>
<text class="release">发布日期</text>
<text>{{item.pub_time}}</text>
<text>{{item.pub_time_str}}</text>
</view>
</view>
</view>
@@ -44,7 +44,8 @@
},
queryTitle: null,
imgUrl: null,
productList: []
productList: [],
tagsArray: [],
}
},
onLoad(options) {
@@ -59,6 +60,12 @@
title: this.queryTitle
}
this.$apiServe.getProductList(data).then(res => {
let tags = res.data.data
for (const item of tags) {
let tag = item.tags
this.tagsArray = tag.split(',')
item.tags = this.tagsArray[0]
}
this.productList = res.data.data
}).finally(_ => {})
},