因为微信小程序的授权现在需要用户点击按钮才能调用授权接口,而小程序自带的弹框的确认按钮不能绑定bindtap或使用open-type属性,所以打算自己写一个自定义弹窗供大家方便使用...
成品:
wxml
<!--component/modaler/iModal/iModal.wxml-->
<cover-view class='mask' wx:if='{
{!hide}}'>
<cover-view class='modal'>
<cover-view class='title' wx:if='{
{title}}'>{
{title}}</cover-view>
<cover-view class='content'>{
{content}}</cover-view>
<cover-view class='btns'>
<button class='cancel' bindtap='Cancel' wx:if='{
{showCancel}}'>取消</button>
<button wx:if="{
{open_type == 'contact'}}" c