欧美日韩国产一区,亚洲一区视频,色综合久久久久,私密按摩师舌头伸进去了,99re6这里只有精品,夜夜性日日交xxx性hd

微信小程序?qū)嵗?手機(jī)號(hào)歸屬地查詢

  • • 發(fā)表于 9年前
  • • 作者 JackLi
  • • 4553 人瀏覽
  • • 9 條評(píng)論
  • • 最后編輯時(shí)間 9年前
  • • 來(lái)自 [技 術(shù)]

原創(chuàng)聲明:本文為作者原創(chuàng),未經(jīng)允許不得轉(zhuǎn)載,經(jīng)授權(quán)轉(zhuǎn)載需注明作者和出處

手機(jī)號(hào)歸屬地查詢

碼云地址: https://git.oschina.net/GreenLittleApple/wx_xiaochengxu01.git

先上圖

代碼解析
很簡(jiǎn)單, 一個(gè)js就能搞定。
1、 顯示頁(yè)面

<!--index.wxml-->
<view class="body">
  // 輸入框
  <input type="number" maxlength="11" auto-focus class="phoneInput" bindinput="listenPhoneInput" />
  // 查詢按鈕(bindtap點(diǎn)擊事件, 相當(dāng)于onclick)
  <button type="primary"  bindtap="queryHome4Phone" class="btnQuery"> 查詢 </button>
  // 結(jié)果顯示
  <text class="result" wx:if="{{province != ''}}">
    {{message}}
  </text>
</view>

2、 控制代碼 js

// 監(jiān)聽(tīng)手機(jī)號(hào)輸入
  listenPhoneInput: function(e) {
      this.data.phoneNumber = e.detail.value
  },

  // 查詢手機(jī)號(hào)歸屬地
  queryHome4Phone: function() {
    var page = this
    console.log("手機(jī)號(hào)是"+ this.data.phoneNumber)

    // 網(wǎng)絡(luò)請(qǐng)求
    wx.request({
      url: 'http://apis.juhe.cn/mobile/get', // 接口地址
      data: { // 參數(shù)
        phone: this.data.phoneNumber,
        key: '自己申請(qǐng)key(用的聚合數(shù)據(jù))'
      },
      header: {
        'Content-Type': 'application/json',
      },
      success: function(res) { // 成功回調(diào)函數(shù)
        var result = res.data
        console.log(res.data)
        if(result.error_code == 201101) {
            page.setData({
              message: '手機(jī)號(hào)不能為空'
          })
        } else if(result.error_code == 201102) {
            page.setData({
              message: '錯(cuò)誤的手機(jī)號(hào)碼'
            })
        } else if(result.error_code == 201103) {
            page.setData({
              message: '查詢無(wú)結(jié)果'
            })
        } else {
          page.setData({ // 組合結(jié)果
            message: result.result.province + " " + result.result.city + " " + result.result.company
          })
        }
      }
    })
  },
分享到:
9條評(píng)論
Ctrl+Enter
作者

JackLi

JackLi

APP:1 帖子:23 回復(fù):64 積分:1290

已加入社區(qū)[3114]天

越過(guò)山丘,才發(fā)現(xiàn)無(wú)人等候

作者詳情》
Top