Browse Source

bug--拨打电话无效

master
taozi 4 years ago
parent
commit
1efc9fa392
  1. 13
      pages/order/OrderDetails/index.vue
  2. 10
      pages/shop/GoodsCon/index.vue
  3. 13
      pages/shop/StoreList/index.vue

13
pages/order/OrderDetails/index.vue

@ -126,7 +126,7 @@
<view class="name">
{{ orderInfo.realName }}
<text class="phone">{{ orderInfo.userPhone }}</text>
<text class="iconfont icon-tonghua font-color-red"></text>
<text @click="telPhone(orderInfo.userPhone)" class="iconfont icon-tonghua font-color-red"></text>
</view>
<view>{{ orderInfo.userAddress }}</view>
</view>
@ -134,7 +134,7 @@
<div class="name">
{{ system_store.name}}
<span class="phone">{{ system_store.phone }}</span>
<span class="iconfont icon-tonghua font-color-red" :href="'tel:' + system_store.phone"></span>
<span @click="telPhone(system_store.phone)" class="iconfont icon-tonghua font-color-red" :href="'tel:' + system_store.phone"></span>
</div>
<div>{{ system_store.address }}</div>
</div>
@ -366,6 +366,15 @@ export default {
},
});
},
//
telPhone(phoneNumber) {
uni.makePhoneCall({
phoneNumber: phoneNumber,
fail() {
console.log("取消拨打");
}
});
},
showChang: function (data) {
//
this.$yrouter.push({

10
pages/shop/GoodsCon/index.vue

@ -70,7 +70,7 @@
</view>
</view>
<view class="addressBox">
<a :href="'tel:'+systemStore.phone" class="iconfont icon-dadianhua01 font-color-red phone"></a>
<a class="iconfont icon-dadianhua01 font-color-red phone" @click="telPhone(systemStore.phone)"></a>
<view class="addressTxt corlor-yshop">距离{{systemStore.distance}}千米</view>
</view>
</view>
@ -340,6 +340,14 @@
},
});
},
telPhone(phoneNumber) {
uni.makePhoneCall({
phoneNumber: phoneNumber,
fail() {
console.log("取消拨打");
}
});
},
showChang: function (data) {
this.$yrouter.push({
path: "/pages/map/index",

13
pages/shop/StoreList/index.vue

@ -16,7 +16,7 @@
</view>
<view class="row-right">
<view>
<a class="store-phone" :href="'tel:' + item.phone">
<a class="store-phone" @click="telPhone(item.phone)">
<text class="iconfont icon-dadianhua01"></text>
</a>
</view>
@ -35,7 +35,7 @@
<script>
import Loading from "@/components/Loading";
import { storeListApi } from "@/api/store";
import { isWeixin } from "@/utils/index";
import { isWeixin,tel } from "@/utils/index";
import { wechatEvevt, wxShowLocation } from "@/libs/wechat";
import { mapGetters } from "vuex";
import cookie from "@/utils/store/cookie";
@ -79,6 +79,15 @@ export default {
this.$yrouter.back();
}
},
//
telPhone(phoneNumber) {
uni.makePhoneCall({
phoneNumber: phoneNumber,
fail() {
console.log("取消拨打");
}
});
},
//
getList: function() {
if (this.loading || this.loaded) return;

Loading…
Cancel
Save