Merge remote-tracking branch 'origin/jihan_0413_运动处方和视频功能开发分支' into jihan_0413_运动处方和视频功能开发分支

# Conflicts:
#	pages/grade/grade.vue
This commit is contained in:
闫晓茹 2023-04-19 15:34:46 +08:00
commit 164f752f52
8 changed files with 72 additions and 77 deletions

View File

@ -126,7 +126,7 @@
if (this.checked == false) { if (this.checked == false) {
this.$refs.uToast.show({ this.$refs.uToast.show({
type: 'error', type: 'error',
title: "请先阅读《隐私保护协议》!", message: "请先阅读《隐私保护协议》!",
}) })
setTimeout(() => { setTimeout(() => {
this.maskshow = true this.maskshow = true
@ -143,7 +143,7 @@
data: res.msg data: res.msg
}); });
this.$refs.uToast.show({ this.$refs.uToast.show({
title: "添加成功", message: "添加成功",
type: 'success' type: 'success'
}) })
// uni.showToast({ // uni.showToast({
@ -158,7 +158,7 @@
} else if (res.code == 500) { } else if (res.code == 500) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.msg, message: res.msg,
type: 'error' type: 'error'
}) })
// uni.showToast({ // uni.showToast({

View File

@ -1,10 +1,10 @@
<template> <template>
<view class="top"> <view class="top">
<view class="content" v-if="!studentId"> <view class="content" v-if="!studentId" @tap="goindex">
<view class="pictures"> <view class="pictures">
<image src="../../static/toux.png" mode=""></image> <image src="../../static/toux.png" mode=""></image>
</view> </view>
<view class="name" @tap="goindex"> <view class="name">
点击登录 点击登录
</view> </view>
</view> </view>
@ -22,7 +22,6 @@
<image src="../../static/tuichu.png" mode=""></image> <image src="../../static/tuichu.png" mode=""></image>
</view> </view>
</view> </view>
<view class="student" v-if="!studentId"> <view class="student" v-if="!studentId">
<view class="studentitem"> <view class="studentitem">
<image src="../../static/renshi.png" mode=""></image> <image src="../../static/renshi.png" mode=""></image>
@ -34,7 +33,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="student" v-for="item in studentInfoList" v-else> <view class="student" v-for="item in studentInfoList" v-else>
<view class="studentitem"> <view class="studentitem">
<image src="../../static/renshi.png" mode=""></image> <image src="../../static/renshi.png" mode=""></image>
@ -58,20 +56,18 @@
<span>{{item.kindergartenName}}</span> <span>{{item.kindergartenName}}</span>
</view> </view>
</view> </view>
</view> </view>
<view class="school" v-if="!studentId"> <view class="school" v-if="!studentId">
<view class="studentitem">
<image src="../../static/xuexiao.png" mode=""></image>
<span>幼儿园信息</span>
</view>
<view class="schoolitem"> <view class="schoolitem">
<view class="studentitem">
<image src="../../static/xuexiao.png" mode=""></image>
<span>幼儿园信息</span>
</view>
<view class="picitem"> <view class="picitem">
<image src="../../static/zanwu.png" mode=""></image> <image src="../../static/zanwu.png" mode=""></image>
</view> </view>
</view> </view>
</view> </view>
<view class="school" v-for="item in kindergartenInfoList" v-else> <view class="school" v-for="item in kindergartenInfoList" v-else>
<view class="gongli" v-if="kindergartenInfoList.kindergartenType=='public_handle'"> <view class="gongli" v-if="kindergartenInfoList.kindergartenType=='public_handle'">
<image src="../../static/gongli.png" mode=""></image> <image src="../../static/gongli.png" mode=""></image>
@ -93,8 +89,6 @@
<span>{{item.principalName}} {{item.kindergartenPhone}}</span> <span>{{item.principalName}} {{item.kindergartenPhone}}</span>
</view> </view>
</view> </view>
</view> </view>
<view class="masks" style="" v-if="mask"> <view class="masks" style="" v-if="mask">
<view class="mask"> <view class="mask">
@ -115,8 +109,6 @@
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
@ -127,7 +119,7 @@
export default { export default {
data() { data() {
return { return {
studentId:null, studentId: null,
mask: false, mask: false,
phone: '', phone: '',
studentInfoList: [], studentInfoList: [],
@ -135,10 +127,10 @@
parentList: {}, parentList: {},
} }
}, },
onShow() { onShow() {
let that = this; let that = this;
this.studentId = uni.getStorageSync('studentId'); this.studentId = uni.getStorageSync('studentId');
if (this.studentId) { if (this.studentId) {
uni.getStorage({ uni.getStorage({
key: 'phone', key: 'phone',
@ -162,13 +154,13 @@
}, },
fail: function(err) {} fail: function(err) {}
}); });
} }
}, },
methods: { methods: {
goindex() { goindex() {

View File

@ -144,7 +144,7 @@
}, },
showToast() { showToast() {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: "暂无报告", message: "暂无报告",
type: 'error', type: 'error',
duration: 1000 duration: 1000
}) })
@ -180,7 +180,7 @@
fail: function(err) { fail: function(err) {
uni.hideLoading(); uni.hideLoading();
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '请求报告失败', message: '请求报告失败',
type: 'error' type: 'error'
}) })
} }

