背景:笔者在调试微信支付调试的好好的,突然报错,一看日志,好家伙 TypeError: uni.requestPayment is not a function
此时看着IDE中能点进去的uni.requestPayment不禁陷入了沉思
真相只有一个
你的manifest.json没配置支付能力,笔者对比了之前做到项目发现少了个配置,本次的新项目是用unibest生成的,估计默认没配置支付能力或者笔者漏选了

还有这里

json
"sdkConfigs" : {
"payment" : {
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "you appId",
"UniversalLinks" : ""
}
}
},
笔者使用的是unibest框架,不能直接编辑mainfest.json文件,会被覆写,需要修改在这里

