| | |
| | | <image src="@/static/icon/fenx.png" class="btn-icon"></image> |
| | | <text class="btn-text">分享名片</text> |
| | | </button> |
| | | <view class="action-btn" @click="contactWithChat"> |
| | | <image src="@/static/icon/communication.png" class="btn-icon"></image> |
| | | <text class="btn-text">在线聊天</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 名片简介 --> |
| | |
| | | } |
| | | this.getSettingBackground() |
| | | }, |
| | | onShow() { |
| | | this.getBusinessDetail(); |
| | | }, |
| | | methods: { |
| | | back() { |
| | | uni.navigateBack(); |
| | |
| | | itemList: ['转发给朋友', '保存图片', '收藏', '翻译图片中的文字', '提取文字'], |
| | | success: function(data) { |
| | | if (data.tapIndex == 1) { |
| | | _this.recordVisit(20) |
| | | } |
| | | console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); |
| | | _this.recordVisit(20) |
| | | } |
| | | console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); |
| | | }, |
| | | fail: function(err) { |
| | | console.log(err.errMsg); |
| | |
| | | }); |
| | | }, |
| | | // 记录访问 |
| | | recordVisit(type=10) { |
| | | recordVisit(type = 10) { |
| | | let _this = this; |
| | | const params = { |
| | | business_card_id: _this.business_card_id, |
| | |
| | | } else { |
| | | this.showError('暂未填写微信'); |
| | | } |
| | | }, |
| | | },/* |
| | | // 通过聊天联系 |
| | | contactWithChat() { |
| | | console.log(this.businessInfo); |
| | | if (!this.businessInfo) return; |
| | | |
| | | uni.navigateTo({ |
| | | url: `/pages/plus/business/chat/chat?user_id=${this.businessInfo.user_id}&business_card_id=${this.business_card_id}&nickName=${this.businessInfo.name}` |
| | | }); |
| | | }, */ |
| | | // 打开地图 |
| | | openLocation(businessInfo) { |
| | | let address = businessInfo.region.province + ' ' + businessInfo.region.city + ' ' + businessInfo.region |
| | |
| | | this.showError('暂无地址信息'); |
| | | return; |
| | | } |
| | | console.log( businessInfo.latitude); |
| | | console.log( businessInfo.longitude); |
| | | let latitude=Number(businessInfo.latitude) |
| | | let longitude=Number(businessInfo.longitude) |
| | | console.log(businessInfo.latitude); |
| | | console.log(businessInfo.longitude); |
| | | let latitude = Number(businessInfo.latitude) |
| | | let longitude = Number(businessInfo.longitude) |
| | | uni.openLocation({ |
| | | latitude: latitude, |
| | | longitude: longitude, |
| | |
| | | complete: function(res) { |
| | | console.log(res); |
| | | } |
| | | |
| | | |
| | | }); |
| | | |
| | | }, |
| | |
| | | }, |
| | | // 跳转到平台 |
| | | goToPlatform() { |
| | | uni.setStorageSync('shop_supplier_id', 1) |
| | | uni.navigateTo({ |
| | | url: '/pages/shop/shop?shop_supplier_id=1' |
| | | }); |
| | |
| | | user_id: _this.businessInfo.user_id |
| | | }, function(res) { |
| | | if (res.data.list) { |
| | | uni.setStorageSync('shop_supplier_id', res.data.list.shop_supplier_id) |
| | | uni.navigateTo({ |
| | | url: '/pages/shop/shop?shop_supplier_id=' + res.data.list.shop_supplier_id |
| | | }); |
| | |
| | | if (res.code === 1) { |
| | | // 跳转到收银台支付 |
| | | uni.redirectTo({ |
| | | url: '/pages/plus/business/cashier?order_id=' + res.data.order_id + '&order_type=100' |
| | | url: '/pages/plus/business/cashier?order_id=' + res.data.order_id + |
| | | '&order_type=100' |
| | | }); |
| | | } else { |
| | | this.showError(res.msg || '支付失败'); |
| | |
| | | }, (err) => { |
| | | this.showError('支付失败,请重试'); |
| | | }); |
| | | }, |
| | | // 在线聊天 |
| | | contactWithChat() { |
| | | console.log(this.businessInfo); |
| | | if (!this.businessInfo) return; |
| | | |
| | | uni.navigateTo({ |
| | | url: `/pages/plus/business/chat/chat?user_id=${this.businessInfo.user_id}&business_card_id=${this.business_card_id}&nickName=${this.businessInfo.name}` |
| | | }); |
| | | } |
| | | }, |
| | | onShareAppMessage() { |
| | | if (this.businessInfo) { |
| | | return { |
| | | title: `${this.businessInfo.name}的电子名片`, |
| | | path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}&referee_id=${this.getUserId()}` |
| | | path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}&referee_id=${this.businessInfo.user_id}` |
| | | }; |
| | | } |
| | | return { |
| | | title: '电子名片', |
| | | path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}` |
| | | path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}&referee_id=${this.businessInfo.user_id}` |
| | | }; |
| | | }, |
| | | onShareTimeline() { |
| | | if (this.businessInfo) { |
| | | return { |
| | | title: `${this.businessInfo.name}的电子名片`, |
| | | path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}&referee_id=${this.getUserId()}` |
| | | path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}&referee_id=${this.businessInfo.user_id}` |
| | | }; |
| | | } |
| | | return { |
| | | title: '电子名片', |
| | | path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}` |
| | | path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}&referee_id=${this.businessInfo.user_id}` |
| | | }; |
| | | } |
| | | }; |
| | |
| | | flex: 1; |
| | | line-height: normal; |
| | | background: #ffffff00; |
| | | padding: 0; |
| | | |
| | | .btn-icon { |
| | | font-size: 56rpx; |
| | |
| | | font-size: 28rpx; |
| | | color: #666; |
| | | line-height: 1.6; |
| | | white-space: normal; |
| | | word-break: break-word; |
| | | word-wrap: break-word; |
| | | overflow-wrap: break-word; |
| | | overflow: hidden; |
| | | max-width: 100%; |
| | | line-height: 1.4; |
| | | } |
| | | } |
| | | } |