diff --git a/h5/package.json b/h5/package.json index 498dd07..a13bd53 100644 --- a/h5/package.json +++ b/h5/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "echarts": "^5.5.1", + "echarts": "^5.4.2", "weixin-js-sdk": "^1.6.5" }, "devDependencies": { diff --git a/h5/components/analysis/chart1.vue b/h5/pages/components/analysis/chart1.vue similarity index 93% rename from h5/components/analysis/chart1.vue rename to h5/pages/components/analysis/chart1.vue index 69b01b9..38178ce 100755 --- a/h5/components/analysis/chart1.vue +++ b/h5/pages/components/analysis/chart1.vue @@ -28,6 +28,8 @@ }); import * as echarts from 'echarts'; + console.log(echarts) + onMounted(() => { drawChart() }) diff --git a/h5/components/analysis/chart2.vue b/h5/pages/components/analysis/chart2.vue similarity index 100% rename from h5/components/analysis/chart2.vue rename to h5/pages/components/analysis/chart2.vue diff --git a/h5/pages/main/bgcx/qsfx/qsfx.vue b/h5/pages/main/bgcx/qsfx/qsfx.vue index aba6dab7..59d732c 100755 --- a/h5/pages/main/bgcx/qsfx/qsfx.vue +++ b/h5/pages/main/bgcx/qsfx/qsfx.vue @@ -18,14 +18,14 @@ const mountedAction = () => { const AnalysisTypeGetList = async () => { const response = await $api("AnalysisTypeGetList"); $response(response, () => { - console.log(response) + console.log(response); list.value = response.data.list; }); }; -const toRouter = (index, i) => { +const toRouter = (id) => { uni.navigateTo({ - url: "/pages/main/bgcx/qsfx/qsfxxq?i=" + i + "&index=" + index, + url: "/pages/main/bgcx/qsfx/qsfxxq?id=" + id, }); }; @@ -50,21 +50,32 @@ onShow(() => { - + {{ item.title }} - - - - {{ val.name }} - {{ val.desc }} - - - + + + + {{ val.name }} + {{ val.desc }} + + diff --git a/h5/pages/main/bgcx/qsfx/qsfxxq.vue b/h5/pages/main/bgcx/qsfx/qsfxxq.vue index 85c3a31..e7d0bed 100755 --- a/h5/pages/main/bgcx/qsfx/qsfxxq.vue +++ b/h5/pages/main/bgcx/qsfx/qsfxxq.vue @@ -1,376 +1,412 @@ \ No newline at end of file +.analysis_title_wrapper { + height: 80rpx; + display: flex; + align-items: center; +} +.grey { + filter: grayscale(100%); +} + diff --git a/h5/pages/main/combo/combo.vue b/h5/pages/main/combo/combo.vue index 9e58e06..c3a0c00 100644 --- a/h5/pages/main/combo/combo.vue +++ b/h5/pages/main/combo/combo.vue @@ -173,7 +173,14 @@ const contrastClick = async (item) => { if (comboIds.value.includes(item.combo_id)) { comboIds.value.splice(comboIds.value.indexOf(item.combo_id), 1); } else { - comboIds.value.push(item.combo_id); + if (comboIds.value.length < 3) { + comboIds.value.push(item.combo_id); + } else { + uni.showToast({ + title: "最多对比3个套餐", + icon: "none", + }); + } } $store.setComboContrast(comboIds.value); }; @@ -248,12 +255,12 @@ const buyClick = async (item) => { }; const toRouter = () => { - if(!comboIds.value.length){ + if (!comboIds.value.length) { uni.showToast({ title: "请先选择套餐", icon: "none", }); - return + return; } uni.navigateTo({ url: "/pages/main/combo/tcdb", @@ -271,11 +278,7 @@ const toRouter = () => { @click="toRouter" class="center fixed pt-10rpx box-border left-40rpx bottom-5% rounded-full w-110rpx h-110rpx bg-#239EA3 flex-col" > - + { }); }; const clickdb = async () => { + $store.setComboContrast(comboIds.value); uni.navigateTo({ url: "/pages/buy/contrast/contrast", }); diff --git a/h5/store/index.js b/h5/store/index.js index 1bfd0ad..118bae9 100644 --- a/h5/store/index.js +++ b/h5/store/index.js @@ -25,7 +25,7 @@ export const useStore = defineStore('counter', { actions: { setComboContrast(comboContrast) { this.combo_compare = comboContrast; - uni.setStorageSync('COMBO_CONTRAST', JSON.stringify(this.comboContrast)); + uni.setStorageSync('COMBO_CONTRAST', JSON.stringify(this.combo_compare)); }, getComboContrast(){ return JSON.parse(uni.getStorageSync('COMBO_CONTRAST') || '[]') || this.combo_compare;