<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                **微信小程序 跳轉頁面** 小程序頁面有2種跳轉,可以在wxml頁面或者js中: **1,在wxml頁面中:** 123&lt;navigator url="../index/index"&gt;跳轉到新頁面&lt;/navigator&gt;&lt;navigator url="../index/index" open-type="redirect"&gt;在當前頁打開&lt;/navigator&gt;&lt;navigator url="../index/index" open-type="switchTab"&gt;切換到首頁Tab&lt;/navigator&gt; **2,在js頁面中:** ?![](https://img.jbzj.com/file_images/article/201701/2017116161829907.png?2017016161844) **【注意】**此處注意兩個關鍵詞 “應用內的頁面” 和 “tabBar頁面”。? app.json文件中tabBar中注冊過的tab頁,即為“tabBar頁面”,非tabBar中注冊占用的頁面即為“應用內的頁面” 。 如下圖:home頁面為“應用內的頁面”,index和logs頁面則為 “tabBar頁面”。 ?![](https://img.jbzj.com/file_images/article/201701/2017116161859897.png?2017016161912) ~~~ const app = getApp(); Page({ //定義全局變量data data: { account: "", password: "", //message:"" }, //處理accountInput的觸發事件 accountInput:function(e){ var username = e.detail.value;//從頁面獲取到用戶輸入的用戶名/郵箱/手機號 if (username != ''){ this.setData({ account: username });//把獲取到的密碼賦值給全局變量Date中的password } }, //處理pwdBlurt的觸發事件 pwdBlur:function(e){ var pwd = e.detail.value;//從頁面獲取到用戶輸入的密碼 if (pwd != ''){ this.setData({ password: pwd });//把獲取到的密碼賦值給全局變量Date中的password } }, //處理login的觸發事件 login: function (e) { var account=this.data.account; var password= this.data.password; if(account=='' || password==''){ wx.showModal({ title: '提示', content:'用戶名、密碼不能為空', showCancel:false }); return false; } wx.request({ url: 'https://dc.bilalipay.com/myxcx/web/api.php',//登錄url //定義傳到后臺的數據 data: { //從全局變量data中獲取數據 account: account, password:password, m: "login", }, method: 'post',//定義傳到后臺接受的是post方法還是get方法 header: { 'content-type': 'application/json' // 默認值 }, success: function (res) { console.log("調用API成功"); // console.log(res.data.code) if (res.data.code==200){ wx.showToast({ title: '登陸成功', }); //跳轉頁面,上級目錄 wx.redirectTo({ url: '../main/index' }) }else{ wx.showModal({ title: '提示', content:'用戶名或者密碼錯誤', showCancel:false }) } }, fail: function (res) { console.log("調用API失敗"); } }) } }); ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看