Commit 0701aab7 authored by 石盼盼's avatar 石盼盼

修改

parent 0f8875be
...@@ -10,6 +10,7 @@ const baseUrl = '/api' ...@@ -10,6 +10,7 @@ const baseUrl = '/api'
// todo: url // todo: url
const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口 const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口
const h5Url ='http://localhost:8080/' // 测试h5线上地址 const h5Url ='http://localhost:8080/' // 测试h5线上地址
// const h5Url = 'http://repair.h5.zeruiedu.com/' // 测试h5线上地址
window.localStorage.setItem('httpUrl', httpUrl) window.localStorage.setItem('httpUrl', httpUrl)
window.localStorage.setItem('h5Url', h5Url) window.localStorage.setItem('h5Url', h5Url)
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口 // const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
......
...@@ -115,7 +115,6 @@ router.beforeEach((to, from, next) => { ...@@ -115,7 +115,6 @@ router.beforeEach((to, from, next) => {
if (token && status === '200') { if (token && status === '200') {
console.log('ok-------1', 200) console.log('ok-------1', 200)
if (role == 2) { if (role == 2) {
window.localStorage.setItem('role', '')
setTimeout(() => { setTimeout(() => {
next({ next({
path: '/admin_home' path: '/admin_home'
......
...@@ -83,16 +83,10 @@ export default { ...@@ -83,16 +83,10 @@ export default {
this.$http.post(this.$myApi.BINDLOGIN, curParams) this.$http.post(this.$myApi.BINDLOGIN, curParams)
.then(res => { .then(res => {
const httpUrl = window.localStorage.getItem('httpUrl') const httpUrl = window.localStorage.getItem('httpUrl')
console.log('httpUrl',httpUrl)
const h5Url = window.localStorage.getItem('h5Url') const h5Url = window.localStorage.getItem('h5Url')
console.log('h5Url',h5Url)
const wxLogin = window.localStorage.getItem('wxLogin') const wxLogin = window.localStorage.getItem('wxLogin')
console.log('wxLogin',wxLogin)
const t = res.role == 3 ? h5Url : `${h5Url}admin_home` // 测试h5线上地址 const t = res.role == 3 ? h5Url : `${h5Url}admin_home` // 测试h5线上地址
console.log('的数据傅雷家书蝶恋蜂狂',res,'链接',httpUrl,'h5Url',h5Url, 'role',t)
let url = `${httpUrl}${wxLogin}?callBack=${t}&scopes=snsapi_userinfo&type=1` let url = `${httpUrl}${wxLogin}?callBack=${t}&scopes=snsapi_userinfo&type=1`
console.log('1111111111111111111111111111111链接',url)
window.document.location = url // url- window.document.location = url // url-
}) })
.catch(() => {}) .catch(() => {})
......
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