diff --git a/config.js b/config.js index 2968860..76bbd47 100644 --- a/config.js +++ b/config.js @@ -3,11 +3,11 @@ export const appConfig = { //appId:"wx3dc65ce9b588727a",//孕育咨询 //baseUrl: 'http://yunyubang.localhost.com', - // baseUrl:'https://yunyubang.ali251.langye.net',// 'https://yunyubang2021.langye.net', //孕育邦 - baseUrl: 'https://yybtest.ali251.langye.net', + baseUrl:'https://yunyubang.ali251.langye.net',// 'https://yunyubang2021.langye.net', //孕育邦 + // baseUrl: 'https://yybtest.ali251.langye.net', - // newBaseUrl: 'https://yunyubang.ali251.langye.net', - newBaseUrl: 'http://yybtest.ali251.langye.net', + newBaseUrl: 'https://yunyubang.ali251.langye.net', + // newBaseUrl: 'http://yybtest.ali251.langye.net', //baseUrl:'https://yybtest2021.langye.net',//孕育咨询 openidInfoKey: 'openid_info_yunyubang' diff --git a/packages/packageBuy/pages/shopDetail/shopDetail.vue b/packages/packageBuy/pages/shopDetail/shopDetail.vue index 1230f9b..95c95f3 100644 --- a/packages/packageBuy/pages/shopDetail/shopDetail.vue +++ b/packages/packageBuy/pages/shopDetail/shopDetail.vue @@ -34,7 +34,8 @@ 暂无 - 电话 + 电话:{{tel}} + @@ -46,6 +47,11 @@ {{info.merchant.username}} 周一至周日 09:00-18:00 {{info.merchant.address}} + + + 电话:{{tel}} + + @@ -231,6 +237,7 @@ }) return { id: "", + tel: "18550406975", showPass: false, info: {}, dataList: [], @@ -285,11 +292,11 @@ }, onShow() { - var that = this; - console.log("01.onShow",that); - weixin.getOpenidInfo(info => { - - console.log("02.getOpenidInfo",info); + var that = this; + console.log("01.onShow", that); + weixin.getOpenidInfo(info => { + + console.log("02.getOpenidInfo", info); that.user_info = info.user_info; that.openid = that.user_info.openid; that.form.member_name = that.user_info.name || that.user_info.wechat_nickname; @@ -333,6 +340,36 @@ }, methods: { + calltel(phone) { + const res = uni.getSystemInfoSync(); + phone = this.tel + // ios系统默认有个模态框 + if (res.platform == 'ios') { + uni.makePhoneCall({ + phoneNumber: phone, + + success() { + console.log('拨打成功了'); + }, + fail() { + console.log('拨打失败了'); + } + }) + } else { + //安卓手机手动设置一个showActionSheet + uni.showActionSheet({ + itemList: [phone, '呼叫'], + success: function(res) { + console.log(res); + if (res.tapIndex == 1) { + uni.makePhoneCall({ + phoneNumber: phone, + }) + } + } + }) + } + }, toPassGetPhone() { this.showPhone = false; this.showPop = true; @@ -694,7 +731,7 @@ api: '/api/member/order-add', method: 'POST', data: this.form, - utilSuccess: r => { + utilSuccess: r => { if (parseFloat(r.data.total) == 0) { uni.redirectTo({ url: '../buyMemberSuccess/buyMemberSuccess?id=' + @@ -746,7 +783,7 @@ }) } }, - utilFail: r => { + utilFail: r => { uni.showModal({ title: '', content: r, @@ -827,10 +864,12 @@ button::after { border: none } - .noscroll{ - overflow: hidden; - position: fixed; + + .noscroll { + overflow: hidden; + position: fixed; } + .userBoxBottomPass { font-size: 28rpx; text-align: center;