Commit 2fe8df0b authored by youjie's avatar youjie

no message

parent 0e405a66
......@@ -258,7 +258,7 @@
var dataList = null
var dataListAll = null
var GuestSurveyInfo = null
var userInfo = getLocalStorage()
var userInfo = getLocalStorageTakVer()
var texts = [
'非常不满意',
......@@ -268,7 +268,12 @@
'非常满意'
]
var STAR_IMG = new Array("../../images/Star1.png", "../../images/Star2.png");
if(localStorage.TakeoutVersion==1){
localStorage.removeItem("TakeoutVersion")
let TakeoutVersion = 0
if(query()&&query().TakeoutVersion==1){
TakeoutVersion = 1
}
if(TakeoutVersion==1){
qMsg = {
GuestId: userInfo.GuestId,
SurName: userInfo.SurName,
......@@ -367,7 +372,7 @@
if (dataList && dataList.length > 0) {
dataList.forEach(item => {
if(localStorage.TakeoutVersion==1){
if(TakeoutVersion==1){
item.c = newMsg.c
item.t = newMsg.t
item.g = newMsg.g
......@@ -500,7 +505,7 @@
dataListAll = data
dataList = data
// 外卖版
if(localStorage.TakeoutVersion==1){
if(TakeoutVersion==1){
getSurveyDetails()
}else{
renderStar()
......
......@@ -191,24 +191,24 @@
}
var userInfo = {}
var oldUserInfo = getLocalStorage()
var oldUserInfo = getLocalStorageTakVer()
var TakeoutVersion = 0
if(query().c&&query().t&&query().g){
localStorage.TakeoutVersion = 1
TakeoutVersion = 1
msg.c = query().c
msg.t = query().t
msg.g = query().g
if(oldUserInfo.c==msg.c&&oldUserInfo.t==msg.t&&oldUserInfo.g==msg.g){
setTimeout(() => {
window.location.href = `guestSign.html`
window.location.href = `guestSign.html?TakeoutVersion=1`
}, 300);
}else{
localStorage.removeItem("userInfo")
localStorage.removeItem("userInfoTakVer")
}
}else{
msg.TCID = query().TCID
if(localStorage.TakeoutVersion) {
localStorage.removeItem("TakeoutVersion")
localStorage.removeItem("userInfo")
if(localStorage.userInfoTakVer) {
localStorage.removeItem("userInfoTakVer")
}
}
......@@ -246,7 +246,7 @@
let phone = $(`#loginFormT`).val()
let obj = $(`#loginB`)
//电话验证
if(localStorage.TakeoutVersion==1){
if(TakeoutVersion==1){
if(phone.length==0) return layer.msg('请输入手机号码!');
}else {
if(!phoneReg.test(phone)) return layer.msg('请输入有效的手机号码!');
......@@ -257,7 +257,7 @@
let Passport = $(`#PassportFormT`).val()
let objPassport = $(`#PassportB`)
//护照验证
if(localStorage.TakeoutVersion==1){
if(TakeoutVersion==1){
if (Passport.length==0) {
return layer.msg('请输入护照号!');
}
......@@ -278,7 +278,7 @@
if (res.resultCode === 1) {
var tempData = res.data
if (tempData && tempData.length > 0) {
if(localStorage.TakeoutVersion==1){
if(TakeoutVersion==1){
var datas = {
GuestId: tempData[0].Id,
SurName: tempData[0].SurName ? tempData[0].SurName : tempData[0].Name,
......@@ -289,8 +289,8 @@
guestMobile: msg.guestMobile,
type: msg.type,
}
localStorage.userInfo = JSON.stringify(datas)
window.location.href = `guestSign.html`
localStorage.userInfoTakVer = JSON.stringify(datas)
window.location.href = `guestSign.html?TakeoutVersion=1`
}else{
var datas = {
TCID: msg.TCID,
......@@ -325,7 +325,7 @@
let phone = $(`#loginFormT`).val()
let obj = $(`#loginB`)
//电话验证
if (localStorage.TakeoutVersion==1) {
if (TakeoutVersion==1) {
if(phone.length==0) return layer.msg('请输入手机号码!');
}else{
if(!phoneReg.test(phone)) return layer.msg('请输入有效的手机号码!');
......@@ -336,7 +336,7 @@
let Passport = $(`#PassportFormT`).val()
let objPassport = $(`#PassportB`)
//护照验证
if(localStorage.TakeoutVersion==1){
if(TakeoutVersion==1){
if(Passport.length==0) return layer.msg('请输入护照号!');
}else{
// if (!IsNumEn.test(Passport)) {
......
......@@ -2,7 +2,8 @@ let locationName = window.location.hostname;
function getApiUrl() {
//ERP接口地址
let erpApiUrl = "http://192.168.5.204:8030/api/common/post";
// let erpApiUrl = "http://192.168.5.204:8030/api/common/post";
let erpApiUrl = "https://reborn.oytour.com/api/common/post";
let erpApiUrlTakVer = "http://192.168.5.204:8065/api/common/post";//外卖版本
//ERP-Jave接口地址
......@@ -20,7 +21,8 @@ function getApiUrl() {
erpViittoFileUrl = "http://imgfile.oytour.com"
}
let TakeoutVersion = 0
if(localStorage.TakeoutVersion&&localStorage.TakeoutVersion==1) TakeoutVersion = 1
if(query()&&query().TakeoutVersion==1) TakeoutVersion = 1
console.log(TakeoutVersion,'----TakeoutVersion')
let url = {
urlPost: TakeoutVersion==0?erpApiUrl:erpApiUrlTakVer,
urlJava: erpJavaApiUrl,
......@@ -53,6 +55,15 @@ function getLocalStorage2() {
}
}
function getLocalStorageTakVer() {
var localStorageData = window.localStorage["userInfoTakVer"];
if (localStorageData != undefined) {
return JSON.parse(localStorageData);
} else {
return null;
}
}
function clearLocalStorage() {
window.localStorage.removeItem('userInfo')
}
......
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