Commit 581c33b8 authored by Mac's avatar Mac

修改部分东西

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