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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
{yun:}include file="$wapstyle/header.htm"{/yun}
<style>
    body {
        background: #fff
    }
</style>
<!-- 页面头部返回按钮 -->
<div class="Back_to_the_previous_level">
    <div class="login_back" onclick="goBack()">
        <img src="{yun:}$wap_style{/yun}/images/return.png" alt="" width="100%" height="100%">
    </div>
</div>
<div class="login_cont">
    <div class="bottom_nav_bom" style="padding-top: 0px; text-align: right;"><i class="bottom_nav_bom_word">还没有账号,</i> <a href="{yun:}url m=wap c=register{/yun}" class="register_1">马上注册</a></div>
    <div class="login_welcome">
        <div>您好,</div>
        <div>欢迎登录</div>
    </div>
    {yun:}if $wxid && ($wxnickname || $wxpic){/yun}
        <div class="login_titlebox">
            <div class="login_title_logo">
                <img src="{yun:}$wxpic{/yun}" alt="" width="100%" height="100%">
            </div>
            <div class="login_title_info">
                您已登录微信账号,<i>登录绑定已有账户</i>
            </div>
        </div>
    {yun:}elseif isset($maglogin){/yun}
        <!--马甲登录start -->
        <div class="login_titlebox">
        <div class="login_title_logo">
            <img src="{yun:}$smarty.session.mag.head{/yun}" alt="" width="100%" height="100%">
        </div>
        <div class="login_title_info">
            您已登录{yun:}$config.sy_magwebname{/yun},<i>登录绑定已有账户</i>
        </div>
    </div>
    {yun:}elseif isset($qfylogin){/yun}
        <!--千帆云登录start -->
        <div id="qfydiv" class="login_titlebox" style="display: none;">
            <div class="login_title_logo">
                <img id="qfyhead" src="" alt="" width="100%" height="100%">
            </div>
            <div class="login_title_info">
                您已登录{yun:}$config.sy_qfywebname{/yun},<i>登录绑定已有账户</i>
            </div>
        </div>
        <script>
            //千帆云app内获取当前登录用户信息
            QFH5ready();
            function QFH5ready() {
                if (typeof (QFH5) != 'undefined') {
                    QFH5.getUserInfo(function (state, data) {
                        if (state == 1) {
                            //登录状态,有数据
                            var uid = data.uid;//用户UID int
                            var username = data.username;//用户名称 string
                            var face = data.face;//用户头像地址 string
                            document.getElementById('qfyuid').value = uid;
                            //document.getElementById('qfyname').innerHTML = username;
                            document.getElementById('qfyhead').setAttribute('src', face);
                            document.getElementById('qfydiv').removeAttribute('style');
                            $.post('index.php?c=login&a=qfybind', {qfyuid: uid}, function (data) {
                                var jsonObject = eval("(" + data + ")");
                                if (jsonObject.error > 0) {
                                    window.location.href = wapurl + jsonObject.url;
                                }
                            })
                        }
                    })
                }
            }
        </script>
        <!--千帆云登录 end-->
    {yun:}/if{/yun}
 
    <!-- form表单区域 -->
    <form id="login_form">
        <input id="qfyuid" name="qfyuid" type="hidden" value=""/>
        <input type="hidden" name="backurl" id="backurl" value="{yun:}$backurl{/yun}"/>
        <input type="hidden" name="act_login" id="act_login" value="0"/>
        <input name="usertype" type="hidden" value="{yun:}$smarty.get.usertype{/yun}"/>
        <input name="wxid" type="hidden" value="{yun:}$smarty.get.wxid{/yun}"/>
        {yun:}if $smarty.get.job{/yun}
        <input name="job" type="hidden" value="{yun:}$smarty.get.job{/yun}"/>
        {yun:}/if{/yun}
 
        <div class="The_login_subject">
            <div id="login_normal_box">
                <div class="login_textbox">
                    <input type="text" name="username" autocomplete="off" placeholder="请输入用户名/邮箱/手机号" class="account_number">
                </div>
                <div class="login_textbox">
                    <input type="password" id="password" value="" name="password" placeholder="请输入密码"/>
                    <input type="text" id="login_password" style="display: none"/>
                    <div class="close_open"><img src="{yun:}$wap_style{/yun}/images/conceal.png" alt="" width="100%" height="100%" id="close"></div>
                </div>
            </div>
            <!--手机动态码登录-->
            {yun:}if $config.sy_msg_login==1{/yun}
            <div id="login_sj_box" class="login_textbox" style="display:none;">
                <input type="tel" value="" autocomplete="off" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" placeholder="请输入手机号" name="moblie" id="usermoblie" class="account_number">
            </div>
            {yun:}/if{/yun}
 
            {yun:}if strstr($config.code_web, '前台登录'){/yun}
                <div>
                    {yun:}if $config.code_kind>2{/yun}
                    <div class="gtdx-captcha">
                        <div id="bind-captcha" data-id='login_bth' data-type='click'></div>
                        <input type='hidden' id="verify_token" name="verify_token" value="" />
                        <input type='hidden' id="popup-submit" />
                        <input type='hidden' id="bind-submit" />
                    </div>
                    {yun:}else{/yun}
                    <div class="login_textbox">
                        <input class="inputitemtxt" placeholder="图片验证码" name="authcode" id="checkcode" type="text"
                               maxlength="6"/>
                        <img id="vcode_img" class="authcode" src="{yun:}$config.sy_wapdomain{/yun}/authcode.inc.php"
                             onclick="checkCode('vcode_img');"/>
                    </div>
 
                    {yun:}/if{/yun}
                </div>
            {yun:}/if{/yun}
 
            {yun:}if $config.sy_msg_login==1{/yun}
                <div class="passwords" id="login_sjyz_box" style="display:none;">
                    <div class="login_textbox">
                        <input name="dynamiccode" type="text" maxlength='6' class="inputitemtxt" value="" placeholder="输入短信验证码" onblur="changeCaptcha()"/>
                        <input type="password" id="login_code" style="display: none"/>
                        <div class="dx_yz_hq" id="send_msg_tip" onclick="send_msg('{yun:}$config_wapdomain{/yun}/index.php?c=login&a=sendmsg');"> 获取验证码</div>
                    </div>
                </div>
            {yun:}/if{/yun}
            <div class="login_xy">
                <div class="login_xy_zx">
                    <input type="checkbox" id="xieyicheck" name="xieyicheck" value="1" checked onclick="choosexie(this)"/>
                </div>
                <div>
                    <i class="policy">我已同意</i>
                    <a href="{yun:}url m=wap c=protocol{/yun}" class="Privacy">《用户协议》</a>
                    <i class="policy">和</i>
                    <a href="{yun:}url m=wap c=privacy{/yun}" class="Privacy">《隐私政策》</a>
                </div>
            </div>
            <div id="login_bth" class="login_bth" onclick="login()">登录</div>
        </div>
 
        {yun:}if $checkurl!="{yun:}url m=wap c=forgetpw{/yun}"{/yun}
        <input type="hidden" name="checkurl" value="{yun:}$checkurl{/yun}"/>
        {yun:}/if{/yun}
    </form>
    <!-- 验证码 -->
    <div class="login_otherfs">
        {yun:}if $config.sy_msg_isopen==1 && $config.sy_msg_login==1{/yun}
        <div class="verification_code_word" id="mobile_login">短信登录</div>
        {yun:}/if{/yun}
        <div class="verification_code_word" id="acount_login" style="display: none"> 用户名登录</div>
        <a href="{yun:}url m=wap c=forgetpw{/yun}" class="login_wjmm">忘记密码</a>
    </div>
