这是小程序的后端接口
- wxapi - 微信小程序开发接口工具包
微信小程序接口工具包,无需服务器,无需开发后台,开箱即用,轻松开发小程序
交流 QQ 群: 629639122
欢迎大家进群交流,文档持续更新中...
-
将本项目文件夹 "wxapi" 复制到您的小程序根目录;
-
修改 config.js 文件, subDomain 改为你自己的域名
你可以 免费开通后台账号 ,开通后查看您的 subDomain 「如何查看专属 subDomain」
-
登录你的小程序后台,设置小程序合法服务器域名,修改后需要重启小程序开发工具才能生效
-
在您需要的地方引用工具类
const WXAPI = require('wxapi/main')
或者
import WXAPI from 'wxapi/main'
-
根据下面的文档调用接口即可
调用:
WXAPI.queryMobileLocation({ mobile: '13500000000' }).then(res => {
console.log('接口成功返回:', res)
}).catch(e => {
console.error('接口调用异常:', e)
})
返回:
{
"code": 0,
"data": {
"areaCode": "020",
"cardType": "GSM",
"cityName": "广州",
"code": 1350000,
"id": 60113,
"postCode": "510000",
"province": "广东",
"segmentName": "**移动"
},
"msg": "success"
}
接口参数说明: 「查看接口文档」
WXAPI.register(Object object)
WXAPI.login(Object object)
WXAPI.checkToken(token)
WXAPI.bindMobile(Object object)
WXAPI.userDetail(token)
WXAPI.province()
WXAPI.nextRegion(pid)
WXAPI.queryMobileLocation(Object object)
WXAPI.banners(Object object)
WXAPI.cmsCategories()
WXAPI.cmsArticles(Object object)
WXAPI.cmsArticleDetail(id)
WXAPI.goodsCategory()
WXAPI.goods(Object object)
WXAPI.goodsDetail(id)
WXAPI.goodsPrice(Object object)
WXAPI.goodsReputation(Object object)
WXAPI.vipLevel()
WXAPI.queryConfig(Object object)
WXAPI.queryConfigBatch(keys)
WXAPI.videoDetail(videoId)
WXAPI.coupons(Object object)
WXAPI.fetchCoupons(Object object)
WXAPI.myCoupons(Object object)
WXAPI.noticeList(Object object)
WXAPI.noticeDetail(id)
WXAPI.orderStatistics(token)
WXAPI.orderCreate(Object object)
WXAPI.orderList(Object object)
WXAPI.orderDetail(id, token)
WXAPI.orderDelivery(orderId, token)
WXAPI.orderReputation(Object object)
WXAPI.orderClose(orderId, token)
WXAPI.orderPay(orderId, token)
WXAPI.refundApply(token, orderId, type, logisticsStatus, reason, amount, remark, pic)
WXAPI.refundApplyDetail(token, orderId)
WXAPI.refundApplyCancel(token, orderId)
WXAPI.scoreRules(Object object)
WXAPI.scoreSign(token)
WXAPI.scoreSignLogs(Object object)
WXAPI.scoreTodaySignedInfo(token)
WXAPI.scoreExchange(number, token)
WXAPI.shareGroupGetScore(referrer, encryptedData, iv)
WXAPI.scoreLogs(Object object)
WXAPI.addTempleMsgFormid(Object object)
WXAPI.sendTempleMsg(Object object)
WXAPI.queryAddress(token)
WXAPI.addAddress(Object object)
WXAPI.updateAddress(Object object)
WXAPI.defaultAddress(token)
WXAPI.addressDetail(id, token)
WXAPI.defaultAddress_v2(token)
WXAPI.addressDetail_v2(id, token)
WXAPI.deleteAddress(id, token)
WXAPI.wxpay(Object object)
WXAPI.alipay(Object object)
WXAPI.kanjiaList(Object object)
WXAPI.kanjiaSet(goodsId)
WXAPI.kanjiaJoin(kjid, token)
WXAPI.kanjiaDetail(kjid, joiner)
WXAPI.kanjiaHelp(kjid, joiner, token, remark)
WXAPI.kanjiaHelpDetail(kjid, joiner, token)
WXAPI.pingtuanSet(goodsId)
WXAPI.pingtuanOpen(goodsId, token)
WXAPI.pingtuanList(goodsId)
WXAPI.fxApply(token, name, mobile)
WXAPI.fxApplyProgress(token)
WXAPI.fxMembers(Object object)
WXAPI.fxCommisionLog(Object object)
WXAPI.rechargeSendRules()
WXAPI.userAmount(token)
WXAPI.cashLogs(Object object)
WXAPI.withDrawApply(money, token)
WXAPI.payBillDiscounts()
WXAPI.payBill(Object object)
WXAPI.wxaQrcode(Object object)
WXAPI.virtualTraderList(Object object)
WXAPI.virtualTraderInfo(token, id)
WXAPI.virtualTraderBuy(token, id)
WXAPI.virtualTraderBuyLogs(Object object)
WXAPI.shopSubList(Object object)
WXAPI.shopSubdetail(id)
WXAPI.uploadFile(token, tempFilePath)