12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <template>
- <view>
- <modeBaseMine v-if="modeType == 'base'" ref="modeBaseMine"></modeBaseMine>
- <modeCareMine v-if="modeType == 'care'" ref="modeCareMine"></modeCareMine>
- </view>
- </template>
- <script>
- import modeBaseMine from '@/pages/BaseTabBar/Mine.vue'
- import modeCareMine from '@/pages/CareTabBar/Mine.vue'
- var that;
- export default {
- data() {
- return {
- modeType: ''
- }
- },
- components:{
- modeBaseMine,
- modeCareMine
- },
- onLoad(option) {
- that = this;
- that.modeType = uni.getStorageSync('modeType') || 'base';
- that.$nextTick(function() {
- if (that.modeType == 'base'){
- that.$refs.modeBaseMine.getData(option);
- }else if (that.modeType == 'care'){
- that.$refs.modeCareMine.getData(option);
- }
- })
- },
- onShow(){
- that.$nextTick(function() {
- if (that.modeType == 'base'){
- that.$refs.modeBaseMine.init();
- }else if (that.modeType == 'care'){
- that.$refs.modeCareMine.init();
- }
- })
- }
- }
- </script>
|