<!-- 点击立即抢拼弹出框 -->
<view class='add-rob' bindtap="setModalStatus" data-status="0" wx:if="{{showModalStatus}}"></view>
<view class='rob-box' wx:if="{{showModalStatus}}">
<!-- 待添加商品详情 -->
<view class="shade-shop-detail">
<!-- 购买弹出框的关闭及商品数量-->
<view class="detail-right flexb">
<view class='detail-title-de'>购买数量</view>
<!-- 加减 -->
<view class="stepper">
<!-- 减号 -->
<text class="{{minusStatuses?'disabled':''}}" disabled="true" data-idx="{{idx}}" data-index="{{index}}" bindtap="bindMinus">-</text>
<!-- 数值 -->
<view class="number" bindchange="bindManual"></view>
<input maxlength='5' type='number' class="numberin" value='{{detailDatas.num}}' bindinput="bindChange" />
<!-- 加号 -->
<text class="normal" data-idx="{{idx}}" data-index="{{index}}" bindtap="bindPlus">+</text>
</view>
</view>
</view>
<!-- 加入和下一步按钮控制函数 -->
<view class="shade-shop-button">
<view wx:if="{{myBtn==1?'true':''}}" class="button-add" data-cid='detailDatas.id' bindtap='addShopcar'>加入购物车</view>
<view wx:if="{{myBtn==1?'':'true'}}" class="button-add" data-cid='detailDatas.id' bindtap='orderInto'>立即支付</view>
</view>
</view>
// 弹出框显隐控制参数data------
showModalStatus: false,
// 弹窗
setModalStatus: function (e) {
let that = this;
var animation = wx.createAnimation({
duration:200,
timingFunction: "linear",
delay: 0
})
this.animation = animation
animation.translateY(300).step();
this.setData({
animationData: animation.export(),
})
if (e.currentTarget.dataset.status == 1) {
this.setData(
{
showModalStatus: true
}
);
}
setTimeout(function () {
animation.translateY(0).step()
this.setData({
animationData: animation
})
if (e.currentTarget.dataset.status == 0) {
this.setData(
{
showModalStatus: false
}
);
}
}.bind(this), 200)
},
/*点击购买弹出购买框 遮照购买层 */
.shade{
width: 100%;
height:100%;
position: fixed;
top:0;
left: 0;
background: rgba(0,0,0,0.5);
}
.shade-shop{
width: 100%;
height: 290rpx;
">white;
position: absolute;
bottom: 0;
left: 0;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
/* 待添加商品详情 */
.shade-shop-detail{
padding: 20rpx 24rpx 40rpx;
}
/* 关闭及加减 */
.detail-right {
/* width: 190rpx; */
}
.detail-title-de{
font-size: 30rpx;
color: #333333;
margin-bottom: 20rpx;
}
/* 右侧增加减少 */
/* 计算加减 */
.stepper{
display: flex;
border-radius: 5px;
text-align: center;
}
.stepper text{
display: block;
width: 50rpx;
height: 52rpx;
border:1px solid #999999;
line-height: 50rpx;
color: #666666;
}
.stepper input{
display: block;
width: 100rpx;
height: 50rpx;
border:1px solid #999999;
line-height: 50rpx;
color: #333333;
font-size: 28rpx;
text-align: center;
}
/* .stepper wx-input.numberin{
width: 120rpx;
} */
.stepper text:first-child{
border-right: none;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.stepper text:last-child{
border-left: none;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
/* 减号禁用样式 */
.stepper .disabled{
border-color: rgba(153,153,153,0.2)
}
.button-add{
width: 100%;
height: 100rpx;
color: white;
line-height: 100rpx;
text-align: center;
font-size: 32rpx;
}
.button-add{
">#b5c2cf;
}
- 微信小程序之自定义底部弹出框动画
最近做小程序时,会经常用到各种弹框.直接做显示和隐藏虽然也能达到效果,但是体验性太差,也比较简单粗暴.想要美美地玩,添加点动画还是非常有必要的.下面做一个底部上滑的弹框. wxml <view ...
- 微信小程序之----加载中提示框loading
loading loading只有一个属性hidden .wxml <view> <loading hidden="{{hidden}}"> 加载中... ...
- 微信小程序组件学习 -- 注册页面
微信小程序组件使用手册地址: 1. 百度搜索"微信公众平台",扫码登录之后,点击帮助文档里面的普通小程序. 2. 接着选择"开发"-->"组件& ...
- 微信小程序组件设计规范
微信小程序组件设计规范 组件化开发的思想贯穿着我开发设计过程的始终.在过去很长一段时间里,我都受益于这种思想. 组件可复用 - 减少了重复代码量 组件做为抽离的功能单元 - 方便维护 组件作为temp ...
- JS组件Bootstrap实现弹出框和提示框效果代码
这篇文章主要介绍了JS组件Bootstrap实现弹出框和提示框效果代码,对弹出框和提示框感兴趣的小伙伴们可以参考一下 前言:对于Web开发人员,弹出框和提示框的使用肯定不会陌生,比如常见的表格新增和编 ...
- element-ul 处理 组件内的弹出框close问题
<el-dialog custom-class="rental-pop" :close-on-click-modal="false" :append-to ...
- 微信小程序组件 自定义弹出框
<!-- 点击立即抢拼弹出框 --> <view class='add-rob' bindtap="setModalStatus" data-status=&qu ...
- 【腾讯Bugly干货分享】打造“微信小程序”组件化开发框架
本文来自于腾讯Bugly公众号(weixinBugly),未经作者同意,请勿转载,原文地址:http://mp.weixin.qq.com/s/2nQzsuqq7Avgs8wsRizUhw 作者:Gc ...
- ***小程序wx.getUserInfo不能弹出授权窗口后的解决方案
微信更新api后,wx.getUserInfo在开发和体验版本都不能弹出授权窗口.微信文档说明: 注意:此接口有调整,使用该接口将不再出现授权弹窗,请使用 <button open-type=& ...
随机推荐
- 自己第一次使用ANTLR遇到的问题
觉得既然是第一次尝试ANTLR嘛,那就来个简单点的,parse Windows 的 hosts 文件吧,结果...... 先上一段 grammar: grammar hosts; hostfile: ...
- PL/SQL轻量版(四)——存储函数/存储过程与触发器
概述 ORACLE 提供可以把 PL/SQL 程序存储在数据库中,并可以在任何地方来运行它.这样就叫存储过程或函数.过程和函数统称为 PL/SQL 子程序,他们是被命名的 PL/SQL 块,均存储在数 ...
- 20155213 2016-2017-2《Java程序设计》第三周学习总结
20155213 2016-2017-2<Java程序设计>第三周学习总结 教材学习内容总结 类与对象 类和对象的关系:类决定对象,对象反映类的性质 定义值域成员:在新建的类中定义变量,可 ...
- 20145234黄斐《java程序设计》第三周
教材学习内容总结 类与对象 定义:对象,与过程相对. Java中变量有2种类型,一个是基本类型,另一个则是类类型.基本类型在之前学过,本次学习类类型.使用Java撰写程序几乎都是在使用对象,要产生对象 ...
- c++ 参数个数可变的函数
#include <stdio.h> #include <string.h> #include <stdarg.h> int addnum(int i,...) { ...
- 【redis的链接】redis的两种连接方法
执行redis-server /etc/redis.conf开启服务 方法一: [root@zhangmeng ~]# redis-cli > > quit 方法二: [root@zhan ...
- 学习HTML 第二节.HTML头部
HTML为什么要有个头部?还不太明白,可能是一些要提前声明的东西吧.先看看有什么内容吧. 可以添加在头部区域的元素标签为: <title>标题,这个我们知道了: <meta>使 ...
- 内容安全策略(CSP)
内容安全策略(CSP),其核心思想十分简单:网站通过发送一个 CSP 头部,来告诉浏览器什么是被授权执行的与什么是需要被禁止的.其被誉为专门为解决XSS攻击而生的神器. 1.CSP是什么 CSP指的是 ...
- selenium自动化之定位多个元素
前面我们讲的都是如何定位单个元素,下面讲下怎么去定位多个元素,并且输出文本. 以百度为例:获取标红的这一组元素的文本 这里我用到的是xpath来定位的://div[@id="u1" ...
- AtCoder Regular Contest 101 D - Median of Medians
二分答案 然后前缀和+树状数组来判断这个答案是否大于等于数 如果我们对于一个查询,如果小于这个数令为1,大于这个数领为-1 将所有前缀和放在树状数组中,就可以查询所有sum_{l} < sum_ ...