Commit 787af03c authored by Mac's avatar Mac

首页修改

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