Commit 9a210971 by 胡悦

提交

1 parent 8eba779c
......@@ -66,7 +66,7 @@ export default {
return {
historyList: [],
isEnd: false,
currentPage: 1,
pageNum: 1,
shopMerchantId: '',
goodsName: null
}
......@@ -81,11 +81,30 @@ export default {
this.$refs?.tabs?.tabClick(0)
}
},
watchCarModel: {
immediate: true,
handler(newval) {
console.log(newval)
if (this.madiaId == 4) {
this.historyList = uni.$storage.get("historyList")
let index = {
'问界M5': 'M5',
'问界M7': 'M7',
'问界M9': 'M9',
'奥迪RS 3': '测试'
}[newval]
return this.goodsName = index || null
}
}
}
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
this.pageNum = 1
},
watchCarModel () {
return this.$store.state.user.customerInfo.carModel
}
},
mounted () {
if (this.show) this.init()
......@@ -94,20 +113,22 @@ export default {
init () {
const { shopMerchantId } = uni.$storage.get("userInfo");
this.shopMerchantId = shopMerchantId
this.getQuotationList();
this.getQuotationList(true);
},
async getQuotationList (isSwitch = false, next = false) {
const { goodsName, shopMerchantId, currentPage } = this
if (next) this.currentPage++
const { goodsName, shopMerchantId, pageNum } = this
if (next) ++this.pageNum
const data = await uni.$api.commonApi.getQuotationList({
currentPage,
pageNum,
pageSize: 18,
merchantId: shopMerchantId,
orderStatus: 3,
goodsName
})
console.log(data.list, '=====')
if (isSwitch) {
this.historyList = data.list
uni.$storage.set("historyList", data.list)
this.isEnd = false
} else {
if (data.list.length > 0) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!