对接接口
This commit is contained in:
@ -74,11 +74,11 @@
|
||||
<!-- 茶艺师等级筛选 -->
|
||||
<view class="flex items-center text-#303133 overflow-x-auto whitespace-nowrap ml-30rpx my-30rpx tea-level-scrollbar">
|
||||
<view
|
||||
class="h-64rpx rounded-12rpx px-24rpx py-12rpx flex items-center justify-center font-400 text-28rpx mr-20rpx"
|
||||
:class="selectedLevel.includes(item.value) ? 'bg-[#4C9F44] text-[#fff]' : 'bg-[#FFF] text-[#606266]'"
|
||||
v-for="(item, index) in TeaSpecialistLevels" :key="index"
|
||||
@click="Index.handleToggleTeaSpecialistLevel(item.value)">
|
||||
{{ item.label }}
|
||||
class="h-64rpx rounded-12rpx px-24rpx py-12rpx flex items-center justify-center font-400 text-28rpx mr-20rpx"
|
||||
:class="selectedLevel.includes(item.id) ? 'bg-[#4C9F44] text-[#fff]' : 'bg-[#FFF] text-[#606266]'"
|
||||
@click="Index.handleToggleTeaSpecialistLevel(item.id)">
|
||||
{{ item.level_name}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -146,22 +146,34 @@
|
||||
<script lang="ts" setup>
|
||||
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
|
||||
import useMescroll from "@/uni_modules/mescroll-uni/hooks/useMescroll.js"
|
||||
import {TeaSpecialistLevels} from '@/utils/teaSpecialist'
|
||||
import TeaSpecialistLevel from '@/components/TeaSpecialistLevel.vue'
|
||||
import { OrderSource, OrderStatus } from '@/utils/order'
|
||||
import {getlocation} from '@/utils/jwexin'
|
||||
import {getDecorate, getTeaSpecialistLevels} from '@/api/home'
|
||||
// import {TeaSpecialistLevels} from '@/utils/teaSpecialist'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
|
||||
// 茶艺师等级
|
||||
const TeaSpecialistLevels = reactive<Array<{ id: number, status: number, level_name: string}>>([])
|
||||
const selectedLevel = ref<Array<any>>([]) // 选择茶艺师的点击等级
|
||||
|
||||
|
||||
// 分页
|
||||
const { mescrollInit, downCallback } = useMescroll(onPageScroll, onReachBottom) // 调用mescroll的hook
|
||||
|
||||
onLoad(() => {
|
||||
getlocation((res) => {
|
||||
console.log('经纬度:' + res.latitude + ',' + res.longitude)
|
||||
// getlocation((res) => {
|
||||
// console.log('经纬度:' + res.latitude + ',' + res.longitude)
|
||||
// })
|
||||
|
||||
// getDecorate({id: 1}).then((res: any) => {
|
||||
// const data = JSON.parse(res.data)
|
||||
// console.log('装修数据:', data)
|
||||
// })
|
||||
|
||||
// 获取茶艺师等级
|
||||
getTeaSpecialistLevels().then((res:Array<any>) => {
|
||||
TeaSpecialistLevels.push(...res)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user