|
|
|
@@ -22,12 +22,12 @@ |
|
|
|
<view @click="downloadImg" class="uploadBtn">
|
|
|
|
<text>下载照片</text>
|
|
|
|
</view>
|
|
|
|
<view class="grayBtn" @click="photoSupper">
|
|
|
|
<!-- <view v-if="supperPhotoState == 0 || supperPhotoState == 3" class="free">
|
|
|
|
<!-- <view class="grayBtn" @click="photoSupper">
|
|
|
|
<view v-if="supperPhotoState == 0 || supperPhotoState == 3" class="free">
|
|
|
|
<text>耗金币1枚</text>
|
|
|
|
</view> -->
|
|
|
|
</view>
|
|
|
|
{{ supperTips() }}
|
|
|
|
</view>
|
|
|
|
</view> -->
|
|
|
|
<!-- 底部 -->
|
|
|
|
<view class="bottomBox">
|
|
|
|
<view class="tips">
|
|
|
|
@@ -39,15 +39,17 @@ |
|
|
|
</view>
|
|
|
|
<!-- 画报 -->
|
|
|
|
<view v-if="showPictorial" class="pictorialBox">
|
|
|
|
<image :src="pictorialUrl" mode="scaleToFill" />
|
|
|
|
<image show-menu-by-longpress :src="pictorialUrl" mode="scaleToFill" />
|
|
|
|
<text>长按保存、分享、收藏</text>
|
|
|
|
<view class="orangeBtn" @click="showPictorial = fales">关闭</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
// import myloading from '../../components/myLoading.vue'
|
|
|
|
//#region 导入
|
|
|
|
import { onLoad, onShareAppMessage, onShareTimeline } from "@dcloudio/uni-app";
|
|
|
|
import { BASE_URL } from "../../utils/request";
|
|
|
|
import { ref, reactive, watch } from "vue";
|
|
|
|
import { userInfoModules } from "@/store/modules/userInfo";
|
|
|
|
import {
|
|
|
|
@@ -337,9 +339,11 @@ async function getUserQrcode() { |
|
|
|
};
|
|
|
|
const res = await getUserQrcodeApi(data);
|
|
|
|
if (res.code == 200) {
|
|
|
|
uni.arrayBufferToBase64(res.data, (base64) => {
|
|
|
|
pictorialUrl.value = "data:image/jpeg;base64," + base64; // 在前面加上正确的图片格式
|
|
|
|
});
|
|
|
|
pictorialUrl.value = `data:image/png;base64,${res.data}`;
|
|
|
|
// ${uni.arrayBufferToBase64(
|
|
|
|
// res.data
|
|
|
|
// )}
|
|
|
|
console.log(pictorialUrl.value);
|
|
|
|
showPictorial.value = true;
|
|
|
|
} else {
|
|
|
|
uni.showToast({
|
|
|
|
@@ -369,11 +373,12 @@ async function getUserQrcode() { |
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
.page {
|
|
|
|
padding: 0 30rpx;
|
|
|
|
background-color: rgba(24, 25, 26, 1);
|
|
|
|
}
|
|
|
|
// 轮播图
|
|
|
|
.u-swiper {
|
|
|
|
margin-top: 40rpx;
|
|
|
|
margin-top: 70rpx;
|
|
|
|
width: 540rpx;
|
|
|
|
height: 720rpx !important;
|
|
|
|
border-radius: 50rpx;
|
|
|
|
@@ -406,6 +411,7 @@ async function getUserQrcode() { |
|
|
|
.uploadBtn {
|
|
|
|
position: relative;
|
|
|
|
margin-top: 100rpx;
|
|
|
|
margin-bottom: 200rpx;
|
|
|
|
width: 520rpx;
|
|
|
|
height: 100rpx;
|
|
|
|
line-height: 100rpx;
|
|
|
|
@@ -466,13 +472,13 @@ async function getUserQrcode() { |
|
|
|
}
|
|
|
|
|
|
|
|
.bottomBox {
|
|
|
|
flex: 1;
|
|
|
|
position: relative;
|
|
|
|
bottom: -30rpx;
|
|
|
|
// flex: 1;
|
|
|
|
position: absolute;
|
|
|
|
bottom: 60rpx;
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
padding: 65rpx 10rpx 0;
|
|
|
|
padding: 65rpx 40rpx 0;
|
|
|
|
.tips {
|
|
|
|
position: absolute;
|
|
|
|
top: 0rpx;
|
|
|
|
@@ -502,12 +508,20 @@ async function getUserQrcode() { |
|
|
|
.pictorialBox {
|
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
height: 100vh;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
background-color: rgba($color: #000000, $alpha: 0.9);
|
|
|
|
image {
|
|
|
|
margin-top: 80rpx;
|
|
|
|
width: 630rpx;
|
|
|
|
height: 940rpx;
|
|
|
|
border-radius: 24rpx;
|
|
|
|
margin-bottom: 50rpx;
|
|
|
|
}
|
|
|
|
text {
|
|
|
|
margin-bottom: 30rpx;
|
|
|
|
}
|
|
|
|
z-index: 9;
|
|
|
|
}
|
|
|
|
|