Commit acb6d8a7 authored by youjie's avatar youjie

no message

parent cd1901f5
......@@ -25,7 +25,7 @@ export default {
// "http://192.168.5.204:8030"
Vue.prototype.host2 = process.env.NODE_ENV=="development"?"https://erpmallapi.oytour.com":"https://erpmallapi.oytour.com"
Vue.prototype.host3 = process.env.NODE_ENV=="development"?"https://reborn.oytour.com":"https://reborn.oytour.com"
// Vue.prototype.host2 = "https://erpmallapi.oytour.com"
// Vue.prototype.host3 = "http://192.168.5.204:8030"
// Vue.prototype.host3 = "https://reborn.oytour.com"
// "http://192.168.5.204:8030":
console.log()
......@@ -164,6 +164,64 @@ export default {
}
})
},
Vue.prototype.apipostQrCode = function(cmd, msg, success, failed) {
var data = this.GetPostData(cmd, msg, "");
//['X-s']
const sign = getRVHandler(data, data.token)
uni.request({
url: this.host3 + '/api/file/GetGuestSurvey',
method: "Post",
header: {
'Content-Type': 'application/json',
},
data,
success: res => {
resolveRVHandler(res)
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
uni.removeStorageSync('b2b_user')
uni.removeStorageSync('mall_UserInfo')
const pages = getCurrentPages()
const curPage = pages[pages.length-1]
if(cmd=='b2b_post_CheckMiniAppToken'){
// curPage.onLoad(curPage.options)
curPage.onShow()
// curPage.onReady()
}else{
console.log(uni.getStorageSync("LoginState"),'---log')
if(uni.getStorageSync("LoginState")) {
uni.removeStorageSync("LoginState")
return
}
uni.setStorageSync("LoginState",true)
setTimeout(()=>{
uni.redirectTo({
url: '/pages/index/index'
})
},1000)
}
} else if (res.data.resultCode != 1) {
if (!failed) {
if (res.data.message != '') {
uni.showToast({
title: res.data.message,
icon: "none",
});
}
}
typeof failed == "function" && failed(res.data);
} else {
typeof success == "function" && success(res.data);
}
},
fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e));
uni.showModal({
content: "" + res.errMsg
});
typeof failed == "function" && failed(res.data);
}
})
},
Vue.prototype.javaApipost = function(cmd, msg, success, failed) {
let b2bUser = uni.getStorageSync('b2b_user')
let token = "";
......
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