diff --git a/project/sass/apps/Announce/AppAnnounce/components/Phone.vue b/project/sass/apps/Announce/AppAnnounce/components/Phone.vue
index d92054f6..06fb7fc2 100644
--- a/project/sass/apps/Announce/AppAnnounce/components/Phone.vue
+++ b/project/sass/apps/Announce/AppAnnounce/components/Phone.vue
@@ -31,7 +31,7 @@
{{ item.name }}
{{ item.fileSizeStr }}
-
+
{{ item.linkTitle }}
@@ -68,6 +68,38 @@
}
}
},
+
+ methods: {
+ mapIcon (fileName) {
+ if (['.zip', '.rar'].indexOf(this.getExtension(fileName)) !== -1) {
+ return 'https://cdn.cunwuyun.cn/dvcp/announce/zip.png'
+ }
+
+ if (['.doc', '.docx'].indexOf(this.getExtension(fileName)) !== -1) {
+ return 'https://cdn.cunwuyun.cn/dvcp/announce/world.png'
+ }
+
+ if (['.xls', '.xlsx'].indexOf(this.getExtension(fileName)) !== -1) {
+ return 'https://cdn.cunwuyun.cn/dvcp/announce/xls.png'
+ }
+
+ if (['.txt'].indexOf(this.getExtension(fileName)) !== -1) {
+ return 'https://cdn.cunwuyun.cn/dvcp/announce/txt.png'
+ }
+
+ if (['.pdf'].indexOf(this.getExtension(fileName)) !== -1) {
+ return 'https://cdn.cunwuyun.cn/dvcp/announce/pdf.png'
+ }
+
+ if (['.ppt', '.pptx'].indexOf(this.getExtension(fileName)) !== -1) {
+ return 'https://cdn.cunwuyun.cn/dvcp/announce/ppt.png'
+ }
+ },
+
+ getExtension(name) {
+ return name.substring(name.lastIndexOf('.'))
+ }
+ }
}