This commit is contained in:
曹辉 2023-04-20 10:46:23 +08:00
parent e0e1b7b20a
commit 30ab4fb1ca
6 changed files with 63 additions and 495 deletions

View File

@ -2,7 +2,7 @@
<view class="content">
<view class="top">
<view class="touxiang">
<image src="../../static/jiazhang.png" mode=""></image>
<image src="../../static/jiazhang.png" mode=""></image>
</view>
<view class="itemsname">
<view class="parentname">
@ -37,7 +37,8 @@
<input type="text" v-model="data.cardNo" maxlength="18">
</view>
</view>
<view class="" style="display:flex; position: relative;left:18%; top:70%; font-size: 28rpx;line-height: 50rpx;">
<view class=""
style="display:flex; position: relative;left:18%; top:70%; font-size: 28rpx;line-height: 50rpx;">
<checkbox value="cb" :checked="checked" />
我已阅读并同意
<view class="" style="display: inline-block;color:#4D8CE9;border-bottom:1rpx solid #4D8CE9;"
@ -131,56 +132,34 @@
this.maskshow = true
}, 500)
} else {
uni.removeStorage({
key: 'phone',
success: function(res) {}
});
uni.removeStorageSync('phone');
bindParent(this.data).then(res => {
if (res.code == 200) {
uni.setStorage({
key: 'phone',
data: res.msg
});
uni.setStorageSync("phone", res.msg)
this.$refs.uToast.show({
title: "添加成功",
type: 'success'
})
// uni.showToast({
// message: "",
// icon: 'success'
// });
setTimeout(() => {
uni.navigateTo({
url: '/pages/index/index'
})
uni.navigateTo({
url: '/pages/index/index'
})
}, 500)
} else if (res.code == 500) {
this.$refs.uToast.show({
title: res.msg,
type: 'error'
})
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
}
})
}
},
//
cancel() {
uni.removeStorageSync('user');
uni.navigateTo({
url: '/pages/index/index'
})
},
}
}
</script>
@ -190,6 +169,7 @@
margin-top: 40rpx;
padding-bottom: 80rpx;
}
.btn1,
.btn2 {
width: 50%;

View File

@ -129,31 +129,10 @@
},
onShow() {
let that = this;
this.studentId = uni.getStorageSync('studentId');
if (this.studentId) {
uni.getStorage({
key: 'phone',
success: function(res) {
that.phone = res.data
that.getInfoByPhoneinfo();
},
fail: function(err) {
that.login = false
that.stuinfos = false
that.tip = true
that.top2 = false
that.top = true
}
});
uni.getStorage({
key: 'user',
success: function(res) {
that.yonghuwx = res.data
// that.mask = true
},
fail: function(err) {}
});
}
that.phone = uni.getStorageSync('phone');
if (that.phone) {
that.getInfoByPhoneinfo();
} else {}
},
methods: {
goindex() {
@ -171,17 +150,13 @@
} else {}
})
},
gohome() {
let that = this
const value = uni.getStorageSync('phone');
const value2 = uni.getStorageSync('studentId');
if (value && value2) {
if (value) {
uni.removeStorageSync('phone');
uni.removeStorageSync('openid');
uni.removeStorageSync('this.DATAList');
uni.removeStorageSync('studentId');
this.mask = false
that.mask = false
that.$refs.uToast.show({
title: "退出成功",
type: 'success',

View File

@ -37,35 +37,33 @@
<script>
import {
getStudentScore,
getInfoByPhone,
} from '@/api/index/index.js'
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
StudentScore: [],
StudentScore: [],
studentId: "",
// studentIdList:{},
}
},
onShow() {
let that = this;
const obj = uni.getStorageSync('studentId');
if (!obj) {
uni.navigateTo({
url: "/pages/index/index"
})
} else {
var arr = {
"studentIdList": obj
}
getStudentScore(arr).then(res => {
this.StudentScore = res.data
})
}
const value = uni.getStorageSync('phone');
getInfoByPhone(value).then(res => {
if (res.code == 200) {
var obj = {
studentIdList: []
}
res.data.studentInfoList.forEach(e => {
obj.studentIdList.push(e.studentId)
})
getStudentScore(obj).then(res => {
this.StudentScore = res.data
})
} else {}
})
},
methods: {
lookbook(item) {
if (item.existFlag == false) {

View File

@ -42,7 +42,6 @@
return {
top: true,
mask: false,
yonghuwx: [],
DATAList: [],
logincode: '',
phonecode: '',
@ -51,17 +50,6 @@
}
},
methods: {
setitem() {
let that = this;
uni.getStorage({
key: 'user',
success: function(res) {
that.yonghuwx = res.data
that.top = false
that.getPreOrderById();
}
});
},
gophone() {
const openid = this.openId
uni.navigateTo({
@ -77,10 +65,7 @@
this.openId = res.data.openId
} else {
this.phone = res.data.phone
uni.setStorage({
key: 'phone',
data: res.data.phone
});
uni.setStorageSync("phone", res.data.phone)
if (this.phone != '') {
this.getInfoByPhoneinfo()
}
@ -93,7 +78,7 @@
uni.switchTab({
url: '/pages/homepage/homepage'
})
}, 500)
}, 1000)
this.top = false
}
} else {
@ -116,23 +101,6 @@
}
});
},
wxGetUserInfo() {
let that = this;
uni.getUserProfile({
desc: "获取用户信息",
lang: "zh_CN",
success(res) {
that.yonghuwx = res.userInfo
uni.setStorage({
key: 'user',
data: res.userInfo
});
},
fail(res) {
//home
},
});
},
info() {
const items = uni.getStorageSync("this.DATAList");
loginLogging(items).then(res => {})
@ -145,11 +113,6 @@
let items = JSON.stringify(this.DATAList);
uni.setStorageSync("this.DATAList", items)
this.info();
var obj = []
res.data.studentInfoList.forEach(e => {
obj.push(e.studentId)
})
uni.setStorageSync("studentId", obj)
} else {}
})
}
@ -166,31 +129,11 @@
},
onShow() {
let that = this;
const studentId = uni.getStorageSync('studentId');
if (studentId) {
uni.switchTab({
url: '/pages/homepage/homepage'
})
that.phone = uni.getStorageSync('phone');
if (that.phone) {
that.getInfoByPhoneinfo();
} else {
uni.getStorage({
key: 'phone',
success: function(res) {
that.phone = res.data
// that.mask = true
that.getInfoByPhoneinfo();
},
fail: function(err) {
that.top = true
}
});
uni.getStorage({
key: 'user',
success: function(res) {
that.yonghuwx = res.data
// that.mask = true
},
fail: function(err) {}
});
that.top = true
}
},
}

