|
|
@@ -62,11 +62,11 @@
|
|
|
</view>
|
|
|
<view class="foot-panel">
|
|
|
<view class="foot-wrap">
|
|
|
- <button class="share-btn">
|
|
|
+ <button class="share-btn" open-type="share">
|
|
|
<image class="icon" src="@/static/svg/user_nav_4.svg"></image>
|
|
|
分享海报
|
|
|
</button>
|
|
|
- <button class="btn btn-1">电话咨询</button>
|
|
|
+ <button class="btn btn-1" @click="handleCallPhone">电话咨询</button>
|
|
|
<button class="btn">下单购买</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -93,6 +93,12 @@ export default {
|
|
|
this.getProductDetail();
|
|
|
this.getTagConfig();
|
|
|
},
|
|
|
+ onShareAppMessage() {
|
|
|
+ return {
|
|
|
+ title: this.productInfo.name,
|
|
|
+ path: '/pages/index/product/index?id=' + this.productId
|
|
|
+ };
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 获取商品详情
|
|
|
async getProductDetail() {
|
|
|
@@ -111,20 +117,17 @@ export default {
|
|
|
phoneNumber: this.productInfo.telephone
|
|
|
});
|
|
|
},
|
|
|
- handleOpenLocation(){
|
|
|
- // let {coordinate} = this.productInfo
|
|
|
- // uni.openLocation({
|
|
|
- // latitude: latitude,
|
|
|
- // longitude: longitude,
|
|
|
- // success: function () {
|
|
|
- // console.log('success');
|
|
|
- // }
|
|
|
- // });
|
|
|
- // if (!this.productInfo.coordinate) return;
|
|
|
- // uni.makePhoneCall({
|
|
|
- // phoneNumber: this.productInfo.telephone
|
|
|
- // });
|
|
|
- }
|
|
|
+ handleOpenLocation() {
|
|
|
+ let { coordinate, address } = this.productInfo;
|
|
|
+ if (!coordinate) return;
|
|
|
+ coordinate = coordinate.split(',');
|
|
|
+ console.log(coordinate);
|
|
|
+ uni.openLocation({
|
|
|
+ latitude: +coordinate[0],
|
|
|
+ longitude: +coordinate[1],
|
|
|
+ address
|
|
|
+ });
|
|
|
+ },
|
|
|
filterDict
|
|
|
}
|
|
|
};
|