linwe
2024-08-08 3c738f4fe2762bba8087e5a22fc0dc06560eab0e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<template>
    <view class="list">
        <view class="list-item flex j-c-s-b"  v-for="(item,index) in list"  :key="index">
            <text class="item-text f-28">{{item.name}}</text>
            <view class="flex a-i-c"   @click="onCall(item.telephone)">
                <text class="f-28 c-main mr-20">{{item.telephone}}</text>
                <u-icon name="/static/icon/tel.png"  width="32rpx"  height="32rpx"></u-icon>
            </view>
        </view>
    </view>
</template>
 
<script>
    import { getHotLineList } from "@/api/service/service.js"
    export default{
        data(){
            return {
                list:[]    
            }
        },
        onLoad(){
            this.getList()
        },
        
        methods:{
            getList(){
                getHotLineList().then(res=>{
                    console.log(res)
                    this.list = res.data.records;
                })
            },
            onCall(tel){
                uni.makePhoneCall({
                    phoneNumber:tel
                })
            }
        }
    }
</script>
 
<style>
    .list{
        padding: 0 30rpx;
    }
    .list-item{
        padding:30rpx 0;
        border-bottom:1px solid #F5F5F5;
    }
    .item-text{
        width:50%;
    }
</style>