feat: 增加微信判断
This commit is contained in:
parent
afdd07a5c1
commit
315cc37311
|
@ -1,4 +1,4 @@
|
|||
let baseurl = "http://pre.marketapi.1688sup.com";
|
||||
let baseurl = "http://192.168.6.75";
|
||||
let pathname = window.location.host;
|
||||
|
||||
function global_dev_fun(hots) {
|
||||
|
|
|
@ -122,9 +122,9 @@
|
|||
let self = this;
|
||||
//获取链接携带的参数
|
||||
let linkId = getQueryString('id');
|
||||
// let linkId = "2460"
|
||||
let keyCode = getQueryString('key');
|
||||
// let keyCode = "AAACD7YNCF83rnPr"
|
||||
// let linkId = "2502"
|
||||
// let keyCode = "AAACFqXSu4J3spMz"
|
||||
if (!linkId) {//地址栏无携带id
|
||||
let path = window.location.pathname;
|
||||
let parmas = path.split('/');
|
||||
|
|
13
libs.js
13
libs.js
|
@ -71,3 +71,16 @@ const pageOutTime = (timestamp) => {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 判断是否是微信环境
|
||||
* @returns
|
||||
*/
|
||||
const globalIsWx = () => {
|
||||
let wx = navigator.userAgent.toLowerCase();
|
||||
if (wx.match(/MicroMessenger/i) === "micromessenger") {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
packkey 加了包码埋点
|
|
@ -0,0 +1,16 @@
|
|||
说明:该文件是通过前端判断环境,进入不同页面进行立减金领取
|
||||
|
||||
|
||||
# 微信环境
|
||||
如果是微信可以进行公众号领取
|
||||
|
||||
# App环境
|
||||
如果是App环境,拉起微信小程序,领取
|
||||
|
||||
# 支付宝环境
|
||||
走以前逻辑
|
||||
|
||||
点击立即领取 -> 判断是否是 微信环境
|
||||
是微信环境 -> 微信环境,走微信公众号授权 -> 获取openid -> 领取立减金
|
||||
不是微信环境 -> 拉起微信小程序领取 -> 参数:拉起代码 wx:xxxxx -> 领取立减金
|
||||
|
Loading…
Reference in New Issue