Commit a01abadf authored by gengchunlei's avatar gengchunlei

小程序 楚晓康小程序对接

parent c121de7f
......@@ -131,3 +131,9 @@ export const addDestroyApply = params => {
export const getUserInfoByIdCard = params => {
return apiInstance.get(`/stock-info/v1/api/phone-h5/stock-provide-record/get-residents-info-by-id-card`, {params})
}
//小程序根据token获取手机号
export const getPhoneByXCXToken = params => {
return apiInstance.post(`/stock-info/api/yzdj-api-app/base-member-phone`, params)
}
......@@ -159,6 +159,7 @@ export function isIOSWebKit1() {
}
}
// 判断是否安卓
export function isAndroid() {
const aa = window.navigator.userAgent;
......@@ -172,3 +173,18 @@ export function isWeiXin() {
const ua = window.navigator.userAgent.toLowerCase()
return /micromessenger/.test(ua)
}
//关闭页面
export function backHome() {
if (isIOSWebKit1()) { //ios
console.log('ios')
callMobile("goIndex", {})
} else if (isAndroid()) {
console.log('Android')
callMobile("goIndex", {})
}
if (isWeiXin()) { // 微信中
console.log('weixin')
WeixinJSBridge.call('closeWindow')
}
}
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment