瀏覽代碼

upload

master
HolyKnightIX 1 年之前
父節點
當前提交
3812011ad7
共有 2 個文件被更改,包括 44 次插入1 次删除
  1. +10
    -0
      src/pages/lookPhoto/index.vue
  2. +34
    -1
      src/pages/uploadPhoto/success.vue

+ 10
- 0
src/pages/lookPhoto/index.vue 查看文件

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


+ 34
- 1
src/pages/uploadPhoto/success.vue 查看文件

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


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


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


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


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


//#endregion --------------------- //#endregion ---------------------
</script> </script>
@@ -104,8 +112,33 @@ function router2(url) {
right: -80rpx; right: -80rpx;
width: 165rpx; width: 165rpx;
height: 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 { .woo {
margin-top: 55rpx; margin-top: 55rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;


Loading…
取消
儲存