| | |
| | | <template> |
| | | <view> |
| | | <header-bar title="名片详情" :isBack="true" @click="back"></header-bar> |
| | | <scroll-view scroll-y="true" class="scroll-view"> |
| | | <view class="card-container" v-if="businessInfo"> |
| | | <!-- 名片主体 --> |
| | | <view class="business-card"> |
| | | <view class="business-card" @click="viewCard"> |
| | | <image class="card-image" :src="businessInfo.mp" mode="widthFix"></image> |
| | | </view> |
| | | |
| | |
| | | <text class="btn-icon">📍</text> |
| | | <text class="btn-text">导航地址</text> |
| | | </view> |
| | | <view class="action-btn" @click="shareCard"> |
| | | <button open-type="share" class="action-btn"> |
| | | <text class="btn-icon">➤</text> |
| | | <text class="btn-text">分享名片</text> |
| | | </view> |
| | | </button> |
| | | </view> |
| | | |
| | | <!-- 名片简介 --> |
| | |
| | | <!-- 数字资产卡片 --> |
| | | <view class="asset-cards"> |
| | | <view class="asset-card" @click="goToPlatform"> |
| | | <image class="asset-img" src="/static/background_top.png" mode="aspectFill"></image> |
| | | <image class="asset-img" :src="background.digital_asset_1" mode="aspectFill"></image> |
| | | </view> |
| | | <view class="asset-card" @click="goToShop"> |
| | | <image class="asset-img" src="/static/haggle.png" mode="aspectFill"></image> |
| | | <image class="asset-img" :src="background.digital_asset_2" mode="aspectFill"></image> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | v-if="businessInfo.duties && businessInfo.duties.length > 0">{{ businessInfo.duties[0] }}</text> |
| | | <text class="price">¥{{ businessInfo.grade.price }}</text> |
| | | </view> |
| | | <!-- <view class="payment-methods"> |
| | | <view class="method-item" :class="{ active: paymentMethod === 'balance' }" |
| | | @tap="selectPaymentMethod('balance')"> |
| | | <text class="method-name">联盟币支付</text> |
| | | <text class="iconfont icon-check" v-if="paymentMethod === 'balance'"></text> |
| | | </view> |
| | | <view class="method-item" :class="{ active: paymentMethod === 'wechat' }" |
| | | @tap="selectPaymentMethod('wechat')"> |
| | | <text class="method-name">微信支付</text> |
| | | <text class="iconfont icon-check" v-if="paymentMethod === 'wechat'"></text> |
| | | </view> |
| | | </view> --> |
| | | <view class="modal-footer"> |
| | | <view class="cancel-btn" @tap="closePaymentModal">取消</view> |
| | | <view class="confirm-btn" @tap="confirmPayment">确认</view> |
| | |
| | | // 支付相关 |
| | | showPayment: false, |
| | | selectedGrade: {}, |
| | | paymentMethod: 'balance' |
| | | paymentMethod: 'balance', |
| | | background: {} |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | |
| | | // 记录访问日志 |
| | | this.recordVisit(); |
| | | } |
| | | this.getSettingBackground() |
| | | }, |
| | | methods: { |
| | | back() { |
| | | uni.navigateBack(); |
| | | }, |
| | | viewCard() { |
| | | let _this = this |
| | | // 预览图片 |
| | | uni.previewImage({ |
| | | urls: [_this.businessInfo.mp], |
| | | complete: function(res) { |
| | | console.log(res); |
| | | } |
| | | }) |
| | | }, |
| | | getSettingBackground() { |
| | | let _this = this; |
| | | _this._post('plus.business.setting/getBackground', {}, function(res) { |
| | | _this.background = res.data |
| | | }) |
| | | }, |
| | | // 获取名片详情 |
| | | getBusinessDetail() { |
| | |
| | | }, function(res) { |
| | | _this.businessInfo = res.data; |
| | | _this.loading = false; |
| | | |
| | | // 设置默认选中的等级 |
| | | if (_this.businessInfo.grade && _this.businessInfo.grade.length > 0) { |
| | | _this.selectedGrade = _this.businessInfo.grade; |
| | |
| | | }, |
| | | // 打开地图 |
| | | openLocation(businessInfo) { |
| | | let address = businessInfo.region.province + ' ' + businessInfo.region.city + ' ' + businessInfo.region.region + ' ' + businessInfo.address |
| | | let address = businessInfo.region.province + ' ' + businessInfo.region.city + ' ' + businessInfo.region |
| | | .region + ' ' + businessInfo.address |
| | | if (!address) { |
| | | this.showError('暂无地址信息'); |
| | | return; |
| | |
| | | // 跳转到店铺 |
| | | goToShop() { |
| | | let _this=this; |
| | | _this._post('store.store/getUserStore', {user_id:_this.businessInfo.user_id}, function(res) { |
| | | _this._post('store.store/getUserStore', { |
| | | user_id: _this.businessInfo.user_id |
| | | }, function(res) { |
| | | if(res.data.list){ |
| | | uni.navigateTo({ |
| | | url: '/pages/shop/shop?shop_supplier_id='+res.data.list.shop_supplier_id |
| | |
| | | // 新建数字名片 |
| | | createNewCard() { |
| | | uni.navigateTo({ |
| | | url: '/pages/plus/business/create' |
| | | url: '/pages/plus/business/add' |
| | | }); |
| | | }, |
| | | // 购买名片 |
| | |
| | | onShareAppMessage() { |
| | | if (this.businessInfo) { |
| | | return { |
| | | title: `${this.businessInfo.real_name}的电子名片`, |
| | | title: `${this.businessInfo.name}的电子名片`, |
| | | path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}&referee_id=${this.getUserId()}` |
| | | }; |
| | | } |
| | |
| | | onShareTimeline() { |
| | | if (this.businessInfo) { |
| | | return { |
| | | title: `${this.businessInfo.real_name}的电子名片`, |
| | | title: `${this.businessInfo.name}的电子名片`, |
| | | path: `/pages/plus/business/detail?business_card_id=${this.business_card_id}&referee_id=${this.getUserId()}` |
| | | }; |
| | | } |
| | |
| | | flex-direction: column; |
| | | align-items: center; |
| | | flex: 1; |
| | | line-height: normal; |
| | | background: #ffffff00; |
| | | |
| | | .btn-icon { |
| | | font-size: 56rpx; |