intelligentGroup/components/secratary.vue

60 lines
1.3 KiB
Vue
Raw Permalink Normal View History

2023-09-08 14:52:40 +08:00
<template>
<view class="wrapper" v-if="isSecratary">
<view class="bg" @click="onTap">
<view class="edit" @click.stop>
<view class="bgcolor"></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>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from "vuex";
export default {
name: "secratary",
data() {
return {
};
},
computed: {
...mapState(["HomeContent", 'isSecratary']),
},
2023-09-15 14:26:04 +08:00
watch: {
isSecratary() {
console.log("isSecratary", this.isSecratary)
}
},
2023-09-08 14:52:40 +08:00
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>
</style>