cc8a2226 by zhen

详情页添加返回按钮

1 parent bb5baa7b
...@@ -3,5 +3,5 @@ ENV = 'development' ...@@ -3,5 +3,5 @@ ENV = 'development'
3 3
4 # base api 4 # base api
5 # VUE_APP_BASE_API = 'http://192.168.11.67:8096' 5 # VUE_APP_BASE_API = 'http://192.168.11.67:8096'
6 VUE_APP_BASE_API = 'http://192.168.10.89:8096' 6 # VUE_APP_BASE_API = 'http://192.168.10.89:8096'
7 # VUE_APP_BASE_API = 'https://beta-salecloud-hengan.situdata.com' 7 VUE_APP_BASE_API = 'https://beta-salecloud-hengan.situdata.com'
......
1 <template>
2 <div class="go-back">
3 <div class="go-back-wrapper" @click="goBack">
4 <i class="el-icon-back left-icon"></i>
5 <span class="title">返回</span>
6 </div>
7 </div>
8 </template>
9
10 <script>
11 export default {
12 methods: {
13 goBack() {
14 this.$router.go(-1)
15 }
16 }
17 }
18 </script>
19
20 <style lang="scss" scoped>
21 .go-back {
22 &-wrapper {
23 display: flex;
24 justify-content: flex-start;
25 align-items: center;
26 cursor: pointer;
27 .left-icon {
28 display: inline-block;
29 font-size: 18px;
30 margin-right: 6px;
31 align-self: center;
32 }
33 .title {
34 font-size: 14px;
35 font-weight: 500;
36 }
37 }
38 }
39 </style>
1 <template> 1 <template>
2 <Card> 2 <Card>
3 <GoBack class="go-back mb10"></GoBack>
3 <h4 class="mb10">产品基本属性</h4> 4 <h4 class="mb10">产品基本属性</h4>
4 <el-form 5 <el-form
5 class="count-form" 6 class="count-form"
...@@ -142,11 +143,15 @@ import { ...@@ -142,11 +143,15 @@ import {
142 productEdit, 143 productEdit,
143 productAdd 144 productAdd
144 } from '@/api/productInforManagement' 145 } from '@/api/productInforManagement'
146 import GoBack from '_c/goBack'
145 147
146 const urlReg = /[a-zA-z]+:\/\/[^\s]*/ 148 const urlReg = /[a-zA-z]+:\/\/[^\s]*/
147 149
148 export default { 150 export default {
149 props: ['idAndCode'], 151 props: ['idAndCode'],
152 components: {
153 GoBack
154 },
150 data() { 155 data() {
151 const validateCode = async (rule, value, callback) => { 156 const validateCode = async (rule, value, callback) => {
152 if (!value) { 157 if (!value) {
...@@ -376,12 +381,20 @@ export default { ...@@ -376,12 +381,20 @@ export default {
376 } 381 }
377 } 382 }
378 383
384 let blackFile = []
379 this.fileList.forEach(item => { 385 this.fileList.forEach(item => {
380 if (item.file) { 386 if (item.file) {
381 formData.append(`file${item.id}`, item.file) 387 formData.append(`file${item.id}`, item.file)
388 } else {
389 blackFile.push(item.id)
382 } 390 }
383 }) 391 })
384 392
393 if (this.idAndCode) {
394 // 修改模式添加此字段
395 formData.append('blackFile', blackFile.join())
396 }
397
385 formData.append('link', this.linkForm.link) 398 formData.append('link', this.linkForm.link)
386 399
387 return formData 400 return formData
...@@ -433,4 +446,9 @@ export default { ...@@ -433,4 +446,9 @@ export default {
433 display: flex; 446 display: flex;
434 justify-content: center; 447 justify-content: center;
435 } 448 }
449
450 .go-back {
451 margin-left: -10px;
452 margin-top: -20px;
453 }
436 </style> 454 </style>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!