Commit 1f2549fa by zhangxw

修改deepclone写法

1 parent b86c83ed
...@@ -97,7 +97,7 @@ Component({ ...@@ -97,7 +97,7 @@ Component({
changeMerchantRange(e) { changeMerchantRange(e) {
let { merchantRange, subIndex, formData } = this.data let { merchantRange, subIndex, formData } = this.data
let { merchantId } = e.detail let { merchantId } = e.detail
this.reset() this.reset('', false)
merchantRange.forEach((item, index) => { merchantRange.forEach((item, index) => {
item.show = true item.show = true
if (item.merchantId == merchantId) { if (item.merchantId == merchantId) {
...@@ -242,11 +242,13 @@ Component({ ...@@ -242,11 +242,13 @@ Component({
this.setData({ screenConfirmFlag: false }) this.setData({ screenConfirmFlag: false })
} }
}, },
reset() { reset(e, isresetTime = true) {
let { formData, userInfo, sceneList, staffList, tabType, merchantRange, subIndex } = this.data let { formData, userInfo, sceneList, staffList, tabType, merchantRange, subIndex } = this.data
formData.partnerMerchantIds = [userInfo.subLoginUser.merchantId] formData.partnerMerchantIds = [userInfo.subLoginUser.merchantId]
formData.startTime = '' if (isresetTime) {
formData.endTime = '' formData.startTime = ''
formData.endTime = ''
}
// this.setDate() // this.setDate()
this.setData({ this.setData({
isShowCalendarMonth: false isShowCalendarMonth: false
......
...@@ -106,12 +106,12 @@ Component({ ...@@ -106,12 +106,12 @@ Component({
} }
let { pageNum, pageSize, merchantOutputValuesPageSize, nothing, isAsk, dataList } = _this.data let { pageNum, pageSize, merchantOutputValuesPageSize, nothing, isAsk, dataList } = _this.data
const thisPage = wx.$router.getPageInstance() const thisPage = wx.$router.getPageInstance()
let params = Util.deepClone({ let params = JSON.parse(JSON.stringify({
pageNum, pageNum,
pageSize, pageSize,
merchantOutputValuesPageSize, merchantOutputValuesPageSize,
...thisPage.data.screenFormData ...thisPage.data.screenFormData
}) }))
delete params.shopMerchantNames delete params.shopMerchantNames
delete params.sceneType // 删除场景参数 delete params.sceneType // 删除场景参数
let month = new Date().getMonth() + 1 let month = new Date().getMonth() + 1
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!