|
@@ -981,7 +981,7 @@
|
|
|
}
|
|
|
}
|
|
|
window.onload = function() {
|
|
|
- if (getQueryParam('openId')) {
|
|
|
+ if (localStorage.getItem('openId')) {
|
|
|
if(!getQueryParam('externalUserid')) {
|
|
|
mui.alert('无权限访问', '提示', '确定');
|
|
|
} else {
|
|
@@ -1063,19 +1063,20 @@
|
|
|
type:'get',//HTTP请求类型
|
|
|
success:function(res){
|
|
|
h5Type = res.data.h5Type
|
|
|
+ localStorage.setItem('openId', res.data.openId)
|
|
|
if (h5Type == 19) {
|
|
|
document.getElementById('collectPage').style.display = "none"
|
|
|
document.getElementById('lotteryPage').style.display = "block"
|
|
|
// if (!res.data.externalUserid) {
|
|
|
// 进行下一步企微授权
|
|
|
- gerQwAuth(bId, res.data.openId);
|
|
|
+ gerQwAuth(bId);
|
|
|
// }
|
|
|
} else if (h5Type == 20){
|
|
|
document.getElementById('collectPage').style.display = "block"
|
|
|
document.getElementById('lotteryPage').style.display = "none"
|
|
|
// if (!res.data.externalUserid) {
|
|
|
// 进行下一步企微授权
|
|
|
- gerQwAuth(bId, res.data.openId);
|
|
|
+ gerQwAuth(bId);
|
|
|
// }
|
|
|
}
|
|
|
},
|
|
@@ -1092,12 +1093,12 @@
|
|
|
}
|
|
|
};
|
|
|
// 企微授权
|
|
|
- function gerQwAuth (bId, openId) {
|
|
|
+ function gerQwAuth (bId) {
|
|
|
let link = window.location.href
|
|
|
mui.ajax('https://wlapi.wefanbot.com/p/insuite/p/getOAUrl',{
|
|
|
data:{
|
|
|
bId: bId,
|
|
|
- openId: openId,
|
|
|
+ openId: localStorage.getItem('openId'),
|
|
|
},
|
|
|
dataType:'json',//服务器返回json格式数据
|
|
|
type:'get',//HTTP请求类型
|
|
@@ -1134,12 +1135,11 @@
|
|
|
// 发送祝福
|
|
|
function handleSendText() {
|
|
|
let bId = getQueryParam('bId')
|
|
|
- let openId = getQueryParam('openId')
|
|
|
let textareaResult = document.getElementById("textarea").value;
|
|
|
mui.ajax('https://wlapi.wefanbot.com/scrm/v1/mp-collect/p/add', {
|
|
|
data:{
|
|
|
bId: bId,
|
|
|
- openId: openId,
|
|
|
+ openId: localStorage.getItem('openId'),
|
|
|
content: textareaResult,
|
|
|
imgList: imgList,
|
|
|
},
|
|
@@ -1306,11 +1306,10 @@
|
|
|
let remainingTimes = 0
|
|
|
// 获取抽奖信息
|
|
|
function raffleInfo() {
|
|
|
- let openId = getQueryParam('openId')
|
|
|
let raffleId = getQueryParam('bId')
|
|
|
mui.ajax('https://wlapi.wefanbot.com/scrm/v1/wxcp-raffle/p/raffleInfoByOpenId',{
|
|
|
data:{
|
|
|
- openId: openId,
|
|
|
+ openId: localStorage.getItem('openId'),
|
|
|
raffleId: raffleId,
|
|
|
},
|
|
|
dataType:'json',//服务器返回json格式数据
|
|
@@ -1374,12 +1373,11 @@
|
|
|
stopRotation = false
|
|
|
rotateActive();
|
|
|
let externalUserid = getQueryParam('externalUserid')
|
|
|
- let openId = getQueryParam('openId')
|
|
|
let raffleId = getQueryParam('bId')
|
|
|
mui.ajax('https://wlapi.wefanbot.com/scrm/v1/wxcp-raffle/p/lottery',{
|
|
|
data:{
|
|
|
externalUserid: externalUserid,
|
|
|
- openId: openId,
|
|
|
+ openId: localStorage.getItem('openId'),
|
|
|
raffleId: raffleId,
|
|
|
},
|
|
|
dataType:'json',//服务器返回json格式数据
|
|
@@ -1447,11 +1445,10 @@
|
|
|
};
|
|
|
// 获取抽奖记录
|
|
|
function raffleRecord() {
|
|
|
- let openId = getQueryParam('openId')
|
|
|
let raffleId = getQueryParam('bId')
|
|
|
mui.ajax('https://wlapi.wefanbot.com/scrm/v1/wxcp-raffle/p/raffleRecord',{
|
|
|
data:{
|
|
|
- openId: openId,
|
|
|
+ openId: localStorage.getItem('openId'),
|
|
|
raffleId: raffleId,
|
|
|
page: 1,
|
|
|
pageCount: 1000,
|