View File

@ -24,15 +24,12 @@
{{item.totalFraction}} {{item.totalFraction}}
<span></span> <span></span>
</view> </view>
<view class="baogao" @tap='lookbook(item)'> <view class="baogao">
<view class="image"> <view class="image">
</view> </view>
<view class="look" v-if="item.existFlag==false">暂无报告</view> <!-- <view class="look">查看报告</view> -->
<view class="lookreport" v-else>查看报告</view> <view class="look" @tap='showToast(item)' v-if="item.existFlag==false">查看报告</view>
<view class="lookreport" @tap='lookbook(item)' v-else> <view class="lookreport" @tap='lookbook(item)' v-else>查看报告</view>
<view class="image">
</view>查看报告
</view>
</view> </view>
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
@ -73,42 +70,42 @@
}, },
methods: { methods: {
showToast() {
this.$refs.uToast.show({
message: "暂无报告",
type: 'error',
duration: 1000
})
},
lookbook(item) { lookbook(item) {
if (item.existFlag == false) { uni.showLoading({
this.$refs.uToast.show({ title: '获取报告中'
message: "暂无报告", });
type: 'error', var that = this
duration: 1000 wx.downloadFile({
}) url: baseurl + item.downloadAddress,
} else { success: function(res) {
uni.showLoading({ var filePath = res.tempFilePath;
title: '获取报告中' wx.openDocument({
}); filePath: filePath,
var that = this showMenu: true,
wx.downloadFile({ success: function(res) {
url: baseurl + item.downloadAddress, uni.hideLoading();
success: function(res) { },
var filePath = res.tempFilePath; fail: function(err) {
wx.openDocument({ uni.hideLoading();
filePath: filePath, }
showMenu: true, });
success: function(res) { },
uni.hideLoading(); fail: function(err) {
}, uni.hideLoading();
fail: function(err) { that.$refs.uToast.show({
uni.hideLoading(); message: '请求报告失败',
} type: 'error'
}); })
}, }
fail: function(err) { });
uni.hideLoading();
that.$refs.uToast.show({
title: '请求报告失败',
type: 'error'
})
}
});
}
}, },
getPhoneNumberp(val) { getPhoneNumberp(val) {
wx.login({ wx.login({

View File

@ -54,7 +54,7 @@
methods: { methods: {
showToast() { showToast() {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '暂无报告', message: '暂无报告',
type: 'error' type: 'error'
}) })
}, },
@ -82,7 +82,7 @@
fail: function(err) { fail: function(err) {
uni.hideLoading(); uni.hideLoading();
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '请求报告失败', message: '请求报告失败',
type: 'error' type: 'error'
}) })
} }

View File

@ -85,7 +85,7 @@
this.getInfoByPhoneinfo() this.getInfoByPhoneinfo()
} }
this.$refs.uToast.show({ this.$refs.uToast.show({
title: "登录成功", message: "登录成功",
type: 'success', type: 'success',
duration: '5000' duration: '5000'
}) })
@ -96,6 +96,12 @@
}, 500) }, 500)
this.top = false this.top = false
} }
} else {
this.$refs.uToast.show({
message: "登录失败",
type: 'error',
duration: '5000'
})
} }
}) })
}, },

View File

@ -111,7 +111,7 @@
bindParent() { bindParent() {
if (this.checked == false) { if (this.checked == false) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '请先阅读《隐私保护协议》', message: '请先阅读《隐私保护协议》',
type: 'error' type: 'error'
}) })
setTimeout(() => { setTimeout(() => {
@ -132,12 +132,12 @@
url: '/pages/index/index' url: '/pages/index/index'
}) })
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '添加成功', message: '添加成功',
type: 'success' type: 'success'
}) })
} else if (res.code == 500) { } else if (res.code == 500) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.msg, message: res.msg,
type: 'error' type: 'error'
}) })
// uni.showToast({ // uni.showToast({

View File

@ -230,7 +230,7 @@
fail: function(err) { fail: function(err) {
uni.hideLoading(); uni.hideLoading();
that.$refs.uToast.show({ that.$refs.uToast.show({
title: '请求报告失败', message: '请求报告失败',
type: 'error' type: 'error'
}) })
} }