This commit is contained in:
曹辉 2023-04-19 15:00:55 +08:00
parent 5290b46ef4
commit a947b590e5
8 changed files with 105 additions and 142 deletions

View File

@ -58,7 +58,7 @@
}, },
"usingComponents" : true, "usingComponents" : true,
"unipush" : { "unipush" : {
"enable" : true "enable" : false
}, },
"uniStatistics" : { "uniStatistics" : {
"enable" : false "enable" : false

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',
message: "请先阅读《隐私保护协议!", title: "请先阅读《隐私保护协议!",
}) })
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({
message: "添加成功", title: "添加成功",
type: 'success' type: 'success'
}) })
// uni.showToast({ // uni.showToast({
@ -157,9 +157,8 @@
}, 500) }, 500)
} else if (res.code == 500) { } else if (res.code == 500) {
console.log(res.msg)
this.$refs.uToast.show({ this.$refs.uToast.show({
message: res.msg, title: res.msg,
type: 'error' type: 'error'
}) })
// uni.showToast({ // uni.showToast({

View File

@ -215,7 +215,7 @@
uni.removeStorageSync('studentId'); uni.removeStorageSync('studentId');
this.mask = false this.mask = false
that.$refs.uToast.show({ that.$refs.uToast.show({
message: "退出成功", title: "退出成功",
type: 'success', type: 'success',
duration: '1500' duration: '1500'
}) })

View File

@ -17,11 +17,11 @@
{{item.totalFraction}} {{item.totalFraction}}
<span></span> <span></span>
</view> </view>
<view class="baogao"> <view class="baogao" @tap='lookbook(item)'>
<view class="image"> <view class="image">
</view> </view>
<view class="look" @tap='showToast(item)' v-if="item.existFlag==false">查看报告</view> <view class="look" v-if="item.existFlag==false">暂无报告</view>
<view class="lookreport" @tap='lookbook(item)' v-else>查看报告</view> <view class="lookreport" v-else>查看报告</view>
</view> </view>
</view> </view>
<view class="prescription" v-if="list==0"> <view class="prescription" v-if="list==0">
@ -39,7 +39,6 @@
<view class="sports"> <view class="sports">
{{item.motionType}} {{item.motionType}}
</view> </view>
</view> </view>
<view class="exerciseitem"> <view class="exerciseitem">
<view class="exercise"> <view class="exercise">
@ -81,7 +80,6 @@
<view class="Advancedtime"> <view class="Advancedtime">
<span>进阶方案</span> <span>进阶方案</span>
{{item.advancedScheme}} {{item.advancedScheme}}
</view> </view>
<view class="videoitem"> <view class="videoitem">
<video v-for="uitem in item.motionPrescriptionVideoInfoVOList" :src="uitem.prescriptionVideoUrl" <video v-for="uitem in item.motionPrescriptionVideoInfoVOList" :src="uitem.prescriptionVideoUrl"
@ -111,8 +109,6 @@
list: [], list: [],
getchildlist: [], getchildlist: [],
bgColor: '#37A97B', bgColor: '#37A97B',
} }
}, },
onLoad(options) { onLoad(options) {
@ -122,20 +118,16 @@
this.studentId = options.studentId this.studentId = options.studentId
getMotionPrescription(options.studentId, options.batchCode).then(res => { getMotionPrescription(options.studentId, options.batchCode).then(res => {
this.list = res.data this.list = res.data
this.list?.forEach(e => { this.list.forEach(e => {
e.motionPrescriptionVideoInfoVOList.forEach(el => { e.motionPrescriptionVideoInfoVOList.forEach(el => {
el.prescriptionVideoUrl = baseurl + el.prescriptionVideoUrl el.prescriptionVideoUrl = baseurl + el.prescriptionVideoUrl
}) })
}) })
}) })
var arr = { var arr = {
"studentIdList": [this.studentId] "studentIdList": [this.studentId]
} }
getChildrenResultScore(arr).then(res => { getChildrenResultScore(arr).then(res => {
// this.StudentScore = res.data
console.log(res)
this.getchildlist = res.data this.getchildlist = res.data
}) })
this.infolist(); this.infolist();
@ -143,10 +135,7 @@
methods: { methods: {
infolist() { infolist() {
const items = uni.getStorageSync("this.DATAList"); const items = uni.getStorageSync("this.DATAList");
console.log(items, 'list111111111111111111') prescriptionLogging(items).then(res => {})
prescriptionLogging(items).then(res => {
console.log(res, '999999999999')
})
}, },
look(uitem) { look(uitem) {
const items = JSON.parse(uni.getStorageSync("this.DATAList")); const items = JSON.parse(uni.getStorageSync("this.DATAList"));
@ -155,13 +144,19 @@
}, },
showToast() { showToast() {
this.$refs.uToast.show({ this.$refs.uToast.show({
message: "暂无报告", title: "暂无报告",
type: 'error', type: 'error',
duration: 1000 duration: 1000
}) })
}, },
lookbook(item) { lookbook(item) {
console.log(item) if (item.existFlag == false) {
this.$refs.uToast.show({
title: "暂无报告",
type: 'error',
duration: 1000
})
} else {
uni.showLoading({ uni.showLoading({
title: '获取报告中' title: '获取报告中'
}); });
@ -190,8 +185,8 @@
}) })
} }
}); });
}
}, },
} }
} }
</script> </script>
@ -200,8 +195,6 @@
// background: { // background: {
// backgroundColor: 'red' // // backgroundColor: 'red' //
// } // }
.top { .top {
background-image: linear-gradient(#D7EEE8, #fff); background-image: linear-gradient(#D7EEE8, #fff);
width: 100%; width: 100%;

View File

@ -65,7 +65,6 @@
} }
getStudentScore(arr).then(res => { getStudentScore(arr).then(res => {
this.StudentScore = res.data this.StudentScore = res.data
console.log(this.StudentScore)
}) })
} }
}, },
@ -80,7 +79,6 @@
}, },
lookbook(item) { lookbook(item) {
console.log(item)
uni.showLoading({ uni.showLoading({
title: '获取报告中' title: '获取报告中'
}); });
@ -88,7 +86,6 @@
wx.downloadFile({ wx.downloadFile({
url: baseurl + item.downloadAddress, url: baseurl + item.downloadAddress,
success: function(res) { success: function(res) {
console.log(res)
var filePath = res.tempFilePath; var filePath = res.tempFilePath;
wx.openDocument({ wx.openDocument({
filePath: filePath, filePath: filePath,
@ -113,9 +110,7 @@
getPhoneNumberp(val) { getPhoneNumberp(val) {
wx.login({ wx.login({
provider: 'weixin', provider: 'weixin',
success: function(loginRes) { success: function(loginRes) {}
console.log(loginRes)
}
}); });
}, },
wxGetUserInfo() { wxGetUserInfo() {
@ -124,7 +119,6 @@
desc: "获取用户信息", desc: "获取用户信息",
lang: "zh_CN", lang: "zh_CN",
success(res) { success(res) {
console.log(res)
that.yonghuwx = res.userInfo that.yonghuwx = res.userInfo
}, },
fail(res) { fail(res) {
@ -227,7 +221,8 @@
top: 65%; top: 65%;
position: absolute; position: absolute;
} }
.lookreport{
.lookreport {
left: 75%; left: 75%;
top: 65%; top: 65%;
position: absolute; position: absolute;
@ -253,7 +248,8 @@
.look { .look {
color: #9B9A9A; color: #9B9A9A;
} }
.lookreport{
.lookreport {
color: green; color: green;
} }
} }

View File

@ -48,7 +48,6 @@
} }
}, },
onLoad(options) { onLoad(options) {
console.log(options)
this.studentId = options.studentId this.studentId = options.studentId
this.getStudentScore() this.getStudentScore()
}, },
@ -61,7 +60,6 @@
}, },
lookbook(item) { lookbook(item) {
console.log(item)
uni.showLoading({ uni.showLoading({
title: '获取报告中' title: '获取报告中'
}); });
@ -69,7 +67,6 @@
wx.downloadFile({ wx.downloadFile({
url: baseurl + item.downloadAddress, url: baseurl + item.downloadAddress,
success: function(res) { success: function(res) {
console.log(res)
var filePath = res.tempFilePath; var filePath = res.tempFilePath;
wx.openDocument({ wx.openDocument({
filePath: filePath, filePath: filePath,
@ -90,26 +87,20 @@
}) })
} }
}); });
// getReportDownAddress(this.studentId, item.batchCode).then(res => { // getReportDownAddress(this.studentId, item.batchCode).then(res => {
// console.log(res)
// if (res.data.downloadAddress != null) { // if (res.data.downloadAddress != null) {
// } // }
// }) // })
}, },
getStudentScore() { getStudentScore() {
getStudentScore(this.studentId).then(res => { getStudentScore(this.studentId).then(res => {
console.log((res))
this.StudentScore = res.data; this.StudentScore = res.data;
}) })
}, },
getPhoneNumberp(val) { getPhoneNumberp(val) {
wx.login({ wx.login({
provider: 'weixin', provider: 'weixin',
success: function(loginRes) { success: function(loginRes) {}
console.log(loginRes)
}
}); });
}, },
wxGetUserInfo() { wxGetUserInfo() {
@ -118,7 +109,6 @@
desc: "获取用户信息", desc: "获取用户信息",
lang: "zh_CN", lang: "zh_CN",
success(res) { success(res) {
console.log(res)
that.yonghuwx = res.userInfo that.yonghuwx = res.userInfo
}, },
fail(res) { fail(res) {

View File

@ -105,8 +105,6 @@
</view> </view>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
<!-- <u-toast ref="uToast" /> -->
</view>
</template> </template>
<script> <script>
import { import {
@ -180,7 +178,7 @@
this.getInfoByPhoneinfo() this.getInfoByPhoneinfo()
} }
this.$refs.uToast.show({ this.$refs.uToast.show({
message: "登录成功", title: "登录成功",
type: 'success', type: 'success',
duration: '5000' duration: '5000'
}) })
@ -189,7 +187,6 @@
url: '/pages/homepage/homepage' url: '/pages/homepage/homepage'
}) })
}, 500) }, 500)
this.login = true this.login = true
this.stuinfos = true this.stuinfos = true
this.tip = false this.tip = false

View File

@ -26,11 +26,11 @@
{{item.totalFraction}} {{item.totalFraction}}
<span></span> <span></span>
</view> </view>
<view class="baogao"> <view class="baogao" @tap='lookbook(item)'>
<view class="image"> <view class="image">
</view> </view>
<view class="look" @tap='showToast(item)' v-if="item.existFlag==false">查看报告</view> <view class="look" v-if="item.existFlag==false">暂无报告</view>
<view class="lookreport" @tap='lookbook(item)' v-else>查看报告</view> <view class="lookreport" v-else>查看报告</view>
</view> </view>
</view> </view>
<view class="prescription" v-if="studentInfoList==0"> <view class="prescription" v-if="studentInfoList==0">
@ -87,9 +87,7 @@
<span>进阶方案</span> <span>进阶方案</span>
{{item.advancedScheme}} {{item.advancedScheme}}
</view> </view>
<view class="videoitem"> <view class="videoitem">
<video v-for="uitem in item.motionPrescriptionVideoInfoVOList" <video v-for="uitem in item.motionPrescriptionVideoInfoVOList"
:src="uitem.prescriptionVideoUrl" :autoplay="false" @tap='look(uitem)'></video> :src="uitem.prescriptionVideoUrl" :autoplay="false" @tap='look(uitem)'></video>
</view> </view>
@ -114,10 +112,10 @@
{{item.totalFraction}} {{item.totalFraction}}
<span></span> <span></span>
</view> </view>
<view class="baogao"> <view class="baogao" @tap='lookbooklist(item)'>
<view class="image"> <view class="image">
</view> </view>
<view class="lookreport" @tap='lookbooklist(item)'>查看处方</view> <view class="lookreport">查看处方</view>
</view> </view>
</view> </view>
</view> </view>
@ -132,7 +130,6 @@
getMotionPrescription, getMotionPrescription,
getInfoByPhone, getInfoByPhone,
prescriptionVideoLogging, prescriptionVideoLogging,
prescriptionLogging prescriptionLogging
} from '@/api/index/index.js' } from '@/api/index/index.js'
import baseurl from '@/api/baseurl.js' import baseurl from '@/api/baseurl.js'
@ -151,7 +148,6 @@
batchCode: "", batchCode: "",
phone: "", phone: "",
studentList: [], studentList: [],
} }
}, },
onShow() { onShow() {
@ -162,9 +158,7 @@
success: function(res) { success: function(res) {
that.phone = res.data that.phone = res.data
}, },
fail: function(err) { fail: function(err) {}
}
}); });
uni.getStorage({ uni.getStorage({
key: 'user', key: 'user',
@ -179,24 +173,23 @@
url: "/pages/index/index" url: "/pages/index/index"
}) })
} else { } else {
var arr = { var arr = {
"studentIdList": obj "studentIdList": obj
} }
getChildrenResultScore(arr).then(res => { getChildrenResultScore(arr).then(res => {
this.StudentScore = res.data this.StudentScore = res.data
if(this.StudentScore.length==1){ if (this.StudentScore.length == 1) {
getMotionPrescription(res.data[0].studentId, res.data[0].batchCode).then(res => { getMotionPrescription(res.data[0].studentId, res.data[0].batchCode).then(res => {
this.studentInfoList = res.data this.studentInfoList = res.data
this.studentInfoList.forEach(e => { this.studentInfoList.forEach(e => {
e.motionPrescriptionVideoInfoVOList.forEach(el => { e.motionPrescriptionVideoInfoVOList.forEach(el => {
el.prescriptionVideoUrl = baseurl + el.prescriptionVideoUrl el.prescriptionVideoUrl = baseurl + el
.prescriptionVideoUrl
}) })
}) })
}) })
this.infolist(); this.infolist();
} }
}) })
} }
}, },
@ -206,15 +199,14 @@
items["prescriptionVideoId"] = uitem.motionPrescriptionVideoId items["prescriptionVideoId"] = uitem.motionPrescriptionVideoId
prescriptionVideoLogging(items).then(res => {}) prescriptionVideoLogging(items).then(res => {})
}, },
showToast() { lookbook(item) {
if (item.existFlag == false) {
this.$refs.uToast.show({ this.$refs.uToast.show({
message: "暂无报告", title: "暂无报告",
type: 'error', type: 'error',
duration: 1000 duration: 1000
}) })
}, } else {
lookbook(item) {
console.log(item)
uni.showLoading({ uni.showLoading({
title: '获取报告中' title: '获取报告中'
}); });
@ -243,18 +235,14 @@
}) })
} }
}); });
}
}, },
infolist() { infolist() {
const items = uni.getStorageSync("this.DATAList"); const items = uni.getStorageSync("this.DATAList");
console.log(items, 'list111111111111111111') prescriptionLogging(items).then(res => {})
prescriptionLogging(items).then(res => {
console.log(res, '999999999999')
})
}, },
lookbooklist(item) { lookbooklist(item) {
getMotionPrescription(item.studentId, item.batchCode).then(res => { getMotionPrescription(item.studentId, item.batchCode).then(res => {
console.log(res)
this.studentInfoList = res.data this.studentInfoList = res.data
uni.navigateTo({ uni.navigateTo({
url: `/pages/Viewprescription/Viewprescription?studentId=${item.studentId}&batchCode=${item.batchCode}` url: `/pages/Viewprescription/Viewprescription?studentId=${item.studentId}&batchCode=${item.batchCode}`