提交 01afed89 authored 作者: 刘旭's avatar 刘旭

最新代码

上级 65c5d7a6
......@@ -57,6 +57,7 @@ const search = (val: any) => {
}
const clear = () => {
addressBookList.value = []
listQuery.Name = ""
init()
}
......@@ -67,9 +68,8 @@ const init = async () => {
if (res.code == 200) {
if (res.total > 10) status.value = "loadmore"
else status.value = "nomore"
addressBookList.value = res.data
addressBookList.value = [...addressBookList.value, ...res.data]
listQuery.total = res.total
console.log(res.data)
}
}
// 上拉加载数据
......
......@@ -4,7 +4,11 @@
<template #body>
<view class="address-book-content">
<view class="left">
<u-image width="160rpx" height="160rpx" :src="src"></u-image>
<u-image
width="160rpx"
height="160rpx"
:src="baseUrl + '/' + addressBookItem.proPhoto"
></u-image>
<view class="content">
<h4>{{ addressBookItem.stuName }}</h4>
<text class="tel">{{ addressBookItem.Phone }}</text>
......@@ -20,8 +24,7 @@
</template>
<script setup lang="ts">
import { src } from "@/utils/example"
import { baseUrl } from "@/utils/request"
const props = defineProps({
addressBookItem: {
type: Array,
......
......@@ -59,7 +59,7 @@
</u-card>
</div>
<saveQrCode v-model="show" />
<saveQrCode v-model="show" :Url="classItem.Url" />
</template>
<script setup lang="ts">
......
......@@ -12,7 +12,7 @@
<u-image
width="100%"
height="500rpx"
:src="qrCodeUrl"
:src="baseUrl + '/' + Url"
ref="canvasRef"
/>
</view>
......@@ -26,29 +26,14 @@
</template>
<script setup lang="ts">
import { qrCodeUrl } from "@/utils/example"
import { toast } from "@/utils/util"
import { baseUrl } from "@/utils/request"
const props = defineProps({
show: Boolean,
Url: String,
})
const canvasRef = ref()
const saveImage = (url: string) => {
downloadImage(url)
}
const downloadImage = (url: string) => {
const link = document.createElement("a")
link.href = url
link.download = "image.jpg"
link.style.display = "none"
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}
</script>
<style lang="scss" scoped>
......
......@@ -235,7 +235,7 @@ const tagList = [
// 签到请假:QDQJ + ''
// 签退请假: QD + QTQJ
// 已补签:QDBJ + ''
// 签退补签: '' + QDBJ
// 签退补签: QD + QDBQ
const attendanceStatus = computed(() => {
if (props.current !== 2) return
......@@ -246,11 +246,11 @@ const attendanceStatus = computed(() => {
const conditions: any = {
"QD-QT": tagList[0],
QD: tagList[2],
QDQJ: tagList[3],
"QD-": tagList[2],
"QDQJ-": tagList[3],
"QD-QTQJ": tagList[4],
QDBJ: tagList[5],
"QD-QDBJ": tagList[6],
"QDBQ-": tagList[5],
"QD-QTBQ": tagList[6],
}
const key = `${SingIn || ""}-${SingOut || ""}`
......@@ -260,41 +260,44 @@ const attendanceStatus = computed(() => {
})
const singInStatus = computed(() => {
const defaultStatus = "未签到"
const statusMap: any = {
QDBQ: "已补签",
QD: "已签到",
QDQJ: "签到请假",
if (!props.courseItem.State.length) {
return "未签到"
}
const singOut = props.courseItem.State.length
? props.courseItem.State[0]?.Value[0].SingOut
: null
const status = statusMap[singOut] || defaultStatus
return status
const singIn = props.courseItem.State[0].Value[0].SingIn
switch (singIn) {
case "QDBQ":
return "已补签"
case "QD":
return "已签到"
case "QDQJ":
return "签到请假"
default:
return "未签到"
}
})
const singOutStatus = computed(() => {
const defaultStatus = "未签退"
const statusMap: any = {
QDBQ: "已补签",
QTBQ: "已补签",
QT: "已签退",
QTQJ: "签退请假",
if (!props.courseItem.State.length) {
return "未签退"
}
const singIn = props.courseItem.State.length
? props.courseItem.State[0]?.Value[0].SingIn
: null
const status =
singIn === "QDBQ"
? "已补签"
: statusMap[props.courseItem.State[0]?.Value[0].SingOut] || defaultStatus
const singIn = props.courseItem.State[0].Value[0].SingIn
if (singIn === "QDBQ") {
return "已补签"
}
return status
const singOut = props.courseItem.State[0].Value[0].SingOut
switch (singOut) {
case "QTBQ":
return "已补签"
case "QT":
return "已签退"
case "QTQJ":
return "签退请假"
default:
return "未签退"
}
})
// 签到按钮的显示状态
......
......@@ -16,7 +16,7 @@
width="100rpx"
height="100rpx"
border-radius="10"
:src="src1"
:src="baseUrl + '/' + item.Url"
/>
<view class="info-text">
<text>{{ item.teachName }}</text>
......@@ -49,7 +49,7 @@
<script setup lang="ts">
// import headers from "@/components/header/index.vue"
import { useCourseStore } from "@/store/modules/courseStore"
import { src1 } from "@/utils/example"
import { baseUrl } from "@/utils/request"
const courseStore = useCourseStore()
......
......@@ -60,12 +60,6 @@
>
</view>
</view>
<!-- <u-select
v-model="data.selectShow"
:list="data.selectList"
@confirm="onSelect"
></u-select> -->
</template>
<script setup lang="ts">
......@@ -97,16 +91,6 @@ const data = reactive({
name: "女",
},
],
// selectList: [
// {
// value: 1,
// label: "学校",
// },
// {
// value: 2,
// label: "政府",
// },
// ],
rules: {
FMobile: [
{
......@@ -167,10 +151,6 @@ watch(
}
)
const onSelect = (item: any) => {
data.formData.FWorkUnit = item[0].label
}
const toLogin = () => {
uni.navigateTo({
url: "/pages/login/index",
......@@ -232,11 +212,14 @@ const submit = () => {
if (valid) {
if (data.tips == "重新获取") return toast("验证码失效")
if (data.formData.code != data.codeValue) return toast("验证码不正确")
data.formData.FSex = data.formData.FSex === "男" ? "0" : "1"
const { data: res } = await register(state)
if (res.code == 200) {
globalStore.setInfoData(res.data[0])
uni.reLaunch({ url: "/pages/home/index" })
toast("注册成功")
} else {
data.formData.FSex = data.formData.FSex === "0" ? "男" : "女"
}
}
})
......
......@@ -92,9 +92,9 @@ const registerTrain = () => {
async (result: boolean) => {
if (result) {
if (
props.trainItem.fisFillArrAngEroom !== "false" &&
props.trainItem.fisFillCohabItant !== "false" &&
props.trainItem.fisFillInfo !== "false" &&
props.trainItem.fisFillArrAngEroom !== "false" ||
props.trainItem.fisFillCohabItant !== "false" ||
props.trainItem.fisFillInfo !== "false" ||
props.trainItem.fsFillRiding !== "false"
) {
initInFormAtion()
......
......@@ -22,3 +22,6 @@ export const demoAddr = {
export const qrCodeUrl =
"https://img.zcool.cn/community/0125ec58a88075a801219c77ad0c0f.jpg@1280w_1l_2o_100sh.jpg"
export const LOGO =
"https://pic2.zhimg.com/v2-225fbbe09689a4a3219ae1e00fe2280b_1440w.jpg?source=172ae18b"
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论