Commit 3724199b authored by 石盼盼's avatar 石盼盼

Merge branch 'spp' into 'master'

Spp

See merge request !10
parents 969e7da4 c7f7aab5
......@@ -10,6 +10,7 @@ const baseUrl = '/api'
// todo: url
const httpUrl = 'https://repairtest.zeruiedu.com' // 测试接口
const h5Url ='http://localhost:8080/' // 测试h5线上地址
// const h5Url = 'http://repair.h5.zeruiedu.com/' // 测试h5线上地址
window.localStorage.setItem('httpUrl', httpUrl)
window.localStorage.setItem('h5Url', h5Url)
// const httpUrl = 'https://fenghexm.xueyoubangedu.com' // 正式接口
......
......@@ -115,7 +115,6 @@ router.beforeEach((to, from, next) => {
if (token && status === '200') {
console.log('ok-------1', 200)
if (role == 2) {
window.localStorage.setItem('role', '')
setTimeout(() => {
next({
path: '/admin_home'
......
......@@ -83,16 +83,10 @@ export default {
this.$http.post(this.$myApi.BINDLOGIN, curParams)
.then(res => {
const httpUrl = window.localStorage.getItem('httpUrl')
console.log('httpUrl',httpUrl)
const h5Url = window.localStorage.getItem('h5Url')
console.log('h5Url',h5Url)
const wxLogin = window.localStorage.getItem('wxLogin')
console.log('wxLogin',wxLogin)
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`
console.log('1111111111111111111111111111111链接',url)
window.document.location = url // url-
})
.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