Commit d4d63f55ce3095387d2b7a2c8fd0e6c6aef775e2
1 parent
9d44dcd0
提示框的使用
Showing
4 changed files
with
114 additions
and
0 deletions
components/my_confirm/my_confirm.js
0 → 100644
1 | +var t = getApp(); | |
2 | +Component({ | |
3 | + /*** 页面的初始数据***/ | |
4 | + data: { | |
5 | + yu_e_show:0, | |
6 | + iurl:t.globalData.setting.imghost, | |
7 | + width:0, | |
8 | + success:null, //成功的回调 | |
9 | + cancle: null, //取消的回调 | |
10 | + title: null, //标题 | |
11 | + s_text:null, //确定的提示语 | |
12 | + c_text:null, //取消的提示语 | |
13 | + }, | |
14 | + | |
15 | + methods: { | |
16 | + open: function (title,s_text,c_text,success,cancle) { | |
17 | + this.setData({ title: title, s_text: s_text, c_text:c_text, yu_e_show: 1}) | |
18 | + this.data.success=success;this.data.cancle=cancle; | |
19 | + }, | |
20 | + go_sure:function(){ | |
21 | + this.data.success(); | |
22 | + }, | |
23 | + go_cancle: function () { | |
24 | + this.data.cancle(); | |
25 | + }, | |
26 | + close_yu_e:function(){ | |
27 | + this.setData({ yu_e_show: 0 }) | |
28 | + } | |
29 | + } | |
30 | + | |
31 | +}) | |
0 | 32 | \ No newline at end of file | ... | ... |
components/my_confirm/my_confirm.json
0 → 100644
components/my_confirm/my_confirm.wxml
0 → 100644
1 | +<!-- 转入余额提示 --> | |
2 | +<view class="xc-pop-up" wx:if="{{yu_e_show}}"> | |
3 | + <view class="xc-obscuration" bindtap='close_yu_e' catchtouchmove="ture"></view> | |
4 | + <view> | |
5 | + <view class="xc-qr-frame"> | |
6 | + <view class="shut" bindtap="close_yu_e">ⅹ</view> | |
7 | + <view class="fs32 xc-black3 flex jc-center ai-center" style="width:100%;height:220rpx;">{{title}}</view> | |
8 | + <view class="flex jc-center ai_center" style="width: 100%;height: 75rpx;"> | |
9 | + <view bindtap="go_sure" class="fs30 white flex jc-center ai-center ck_btn" style="margin-right: 20rpx;">{{s_text}}</view> | |
10 | + <view bindtap='go_cancle' class="fs30 xc-ash flex jc-center ai-center ck_btn"style="background:#ececea;">{{c_text}}</view> | |
11 | + </view> | |
12 | + </view> | |
13 | + </view> | |
14 | +</view> | |
15 | + | |
16 | + | ... | ... |
components/my_confirm/my_confirm.wxss
0 → 100644
1 | + | |
2 | +/* 弹窗样式 */ | |
3 | +.xc-pop-up{ | |
4 | + width: 100%; | |
5 | + height: 100%; | |
6 | + position:fixed; | |
7 | + z-index:5; | |
8 | + display:flex; | |
9 | + justify-content:center; | |
10 | + align-items:center; | |
11 | +} | |
12 | +.xc-obscuration{ | |
13 | + position: fixed; | |
14 | + left: 0; | |
15 | + top: 0; | |
16 | + right: 0; | |
17 | + bottom: 0; | |
18 | + z-index: 11; | |
19 | + background: rgba(0,0,0,0.4); | |
20 | + width: 100%; | |
21 | + height: 100%; | |
22 | +} | |
23 | + | |
24 | +.shut{ | |
25 | + display: block; | |
26 | + width: 54rpx; | |
27 | + height: 54rpx; | |
28 | + font-size: 50rpx; | |
29 | + line-height:47rpx; | |
30 | + border-radius: 50%; | |
31 | + -moz-border-radius: 50%; | |
32 | + -webkit-border-radius: 50%; | |
33 | + color: #fff; | |
34 | + text-align: center; | |
35 | + position: fixed; | |
36 | + margin-top: -23rpx; | |
37 | + z-index: 66666; | |
38 | + right: 60rpx; | |
39 | + background: #c8162c; | |
40 | +} | |
41 | +.xc-qr-frame{ | |
42 | + width:560rpx; | |
43 | + height: 280rpx; | |
44 | + background: #fff; | |
45 | + z-index: 55; | |
46 | + position: fixed; | |
47 | + top:40%; | |
48 | + padding-bottom:20rpx; | |
49 | + left:50%; | |
50 | + margin-left: -280rpx; border-radius:10rpx | |
51 | +} | |
52 | + | |
53 | +.ck_btn{width:44%;height:52rpx;line-height:60rpx;background:#f35e73;border-radius:10rpx;} | |
54 | + | |
55 | +.fs36{ font-size: 36rpx; } | |
56 | +.fs30{ font-size: 30rpx; } | |
57 | + | |
58 | +.Opening_bk image { | |
59 | + position: absolute; width: 100%; height: 320rpx; | |
60 | +} | |
61 | +.flex {display: flex;} | |
62 | +.jc-center{ justify-content: center;} | |
63 | +.ai-center{align-items: center;} | |
0 | 64 | \ No newline at end of file | ... | ... |