intelligentGroup/components/secratary.vue

81 lines
1.6 KiB
Vue

<template>
<view class="wrapper" v-if="isSecratary">
<view class="bg" @click="onTap">
<view class="edit" @click.stop>
<view class="bgcolor">
<image src="../static/bg2.png"></image>
</view>
<view class="title">联系人</view>
<view class="ercode">
<image :src="HomeContent.secrataryqrcode" show-menu-by-longpress="true"></image>
<text>扫码添加联系人微信</text>
</view>
<!-- -->
<!-- <view class="mt-15" @click="getCall(HomeContent.secrataryphone)">
<uni-icons type="phone-filled" size="40"></uni-icons>
</view> -->
<view @click="getCall(HomeContent.secrataryphone)">
<text class="bold size16 mb-5 mt-10">{{HomeContent.secrataryphone}}</text>
<view class="btnCall">点击拨打</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
name: "secratary",
data() {
return {
};
},
computed: {
...mapState(["HomeContent", 'isSecratary']),
},
watch: {
isSecratary() {
// console.log("isSecratary", this.isSecratary)
}
},
methods: {
onTap() {
this.$store.commit("changeSecratary", false);
},
getCall(num) {
uni.makePhoneCall({
phoneNumber: num //仅为示例
}).catch((e) => {
console.log(e) //用catch(e)来捕获错误{makePhoneCall:fail cancel}
});
}
}
}
</script>
<style scoped lang="scss">
.edit {
border-radius: 12px;
}
.btnCall {
background-color: $green;
width: 80px !important;
margin: auto;
border-radius: 5px;
color: #fff;
padding: 3px 10px;
margin-top: 10px;
}
.bgcolor {
image {
width: 100%;
height: 100%;
}
}
</style>