公司小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
967 B

import { post } from "./api.js"
export default {
///是否在加载数据,默认为true,因为进来就会找服务器要东西
isLoading : true,
///品牌项目
brandpro : [],
///品牌风采
brandstyle : [],
///业务动态
busdyna : [],
//登录状态 0未登录 1已登录
loginstatus : 0,
///合伙人申请状态 0->未申请,1->已申请,但是尚未审核,2->审核通过,3->被拒绝
partnerstatus : 0,
///常见问题
question : [],
///英雄榜
ranklist : [],
toppic : {},
///获取主页信息
getMainPageData : async function(){
var res = await post("login/firstpages",{});
if(res.length <= 1){
///获取主页信息失败了
return;
}
var info = res[1];
var code = info.data.code;
if(code != 0){
return;
}
var data = info.data.data;
console.log("获取到首页信息:",data);
for(var key in data){
this[key] = data[key];
}
///拿到了所有的东西
this.isLoading = false;
}
}