Files
sifa-mp/userPages/pages/manual.vue
T
2025-05-22 10:33:32 +08:00

47 lines
1.1 KiB
Vue

<template>
<view class="min-height bg-main-light p-15">
<HeaderItem title="人工咨询"/>
<view class="flex flex-wrap justify-start items-start">
<view class="shadow w-40p bg-white flex flex-col justify-center items-center rounded m-15 p-20" v-for="(item, index) in list"
:key="index" @click="call(item.dictDataCode)">
<u-icon :name="`/userPages/static/phone_${randList[index]}.png`" size="100rpx"/>
<text class="mt-20 text-25">{{ item.dictDataName }}</text>
</view>
</view>
</view>
</template>
<script>
import HeaderItem from "@/components/HeaderItem.vue";
import {dictDataReq} from "@/api/common";
export default {
name: "manual",
components: {HeaderItem},
data() {
return {
list: [],
randList: []
}
},
methods: {
async getList() {
const {data} = await dictDataReq({dictId: 166})
this.randList = []
this.list = data.map(item => {
this.randList.push(uni.$u.random(0, 2))
return item
})
},
call(phoneNumber){
uni.makePhoneCall({
phoneNumber
})
}
},
onLoad() {
this.getList()
},
}
</script>