From 0971b6701065258ebfa2a808924c2593b248a64e Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Tue, 6 Aug 2024 15:00:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=88=86=E9=A1=B5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 2 +- src/utils/requestPhp.js | 2 +- src/views/product/components/addImages.vue | 19 ++++++++++++++----- .../product/components/imageComponent.vue | 13 +++++++++++-- 4 files changed, 27 insertions(+), 9 deletions(-) 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 @@