Commit 787af03c authored by Mac's avatar Mac

首页修改

parent f42331c0
......@@ -220,7 +220,7 @@ export default {
}
if (options && options.Up) {//校园id
uni.setStorageSync("Up", { Up: options.Up });
this.IsOpenSchool = options.Up
this.IsOpenSchool = options.Up==2?1:0
}
if (options && options.scene) {
......@@ -480,6 +480,9 @@ export default {
uni.removeStorageSync("SmallShopId");
uni.removeStorageSync("Up");
that.getPageType()
if(this.IsOpenSchool !=res.data.IsOpenSchool){
this.init()
}
// 如果登录的情况下直接跳转商品详情或者直播列表
setTimeout(() => {
if (that.JumpType == 1) {
......@@ -576,14 +579,14 @@ export default {
},
init() {
if(this.IsOpenSchool==0){
this.IsOpenSchool = uni.getStorageSync("UserPageType")?uni.getStorageSync("UserPageType").UserPageType:0;
this.IsOpenSchool = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").IsOpenSchool:0;
}
this.request2(
{
url: "/api/Mall/GetHome",
data: {
page_id: this.pageId,
IsOpenSchool:this.IsOpenSchool,
open_school:this.IsOpenSchool,
},
},
(res) => {
......@@ -803,6 +806,9 @@ export default {
this.u = uni.getStorageSync("mall_UserInfo");
this.$refs.son[0].getSmallShopById(2); //第一次登陆成功后去调取微店的信息
this.getPageType()//获取用户类型(校园)
if(this.IsOpenSchool !=this.u.IsOpenSchool){
this.init()
}
// 如果登录的情况下直接跳转商品详情或者直播列表
setTimeout(() => {
if (this.JumpType == 1) {
......
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