chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
{yun:}include file="$wapstyle/member/header.htm"{/yun} 
<style type="text/css" media="screen">
    .deposit_header_reminder div{display: inline-block}
</style>
<div id="yunvue" class="none">
    <div class="tx_wxtsbg">
    <div class="tx_wxts">温馨提示:
        <span v-if="withdraw_minmoney>0">单笔提现金额必须达到{{withdraw_minmoney}}元,</span>
        <span v-if="withdraw_num>0">单次提现收取每笔{{withdraw_pound}}%手续费,</span>
        <span v-if="withdraw_money>0">{{withdraw_money}}元以内及时到账,超过{{withdraw_money}}元需审核。</span>
        注意:提现到微信账户,请先绑定微信 
        </div>
        
    
    
    <div class="tx_body">
        <div class="deposit_body_card">
            <div class="deposit_money_body_card">
                <div class="money_card_box">
                    <div class="card_box_name">我的钱包</div>
                    <div class="card_box_number">
                        <i class="card_number_icon">¥</i> {{packfk}}</div>
                </div>
                <div class="money_card_hint"></div>
                <div class="money_card_box">
                    <div class="card_box_name">冻结金额</div>
                    <div class="card_box_number">
                        <i class="card_number_icon">¥</i> {{freeze}}</div>
                </div>
               
            </div>
            <div class="deposit_card_namebox">
                <div class="deposit_card_name">真实姓名</div>
                <div class="deposit_card_import">
                    <input type="text" @input="inputname" placeholder="请输入真实姓名">
                </div>
            </div>
            <div class="deposit_card_namebox">
                <div class="deposit_card_name">提现金额</div>
                <div class="deposit_card_importmoney">
                    <input type="digit" v-model="price" @input="changeprice" 
                                    maxlength="8" name="price" placeholder="请输入提现金额">
                </div>
            </div>
        </div>
        <div class="deposit_body_btn" @click="withdrawSubmit" v-if="next">立即提现</div>
        <div class="deposit_body_btn" @click="withdrawSubmit" v-if="nextno">不可提现</div>
    </div>
</div>
</div>
<script>  
  new Vue({
    el: '#yunvue',
    data: {
        withdraw_money: 0,
        withdraw_num: 0,
        withdraw_minmoney: 0,
        withdraw_pound: 0,
        next: false,
        nextno: false,
        packfk: 0,
        freeze: 0,
        price: '',
        oprice: '',
        statis: [],
        real_name:''
    },
    watch: {
        price(newval){
            this.price = newval;
        }
    },
    created() {   
     this.getStatis();
    },
    methods:{
        changeprice: function(e) {
            this.oprice = e.target.value;
            
            var re = /^\d*\.{0,1}\d{0,2}$/;
            if (re.exec(this.oprice)) {
                this.price = this.oprice;
            } else {
                this.price = 0;
            }
        }, 
        inputname:function(e){
            this.real_name = e.target.value;
 
        },       
          getStatis:function(){
            showLoading();
            var that = this;
               $.post('{yun:}url d=wxapp h=user m=finance c=getStatis{/yun}',{rand:Math.random()},function(data){
                  hideLoading();      
                  if (data.error == 1) {
                    that.statis = data.data.statis;
                    that.withdraw_money = data.data.withdraw_money;
                    that.withdraw_num = data.data.withdraw_num;
                    that.withdraw_minmoney = data.data.withdraw_minmoney;
                    that.withdraw_pound = data.data.withdraw_pound;
                    that.packfk = that.statis.packfk > 0 ? that.statis.packfk : 0;
                    that.freeze = that.statis.freeze > 0 ? that.statis.freeze : 0;
                    that.next = (that.packfk >= that.withdraw_minmoney) ? true : false;
                    that.nextno = that.next ? false : true;
                }
                    $("#yunvue").css('display', 'block');
            },'json');
          },
          withdrawSubmit:function(){
            var that = this;
            var minchangeprice = that.packprice_min_recharge;
            if(that.real_name == ''){                
                showToast('请填写真实姓名');
            }else if (that.price<1) {                
                return showToast('请正确填写提现金额');
            } else {
                var paramer = {
                    'price': that.price,
                    'real_name': that.real_name,
                };
                $.post('{yun:}url d=wxapp h=user m=finance c=withdraw{/yun}',paramer,function(data){
                      hideLoading();      
                      if (data.error == 1) {
                        showToast(data.msg,2, function() {
                              window.location.href="index.php?c=loglist";
                        });
                    }else if(data.error == 8){
                        showConfirm(data.msg, function() {
                            window.location.href="index.php?c=binding";
                        }, '取消', '前往绑定');
                    }else{
                         showToast(data.msg);
                    }
               
                },'json');
            }
        },       
          accMul: function(arg1, arg2) {
            var m = 0,
                s1 = arg1.toString(),
                s2 = arg2.toString();
            try {
                m += s1.split(".")[1].length
            } catch (e) {}
            try {
                m += s2.split(".")[1].length
            } catch (e) {}
        
            return Number(s1.replace(".", "")) * Number(s2.replace(".", "")) / Math.pow(10, m);
        },
        //加
        accAdd: function(arg1, arg2) {
            var r1, r2, m;
            try {
                r1 = arg1.toString().split(".")[1].length
            } catch (e) {
                r1 = 0
            }
            try {
                r2 = arg2.toString().split(".")[1].length
            } catch (e) {
                r2 = 0
            }
            m = Math.pow(10, Math.max(r1, r2))
            return (arg1 * m + arg2 * m) / m
        },  
          pageChange:function(e){
      
            location.href = 'index.php?c=spview&page='+e;
          },
          pageTo:function(url){
             window.location.href = url;
          }
    } 
  });
</script>
</body>
</html>