Commit 101b0112 authored by spc's avatar spc

'分享朋友圈单页修改'

parent fbc88345
<template>
<view class="Layer-wx-friend-circle-simple-page">
<image class="bg" :src="$baseUrl + 'wxFriendCircleSimplePage/wxFriendCircleBg.png'"></image>
</view>
</template>
<script setup>
</script>
<style lang="less" scoped>
.Layer-wx-friend-circle-simple-page {
width: 750rpx;
height: 100vh;
top: 0rpx;
left: 0rpx;
overflow: hidden;
position: absolute;
.bg {
width: 750rpx;
height: 1624rpx;
bottom: 0rpx;
position: absolute;
}
}
</style>
\ No newline at end of file
<template> <template>
<view class="container"> <view class="container">
<Home v-if="globalStore.curTabIndex == 0" /> <Home v-if="globalStore.curTabIndex == 0 && !globalStore.isWxFriendCircle" />
<Brand v-if="globalStore.curTabIndex == 1" /> <Brand v-if="globalStore.curTabIndex == 1 && !globalStore.isWxFriendCircle" />
<Integral v-if="globalStore.curTabIndex == 2" /> <Integral v-if="globalStore.curTabIndex == 2 && !globalStore.isWxFriendCircle" />
<My v-if="globalStore.curTabIndex == 3" /> <My v-if="globalStore.curTabIndex == 3 && !globalStore.isWxFriendCircle" />
<TabBar :curTabIndex="globalStore.curTabIndex" @tabClick="handleTabClick" /> <TabBar v-if="!globalStore.isWxFriendCircle" :curTabIndex="globalStore.curTabIndex" @tabClick="handleTabClick" />
<WxFriendCircleSimplePage v-if="globalStore.isWxFriendCircle" />
</view> </view>
</template> </template>
...@@ -16,6 +17,7 @@ import Home from "@/views/Home.vue"; ...@@ -16,6 +17,7 @@ import Home from "@/views/Home.vue";
import Brand from "@/views/Brand.vue"; import Brand from "@/views/Brand.vue";
import Integral from "@/views/Integral.vue"; import Integral from "@/views/Integral.vue";
import My from "@/views/My.vue"; import My from "@/views/My.vue";
import WxFriendCircleSimplePage from "@/components/WxFriendCircleSimplePage.vue";
import { useGlobalStore } from "@/stores/global.js"; import { useGlobalStore } from "@/stores/global.js";
const globalStore = useGlobalStore(); const globalStore = useGlobalStore();
...@@ -45,6 +47,12 @@ function handleTabClick({ index }) { ...@@ -45,6 +47,12 @@ function handleTabClick({ index }) {
} }
onLoad((options) => { onLoad((options) => {
const optionsSync= wx.getEnterOptionsSync()
if(optionsSync.scene == '1154'){
globalStore.setIsWxFriendCircle(true)
}
console.warn('options231',options,globalStore.isWxFriendCircle)
if (options.pageType) { if (options.pageType) {
switch (options.pageType) { switch (options.pageType) {
case "home": case "home":
......
...@@ -9,6 +9,7 @@ export const useGlobalStore = defineStore('global', { ...@@ -9,6 +9,7 @@ export const useGlobalStore = defineStore('global', {
return { return {
cuk: cuk, // 用户登录后获取的凭证,调用接口时headers中携带 cuk: cuk, // 用户登录后获取的凭证,调用接口时headers中携带
curTabIndex: 0, // 当前Tab索引 curTabIndex: 0, // 当前Tab索引
isWxFriendCircle:false
}; };
}, },
actions: { actions: {
...@@ -26,6 +27,15 @@ export const useGlobalStore = defineStore('global', { ...@@ -26,6 +27,15 @@ export const useGlobalStore = defineStore('global', {
*/ */
setCurTabIndex(index) { setCurTabIndex(index) {
this.curTabIndex = index; this.curTabIndex = index;
},
/**
* 设置当前是否是小程序朋友圈单页环境
* @param {boolean} v
*/
setIsWxFriendCircle(v){
this.isWxFriendCircle = v
} }
}, },
}); });
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment