SD-20230427NBFT\Administrator 8 months ago
parent b177ae171f
commit f590a2396f
  1. 55
      pagesA/merge/idcard.vue
  2. 5
      pagesA/merge/this.scss

@ -62,13 +62,13 @@
<view class="show_readme_div_1"> <view class="show_readme_div_1">
请选择保存格式 请选择保存格式
</view> </view>
<view class="show_readme_div_2"> <view class="show_readme_div_2" @tap="selecSave('1')">
<view class="show_readme_div_3" style="width: 100%;margin-left: 0;margin-top: 10rpx;"> <view class="show_readme_div_3" :class="[save_type == '1' ? 'save_yes' : '']" style="width: 100%;margin-left: 0;margin-top: 10rpx;">
PNG格式 PNG格式
</view> </view>
</view> </view>
<view class="show_readme_div_2"> <view class="show_readme_div_2" @tap="selecSave('2')">
<view class="show_readme_div_3" style="width: 100%;margin-left: 0;margin-top: 10rpx;background:#F3F2F8;color:#999999"> <view class="show_readme_div_3" :class="[save_type == '2' ? 'save_yes' : '']" style="width: 100%;margin-left: 0;margin-top: 10rpx;">
JPG格式 JPG格式
</view> </view>
</view> </view>
@ -78,7 +78,7 @@
<view class="show_readme_div_4" style="width: 220rpx;" @tap="this.show_2 = false"> <view class="show_readme_div_4" style="width: 220rpx;" @tap="this.show_2 = false">
取消 取消
</view> </view>
<view class="show_readme_div_3" style="width: 220rpx;" @tap="goUrl('/pagesA/merge/success')"> <view class="show_readme_div_3 save_yes" style="width: 220rpx;" @tap="subThis">
确认 确认
</view> </view>
</view> </view>
@ -104,6 +104,7 @@
margin_top: 10, margin_top: 10,
selectedImg: '', selectedImg: '',
selectedIndex: 0, selectedIndex: 0,
selectedId:'',
this_tab: 0, this_tab: 0,
root_path: '', root_path: '',
show_2: false, show_2: false,
@ -118,7 +119,8 @@
}, },
], ],
tem_list: [], tem_list: [],
photo_has :0 photo_has :0,
save_type:''
} }
}, },
@ -138,6 +140,11 @@
methods: { methods: {
selecSave(type){
this.save_type = type;
console.log(this.save_type)
},
///api/userInfo ///api/userInfo
getUserInfo(){ getUserInfo(){
@ -152,7 +159,7 @@
}, },
selectThis(index) { selectThis(index) {
this.selectedImg = this.$api.getOssurl() + this.tem_list[index].image; this.selectedImg = this.$api.getOssurl() + this.tem_list[index].image;
this.selectedId = this.tem_list[index].id;
this.selectedIndex = index; this.selectedIndex = index;
}, },
changeTab(e) { changeTab(e) {
@ -180,16 +187,44 @@
}, },
saveBtn() { saveBtn() {
this.save_type ='';
this.show_2 = true; this.show_2 = true;
}, },
goUrl(url){ goUrl(url){
this.show_2 = false; this.show_2 = false;
uni.navigateTo({ uni.navigateTo({
url:url 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"
})
});
}
}, },

@ -211,6 +211,11 @@ image{
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background:#F3F2F8;
color:#999999
}
.save_yes{
color:#fff; color:#fff;
background: linear-gradient(to right, #4F93FF 0%, #9877FF 80%); background: linear-gradient(to right, #4F93FF 0%, #9877FF 80%);
} }

Loading…
Cancel
Save