Commit 4583202f by 冷斌

fix bug

parent 7c28597f
...@@ -91,10 +91,20 @@ ...@@ -91,10 +91,20 @@
var vm = new Vue({ var vm = new Vue({
el: '#app', el: '#app',
data: { data: {
certification: 0,
}, },
methods: { methods: {
//事件 info () {
let userInfo = sessionStorage.getItem("user_info");
if (!userInfo) {
window.location.href = '/index.php?g=Appapi&m=Login&a=index';
}
return JSON.parse(userInfo);
},
url (url) {
let info = this.info();
return url + '&uid=' + info.id + '&token=' + info.token;
},
}, },
watch: { watch: {
...@@ -110,11 +120,13 @@ ...@@ -110,11 +120,13 @@
dataType:"json", dataType:"json",
type:"GET", type:"GET",
success:function(data){ success:function(data){
console.log(data)
if(data.ret==200){ if(data.ret==200){
let d = data.data; let d = data.data;
_this.identity = d.identity; // _this.identity =
_this.certification = d.certification; // _this.certification = d.certification;
if (d.identity == 1) {
window.location.href = this.url('/index.php?g=Appapi&m=Profit&a=index');
}
}else{ }else{
layer.msg(data.msg); layer.msg(data.msg);
} }
......
...@@ -57,10 +57,6 @@ ...@@ -57,10 +57,6 @@
certification: 0, certification: 0,
}, },
methods: { methods: {
//事件
subMit() {
},
info () { info () {
let userInfo = sessionStorage.getItem("user_info"); let userInfo = sessionStorage.getItem("user_info");
if (!userInfo) { if (!userInfo) {
...@@ -95,7 +91,6 @@ ...@@ -95,7 +91,6 @@
dataType:"json", dataType:"json",
type:"GET", type:"GET",
success:function(data){ success:function(data){
console.log(data)
if(data.ret==200){ if(data.ret==200){
let d = data.data; let d = data.data;
_this.identity = d.identity; _this.identity = d.identity;
......
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