MCPcopy Create free account
hub / github.com/CoderOpen/waimai / getCode

Function getCode

front/common/authorize.js:115–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113
114// 获取code
115const getCode = provider => {
116 return new Promise((resolve, reject) => {
117 if (!provider) { reject("获取缺少provider参数") }
118 uni.login({
119 provider: provider,
120 success: function(loginRes) {
121 if (loginRes && loginRes.code) { resolve(loginRes.code) } else { reject("获取code失败") }
122 },
123 fail:function(){ reject("获取code失败")}
124 });
125 })
126}
127
128// 获取用户信息
129const getUserInfo = (provider)=>{

Callers

nothing calls this directly

Calls 1

loginMethod · 0.80

Tested by

no test coverage detected