會員中心QQ、微信綁定會員賬號

一、會員中心賬號綁定微信、QQ功能,cms版本必須在V1.5.8版本以上,如果已經是V1.5.8版本還不可使用,請到官網下載V1.5.8最新更新包覆蓋后使用。


下載地址:http://22321a.com/rizhi/


會員中心QQ、微信綁定會員賬號(圖1)



二、安裝“微信掃碼登錄”(V1.2.2版本以上)和“QQ一鍵登錄”(V1.4.2版本以上),升級到最新版本,并正確配置;


三、在會員中心的信息編輯模板中“\template\pc\users\users_centre.htm”添加如下代碼:


{notempty name="$thirdparty.is_qq"}
    <div class="row relate-box">
        <div class="relate-img fl"> <img src="{eyou:static file='/public/static/common/images/ico-qq.png' /}" alt="">
            <p>QQ</p>
        </div>
        <div class="relate-txt fl">
            {eyou:notempty name="$thirdparty['qq']"}
                {$thirdparty['qq']['nickname']}
            {else /}
                未綁定
            {/eyou:notempty}
        </div>
        <div class="relate-bt fl">
            {eyou:if condition="!empty($thirdparty['qq']) && $users.users_id == $thirdparty['qq']['users_id']"}
            <a class="no" href="javascript:void(0);" onclick="un_qq_code();">
                <div class="hover-box">
                    <span class="before-hover">已綁定</span>
                    <span class="after-hover">解除綁定</span>
                </div>
            </a>
            {else /}
            <a class="ok" href="javascript:void(0);" onclick="bind_qq_code();">綁定</a>
            {/eyou:if}
        </div>
    </div>
    <script type="text/javascript">
        var un_qq_code_url = "{eyou:url link='plugins/QqLogin/bindauth'/}";
        var bind_qq_code_url = "{:url('plugins/QqLogin/login', ['bangding'=>1])}";
    </script>
    {eyou:static file="/public/static/common/js/qq_bind.js"/}
    {/notempty}
    {notempty name="$thirdparty.is_wx"}
    <div class="row relate-box">
        <div class="relate-img fl"> <img src="{eyou:static file='/public/static/common/images/ico-wx.png' /}" alt="">
            <p>微信</p>
        </div>
        <div class="relate-txt fl">
            {eyou:notempty name="$thirdparty['wx']"}
            {$thirdparty['wx']['nickname']}
            {else /}
            未綁定
            {/eyou:notempty}
        </div>
        <div class="relate-bt fl">
            {eyou:if condition="!empty($thirdparty['wx']) && $users.users_id == $thirdparty['wx']['users_id']"}
            <a class="no" href="javascript:void(0);" onclick="un_wx_code();">
                <div class="hover-box">
                    <span class="before-hover">已綁定</span>
                    <span class="after-hover">解除綁定</span>
                </div>
            </a>
            {else /}
            <a class="ok" href="javascript:void(0);" onclick="bind_wx_code();">綁定</a>
            {/eyou:if}
        </div>
    </div>
    <script type="text/javascript">
        var un_wx_code_url = "{eyou:url link='plugins/WxLogin/bindauth'/}";
        var bind_wx_code_url = "{:url('plugins/WxLogin/login', ['fmdo'=>'bangding','bangding'=>1])}";
    </script>
    {eyou:static file="/public/static/common/js/wx_bind.js"/}
    {/notempty}
    </div>
</div>
{/notempty}


顯示效果如下:



會員中心QQ、微信綁定會員賬號(圖2)

PS:如果使用的是第二套會員中心模板,可以到官網日志下載最新版本的模板,解壓后覆蓋“\template\pc\users\users_centre.htm”文件。


會員中心QQ、微信綁定會員賬號(圖3)




文檔最后更新時間:2022-05-18 15:51:36

文檔
目錄

深色
模式

切換
寬度