Commit 0eb86439 by yixinjj

Merge branch 'v1.0.7' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.7

2 parents 8cbf4ab9 068943ae
...@@ -162,8 +162,12 @@ export default { ...@@ -162,8 +162,12 @@ export default {
console.log(recordFileList, "recordFileList"); console.log(recordFileList, "recordFileList");
if (recordFileList.every((i) => i.status == undefined)) { if (recordFileList.every((i) => i.status == undefined)) {
const res = await uni.$api.commonApi.saveRecCustomer(record); const pathArr = recordFileList.map((i) => i.file);
console.log(res); const res = await uni.$api.commonApi.saveRecCustomer({
...record,
recordFileList: pathArr,
});
console.log(record, res, "record");
if (res) { if (res) {
uni.$recordManager.removeRecord(recordId); uni.$recordManager.removeRecord(recordId);
} }
...@@ -216,6 +220,7 @@ export default { ...@@ -216,6 +220,7 @@ export default {
* 这个函数的目的是在一定条件下,通过持续轮询来执行上传记录的操作。它检查一个队列(snapshot)的大小。如果队列为空,它会等待十分钟(1000 毫秒 * 60 秒 * 10 分钟)后再次检查。如果队列中有记录,它会取出一条记录并上传它。 * 这个函数的目的是在一定条件下,通过持续轮询来执行上传记录的操作。它检查一个队列(snapshot)的大小。如果队列为空,它会等待十分钟(1000 毫秒 * 60 秒 * 10 分钟)后再次检查。如果队列中有记录,它会取出一条记录并上传它。
*/ */
polling() { polling() {
console.log(this.snapshot.size, "this.snapshot.size");
if (this.snapshot === null) return; if (this.snapshot === null) return;
uni.$isNetWork().then(() => { uni.$isNetWork().then(() => {
if (this.snapshot.size == 0) { if (this.snapshot.size == 0) {
...@@ -238,8 +243,8 @@ export default { ...@@ -238,8 +243,8 @@ export default {
this.polling(); this.polling();
}, interval * 1000); }, interval * 1000);
}, },
onUnload() { beforeDestroy() {
console.log("stopPolling");
this.stopPolling(); this.stopPolling();
}, }
},
}; };
...@@ -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!