JING 8 months ago
commit 19410ee7fc
  1. 51
      pagesA/merge/idcard.vue
  2. 5
      pagesA/merge/this.scss

@ -62,13 +62,13 @@
<view class="show_readme_div_1">
请选择保存格式
</view>
<view class="show_readme_div_2">
<view class="show_readme_div_3" style="width: 100%;margin-left: 0;margin-top: 10rpx;">
<view class="show_readme_div_2" @tap="selecSave('1')">
<view class="show_readme_div_3" :class="[save_type == '1' ? 'save_yes' : '']" style="width: 100%;margin-left: 0;margin-top: 10rpx;">
PNG格式
</view>
</view>
<view class="show_readme_div_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_2" @tap="selecSave('2')">
<view class="show_readme_div_3" :class="[save_type == '2' ? 'save_yes' : '']" style="width: 100%;margin-left: 0;margin-top: 10rpx;">
JPG格式
</view>
</view>
@ -78,7 +78,7 @@
<view class="show_readme_div_4" style="width: 220rpx;" @tap="this.show_2 = false">
取消
</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>
@ -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"
})
});
}
},

@ -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%);
}

Loading…
Cancel
Save