fix(我的券):调整商品使用范围格式

This commit is contained in:
wangsongsole 2022-09-29 14:25:59 +08:00
parent 1a872f497f
commit 488f859afc
1 changed files with 27 additions and 10 deletions

View File

@ -56,8 +56,7 @@
</div> </div>
</div> </div>
<p class="text"> <p class="text">
商品使用范围:<br> 商品使用范围:{{item.productArray.map(item=>item.name).join('、')}}
{{item.productArray.map(item=>item.name).join('、')}}
</p> </p>
</div> </div>
<!-- 空状态 --> <!-- 空状态 -->
@ -75,13 +74,23 @@
el: "#app", el: "#app",
data () { data () {
return { return {
tabList: [ tabList: [{
{ id: 1, text: "待使用" }, id: 1,
{ id: 2, text: "已使用" }, text: "待使用"
{ id: 3, text: "已失效" } },
{
id: 2,
text: "已使用"
},
{
id: 3,
text: "已失效"
}
], ],
tabActive: 1, /* tab 选中下标 */ tabActive: 1,
more: false, /* 是否展示更多 状态 */ /* tab 选中下标 */
more: false,
/* 是否展示更多 状态 */
couponList: [] couponList: []
} }
}, },
@ -117,7 +126,9 @@
}, },
/* tab点击 */ /* tab点击 */
tabHandle ({ id }) { tabHandle ({
id
}) {
this.tabActive = id this.tabActive = id
this.getCouponList() this.getCouponList()
}, },
@ -125,7 +136,13 @@
/* 请求数据 */ /* 请求数据 */
getCouponList () { getCouponList () {
const key = sessionStorage.getItem('key') const key = sessionStorage.getItem('key')
req.axiosGet('/key/coupon/list', { key, status: this.tabActive }).then(({ data, code }) => { req.axiosGet('/key/coupon/list', {
key,
status: this.tabActive
}).then(({
data,
code
}) => {
if (code === 200) { if (code === 200) {
const productArray = [] const productArray = []
data.map(item => { data.map(item => {