|
@@ -15,6 +15,7 @@
|
|
<u-grid-item
|
|
<u-grid-item
|
|
v-for="(baseListItem,baseListIndex) in baseList"
|
|
v-for="(baseListItem,baseListIndex) in baseList"
|
|
:key="baseListIndex"
|
|
:key="baseListIndex"
|
|
|
|
+ @click="onItemClick(baseListItem)"
|
|
>
|
|
>
|
|
<view class="grid-item-icon" :style="[baseListItem.style]">
|
|
<view class="grid-item-icon" :style="[baseListItem.style]">
|
|
<image :src="baseListItem.icon"></image>
|
|
<image :src="baseListItem.icon"></image>
|
|
@@ -40,11 +41,10 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { fetchContentInfo } from '@/common/api';
|
|
|
|
|
|
+import { fetchContentInfo, fetchMsgList, fetchViewCfgList } from '@/common/api';
|
|
|
|
+import { COMP_CODE } from '@/common/EnumConst';
|
|
import ItemList from '@/components/ItemList/index.vue';
|
|
import ItemList from '@/components/ItemList/index.vue';
|
|
import { getImageUrl } from '@/util';
|
|
import { getImageUrl } from '@/util';
|
|
-import { fetchMsgList, fetchViewCfgList } from '@/common/api';
|
|
|
|
-import { COMP_CODE } from '@/common/EnumConst';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -119,6 +119,7 @@ export default {
|
|
icon: getImageUrl(item.iconUri),
|
|
icon: getImageUrl(item.iconUri),
|
|
style: JSON.parse(item.style),
|
|
style: JSON.parse(item.style),
|
|
title: item.labelTxt,
|
|
title: item.labelTxt,
|
|
|
|
+ url: item.url,
|
|
};
|
|
};
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -128,6 +129,13 @@ export default {
|
|
url: `/pages/tabbar/news/index?keyword=${val}`,
|
|
url: `/pages/tabbar/news/index?keyword=${val}`,
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ onItemClick(item) {
|
|
|
|
+ if (item.url) {
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: item.url,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
onShareAppMessage() {
|
|
onShareAppMessage() {
|
|
return {
|
|
return {
|