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>
<view class="container">
<Home v-if="globalStore.curTabIndex == 0" />
<Brand v-if="globalStore.curTabIndex == 1" />
<Integral v-if="globalStore.curTabIndex == 2" />
<My v-if="globalStore.curTabIndex == 3" />
<TabBar :curTabIndex="globalStore.curTabIndex" @tabClick="handleTabClick" />
<Home v-if="globalStore.curTabIndex == 0 && !globalStore.isWxFriendCircle" />
<Brand v-if="globalStore.curTabIndex == 1 && !globalStore.isWxFriendCircle" />
<Integral v-if="globalStore.curTabIndex == 2 && !globalStore.isWxFriendCircle" />
<My v-if="globalStore.curTabIndex == 3 && !globalStore.isWxFriendCircle" />
<TabBar v-if="!globalStore.isWxFriendCircle" :curTabIndex="globalStore.curTabIndex" @tabClick="handleTabClick" />
<WxFriendCircleSimplePage v-if="globalStore.isWxFriendCircle" />
</view>
</template>
......@@ -16,6 +17,7 @@ import Home from "@/views/Home.vue";
import Brand from "@/views/Brand.vue";
import Integral from "@/views/Integral.vue";
import My from "@/views/My.vue";
import WxFriendCircleSimplePage from "@/components/WxFriendCircleSimplePage.vue";
import { useGlobalStore } from "@/stores/global.js";
const globalStore = useGlobalStore();
......@@ -45,6 +47,12 @@ function handleTabClick({ index }) {
}
onLoad((options) => {
const optionsSync= wx.getEnterOptionsSync()
if(optionsSync.scene == '1154'){
globalStore.setIsWxFriendCircle(true)
}
console.warn('options231',options,globalStore.isWxFriendCircle)
if (options.pageType) {
switch (options.pageType) {
case "home":
......
......@@ -9,6 +9,7 @@ export const useGlobalStore = defineStore('global', {
return {
cuk: cuk, // 用户登录后获取的凭证,调用接口时headers中携带
curTabIndex: 0, // 当前Tab索引
isWxFriendCircle:false
};
},
actions: {
......@@ -26,6 +27,15 @@ export const useGlobalStore = defineStore('global', {
*/
setCurTabIndex(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