askbot-dragon 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
package/public/index.html CHANGED
@@ -10,7 +10,7 @@
10
10
  <!-- 项目图标 -->
11
11
  <link rel="stylesheet" href="//at.alicdn.com/t/font_1566110_3hu6pyd938i.css"/>
12
12
  <!-- guoran图标 -->
13
- <link rel="stylesheet" href="//at.alicdn.com/t/font_2913049_aukej8oi7nm.css"/>
13
+ <link rel="stylesheet" href="//at.alicdn.com/t/c/font_2913049_v0wnepni1r.css"/>
14
14
  <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
15
15
  <script src="https://static.guoranbot.com/ckeditor5-build-classic/0.3.7/build/ckeditor.js"></script>
16
16
 
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <div class="answer-docknowledge">
3
- <div class="ad-text">{{ msg.content.text }}</div>
3
+ <div v-if="msg.content.type == 0" class="ad-text">{{ msg.content.text }}<span
4
+ @click="lookAttach(msg.content.list[0].url)" class="aci-view">查看原文 ></span></div>
5
+ <div v-if="msg.content.type == 1" class="ad-text">{{ msg.content.text }}</div>
4
6
  <div class="ad-list">
5
7
  <div v-for="(item, itemIndex) in msg.content.list" :key="itemIndex" class="ad-list-cell">
6
8
  <div class="alc-title">
@@ -8,11 +10,14 @@
8
10
  <img class="alc-title-icon" height="24px" width="24px" :src="item.src" alt="" srcset="">
9
11
  <span class="alc-title-from">出自《{{ item.from }}》</span>
10
12
  </div>
11
- <span class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>
13
+ <span v-if="isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>
12
14
  </div>
13
15
  <div class="alc-content">
14
- <div class="alc-content-text">{{ item.introduction }} <span class="aci-view">查看原文 ></span></div>
15
- <div class="alc-content-info">
16
+ <div v-if="msg.content.type == 1" class="alc-content-text">{{ item.introduction }} <span
17
+ @click="lookAttach(item.url)" class="aci-view">查看原文 ></span>
18
+ </div>
19
+ <span v-if="!isPC" class="alc-title-updateTime">最后更新时间: {{ item.updateTime }}</span>
20
+ <div v-if="false" class="alc-content-info">
16
21
  <div class="alcc-box">
17
22
  <span class="aci-owner">所有者: {{ item.owner }}</span>
18
23
  <span class="aci-enterprise">所属企业: {{ item.enterprise }}</span>
@@ -22,14 +27,19 @@
22
27
  </div>
23
28
  </div>
24
29
  </div>
30
+ <previewDoc ref="previewDoc" :url="previewHref"></previewDoc>
25
31
  </div>
26
32
  </template>
27
33
 
28
34
  <script>
35
+ import previewDoc from "./previewDoc";
29
36
  export default {
30
37
  name: "answerDocknowledge",
38
+ components: { previewDoc },
31
39
  data() {
32
40
  return {
41
+ isPC: true,
42
+ previewHref: "",
33
43
  imageObj: {
34
44
  PDF: 'pdf',
35
45
  pdf: 'pdf',
@@ -43,6 +53,15 @@ export default {
43
53
 
44
54
  },
45
55
  created() {
56
+ var system = {};
57
+ system.pingtai = /(Win32|Win16|WinCE|Mac68K|MacIntel|MacIntel|MacPPC|Linux mips64)/i.test(navigator.platform);
58
+ if (system.pingtai) {
59
+ //电脑
60
+ this.isPC = true;
61
+ } else {
62
+ //手机
63
+ this.isPC = false;
64
+ }
46
65
  this.msg.content.list.forEach(element => {
47
66
  element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
48
67
  });
@@ -51,6 +70,11 @@ export default {
51
70
 
52
71
  },
53
72
  methods: {
73
+ //预览图片
74
+ lookAttach(url) {
75
+ this.previewHref = url
76
+ this.$refs.previewDoc.previewShowPopup = true;
77
+ },
54
78
  }
55
79
  }
56
80
  </script>
@@ -62,12 +86,20 @@ export default {
62
86
  .ad-text {
63
87
  line-height: 18px;
64
88
  padding: 0px 0px 12px 0px;
89
+
90
+ .aci-view {
91
+ font-size: 13px;
92
+ display: inline-block;
93
+ margin-left: 10px;
94
+ color: #366aff;
95
+ cursor: pointer;
96
+ }
65
97
  }
66
98
 
67
99
  .ad-list {
68
100
  .ad-list-cell {
69
101
  border-top: solid 1px #E0E6F7;
70
- padding: 10px 0;
102
+ padding: 6px 0 6px;
71
103
 
72
104
  .alc-title {
73
105
  display: flex;
@@ -75,26 +107,39 @@ export default {
75
107
  align-items: center;
76
108
  justify-content: space-between;
77
109
  line-height: 16px;
78
- margin-bottom: 8px;
79
110
 
80
111
  .alc-box {
81
112
  display: flex;
82
113
  align-items: center;
83
114
  justify-content: flex-start;
115
+
116
+ .alc-title-from {
117
+ flex: auto;
118
+ display: flex;
119
+ justify-content: flex-start;
120
+ }
84
121
  }
85
122
 
86
123
  .alc-title-icon {
87
- margin-right: 12px;
124
+ margin-right: 6px;
88
125
  }
89
126
 
90
127
  .alc-title-updateTime {
91
128
  text-align: right;
92
129
  color: #999999;
93
- // font-size: 13px;
130
+ font-size: 13px;
94
131
  }
95
132
  }
96
133
 
97
134
  .alc-content {
135
+ .alc-title-updateTime {
136
+ margin-top: 6px;
137
+ display: block;
138
+ text-align: right;
139
+ color: #999999;
140
+ font-size: 13px;
141
+ }
142
+
98
143
  .alc-content-text {
99
144
  margin-bottom: 6px;
100
145