|
@@ -78,7 +78,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import axios from '@/utils/request'
|
|
|
|
|
|
+import { baseURL } from '../../utils/request'
|
|
import { goodsList, goodsRemove } from '@/apis/tab2'
|
|
import { goodsList, goodsRemove } from '@/apis/tab2'
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
import relativeTime from 'dayjs/plugin/relativeTime'
|
|
import relativeTime from 'dayjs/plugin/relativeTime'
|
|
@@ -98,7 +98,7 @@ export default {
|
|
},
|
|
},
|
|
loading: false,
|
|
loading: false,
|
|
|
|
|
|
- baseURL: '',
|
|
|
|
|
|
+ baseURL,
|
|
total: 0,
|
|
total: 0,
|
|
status: '',
|
|
status: '',
|
|
formData: {
|
|
formData: {
|
|
@@ -171,8 +171,6 @@ export default {
|
|
},
|
|
},
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
|
async created () {
|
|
async created () {
|
|
- // 获取服务器前缀地址
|
|
|
|
- this.baseURL = axios.defaults.baseURL
|
|
|
|
// 判断是第一次进来还是修改或者新增或者查看后返回
|
|
// 判断是第一次进来还是修改或者新增或者查看后返回
|
|
// 拿到路由跳转传过来的数据
|
|
// 拿到路由跳转传过来的数据
|
|
const k = this.$route.query.k
|
|
const k = this.$route.query.k
|