日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學(xué)無(wú)先后,達(dá)者為師

網(wǎng)站首頁(yè) 編程語(yǔ)言 正文

uniapp H5頁(yè)面內(nèi)獲取手機(jī)號(hào)撥打電話

作者:maoge_666 更新時(shí)間: 2023-07-17 編程語(yǔ)言

H5頁(yè)面直接用

<!-- #ifdef H5 -->
  <a href="tel:10086">h5平臺(tái)下?lián)艽?span id="bsd5o550550j"    class="token operator"></a>
  <!-- #endif -->

動(dòng)態(tài)獲取手機(jī)號(hào)撥打:

<view>
	<a :href="'tel:' + phone">撥打</a>
</view>
data() {
	return {
		phone: ''
	}
},

APP:

<view @click="boda">
		<!-- #ifdef APP-PLUS -->
		<text>{{phone}}</text>
		<!-- #endif -->
		<!-- #ifdef H5 -->
		<a :href='phones'>{{phone}}</a>
		<!-- #endif -->
</view>

<script>
export default {
	data() {
			return {
				phone: '',
				phones: '',
			}
	},
    onShow() {
        //H5
		this.phones = 'tel:' + 10086
	},
   	methods: {
		boda() {
			uni.makePhoneCall({
					phoneNumber: this.phone
			});
		},	
	}
	
}
</script>

原文鏈接:https://blog.csdn.net/maoge_666/article/details/130103453

  • 上一篇:沒(méi)有了
  • 下一篇:沒(méi)有了
欄目分類(lèi)
最近更新