diff --git a/src/assets/changeFlase.png b/src/assets/changeFlase.png
new file mode 100644
index 0000000..ecc7dfc
Binary files /dev/null and b/src/assets/changeFlase.png differ
diff --git a/src/assets/changeTrue.png b/src/assets/changeTrue.png
new file mode 100644
index 0000000..85ab057
Binary files /dev/null and b/src/assets/changeTrue.png differ
diff --git a/src/components/GuipSwitch.vue b/src/components/GuipSwitch.vue
index dfad417..691c778 100644
--- a/src/components/GuipSwitch.vue
+++ b/src/components/GuipSwitch.vue
@@ -1,4 +1,5 @@
+
{{ category.desc }}
{{ item.desc }}
¥{{ item.price }} / {{ item.word }}
@@ -553,10 +552,10 @@ export default { data() { return { btnstyleObj1: { - width: '137px', - height: '38px', - }, - serviceTotal:0, + width: '137px', + height: '38px', + }, + serviceTotal: 0, activeCategory: 0, addlist: [ { @@ -568,34 +567,36 @@ export default { desc: '适用于所有未正式发表的文献类型。', price: '2.4', word: '1000字符', - checked:false + checked: false, + checkFlag: true }, { name: '本科论文', desc: '适用于在校大学生毕业论文。', price: '2.4', word: '1000字符', - checked:false + checked: false, + checkFlag: false }, { name: '说博士论文', desc: '适用于应届高校硕博士研究生论文检测。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '高职高专', desc: '适用于高等职业学院和高等专科学校论文检测。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '一般新文献1name', desc: '适用于所有未正式发表的文献类型。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, ] @@ -608,63 +609,64 @@ export default { name: '一般新文献222', desc: '适用于所有未正式发表的文献类型。', price: '2.4', - checked:false, + checked: false, + checkFlag: true, word: '1000字符' }, { name: '本科论文222', desc: '适用于在校大学生毕业论文。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '说博士论文222', desc: '适用于应届高校硕博士研究生论文检测。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '高职高专222', desc: '适用于高等职业学院和高等专科学校论文检测。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '一般新文献2222', desc: '适用于所有未正式发表的文献类型。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '高职高专2224', desc: '适用于高等职业学院和高等专科学校论文检测。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '一般新文献2222221', desc: '适用于所有未正式发表的文献类型。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '高职高专22242', desc: '适用于高等职业学院和高等专科学校论文检测。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '一般新文献22222211', desc: '适用于所有未正式发表的文献类型。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, ] @@ -677,35 +679,35 @@ export default { name: '一般新文献333', desc: '适用于所有未正式发表的文献类型。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '本科论文33', desc: '适用于在校大学生毕业论文。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '说博士论文333', desc: '适用于应届高校硕博士研究生论文检测。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '高职高专333', desc: '适用于高等职业学院和高等专科学校论文检测。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, { name: '一般新文献3332', desc: '适用于所有未正式发表的文献类型。', price: '2.4', - checked:false, + checked: false, word: '1000字符' }, ] @@ -759,7 +761,7 @@ export default { dialogVisible: false,//是否展示弹框 showCancelButton: true, // 控制是否显示取消按钮 showCloseButton: true, // 控制是否显示关闭按钮 - activeStep: 2,//当前步骤条 + activeStep: 3,//当前步骤条 has_store: '1',//是否是初次授权 还是已有店铺 大于0 已有店铺 distribution_channel: '0',//销售渠道 是否为电商 0 非电商 >0 电商 payment_method_list: [//收款方式 @@ -855,28 +857,38 @@ export default { computed: { // 计算选中的总数 selectedCount() { + const newaddlist = JSON.parse(JSON.stringify(this.addlist)) let list = [] - let list1=[] - this.addlist.forEach(item=>{ - list1=[] + let listTotal = [] + newaddlist.forEach(item => { + let item2 = JSON.parse(JSON.stringify(item)); + item2.list = []; item.list.forEach((item1) => { - if(item.checked){ - list.push(item) - list1.push(item1) - list.list = list1 + if (item1.checked) { + // list1.push(item1) + listTotal.push(item1) + if (item2.list.length == 0) { + item2.list = [item1] + } else { + item2.list.push(item1) + } } }) + if (item2.list.length > 0) { + list.push(item2) + } }) - store.commit('SET_ADDSERVICELIST', list); - return list1.length; + console.log(list, 'list----', this.addlist); + store.commit('SET_ADDSERVICELIST', list); + return listTotal.length; }, }, methods: { - nextGoSettingPrice(){ + nextGoSettingPrice() { this.$router.push('/settingServicePrice') }, - goCurActiveStep(step){ - if(step < this.activeStep){ + goCurActiveStep(step) { + if (step < this.activeStep) { this.activeStep = step } }, @@ -1090,26 +1102,26 @@ export default { // 处理滚动事件 handleScroll() { const scrollPosition = this.$refs.content.scrollTop; - console.log(this.activeCategory,scrollPosition,'this.activeCategory'); + // console.log(this.activeCategory,scrollPosition,'this.activeCategory'); this.addlist.forEach((category, index) => { const element = this.$refs[`category-${index}`][0]; const elementTop = Math.round(element.offsetTop - 70); const elementBottom = elementTop + element.offsetHeight; - - console.log('进来了',scrollPosition,elementTop,elementBottom,index,scrollPosition >= elementTop && scrollPosition < elementBottom); + // console.log('进来了',scrollPosition,elementTop,elementBottom,index,scrollPosition >= elementTop && scrollPosition < elementBottom); if (scrollPosition >= elementTop && scrollPosition < elementBottom) { this.activeCategory = index; } }); }, updateSelectedCount(item) { - this.serviceTotal = this.selectedCount; - this.$set(this.addlist,item) - // console.log('选中总数已更新:',item, this.selectedCount,this.addlist); + this.serviceTotal = this.selectedCount; + console.log(item, 'item----'); + // this.$set(this.addlist,item) + console.log('选中总数已更新:', this.addlist); }, }, - + }; diff --git a/src/views/elementGroups.vue b/src/views/elementGroups.vue index 571a8bc..5d15116 100644 --- a/src/views/elementGroups.vue +++ b/src/views/elementGroups.vue @@ -206,6 +206,12 @@