From 2dc10667e68764a277ea38bb538cec2dd034c7e0 Mon Sep 17 00:00:00 2001
From: lihaoyuan <18278596806@163.com>
Date: Wed, 10 Dec 2025 17:03:31 +0800
Subject: [PATCH] =?UTF-8?q?update:=E4=BF=AE=E6=94=B9=E6=A8=A1=E6=9D=BF?=
=?UTF-8?q?=E5=B8=82=E5=9C=BA=E9=83=A8=E5=88=86=E6=A0=B7=E5=BC=8F=EF=BC=8C?=
=?UTF-8?q?=E5=B8=83=E5=B1=80=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=88=86=E9=A1=B5?=
=?UTF-8?q?=E5=99=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/page/sellerApp/DecorationDetail.vue | 2 +-
src/views/page/sellerApp/TemplateMenu.vue | 45 ++++-
src/views/page/sellerApp/copyTemplate.vue | 12 +-
src/views/page/sellerApp/index.vue | 180 +++++++++++++++++-
4 files changed, 216 insertions(+), 23 deletions(-)
diff --git a/src/views/page/sellerApp/DecorationDetail.vue b/src/views/page/sellerApp/DecorationDetail.vue
index 28966a4..f8d2df0 100644
--- a/src/views/page/sellerApp/DecorationDetail.vue
+++ b/src/views/page/sellerApp/DecorationDetail.vue
@@ -249,7 +249,7 @@ export default {
// 发送请求
const response = await editPageApp(requestData)
if(response.status==200){
- this.$message.success('保存成功哈哈哈哈!')
+ this.$message.success('保存成功!')
this.visible = false
// this.$emit('update-success', this.form)
this.$emit('editSuccess')
diff --git a/src/views/page/sellerApp/TemplateMenu.vue b/src/views/page/sellerApp/TemplateMenu.vue
index eaf0612..7f70538 100644
--- a/src/views/page/sellerApp/TemplateMenu.vue
+++ b/src/views/page/sellerApp/TemplateMenu.vue
@@ -8,14 +8,24 @@
>
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
查询
-
@@ -90,6 +100,7 @@ export default {
copyTemplateRef: null,
previewTemplateRef: null,
selectType:'',
+ appName:'',
shopModelList:[
{id:"1",label:'超市',value:'1'},
{id:"2",label:'数码家电',value:'2'},
@@ -120,7 +131,6 @@ export default {
async getListMarketPages() {
let data = await listMarketPage()
this.templateList = data;
- console.log("aaaaaaaaaaaaaaa")
},
async getBlankTplPage() {
try {
@@ -134,13 +144,21 @@ export default {
},
async searchByType(){
try {
- // 修复:接口需要传递对象参数(appIndustry),不是直接传字符串
let data = await listMarketPage({ appIndustry: this.selectType });
this.templateList = data && typeof data === 'object' ? data : { records: [] }
} catch (error) {
console.error('筛选模板失败:', error)
this.templateList = { records: [] }
}
+ },
+ async queryByName(){
+ try {
+ let data = await listMarketPage({ appName: this.appName });
+ this.templateList = data && typeof data === 'object' ? data : { records: [] }
+ } catch (error) {
+ console.error('筛选模板失败:', error)
+ this.templateList = { records: [] }
+ }
},
showEditApp(page) {
if (page.tpl_id === 107) {
@@ -255,5 +273,12 @@ export default {
.search{
width: 100%;
margin: 20px;
+ display: flex;
+}
+.select-type{
+ margin: 0px 10px;
+}
+.input-name{
+ margin: 0px 10px;
}
\ No newline at end of file
diff --git a/src/views/page/sellerApp/copyTemplate.vue b/src/views/page/sellerApp/copyTemplate.vue
index 81020a6..5e06223 100644
--- a/src/views/page/sellerApp/copyTemplate.vue
+++ b/src/views/page/sellerApp/copyTemplate.vue
@@ -1,6 +1,6 @@
-
+
创建模板
- 取消
+ 取消
@@ -85,8 +85,12 @@
if(res.status==200){
this.$message.success('模板创建成功!')
this.visible = false
- this.$emit('copySuccess') // 直接触发自定义事件通知父组件
+ this.$emit('copySuccess')//通知父组件成功
}
+ },
+ // 关闭弹窗
+ handleClose() {
+ this.visible = false
}
}
}
diff --git a/src/views/page/sellerApp/index.vue b/src/views/page/sellerApp/index.vue
index d47008c..7d71b21 100644
--- a/src/views/page/sellerApp/index.vue
+++ b/src/views/page/sellerApp/index.vue
@@ -98,17 +98,20 @@
-
+
+
+ -
+
+
![]()
+
{{ emptyPage.tpl_name }}
+
+
+
+
+ {{ __('创建空白模板') }}
+
+
+
+
+
+ -
+
+
![]()
+
{{ page.app_name }}
+
+
+
+
+ {{ __('创建模板') }}
+
+
+ {{ __('预览') }}
+
+
+
+
+
+ -
+
+
+
@@ -168,9 +229,83 @@
decoarationDetailRef: null,
copyTemplateRef:null,
previewTemplateRef:null,
- templateList: [],
+ templateList: { records: [] },
emptyPage: null,
app_market_images: null,
+ queryForm:{
+ pageNum:1,
+ pageSize:10,
+ appName:null,
+ appIndustry:''
+ },
+ layout: 'total, sizes, prev, pager, next, jumper',
+ total:0,
+ shopModelOptions:[
+ {
+ value: '',
+ label: this.__('全部'),
+ },
+ {
+ value: '1',
+ label: this.__('超市'),
+ },
+ {
+ value: '2',
+ label: this.__('数码家电'),
+ },
+ {
+ value: '3',
+ label: this.__('水果生鲜'),
+ },
+ {
+ value: '4',
+ label: this.__('烘焙甜品'),
+ },
+ {
+ value: '5',
+ label: this.__('社区团购'),
+ },
+ {
+ value: '6',
+ label: this.__('时尚美妆'),
+ },
+ {
+ value: '7',
+ label: this.__('婴儿服饰'),
+ },
+ {
+ value: '8',
+ label: this.__('家居'),
+ },
+ {
+ value: '9',
+ label: this.__('汽车'),
+ },
+ {
+ value: '10',
+ label: this.__('酒店旅游'),
+ },
+ {
+ value: '11',
+ label: this.__('鲜花绿植'),
+ },
+ {
+ value: '12',
+ label: this.__('医药健康'),
+ },
+ {
+ value: '13',
+ label: this.__('工业五金'),
+ },
+ {
+ value: '14',
+ label: this.__('节日模板'),
+ },
+ {
+ value: '0',
+ label: this.__('其他'),
+ },
+ ]
}
},
created() {
@@ -229,8 +364,16 @@
this.$refs.templateMenuRef?.open()
},
async getListMarketPages() {
- let data = await listMarketPage()
- this.templateList = data
+ await this.fetchData();
+ },
+ async searchByType(){
+ try {
+ let data = await listMarketPage(this.queryForm);
+ this.templateList = data && typeof data === 'object' ? data : { records: [] }
+ } catch (error) {
+ console.error('筛选模板失败:', error)
+ this.templateList = { records: [] }
+ }
},
async getBlankTplPage() {
try {
@@ -277,7 +420,7 @@
}
let res=await pageAppPublish(params)
if(res.status==200){
- this.$message.success('操作成功7777!')
+ this.$message.success('操作成功!')
this.refreshAllData()
}
},
@@ -285,7 +428,28 @@
async refreshAllData() {
await this.getAppPages()
await this.getListMarketPages()
- }
+ },
+ queryData(){
+ this.queryForm.pageNum=1
+ this.fetchData()
+ },
+ async fetchData(){
+ const params = {
+ ...this.queryForm,
+ appIndustry: this.queryForm.appIndustry || ''
+ };
+ const data = await listMarketPage(params);
+ this.templateList = data && typeof data === 'object' ? data : { records: [] };
+ this.total = data.total
+ },
+ handleSizeChange(val) {
+ this.queryForm.pageSize = val
+ this.fetchData()
+ },
+ handleCurrentChange(val) {
+ this.queryForm.pageNum = val
+ this.fetchData()
+ },
},
}