Browse Source

upload

master
HolyKnightIX 1 year ago
parent
commit
3812011ad7
2 changed files with 44 additions and 1 deletions
  1. +10
    -0
      src/pages/lookPhoto/index.vue
  2. +34
    -1
      src/pages/uploadPhoto/success.vue

+ 10
- 0
src/pages/lookPhoto/index.vue View File

@@ -172,6 +172,11 @@ function previewImage(index) {
//#region 分享
function share() {
uni.showToast({
title: "敬请期待!",
icon: "none",
});
return;
uni.share({
provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
scene: "WXSenceTimeline", //WXSceneSession(分享到聊天界面)、WXSenceTimeline(分享到朋友圈)、WXSceneFavorite(分享到微信收藏)
@@ -195,6 +200,11 @@ function share() {
});
}
function inviteFriend() {
uni.showToast({
title: "敬请期待!",
icon: "none",
});
return;
uni.share({
provider: "weixin", //分享服务提供商(即weixin|qq|sinaweibo)
scene: "WXSceneSession", //WXSceneSession(分享到聊天界面)、WXSenceTimeline(分享到朋友圈)、WXSceneFavorite(分享到微信收藏)


+ 34
- 1
src/pages/uploadPhoto/success.vue View File

@@ -18,7 +18,7 @@
/>
</view>
<text class="woo">WOO!</text>
<text class="extol">您的颜值打败了全国99%的用户</text>
<text class="extol">您的颜值打败了全国{{ randomNum }}%的用户</text>
<!-- 底部盒子 -->
<view class="bottomBox">
<view
@@ -40,12 +40,14 @@ import { ref, reactive } from "vue";
import { voiceTotalApi } from "../../api/login.js";
import { userInfoModules } from "@/store/modules/userInfo";
import imageCompression from "browser-image-compression"; //压缩图片插件
import { onShow } from "@dcloudio/uni-app";
//#endregion
const userInfoModulesPinia = userInfoModules();

//#region 上传
const uploadState = ref(3); //上传状态
const showImgUrl = ref(null);
const randomNum = ref("");

function router(url) {
uni.switchTab({
@@ -58,9 +60,15 @@ function router2(url) {
});
}

function getRandomRange() {
randomNum.value = Math.floor(Math.random() * (100 - 81)) + 80;
}
//#endregion ---------------------

//#region
onShow(() => {
getRandomRange();
});

//#endregion ---------------------
</script>
@@ -104,8 +112,33 @@ function router2(url) {
right: -80rpx;
width: 165rpx;
height: 165rpx;
animation: getin 0.8s ease-in forwards;
transition: all 0.3s;
}
}

@keyframes getin {
0% {
transform: scale(5);
opacity: 0.3;
}

25% {
transform: scale(4);
opacity: 0.4;
}

50% {
transform: scale(0.8);
opacity: 0.5;
}

100% {
transform: scale(1);
opacity: 1;
}
}

.woo {
margin-top: 55rpx;
margin-bottom: 30rpx;


Loading…
Cancel
Save