Commit 581c33b8 authored by Mac's avatar Mac

修改部分东西

parent 20b4d631
...@@ -353,44 +353,46 @@ ...@@ -353,44 +353,46 @@
this.OrderId = options.OrderId; this.OrderId = options.OrderId;
} }
that.u = uni.getStorageSync("mall_UserInfo"); that.u = uni.getStorageSync("mall_UserInfo");
wx.getUserProfile({//4-9修改 不使用getUserInfo 会造成获取回来的微信默认名称和头像 if (!that.u) {
success: function(res) {//4-9之后的好像这里不能静默登录了需要弹出登录 that.u = {
console.log(res,'getUserInfo') nickName: "未登录",
if (uni.getStorageSync("mall_UserInfo")) { avatarUrl: "",
let uid = uni.getStorageSync("mall_UserInfo").UserId; };
let msg = { that.showAuth = true;
Id: uid, }else{
AliasName: res.userInfo.nickName, that.sharejump();//4-9新加
Photo: res.userInfo.avatarUrl, }
}; //4-11这里暂时不能使用
that.updateuserinfo(msg); // wx.getUserProfile({//4-9修改 不使用getUserInfo 会造成获取回来的微信默认名称和头像
that.getPageType() // success: function(res) {//4-9之后的好像这里不能静默登录了需要弹出登录
// 如果登录的情况下直接跳转商品详情或者直播列表 // console.log(res,'getUserInfo')
that.sharejump(); // if (uni.getStorageSync("mall_UserInfo")) {
//如果登录状态 并且是uni.getStorageSync("CounponPassword") // let uid = uni.getStorageSync("mall_UserInfo").UserId;
if(uni.getStorageSync("CounponPassword")){ // let msg = {
that.getunilogin(res) // Id: uid,
} // AliasName: res.userInfo.nickName,
} else { // Photo: res.userInfo.avatarUrl,
that.getunilogin(res) // };
} // that.updateuserinfo(msg);
}, // that.getPageType()
fail: function(e) { // // 如果登录的情况下直接跳转商品详情或者直播列表
uni.showToast({ // // that.sharejump();
title: "微信登录授权失败", // //如果登录状态 并且是uni.getStorageSync("CounponPassword")
icon: "none" // if(uni.getStorageSync("CounponPassword")){
}); // that.getunilogin(res)
if (!that.u) { // }
that.u = { // } else {
nickName: "未登录", // that.getunilogin(res)
avatarUrl: "", // }
}; // },
that.showAuth = true; // fail: function(e) {
}else{ // uni.showToast({
that.sharejump();//4-9新加 // title: "微信登录授权失败",
} // icon: "none"
}, // });
});
// },
// });
// #endif // #endif
...@@ -409,13 +411,11 @@ ...@@ -409,13 +411,11 @@
1; 1;
this.setting = set; this.setting = set;
this.isShowBack(); this.isShowBack();
// if(this.setting.IsOpenReserve && this.setting.IsOpenReserve==1){
// this.getstore()
// }
// this.init(); // this.init();
let now = new Date() let now = new Date()
let nowtime = now.getFullYear()+'-'+(now.getMonth()+1)+'-'+now.getDate() let nowtime = now.getFullYear()+'-'+(now.getMonth()+1)+'-'+now.getDate()
this.getIsOpenReserve(); // this.getIsOpenReserve();//4-11注释
if(!uni.getStorageSync('Startup_page')){//获取启动页信息1、没有记录日期 if(!uni.getStorageSync('Startup_page')){//获取启动页信息1、没有记录日期
this.getstartModel(nowtime) this.getstartModel(nowtime)
}else{//记录日期和当天相差1天调取 }else{//记录日期和当天相差1天调取
...@@ -503,7 +503,6 @@ ...@@ -503,7 +503,6 @@
uni.hideNavigationBarLoading(); uni.hideNavigationBarLoading();
}, 500); }, 500);
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
// this.init();
this.getIsOpenReserve(); this.getIsOpenReserve();
}, },
...@@ -689,7 +688,6 @@ ...@@ -689,7 +688,6 @@
); );
}, },
getorderPupop(){ getorderPupop(){
// TODO由一个来判断是否开启 暂时不知道默认是开启状态
let now = new Date() let now = new Date()
let Month = (now.getMonth()+1)<10?'0'+(now.getMonth()+1):now.getMonth()+1 let Month = (now.getMonth()+1)<10?'0'+(now.getMonth()+1):now.getMonth()+1
let day = now.getDate()<10?'0'+now.getDate():now.getDate()+1 let day = now.getDate()<10?'0'+now.getDate():now.getDate()+1
...@@ -711,11 +709,6 @@ ...@@ -711,11 +709,6 @@
} }
}, },
(res) => { (res) => {
res.data = {//模拟数据
State:1,
OrderNum:2,
CommissionMoney:78,
}
this.orderPopupdata = res.data this.orderPopupdata = res.data
if(res.data.State==1){ if(res.data.State==1){
if(res.data.OrderNum>1){ if(res.data.OrderNum>1){
...@@ -739,7 +732,6 @@ ...@@ -739,7 +732,6 @@
}, },
sharejump(){//分享的总跳转 sharejump(){//分享的总跳转
let that = this let that = this
this.getorderPupop()//4-9号新加
setTimeout(() => { setTimeout(() => {
if (that.JumpType == 1) { if (that.JumpType == 1) {
//商品详情 //商品详情
...@@ -944,6 +936,10 @@ ...@@ -944,6 +936,10 @@
this.isShowBack(); this.isShowBack();
} }
this.formatBg(); this.formatBg();
if(this.u && res.data.user_info && res.data.user_info.openOfflineEarnings == 1){//判断是否登录 是否开启 进行离线收益的弹出
this.getorderPupop()//4-9号新加
}
}, },
......
...@@ -316,7 +316,8 @@ ...@@ -316,7 +316,8 @@
uni.hideNavigationBarLoading() uni.hideNavigationBarLoading()
this.sharedata = res.data; this.sharedata = res.data;
//2021-4-9新加订单弹窗处理 //2021-4-9新加订单弹窗处理
if(this.sharedata.CustomModel.OpenOfflineEarnings==1){//打开弹窗 let openOfflineEarnings = uni.getStorageSync('basedata')?uni.getStorageSync('basedata').user_info.openOfflineEarnings:0
if(openOfflineEarnings==1){//打开弹窗
let now = new Date() let now = new Date()
let Month = (now.getMonth()+1)<10?'0'+(now.getMonth()+1):now.getMonth()+1 let Month = (now.getMonth()+1)<10?'0'+(now.getMonth()+1):now.getMonth()+1
let day = now.getDate()<10?'0'+now.getDate():now.getDate()+1 let day = now.getDate()<10?'0'+now.getDate():now.getDate()+1
...@@ -356,8 +357,9 @@ ...@@ -356,8 +357,9 @@
gosalesvolume(){ gosalesvolume(){
this.showorder = false; this.showorder = false;
setTimeout(()=>{ setTimeout(()=>{
let UserId = uni.getStorageSync('mall_UserInfo')?uni.getStorageSync('mall_UserInfo').UserId : 0;
uni.navigateTo({ uni.navigateTo({
url: "/pages/share/salesvolume", url: '/pages/share/salesvolume?UserId='+UserId
}); });
},10) },10)
......
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