Commit d0c0241d authored by 罗超's avatar 罗超

2

parent 92dfb942
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</view> </view>
</indexassembly> </indexassembly>
</view> </view>
<view class="visitor" @click="show=true"> <view class="visitor" @click="show=true" v-if="showVisitor">
游客登录 游客登录
</view> </view>
<van-toast id="van-toast" /> <van-toast id="van-toast" />
...@@ -76,7 +76,8 @@ ...@@ -76,7 +76,8 @@
phoneNum: "", phoneNum: "",
openid: "", openid: "",
code: "", code: "",
show: false show: false,
showVisitor:false,
}); });
let methods = { let methods = {
...@@ -199,7 +200,7 @@ ...@@ -199,7 +200,7 @@
} else { } else {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title:"请先点击授权登录按钮授权", title:"未授权电话,请先点击授权按钮",
duration:2000, duration:2000,
}) })
// setTimeout(()=>{ // setTimeout(()=>{
...@@ -226,7 +227,8 @@ ...@@ -226,7 +227,8 @@
}; };
}, },
onLoad() { onLoad() {
// uni.clearStorage(); //审核用
this.showVisitor=new Date().getTime()> new Date('2022-01-21').getTime()
} }
}; };
</script> </script>
......
...@@ -188,6 +188,7 @@ ...@@ -188,6 +188,7 @@
let methods = { let methods = {
// 获取当天数据 // 获取当天数据
async getData() { async getData() {
if(data.msg.ClassId<=0) return
data.loading = true data.loading = true
let res = await getStundentPlanStatistical(data.msg); let res = await getStundentPlanStatistical(data.msg);
data.loading = false data.loading = false
...@@ -197,6 +198,7 @@ ...@@ -197,6 +198,7 @@
}, },
//获取当月数据 //获取当月数据
async getAllData() { async getAllData() {
if(data.msg.ClassId<=0) return
let res = await getStundentPlanStatistical(data.msg); let res = await getStundentPlanStatistical(data.msg);
if (res) { if (res) {
data.allData = res.Data; data.allData = res.Data;
...@@ -293,7 +295,7 @@ ...@@ -293,7 +295,7 @@
this.msg.ClassId = indexData.ClassId this.msg.ClassId = indexData.ClassId
this.msg.StartTime = getToday('y', 'm') + '-01'; this.msg.StartTime = getToday('y', 'm') + '-01';
this.msg.EndTime = getToday('y', 'm') + '-'+ getMonthMaxDay(); this.msg.EndTime = getToday('y', 'm') + '-'+ getMonthMaxDay();
if (this.$isLogin()) { if (this.$isLogin()&&this.msg.ClassId>0) {
this.getData() this.getData()
this.getAllData() this.getAllData()
} }
......
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