Commit fcbbd572 by 前端

添加记录,this指向

1 parent e7906e85
......@@ -133,7 +133,8 @@ import dayjs from 'dayjs'
const dayImgUrl = require('@/assets/images/common/day.webp')
const weekImgUrl = require('@/assets/images/common/week.webp')
const monthImgUrl = require('@/assets/images/common/month.webp')
import utils from "@/utils/utils.js";
import RecordManager from "@/utils/RecordManager";
const recordManager = RecordManager.getInstance();
export default {
name: '',
data () {
......@@ -217,11 +218,11 @@ export default {
this.sticky = e.detail.scrollTop >= 148
},
getRecordNum() {
let recordFailListAll = JSON.parse(uni.$storage.get("recordList") || "[]");
const { shopMerchantId,sceneType } = uni.$storage.get("userInfo");
let recordFailListAll = recordManager.getRecords();
const { shopMerchantId,sceneType,phone } = uni.$storage.get("userInfo");
let recordFailList = recordFailListAll.filter(i=>{
console.log(i.bussinessType,sceneType)
return i.merchantId == shopMerchantId && i.bussinessType == (sceneType == 0 ? 1 : 2)
return i.merchantId == shopMerchantId && i.bussinessType == (sceneType == 0 ? 1 : 2) && i.loginPhone == phone
})
this.recordFailList = recordFailList
},
......
......@@ -179,16 +179,10 @@ export default {
file: i,
};
});
let recordList = JSON.parse(uni.$storage.get("recordList") || "[]");
recordList = [
...recordList,
{
...this.getParams(),
recordUrlList,
},
];
console.log(recordList, "recordList");
uni.$storage.set("recordList", JSON.stringify(recordList));
recordManager.addRecord({
...this.getParams(),
recordUrlList,
});
unlock();
},
//结束接待
......
......@@ -41,7 +41,7 @@ class RecordManager {
}, 100);
} else {
this.locker = true;
resolve(this.unlock);
resolve(this.unlock.bind(this));
}
});
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!