You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
2.4 KiB
Vue

3 months ago
<template>
<view class="container">
<image src="../../static/log.png" class="logo"></image>
<u-notify ref="uNotify" message="Hi uView"></u-notify>
<view class="title">画作破损修复</view>
<view class="no">画作编号</view>
<u--input
placeholder="请输入画作编号"
class="art-input"
border="none"
v-model="Tfnum"
></u--input>
<u-button type="primary" class="search" @click="goSearch"></u-button>
</view>
</template>
<script>
2 months ago
3 months ago
export default {
data() {
return {
Tfnum: "",
};
},
methods: {
// 检查登录状态
checkLogin() {
// 获取用户信息
let userInfo = uni.getStorageSync("repari-user-info");
// 没有登录信息,跳转到登录页面
if (!userInfo) {
this.$router.push({
path: "/pages/login/login",
});
}
},
// 搜索
async goSearch() {
let data = {
Tfnum: this.Tfnum,
};
let res = await this.$api.management.detail(data);
if (res.status == 0) {
this.$router.push({
path: "/pages/repair/index",
query: {
detailData:JSON.stringify(res.data),
},
});
} else {
this.$refs.uNotify.show({
top: 10,
type: "error",
message: res.msg,
duration: 1000 * 3,
fontSize: 20,
safeAreaInsetTop: true,
});
}
},
},
created() {
// 检查登录状态
this.checkLogin();
},
};
</script>
<style lang="scss">
page {
background-size: auto 100%;
background-attachment: fixed;
height: 100vh;
background-image: url("../../static/backg.png");
}
.container {
height: 100vh;
background-size: auto 100%;
padding-left: 60rpx;
padding-right: 60rpx;
background-attachment: fixed;
text-align: center;
.logo {
width: 170rpx;
height: 170rpx;
margin-top: 180rpx;
}
.title {
font-size: 40rpx;
font-weight: bold;
}
.no {
font-size: 32rpx;
text-align: left;
margin-top: 150rpx;
}
.art-input {
margin-top: 20rpx;
background: #ffffff;
height: 100rpx;
}
/deep/ .u-input__content__field-wrapper__field {
font-size: 32rpx;
color: #000000;
padding: 0 20rpx;
}
.search {
margin-top: 70rpx;
width: 100%;
border: 0;
font-size: 34rpx;
height: 90rpx;
background-image: linear-gradient(to right, #698883, #45645f);
}
}
</style>