askbot-dragon 0.7.35 → 0.7.36

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.35",
3
+ "version": "0.7.36",
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,14 @@
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
+ </section>
46
+ <b>{{ dataDetails.description ? dataDetails.description : "--" }}</b>
40
47
  </p>
41
48
  <p>
42
49
  <i class="arsenal_icon arsenalweizhi"></i>
@@ -44,32 +51,57 @@
44
51
  </p>
45
52
  <p>
46
53
  <i class="iconfont guoran-geren"></i>
47
- <span>
48
- {{
49
- dataDetails.userName && dataDetails.userName.length != 0
50
- ? dataDetails.userName[0]
51
- : "--"
52
- }}
54
+ <span
55
+ v-if="
56
+ dataDetails.users.length != 0 &&
57
+ dataDetails.users.type == 0 &&
58
+ dataDetails.users.bindType == 0
59
+ "
60
+ >
61
+ <ww-open-data
62
+ type="userName"
63
+ :openid="dataDetails.users[0].name"
64
+ ></ww-open-data>
65
+ </span>
66
+ <span v-else>
67
+ {{ dataDetails.users[0] ? dataDetails.users[0].name : "--" }}
53
68
  </span>
54
69
  </p>
55
70
  <p>
56
71
  <i class="iconfont guoran-bumen"></i>
57
- <span>
58
- {{
59
- dataDetails.deptNames && dataDetails.deptNames.length != 0
60
- ? dataDetails.deptNames[0]
61
- : "--"
62
- }}
72
+ <span
73
+ v-if="
74
+ dataDetails.depts.length != 0 &&
75
+ dataDetails.depts[0].wechatBotDTO &&
76
+ dataDetails.depts[0].wechatBotDTO.wechatType == 0 &&
77
+ dataDetails.depts[0].wechatBotDTO.bindType == 0
78
+ "
79
+ >
80
+ <ww-open-data
81
+ type="departmentName"
82
+ :openid="dataDetails.depts[0].name"
83
+ ></ww-open-data>
84
+ </span>
85
+ <span v-else>
86
+ {{ dataDetails.depts[0] ? dataDetails.depts[0].name : "--" }}
63
87
  </span>
64
88
  </p>
65
89
  <p>
66
90
  <i class="iconfont guoran-guanlizhe"></i>
91
+ <span
92
+ v-if="
93
+ dataDetails.managers.length != 0 &&
94
+ dataDetails.managers.type == 0 &&
95
+ dataDetails.managers.bindType == 0
96
+ "
97
+ >
98
+ <ww-open-data
99
+ type="userName"
100
+ :openid="dataDetails.managers[0].name"
101
+ ></ww-open-data>
102
+ </span>
67
103
  <span>
68
- {{
69
- dataDetails.managerNames && dataDetails.managerNames.length != 0
70
- ? dataDetails.managerNames[0]
71
- : "--"
72
- }}
104
+ {{ dataDetails.managers[0] ? dataDetails.managers[0].name : "--" }}
73
105
  </span>
74
106
  </p>
75
107
  </div>
@@ -88,6 +120,7 @@ export default {
88
120
  return {
89
121
  detailVisable: false,
90
122
  rotateFlag: true,
123
+ imgList: [],
91
124
  };
92
125
  },
93
126
  filters: {
@@ -106,10 +139,27 @@ export default {
106
139
  computed: {
107
140
  dataDetails() {
108
141
  let dataDetails = this.data.assets;
109
- let reg = /<\/?.+?\/?>/g;
110
- dataDetails.description = this.data.description
111
- ? this.data.description.replace(reg, "")
112
- : "";
142
+ if (dataDetails.description) {
143
+ let reg = /<\/?.+?\/?>/g;
144
+ let imgReg = /<img.*?(?:>|\/>)/gi;
145
+ //匹配src属性
146
+ let srcReg = /src=[\'\"]?([^\'\"]*)[\'\"]?/i;
147
+ let arr = dataDetails.description.match(imgReg);
148
+ if (arr) {
149
+ for (var i = 0; i < arr.length; i++) {
150
+ var src = arr[i].match(srcReg);
151
+ if (src[1]) {
152
+ this.imgList.push(src[1]);
153
+ }
154
+ }
155
+ }
156
+ dataDetails.description =
157
+ dataDetails.description &&
158
+ dataDetails.description.replace(/&nbsp;/gi, "");
159
+ dataDetails.description = dataDetails.description
160
+ ? dataDetails.description.replace(reg, "")
161
+ : "";
162
+ }
113
163
  return dataDetails;
114
164
  },
115
165
  },
@@ -203,6 +253,7 @@ export default {
203
253
  .text-label {
204
254
  width: 100%;
205
255
  display: flex;
256
+ flex-wrap: wrap;
206
257
  p {
207
258
  margin-right: 10px;
208
259
  display: flex;
@@ -238,7 +289,7 @@ export default {
238
289
  }
239
290
  .details-content-hide {
240
291
  width: 100%;
241
- height: 140px;
292
+ min-height: 140px;
242
293
  box-sizing: border-box;
243
294
  padding: 10px 15px;
244
295
  border-top: 1px solid #eeeeee;
@@ -251,6 +302,22 @@ export default {
251
302
  color: #366aff;
252
303
  }
253
304
  }
305
+ .description {
306
+ max-width: 70%;
307
+ .img-view {
308
+ width: 100%;
309
+ display: flex;
310
+ flex-direction: row;
311
+ flex-wrap: wrap;
312
+ justify-content: space-between;
313
+ align-items: center;
314
+ img {
315
+ width: 33%;
316
+ height: 33%;
317
+ margin-bottom: 5px;
318
+ }
319
+ }
320
+ }
254
321
  }
255
322
  }
256
323
  </style>