hookehuyr

馃悶 fix: 搴曢儴瑙e喅鏂规璺宠浆鍦ㄨВ鍐虫柟妗堥〉闈笉澶勭悊闂

1 <!-- 1 <!--
2 * @Date: 2024-09-29 15:49:27 2 * @Date: 2024-09-29 15:49:27
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2024-12-09 13:46:50 4 + * @LastEditTime: 2024-12-09 16:36:59
5 * @FilePath: /hager/src/views/solution/detail.vue 5 * @FilePath: /hager/src/views/solution/detail.vue
6 * @Description: 鏂囦欢鎻忚堪 6 * @Description: 鏂囦欢鎻忚堪
7 --> 7 -->
...@@ -212,7 +212,18 @@ export default { ...@@ -212,7 +212,18 @@ export default {
212 category_description: '', 212 category_description: '',
213 } 213 }
214 }, 214 },
215 - async mounted () { 215 + mounted () {
216 + this.initialize();
217 + },
218 + watch: {
219 + '$route.query.id' (old, val) {
220 + if (old !== val) {
221 + this.initialize();
222 + }
223 + }
224 + },
225 + methods: {
226 + async initialize () {
216 const { code, data } = await getSolutionCaseAPI({ cid: this.$route.query.id }); 227 const { code, data } = await getSolutionCaseAPI({ cid: this.$route.query.id });
217 if (code) { 228 if (code) {
218 this.case_info = data; 229 this.case_info = data;
...@@ -234,7 +245,6 @@ export default { ...@@ -234,7 +245,6 @@ export default {
234 clampText('.clamp-text', 3); // 闄愬埗鏄剧ず涓夎鏂囨湰 245 clampText('.clamp-text', 3); // 闄愬埗鏄剧ず涓夎鏂囨湰
235 }); 246 });
236 }, 247 },
237 - methods: {
238 onClickImg (item) { 248 onClickImg (item) {
239 window.open(item, '_blank'); 249 window.open(item, '_blank');
240 }, 250 },
......