|
@@ -15,8 +15,18 @@
|
|
|
<!-- 顶部标题 -->
|
|
<!-- 顶部标题 -->
|
|
|
<view class="text-xl font-bold text-center py-3 bg-white">达州农机优惠券</view>
|
|
<view class="text-xl font-bold text-center py-3 bg-white">达州农机优惠券</view>
|
|
|
|
|
|
|
|
|
|
+ <wd-swiper
|
|
|
|
|
+ :list="swiperList"
|
|
|
|
|
+ autoplay
|
|
|
|
|
+ v-model:current="current"
|
|
|
|
|
+ :indicator="{ type: 'dots-bar' } as any"
|
|
|
|
|
+ @click="handleSwiperClick"
|
|
|
|
|
+ @change="handleSwiperChange"
|
|
|
|
|
+ v-if="!statisticsDataShow"
|
|
|
|
|
+ ></wd-swiper>
|
|
|
|
|
+
|
|
|
<!-- 数据统计卡片 -->
|
|
<!-- 数据统计卡片 -->
|
|
|
- <view class="grid grid-cols-2 gap-3 mb-4">
|
|
|
|
|
|
|
+ <view class="grid grid-cols-2 gap-3 mb-4" v-else>
|
|
|
<!-- 总销售额 -->
|
|
<!-- 总销售额 -->
|
|
|
<statistics-card
|
|
<statistics-card
|
|
|
title="总销售额"
|
|
title="总销售额"
|
|
@@ -72,15 +82,6 @@
|
|
|
/>
|
|
/>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <!-- <wd-swiper
|
|
|
|
|
- :list="swiperList"
|
|
|
|
|
- autoplay
|
|
|
|
|
- v-model:current="current"
|
|
|
|
|
- :indicator="{ type: 'dots-bar' } as any"
|
|
|
|
|
- @click="handleSwiperClick"
|
|
|
|
|
- @change="handleSwiperChange"
|
|
|
|
|
- ></wd-swiper> -->
|
|
|
|
|
-
|
|
|
|
|
<view class="pb-4">
|
|
<view class="pb-4">
|
|
|
<!-- 网点地址标题 -->
|
|
<!-- 网点地址标题 -->
|
|
|
<view class="text-lg font-bold py-4 border-b border-gray-100">农机销售网点</view>
|
|
<view class="text-lg font-bold py-4 border-b border-gray-100">农机销售网点</view>
|
|
@@ -148,7 +149,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-// import banner1 from '@/static/banner1.png'
|
|
|
|
|
|
|
+import banner1 from '@/static/banner1.png'
|
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
|
import { useUserStore } from '@/store/user'
|
|
import { useUserStore } from '@/store/user'
|
|
|
import { useAppStore } from '@/store/app'
|
|
import { useAppStore } from '@/store/app'
|
|
@@ -161,22 +162,24 @@ const userStore = useUserStore()
|
|
|
const appStore = useAppStore()
|
|
const appStore = useAppStore()
|
|
|
const dictStore = useDictStore()
|
|
const dictStore = useDictStore()
|
|
|
const message = useMessage()
|
|
const message = useMessage()
|
|
|
-// const current = ref<number>(0)
|
|
|
|
|
-// const swiperList = ref([banner1, banner1, banner1])
|
|
|
|
|
|
|
+
|
|
|
|
|
+const statisticsDataShow = ref(false)
|
|
|
|
|
+const current = ref<number>(0)
|
|
|
|
|
+const swiperList = ref([banner1, banner1, banner1])
|
|
|
|
|
|
|
|
const statisticsData = ref([0, 0, 0, 0, 0, 0])
|
|
const statisticsData = ref([0, 0, 0, 0, 0, 0])
|
|
|
|
|
|
|
|
// 获取安全区域距离
|
|
// 获取安全区域距离
|
|
|
const { safeAreaInsets } = uni.getWindowInfo()
|
|
const { safeAreaInsets } = uni.getWindowInfo()
|
|
|
|
|
|
|
|
-// // 轮播图事件处理
|
|
|
|
|
-// function handleSwiperClick(e: any) {
|
|
|
|
|
-// // console.log('轮播图点击', e)
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+// 轮播图事件处理
|
|
|
|
|
+function handleSwiperClick(e: any) {
|
|
|
|
|
+ // console.log('轮播图点击', e)
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
-// function handleSwiperChange(e: any) {
|
|
|
|
|
-// // console.log('轮播图切换', e)
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+function handleSwiperChange(e: any) {
|
|
|
|
|
+ // console.log('轮播图切换', e)
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
// 网点数据
|
|
// 网点数据
|
|
|
const locationList = ref([])
|
|
const locationList = ref([])
|
|
@@ -292,10 +295,20 @@ const getStatisticsData = async () => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// 获取统计数据是否显示配置
|
|
|
|
|
+const getStatisticsDataShow = async () => {
|
|
|
|
|
+ const configList = await dictStore.getConfigList('mini_program_index_sumary_show')
|
|
|
|
|
+ if (configList.length > 0) {
|
|
|
|
|
+ // 将字符串分割后转换为数字类型
|
|
|
|
|
+ statisticsDataShow.value = configList[0].substance === '1'
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
onShow(() => {
|
|
onShow(() => {
|
|
|
getUserList()
|
|
getUserList()
|
|
|
showCompleteDialog()
|
|
showCompleteDialog()
|
|
|
getStatisticsData()
|
|
getStatisticsData()
|
|
|
|
|
+ getStatisticsDataShow()
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|