|
|
@@ -54,7 +54,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { fetchDetail, fetchEdit, fetchAdd } from '@/api/ad'
|
|
|
+import { fetchDetail, fetchEdit, fetchAdd, fetchAddSelectList } from '@/api/ad'
|
|
|
import tool from '@/utils/tool'
|
|
|
import Upload from '@/components/Upload'
|
|
|
import ElementUI from 'element-ui'
|
|
|
@@ -92,6 +92,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ console.log('roue.name--->'+this.$route.name)
|
|
|
if (this.$route.name === 'ad-edit') {
|
|
|
fetchDetail(this.$route.params.ID).then(response => {
|
|
|
this.form.title = response.data.oneData.TITLE
|
|
|
@@ -112,13 +113,14 @@ export default {
|
|
|
ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
|
|
|
})
|
|
|
} else {
|
|
|
- fetchDetail(this.$route.params.ID).then(response => {
|
|
|
+ fetchAddSelectList().then(response => {
|
|
|
this.allLocation = response.data.allLocation
|
|
|
this.allArticle = response.data.allArticle
|
|
|
|
|
|
this.loading = false
|
|
|
}).catch((error) => {
|
|
|
ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
|
|
|
+ this.loading = false
|
|
|
})
|
|
|
}
|
|
|
},
|