|
@@ -6,7 +6,7 @@
|
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- 主体
|
|
|
+ <upload :limit="1" :data="img_path" type="img_path" :url="'/files/imgpath/upload'" @upload="uploadSuccess"></upload>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="foot">
|
|
|
<footInfo></footInfo>
|
|
@@ -19,12 +19,14 @@
|
|
|
<script>
|
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
|
import footInfo from '@/layout/common/footInfo.vue';
|
|
|
+import upload from '@/components/upload.vue';
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
|
components: {
|
|
|
NavBar,
|
|
|
footInfo,
|
|
|
+ upload,
|
|
|
},
|
|
|
data: () => ({
|
|
|
// 头部标题
|
|
@@ -33,10 +35,30 @@ export default {
|
|
|
isleftarrow: '',
|
|
|
// 返回
|
|
|
navShow: true,
|
|
|
+ img_path: require('@/assets/logo.png'),
|
|
|
}),
|
|
|
created() {},
|
|
|
computed: {},
|
|
|
- methods: {},
|
|
|
+ methods: {
|
|
|
+ uploadSuccess({ type, data }) {
|
|
|
+ console.log(type, data);
|
|
|
+ // if (type !== 'img_path') {
|
|
|
+ // let arr = _.get(this.uploads, type);
|
|
|
+ // if (arr !== undefined) {
|
|
|
+ // this.uploads[type].push({ name: data.name, uri: data.uri });
|
|
|
+ // } else {
|
|
|
+ // let newArr = [{ name: data.name, uri: data.uri }];
|
|
|
+ // this.$set(this.uploads, `${type}`, newArr);
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // this.picLoading = false;
|
|
|
+ // this.$set(this.info, `${type}`, data.uri);
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.picLoading = true;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.title = this.$route.meta.title;
|
|
|
this.isleftarrow = this.$route.meta.isleftarrow;
|