Commit 4583202f by 冷斌

fix bug

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