</div>
<!-- 另外的登录方式 -->
{yun:}if $config.sy_qqlogin==1 || $config.sy_sinalogin==1 || ($config.wx_rz==1 && !$wxid){/yun}
<div class="bottom_nav">
    <div class="bottom_nav_top">或通过以下方式登录</div>
    <div class="bottom_nav_center">
        {yun:}if $config.wx_rz==1 && !$wxid{/yun}
        <a class="bottom_nav_center_logo" href="{yun:}url m=wap c=wxconnect{/yun}">
            <img src="{yun:}$wap_style{/yun}/images/weixin.png" alt="" width="100%" height="100%">
        </a>
        {yun:}/if{/yun}
        {yun:}if $config.sy_qqlogin==1{/yun}
            <a class="bottom_nav_center_logo" href="{yun:}$config.sy_weburl{/yun}/qqlogin.php">
                <img src="{yun:}$wap_style{/yun}/images/QQ@2x.png" alt="" width="100%" height="100%">
            </a>
        {yun:}/if{/yun}
        {yun:}if $config.sy_sinalogin==1{/yun}
            <a class="bottom_nav_center_logo" href="{yun:}url m=wap c=sinaconnect{/yun}">
                <img src="{yun:}$wap_style{/yun}/images/weibu.png" alt="" width="100%" height="100%">
            </a>
        {yun:}/if{/yun}
    </div>
 
