diff --git a/.env.production b/.env.production index 04d04a8..04cb80a 100644 --- a/.env.production +++ b/.env.production @@ -10,4 +10,4 @@ VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn' # 如果接口是 http 形式, wss 需要改为 ws VUE_APP_WS_API = 'wss://123.56.110.252' -VUE_APP_PHP_API = 'https://kysh.sxczgkj.cn' +VUE_APP_PHP_API = 'https://kysh.sxczgkj.cn/source' diff --git a/src/utils/requestPhp.js b/src/utils/requestPhp.js index 6d00e61..e2cb215 100644 --- a/src/utils/requestPhp.js +++ b/src/utils/requestPhp.js @@ -8,7 +8,7 @@ import Cookies from 'js-cookie' // 创建axios实例 const service = axios.create({ - baseURL: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_PHP_API : '/source', + baseURL: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_PHP_API: '/source', // baseURL: process.env.VUE_APP_PHP_API, // api 的 base_url timeout: Config.timeout // 请求超时时间 }) diff --git a/src/views/product/components/addImages.vue b/src/views/product/components/addImages.vue index a721c38..91c538a 100644 --- a/src/views/product/components/addImages.vue +++ b/src/views/product/components/addImages.vue @@ -10,7 +10,8 @@ 新增类型 新增图片 - + + 取 消 确 定 @@ -67,7 +68,7 @@ export default { value: '', typedata: '', showUpload: false, - + page: 1, } }, mounted() { @@ -137,6 +138,10 @@ export default { } } }, + getlists() { + this.page++ + this.getList() + }, sumbit() { this.dialogVisible = false this.$emit('successEvent', this.selectImage) @@ -147,13 +152,17 @@ export default { async getList() { let obj = { category: this.value, - page: 1, - size: 10, + page: this.page, + size: 20, store_id: localStorage.getItem("shopId"), } const res = await getcommonpicture(obj); - this.dataImages = res.data + if (this.page == 1) { + this.dataImages = res.data + } else { + this.dataImages.push(...res.data) + } }, async getType(valueIndex) { const res = await getcommonCategor({ diff --git a/src/views/product/components/imageComponent.vue b/src/views/product/components/imageComponent.vue index fd0cadc..9fbcedc 100644 --- a/src/views/product/components/imageComponent.vue +++ b/src/views/product/components/imageComponent.vue @@ -1,6 +1,6 @@