Commit 48e8c6c7 by liuzhanxin

fix

parent 32fdc1ed
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/main/main",
"path": "pages/login/index",
"style": {
"navigationBarTitleText": "首页"
"navigationBarTitleText": "登录"
}
},
{
"path": "pages/user/user",
"path": "pages/main/main",
"style": {
"navigationBarTitleText": "我的"
"navigationBarTitleText": "首页"
}
},
{
"path": "pages/login/index",
"path": "pages/user/user",
"style": {
"navigationBarTitleText": "登录"
"navigationBarTitleText": "我的"
}
},
{
......@@ -346,6 +346,7 @@
}]
},
"globalStyle": {
"navigationBarBackgroundColor": "#3F536E"
"navigationBarBackgroundColor": "#3F536E",
"navigationStyle":"custom"
}
}
......@@ -118,7 +118,22 @@ import FormAlert from "@/components/form-alert/h-form-alert.vue"
dataId:''
}
},
onLoad() {
onLoad() {
// var bd = {
// "message":"查看 : <a href='https://app.cupl.edu.cn/uc/api/oauth/index?redirect=http://jwcsys.cupl.edu.cn/app/h5/index.html&appid=200200603160910748&state=zgtj'>3wschool</a>",
// "numbers":["kftd_liuzx","kftd_liuzx"]
// }
// uni.request({
// url: this.GLOBALUTIL.url+'/app-push/message',
// method: 'POST',
// header:this.GLOBALUTIL.commonHeader,
// data: JSON.stringify(bd),
// success: res => {
// console.log(res)
// },
// });
var that = this;
this.dataId = this.GLOBALUTIL.guid2();
uni.$on('addressSave',function(data){
......
<template>
<view class="content">
<view v-if="showLogin" class="content">
<view class="input-group">
<view class="input-row border">
<text class="title">账号:</text>
......@@ -21,9 +21,6 @@
<view class="oauth-row" v-if="hasProvider" v-bind:style="{top: positionTop + 'px'}">
<view class="oauth-image" v-for="provider in providerList" :key="provider.value">
<image :src="provider.image" @tap="oauth(provider.value)"></image>
<!-- #ifdef MP-WEIXIN -->
<button v-if="!isDevtools" open-type="getUserInfo" @getuserinfo="getUserInfo"></button>
<!-- #endif -->
</view>
</view>
</view>
......@@ -52,12 +49,14 @@
password:"sysadmin",
positionTop: 0,
isDevtools: false,
isDevelop:false
isDevelop:false,
showLogin:false
}
},
// computed: mapState(['forcedLogin']),
methods: {
onLoad() {
uni.showLoading();
const sysInfo = uni.getSystemInfoSync();
console.log(sysInfo.windowWidth)
this.GLOBALUTIL.sysInfo = sysInfo
......@@ -82,36 +81,58 @@
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
},
success: (res) => {
console.log(res);
console.log(res)
var user = {};
user.id = res.data.userId;
user.name = res.data.username;
this.GLOBALUTIL.user = user
this.GLOBALUTIL.commonHeader["x-auth-token"] = res.data.token;
this.GLOBALUTIL.commonHeader["user"] = JSON.stringify(user);
switch (status){
case "zgtj":
uni.navigateTo({
url:"../Security-Submit/index"
})
break;
case "zgcx":
uni.navigateTo({
url:"../Rectification-Item/list"
})
break;
case "aqjc":
uni.navigateTo({
url:"../Security-Check/security-task-list"
})
break;
case "yy":
uni.navigateTo({
url:"../Appointment/list"
})
break;
case "wdyy":
uni.navigateTo({
url:"../My-Appointment/list"
})
break;
case "spdb":
uni.navigateTo({
url:"../Approval/list"
})
break;
default:
break;
}
}
})
// uni.request({
// url: this.GLOBALUTIL.url+'/app-auth/accesstoken',
// method: 'GET',
// header: {
// 'Accept': 'application/json',
// 'Content-Type': 'application/json',
// },
// success: (res) => {
// console.log(res)
// var bod = {
// "code":code,
// "token":res.data
// }
// uni.request({
// url: this.GLOBALUTIL.url+'/app-auth/getUserInfo',
// method: 'POST',
// data: JSON.stringify(bod),
// header: {
// 'Accept': 'application/json',
// 'Content-Type': 'application/json',
// },
// success: (res1) => {
// console.log(res1)
// }
// })
// }
// })
console.log(code)
console.log(status)
}
......
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