|
|
@@ -8,14 +8,14 @@
|
|
|
</view>
|
|
|
<text class="app-name">{{appName}}</text>
|
|
|
</view>
|
|
|
- <!-- 隐藏的 Canvas 用于生成名片快照 -->
|
|
|
- <canvas id="posterCanvas" type="2d"
|
|
|
- style="position: fixed; left: -9999px; top: -9999px; width: 750px; height: 780px;"></canvas>
|
|
|
-
|
|
|
- <!-- 隐藏的 Canvas 用于生成二维码海报 -->
|
|
|
- <view class="hidden-canvas-box">
|
|
|
- <canvas id="qrPosterCanvas" type="2d" style="width: 600px; height: 700px;"></canvas>
|
|
|
- </view>
|
|
|
+ <!-- 隐藏的 Canvas 用于生成名片快照 -->
|
|
|
+ <canvas id="posterCanvas" type="2d"
|
|
|
+ style="position: fixed; left: -9999px; top: -9999px; width: 750px; height: 780px;"></canvas>
|
|
|
+
|
|
|
+ <!-- 隐藏的 Canvas 用于生成二维码海报 -->
|
|
|
+ <view class="hidden-canvas-box">
|
|
|
+ <canvas id="qrPosterCanvas" type="2d" style="width: 600px; height: 700px;"></canvas>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -39,20 +39,21 @@
|
|
|
getCurrentConfig
|
|
|
} from '@/config/index.js'
|
|
|
let appName = ref('')
|
|
|
- // 页面加载
|
|
|
|
|
|
+ // 页面加载
|
|
|
onMounted(async () => {
|
|
|
const config = await getCurrentConfig()
|
|
|
appName.value = config.appName
|
|
|
})
|
|
|
+
|
|
|
onLoad((options) => {
|
|
|
- initApp(options?.userId)
|
|
|
+ initApp(options?.userId, options?.currentIndex)
|
|
|
})
|
|
|
|
|
|
/**
|
|
|
* 初始化应用
|
|
|
*/
|
|
|
- const initApp = async (userId = null) => {
|
|
|
+ const initApp = async (userId = null, currentIndex=0) => {
|
|
|
try {
|
|
|
const loginToggle = isLogin() || !!userId
|
|
|
if (!loginToggle) {
|
|
|
@@ -64,10 +65,11 @@
|
|
|
}
|
|
|
if (loginToggle) {
|
|
|
await userStore.queryCardInfo(userId)
|
|
|
- await userStore.queryCompanyInfo(userId)
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
+ // 如果有 currentIndex 参数,在数据加载完成后设置索引
|
|
|
+ if (currentIndex !== undefined) {
|
|
|
+ userStore.setCurrentIndex(Number(currentIndex))
|
|
|
+ }
|
|
|
await userStore.queryCardPoster()
|
|
|
- // #ifdef
|
|
|
uni.reLaunch({
|
|
|
url: !!userId ? '/pages/mine/userCard' : '/pages/index/index'
|
|
|
})
|
|
|
@@ -120,6 +122,7 @@
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
border: 1px solid #F1F1F1;
|
|
|
+
|
|
|
&::after {
|
|
|
content: '';
|
|
|
position: absolute;
|
|
|
@@ -129,10 +132,10 @@
|
|
|
bottom: -6rpx;
|
|
|
border-radius: 50%;
|
|
|
background: linear-gradient(135deg,
|
|
|
- rgba(255, 255, 255, 0.6) 0%,
|
|
|
- rgba(255, 255, 255, 0) 40%,
|
|
|
- rgba(255, 255, 255, 0) 60%,
|
|
|
- rgba(255, 255, 255, 0.2) 100%);
|
|
|
+ rgba(255, 255, 255, 0.6) 0%,
|
|
|
+ rgba(255, 255, 255, 0) 40%,
|
|
|
+ rgba(255, 255, 255, 0) 60%,
|
|
|
+ rgba(255, 255, 255, 0.2) 100%);
|
|
|
pointer-events: none;
|
|
|
z-index: 2;
|
|
|
}
|
|
|
@@ -156,14 +159,12 @@
|
|
|
left: -50%;
|
|
|
width: 200%;
|
|
|
height: 200%;
|
|
|
- background: linear-gradient(
|
|
|
- 135deg,
|
|
|
- transparent 0%,
|
|
|
- transparent 35%,
|
|
|
- rgba(255, 255, 255, 0.5) 45%,
|
|
|
- transparent 55%,
|
|
|
- transparent 100%
|
|
|
- );
|
|
|
+ background: linear-gradient(135deg,
|
|
|
+ transparent 0%,
|
|
|
+ transparent 35%,
|
|
|
+ rgba(255, 255, 255, 0.5) 45%,
|
|
|
+ transparent 55%,
|
|
|
+ transparent 100%);
|
|
|
animation: shineSweep 2s ease-in-out infinite;
|
|
|
}
|
|
|
}
|
|
|
@@ -215,6 +216,7 @@
|
|
|
0% {
|
|
|
transform: rotate(0deg);
|
|
|
}
|
|
|
+
|
|
|
100% {
|
|
|
transform: rotate(360deg);
|
|
|
}
|
|
|
@@ -224,12 +226,15 @@
|
|
|
0% {
|
|
|
transform: translateX(-100%) translateY(-100%) rotate(-20deg);
|
|
|
}
|
|
|
+
|
|
|
20% {
|
|
|
transform: translateX(0%) translateY(0%) rotate(-20deg);
|
|
|
}
|
|
|
+
|
|
|
40% {
|
|
|
transform: translateX(100%) translateY(100%) rotate(-20deg);
|
|
|
}
|
|
|
+
|
|
|
100% {
|
|
|
transform: translateX(100%) translateY(100%) rotate(-20deg);
|
|
|
}
|
|
|
@@ -244,4 +249,4 @@
|
|
|
height: 1px;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|