Commit 9a210971 by 胡悦

提交

1 parent 8eba779c
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
return { return {
historyList: [], historyList: [],
isEnd: false, isEnd: false,
currentPage: 1, pageNum: 1,
shopMerchantId: '', shopMerchantId: '',
goodsName: null goodsName: null
} }
...@@ -81,11 +81,30 @@ export default { ...@@ -81,11 +81,30 @@ export default {
this.$refs?.tabs?.tabClick(0) 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: { computed: {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus this.pageNum = 1
}, },
watchCarModel () {
return this.$store.state.user.customerInfo.carModel
}
}, },
mounted () { mounted () {
if (this.show) this.init() if (this.show) this.init()
...@@ -94,20 +113,22 @@ export default { ...@@ -94,20 +113,22 @@ export default {
init () { init () {
const { shopMerchantId } = uni.$storage.get("userInfo"); const { shopMerchantId } = uni.$storage.get("userInfo");
this.shopMerchantId = shopMerchantId this.shopMerchantId = shopMerchantId
this.getQuotationList(); this.getQuotationList(true);
}, },
async getQuotationList (isSwitch = false, next = false) { async getQuotationList (isSwitch = false, next = false) {
const { goodsName, shopMerchantId, currentPage } = this const { goodsName, shopMerchantId, pageNum } = this
if (next) this.currentPage++ if (next) ++this.pageNum
const data = await uni.$api.commonApi.getQuotationList({ const data = await uni.$api.commonApi.getQuotationList({
currentPage, pageNum,
pageSize: 18, pageSize: 18,
merchantId: shopMerchantId, merchantId: shopMerchantId,
orderStatus: 3, orderStatus: 3,
goodsName goodsName
}) })
console.log(data.list, '=====')
if (isSwitch) { if (isSwitch) {
this.historyList = data.list this.historyList = data.list
uni.$storage.set("historyList", data.list)
this.isEnd = false this.isEnd = false
} else { } else {
if (data.list.length > 0) { 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!