View File

@ -1,314 +0,0 @@
<template>
<view class="content">
<uni-section class="card">
<view class="test">家长信息绑定</view>
<uni-card>
<view class="bind">
<view class="name">
<view class="bindtitle">
家长姓名:
</view>
<input type="text" v-model="data.parentName">
</view>
<view class="phone">
<view class="bindtitle">
家长电话:
</view>
<input type="text" v-model="data.phone" maxlength="11">
</view>
<view class="id">
<view class="bindtitle">
学生身份证:
</view>
<input type="text" v-model="data.cardNo" maxlength="18">
</view>
<view class="" style="margin:50rpx 0 0 15rpx;font-size: 28rpx;line-height: 50rpx;">
<checkbox value="cb" :checked="checked" />我已阅读并同意
<view class="" style="display: inline-block;color:#4D8CE9;border-bottom:1rpx solid #4D8CE9;"
@tap='maskshow=true'>
隐私保护协议
</view>
<!-- <u-checkbox-group @change="checkboxGroupChange">
<u-checkbox @change="checkboxChange" v-model="checkeds.checked" :name="checkeds.name">
{{checkeds.name}}
</u-checkbox>
</u-checkbox-group> -->
</view>
<view class="btn">
<button @tap="cancel()">取消</button>
<button @tap="bindParent">确定</button>
</view>
</view>
</uni-card>
</uni-section>
<view class="masks" style="" v-if="maskshow">
<view class="mask">
<view class="title">
智慧幼儿体质评估与促进系统隐私保护
</view>
<view class="text" style="">
<P>本指引是智慧幼儿体质评估与促进系统小程序开发者为收集使用和存储您的信息而制定</P>
<p>开发者收集信息</p>
<ul>
<li>1开发者收集您的姓名用于绑定学生家长信息</li>
<li>2开发者收集学生身份证号用于确认学生身份及成绩信息</li>
<li>3开发者收集您的手机号用于查询学生绑定的信息</li>
</ul>
开发者对信息的存储
<li>1存储地点境内</li>
<li>2存储期限小程序停止运营后及时删除</li>
<view class="" style="margin-top: 50rpx;">
本次操作遵守国家相关法律法规采集的信息仅用于学生体质评估报告的相关信息查询
</view>
</view>
<view class="btns">
<view class="btn1" @tap='maskshow=false'>取消</view>
<view class="btn2" @tap='checkeds'>阅读并同意</view>
</view>
</view>
</view>
<!-- <img src="/static/name.png" alt="" sizes="" srcset=""> -->
<!-- <text v-model="data.parentName">{{data.parentName}}</text> -->
<!-- <input type="text" v-model="data.phone">-->
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
bindParent
} from '@/api/index/index.js'
export default {
data() {
return {
checked: false,
maskshow: false,
data: {
// 370883199909083232
// 18363008969
//
cardNo: "",
parentName: "",
phone: "",
openId: '',
list: [{
type: 'error',
icon: false,
title: '确定',
message: "",
}],
},
}
},
methods: {
//
checkeds() {
this.checked = true;
this.maskshow = false
},
//
bindParent() {
if (this.checked == false) {
this.$refs.uToast.show({
message: '请先阅读《隐私保护协议》',
type: 'error'
})
setTimeout(() => {
this.maskshow = true
}, 500)
} else {
uni.removeStorage({
key: 'phone',
success: function(res) {}
});
bindParent(this.data).then(res => {
if (res.code == 200) {
uni.setStorage({
key: 'phone',
data: res.msg
});
uni.navigateTo({
url: '/pages/index/index'
})
this.$refs.uToast.show({
message: '添加成功',
type: 'success'
})
} else if (res.code == 500) {
this.$refs.uToast.show({
message: res.msg,
type: 'error'
})
// uni.showToast({
// title: res.msg,
// icon: 'none',
// duration: 2000
// });
}
})
}
},
//
cancel() {
uni.removeStorageSync('user');
uni.navigateTo({
url: '/pages/index/index'
})
},
},
//
onLoad(options) {
this.data.openId = options.openId
}
}
</script>
<style lang="scss">
.text {
margin-top: 40rpx;
padding-bottom: 80rpx;
}
.btn1,
.btn2 {
width: 50%;
height: 80rpx;
line-height: 80rpx;
text-align: center;
display: inline-block;
position: absolute;
background-color: #fff;
bottom: -80rpx;
}
.btn2 {
border-top: 1px solid #eeeeee;
/* background-color: #4486e8; */
right: 0;
}
.btn1 {
border-top: 1px solid #eeeeee;
border-right: 1px solid #eeeeee;
background-color: #4486e8;
color: #fff;
left: 0;
}
.masks {
background-color: rgba(246, 247, 248, 0.5);
height: 100%;
width: 100%;
position: absolute;
top: 0;
z-index: 999;
}
.mask {
width: 90%;
padding: 0 30rpx 0 30rpx;
background-color: #fff;
margin: 150rpx auto;
opacity: 1;
position: relative;
}
.title {
height: 100rpx;
line-height: 100rpx;
border-bottom: 1px solid #eeeeee;
/* background-color: red; */
font-size: 36rpx;
margin: 0px auto;
width: 100%;
text-align: center;
/* line-height: 80rpx; */
}
.content {
display: flex;
flex-direction: column;
align-items: center;
min-height: 100vh;
background-image: linear-gradient(#8CCDDF, #fff);
color: #707374;
// height: 1230rpx;
// margin-top: 50rpx;
}
::v-deep .u-checkbox__icon-wrap {
border: 1rpx solid #000000;
}
.bind {
// background-color: #eeeeee;
width: 670rpx;
height: 750rpx;
border-radius: 20rpx;
font-size: 37rpx;
// margin-right: -50rpx;
}
.test {
line-height: 104rpx;
margin: 0 auto;
color: #4486e8;
font-size: 45rpx;
margin-top: 80rpx;
text-align: center;
margin-bottom: 50rpx;
}
img {
width: 40rpx;
height: 40rpx;
float: left;
margin-top: 30rpx;
margin-left: 30rpx;
margin-right: 40rpx;
}
.name,
.id,
.phone {
font-size: 34rpx;
width: 100%;
margin: 0 auto;
display: flex;
height: 130rpx;
line-height: 130rpx;
border-bottom: mediumaquamarine 2rpx solid;
input {
height: 130rpx;
width: 65%;
line-height: 130rpx;
// padding-left: 30rpx;
}
.bindtitle {
width: 35%;
}
}
.btn {
width: 500rpx;
height: 90rpx;
margin: 0 auto;
display: flex;
justify-content: center;
margin-top: 140rpx;
}
button {
width: 220rpx;
// height: 100rpx;
background-color: #79E7E1;
color: #fff;
}
</style>

View File

@ -142,7 +142,6 @@
StudentScore: [],
studentInfoList: [],
studentIditem: [],
yonghuwx: [],
getchildlist: [],
studentId: "",
batchCode: "",
@ -152,47 +151,34 @@
},
onShow() {
let that = this;
const obj = uni.getStorageSync('studentId');
uni.getStorage({
key: 'phone',
success: function(res) {
that.phone = res.data
},
fail: function(err) {}
});
uni.getStorage({
key: 'user',
success: function(res) {
that.yonghuwx = res.data
// that.mask = true
},
fail: function(err) {}
});
if (!obj) {
uni.navigateTo({
url: "/pages/index/index"
})
} else {
var arr = {
"studentIdList": obj
}
getChildrenResultScore(arr).then(res => {
this.StudentScore = res.data
if (this.StudentScore.length == 1) {
getMotionPrescription(res.data[0].studentId, res.data[0].batchCode).then(res => {
this.studentInfoList = res.data
this.studentInfoList.forEach(e => {
e.motionPrescriptionVideoInfoVOList.forEach(el => {
el.count = 0
el.prescriptionVideoUrl = baseurl + el
.prescriptionVideoUrl
})
})
})
this.infolist();
this.phone = uni.getStorageSync('phone');
getInfoByPhone(this.phone).then(res => {
if (res.code == 200) {
var obj = {
studentIdList: []
}
})
}
res.data.studentInfoList.forEach(e => {
obj.studentIdList.push(e.studentId)
})
getChildrenResultScore(obj).then(res => {
this.StudentScore = res.data
if (this.StudentScore.length == 1) {
getMotionPrescription(res.data[0].studentId, res.data[0].batchCode).then(
res => {
this.studentInfoList = res.data
this.studentInfoList.forEach(e => {
e.motionPrescriptionVideoInfoVOList.forEach(el => {
el.count = 0
el.prescriptionVideoUrl = baseurl + el
.prescriptionVideoUrl
})
})
})
this.infolist();
}
})
} else {}
})
},
methods: {
look(uitem) {