12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <template>
- <view style="border-top: 1px solid #cfcfcf;">
- <u-list>
- <view v-if="!list">
- <image style="margin: 0 auto; width: 100%;" src="../../static/img/page/empty_view.png"></image>
- </view>
- <u-list-item v-for="(item, index) in list" :key="index" @click="downLoad(item.link)">
- <view @click="downLoad(item.link)">
- <u-row style="border-bottom: 1px solid #cfcfcf;">
- <view>
- <u-image :src="url+item.imgPath" width="120px" height="90px" style="margin: 7px;">
- </u-image>
- </view>
- <view>
- <u-text :text="item.text" mode="text" :lines="3" size="18">
- </u-text>
- <view style="padding: 20px 0 0 0;">
- <u-text :text="item.updateTime" mode="text" color="#b1b1b1" size="14">
- </u-text>
- </view>
- </view>
- </u-col>
- </u-row>
- </view>
- </u-list-item>
- </u-list>
- </view>
- </template>
- <script>
- export default {
- props: {
- list: {
- type: Array,
- default: () => []
- },
- url: {
- type: String,
- }
- },
- name: "homelist",
- data() {
- return {
- baseURL: uni.$BASE_URL
- };
- },
- methods: {
- // 打开自定义链接
- openCustomLink(link = '') {
- console.log(`link: ${link}`)
- window.location.href = "https://" + link
- },
- downLoad(item) {
- if (item) {
- let url = encodeURIComponent(item)
- uni.navigateTo({
- url: '../../pages/home/myWebView?url=' + url
- })
- }
- },
- }
- }
- </script>
- <style>
- </style>
|