|
@ -1,22 +1,24 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="promo-modal-page"> |
|
|
<view class="promo-modal-page"> |
|
|
<!-- 顶部导航栏 --> |
|
|
<!-- 顶部导航栏 --> |
|
|
<view class="nav-bar"> |
|
|
|
|
|
|
|
|
<!-- <view class="nav-bar"> |
|
|
<view class="back" @tap="navigateBack"> |
|
|
<view class="back" @tap="navigateBack"> |
|
|
<uni-icons type="left" size="20" /> |
|
|
<uni-icons type="left" size="20" /> |
|
|
</view> |
|
|
</view> |
|
|
<text class="title">推广链接</text> |
|
|
<text class="title">推广链接</text> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> --> |
|
|
|
|
|
<navbar title="推广链接" leftClick |
|
|
|
|
|
@leftClick="$utils.navigateBack" /> |
|
|
|
|
|
|
|
|
<!-- 页面内容 --> |
|
|
<!-- 页面内容 --> |
|
|
<view class="content"> |
|
|
<view class="content"> |
|
|
<!-- 用户信息 --> |
|
|
<!-- 用户信息 --> |
|
|
<view class="user-info-modal"> |
|
|
|
|
|
|
|
|
<!-- <view class="user-info-modal"> |
|
|
<view class="avatar-frame"> |
|
|
<view class="avatar-frame"> |
|
|
<image class="avatar-img" :src="userInfo.headImage || '/static/avatar.png'" mode="aspectFill" /> |
|
|
<image class="avatar-img" :src="userInfo.headImage || '/static/avatar.png'" mode="aspectFill" /> |
|
|
</view> |
|
|
</view> |
|
|
<view class="nickname">{{ userInfo.nickName || '用户' }}</view> |
|
|
<view class="nickname">{{ userInfo.nickName || '用户' }}</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> --> |
|
|
<!-- 二维码区 --> |
|
|
<!-- 二维码区 --> |
|
|
<view class="qrcode-modal-section"> |
|
|
<view class="qrcode-modal-section"> |
|
|
<image class="qrcode-img" :src="qrcodeUrl" mode="widthFix" /> |
|
|
<image class="qrcode-img" :src="qrcodeUrl" mode="widthFix" /> |
|
@ -33,9 +35,12 @@ |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import pullRefreshMixin from '@/pages/mixins/pullRefreshMixin.js' |
|
|
import pullRefreshMixin from '@/pages/mixins/pullRefreshMixin.js' |
|
|
import config from '@/api/config.js' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import config from '@/config.js' |
|
|
|
|
|
import navbar from '@/compoent/base/navbar.vue' |
|
|
export default { |
|
|
export default { |
|
|
|
|
|
components : { |
|
|
|
|
|
navbar |
|
|
|
|
|
}, |
|
|
mixins: [pullRefreshMixin], |
|
|
mixins: [pullRefreshMixin], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -97,15 +102,24 @@ export default { |
|
|
this.qrcodeUrl = getApp().globalData.qr_path |
|
|
this.qrcodeUrl = getApp().globalData.qr_path |
|
|
} else { |
|
|
} else { |
|
|
console.log('全局二维码路径不存在') |
|
|
console.log('全局二维码路径不存在') |
|
|
|
|
|
|
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: '拼命绘画中...' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
uni.getImageInfo({ |
|
|
uni.getImageInfo({ |
|
|
src: `${config.baseUrl}/recycle-admin/applet/promotion/getInviteCode?token=${uni.getStorageSync('token')}`, |
|
|
src: `${config.baseUrl}/recycle-admin/applet/promotion/getInviteCode?token=${uni.getStorageSync('token')}`, |
|
|
success: res => { |
|
|
success: res => { |
|
|
|
|
|
console.log(res); |
|
|
getApp().globalData.qr_path = res.path |
|
|
getApp().globalData.qr_path = res.path |
|
|
console.log(getApp().globalData.qr_path, 'qr_path') |
|
|
console.log(getApp().globalData.qr_path, 'qr_path') |
|
|
this.qrcodeUrl = getApp().globalData.qr_path |
|
|
|
|
|
|
|
|
this.qrcodeUrl = res.path |
|
|
}, |
|
|
}, |
|
|
fail: err => { |
|
|
fail: err => { |
|
|
console.log('QR code load failed:', err) |
|
|
console.log('QR code load failed:', err) |
|
|
|
|
|
}, |
|
|
|
|
|
complete() { |
|
|
|
|
|
uni.hideLoading() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
@ -177,9 +191,8 @@ export default { |
|
|
.promo-modal-page { |
|
|
.promo-modal-page { |
|
|
min-height: 100vh; |
|
|
min-height: 100vh; |
|
|
background: #f8f8f8; |
|
|
background: #f8f8f8; |
|
|
padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); |
|
|
|
|
|
|
|
|
// padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
height: 100vh; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.nav-bar { |
|
|
.nav-bar { |
|
@ -211,8 +224,9 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.content { |
|
|
.content { |
|
|
padding: 30rpx 0 0 0; |
|
|
|
|
|
margin-top: calc(150rpx + var(--status-bar-height) + 80rpx); |
|
|
|
|
|
|
|
|
// padding: 30rpx 0 0 0; |
|
|
|
|
|
padding: 20rpx; |
|
|
|
|
|
// margin-top: calc(150rpx + var(--status-bar-height) + 80rpx); |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
@ -252,7 +266,7 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.qrcode-modal-section { |
|
|
.qrcode-modal-section { |
|
|
width: 300rpx; |
|
|
|
|
|
|
|
|
width: 100%; |
|
|
display: flex; |
|
|
display: flex; |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|