积分、商品搜索bug修复

This commit is contained in:
张乐
2020-08-25 18:28:14 +08:00
parent 3774ac4a02
commit 63123e6ad5
7 changed files with 26 additions and 21 deletions

View File

@@ -6,7 +6,7 @@
prop="name"
:rules="[{ required:true,message:'请输入分类名称',trigger:['blur','change'] }]"
>
<el-input v-model="editPram.name"  maxlength="20" placeholder="分类名称" />
<el-input v-model="editPram.name"  :maxlength="biztype.value === 1 ? 5 : 20" placeholder="分类名称" />
</el-form-item>
<el-form-item label="URL">
<el-input v-model="editPram.url" placeholder="URL" />

View File

@@ -169,7 +169,6 @@ const defaultRole = {
firstPrice: 1,
renewal: 1,
renewalPrice: 1,
city_id: [],
city_ids: []
}],
undelivery: 0,
@@ -276,7 +275,6 @@ export default {
firstPrice: 1,
renewal: 1,
renewalPrice: 1,
city_id: [],
city_ids: []
}))
},
@@ -328,7 +326,6 @@ export default {
logistics.shippingRegion({ tempId: this.tempId }).then(res => {
res.forEach((item, index) => {
item.title = JSON.parse(item.title)
item.city_id = item.title
item.city_ids = item.title
})
this.ruleForm.region = res
@@ -339,7 +336,6 @@ export default {
logistics.shippingFree({ tempId: this.tempId }).then(res => {
res.forEach((item, index) => {
item.title = JSON.parse(item.title)
item.city_id = item.title
item.city_ids = item.title
})
this.ruleForm.free = res
@@ -387,13 +383,11 @@ export default {
sort: this.ruleForm.sort,
type: this.ruleForm.type,
// 配送区域及运费
shippingTemplatesRegionRequestList: [],
// 指定包邮设置
shippingTemplatesFreeRequestList: []
// shippingTemplatesRegionRequestList: [],
// // 指定包邮设置
// shippingTemplatesFreeRequestList: []
}
console.log(this.ruleForm.region)
this.ruleForm.region.forEach((el, index) => {
console.log(el)
el.title = el.city_ids.length > 0 ? JSON.stringify(el.city_ids) : JSON.stringify([[0, 0]])
for (var i = 0; i < el.city_ids.length; i++) {
el.city_ids[i].shift()
@@ -426,10 +420,10 @@ export default {
this.$nextTick(() => {
this.dialogVisible = false
this.$refs[formName].resetFields()
this.clear()
})
setTimeout(() => {
this.$emit('getList')
console.log(this.$refs, 'this.$refs[formName]')
}, 600)
})
} else {
@@ -437,8 +431,8 @@ export default {
this.$message.success('操作成功')
setTimeout(() => {
this.$emit('getList')
// this.$refs[formName].resetFields()
// this.clear()
this.$refs[formName].resetFields()
this.clear()
}, 600)
this.$nextTick(() => {
this.dialogVisible = false
@@ -450,6 +444,10 @@ export default {
return false
}
})
},
clear() {
this.ruleForm.name = ''
this.ruleForm.sort = 0
}
}
}