头像上传裁剪
This commit is contained in:
@@ -12,7 +12,6 @@ Page({
|
||||
license_cert: [],
|
||||
qualification_cert: [],
|
||||
work_cert: [],
|
||||
license_cert_visible: false
|
||||
},
|
||||
onLoad(){
|
||||
api.getDoctorCret().then(response => {
|
||||
@@ -24,20 +23,13 @@ Page({
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
show_license_cert(){
|
||||
console.log("show_license_cert")
|
||||
this.setData({
|
||||
license_cert_visible: true
|
||||
previewImage(e){
|
||||
let name = e.currentTarget.dataset.name;
|
||||
let name_date = this.data[name]
|
||||
|
||||
wx.previewImage({
|
||||
current: name_date[0], // 当前显示图片的http链接
|
||||
urls: name_date // 需要预览的图片http链接列表
|
||||
})
|
||||
},
|
||||
close_license_cert(e) {
|
||||
const {
|
||||
detail: { trigger },
|
||||
} = e;
|
||||
console.log("trigger: ", trigger);
|
||||
console.log("close_license_cert")
|
||||
this.setData({
|
||||
license_cert_visible: false,
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
@@ -2,7 +2,6 @@
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"t-image": "tdesign-miniprogram/image/image",
|
||||
"t-image-viewer": "tdesign-miniprogram/image-viewer/image-viewer"
|
||||
"t-image": "tdesign-miniprogram/image/image"
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,8 @@
|
||||
style="margin: 0 50rpx 0 20rpx;"
|
||||
width="220rpx" height="220rpx"
|
||||
aria-label="img" wx:for="{{license_cert}}"
|
||||
bindtap="show_license_cert" />
|
||||
data-name="license_cert"
|
||||
bindtap="previewImage" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="imgbox_item">
|
||||
@@ -25,7 +26,9 @@
|
||||
mode="heightFix"
|
||||
style="margin: 0 50rpx 0 20rpx;"
|
||||
width="220rpx" height="220rpx"
|
||||
aria-label="img" wx:for="{{qualification_cert}}" />
|
||||
aria-label="img" wx:for="{{qualification_cert}}"
|
||||
data-name="qualification_cert"
|
||||
bindtap="previewImage"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="imgbox_item">
|
||||
@@ -37,18 +40,10 @@
|
||||
mode="heightFix"
|
||||
style="margin: 0 50rpx 20rpx 20rpx;"
|
||||
width="220rpx" height="220rpx"
|
||||
aria-label="img" wx:for="{{work_cert}}" />
|
||||
aria-label="img" wx:for="{{work_cert}}"
|
||||
data-name="work_cert"
|
||||
bindtap="previewImage"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <t-image-viewer
|
||||
deleteBtn="{{false}}"
|
||||
close-btn="{{true}}"
|
||||
show-index="{{true}}"
|
||||
visible="{{license_cert_visible}}"
|
||||
images="{{license_cert}}"
|
||||
bind:close="close_license_cert"
|
||||
></t-image-viewer> -->
|
||||
|
||||
</view>
|
||||
Reference in New Issue
Block a user