@ -1,4 +1,5 @@ |
|||||||
{ |
{ |
||||||
"navigationBarTitleText": "双通道药房", |
"navigationBarTitleText": "药房", |
||||||
|
"navigationStyle": "default", |
||||||
"usingComponents": {} |
"usingComponents": {} |
||||||
} |
} |
||||||
|
|||||||
@ -1,52 +1,54 @@ |
|||||||
const app = getApp<IAppOption>(); |
const app = getApp<IAppOption>() |
||||||
|
|
||||||
Page({ |
Page({ |
||||||
data: { |
data: { |
||||||
id: "", |
id: '', |
||||||
detail: {} as any, |
detail: {} as any, |
||||||
}, |
}, |
||||||
onLoad(options) { |
onLoad(options) { |
||||||
this.setData({ |
this.setData({ |
||||||
id: options.id, |
id: options.id, |
||||||
}); |
}) |
||||||
app.waitLogin().then(() => { |
app.waitLogin({ type: [0, 1] }).then(() => { |
||||||
this.getDetail(); |
this.getDetail() |
||||||
}); |
}) |
||||||
}, |
}, |
||||||
|
|
||||||
getDetail() { |
getDetail() { |
||||||
wx.ajax({ |
wx.ajax({ |
||||||
method: "GET", |
method: 'GET', |
||||||
url: "?r=zd/dtp-pharmacy/detail", |
url: '?r=zd/dtp-pharmacy/detail', |
||||||
data: { |
data: { |
||||||
Id: this.data.id, |
Id: this.data.id, |
||||||
}, |
}, |
||||||
}).then((res) => { |
}).then((res) => { |
||||||
this.setData({ |
this.setData({ |
||||||
detail: res, |
detail: res, |
||||||
}); |
}) |
||||||
}); |
}) |
||||||
}, |
}, |
||||||
handleSite() { |
handleSite() { |
||||||
const { LNG, LAT, ProvinceName, CityName, CountyName, Address, Name } = this.data.detail; |
const { LNG, LAT, ProvinceName, CityName, CountyName, Address, Name } = this.data.detail |
||||||
wx.openLocation({ |
wx.openLocation({ |
||||||
latitude: LAT, |
latitude: LAT, |
||||||
longitude: LNG, |
longitude: LNG, |
||||||
name: Name, |
name: Name, |
||||||
address: `${ProvinceName}${CityName}${CountyName}${Address}`, |
address: `${ProvinceName}${CityName}${CountyName}${Address}`, |
||||||
}); |
}) |
||||||
}, |
}, |
||||||
handlePhone() { |
handlePhone() { |
||||||
const tel = this.data.detail.Telephone; |
const tel = this.data.detail.Telephone |
||||||
if (!tel) { |
if (!tel) { |
||||||
wx.showToast({ |
wx.showToast({ |
||||||
icon: "none", |
icon: 'none', |
||||||
title: "电话暂未开通", |
title: '电话暂未开通', |
||||||
}); |
}) |
||||||
return; |
return |
||||||
} |
} |
||||||
wx.makePhoneCall({ |
wx.makePhoneCall({ |
||||||
phoneNumber: tel, |
phoneNumber: tel, |
||||||
}); |
}) |
||||||
}, |
}, |
||||||
}); |
}) |
||||||
|
|
||||||
|
export {} |
||||||
|
|||||||
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 740 B |
|
After Width: | Height: | Size: 810 B |
|
After Width: | Height: | Size: 483 B |
|
After Width: | Height: | Size: 348 B |
|
After Width: | Height: | Size: 789 B |
|
After Width: | Height: | Size: 84 KiB |
@ -1,9 +1,93 @@ |
|||||||
.page { |
.page { |
||||||
display: block; |
position: relative; |
||||||
|
.banner { |
||||||
width: 100%; |
width: 100%; |
||||||
} |
min-height: 374rpx; |
||||||
.page-title { |
} |
||||||
margin-top: -120rpx; |
.container { |
||||||
|
padding: 48rpx 40rpx; |
||||||
|
position: absolute; |
||||||
|
top: 348rpx; |
||||||
|
left: 0; |
||||||
|
width: 100%; |
||||||
|
min-height: 100vh; |
||||||
|
border-radius: 24rpx 24rpx 0 0; |
||||||
|
background-color: #fff; |
||||||
|
box-sizing: border-box; |
||||||
|
.title { |
||||||
|
font-size: 36rpx; |
||||||
|
color: #211d2e; |
||||||
|
font-weight: bold; |
||||||
|
} |
||||||
|
.content { |
||||||
|
margin-top: 32rpx; |
||||||
|
margin-bottom: 20rpx; |
||||||
|
display: flex; |
||||||
|
justify-content: space-between; |
||||||
|
.inner { |
||||||
|
.site { |
||||||
|
font-size: 28rpx; |
||||||
|
color: #adacb2; |
||||||
|
} |
||||||
|
.tel { |
||||||
|
font-size: 28rpx; |
||||||
|
color: #adacb2; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.options { |
||||||
|
margin-top: 40rpx; |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: center; |
||||||
|
gap: 30rpx; |
||||||
|
.phone { |
||||||
|
flex: 1; |
||||||
|
line-height: 70rpx; |
||||||
|
font-size: 32rpx; |
||||||
|
color: #b982ff; |
||||||
|
text-align: center; |
||||||
|
border-radius: 60rpx 60rpx 60rpx 60rpx; |
||||||
|
border: 1px solid #b982ff; |
||||||
|
.icon { |
||||||
|
display: inline-block; |
||||||
|
width: 36rpx; |
||||||
|
height: 36rpx; |
||||||
|
vertical-align: middle; |
||||||
|
} |
||||||
|
} |
||||||
|
.site { |
||||||
|
flex: 1; |
||||||
|
line-height: 76rpx; |
||||||
|
font-size: 32rpx; |
||||||
|
color: #ffffff; |
||||||
|
border-radius: 60rpx; |
||||||
text-align: center; |
text-align: center; |
||||||
color: #fea8b7; |
background: linear-gradient(197deg, #ffbcf9 0%, #b982ff 100%); |
||||||
|
.icon { |
||||||
|
display: inline-block; |
||||||
|
width: 32rpx; |
||||||
|
height: 32rpx; |
||||||
|
vertical-align: middle; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.remark { |
||||||
|
margin-top: 56rpx; |
||||||
|
padding: 32rpx; |
||||||
|
border-radius: 24rpx; |
||||||
|
background-color: #fafafa; |
||||||
|
.r-title { |
||||||
|
font-size: 32rpx; |
||||||
|
color: #211d2e; |
||||||
|
font-weight: bold; |
||||||
|
} |
||||||
|
.r-content { |
||||||
|
margin-top: 20rpx; |
||||||
|
font-size: 28rpx; |
||||||
|
color: #69686e; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
} |
} |
||||||
|
|||||||
@ -1,6 +1,54 @@ |
|||||||
const _app = getApp<IAppOption>(); |
const app = getApp<IAppOption>() |
||||||
|
|
||||||
Page({ |
Page({ |
||||||
data: {}, |
data: { |
||||||
onLoad() { }, |
id: '', |
||||||
|
detail: {} as any, |
||||||
|
}, |
||||||
|
onLoad(options) { |
||||||
|
this.setData({ |
||||||
|
id: options.id, |
||||||
|
}) |
||||||
|
app.waitLogin({ type: [0, 1] }).then(() => { |
||||||
|
this.getDetail() |
||||||
|
}) |
||||||
|
}, |
||||||
|
|
||||||
|
getDetail() { |
||||||
|
wx.ajax({ |
||||||
|
method: 'GET', |
||||||
|
url: '?r=xd/infusion-center/detail', |
||||||
|
data: { |
||||||
|
Id: this.data.id, |
||||||
|
}, |
||||||
|
}).then((res) => { |
||||||
|
this.setData({ |
||||||
|
detail: res, |
||||||
|
}) |
||||||
|
}) |
||||||
|
}, |
||||||
|
handleSite() { |
||||||
|
const { LNG, LAT, ProvinceName, CityName, CountyName, Address, Name } = this.data.detail |
||||||
|
wx.openLocation({ |
||||||
|
latitude: LAT, |
||||||
|
longitude: LNG, |
||||||
|
name: Name, |
||||||
|
address: `${ProvinceName}${CityName}${CountyName}${Address}`, |
||||||
|
}) |
||||||
|
}, |
||||||
|
handlePhone() { |
||||||
|
const tel = this.data.detail.Telephone |
||||||
|
if (!tel) { |
||||||
|
wx.showToast({ |
||||||
|
icon: 'none', |
||||||
|
title: '电话暂未开通', |
||||||
|
}) |
||||||
|
return |
||||||
|
} |
||||||
|
wx.makePhoneCall({ |
||||||
|
phoneNumber: tel, |
||||||
|
}) |
||||||
|
}, |
||||||
}) |
}) |
||||||
|
|
||||||
|
export {} |
||||||
|
|||||||
@ -1,2 +1,27 @@ |
|||||||
<image class="page" mode="widthFix" src="{{imageUrl}}za-images//infusionCenter.png?t={{Timestamp}}"></image> |
<view class="page"> |
||||||
<view class="page-title">即将上线,敬请期待!</view> |
<image wx:if="{{detail.ImgUrl}}" class="banner" mode="widthFix" src="{{detail.ImgUrl}}"></image> |
||||||
|
<image wx:else class="banner" mode="widthFix" src="{{imageUrl}}bg25.png?t={{Timestamp}}"></image> |
||||||
|
<view class="container"> |
||||||
|
<view class="title">{{detail.Name}}</view> |
||||||
|
<view class="content"> |
||||||
|
<view class="inner"> |
||||||
|
<view class="site">{{detail.ProvinceName}}{{detail.CityName}}{{detail.CountyName}}{{detail.Address}}</view> |
||||||
|
<view class="tel">{{detail.Telephone}}</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="options"> |
||||||
|
<view class="phone" bind:tap="handlePhone"> |
||||||
|
<image class="icon" src="{{imageUrl}}icon95.png?t={{Timestamp}}"></image> |
||||||
|
电话 |
||||||
|
</view> |
||||||
|
<view class="site" bind:tap="handleSite" wx:if="{{detail.Address}}"> |
||||||
|
<image class="icon" src="{{imageUrl}}icon96.png?t={{Timestamp}}"></image> |
||||||
|
地址 |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
<view class="remark" wx:if="{{detail.Remark}}"> |
||||||
|
<view class="r-title">备注</view> |
||||||
|
<view class="r-content">{{detail.Remark}}</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
</view> |
||||||
|
|||||||