小程序弹窗

//获取用户信息授权弹窗

 

<!--弹窗 -->

<view class="modal {{showAmountModal.showModal}}">

<view class="modal-content">

<view class="modal-line-box amount-title">

<text>温馨提示</text>

</view>

<view>点击授权获取微信头像和微信名字</view>

</view>

<button open-type="getUserInfo" type='primary' bindgetuserinfo='onGotUserInfo' class="button-color">授权</button>

</view>

<view class="mask {{showAmountModal.showMask}}"></view>

 


 

/* 弹窗 */

.modal{

position: absolute;

left: 0rpx;

top: 20%;

z-index: 200;

width:100%;

}

 

.modal-content{

width:60%;

height:300rpx;

margin:0 auto;

background:#fff;

font-size:30rpx;

font-family:"微软雅黑";

padding:20rpx;

border-radius:5px;

 

}

 

.modal-line-box{

margin: 30rpx 0rpx;

}

.modal-line-box.amount-title{

text-align: center;

font-size: 40rpx;

}

 

.mask{

position: fixed;

top: 0px;

left: 0px;

width: 100%;

height:100%;

z-index: 100;

background:rgba(0,0,0,0.5);

}

.showMask,.showModal{

display: block;

}

.hideMask,.hideModal{

display: none;

}

.button-color{

width:30%;

margin-top:-94rpx;

height:65rpx;

display:flex;

align-items:center;

justify-content:center;

 

}

//js

showAmountModal: {

showModal: 'hideModal',

showMask: 'hideModal',

},

that.setData({

showAmountModal: {

showModal: 'showModal',

showMask: 'showMask',

}

})

that.setData({

showAmountModal: {

showModal: 'hideModal',

showMask: 'hideMask',

},

})

 

 

//选择按钮弹窗

<!--弹窗 -->

<view class="modal {{showAmountModal.showModal}}">

<view class="modal-content">

<view class="modal-line-box amount-title">

<text>温馨提示</text>

</view>

<view class='modal-mian'>请对该订单选择您的评价</view>

</view>

<view class='button_all'>

<button type='primary' size='mini' class="button-color" bindtap='good' style='margin-left:-130rpx;'>好评</button>

<button type='primary' size='mini' class="button-color" bindtap='bad' style='margin-left:130rpx;'>差评</button>

</view>

</view>

<view class="mask {{showAmountModal.showMask}}"></view>

 

 

 

/* 弹窗 */

.modal{

position: absolute;

left: 0rpx;

top: 20%;

z-index: 200;

width:100%;

}

 

.modal-content{

width:70%;

height:400rpx;

margin:0 auto;

background:#fff;

font-size:30rpx;

font-family:"微软雅黑";

padding:20rpx;

border-radius:5px;

 

}

.modal-mian{

text-align:center;

padding-top:40rpx;

 

}

 

.modal-line-box{

margin: 30rpx 0rpx;

}

.modal-line-box.amount-title{

text-align: center;

font-size: 40rpx;

}

 

.mask{

position: fixed;

top: 0px;

left: 0px;

width: 100%;

height:100%;

z-index: 100;

background:rgba(0,0,0,0.5);

}

.showMask,.showModal{

display: block;

}

.hideMask,.hideModal{

display: none;

}

.button-color{

width:30%;

margin-top:-94rpx;

height:65rpx;

display:flex;

align-items:center;

justify-content:center;

position: absolute;

}

.button_all{

position: relative;

display:flex;

justify-content:center;

}

 

 

js

showAmountModal: {

showModal: 'hideModal',

showMask: 'hideModal',

},

 

//评价

evaluate(e) {

var that = this

console.log(e.currentTarget.dataset.dele)

that.setData({

showAmountModal: {

showModal: 'showModal',

showMask: 'showMask',

}

})

},

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值