</div>
{yun:}/if{/yun}
 
{yun:}include file="$wapstyle/publichtm/public_js.htm"{/yun}
<script src="{yun:}$wap_style{/yun}/js/reg_ajax.js?v={yun:}$config.cachecode{/yun}"></script>
{yun:}include file="$wapstyle/verify_js.htm"{/yun}
<script>
    var wapurl = "{yun:}url m=wap{/yun}",
        weburl = "{yun:}$config.sy_weburl{/yun}",
        code_web = '{yun:}$config.code_web{/yun}',
        code_kind = '{yun:}$config.code_kind{/yun}',
        sy_login_type = '{yun:}$config.sy_login_type{/yun}';
 
    $(document).ready(function () {
        $('#close').on('click', function () {
            var $inp = $('#password');
            $inp.attr('type') === 'password' ? $inp.attr('type', 'text') : $inp.attr('type', 'password')
            $(this).attr('src') == '{yun:}$wap_style{/yun}/images/conceal.png' ? $(this).attr('src', '{yun:}$wap_style{/yun}/images/conceal_1.png') : $(this).attr('src', '{yun:}$wap_style{/yun}/images/conceal.png')
        });
        $("#username").focus(function () {
            var txAreaVal = $(this).val();
            if (txAreaVal == this.defaultValue) {
                $(this).attr("placeholder", "");
            }
        }).blur(function () {
            var txAreaVal = $(this).val();
            if (txAreaVal == this.defaultValue || $(this).val() == "") {
                $(this).attr("placeholder", "请输入用户名/邮箱/手机号");
            }
        })
        $("#password").focus(function () {
            var txAreaVal = $(this).val();
            if (txAreaVal == this.defaultValue) {
                $(this).attr("placeholder", "");
            }
        }).blur(function () {
            var txAreaVal = $(this).val();
            if (txAreaVal == this.defaultValue || $(this).val() == "") {
                $(this).attr("placeholder", "请输入您的密码");
            }
        })
        $("#usermoblie").focus(function () {
            var txAreaVal = $(this).val();
            if (txAreaVal == this.defaultValue) {
                $(this).attr("placeholder", "");
            }
        }).blur(function () {
            var txAreaVal = $(this).val();
            if (txAreaVal == this.defaultValue || $(this).val() == "") {
                $(this).attr("placeholder", "请输入手机号");
            }
        })
        $(".inputitemtxt").focus(function () {
            var txAreaVal = $(this).val();
            if (txAreaVal == this.defaultValue) {
                $(this).attr("placeholder", "");
            }
        }).blur(function () {
            var txAreaVal = $(this).val();
            if (txAreaVal == this.defaultValue || $(this).val() == "") {
                $(this).attr("placeholder", "请输入短信验证码");
            }
        })
        //账号登录和手机登录tab选择
        $('#acount_login').click(function (data) {
            $('#acount_login').css("display", "none");
            $('#mobile_login').css("display", "block");
            $('#login_normal_box').css("display", "block");
            $('#login_sj_box').css("display", "none");
            $('#login_sjyz_box').css("display", "none");
            $('#act_login').val('0');
            $('#bind-captcha').attr('data-id', 'login_bth');
            $('#bind-captcha').attr('data-type', 'click');
        });
        $('#mobile_login').click(function (data) {
            $('#mobile_login').css("display", "none");
            $('#acount_login').css("display", "block");
            $('#login_sj_box').css("display", "block");
            $('#login_sjyz_box').css("display", "block");
            $('#login_normal_box').css("display", "none");
            $('#act_login').val('1');
            $('#bind-captcha').attr('data-id', 'send_msg_tip');
            $('#bind-captcha').attr('data-type', 'click');
        });
 
        if (sy_login_type == '2' && $('#mobile_login')) {
            $('#mobile_login').trigger("click");
        }
    });
    var Timer;
    var smsTimer_time = 90; //倒数 90
    var smsTimer_flag = 90; //倒数 90
    var smsTime_speed = 1000; //速度 1秒钟
 
    //发送手机短信
    function send_msg(url) {
        var moblie = $('#usermoblie').val();
        var code;
 
        var verify_token;
        if (moblie == "" || moblie == "请输入手机号码") {
 
            showToast("请输入手机号码!");
            return false;
        } else {
 
            if (!isjsMobile(moblie)) {
                showToast('手机格式错误!');
                return false;
            }
        }
        var codesear = new RegExp('前台登录');
        if (codesear.test(code_web)) {
            if (code_kind == 1) {
                code = $.trim($("#checkcode").val());
                if (!code) {
                    showToast('请填写图片验证码!');
                    return false;
                }
            } else if (code_kind > 2) {
                // 验证类型改成短信
                $('#bind-captcha').attr('data-id', 'send_msg_tip');
                $('#bind-captcha').attr('data-type', 'click');
                verify_token = $('input[name="verify_token"]').val();
                if (verify_token == '') {
                    $("#bind-submit").trigger("click");
                    return false;
                }
            }
        }
        if (smsTimer_time == smsTimer_flag) {
            showLoading();
            $.post(url, {
                moblie: moblie,
                authcode: code,
                verify_token: verify_token
            }, function (data) {
                hideLoading();
                if (data) {
                    var res = JSON.parse(data);
                    if (res.error == 1) {
                        Timer = setInterval("smsTimer($('#send_msg_tip'))", smsTime_speed);
                    }
                    showToast(res.msg, 2, function () {
                        if (res.error != 1) {
                            if (code_kind == 1) {
                                checkCode('vcode_img');
 
                            } else if (code_kind > 2) {
                                $("#popup-submit").trigger("click");
                            }
                        }
                    });
                }
            })
        } else {
            showToast('请勿重复发送!', 2);
            return false;
        }
    }
 
    //倒计时
    function smsTimer(obj) {
        if (smsTimer_flag > 0) {
            $(obj).html('重新发送(' + smsTimer_flag + 's)');
            $(obj).attr({
                'style': 'background: ;'
            });
            smsTimer_flag--;
        } else {
            $(obj).html('重新发送');
            $(obj).attr({
                'style': 'background: ;'
            });
            smsTimer_flag = smsTimer_time;
            clearInterval(Timer);
        }
    }
 
    function changeCaptcha() {
        // 验证类型改成提交
        $('#bind-captcha').attr('data-id', 'login_bth');
        $('#bind-captcha').attr('data-type', 'click');
    }
</script>
</body>
</html>