|
@@ -23,18 +23,44 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <CustomTabBar></CustomTabBar>
|
|
|
+ <CustomTabBar :cardId="cardId" :nianji="nianji" :zhangId="zhangId"></CustomTabBar>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+ import {onLoad} from '@dcloudio/uni-app';
|
|
|
+ import {ref} from "vue";
|
|
|
import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
|
|
|
+ import cacheManager from '@/utils/cacheManager.js';
|
|
|
+ const zhangId = ref(null);
|
|
|
+ const nianji = ref(null);
|
|
|
+ const cardId = ref(null);
|
|
|
+ let routerOpt = ref(false);
|
|
|
+
|
|
|
// 关于我们
|
|
|
function handleBack(){
|
|
|
- uni.redirectTo({
|
|
|
- url: '/pages/my/index'
|
|
|
- });
|
|
|
- }
|
|
|
+ if(cacheManager.get('auth')){
|
|
|
+ // 非游客
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/my/index'
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ // 游客
|
|
|
+ uni.redirectTo({
|
|
|
+ url: `/pages/my/index?nianji=${routerOpt.nianji}&cardId=${routerOpt.cardId}&zhangId=${routerOpt.zhangId}`
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ onLoad((options) => {
|
|
|
+ if(options){
|
|
|
+ routerOpt = options;
|
|
|
+ zhangId.value = options.zhangId
|
|
|
+ nianji.value = options.nianji
|
|
|
+ cardId.value = options.cardId
|
|
|
+ }
|
|
|
+ })
|
|
|
</script>
|
|
|
|
|
|
<style>
|