新生报到移动端V1.0

This commit is contained in:
2025-07-16 17:44:45 +08:00
commit 50d2d6a12d
1058 changed files with 146425 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<!-- 校园网选取 -->
<template>
<view>
正在开发中...
<FloatBall />
</view>
</template>
<script>
import FloatBall from "@/pages/compoents/FloatBall.vue";
export default {
components: {
FloatBall
},
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

209
pages/Confirm/Confirm.vue Normal file
View File

@@ -0,0 +1,209 @@
<template>
<!-- 个人资料 -->
<view class="Userinformation">
<view class="list">
<view class="sm-list">
<text>姓名</text>
<text>{{stu_name}}</text>
</view>
<view class="sm-list">
<text>性别</text>
<text>{{gender}}</text>
</view>
<view class="sm-list">
<text>学号</text>
<text>{{stu_no}}</text>
</view>
<view class="sm-list">
<text>身份证号</text>
<text>{{sfzh}}</text>
</view>
<view class="sm-list">
<text>手机号</text>
<text>{{sjh}}</text>
</view>
<view class="sm-list">
<text>专业</text>
<text>{{zy}}</text>
</view>
</view>
<view class="btn">
<button @click="handleButtonClick" :disabled="is_read || (countdown > 0 && !is_read) "
:style="{ backgroundColor: buttonColor }">
{{ is_read ? "已确认" : countdown == 0 && is_read == 0 ? "确认" : '请先阅读以上内容并等待'+countdown+'秒' }}
</button>
</view>
<FloatBall />
</view>
</template>
<script>
import {
getUserInfo
} from "@/api/validApi.js";
import FloatBall from "@/pages/compoents/FloatBall.vue";
import {
confirmZyqr,
getOwnTaskStatusByCode
} from "@/api/toApi.js";
import {
isEmpty
} from "@/api/helpFunc.js";
export default {
components: {
FloatBall
},
data() {
return {
reset_pwd: "",
stu_name: "",
gender: "",
stu_no: "",
sfzh: "",
sjh: "",
zy: "",
countdown: 10,
timer: null,
is_read: false
}
},
async onLoad() {
await this.getUserInfo();
await this.getOwnTaskStatusByCode();
},
mounted() {
this.startTimer();
},
computed: {
buttonColor() {
if (this.is_read || (this.countdown > 0 && !this.is_read)) {
return 'gray'; // 倒计时结束后的背景色
} else {
return 'green'; // 倒计时进行中的背景色
}
}
},
methods: {
async getOwnTaskStatusByCode() {
let res = await getOwnTaskStatusByCode("ZYQR");
if (res.code == 200) {
if (!isEmpty(res.data)) {
this.is_read = res.data.status == '1';
}
}
},
async getUserInfo() {
let res = await getUserInfo();
console.log(res);
if (res.code == 200) {
let data = {
...res.data
};
this.zy = data.zy;
this.sjh = data.sjh;
this.stu_no = data.xh;
this.sfzh = data.sfzh;
this.stu_name = data.xsxm;
this.gender = data.xb;
}
},
startTimer() {
this.timer = setInterval(() => {
if (this.countdown > 0) {
this.countdown--;
} else {
clearInterval(this.timer);
}
}, 1000); // 每秒更新一次倒计时
},
async handleButtonClick() {
if (this.countdown === 0) {
let res = await confirmZyqr();
if (res.code == 200) {
this.is_read = true;
uni.redirectTo({
url: "/pages/newindex/newindex"
});
} else {
this.$refs.uToast.show({
type: "error",
message: res.msg,
duration: 1500,
})
}
} else {
console.log('请先阅读以上内容并等待倒计时结束!');
}
}
},
beforeDestroy() {
clearInterval(this.timer);
}
}
</script>
<style lang="less" scoped>
.Userinformation {
margin-bottom: 10rpx;
.list {
display: flex;
align-items: center;
flex-direction: column;
width: 100%;
.sm-list {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
width: 722rpx;
height: 60rpx;
border-bottom: 1px solid #EFEFEF;
text:nth-child(1) {
margin-top: 10px;
color: #0F0F0F;
}
text:nth-child(2) {
margin-top: 10px;
color: #575757;
}
.password {
display: flex;
align-items: center;
justify-content: flex-end;
width: 200rpx;
}
}
}
.btn {
display: flex;
justify-content: center;
align-items: center;
button {
position: fixed;
bottom: 100rpx;
// margin-left: 60rpx;
width: 80%;
border-radius: 50rpx;
color: white;
}
}
}
</style>

View File

@@ -0,0 +1,220 @@
<template>
<view class="updata-number">
<view class="info-message">
<text class="line">请检查下方手机号是否为当前在用号码</text>
<text class="line">如不是请修改</text>
<text class="line">无误后点击"确认"按钮提交</text>
<text class="line">我们将按此手机号为你注册学校企业微信账号</text>
</view>
<view class="list">
<view class="sm-list" v-for="(item, index) in infoList" :key="index">
<text>{{ item.label }}</text>
<text>{{ item.value }}</text>
</view>
<view class="sm-list">
<u--form labelPosition="left" :model="model1" ref="uForm" :borderBottom="false">
<u-form-item label="手机号码" prop="userInfo.sjh" borderBottom ref="item1" :labelWidth='200'
:borderBottom="false">
<u--input v-model="model1.userInfo.sjh" border="none" placeholder="请确认手机号码"
input-align="right"></u--input>
</u-form-item>
</u--form>
</view>
<zero-loading v-if="loading"></zero-loading>
<button @click="doEdit" class="save-button">确认</button>
<FloatBall />
</view>
</view>
</template>
<script>
import {
getUserInfo,
updateNumber,
GetOwnInfo
} from "@/api/validApi.js";
import {
confirmHmqr
} from "@/api/toApi.js";
import FloatBall from "@/pages/compoents/FloatBall.vue";
export default {
components: {
FloatBall
},
data() {
return {
infoList: [],
model1: {
userInfo: {
sjh: ''
}
},
loading: false,
xgid: '',
};
},
async onLoad() {
await this.loadUserInfo();
},
methods: {
async loadUserInfo() {
try {
const {
code,
data
} = await GetOwnInfo();
if (code === 200) {
this.infoList = [{
label: '姓名',
value: data.xsxm
},
{
label: '性别',
value: data.xb
},
{
label: '考生号',
value: data.ksh
},
{
label: '身份证号',
value: data.sfzh
}
];
this.model1.userInfo.sjh = data.sjh;
this.xgid = data.id;
}
} catch (error) {
console.error('获取信息出错', error);
}
},
async doEdit() {
const phone = this.model1.userInfo.sjh.trim();
if (!/^[0-9]{11}$/.test(phone)) {
wx.showToast({
title: '手机号必须是11位数字',
icon: 'none',
duration: 2000
});
this.model1.userInfo.sjh = '';
return;
}
const payload = {
id: this.xgid,
isChangeSJHM: 1,
sjh: phone
};
try {
this.loading = true;
const response = await updateNumber(payload);
if (response.code === 200) {
wx.showToast({
title: '修改成功',
icon: 'success',
duration: 1500
});
await this.confirmAndRedirect();
} else {
wx.showToast({
title: '修改失败',
icon: 'none',
duration: 2500
});
}
} catch (error) {
console.error('提交时出错', error);
wx.showToast({
title: '提交时出错',
icon: 'none',
duration: 1500
});
} finally {
this.loading = false;
}
},
async confirmAndRedirect() {
try {
const res = await confirmHmqr();
if (res.code == 200) {
uni.redirectTo({
url: "/pages/newindex/newindex"
});
} else {
wx.showToast({
title: '确认请求失败',
icon: 'none',
duration: 1500
});
}
} catch (error) {
console.error('确认请求时出错', error);
this.$refs.uToast.show({
type: "error",
message: '请求失败',
duration: 1500
});
}
}
}
};
</script>
<style lang="scss" scoped>
.updata-number {
.info-message {
padding: 10px;
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
border-radius: 5px;
// margin-bottom: 10px;
font-family: Arial, sans-serif;
font-size: 14px;
}
.line {
display: block;
text-indent: 20px; /* 控制缩进 */
margin-bottom: 8px; /* 控制行间距 */
}
.list {
display: flex;
flex-direction: column;
width: 100%;
.sm-list {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
width: 722rpx;
height: 60rpx;
border-bottom: 1px solid #EFEFEF;
text:nth-child(1) {
margin-top: 15px;
color: #494949;
}
text:nth-child(2) {
margin-top: 15px;
color: #808080;
}
}
}
.save-button {
position: fixed;
bottom: 100rpx;
margin-left: 60rpx;
width: 80%;
border-radius: 50rpx;
background-color: #38B865;
color: white;
}
}
</style>

181
pages/Photo/Photo.vue Normal file
View File

@@ -0,0 +1,181 @@
<!-- 照片采集 -->
<template>
<view class="Photo">
<view class="Picture_box" @tap="choosePic">
<text v-if="!photo" class="Picture_text">图片上传</text>
<image v-if="photo" :src="photo" mode=""></image>
</view>
<button class="Picture_button" @tap="submitOwnPhoto">上传图片</button>
<!-- 报错显示 -->
<u-toast ref="uToast"></u-toast>
<!-- 上传后加一段动画 -->
<zero-loading v-if="loading"></zero-loading>
<FloatBall />
</view>
</template>
<script>
//接口:
//本地存储接口
//获取个人信息接口
//图片上传接口
import {
getOwnPhoto, //获取新生照片
submitOwnPhoto //上传新生照片
} from "@/api/photo.js";
import {
isEmpty
} from '../../api/helpFunc';
//自定义组件
import FloatBall from "@/pages/compoents/FloatBall.vue";
//
export default {
components: {
FloatBall
},
data() {
return {
photo: null, //图片文件(base64编码)
loading: false //上传动画
}
},
async onLoad() {
this.loading = true
await this.getOwnPhoto();
this.loading = false
},
methods: {
//用户选择图片
choosePic: async function() {
//获取本地图片并且展示
let that = this;
uni.chooseImage({
count: 1, //图片选择一张
sizeType: ['compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
// 保存图片路径
//this.photo=res.tempFilePaths[0];
let tempImgPath = res.tempFilePaths[0];
//修改图片编码
//将图片路径转换为 Blob 对象
fetch(tempImgPath)
.then(response => response.blob())
.then(blob => {
// 修改图片编码
let reader = new FileReader();
reader.onload = function(event) {
that.photo = event.target.result;
//console.log(that.photo);
};
// 读取文件并将其转换为 Base64 编码
reader.readAsDataURL(blob);
// 读取文件并将其转换为 UTF-8 编码的文本格式
//reader.readAsText(blob, 'UTF-8');
})
.catch(err => {
this.$refs.uToast.show({
type: 'error',
message: '获取文件失败:' + err.message,
duration: 1500
});
});
},
fail: (err) => {
this.$refs.uToast.show({
type: 'error',
message: '选择图片失败:' + err.message,
duration: 1500
});
}
});
},
//新增图片到服务器
async submitOwnPhoto() {
let sdata = {
//表单数据
// 照片(base64编码)photo
photo: this.photo,
}
//表单数据判定
if (isEmpty(sdata.photo)) {
this.$refs.uToast.show({
type: 'error',
message: '请选择图片',
duration: 1500
});
return;
}
//动画显示
this.loading = true;
let res = await submitOwnPhoto(sdata);
this.loading = false;
if (res.code == 200) {
this.$refs.uToast.show({
type: "success",
message: res.msg,
duration: 1500,
});
} else {
console.log(res.msg);
this.$refs.uToast.show({
type: "error",
message: res.msg,
duration: 1500,
});
}
},
//从服务器获得新生照片照片
async getOwnPhoto() {
let that = this;
let res = await getOwnPhoto(); //连接服务器传入照片id
if (res.code == 200) {
if (!isEmpty(res.data)) {
let data = {
...res.data
};
that.photo = data.photo;
}
}
},
},
}
</script>
<style lang="less" scoped>
.Photo {
flex: 1;
.Picture_box {
height: 60vh;
margin: 10%;
border: 2px dashed gray;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
.Picture_text {
font-size: 45rpx;
writing-mode: vertical-rl;
text-orientation: upright;
color: #c5c5c5;
}
image {
height: 100%;
}
}
.Picture_button {
margin: 10%;
}
}
</style>

View File

@@ -0,0 +1,200 @@
<template>
<!-- 个人资料 -->
<view class="Userinformation">
<view class="list">
<view class="sm-list">
<text>姓名</text>
<text>{{stu_name}}</text>
</view>
<view class="sm-list">
<text>性别</text>
<text>{{gender}}</text>
</view>
<view class="sm-list">
<text>学号</text>
<text>{{stu_no}}</text>
</view>
<view class="sm-list">
<text>身份证号</text>
<text>{{sfzh}}</text>
</view>
<view class="sm-list">
<text>手机号</text>
<text>{{sjh}}</text>
</view>
<view class="sm-list">
<text>专业</text>
<text>{{zy}}</text>
</view>
<view class="sm-list">
<text>宿舍</text>
<text>{{room}}</text>
</view>
<view class="sm-list">
<text>密码</text>
<view @click="doResetPwd" class="password">
<text>**********</text>
<u-icon name="edit-pen" color="#494949" size="28"></u-icon>
</view>
</view>
</view>
<!-- <button @click="toGo" style="margin-top: 2rem;">继续流程</button> -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" title="重置密码" :value="reset_pwd" placeholder="请输入新密码"
@confirm="dialogInputConfirm"></uni-popup-dialog>
</uni-popup>
<u-toast ref="uToast"></u-toast>
<FloatBall />
</view>
</template>
<script>
import middleware from "@/middleware/index.js";
import {
getUserInfo,
changePwd
} from "@/api/validApi.js";
import {
isEmpty
} from "@/api/helpFunc.js";
import {
getOwnRoomInfo
} from "@/api/dormApi.js";
import FloatBall from "@/pages/compoents/FloatBall.vue";
export default {
components: {
FloatBall
},
data() {
return {
reset_pwd: "",
stu_name: "",
gender: "",
stu_no: "",
sfzh: "",
sjh: "",
zy: "",
room: "暂无",
}
},
async created() {
await middleware()
this.getOwnInfo()
},
methods: {
toGo() {
uni.redirectTo({
url: "/pages/newindex/newindex"
})
},
async dialogInputConfirm(val) {
if (val.length < 6) {
this.$refs.uToast.show({
type: "error",
message: "密码长度不能小于6位",
duration: 1500,
})
} else {
let sdata = {
pwd: val
}
let res = await changePwd(sdata);
if (res.code == 200) {
this.$refs.uToast.show({
type: "success",
message: res.msg,
duration: 1500,
complete: () => {
uni.navigateTo({
url: "/pages/login/index"
})
}
})
} else {
this.$refs.uToast.show({
type: "error",
message: res.msg,
duration: 1500,
})
}
}
},
doResetPwd() {
this.$refs.inputDialog.open()
},
async getOwnInfo() {
let res = await getUserInfo();
if (res.code == 200) {
let data = {
...res.data
};
console.log(res.data);
if (!isEmpty(data.xsxm)) {
this.stu_name = data.xsxm;
this.stu_no = data.xh;
this.gender = data.xb;
this.sfzh = data.sfzh;
this.sjh = data.sjh;
this.zy = data.zy;
}
}
let res2 = await getOwnRoomInfo();
if (res2.code == 200) {
let data = res2.data;
if (!isEmpty(data.BuildingName)) {
let park = data.ParkName == "default" ? "" : data.ParkName + "-";
let building = data.BuildingName == "default" ? "" : data.BuildingName + "-";
this.room = park + building + data.UnitName + "-" + data.RoomNo;
}
}
},
}
}
</script>
<style lang="less" scoped>
.Userinformation {
margin-bottom: 10rpx;
.list {
display: flex;
align-items: center;
flex-direction: column;
width: 100%;
.sm-list {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
width: 722rpx;
height: 60rpx;
border-bottom: 1px solid #EFEFEF;
text:nth-child(1) {
margin-top: 10px;
color: #0F0F0F;
}
text:nth-child(2) {
margin-top: 10px;
color: #575757;
}
.password {
display: flex;
align-items: center;
justify-content: flex-end;
width: 200rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,301 @@
<template>
<view class="bed">
<!-- <view class="location">
<view class="right">
<view class="item" v-for="(item,index) in bedList[0]" :key="index">
<image src="../../static/icon/bed-choice.png" mode="aspectFit"></image>
<text>{{item}}</text>
</view>
</view>
<text style="color: #808080;" class="aisle">过道</text>
<view class="left">
<view class="item" v-for="(item,index) in bedList[1]" :key="index">
<image src="../../static/icon/bed-choice-right.png" mode="aspectFit"></image>
<text>{{item}}</text>
</view>
</view>
</view> -->
<!-- <view class="middle">
<text>床位图示意</text>
</view> -->
<!-- 房间信息 -->
<view class="dormitory-info">
<text style="font-size: 36rpx; color: #131313;">{{roomName}}</text>
<br>
<!-- <text style="color: #808080; font-size: 28rpx;">南校区/学生公寓一/9</text> -->
</view>
<!-- 房间选择 -->
<view class="dormitory-choose">
<view :class="!item.state?'item':'item-selected'" :id="activeIndex == index?'dormitory-choose-active':''"
v-for="(item,index) in bedStateList" :key="index" @click="chooseDormitory(item)">
<text>{{item.bedPosition+""+item.name+""}}</text><br />
<text style="position: relative;top: -130rpx;">{{item.is_own ? "(我的床位)" : ""}}</text>
</view>
</view>
<!-- <view style="margin-top: 700rpx;">
<u-button text="确定" :disabled="disabledState" type="primary" @click="rightBed"></u-button>
</view> -->
<u-toast ref="uToast" @show="showToast"></u-toast>
<!-- 提示窗示例 -->
<uni-popup ref="alertDialog" type="dialog">
<uni-popup-dialog :type="msgType" cancelText="关闭" confirmText="同意" title="通知" content="真的要取消选择床位吗"
@confirm="dialogConfirm"></uni-popup-dialog>
</uni-popup>
<!-- 提示信息弹窗 -->
<uni-popup ref="message" type="message">
<uni-popup-message :type="msgType" :message="messageText" :duration="2000"></uni-popup-message>
</uni-popup>
<zero-loading v-if="loading"></zero-loading>
</view>
</template>
<script>
import {
chooseBed,
getBedsInfoByDormId,
cancelOwnBed
} from "@/api/dormApi.js";
import {
isEmpty
} from "@/api/helpFunc.js";
export default {
data() {
return {
loading: false,
roomName: "",
bedStateList: [],
// 选择状态
activeIndex: -1,
disabledState: true,
toastParams: {
message: "该床位已被选中",
type: "error",
duration: 1000
},
dorm_id: null,
msgType: 'success',
messageText: '这是一条成功提示',
}
},
methods: {
async dialogConfirm() {
console.log('点击确认')
this.loading = true;
let res = await cancelOwnBed();
if(res.code == 200){
this.toastParams.message = res.msg;
this.toastParams.type = "success";
}else{
this.toastParams.message = res.msg;
this.toastParams.type = "error";
}
this.showToast();
this.getBedInfo();
this.loading = false;
},
async getBedInfo() {
this.loading = true;
let res = await getBedsInfoByDormId(this.dorm_id);
this.loading = false;
if (res.code == 200) {
let data = res.data;
let temp = [];
let my_stu_no = uni.getStorageSync("stu_no");
console.log(data);
data.map(x => {
temp.push({
bedPosition: x.BedCode + "号床",
name: x.XSXM == null ? "空床位" : x.XSXM,
state: x.hasStudent,
id: x.id,
xh: my_stu_no,
is_own: my_stu_no == x.XH
});
});
this.bedStateList = [...temp];
}
},
async chooseDormitory(v) {
console.log(v)
if (v.is_own) {
this.loading = false;
this.msgType = "info";
this.$refs.alertDialog.open()
return;
}
if (v.state) {
this.message="该床位已被选中";
this.type="error";
return this.showToast();
}
this.loading = true;
let sdata = {
bedId: v.id,
dormitoryId: this.dorm_id
};
let res = await chooseBed(sdata);
this.loading = false;
if (res.code == 200) {
this.toastParams.message = "选择成功";
this.toastParams.type = "success";
this.showToast();
setTimeout(() => {
uni.switchTab({
url: "/pages/pay/index"
})
}, 1000);
} else {
this.getBedInfo();
this.toastParams.message = "换个床位吧";
this.toastParams.type = "error";
this.showToast();
}
},
rightBed() {
let params = {
type: "loading",
message: "正在确认",
}
this.showToast(params)
},
showToast(params) {
this.$refs.uToast.show({
...this.toastParams,
...params
})
}
},
onLoad(value) {
let data = JSON.parse(value.param);
this.roomName = data.name + "-" + data.bedNum + "人间";
this.dorm_id = data.id;
this.getBedInfo();
}
}
</script>
<style lang="scss" scoped>
$text-color: #808080;
.bed {
padding: 20rpx;
padding-bottom: 50px;
// 床位的位置
.location {
display: flex;
justify-content: space-around;
align-items: center;
height: 600rpx;
margin: 40rpx 0;
.aisle {
writing-mode: vertical-rl;
/* 设置文字垂直排列方向为从上到下 */
text-orientation: upright;
/* 设置文字方向为直立 */
font-size: 40rpx;
}
.right {
border-right: 1px solid #E9E9E9;
padding: 0 90rpx;
}
.left {
border-left: 1px solid #E9E9E9;
padding: 0 90rpx;
}
.right,
.left {
display: flex;
flex-direction: column;
height: 600rpx;
justify-content: space-between;
.item {
display: flex;
align-items: center;
flex-direction: column;
justify-content: space-between;
height: 140rpx;
text-align: center;
text {
display: block;
color: $text-color;
font-size: 40rpx;
}
image {
width: 70rpx;
height: 50rpx;
}
}
}
}
.middle {
text-align: center;
color: $text-color;
height: 100rpx;
border-bottom: 1px solid #E2E2E2;
margin-bottom: 40rpx;
}
// 房间信息
.dormitory-info {
padding-bottom: 30rpx;
margin-bottom: 30rpx;
border-bottom: 1px solid #E9E9E9;
}
#dormitory-choose-active {
background-color: #4A90E2;
color: white;
transition: 200ms linear;
}
// 宿舍选择
.dormitory-choose {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 60rpx;
.item-selected {
background-color: #F4F4F4;
color: #7B7B7B;
}
.item-selected,
.item {
width: 346rpx;
height: 160rpx;
text-align: center;
line-height: 160rpx;
margin-bottom: 25rpx;
transition: 200ms ease-out;
}
.item {
background-color: #F2F8FF;
color: #4A90E2;
}
}
}
</style>

22
pages/common/webview.vue Normal file
View File

@@ -0,0 +1,22 @@
<template>
<web-view :src="pageUrl"></web-view>
</template>
<script>
export default {
data() {
return {
pageUrl: ''
}
},
onLoad(item) {
this.pageUrl = decodeURIComponent(item.pageUrl)
console.log(this.pageUrl)
// 传入需要跳转的链接 使用web-view标签进行跳转
}
}
</script>
<style lang="scss">
</style>

View File

@@ -0,0 +1,87 @@
<template>
<view class="continueFloat">
<view class="jiantou" @click="toGo">首页</view>
<!-- <text style="font-size: 0.8rem;color: darkslategrey;text-align: center;">首页</text> -->
</view>
</template>
<script>
import $ from "@/static/js/jquery-3.6.4.min.js";
export default {
mounted() {
var idom = document.getElementsByClassName("continueFloat");
var contW = $(idom).width();
var contH = $(idom).height();
var startX, startY, sX, sY, moveX, moveY, leftX, rightX, topY, bottomY;
var winW = $(window).width();
var winH = $(window).height();
$(idom).on({ //绑定事件
touchstart: function(e) {
startX = e.originalEvent.targetTouches[0].pageX; //获取点击点的X坐标
startY = e.originalEvent.targetTouches[0].pageY; //获取点击点的Y坐标
sX = $(idom).offset().left; //相对于当前窗口X轴的偏移量
sY = $(idom).offset().top; //相对于当前窗口Y轴的偏移量
leftX = startX - sX; //鼠标所能移动的最左端是当前鼠标距div左边距的位置
rightX = winW - contW + leftX; //鼠标所能移动的最右端是当前窗口距离减去鼠标距div最右端位置
topY = startY - sY; //鼠标所能移动最上端是当前鼠标距div上边距的位置
bottomY = winH - contH + topY; //鼠标所能移动最下端是当前窗口距离减去鼠标距div最下端位置
},
touchmove: function(e) {
e.preventDefault();
//移动过程中XY轴的坐标要减去margin的距离
moveX = e.originalEvent.targetTouches[0].pageX; //移动过程中X轴的坐标
moveY = e.originalEvent.targetTouches[0].pageY; //移动过程中Y轴的坐标
//判断的时候要计算加上padding的距离
if (moveX < leftX) {
moveX = leftX;
}
if (moveX > rightX) {
moveX = rightX;
}
if (moveY < topY) {
moveY = topY + 150; //顶部可留空间
}
if (moveY > bottomY) {
moveY = bottomY - 80; //底部可留空间
}
if (startY < winH) {
$(this).css({
"top": moveY + sY - startY,
})
}
$(this).css({
"left": moveX + sX - startX, //去掉之后仅沿y轴移动
"top": moveY + sY - startY,
})
}
})
},
methods: {
toGo() {
uni.redirectTo({
url: "/pages/newindex/newindex" // 跳转至修改密码页面路径
});
},
}
}
</script>
<style scoped lang="scss">
.continueFloat {
position: fixed;
z-index: 999;
left: 30rpx;
.jiantou {
background-color: rgba(60, 158, 255, 0.8);
width: 100rpx;
height: 100rpx;
border-radius: 50rpx;
color: white;
text-align: center;
line-height: 100rpx;
border: 1px solid white;
}
}
</style>

View File

@@ -0,0 +1,196 @@
<template>
<view class="dormitory">
<view class="room-top">
我的宿舍: <text style="color: indianred;">{{my_room}}</text>
</view>
<view :class="own_dorm == v.id ?'my-dormitory-item' : 'dormitory-item' " :id="v.msg?'':'not-full'"
v-for="(v,i) in dormitoryList" :key="i" @click="chooseDorm(v)">
<text style="font-size: 0.8rem;">{{v.parkName == "default" ? "" : v.parkName}}</text>
<text>{{v.buildingName == "default" ? "" : v.buildingName}}</text>
<text>{{v.name}}</text>
<text>{{v.msg | filtPreson}}</text>
<text>可选床位数:{{v.bedCount}}</text>
</view>
<u-toast ref="uToast" @show="toSomePage"></u-toast>
<zero-loading v-if="loading"></zero-loading>
<FloatBall />
</view>
</template>
<script>
import FloatBall from "@/pages/compoents/FloatBall.vue";
import {
isEmpty
} from "@/api/helpFunc.js";
import {
listRoom,
listOwnCanSelectDorm,
getOwnRoomInfo
} from "@/api/dormApi.js";
export default {
components: {
FloatBall
},
data() {
return {
dormitoryList: [],
loading: false,
own_dorm: null,
my_room: "暂无"
}
},
async onShow() {
await this.listRoom();
},
methods: {
chooseDorm() {
},
async listRoom() {
this.loading = true;
let res = await listOwnCanSelectDorm();
this.loading = false;
let temp = [];
if (res.code == 200) {
let rows = [...res.data];
rows.map(x => {
temp.push({
buildingName: x.buildingName,
name: x.roomNo,
msg: x.bedNum - x.occupancy,
bedNum: x.bedNum,
id: x.id,
parkName: x.parkName,
bedCount: x.bedCount
});
});
this.dormitoryList = [...temp];
}
let res2 = await getOwnRoomInfo();
if (res2.code == 200) {
let data = res2.data;
if (!isEmpty(data.BuildingName)) {
this.own_dorm = data.DormId;
uni.setStorageSync("own_dorm", data.DormId);
let park = data.ParkName == "default" ? "" : data.ParkName + "-";
let building = data.BuildingName == "default" ? "" : data.BuildingName + "-";
this.my_room = park + building + data.UnitName + "-" + data.RoomNo;
} else {
this.my_room = "暂无";
this.own_dorm = null;
uni.setStorageSync("own_dorm", null);
}
}
},
toSomePage(v) {
let sdata = {
...v
};
let param = JSON.stringify(sdata)
uni.navigateTo({
url: `/pages/bedChoice/bedChoice?param=` + param
})
}
},
filters: {
filtPreson(value) {
if (value) {
return `剩余${value}个床位`
}
return "已满"
}
}
}
</script>
<style lang="scss" scoped>
.room-top {
// background-color: aquamarine;
width: 670rpx;
margin: 0 auto;
height: 60rpx;
line-height: 60rpx;
padding-left: 10rpx;
}
.dormitory {
padding: 25rpx;
display: flex;
flex-wrap: wrap;
#not-full {
background-color: #F4F4F4;
color: #7B7B7B;
text {
color: #7B7B7B;
}
text:nth-child(2) {
color: #A0A0A0;
}
}
.my-dormitory-item {
width: 215rpx;
height: fit-content;
background-color: #409EFF;
// border: 1px dotted yellow;
color: white;
margin: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
padding: 10rpx 0 10rpx 0;
image {
width: 66rpx;
height: 88rpx;
}
text {
// color: #4A90E2;
font-size: 28rpx;
}
text:nth-child(2) {
color: #f0f0f0;
}
}
.dormitory-item {
width: 215rpx;
height: fit-content;
background-color: #F2F8FF;
margin: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
padding: 10rpx 0 10rpx 0;
image {
width: 66rpx;
height: 88rpx;
}
text {
color: #4A90E2;
font-size: 28rpx;
}
text:nth-child(2) {
color: #71B2FF;
}
}
}
</style>

253
pages/filling/filling.vue Normal file
View File

@@ -0,0 +1,253 @@
<template>
<!-- 信息填报 -->
<view class="filling">
<u-picker keyName="cateName" v-if="showTransportation" :show="showTransportation" :columns="transportation"
@confirm="rightTransportation" @cancel="showTransportation = false" :value="form.transportation"></u-picker>
<u-picker :show="showCatch" v-if="showCatch" :columns="columns" @confirm="rightCatch"
@cancel="showCatch = false" v-model="form.catch"></u-picker>
<u-datetime-picker :show="showDate" v-if="showDate" :value="form.time" mode="datetime" @confirm="rightTime"
@cancel="showDate = false"></u-datetime-picker>
<u--form labelPosition="top" :model="form" ref="uForm" :rules="rules">
<u-form-item label="交通工具" labelWidth="80" prop="transportation" ref="item1">
<u--input :disabled="isWrite" value-name="dictValue" label-name="dictLabel" placeholder="请选择交通工具"
:readonly="true" :suffixIcon="showTransportation?'arrow-up':'arrow-down'"
:value="form.transportationLabel"
@click.native="isWrite ? isWrite=true : showTransportation = !showTransportation"></u--input>
</u-form-item>
<u-form-item label="到达车站/机场" labelWidth="120" prop="station" ref="item1">
<u--input :disabled="isWrite" placeholder="请输入到达车站/机场" v-model="form.station"></u--input>
</u-form-item>
<u-form-item label="到达时间" labelWidth="80" prop="time" ref="item1">
<u--input placeholder="请选择到达时间" labelWidth="80" :readonly="true" prefixIcon="clock"
v-model="currentTime" @click.native="showDateTime"></u--input>
</u-form-item>
<!-- <u-form-item label="是否接站" labelWidth="80" prop="catch" ref="item1">
<u--input :disabled="isWrite" placeholder="请选择是否接站" labelWidth="80" :readonly="true"
:suffixIcon="showCatch?'arrow-up':'arrow-down'" v-model="form.catch"
@click.native="isWrite ? isWrite=true : showCatch = !showCatch"></u--input>
</u-form-item> -->
<u-button class="submit-btn" :disabled="isWrite" text="完成" type="primary" @click="submit"></u-button>
</u--form>
<u-toast ref="uToast" @show="submit"></u-toast>
<FloatBall />
</view>
</template>
<script>
import {
getOwnArrInfo,
addOwnArrInfo,
getVehicle
} from "@/api/arrivalinfoApi.js";
import {
isEmpty
} from "@/api/helpFunc.js";
import FloatBall from "@/pages/compoents/FloatBall.vue";
import moment from "moment"
import "moment/locale/zh-cn"
export default {
components: {
FloatBall
},
data() {
return {
isWrite: false,
// 选择时间显示
showDate: false,
// 选择接站显示or隐藏
showCatch: false,
// 选择交通工具
showTransportation: false,
form: {
transportation: "",
station: "",
time: Number(new Date()),
catch: "",
id:''
},
currentTime: '',
columns: [
[
"是",
"否"
]
],
transportation: [],
rules: {
name: {
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
},
transportation: {
type: 'string',
required: true,
message: '请选择交通工具',
trigger: ['blur', 'change']
},
station: {
type: 'string',
required: true,
message: '请输入到达的站点',
trigger: ['blur', 'change']
},
catch: {
type: 'string',
required: true,
message: '请选择是否要接站',
trigger: ['blur', 'change']
},
time: {
type: 'any',
required: true,
message: '请选择到站时间',
trigger: ['blur', 'change']
},
}
}
},
methods: {
async getWrite() {
let res = await getOwnArrInfo();
if (res.code == 200) {
let data = res.data;
let temp = this.transportation[0].find((x) => {
if (parseInt(x.id) == data.toolsType) {
return x;
}
});
this.form.transportationLabel = temp.cateName;
this.form.transportation = temp.id;
this.form.id=data.id;
this.form.station = data.atStation;
let time = moment(data.atDatetime).valueOf();
this.currentTime = data.atDatetime;
this.form.time = time;
this.form.catch = data.isNeedPick == 1 ? "是" : "否";
// this.isWrite = true;
}
},
async getTrans() {
let res = await getVehicle();
if (res.code == 200) {
let temp2 = [];
res.data.map(x => {
temp2.push({
cateName: x.dictLabel,
id: x.dictValue
});
});
this.transportation.push([...temp2]);
}
},
// 选择的时间
rightTime(value) {
this.currentTime = moment(value.value).format('YYYY年MM月DD日 HH:mm')
this.form.time = value.value
this.showDate = false
},
// 显示选择时间的selected
showDateTime() {
if (this.isWrite) return
this.showDate = !this.showDate
},
// 确认是否接站
rightCatch(Array) {
this.form.catch = Array.value[0]
this.showCatch = false
},
// 选择出行的方式
rightTransportation(Array) {
this.form.transportationLabel = Array.value[0].cateName;
this.form.transportation = Array.value[0].id;
this.showTransportation = false
},
// 提交表单
submit() {
if (this.form.station.length > 20) {
this.$refs.uToast.show({
type: "error",
message: "到站不能超过30个字",
duration: 1500,
});
return;
}
this.$refs.uForm.validate().then(res => {
this.$refs.uToast.show({
type: "loading",
loading: true,
message: "保存中",
duration: 600,
complete: () => {
let sdata = {};
let temp = {
...this.form
};
sdata.id=temp.id
sdata.toolsType = temp.transportation;
sdata.atStation = temp.station;
sdata.atDatetime = temp.time;
sdata.isNeedPick = temp.catch == "是" ? 1 : 0;
addOwnArrInfo(sdata).then(res => {
console.log(res);
if (res.code == 200) {
uni.$u.toast('保存成功');
// this.isWrite = true;
this.getWrite();
uni.redirectTo({
url: "/pages/newindex/newindex"
});
}
})
}
})
uni.setStorageSync("regin", this.form)
}).catch(errors => {
uni.$u.toast('请填写完整信息')
})
}
},
created() {
this.getTrans();
this.getWrite();
if (!uni.getStorageSync("regin"))
return ""
this.form = uni.getStorageSync("regin")
this.currentTime = moment(this.form.time).format('YYYY年MM月DD日 HH:mm')
}
}
</script>
<style lang="less" scoped>
.filling {
padding: 50rpx;
// height: 90vh;
display: flex;
flex-direction: column;
justify-content: space-between;
.u-form-item {
/deep/ .u-form-item__body__left {
margin-bottom: 10px !important;
}
}
.submit-btn {
margin-top: 100rpx;
}
}
.u-input {
background-color: white;
}
</style>

356
pages/gather/gather.vue Normal file
View File

@@ -0,0 +1,356 @@
<template>
<view class="gather">
<!-- 滚动通知 -->
<view class="notic">
<u-notice-bar :text="text1"></u-notice-bar>
</view>
<!-- 内容 -->
<u-form labelPosition="left" :model="model1" ref="uForm" :borderBottom="false" class="list">
<!-- 基本信息展示 -->
<u-form-item label="姓名" :labelWidth="120">
<text>{{ info.stu_name }}</text>
</u-form-item>
<u-form-item label="性别" :labelWidth="120">
<text>{{ info.gender }}</text>
</u-form-item>
<u-form-item label="民族" :labelWidth="120">
<text>{{ info.mz }}</text>
</u-form-item>
<u-form-item label="身份证号" :labelWidth="120">
<text>{{ info.sfzh }}</text>
</u-form-item>
<u-form-item label="院系" :labelWidth="120">
<text>{{ info.xy }}</text>
</u-form-item>
<u-form-item label="专业" :labelWidth="120">
<text>{{ info.zy }}</text>
</u-form-item>
<u-form-item label="班级" :labelWidth="120">
<text>{{ info.bj }}</text>
</u-form-item>
<u-form-item label="联系方式" :labelWidth="120">
<text>{{ info.phone }}</text>
</u-form-item>
<!-- 可编辑信息 -->
<u-form-item label="家长姓名" prop="userInfo.famName" :labelWidth="200">
<u--input v-model="model1.userInfo.famName" border="none" placeholder="请输入" input-align="right" />
</u-form-item>
<u-form-item label="家长电话" prop="userInfo.famPhone" :labelWidth="200">
<u--input v-model="model1.userInfo.famPhone" border="none" placeholder="请输入" input-align="right" />
</u-form-item>
<u-form-item label="与本人关系" prop="userInfo.famRelation" :labelWidth="200">
<u--input v-model="model1.userInfo.famRelation" border="none" placeholder="请输入" input-align="right" />
</u-form-item>
<u-form-item label="家庭住址" prop="userInfo.address" :labelWidth="130">
<u--textarea v-model="model1.userInfo.address" placeholder="请输入详细家庭住址" height="80" border="none"
autoHeight />
</u-form-item>
<u-form-item label="是否退役复学" prop="userInfo.isRetired" :labelWidth="200" @click="showRetired = true;">
<u--input v-model="model1.userInfo.isRetired" border="none" placeholder="请选择" input-align="right"
readonly />
<u-icon slot="right" name="arrow-right" />
</u-form-item>
<u-form-item label="是否建档立卡户" prop="userInfo.isFiling" :labelWidth="200" @click="showFiling = true;">
<u--input v-model="model1.userInfo.isFiling" border="none" placeholder="请选择" input-align="right"
readonly />
<u-icon slot="right" name="arrow-right" />
</u-form-item>
<u-form-item label="本人是否残疾" prop="userInfo.isDisability" :labelWidth="200" @click="showDisability = true;">
<u--input v-model="model1.userInfo.isDisability" border="none" placeholder="请选择" input-align="right"
readonly />
<u-icon slot="right" name="arrow-right" />
</u-form-item>
<u-form-item v-if="model1.userInfo.isDisability==='是'" label="残疾说明" prop="userInfo.disableDescript"
:labelWidth="200">
<u--input v-model="model1.userInfo.disableDescript" border="none" placeholder="请输入"
input-align="right" />
</u-form-item>
<u-form-item label="是否吸烟" prop="userInfo.isSmoke" :labelWidth="200" @click="showIsSmoke = true;">
<u--input v-model="model1.userInfo.isSmoke" border="none" placeholder="请选择" input-align="right"
readonly />
<u-icon slot="right" name="arrow-right" />
</u-form-item>
<u-form-item label="是否早睡" prop="userInfo.isEarly" :labelWidth="200" @click="showIsEarly = true;">
<u--input v-model="model1.userInfo.isEarly" border="none" placeholder="请选择" input-align="right"
readonly />
<u-icon slot="right" name="arrow-right" />
</u-form-item>
<u-form-item label="兴趣特长" prop="userInfo.hobby" :labelWidth="200">
<u--input v-model="model1.userInfo.hobby" border="none" placeholder="请输入" input-align="right" />
</u-form-item>
<u-form-item label="修改密码" :labelWidth="200">
<u--input value="********" @click.native="doResetPwd" border="none" input-align="right"
placeholder="请输入" readonly />
</u-form-item>
</u-form>
<!-- 选择面板 -->
<u-action-sheet :show="showRetired" :actions="actions" title="选择是否退役复学" @close="showRetired = false"
@select="retiredSelect" />
<u-action-sheet :show="showFiling" :actions="actions" title="选择是否建档立卡户" @close="showFiling = false"
@select="filingSelect" />
<u-action-sheet :show="showDisability" :actions="actions" title="选择是否残疾" @close="showDisability = false"
@select="disabilitySelect" />
<u-action-sheet :show="showIsSmoke" :actions="actions" title="选择是否吸烟" @close="showIsSmoke = false"
@select="isSmokeSelect" />
<u-action-sheet :show="showIsEarly" :actions="actions" title="选择是否早睡" @close="showIsEarly = false"
@select="isEarlySelect" />
<!-- 密码弹窗 -->
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" title="重置密码" :value="reset_pwd" placeholder="请输入新密码"
@confirm="dialogInputConfirm" />
</uni-popup>
<u-toast ref="uToast"></u-toast>
<zero-loading v-if="loading"></zero-loading>
<button @click="doEdit" style="margin:20rpx 30rpx 0 30rpx;background-color: #38B865;color:white;">保存</button>
<FloatBall />
</view>
</template>
<script>
import {
getUserInfo,
editInfo,
changePwd
} from "@/api/validApi.js";
import FloatBall from "@/pages/compoents/FloatBall.vue";
import {
isEmpty
} from "@/api/helpFunc.js";
export default {
components: {
FloatBall
},
data() {
return {
text1: '信息收集关系到报到情况,请如实填写',
model1: {
userInfo: {
phone: '',
address: '',
isSmoke: "",
isEarly: "",
hobby: "",
famName: "",
famPhone: "",
famRelation: "",
isRetired: "",
isFiling: "",
isDisability: "",
disableDescript: ""
},
},
reset_pwd: "",
info: {
stu_name: "",
gender: "",
mz: "",
sfzh: "",
xy: "",
zy: "",
bj: "",
phone: ""
},
actions: [{
name: '否'
},
{
name: '是'
},
],
loading: false,
showRetired: false,
showDisability: false,
showFiling: false,
showIsSmoke: false,
showIsEarly: false
}
},
created() {
this.getOwnInfo();
},
methods: {
async dialogInputConfirm(val) {
if (val.length < 6) {
this.$refs.uToast.show({
type: "error",
message: "密码长度不能小于6位",
duration: 1500,
})
} else {
let sdata = {
pwd: val
}
let res = await changePwd(sdata);
if (res.code == 200) {
this.$refs.uToast.show({
type: "success",
message: res.msg,
duration: 1500
})
} else {
this.$refs.uToast.show({
type: "error",
message: res.msg,
duration: 1500,
})
}
}
},
doResetPwd() {
this.$refs.inputDialog.open()
},
async doEdit() {
const sdata = {
famNowAddr: this.model1.userInfo.address,
famRelation: this.model1.userInfo.famRelation,
famName: this.model1.userInfo.famName,
famPhone: this.model1.userInfo.famPhone,
isRetired: this.model1.userInfo.isRetired,
isFiling: this.model1.userInfo.isFiling,
isDisability: this.model1.userInfo.isDisability,
disableDescript: this.model1.userInfo.disableDescript,
isSmoke: this.model1.userInfo.isSmoke,
isEarly: this.model1.userInfo.isEarly,
hobby: this.model1.userInfo.hobby
}
if (!sdata.famRelation) {
this.$refs.uToast.show({
type: "error",
message: "与本人关系不能为空",
duration: 1500
});
return;
}
if (!sdata.famNowAddr) {
this.$refs.uToast.show({
type: "error",
message: "地址数据不能为空",
duration: 1500
});
return;
}
if (!sdata.famName) {
this.$refs.uToast.show({
type: "error",
message: "家长姓名不能为空",
duration: 1500
});
return;
}
if (!sdata.famPhone) {
this.$refs.uToast.show({
type: "error",
message: "家长电话不能为空",
duration: 1500
});
return;
}
if (isEmpty(sdata.isSmoke)) {
this.$refs.uToast.show({
type: "error",
message: "请选择是否吸烟",
duration: 1500
});
return;
}
if (isEmpty(sdata.isEarly)) {
this.$refs.uToast.show({
type: "error",
message: "请选择是否早睡",
duration: 1500
});
return;
}
if (isEmpty(sdata.hobby)) {
this.$refs.uToast.show({
type: "error",
message: "请输入兴趣特长",
duration: 1500
});
return;
}
this.loading = true;
let res = await editInfo(sdata);
this.loading = false;
if (res.code == 200) {
this.$refs.uToast.show({
type: "success",
message: "修改成功",
duration: 1500,
});
uni.redirectTo({
url: "/pages/newindex/newindex"
});
}
},
async getOwnInfo() {
let res = await getUserInfo();
if (res.code == 200) {
let data = res.data;
this.info.stu_name = data.xsxm;
this.info.gender = data.xb;
this.info.mz = data.mz;
this.info.sfzh = data.sfzh;
this.info.xy = data.xy;
this.info.zy = data.zy;
this.info.bj = data.bj;
this.info.phone = data.sjh;
this.model1.userInfo.address = data.famNowAddr;
this.model1.userInfo.famRelation = data.famRelation;
this.model1.userInfo.famName = data.famName;
this.model1.userInfo.famPhone = data.famPhone;
this.model1.userInfo.isRetired = data.isRetired;
this.model1.userInfo.isFiling = data.isFiling;
this.model1.userInfo.isDisability = data.isDisability;
this.model1.userInfo.disableDescript = data.disableDescript;
this.model1.userInfo.isSmoke = data.isSmoke;
this.model1.userInfo.isEarly = data.isEarly;
this.model1.userInfo.hobby = data.hobby;
}
},
retiredSelect(e) {
this.model1.userInfo.isRetired = e.name
},
filingSelect(e) {
this.model1.userInfo.isFiling = e.name;
},
disabilitySelect(e) {
this.model1.userInfo.isDisability = e.name;
if (e.name == "否") {
this.model1.userInfo.disableDescript = "";
}
},
isSmokeSelect(e) {
this.model1.userInfo.isSmoke = e.name;
},
isEarlySelect(e) {
this.model1.userInfo.isEarly = e.name;
},
}
}
</script>
<style lang="less" scoped>
.gather {
.list {
padding: 0 10rpx;
background: #fff;
border-radius: 16rpx;
margin-top: 20rpx;
}
.u-form-item {
border-top: 1px solid #efefef;
}
.u-form-item:first-child {
border-top: none;
}
}
</style>

View File

@@ -0,0 +1,60 @@
<template>
<view class="help-and-feedback">
<textarea placeholder-style="color: #D3D3D3; font-size:28rpx;" cols="30" rows="10"
placeholder="如果你在使用小程序的过程中,遇到任何体验问题或功能建议,欢迎反馈~" v-model="content"></textarea>
<view style="margin-top: 400rpx;">
<u-button text="提交" type="primary" @click="doFeedback"></u-button>
</view>
<u-toast ref="uToast"></u-toast>
</view>
</template>
<script>
import {addFeedback} from '@/api/feedbackApi.js';
export default {
data() {
return {
content:""
}
},
methods: {
async doFeedback(){
let sdata = {
opinion : this.content
};
let res = await addFeedback(sdata);
if(res.code == 200){
this.$refs.uToast.show({
type: "success",
message: res.msg,
duration: 1500,
complete: () => {
this.content = "";
}
});
}else{
this.$refs.uToast.show({
type: "error",
message: res.msg,
duration: 1500,
})
}
}
}
}
</script>
<style lang="scss" scoped>
.help-and-feedback {
padding: 25rpx;
textarea {
padding: 10rpx 0;
width: 100%;
border-bottom: 1px solid #EFEFEF;
border-top: 1px solid #EFEFEF;
}
}
</style>

37
pages/help/helpword.vue Normal file
View File

@@ -0,0 +1,37 @@
<template>
<view class="help-outer">
<!-- <text class="ts-text">功能正在设计中...</text> -->
<scroll-view scroll-y="true" style="overflow: scroll;height: 1330px;">
<u-image class="helpImg" src="../../static/helppng.png" height="1535px" width="375px"></u-image>
</scroll-view>
</view>
</template>
<script>
</script>
<style>
.help-outer{
width: 100%;
height:80rem !important;
}
.helpImg{
width: 100%;
height:80rem !important;
}
.u-image{
width: 100%;
height:80rem !important;
}
.u-image__image{
width: 100%;
height:80rem !important;
}
img{
width: 100%;
height:80rem !important;
}
</style>

24
pages/help/noopen.vue Normal file
View File

@@ -0,0 +1,24 @@
<template>
<view class="help-outer">
<text class="ts-text">系统暂未开放...</text>
</view>
</template>
<script>
</script>
<style>
.help-outer{
display: flex;
flex-direction: column;
justify-content: center;
height: 20rem;
width: 100%;
}
.ts-text{
text-align: center;
font-size: 3rem;
}
</style>

595
pages/index/index.vue Normal file
View File

@@ -0,0 +1,595 @@
<template>
<view class="index">
<view v-show="hasNoFloat" class="continueFloat">
<view class="jiantou" @click="toFloat"></view>
<text style="font-size: 0.8rem;color: darkslategrey;text-align: center;">继续流程</text>
</view>
<view class="bg"></view>
<view class="content">
<!-- 头部信息头像及用户名等 -->
<view class="head">
<view class="avatar">
<u-avatar :text="stu_name.substring(0,1)" fontSize="18" randomBgColor></u-avatar>
<view class="msg">
<text>你好{{stu_name}}</text>
<text>{{now_time}}</text>
</view>
<text class="state">{{reg_status}}</text>
</view>
<image src="../../static/icon/bell.png" mode="aspectFill"></image>
</view>
<!-- 公告通知 -->
<view class="announcement">
<view class="title">
<text>报到</text>
<text>流程</text>
</view>
<text class="notify">操作说明</text>
<u-icon name="arrow-right"></u-icon>
</view>
<!-- 信息填写 -->
<view class="msg-fill">
<image src="https://wap.wzzyhp.com/profile/uniapp/static/msg.png" mode="scaleToFill"></image>
<!-- <button @click="toFilling">快速填写</button> -->
</view>
<!-- 金刚区 功能-->
<view class="fn" @click="toStep">
<view class="fn-item" v-for="(i,index) in fnList" :key="index">
<view class="fnBOX">
<image :src="i.icon" mode="widthFix"></image>
<!-- <text>{{i.name}}</text> -->
</view>
</view>
</view>
<view class="step">
<u-steps dot :current="nowStep">
<u-steps-item v-for="(v,i) in task_list" :key="i" :title="v.taskName"
:desc="v.status == '0' ? '未完成' : '已完成'">
</u-steps-item>
</u-steps>
</view>
<!-- 公告列表 -->
<view class="announcement-list">
<view class="tab">
<i></i>
<!-- <text style="color: #409EFF;">新闻</text> -->
<text>新闻公告</text>
</view>
<view class="announcement-item" v-for="(v,i) in notify_list" :key="i" @click="toNotify(v)">
<image :src="getImgSrc(v.front)" mode="aspectFit"></image>
<view class="texts">
<text class="i-title">{{v.title}}</text>
<text class="i-content three-lines" v-html="getHtmlStr(v.content)"></text>
<text class="date">{{v.createTime}}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import $ from "@/static/js/jquery-3.6.4.min.js";
import {getUserInfo} from "@/api/validApi.js";
import {listNotify} from "@/api/notifyApi.js";
import {getImgSrc} from "@/api/helpFunc.js";
import {BASE_URL} from "@/config/baseUrl.js";
import {isEmpty,getRegStatus} from "@/api/helpFunc.js";
import {listOwnTodo} from "@/api/toApi.js";
import moment from "moment";
export default {
data() {
return {
hasNoFloat: false,
task_list: [],
nowStep:0,
stu_name: "新同学",
notify_list: [],
getImgSrc: getImgSrc,
now_time: "",
basrUrl: BASE_URL,
reg_status: "未激活",
// 金刚区图标
fnList: [{
name: "个人资料",
icon: "https://wap.wzzyhp.com/profile/uniapp/static/fn-icon/presonalInfo.png",
// navigator: "/pages/Userinformation/Userinformation"
},
{
name: "信息采集",
icon: "https://wap.wzzyhp.com/profile/uniapp/static/fn-icon/msg.png",
// navigator: "/pages/gather/gather"
},
// {
// name: "宿舍选择",
// icon: "https://wap.wzzyhp.com/profile/uniapp/static/fn-icon/dormitoryOptions.png",
// navigator: "/pages/dormitoryOptions/dormitoryOptions"
// },
{
name: "宿舍缴费",
icon: "https://wap.wzzyhp.com/profile/uniapp/static/fn-icon/payTheFees.png",
// navigator: "/pages/pay/index"
},
// {
// name: "报到信息",
// icon: "https://wap.wzzyhp.com/profile/uniapp/static/fn-icon/checkInfo.png",
// // navigator: "/pages/filling/filling"
// },
],
// 公告列表图片
announcementList: [
"https://wap.wzzyhp.com/profile/uniapp/static/announcement/Rectangle 25.png",
"https://wap.wzzyhp.com/profile/uniapp/static/announcement/Rectangle 25-1.png",
"https://wap.wzzyhp.com/profile/uniapp/static/announcement/Rectangle 25-2.png"
]
}
},
onShow() {
this.getOwnInfo();
this.getNotify();
this.getDate();
this.boolHasFloat();
},
mounted() {
var idom = document.getElementsByClassName("continueFloat");
var contW = $(idom).width();
var contH = $(idom).height();
var startX, startY, sX, sY, moveX, moveY,leftX,rightX,topY,bottomY;
var winW = $(window).width();
var winH = $(window).height();
$(idom).on({ //绑定事件
touchstart: function(e) {
startX = e.originalEvent.targetTouches[0].pageX; //获取点击点的X坐标
startY = e.originalEvent.targetTouches[0].pageY; //获取点击点的Y坐标
sX = $(idom).offset().left; //相对于当前窗口X轴的偏移量
sY = $(idom).offset().top; //相对于当前窗口Y轴的偏移量
leftX = startX - sX; //鼠标所能移动的最左端是当前鼠标距div左边距的位置
rightX = winW - contW + leftX; //鼠标所能移动的最右端是当前窗口距离减去鼠标距div最右端位置
topY = startY - sY; //鼠标所能移动最上端是当前鼠标距div上边距的位置
bottomY = winH - contH + topY; //鼠标所能移动最下端是当前窗口距离减去鼠标距div最下端位置
},
touchmove: function(e) {
e.preventDefault();
//移动过程中XY轴的坐标要减去margin的距离
moveX = e.originalEvent.targetTouches[0].pageX; //移动过程中X轴的坐标
moveY = e.originalEvent.targetTouches[0].pageY; //移动过程中Y轴的坐标
//判断的时候要计算加上padding的距离
if (moveX < leftX) {
moveX = leftX;
}
if (moveX > rightX) {
moveX = rightX;
}
if (moveY < topY) {
moveY = topY + 150; //顶部可留空间
}
if (moveY > bottomY) {
moveY = bottomY - 80; //底部可留空间
}
if (startY < winH) {
$(this).css({
"top": moveY + sY - startY,
})
}
$(this).css({
"left": moveX + sX - startX,//去掉之后仅沿y轴移动
"top": moveY + sY - startY,
})
}
})
},
methods: {
toStep(){
uni.redirectTo({
url:"/pages/step/index"
})
},
async boolHasFloat() {
this.nowStep = null;
let res = await listOwnTodo();
let isFirst = true;
if (res.code == 200) {
let data = res.rows;
this.task_list = [...data];
data.map((v,i) => {
if (v.status == '0') {
this.hasNoFloat = true;
}
if(v.status == "1" ){
this.nowStep = i;
}
})
}
},
toFloat() {
uni.redirectTo({
url: "/pages/step/index"
})
},
toNotify(v) {
uni.navigateTo({
url: "/pages/notify/detail?id=" + v.id
})
},
getHtmlStr(content) {
return content
.replace(/<\/?(img|table)[^>]*>/g, "") // 去除图片和表格
.replace(/<\/?(a)[^>]*>/g, "") // 去除a标签
},
getDate() {
// 创建Data对象
let date = new Date();
// 获取年份
let year = date.getFullYear();
// 获取月份0-11
let month = date.getMonth() + 1;
// 获取日期1-31
let day31 = date.getDate();
// 获取星期几0-6
let day7 = date.getDay();
let weekStr = "";
switch (day7) {
case 0:
weekStr = "星期日";
break;
case 1:
weekStr = "星期一";
break;
case 2:
weekStr = "星期二";
break;
case 3:
weekStr = "星期三";
break;
case 4:
weekStr = "星期四";
break;
case 5:
weekStr = "星期五";
break;
case 6:
weekStr = "星期六";
break;
}
this.now_time = month + "月" + day31 + "日 " + weekStr
},
async getOwnInfo() {
let res = await getUserInfo();
if (res.code == 200) {
let data = {
...res.data
};
if (!isEmpty(data.xsxm)) {
this.stu_name = data.xsxm;
this.stu_no = data.xh;
this.reg_status = getRegStatus(data.regStatus);
}
}
},
async getNotify() {
let res = await listNotify();
if (res.code == 200) {
this.notify_list = [...res.rows];
}
},
// 跳转信息填报
toFilling() {
uni.navigateTo({
url: "/pages/filling/filling",
animationType: 'pop-in',
animationDuration: 200
})
},
// 金刚区跳转
toPage(url) {
uni.navigateTo({
url,
fail: () => {
uni.switchTab({
url
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.continueFloat {
position: fixed;
z-index: 999;
right: 30rpx;
top: 2%;
.jiantou {
background-color: rgba(60, 158, 255, 0.8);
width: 100rpx;
height: 100rpx;
border-radius: 50rpx;
color: white;
text-align: center;
line-height: 100rpx;
border: 1px solid white;
}
}
.three-lines {
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 3;
}
.index {
// 渐变背景
.bg {
background-image: linear-gradient(180deg, rgba(60, 158, 255, 0.1), rgba(144, 199, 255, 0.1), #ffffff);
height: 500rpx;
position: absolute;
width: 750rpx;
z-index: -1;
}
// 内容
.content {
// #ifdef MP-WEIXIN
padding: 180rpx 30rpx 0 30rpx;
// #endif
// #ifdef H5
padding: 80rpx 30rpx 20rpx 30rpx;
// #endif
// 头像begin
.head {
display: flex;
justify-content: space-between;
image {
width: 20px;
height: 20px;
}
.avatar {
display: flex;
.msg {
margin-left: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-around;
text:nth-child(1) {
font-weight: bolder;
font-size: 28rpx;
}
text:nth-child(2) {
font-size: 20rpx;
color: #828282;
}
}
.state {
margin: 6rpx 0 0 12rpx;
display: block;
// width: 90rpx;
height: 40rpx;
font-size: 20rpx;
background-color: rgb(232, 244, 255);
text-align: center;
line-height: 40rpx;
color: rgb(24, 144, 255);
border: 1px solid rgb(209, 233, 255);
border-radius: 40rpx;
}
}
}
// 头像 end
// 公告通知 begin
.announcement {
height: 35px;
background-color: #ffffff;
margin: 25rpx 0;
border-radius: 10rpx;
display: flex;
justify-content: space-between;
padding: 0 25rpx;
position: relative;
overflow: hidden;
// 通知的消息
.title {
display: flex;
flex-direction: column;
font-size: 20rpx;
font-weight: bold;
padding: 0 30rpx 0 0;
justify-content: center;
text:nth-child(2) {
color: #FD5430;
}
}
.notify {
font-size: 24rpx;
line-height: 35px;
color: #828282;
flex: 1;
position: absolute;
left: 15%;
}
}
//公告通知 end
// 信息填写 begin
.msg-fill {
position: relative;
height: 143px;
margin-bottom: 25rpx;
image {
width: 100%;
height: 143px;
}
button {
position: absolute;
bottom: 0;
background-color: #FFFFFF;
color: #7299FF;
width: 160rpx;
height: 54rpx;
line-height: 54rpx;
font-size: 24rpx;
left: 60rpx;
bottom: 25rpx;
border-radius: 4rpx;
font-weight: 900;
}
button::after {
border: none;
}
}
// 信息填写 end
// 金刚区 begin
.fn {
display: flex;
justify-content: space-between;
align-items: center;
text-align: center;
margin-bottom: 25rpx;
padding: 0 15px;
.fn-item {
display: flex;
flex-direction: column;
align-items: center;
image {
width: 80rpx;
height: 80rpx;
}
text {
font-size: 26rpx;
margin-top: 20rpx;
color: #3A3A3A;
}
}
.fnBOX {
display: flex;
flex-direction: column;
align-items: center;
}
}
// 金刚区 end
// 进度条
.step {
margin-top: -5px;
}
// 公告列表 begin
.announcement-list {
.tab {
display: flex;
align-items: center;
i {
background-color: #409EFF;
width: 8rpx;
height: 36rpx;
border-radius: 4rpx;
}
text {
font-size: 32rpx;
margin-left: 5rpx;
font-weight: bold;
}
}
// 列表的项
.announcement-item {
margin: 30rpx 0;
display: flex;
justify-content: space-between;
position: relative;
image {
width: 200rpx;
height: 200rpx;
border-radius: 2px;
}
.texts {
flex: 1;
display: flex;
flex-direction: column;
// padding-left: 20rpx;
position: relative;
padding: 5rpx 20rpx;
height: 200rpx;
.i-title {
font-size: 28rpx;
font-weight: bold;
color: #131313;
}
.i-content,
.date {
color: #6A6A6A;
font-size: 24rpx;
}
.i-content {
margin-top: 10rpx;
}
.date {
font-size: 22rpx;
position: absolute;
bottom: 5rpx;
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,181 @@
<template>
<view class="check-infomation">
<view class="info-message">
新生核验属于入校必办步骤请到校后持身份证录取通知书至新生报到点进行刷脸核验
</view>
<view class="list">
<view class="sm-list">
<text>姓名</text>
<text>{{infoList.xsxm}}</text>
</view>
<view class="sm-list">
<text>是否核验</text>
<text>{{ infoList.isCheck === "1" ? '已核验' : '未核验' }}</text>
</view>
<FloatBall />
</view>
<button @click="doEdit" class="save-button">确认</button>
</view>
</template>
<script>
import FloatBall from "@/pages/compoents/FloatBall.vue";
import {
getCheckksh
} from "@/api/information-check.js";
import {
confirmBdhy
} from "@/api/toApi.js";
export default {
components: {
FloatBall
},
created() {
this.getCheckList();
},
data() {
return {
loading: false,
checkList: [],
infoList: {
xsxm: '',
ksh: '',
isCheck: ''
}
};
},
methods: {
async getCheckList() {
try {
let res = await getCheckksh();
if (res.code === 200) {
console.log(res);
this.infoList.xsxm = res.data.stuinfo.xsxm;
this.infoList.isCheck = res.data.isCheck;
// console.log(res.data)
}
} catch (error) {
console.error('获取核验信息失败:', error);
}
},
async doEdit() {
if (this.infoList.isCheck === "1") {
try {
const res = await confirmBdhy();
if (res.code == 200) {
uni.redirectTo({
url: "/pages/newindex/newindex"
});
} else {
wx.showToast({
title: '确认请求失败',
icon: 'none',
duration: 1500
});
}
} catch (error) {
console.error('确认请求时出错', error);
this.$refs.uToast.show({
type: "error",
message: '请求失败',
duration: 1500
});
}
} else {
// 提示用户到线下进行核验
wx.showToast({
title: '请到线下先核验',
icon: 'none',
duration: 1500
});
}
}
}
}
</script>
<style lang="scss">
.check-infomation {
.list {
// display: flex;
// justify-content: center;
// align-items: center;
// display: flex;
// align-items: center;
// flex-direction: column;
padding: 20rpx;
width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.sm-list {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
width: 722rpx;
height: 60rpx;
border-top: 1px solid #EFEFEF;
text:nth-child(1) {
margin-top: 15px;
color: #494949;
}
text:nth-child(2) {
margin-top: 15px;
color: #808080;
}
}
.u-form-item {
/deep/ .u-form-item__body__left {
margin-bottom: 10px !important;
}
}
.btn {
display: flex;
justify-content: center;
align-items: center;
.save-button {
position: fixed;
bottom: 100rpx;
width: 80%;
border-radius: 50rpx;
background-color: #38B865;
color: white;
}
}
}
.info-message {
padding: 10px;
background-color: #f8d7da;
color: #721c24;
border: 1px solid #f5c6cb;
border-radius: 5px;
margin-bottom: 10px;
}
.save-button {
position: fixed;
bottom: 100rpx;
margin-left: 60rpx;
width: 80%;
border-radius: 50rpx;
background-color: #38B865;
color: white;
}
}
</style>

23
pages/loan/loan.vue Normal file
View File

@@ -0,0 +1,23 @@
<!-- 助学贷款 -->
<template>
<view>
正在开发中...
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

164
pages/login/editphone.vue Normal file
View File

@@ -0,0 +1,164 @@
<template>
<view class="editphone">
<view class="row">
<input type="text" placeholder="身份证号" v-model="actForm.sfzh" />
</view>
<view class="row">
<input type="text" placeholder="新手机号" v-model="actForm.phone" />
</view>
<view class="row">
<input type="text" placeholder="手机验证码" v-model="actForm.code" />
<button :disabled="time<60" @click="getCode" class="mini-btn" type="primary"
size="mini">{{codeTxt}}</button>
</view>
<button type="primary" @tap="changePhone" class="submit">更改</button>
</view>
</template>
<script>
import {
verifyPhone,
sendSmsUpdatePhone,
doLogin
} from "@/api/validApi.js";
export default {
data() {
return {
ksh: "",
time: 60,
codeTxt: "获取验证码",
actForm: {
sfzh: "",
phone: "",
code: ""
},
}
},
onLoad() {
},
methods: {
async getCode() {
let sdata = {
KSH: uni.getStorageSync("ksh"),
SFZH: this.actForm.sfzh,
SJH: this.actForm.phone
};
let res = await sendSmsUpdatePhone(sdata);
if (res.code == 200) {
var timer = null;
timer = setInterval(() => {
if (this.time > 0) {
this.time--;
this.codeTxt = this.time + "S之后重新发送";
console.log(this.time);
} else {
this.time = 60;
this.codeTxt = "获取验证码";
clearInterval(timer);
}
}, 1000)
}else{
uni.showToast({
title: res.msg, // 显示对应字段的提示信息
icon: "none"
});
}
},
changePhone() {
const requiredFields = {
sfzh: '身份证号不能为空',
phone: "手机号不能为空",
code: '验证码不能为空'
};
// 查找第一个空字段并显示错误消息
const emptyField = Object.keys(requiredFields).find(field => this.actForm[field] === "");
if (emptyField) {
uni.showToast({
title: requiredFields[emptyField], // 显示对应字段的提示信息
icon: "none"
});
} else {
verifyPhone({
KSH: uni.getStorageSync("ksh"),
SJH: this.actForm.phone,
SFZH: this.actForm.sfzh,
code: this.actForm.code
}).then(res => {
if (res.code == 200) {
uni.showToast({
title: "手机号修改成功",
})
setTimeout(async () => {
let sdata = {
username: uni.getStorageSync("loginInfo").username,
password: uni.getStorageSync("loginInfo").password,
}
let res = await doLogin(sdata);
if(res.code == 200){
uni.setStorageSync("token", res.token);
uni.navigateTo({
url: "/pages/newindex/newindex"
});
}
}, 1500)
} else {
uni.showToast({
title: res.msg, // 显示对应字段的提示信息
icon: "none"
});
}
})
}
}
}
}
</script>
<style scope lang="scss">
.editphone {
padding: 40rpx;
.row {
display: flex;
border-bottom: 1px solid #d2d2d2;
padding: 10rpx 0;
align-items: center;
input {
height: 110rpx;
padding-left: 20rpx;
flex: 1;
}
.mini-btn {
background-color: white;
color: #1584FF;
border-radius: 0;
border-bottom: 1.5px solid #1584FF;
font-size: 32rpx;
padding: 0;
height: 32px;
&:after {
border: none;
}
&[disabled] {
color: #9ACAFF;
border-bottom: 1.5px solid #9ACAFF;
}
}
}
.submit {
margin-top: 150rpx;
height: 100rpx;
line-height: 100rpx;
}
}
</style>

392
pages/login/index.vue Normal file

File diff suppressed because one or more lines are too long

366
pages/login/index_real.vue Normal file

File diff suppressed because one or more lines are too long

599
pages/newindex/newindex.vue Normal file
View File

@@ -0,0 +1,599 @@
<template>
<view class="newindex">
<view class="exit" @click="exitUser">退出</view>
<!-- 上方个人信息 -->
<view class="onebox">
<view class="twobox">
<view class="img">
<image style="height: 100%;" model="aspectFill" @click="toOwnPage" src="../../static/logo.png"
mode=""></image>
</view>
<view class="message">
<view><text>姓名{{stu_name}}</text> <text v-if="isDirection=='1'">(定向生)</text></view>
<text>暂定班级{{bj}}</text>
<text>学号{{xh}}</text>
</view>
<!-- 二维码 -->
<view class="qr-code" @click="toggleQRPreview">
<image v-if="!showQRPreview" src="../../static/ewm1.png" mode=""></image>
<view v-if="showQRPreview" class="qr-preview">
<!-- 这里放置二维码预览 -->
<image src="../../static/ewm.png" mode=""></image>
</view>
</view>
</view>
</view>
<!-- 线上迎新模块 -->
<view class="newbox">
<view class="topbox">
<view class="left">
<text>线上迎新</text>
<text class="time">2024-8-26 09:00~2024-9-9 12:30</text>
</view>
<view class="right">
<text>总进度 {{ completedCardsCount }}/{{ totalCards }}</text>
<text class="title">请先完成必办</text>
</view>
</view>
<view class="bigbox">
<view class="cardList">
<view :class="[
card.isActive == '1' ? 'active' : 'card']" v-for="(card, index) in cardList" :key="index"
@click="goToDetail(index)">
<text>{{ card.projectName }}</text>
<text>{{ card.isMust == '1' ? "必办" : "" }}</text>
<text v-if="index === 6 && card.isActive !== '1'" class="special-text">如未核验请尽快核验信息线下核验</text>
<view class="buttom">
<text v-if="card.isActive == '1'">已办理</text>
<image v-else src="../../static/go.png" mode=""></image>
</view>
</view>
</view>
</view>
</view>
<!-- 弹窗 -->
<!-- 弹窗遮罩层 -->
<view v-if="showPopup" class="popup-mask"></view>
<view v-if="showPopup" class="popup">
<text>安全提示</text>
<view>欢迎进入页面请修改密码以确保账户安全</view>
<view class="btn">
<button @click="closePopup">下次一定</button>
<button @click="gotoChangePassword" class="password">修改密码</button>
</view>
</view>
<u-toast ref="uToast"></u-toast>
</view>
</template>
<script>
import {
getUserInfo,
exitLogin,
} from "@/api/validApi.js";
import {
listTask,
listOwnTask
} from "@/api/toApi.js";
import {
isEmpty
} from "@/api/helpFunc.js";
export default {
name: "newindex",
data() {
return {
isEmpty,
showPopup: false, // 控制弹窗显示隐藏
isopen: "",
showQRPreview: false,
stu_name: "",
isDirection: "",
bj: "",
xh: "",
cardList: []
}
},
created() {
this.getOwnInfo();
this.listTask();
},
onshow() {
this.getOwnInfo();
this.listTask();
},
methods: {
shouldDisplayDefaultState(index) {
return index >= 4 && index <= 7; // 索引为5、6、7、8的卡片将显示默认状态
},
toOwnPage() {
uni.navigateTo({
url: '/pages/Userinformation/Userinformation' // 跳转至修改密码页面路径
});
},
async listTask() {
let sdata = {
projectName: null
}
let res = await listTask(sdata);
if (res.code == 200) {
let tempCardList = [...res.data]; // 临时保存数据
// console.log(tempCardList)
let res1 = await listOwnTask();
// console.log(res1)
if (res1.code == 200) {
if (!isEmpty(res1.data)) {
tempCardList.map(x => {
res1.data.map(y => {
if (x.taskCode == y.taskCode) {
x.isActive = y.status;
}
});
});
}
}
if (this.isDirection == '1') {
var index = tempCardList.findIndex(item => {
if (item.taskCode === "ZXJF") {
return true;
}
})
tempCardList.splice(index, 1);
}
// 交换第6条和第7条的位置
// if (tempCardList.length >= 7) {
// const temp = tempCardList[6];
// tempCardList[6] = tempCardList[7];
// tempCardList[7] = temp;
// }
// 更新组件状态
this.cardList = tempCardList;
//console.log(this.cardList);
}
},
exitUser() {
exitLogin().then(res => {
uni.navigateTo({
url: '/pages/login/index' // 跳转至修改密码页面路径
});
});
},
dialogToggle(type) {
this.msgType = type
this.$refs.alertDialog.open()
},
toggleQRPreview() {
this.showQRPreview = !this.showQRPreview;
},
goToDetail(index) {
console.log(this.cardList);
if (index < 6) {
uni.navigateTo({
url: this.cardList[index].url,
});
} else if (index == 6 || index == 7 || index == 8) {
let all = true;
this.cardList.map(x => {
if (x.isActive != '1' && (x.rowRank < 7 && x.rowRank != null)) {
all = false;
}
});
// if (all == false) {
// this.$refs.uToast.show({
// type: "error",
// message: "请先完成上面的内容",
// duration: 1500,
// });
// return;
// } else {
// }
uni.navigateTo({
url: this.cardList[index].url,
});
} else if (index == 6) {
let all = true;
this.cardList.map(x => {
if (x.isActive != '1' && (x.rowRank < 8 && x.rowRank != null)) {
all = false;
}
});
// if (all == false) {
// this.$refs.uToast.show({
// type: "error",
// message: "请先完成上面的内容",
// duration: 1500,
// });
// return;
// } else {
// uni.navigateTo({
// url: this.cardList[index].url,
// });
// }
uni.navigateTo({
url: this.cardList[index].url,
});
} else {
uni.navigateTo({
url: this.cardList[index].url,
});
}
},
closeReminder() {
this.showPopup = false; // 关闭提醒弹窗
},
closePopup() {
this.showPopup = false; // 关闭弹窗
},
gotoChangePassword() {
uni.navigateTo({
url: '/pages/Userinformation/Userinformation' // 跳转至修改密码页面路径
});
},
async getOwnInfo() {
//console.log(1111);
let res = await getUserInfo();
if (res.code == 200) {
let data = {
...res.data
};
if (data.isChangePwd == "1") {
this.showPopup = false;
} else {
this.showPopup = true;
}
this.stu_name = data.xsxm
this.bj = data.bj
this.xh = data.xh
this.isDirection = data.isDirection;
}
}
},
computed: {
totalCards() {
// 总卡片数量,假设为 cardList 的长度
let tot = this.cardList.length;
// if(this.isDirection==="1"){
// tot-=1;
// }
return tot;
},
completedCardsCount() {
// 完成的卡片数量
return this.cardList.filter(card => card.isActive === '1').length;
}
}
}
</script>
<style scoped lang="scss">
.newindex {
width: 100%;
height: 100%;
background-color: #afc9fe;
padding-top: 40rpx;
}
.exit {
background-color: rgba(97, 176, 254, 0.7);
position: fixed;
width: 100rpx;
height: 100rpx;
text-align: center;
line-height: 100rpx;
border-radius: 50%;
color: white;
font-size: 28rpx;
right: 20px;
bottom: 50px;
}
.onebox {
display: flex;
align-items: center;
margin: 0 auto 40rpx;
border-radius: 40rpx;
width: 85%;
// height: 220rpx;
background-color: rgba(255, 255, 255, 0.7);
padding: 20rpx;
}
.twobox {
display: flex;
margin: 0 auto;
border-radius: 30rpx;
width: 95%;
// align-items: center;
// height: 190rpx;
background-color: white;
padding: 0rpx 20rpx 20rpx;
}
.twobox .img {
height: 150rpx;
margin-top: 20rpx;
border-radius: 10rpx;
}
.twobox .img image {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
}
.twobox .message {
margin-top: 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
margin-left: 10rpx;
width: 60%;
// height: 150rpx;
}
.qr-code {
width: 100rpx;
height: 100rpx;
margin-top: 20rpx;
}
.qr-code image {
width: 100rpx;
height: 100rpx;
}
.newbox {
display: flex;
justify-content: center;
flex-direction: column;
margin: 0 auto 20px;
border-radius: 40rpx;
width: 90%;
// height: 1200rpx;
background-color: rgba(255, 255, 255, 0.7);
}
.topbox {
display: flex;
justify-content: space-between;
margin-top: 30rpx;
width: 95%;
/* height: 200rpx; */
margin-bottom: 20rpx;
}
.left {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 90%;
height: 90rpx;
margin-left: 20rpx;
}
.left text {
font-size: 38rpx;
font-weight: bold;
color: black;
}
.left .time {
color: #62727F;
font-size: 24rpx
}
.right {
display: flex;
flex-direction: column;
align-items: flex-end;
width: 35%;
height: 90rpx;
}
.right .title {
color: #62727F;
font-size: 24rpx;
margin-top: 10rpx;
}
.right text {
color: #4F87C4;
font-weight: bold;
}
.bigbox {
min-height: 800rpx;
.cardList {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin: 0 auto;
margin-bottom: 30rpx;
width: 95%;
padding: 0;
&>view {
margin-bottom: 35rpx;
}
.special-text {
color: red;
font-size: 20rpx;
}
}
}
.card {
position: relative;
display: flex;
flex-direction: column;
width: 30%;
height: 240rpx;
background-color: white;
border-radius: 20rpx;
text {
margin-top: 10rpx;
margin-left: 10rpx;
color: #717F8C;
font-size: 25rpx
}
text:first-child {
font-size: 30rpx;
color: black;
font-weight: bold;
}
.buttom {
position: absolute;
color: white;
width: 100%;
height: 60rpx;
border-radius: 0 0 20rpx 20rpx;
background-color: #5883CB;
bottom: 0;
display: flex;
align-items: center;
justify-content: end;
text {
font-size: 28rpx;
color: white;
margin-left: 10rpx;
}
image {
margin-right: 10rpx;
width: 40rpx;
height: 40rpx;
}
}
}
.active {
position: relative;
display: flex;
align-items: start;
flex-direction: column;
width: 30%;
height: 240rpx;
background-color: white;
border-radius: 20rpx;
text {
margin-top: 10rpx;
margin-left: 10rpx;
color: #717F8C;
font-size: 25rpx
}
.buttom {
position: absolute;
color: white;
width: 100%;
height: 60rpx;
border-radius: 0 0 20rpx 20rpx;
background-color: #26C791;
bottom: 0;
text {
font-size: 28rpx;
color: white;
margin-right: 20rpx;
}
}
}
.defaultState .buttom {
background-color: #D3D3D3;
}
.defaultState text {
font-size: 28rpx;
margin-right: 20rpx;
color: #717F8C;
}
.popup-mask {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
}
.popup {
display: flex;
flex-direction: column;
align-items: center;
width: 80%;
height: 300rpx;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #fff;
padding: 20rpx;
border-radius: 10rpx;
z-index: 1000;
text {
font-size: 40rpx;
font-weight: bold;
margin-bottom: 10rpx;
}
.btn {
margin-top: 50rpx;
display: flex;
width: 100%;
button {
width: 280rpx;
}
.password {
background-color: #59a1fe;
color: white;
}
}
}
</style>

121
pages/notice/notice.vue Normal file
View File

@@ -0,0 +1,121 @@
<template>
<view>
<view class="notice">
<text>入学须知:</text>
<view>请先完成信息采集等必办环节在完成在线缴费后才可以查看辅导员分配的宿舍
</view>
<view>如在缴费过程中碰到问题,请咨询:学院财务处固定电话:0771-6301161</view>
<button @click="handleButtonClick" :disabled="is_read || (countdown > 0 && !is_read) "
:style="{ backgroundColor: buttonColor }">
{{ is_read ? "已确认" : countdown == 0 && is_read == 0 ? "确认" : '请先阅读以上内容并等待'+countdown+'秒' }}
</button>
<u-toast ref="uToast"></u-toast>
</view>
<FloatBall />
</view>
</template>
<script>
import {
confirmRxxz,
getOwnTaskStatusByCode
} from "@/api/toApi.js";
import {
isEmpty
} from "@/api/helpFunc.js";
import FloatBall from "@/pages/compoents/FloatBall.vue";
export default {
components: {
FloatBall
},
data() {
return {
countdown: 10,
timer: null,
button_text: "确认",
is_read: false
}
},
async onLoad() {
await this.getOwnTaskStatusByCode();
},
mounted() {
this.startTimer();
},
computed: {
buttonColor() {
if (this.is_read || (this.countdown > 0 && !this.is_read)) {
return 'gray'; // 倒计时结束后的背景色
} else {
return 'green'; // 倒计时进行中的背景色
}
}
},
methods: {
async getOwnTaskStatusByCode() {
let res = await getOwnTaskStatusByCode("RXXZ");
if (res.code == 200) {
if (!isEmpty(res.data)) {
this.is_read = res.data.status == '1';
}
}
},
startTimer() {
this.timer = setInterval(() => {
if (this.countdown > 0) {
this.countdown--;
} else {
clearInterval(this.timer);
}
}, 1000); // 每秒更新一次倒计时
},
async handleButtonClick() {
if (this.countdown === 0) {
let res = await confirmRxxz();
if (res.code == 200) {
this.is_read = true;
uni.redirectTo({
url: "/pages/newindex/newindex"
});
} else {
this.$refs.uToast.show({
type: "error",
message: res.msg,
duration: 1500,
})
}
} else {
console.log('请先阅读以上内容并等待倒计时结束!');
}
}
},
beforeDestroy() {
clearInterval(this.timer);
}
}
</script>
<style scoped lang="scss">
.notice {
padding: 20rpx 20rpx;
button {
position: fixed;
bottom: 100rpx;
margin-left: 60rpx;
width: 80%;
border-radius: 50rpx;
color: white;
}
}
</style>

71
pages/notify/detail.vue Normal file
View File

@@ -0,0 +1,71 @@
<template>
<view class="notify">
<view class="notify-title">{{detail.title}}</view>
<view class="notify-time">{{detail.createTime}}</view>
<view class="notify-front">
<image mode="heightFix" :src="getImgSrc(detail.front)"></image>
</view>
<view class="notify-content" v-html="getContent(detail.content)">
</view>
</view>
</template>
<script>
import {getNotify} from "@/api/notifyApi.js";
import {getImgSrc } from "@/api/helpFunc.js";
import {BASE_URL} from "@/config/baseUrl.js";
export default {
data() {
return {
detail:{
title:'',
front:null,
content:"",
createTime:""
},
getImgSrc,
}
},
onLoad(options) {
let id = options.id;
getNotify(id).then(res=>{
this.detail = {...res.data};
});
},
methods: {
getContent(v){
return v.replace("/dev-api",BASE_URL).replace("<img","<img style='width:100%'");
}
}
}
</script>
<style scoped lang="scss">
.notify{
padding:10rpx;
.notify-title{
text-align: center;
font-weight: bolder;
font-size:1.25rem ;
}
.notify-time{
text-align: right;
font-size: 0.8rem;
margin-right: 50rpx;
margin-top: 10rpx;
}
.notify-front{
text-align: center;
height: 400rpx;
image{
height: 100%;
}
}
.notify-content{
padding: 20rpx;
}
}
</style>

168
pages/notify/index.vue Normal file
View File

@@ -0,0 +1,168 @@
<template>
<view class="notify">
<u-sticky bgColor="#fff">
<u-tabs :list="tabsList" lineWidth="42" :inactiveStyle="{color:'#909399'}" :activeStyle="{color:'#303133'}"
@click="clickTabs"></u-tabs>
</u-sticky>
<view class="content">
<view class="card" v-for="(item,index) in todoList" :key="index" @click="toTask(item)">
<view class="left">
<text class="name">项目名称</text>
<text class="create-time">创建时间</text>
<text class="deadline">截止时间</text>
</view>
<view class="right">
<view class="title-state">
<text :class="item.status != '0'?'state':'error'">{{item.status | fileState}}</text>
<text>{{item.taskName}}</text>
</view>
<text class="create-time">{{ moment(item.startTime).format("yyyy-MM-DD") }}</text>
<text class="deadline">{{moment(item.endTime).format("yyyy-MM-DD") }}</text>
</view>
</view>
</view>
<zero-loading v-if="loading"></zero-loading>
</view>
</template>
<script>
import {listTodo,listOwnTodo} from "@/api/toApi.js";
import moment from "moment";
export default {
data() {
return {
moment,
loading:false,
todoList : [],
tabsList: [{
name: "全部"
},
// {
// name: "完成"
// },
// {
// name: "未完成"
// }
],
}
},
onShow() {
this.getTodo()
},
methods: {
toTask(v){
try{
uni.switchTab({
url:v.url
})
}catch(e){
console.log(e)
}finally{
uni.navigateTo({
url:"/pages/step/index"
})
}
},
async getTodo() {
this.loading = true;
let res = await listOwnTodo();
this.loading = false;
console.log(res)
if (res.code == 200) {
this.todoList = res.rows;
}
},
clickTabs(item) {
}
},
filters: {
fileState(value) {
if (value != '0')
return "已完成"
return "未完成"
}
}
}
</script>
<style lang="scss" scoped>
.state,
.error {
margin: 6rpx 0 0 12rpx;
display: block;
width: 90rpx;
height: 40rpx;
font-size: 20rpx;
background-color: #85CE61;
text-align: center;
line-height: 40rpx;
color: white;
border-radius: 40rpx;
}
.error {
background-color: #F78989;
}
.notify {
min-height: 100vh;
background-color: #F6F7F9;
.content {
padding: 28rpx;
.card {
height: 200rpx;
display: flex;
justify-content: space-between;
margin-bottom: 25rpx;
background-color: #FFFFFF;
padding: 20rpx;
.left,
.right {
font-size: 28rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.create-time,
.deadline {
color: #808080;
}
.left {
.name {
color: #4A90E2;
}
}
.right {
align-items: flex-end;
.create-time,
.deadline {}
.title-state {
display: flex;
align-items: center;
text:nth-child(2) {
margin-left: 20rpx;
font-size: 32rpx;
font-weight: 900;
color: #525252;
}
}
}
}
}
}
</style>

231
pages/own/index.vue Normal file
View File

@@ -0,0 +1,231 @@
<template>
<view class="own">
<!-- 个人信息 begin -->
<view class="information">
<view class="bigbox">
<view class="left">
<text>{{stu_name.length > 3 ? stu_name.substring(0,3)+"..." : stu_name }}</text>
<text>学号:{{stu_no}}</text>
</view>
<text class="state">{{reg_status}}</text>
<view class="right">
<u-avatar :text="stu_name.substring(0,1)" size="120rpx" randomBgColor></u-avatar>
</view>
</view>
</view>
<!-- 个人信息 end -->
<!-- 列表begin -->
<view class="list">
<view class="sm-list" v-for="(item,index) in ListIcon" :key="index" @click="toPage(item.navigator)">
<view class="smlist">
<view class="iconText">
<image :src="item.icon" mode=""></image>
<text>{{item.name}}</text>
</view>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
</view>
<button @click="doLogOut">退出登录1</button>
<FloatBall />
</view>
</template>
<script>
import {getUserInfo} from "@/api/validApi.js";
import {logOut} from "@/middleware/storage.js";
import {isEmpty,getRegStatus} from "@/api/helpFunc.js";
import { getOwnRoomInfo} from "@/api/dormApi.js";
import FloatBall from "@/pages/compoents/FloatBall.vue";
export default {
components: {
FloatBall
},
data() {
return {
stu_name: "新同学",
stu_no: "xxxxxx",
reg_status : "未激活",
// 列表图标
ListIcon: [{
name: "个人资料",
icon: "https://wap.wzzyhp.com/profile/uniapp/static/own-icon/carbon_user-filled.png",
navigator: "/pages/Userinformation/Userinformation"
},
{
name: "继续流程",
icon: "https://wap.wzzyhp.com/profile/uniapp/static/own-icon/bi_funnel-fill.png",
navigator: "/pages/newindex/newindex"
},
{
name: "帮助与反馈",
icon: "https://wap.wzzyhp.com/profile/uniapp/static/own-icon/solar_pen-new-round-bold.png",
navigator: "/pages/help-and-feedback/help-and-feedback"
},
],
}
},
onLoad() {
this.getOwnInfo();
},
methods: {
async getOwnInfo() {
let res = await getUserInfo();
if (res.code == 200) {
let data = {
...res.data
};
if (!isEmpty(data.xsxm)) {
uni.setStorageSync("stu_no",data.xh);
this.stu_name = data.xsxm;
this.stu_no = data.xh;
this.reg_status = getRegStatus(data.regStatus);
}
}
let res2 = await getOwnRoomInfo();
if(res2.code == 200){
let data = res2.data;
uni.setStorageSync("own_dorm",data.DormId);
}
},
doLogOut() {
logOut()
uni.clearStorageSync("token")
},
toPage(url){
uni.navigateTo({
url
})
}
}
}
</script>
<style lang="scss" scoped>
.own {
//height: 100vh;
background-color: #F6F7F9;
// 信息 begin
.information {
// width: 100%;
height: 140rpx;
background-color: white;
padding-top: 180rpx;
}
.bigbox {
display: flex;
justify-content: space-between;
align-self: center;
width: 650rpx;
height: 120rpx;
padding: 0 24px;
position: relative;
.state{
margin: 6rpx 0 0 30rpx;
display: block;
// width: 90rpx;
padding:0 5rpx 0 5rpx;
height: 40rpx;
background-color: rgb(232,244,255);
text-align: center;
line-height: 40rpx;
color: rgb(24,144,255);
border: 1px solid rgb(209,233,255);
border-radius: 40rpx;
position: absolute;
left: 25%;
top: 10rpx;
}
.left {
display: flex;
flex-direction: column;
width: 290rpx;
height: 120rpx;
text:nth-child(1) {
color: #131313;
}
text:nth-child(2) {
margin-top: 5px;
color: #808080;
}
}
.right {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
}
}
// 信息end
// 列表begin
.list {
height: 780rpx;
margin-top: 15px;
.sm-list {
display: flex;
align-items: center;
width: 780rpx;
height: 100rpx;
padding: 0 20px;
background-color: white;
margin-bottom: 10px;
.smlist {
display: flex;
}
image {
width: 40rpx;
height: 40rpx;
}
.iconText {
display: flex;
align-items: center;
width: 220rpx;
padding: 0 215px 0 0;
text {
color: #202020;
padding-left: 5px;
}
}
}
}
// 列表end
// 按钮
button {
margin-top: 20px;
width: 720rpx;
height: 90rpx;
background-color: #409EFF;
color: white;
}
}
</style>

210
pages/ownDorm/index.vue Normal file
View File

@@ -0,0 +1,210 @@
<template>
<view style="margin: 10rpx;">
<view class="list">
<view class="sm-list">
<text>校区</text>
<text>{{campusName}}</text>
</view>
<view class="sm-list">
<text>园区</text>
<text>{{parkName}}</text>
</view>
<view class="sm-list">
<text>楼栋</text>
<text>{{buildingName}}</text>
</view>
<view class="sm-list">
<text>楼层</text>
<text>{{floor}}</text>
</view>
<view class="sm-list">
<text>宿舍号</text>
<text>{{ roomNo }}</text>
</view>
</view>
<view class="wxtsxx">
<text> 温馨提示宿舍9月初才能确认请同学们多关注</text>
</view>
<button @click="handleButtonClick" :disabled="is_read || (countdown > 0 && !is_read) "
:style="{ backgroundColor: buttonColor }">
{{ is_read ? "已确认" : countdown == 0 && is_read == 0 ? "确认" : '请先阅读以上内容并等待'+countdown+'秒' }}
</button>
<u-toast ref="uToast"></u-toast>
<FloatBall />
</view>
</template>
<script>
import FloatBall from "@/pages/compoents/FloatBall.vue";
import {
isEmpty
} from "@/api/helpFunc.js";
import {
getOwnDorm
} from "@/api/dormApi.js";
import {
confirmZxxs,
getOwnTaskStatusByCode
} from "@/api/toApi.js";
export default {
components: {
FloatBall
},
data() {
return {
campusName: "暂无",
parkName: "暂无",
buildingName: "暂无",
floor: "暂无",
roomNo: "暂无",
countdown: 10,
timer: null,
is_read: false
}
},
async onLoad() {
await this.getOwnDorm();
await this.getOwnTaskStatusByCode();
},
mounted() {
this.startTimer();
},
computed: {
buttonColor() {
if (this.is_read || (this.countdown > 0 && !this.is_read)) {
return 'gray'; // 倒计时结束后的背景色
} else {
return 'green'; // 倒计时进行中的背景色
}
}
},
methods: {
async getOwnDorm() {
let res = await getOwnDorm();
if (res.code == 200) {
if (!isEmpty(res.data)) {
let data = {
...res.data
};
this.campusName = data.campusName;
this.parkName = data.parkName;
this.buildingName = data.buildingName;
this.floor = data.floor;
this.roomNo = data.roomNo;
}
}
},
async getOwnTaskStatusByCode() {
let res = await getOwnTaskStatusByCode("ZXXS");
if (res.code == 200) {
if (!isEmpty(res.data)) {
this.is_read = res.data.status == '1';
}
}
},
startTimer() {
this.timer = setInterval(() => {
if (this.countdown > 0) {
this.countdown--;
} else {
clearInterval(this.timer);
}
}, 1000); // 每秒更新一次倒计时
},
async handleButtonClick() {
if (this.countdown === 0) {
if (this.campusName == "暂无") {
this.$refs.uToast.show({
type: "error",
message: "您的辅导员还没有为您分配宿舍哦",
duration: 1500,
});
return;
}
let res = await confirmZxxs();
if (res.code == 200) {
this.is_read = true;
uni.redirectTo({
url: "/pages/newindex/newindex"
});
} else {
this.$refs.uToast.show({
type: "error",
message: res.msg,
duration: 1500,
})
}
} else {
console.log('请先阅读以上内容并等待倒计时结束!');
}
}
},
beforeDestroy() {
clearInterval(this.timer);
}
}
</script>
<style lang="less" scoped>
button {
position: fixed;
bottom: 100rpx;
margin-left: 60rpx;
width: 80%;
border-radius: 50rpx;
color: white;
}
.wxtsxx{
margin-top: 50rpx;
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 20rpx;
color: chocolate;
}
.list {
display: flex;
align-items: center;
flex-direction: column;
width: 100%;
.sm-list {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
width: 722rpx;
height: 60rpx;
border-bottom: 1px solid #EFEFEF;
text:nth-child(1) {
margin-top: 10px;
color: #0F0F0F;
}
text:nth-child(2) {
margin-top: 10px;
color: #575757;
}
.password {
display: flex;
align-items: center;
justify-content: flex-end;
width: 200rpx;
}
}
}
</style>

172
pages/pay/index.vue Normal file
View File

@@ -0,0 +1,172 @@
<template>
<view>
<view>
<view class="tab">
<i></i>
<text style="color: #409EFF;">长按二维码保存后是用微信扫一扫即可进行缴费</text>
</view>
<uni-card>
<view style="text-align: center;">
<view>
<image style="width:600rpx;height:600rpx" show-menu-by-longpress="true" @click="previewImage"
:src="qr_src"></image>
</view>
<view>
<text>缴费状态:{{order_status}}</text>
</view>
<button style="margin-top: 10rpx;background-color: rgb(56,184,101);color: white;"
@click="toOutPay">点我也可跳转哦~</button>
<button @tap="studentLoan" style="margin-top: 10rpx;background-color: rgb(85, 170, 255);color: white;">助学贷款~</button>
<button style="margin-top: 10rpx;" @click="getOrder">刷新缴费状态</button>
</view>
</uni-card>
</view>
<FloatBall />
<zero-loading v-if="loading"></zero-loading>
</view>
</template>
<script>
import middleware from "@/middleware/index.js";
import {
toPay,
getOrder
} from "@/api/orderApi.js";
import {
listOwnTodo,
confirmZxdk
} from "@/api/toApi.js";
import FloatBall from "@/pages/compoents/FloatBall.vue";
export default {
components: {
FloatBall
},
data() {
return {
loading: false,
pageUrl: "",
order_list: [],
total: 0,
has: 0,
order_status: "未完成",
qr_src: "",
isAllBool: true,
timer: null,
}
},
async created() {
await middleware();
this.getOrder();
await this.getUrl();
this.timer = setInterval(() => {
console.log("qrrefresh")
this.getOrder();
this.getUrl();
}, 20000);
},
beforeDestroy() {
if (this.timer != null) {
clearInterval(this.timer);
}
},
methods: {
toOutPay() {
window.location.href = this.pageUrl;
},
studentLoan(){
uni.showModal({
title:"请输入贷款回执编号:",
content:"",
editable:true,
success: (res) => {
//console.log(res);
if(res.content==""){
return;
}
if(res.confirm){
let data={
isLoan:1,
regStatus:1,
loanNo:res.content,
}
confirmZxdk(data).then(res=>{
//console.log(res);
})
}
}
})
},
async getOrder() {
let res = await getOrder();
this.order_status = res.msg;
},
//长按识别二维码
previewImage(e) {
uni.previewImage({
urls: [this.qr_src],
longPressActions: {
itemList: ["保存到相册", "识别二维码"],
itemColor: "#007AFF",
success: function(data) {}
}
})
},
async getUrl() {
this.loading = true;
let res = await toPay();
this.loading = false;
if (res.code == 200) {
let url = res.data.url;
let src = res.data.src;
this.qr_src = src;
this.pageUrl = url;
//window.location.href = url;
}
}
}
}
</script>
<style scoped lang="scss">
.noBool {
text-align: center;
.noBool-text {
margin-top: 20vh;
font-size: 1.75rem;
line-height: 5rem;
}
.noBool-link {
font-size: 1.5rem;
color: #409EFF;
text-decoration: underline #409EFF;
line-height: 5rem;
}
}
.tab {
margin: 25rpx;
display: flex;
align-items: center;
i {
background-color: #409EFF;
width: 8rpx;
height: 36rpx;
border-radius: 4rpx;
}
text {
font-size: 28rpx;
margin-left: 5rpx;
}
}
.uni-link.link {
color: #409EFF;
}
</style>

View File

@@ -0,0 +1,105 @@
<template>
<view class="rading">
<view v-if="!canEnter">
<!-- 倒计时内容 -->
<p>
缴费须知
</p>
<p>
1. 请确保您已阅读并理解本页面的服务条款和费用说明<br>
2. 在开始支付之前请确认您所输入的支付金额和相关信息准确无误<br>
3. 支付成功后请耐心等待系统处理您的支付请求不要重复支付以避免重复扣款<br>
4. 如遇到支付问题或有任何疑问请及时联系客服获取帮助避免造成不必要的损失或困扰<br>
感谢您的配合与支持<br><br>
</p>
<p style="color: red;margin-bottom: 15rpx;">请在倒计时结束后勾选已阅读</p>
<checkbox-group>
<checkbox :disabled="countdown > 0" v-model="checkboxValue" @change="checkboxChange">已阅读</checkbox>
</checkbox-group>
<button @click="markAsEntered" :disabled="countdown > 0"
class="togo">{{ countdown > 0 ? '倒计时 ' + countdown + ' 秒进入页面' : '点击进入' }}</button>
</view>
<view v-else>
<!-- 进入页面的内容 -->
<p>欢迎进入页面</p>
<button @click="topay" class="welcome">进入缴费</button>
</view>
<FloatBall />
</view>
</template>
<script>
import FloatBall from "@/pages/compoents/FloatBall.vue";
export default {
components: {
FloatBall
},
data() {
return {
countdown: 10,
checkboxValue: "false", // 字符串类型
canEnter: false,
timer: null,
};
},
created() {
this.startCountdown();
},
methods: {
startCountdown() {
this.timer = setInterval(() => {
if (this.countdown > 0) {
this.countdown--;
} else {
clearInterval(this.timer);
}
}, 1000);
},
markAsEntered() {
if (this.countdown === 0 && this.checkboxValue) {
this.canEnter = true;
uni.navigateTo({
url: "/pages/pay/index"
})
} else {
uni.showToast({
title: '请在倒计时结束后选择复选框',
icon: 'none'
});
}
},
checkboxChange(value) {
this.checkboxValue = value;
},
topay() {
uni.navigateTo({
url: "/pages/pay/index"
})
}
},
destroyed() {
clearInterval(this.timer); // 每次离开页面时清除定时器
},
};
</script>
<style>
.rading {
padding: 0 40rpx;
}
.togo {
width: 80%;
margin-top: 40rpx;
background-color: skyblue;
color: white;
}
.welcome {
margin-top: 40rpx;
background-color: skyblue;
color: white;
}
</style>

216
pages/size/size.vue Normal file
View File

@@ -0,0 +1,216 @@
<template>
<view class="size">
<text class="title">基本信息</text>
<view class="inputList">
<view class="oneList">
身高(厘米)<input type="number" v-model="height" placeholder="必填,请输入">
</view>
<view class="oneList">
体重(千克)<input type="number" v-model="weight" placeholder="必填,请输入">
</view>
<view class="oneList"> 鞋码
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<picker @change="bindPickerChange" v-model="index" :range="array" placeholder="必填,请输入">
<view class="uni-input">{{array[index]}}</view>
</picker>
</view>
</view>
</view>
</view>
</view>
<view class="notice">请如实登记个人信息,以便进行军训鞋服校服专业服等的发放
</view>
<view class="bottom-div">
<button @click="submitOwnSize" v-if="submitSizeban" > 修改</button>
<button @click="submitOwnSize" v-if="!submitSizeban"> 提交</button>
</view>
<u-toast ref="uToast"></u-toast>
<zero-loading v-if="loading"></zero-loading>
<FloatBall />
</view>
</template>
<script>
import {
getOwnSize,
submitOwnSize
} from "@/api/sizeApi.js";
import {
isEmpty
} from "@/api/helpFunc.js";
import FloatBall from "@/pages/compoents/FloatBall.vue";
export default {
components: {
FloatBall
},
data() {
return {
index: 0,
array: ['30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44',
'45', '46', '47', '48', '49'
],
height: null,
weight: null,
loading: false,
submitSizeban: false //尺码提交按钮禁用
}
},
async onLoad() {
this.loading = true
await this.getOwnSize();
this.loading = false
},
methods: {
toGo() {
uni.redirectTo({
url: "/pages/newindex/newindex" // 跳转至修改密码页面路径
});
},
async submitOwnSize() {
if(this.height<0||this.height>300||this.weight<0||this.weight>300||this.array[this.index]>60||this.array[this.index]<0){
this.$refs.uToast.show({
type: "error",
message: "数据填写不正确",
duration: 1500,
});
return;
}
let sdata = {
height: this.height,
weight: this.weight,
shoes: this.array[this.index]
};
if (isEmpty(sdata.height)) {
this.$refs.uToast.show({
type: "error",
message: "请填写身高",
duration: 1500,
});
return;
}
if (isEmpty(sdata.weight)) {
this.$refs.uToast.show({
type: "error",
message: "请填写体重",
duration: 1500,
});
return;
}
if (isEmpty(sdata.shoes)) {
this.$refs.uToast.show({
type: "error",
message: "请填写鞋码",
duration: 1500,
});
return;
}
this.loading = true;
let res = await submitOwnSize(sdata);
this.loading = false;
if (res.code == 200) {
this.$refs.uToast.show({
type: "success",
message: res.msg,
duration: 1500,
});
uni.redirectTo({
url: "/pages/newindex/newindex"
});
this.submitSizeban=false;
} else {
this.$refs.uToast.show({
type: "error",
message: res.msg,
duration: 1500,
});
}
},
async getOwnSize() {
let res = await getOwnSize();
if (res.code == 200) {
if (!isEmpty(res.data)) {
let data = {
...res.data
};
this.height = data.height;
this.weight = data.weight;
for (let i = 0; i < this.array.length; i++) {
if (this.array[i] == data.shoes) {
this.index = i;
}
}
console.log(res); //进入页面打印获取到的信息
if (res.data.status == "0") { //禁用尺码提交按钮
this.submitSizeban = true
}
}
}
},
bindPickerChange: function(e) {
console.log('picker发送选择改变携带值为', e.detail.value)
this.index = e.detail.value
},
clearPicker() {
this.index = 0; // 重置选择器选择内容
}
},
onUnload() {
this.clearPicker(); // 在页面卸载前重置选择器选择内容
}
}
</script>
<style lang="scss">
.title {
margin-left: 40rpx;
font-weight: bold;
}
.inputList {
margin: 20rpx auto;
width: 90%;
}
.oneList {
display: flex;
justify-content: space-between;
align-items: center;
width: 95%;
height: 80rpx;
border-bottom: 1px solid #DDDDDD;
input {
width: 25%;
text-align: right;
}
}
.notice {
width: 90%;
margin-left: 40rpx;
font-size: 28rpx;
color: #969699;
}
button {
width: 80%;
position: fixed;
bottom: 100rpx;
margin-left: 50rpx;
border-radius: 50rpx;
background-color: #59a1fe;
color: white;
}
.bottom-div {
margin-left: 29rpx;
}
</style>

View File

@@ -0,0 +1,37 @@
<template>
<view class="start-page">
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
toLogin() {
if (!uni.getStorageSync("token"))
return ""
uni.switchTab({
url: "/pages/index/index",
animationDuration: 1000
})
}
},
onLoad() {
this.toLogin()
}
}
</script>
<style lang="scss" scoped>
.start-page {
height: 100vh;
background: url("../../static/bg.png") no-repeat;
background-size: cover;
}
</style>

92
pages/step/index.vue Normal file
View File

@@ -0,0 +1,92 @@
<template>
<view>
<u-toast ref="uToast"></u-toast>
<uni-steps style="margin-top: 40rpx;" :options="task_list" :active="active" />
<step1 v-if="active == 0" />
<step2 v-if="active == 1" />
<step3 v-if="active == 2" />
<button style="margin:250rpx 30rpx 0 30rpx" @click="toNext">下一步</button>
<button style="margin:20rpx 30rpx 0 30rpx;background-color: #409EFF;color: white;" @click="toOther">先看看公告</button>
</view>
</template>
<script>
import step3 from "@/pages/pay/index.vue";
import step1 from "@/pages/filling/filling.vue";
import step2 from "@/pages/gather/gather.vue";
import {listOwnTodo} from "@/api/toApi.js";
import {getOwnTodoInfo} from "@/api/validApi.js";
export default {
components:{
step1,
step2,
step3
},
data() {
return {
task_list:[],
active:0,
all_list:[]
};
},
onShow(){
this.listOwnTodo();
},
methods:{
toOther(){
uni.navigateTo({
url:"/pages/newindex/newindex"
})
},
async toNext(){
let index = this.active;
let id = this.all_list[index].id;
let res = await getOwnTodoInfo(id);
if(res.code == 200){
let data = res.data;
let status = data.status;
if(status == "0"){
this.$refs.uToast.show({
type: "error",
message: "您当前的任务未完成哦",
duration: 1500
});
return;
}
}
let step = this.active +1;
if(step == 3){
uni.switchTab({
url:"/pages/newindex/newindex"
})
}
this.active = step;
},
async listOwnTodo(){
let res = await listOwnTodo();
if(res.code ==200){
let data = res.rows;
this.all_list = data;
let temp = [];
let isFirst = true;
data.map((v,i)=>{
temp.push({
"title":v.taskName
});
if(v.status == "0" && isFirst){
this.active = i;
isFirst = false;
}
});
this.task_list = [...temp];
}
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,191 @@
<template>
<view class="editphone">
<view class="row">
<input type="text" placeholder="考生号" v-model="actForm.ksh" />
</view>
<view class="row">
<input type="text" placeholder="身份证号" v-model="actForm.sfzh" />
</view>
<!-- <view class="row">
<input type="text" placeholder="手机号" v-model="actForm.phone" />
</view> -->
<view class="row">
<input type="password" v-model="actForm.pwd" placeholder="请输入新密码">
</view>
<!-- <view class="row">
<input type="text" placeholder="手机验证码" v-model="actForm.code" />
<button :disabled="time < 60" @click="getCode" class="mini-btn" type="primary" size="mini">{{ codeTxt }}</button>
</view> -->
<button type="primary" @click="changePhone" class="submit">更改</button>
</view>
</template>
<script>
import {
verifyPwd,
sendSmsUpdatePwd,
checkPwd
} from "@/api/toApi.js";
export default {
data() {
return {
time: 60,
codeTxt: "获取验证码",
actForm: {
xh: "",
sfzh: "",
ksh:'',
// phone: "",
code: "",
pwd: ""
},
}
},
methods: {
async getCode() {
// 发送短信验证码的逻辑
let sdata = {
SFZH: this.actForm.sfzh,
SJH: this.actForm.phone,
XH: this.actForm.xh
};
console.log(sdata)
try {
let res = await sendSmsUpdatePwd(sdata);
if (res.code === 200) {
var timer = setInterval(() => {
if (this.time > 0) {
this.time--;
this.codeTxt = this.time + "S之后重新发送";
} else {
this.time = 60;
this.codeTxt = "获取验证码";
clearInterval(timer);
}
}, 1000);
} else {
console.log(res.msg)
uni.showToast({
title: res.msg || "发送失败",
icon: "none"
});
}
} catch (error) {
uni.showToast({
title: "发送失败,请稍后重试",
icon: "none"
});
}
},
changePhone() {
const requiredFields = {
sfzh: '身份证号不能为空',
// phone: "手机号不能为空",
ksh: '考生号不能为空',
pwd: '密码不能为空'
// code: '验证码不能为空',
};
const emptyField = Object.keys(requiredFields).find(field => {
if (field === 'pwd') {
return !this.actForm[field] || this.actForm[field].length < 6;
}
return !this.actForm[field];
});
if (emptyField) {
if (emptyField === 'pwd' && this.actForm['pwd'].length < 6) {
uni.showToast({
title: "密码必须大于等于6位",
icon: "none"
});
} else {
uni.showToast({
title: requiredFields[emptyField],
icon: "none"
});
}
return;
}
// 调用后端验证接口
checkPwd({
KSH: this.actForm.ksh,
// SJH: this.actForm.phone,
SFZH: this.actForm.sfzh,
pwd: this.actForm.pwd
}).then(res => {
if (res.code === 200) {
uni.showToast({
title: "更改成功",
duration: 2000
});
uni.navigateTo({
url: '/pages/login/index'
});
// 验证成功后的操作,例如跳转页面或其他处理
} else {
console.log(res.msg)
uni.showToast({
title: "更改失败,请检查输入的信息",
icon: "none"
});
}
}).catch(err => {
uni.showToast({
title: "更改失败,请稍后重试",
icon: "none"
});
});
}
}
}
</script>
<style scope lang="scss">
.editphone {
padding: 40rpx;
.row {
display: flex;
border-bottom: 1px solid #d2d2d2;
padding: 10rpx 0;
align-items: center;
input {
height: 110rpx;
padding-left: 20rpx;
flex: 1;
}
.mini-btn {
background-color: white;
color: #1584FF;
border-radius: 0;
border-bottom: 1.5px solid #1584FF;
font-size: 32rpx;
padding: 0;
height: 32px;
&:after {
border: none;
}
&[disabled] {
color: #9ACAFF;
border-bottom: 1.5px solid #9ACAFF;
}
}
}
.submit {
margin-top: 150rpx;
height: 100rpx;
line-height: 100rpx;
}
}
</style>