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