优化页面
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { API } from './../../../utils/network/api'
|
||||
const util = require('./../../../utils/util')
|
||||
let api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
@@ -13,7 +12,7 @@ Page({
|
||||
showText: false,
|
||||
saveImgPath: "",
|
||||
info: {},
|
||||
//https://github.com/Kujiale-Mobile/Painter
|
||||
// https://github.com/Kujiale-Mobile/Painter
|
||||
template: {
|
||||
width: '750px',
|
||||
height: '1200px',
|
||||
@@ -152,9 +151,10 @@ Page({
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
painter_ready: false
|
||||
},
|
||||
onShow(){
|
||||
onLoad(){
|
||||
//获取医生名片
|
||||
api.getDoctorInfoCard().then(response => {
|
||||
console.log(response);
|
||||
@@ -167,6 +167,10 @@ Page({
|
||||
"template.views[8].text" : response.data.department_custom_name,
|
||||
"template.views[9].text" : response.data.hospital_name,
|
||||
})
|
||||
}).then(res => {
|
||||
this.setData({
|
||||
painter_ready: true
|
||||
})
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
onImgOK(e){
|
||||
@@ -231,10 +235,15 @@ Page({
|
||||
visible: e.detail.visible,
|
||||
});
|
||||
},
|
||||
|
||||
showVisible(){
|
||||
this.setData({
|
||||
visible: !this.data.visible,
|
||||
});
|
||||
}
|
||||
},
|
||||
// onShareAppMessage(e) {
|
||||
// return {
|
||||
// title: '自定义转发标题',
|
||||
// path: '/Pages/yishi/mycard/index',
|
||||
// }
|
||||
// }
|
||||
})
|
||||
@@ -4,7 +4,7 @@
|
||||
"te-nav-bar": "/commpents/te_navbar",
|
||||
"painter":"/commpents/painter/painter",
|
||||
"t-avatar": "tdesign-miniprogram/avatar/avatar",
|
||||
"t-image": "tdesign-miniprogram/image/image",
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"t-icon": "tdesign-miniprogram/icon/icon",
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-cell-group": "@vant/weapp/cell-group/index",
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<t-avatar class="avatar" size="large" image="{{info.avatar}}" />
|
||||
</view>
|
||||
<view class="qrcode">
|
||||
<t-image bindtap="showVisible" src="{{info.qr_code_url}}" mode="heightFix" width="150" height="150" aria-label="qrcode" />
|
||||
<van-image bindtap="showVisible" src="{{info.qr_code_url}}" fit="heightFix" width="150" height="150" aria-label="qrcode" />
|
||||
<text>微信长按或扫描二维码查看我的更多信息</text>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<view class="block">
|
||||
<view class="block" wx:if="{{painter_ready}}">
|
||||
<view class="header">
|
||||
<view class="title">分享我的名片到</view>
|
||||
</view>
|
||||
@@ -56,4 +56,4 @@
|
||||
/>
|
||||
|
||||
</view>
|
||||
<painter palette="{{template}}" customStyle="position:fixed;top:-9999rpx;" bind:imgOK="onImgOK"/>
|
||||
<painter palette="{{template}}" customStyle="position:fixed;top:-9999rpx;" bind:imgOK="onImgOK" wx:if="{{painter_ready}}"/>
|
||||
Reference in New Issue
Block a user