From f590a2396fada0b800fef7bfe136906b4a4f3db3 Mon Sep 17 00:00:00 2001 From: "SD-20230427NBFT\\Administrator" <609306725@qq.com> Date: Thu, 1 Aug 2024 11:42:32 +0800 Subject: [PATCH] 1111 --- pagesA/merge/idcard.vue | 55 +++++++++++++++++++++++++++++++++-------- pagesA/merge/this.scss | 5 ++++ 2 files changed, 50 insertions(+), 10 deletions(-) diff --git a/pagesA/merge/idcard.vue b/pagesA/merge/idcard.vue index 9157f1f..9625b69 100644 --- a/pagesA/merge/idcard.vue +++ b/pagesA/merge/idcard.vue @@ -62,13 +62,13 @@ 请选择保存格式 - - + + PNG格式 - - + + JPG格式 @@ -78,7 +78,7 @@ 取消 - + 确认 @@ -104,6 +104,7 @@ margin_top: 10, selectedImg: '', selectedIndex: 0, + selectedId:'', this_tab: 0, root_path: '', show_2: false, @@ -118,7 +119,8 @@ }, ], tem_list: [], - photo_has :0 + photo_has :0, + save_type:'' } }, @@ -138,6 +140,11 @@ methods: { + + selecSave(type){ + this.save_type = type; + console.log(this.save_type) + }, ///api/userInfo getUserInfo(){ @@ -152,7 +159,7 @@ }, selectThis(index) { this.selectedImg = this.$api.getOssurl() + this.tem_list[index].image; - + this.selectedId = this.tem_list[index].id; this.selectedIndex = index; }, changeTab(e) { @@ -180,16 +187,44 @@ }, saveBtn() { + this.save_type =''; this.show_2 = true; + + }, goUrl(url){ this.show_2 = false; uni.navigateTo({ url:url }) - } - - + }, + subThis(){ + let data ={}; + if(!this.save_type){ + this.$com.showError('请选择保存格式!'); + return false; + }else{ + data.image_suffix = this.save_type; + } + + if(!this.selectedId){ + this.$com.showError('请选择一个模板!'); + return false; + }else{ + data.template_id = this.selectedId; + } + + uni.showLoading({ + title: '保存图片中', + mask:true + }); + this.$api.post('/api/specs/append',data,function(rs){ + uni.hideLoading(); + uni.navigateTo({ + url:"/pagesA/merge/success" + }) + }); + } }, diff --git a/pagesA/merge/this.scss b/pagesA/merge/this.scss index a651c7a..fe33618 100644 --- a/pagesA/merge/this.scss +++ b/pagesA/merge/this.scss @@ -211,6 +211,11 @@ image{ display: flex; justify-content: center; align-items: center; + background:#F3F2F8; + color:#999999 + } + + .save_yes{ color:#fff; background: linear-gradient(to right, #4F93FF 0%, #9877FF 80%); }