Commit 2eab5f7d by sunerhu

1.修复分享重复登录--待测试

parent aae2918a
...@@ -9,6 +9,9 @@ ...@@ -9,6 +9,9 @@
"statusbar" : { "statusbar" : {
"immersed" : false "immersed" : false
}, },
"compatible" :{
"ignoreVersion": true
},
"usingComponents" : true, "usingComponents" : true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3, "compilerVersion" : 3,
......
<template> <template>
<view class="container"> <view class="container">
<view class="shareheader" style="" v-if="coursesharing != 1"> <view class="shareheader" style="" v-if="coursesharing != 1 || uni.getStorageSync('h5_coursesharing')">
<view class="iconfont icon-youjiantou" style="margin-left: 30rpx;" @click="goBack()"> <view class="iconfont icon-youjiantou" style="margin-left: 30rpx;" @click="goBack()">
</view> </view>
<view class="share-entrance"> <view class="share-entrance">
...@@ -163,12 +163,14 @@ ...@@ -163,12 +163,14 @@
coursesharing: null, coursesharing: null,
serialsNo: null, serialsNo: null,
shareCode: null, shareCode: null,
sharelogin: false sharelogin: false,
startTime:''
}; };
}, },
methods: { methods: {
close(val) { close(val) {
if (val) { if (val) {
this.startTime = Date.parse(new Date()) / 1000;
this.sharelogin = false this.sharelogin = false
this.userId = val this.userId = val
uni.setStorageSync('cffp_userId', this.userId); uni.setStorageSync('cffp_userId', this.userId);
...@@ -478,12 +480,15 @@ ...@@ -478,12 +480,15 @@
onLoad(option) { onLoad(option) {
this.fileId = option.fileId; this.fileId = option.fileId;
if (option.coursesharing) { if (option.coursesharing) {
this.userId = ''
this.coursesharing = option.coursesharing this.coursesharing = option.coursesharing
this.serialsNo = option.serialsNo this.serialsNo = option.serialsNo
this.shareCode = option.shareCode this.shareCode = option.shareCode
this.shareUserId = option.shareUserId this.shareUserId = option.shareUserId
this.getuserRead() this.getuserRead()
let endTime = Date.parse(new Date()) / 1000;
if((endTime - startTime) > 3600 * 24) {
this.userId = ''
}
uni.setStorageSync('h5_coursesharing', this.coursesharing); uni.setStorageSync('h5_coursesharing', this.coursesharing);
// this.getshareData() // this.getshareData()
} }
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</view> </view>
<view class="classtotal"> <view class="classtotal">
<view class="classtotal-box"> <view class="classtotal-box">
<span class="totalsingular">{{totalOrder || 0}}</span> <span class="totalsingular">{{totalOrder || 0}}</span>
<p>总单数</p> <p>总单数</p>
</view> </view>
<view class="classtotal-box" style="width: 40%;"> <view class="classtotal-box" style="width: 40%;">
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
} }
], ],
CffpOrgInfoReqVO: { CffpOrgInfoReqVO: {
userId: uni.getStorageSync('cffp_userId'), userId: uni.getStorageSync('cffp_userId'),
startDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`, startDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
endDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`, endDate: `${new Date().getFullYear()}-${new Date().getMonth() + 1}`,
queryType: '', queryType: '',
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
// 获取列表数据 // 获取列表数据
getqueryTeamAchievement() { getqueryTeamAchievement() {
if(this.CffpOrgInfoReqVO.endDate < this.CffpOrgInfoReqVO.startDate) { if (this.CffpOrgInfoReqVO.endDate < this.CffpOrgInfoReqVO.startDate) {
uni.showToast({ uni.showToast({
title: '截止日期不能小于起始日期', title: '截止日期不能小于起始日期',
duration: 1000, duration: 1000,
...@@ -157,9 +157,9 @@ ...@@ -157,9 +157,9 @@
api.queryTeamAchievement(this.CffpOrgInfoReqVO).then(res => { api.queryTeamAchievement(this.CffpOrgInfoReqVO).then(res => {
if (res) { if (res) {
this.dataList = res.data.list this.dataList = res.data.list
this.totalOrder = res.data.totalOrder? res.data.totalOrder: '0' this.totalOrder = res.data.totalOrder ? res.data.totalOrder : '0'
? this.totalCoursePrice = res.data.totalCoursePrice? res.data.totalCoursePrice: '0' this.totalCoursePrice = res.data.totalCoursePrice ? res.data.totalCoursePrice : '0'
this.totalIncome = res.data.totalIncome?res.data.totalIncome: '0' this.totalIncome = res.data.totalIncome ? res.data.totalIncome : '0'
this.sortswitch() this.sortswitch()
} }
}) })
...@@ -207,14 +207,17 @@ ...@@ -207,14 +207,17 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
margin: 0 40rpx; margin: 0 40rpx;
.timeSelectContent{
.timeSelectContent {
margin: 0 40rpx; margin: 0 40rpx;
} }
} }
.header-time{
.header-time {
border: 1px solid #EFEDED; border: 1px solid #EFEDED;
padding: 10rpx 15rpx; padding: 10rpx 15rpx;
} }
.content-btn { .content-btn {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -236,7 +239,7 @@ ...@@ -236,7 +239,7 @@
.content-btn_under { .content-btn_under {
width: 160rpx; width: 160rpx;
height: 80rpx; height: 80rpx;
color: #666666; color: #666666;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
...@@ -325,17 +328,20 @@ ...@@ -325,17 +328,20 @@
.title { .title {
margin: auto; margin: auto;
} }
.box-title{
.box-title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
text-align: center; text-align: center;
} }
.box-content{
.box-content {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
text-align: center; text-align: center;
} }
.box-title-flex{
.box-title-flex {
flex: 1; flex: 1;
font-size: 26rpx; font-size: 26rpx;
} }
......
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