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