askbot-dragon 0.7.34 → 0.7.37

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": "0.7.34",
3
+ "version": "0.7.37",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -10,7 +10,7 @@
10
10
  <div class="details-content">
11
11
  <img
12
12
  class="backgroundImg"
13
- v-if="dataDetails.product.productImgPathes"
13
+ v-if="dataDetails.product.productImgPathes.length != 0"
14
14
  :src="dataDetails.product.productImgPathes"
15
15
  alt=""
16
16
  />
@@ -36,7 +36,16 @@
36
36
  <div class="details-content-hide" v-if="rotateFlag">
37
37
  <p>
38
38
  <i class="iconfont guoran-miaoshu"></i>
39
- <span>{{ dataDetails.description }}</span>
39
+ <section class="description">
40
+ <section class="img-view" v-if="imgList.length != 0">
41
+ <template v-for="(item, index) in imgList">
42
+ <img :src="item" alt="" :key="index" />
43
+ </template>
44
+ </section>
45
+ <span>{{
46
+ dataDetails.description ? dataDetails.description : "--"
47
+ }}</span>
48
+ </section>
40
49
  </p>
41
50
  <p>
42
51
  <i class="arsenal_icon arsenalweizhi"></i>
@@ -44,32 +53,57 @@
44
53
  </p>
45
54
  <p>
46
55
  <i class="iconfont guoran-geren"></i>
47
- <span>
48
- {{
49
- dataDetails.userName && dataDetails.userName.length != 0
50
- ? dataDetails.userName[0]
51
- : "--"
52
- }}
56
+ <span
57
+ v-if="
58
+ dataDetails.users.length != 0 &&
59
+ dataDetails.users.type == 0 &&
60
+ dataDetails.users.bindType == 0
61
+ "
62
+ >
63
+ <ww-open-data
64
+ type="userName"
65
+ :openid="dataDetails.users[0].name"
66
+ ></ww-open-data>
67
+ </span>
68
+ <span v-else>
69
+ {{ dataDetails.users[0] ? dataDetails.users[0].name : "--" }}
53
70
  </span>
54
71
  </p>
55
72
  <p>
56
73
  <i class="iconfont guoran-bumen"></i>
57
- <span>
58
- {{
59
- dataDetails.deptNames && dataDetails.deptNames.length != 0
60
- ? dataDetails.deptNames[0]
61
- : "--"
62
- }}
74
+ <span
75
+ v-if="
76
+ dataDetails.depts.length != 0 &&
77
+ dataDetails.depts[0].wechatBotDTO &&
78
+ dataDetails.depts[0].wechatBotDTO.wechatType == 0 &&
79
+ dataDetails.depts[0].wechatBotDTO.bindType == 0
80
+ "
81
+ >
82
+ <ww-open-data
83
+ type="departmentName"
84
+ :openid="dataDetails.depts[0].name"
85
+ ></ww-open-data>
86
+ </span>
87
+ <span v-else>
88
+ {{ dataDetails.depts[0] ? dataDetails.depts[0].name : "--" }}
63
89
  </span>
64
90
  </p>
65
91
  <p>
66
92
  <i class="iconfont guoran-guanlizhe"></i>
93
+ <span
94
+ v-if="
95
+ dataDetails.managers.length != 0 &&
96
+ dataDetails.managers.type == 0 &&
97
+ dataDetails.managers.bindType == 0
98
+ "
99
+ >
100
+ <ww-open-data
101
+ type="userName"
102
+ :openid="dataDetails.managers[0].name"
103
+ ></ww-open-data>
104
+ </span>
67
105
  <span>
68
- {{
69
- dataDetails.managerNames && dataDetails.managerNames.length != 0
70
- ? dataDetails.managerNames[0]
71
- : "--"
72
- }}
106
+ {{ dataDetails.managers[0] ? dataDetails.managers[0].name : "--" }}
73
107
  </span>
74
108
  </p>
75
109
  </div>
@@ -88,6 +122,7 @@ export default {
88
122
  return {
89
123
  detailVisable: false,
90
124
  rotateFlag: true,
125
+ imgList: [],
91
126
  };
92
127
  },
93
128
  filters: {
@@ -105,18 +140,34 @@ export default {
105
140
  },
106
141
  computed: {
107
142
  dataDetails() {
108
- let dataDetails = this.data;
109
- let reg = /<\/?.+?\/?>/g;
110
- dataDetails.description = this.data.description
111
- ? this.data.description.replace(reg, "")
112
- : "";
143
+ let dataDetails = this.data.assets;
144
+ if (dataDetails.description) {
145
+ let reg = /<\/?.+?\/?>/g;
146
+ let imgReg = /<img.*?(?:>|\/>)/gi;
147
+ //匹配src属性
148
+ let srcReg = /src=[\'\"]?([^\'\"]*)[\'\"]?/i;
149
+ let arr = dataDetails.description.match(imgReg);
150
+ if (arr) {
151
+ for (var i = 0; i < arr.length; i++) {
152
+ var src = arr[i].match(srcReg);
153
+ if (src[1]) {
154
+ this.imgList.push(src[1]);
155
+ }
156
+ }
157
+ }
158
+ dataDetails.description =
159
+ dataDetails.description &&
160
+ dataDetails.description.replace(/&nbsp;/gi, "");
161
+ dataDetails.description = dataDetails.description
162
+ ? dataDetails.description.replace(reg, "")
163
+ : "";
164
+ }
113
165
  return dataDetails;
114
166
  },
115
167
  },
116
168
  methods: {
117
169
  rotateClick() {
118
170
  this.rotateFlag = !this.rotateFlag;
119
- console.log(this.rotateFlag);
120
171
  },
121
172
  },
122
173
  };
@@ -125,8 +176,8 @@ export default {
125
176
  <style lang="less" scoped>
126
177
  @import url("../assets/less/iconfont.css");
127
178
  .asset {
179
+ width: 100%;
128
180
  box-sizing: border-box;
129
- padding: 0 15px;
130
181
  }
131
182
  .asset-details {
132
183
  width: 100%;
@@ -203,6 +254,7 @@ export default {
203
254
  .text-label {
204
255
  width: 100%;
205
256
  display: flex;
257
+ flex-wrap: wrap;
206
258
  p {
207
259
  margin-right: 10px;
208
260
  display: flex;
@@ -238,7 +290,7 @@ export default {
238
290
  }
239
291
  .details-content-hide {
240
292
  width: 100%;
241
- height: 140px;
293
+ min-height: 140px;
242
294
  box-sizing: border-box;
243
295
  padding: 10px 15px;
244
296
  border-top: 1px solid #eeeeee;
@@ -251,6 +303,23 @@ export default {
251
303
  color: #366aff;
252
304
  }
253
305
  }
306
+ .description {
307
+ max-width: 70%;
308
+ flex: 0 1;
309
+ .img-view {
310
+ width: 100%;
311
+ display: flex;
312
+ flex-direction: row;
313
+ flex-wrap: wrap;
314
+ justify-content: space-between;
315
+ align-items: center;
316
+ img {
317
+ width: 33%;
318
+ height: 33%;
319
+ margin-bottom: 5px;
320
+ }
321
+ }
322
+ }
254
323
  }
255
324
  }
256
325
  </style>