fix
This commit is contained in:
parent
84991abec5
commit
6d9cfe694b
2
.env.dev
Normal file
2
.env.dev
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
VITE_APP_MODE = 'dev'
|
||||||
|
VITE_API_URL = http://114.218.158.24:9020
|
3
.env.prod
Normal file
3
.env.prod
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
mode = prod
|
||||||
|
VITE_APP_MODE = 'prod'
|
||||||
|
VITE_API_URL = https://erpapi.fontree.cn/
|
@ -1 +1,12 @@
|
|||||||
import request from "@/utils/service/index.js";
|
import request from "../../utils/service/index";
|
||||||
|
//登录
|
||||||
|
export const userLogin = (data) => {
|
||||||
|
return request({
|
||||||
|
url: "/user/v2/login",
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -18,7 +18,37 @@
|
|||||||
"titleNView": false // 禁用原生导航
|
"titleNView": false // 禁用原生导航
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/index/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": false // 禁用原生导航
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/painting/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": false // 禁用原生导航
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/detail/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"app-plus": {
|
||||||
|
"titleNView": false // 禁用原生导航
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
120
src/pages/detail/index.vue
Normal file
120
src/pages/detail/index.vue
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<navBar v-if="!isDetail"> 出库 </navBar>
|
||||||
|
<navBar v-if="isDetail"> 画作详情 </navBar>
|
||||||
|
<view class="container-box" >
|
||||||
|
<span style="font-weight: bold;text-align: center;" v-if="!isDetail">
|
||||||
|
保存要出库A000-B3的
|
||||||
|
</span>
|
||||||
|
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;" v-if="!isDetail"> PT00000004画筒吗?</span>
|
||||||
|
<span style="font-weight: bold;text-align: center;" v-if="isDetail">画筒号:</span>
|
||||||
|
<span style="font-weight: bold;text-align: center;margin-top: 20rpx;" v-if="isDetail">所在位置:</span>
|
||||||
|
<view class="painting-box" >
|
||||||
|
<span>画作名称:</span>
|
||||||
|
<span style="margin-top: 20rpx;">画家:</span>
|
||||||
|
<span style="margin-top: 20rpx;">预览图:</span>
|
||||||
|
<view class="image-container">
|
||||||
|
<up-image
|
||||||
|
:show-loading="true"
|
||||||
|
:src="src"
|
||||||
|
width="98%"
|
||||||
|
height="100px"
|
||||||
|
@click="click"
|
||||||
|
></up-image>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="button-container">
|
||||||
|
<up-button
|
||||||
|
style="width: 326rpx; margin: auto; height: 80rpx;"
|
||||||
|
color="#BCBCBC"
|
||||||
|
throttleTime="5"
|
||||||
|
:loading="loading"
|
||||||
|
>取消</up-button
|
||||||
|
>
|
||||||
|
<up-button
|
||||||
|
style="width: 326rpx; margin: auto; height: 80rpx;"
|
||||||
|
color="#EFC54E"
|
||||||
|
throttleTime="5"
|
||||||
|
:loading="loading"
|
||||||
|
>确认</up-button
|
||||||
|
>
|
||||||
|
<up-button
|
||||||
|
style="width: 426rpx; margin: auto; height: 86rpx;"
|
||||||
|
color="#EFC54E"
|
||||||
|
throttleTime="5"
|
||||||
|
:loading="loading"
|
||||||
|
@click="login"
|
||||||
|
v-if="isDetail"
|
||||||
|
>返回继续扫码</up-button
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
const isDetail = ref(false);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background: url("@/static/bgp.png") no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-attachment: fixed;
|
||||||
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.container-box {
|
||||||
|
height: 100%;
|
||||||
|
width: 98%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 60rpx;
|
||||||
|
padding: 40rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.painting-box {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 60rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
|
||||||
|
}
|
||||||
|
.image-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.button-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20rpx;
|
||||||
|
left: 0;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
height: 8%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,24 +1,115 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="content"></div>
|
<view class="content">
|
||||||
|
<navBar> 添加画作 </navBar>
|
||||||
|
<view class="container-box">
|
||||||
|
<span style="font-weight: bold">
|
||||||
|
已扫画筒号:{{ }}
|
||||||
|
</span>
|
||||||
|
<view style="display: flex; align-items: center;">
|
||||||
|
<up-input class="login-input" placeholder="画家姓名/编号/画作编号/画作名称" style="flex: 1; margin-right: 10rpx;" clearable>
|
||||||
|
</up-input>
|
||||||
|
|
||||||
|
<up-button style="width: 120rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
margin-top: 15rpx;
|
||||||
|
margin-left: 15rpx;" color="#EFC54E" throttleTime="5" :loading="loading" @click="login">搜索</up-button>
|
||||||
|
</view>
|
||||||
|
<view class="painting-box" >
|
||||||
|
<span style="display: flex; align-items: center;">
|
||||||
|
<up-image :show-loading="true" :src="src" width="100px" height="100px" @click="click"></up-image>
|
||||||
|
<span style="display: flex; flex-direction: column; margin-left: 10px;">
|
||||||
|
<span style="font-weight: bold;">画作名称</span>
|
||||||
|
<span style="color:#BCBCBC;font-size: 16px;">画作编号:</span>
|
||||||
|
<span style="color:#BCBCBC;font-size: 16px;">画家编号:</span>
|
||||||
|
<span style="color:#BCBCBC;font-size: 16px;">画家姓名:</span>
|
||||||
|
<span style="color:#BCBCBC;font-size: 16px;">平尺(寸):</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="button-container">
|
||||||
|
<up-button
|
||||||
|
style="width: 326rpx; margin: auto; height: 80rpx;"
|
||||||
|
color="#BCBCBC"
|
||||||
|
throttleTime="5"
|
||||||
|
:loading="loading"
|
||||||
|
>取消</up-button
|
||||||
|
>
|
||||||
|
<up-button
|
||||||
|
style="width: 326rpx; margin: auto; height: 80rpx;"
|
||||||
|
color="#EFC54E"
|
||||||
|
throttleTime="5"
|
||||||
|
:loading="loading"
|
||||||
|
>确认</up-button
|
||||||
|
>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
<script setup>
|
||||||
data() {
|
import { ref } from "vue";
|
||||||
return {
|
|
||||||
title: "Hello",
|
|
||||||
};
|
|
||||||
},
|
|
||||||
onLoad() {},
|
|
||||||
methods: {},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background: url("@/static/bgp.png") no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-attachment: fixed;
|
||||||
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
|
.container-box {
|
||||||
|
height: 100%;
|
||||||
|
width: 95%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 40rpx;
|
||||||
|
padding: 40rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-input {
|
||||||
|
width: 80%;
|
||||||
|
display: flex;
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
padding: 32rpx 24rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 96rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.painting-box {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.button-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20rpx;
|
||||||
|
left: 0;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
height: 8%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</up-input>
|
</up-input>
|
||||||
</view>
|
</view>
|
||||||
<view class="login-input">
|
<view class="login-input" >
|
||||||
<up-input placeholder="请输入密码" :password="true">
|
<up-input placeholder="请输入密码" :password="true">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<up-text
|
<up-text
|
||||||
@ -39,19 +39,29 @@
|
|||||||
<span>123123123</span>
|
<span>123123123</span>
|
||||||
</view>
|
</view>
|
||||||
<up-code-input v-model="code" :maxlength="6"></up-code-input>
|
<up-code-input v-model="code" :maxlength="6"></up-code-input>
|
||||||
|
<view style="display: flex; justify-content: space-between; align-items: center; margin-top: 20rpx;">
|
||||||
|
<span
|
||||||
|
style="text-align: left; color: #e3af1c;"
|
||||||
|
@click=""
|
||||||
|
>重新发送</span>
|
||||||
|
<span
|
||||||
|
style="text-align: right; color: #e3af1c;"
|
||||||
|
@click="goToPassword"
|
||||||
|
>密码登录</span>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view> </view>
|
<view> </view>
|
||||||
<view> </view>
|
|
||||||
<view
|
<view
|
||||||
style="text-align: right; color: #e3af1c; margin-top: 20rpx"
|
style="text-align: right; color: #e3af1c; margin-top: 20rpx"
|
||||||
@click="toCode"
|
@click="toCode" v-if="!isCode"
|
||||||
>验证码登录</view
|
>验证码登录</view
|
||||||
>
|
>
|
||||||
<up-button
|
<up-button
|
||||||
style="width: 626rpx; margin: auto; height: 96rpx"
|
style="width: 626rpx; margin: auto; height: 96rpx;margin-top: 90rpx;"
|
||||||
color="#EFC54E"
|
color="#EFC54E"
|
||||||
throttleTime="5"
|
throttleTime="5"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
@click="logining"
|
||||||
v-if="!isCode"
|
v-if="!isCode"
|
||||||
>登录</up-button
|
>登录</up-button
|
||||||
>
|
>
|
||||||
@ -62,6 +72,10 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import useToast from "@/hooks/toast/useToast.js";
|
import useToast from "@/hooks/toast/useToast.js";
|
||||||
|
import {
|
||||||
|
userLogin
|
||||||
|
} from "@/api/login.js";
|
||||||
|
console.log(userLogin())
|
||||||
const { showMessage } = useToast();
|
const { showMessage } = useToast();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const isCode = ref(false);
|
const isCode = ref(false);
|
||||||
@ -72,6 +86,25 @@ const code = ref("");
|
|||||||
const toCode = () => {
|
const toCode = () => {
|
||||||
isCode.value = true;
|
isCode.value = true;
|
||||||
};
|
};
|
||||||
|
const goToPassword = () =>{
|
||||||
|
isCode.value=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 登录方法
|
||||||
|
const logining = () => {
|
||||||
|
loading.value = true;
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/index/index',
|
||||||
|
success: () => {
|
||||||
|
loading.value = false;
|
||||||
|
},
|
||||||
|
fail: () => {
|
||||||
|
loading.value = false;
|
||||||
|
showMessage({ type: "default", message: "跳转失败" });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
99
src/pages/painting/index.vue
Normal file
99
src/pages/painting/index.vue
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
<template>
|
||||||
|
<view class="content">
|
||||||
|
<navBar> 入库 </navBar>
|
||||||
|
<view class="container-box">
|
||||||
|
<span style="font-weight: bold">
|
||||||
|
已扫画筒号:{{ }}
|
||||||
|
</span>
|
||||||
|
<span style="margin-top: 40rpx;">
|
||||||
|
请放入:
|
||||||
|
</span>
|
||||||
|
<view class="painting-box" >
|
||||||
|
<span style="font-weight: bold;text-align: center;">{{ }}货架</span>
|
||||||
|
<up-line style="margin-top: 20rpx;"></up-line>
|
||||||
|
<span style="color: #CF3050;font-size: 24px;text-align: center;margin-top: 20rpx;">
|
||||||
|
A1
|
||||||
|
</span>
|
||||||
|
<span style="text-align: center;margin-top: 20rpx;">
|
||||||
|
A1列1行
|
||||||
|
</span>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="button-container">
|
||||||
|
<up-button
|
||||||
|
style="width: 326rpx; margin: auto; height: 80rpx;"
|
||||||
|
color="#BCBCBC"
|
||||||
|
throttleTime="5"
|
||||||
|
:loading="loading"
|
||||||
|
>取消</up-button
|
||||||
|
>
|
||||||
|
<up-button
|
||||||
|
style="width: 326rpx; margin: auto; height: 80rpx;"
|
||||||
|
color="#EFC54E"
|
||||||
|
throttleTime="5"
|
||||||
|
:loading="loading"
|
||||||
|
>确认</up-button
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background: url("@/static/bgp.png") no-repeat;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
background-attachment: fixed;
|
||||||
|
height: 100vh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.container-box {
|
||||||
|
height: 100%;
|
||||||
|
width: 98%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 60rpx;
|
||||||
|
padding: 40rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.painting-box {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 0 6px rgba(219, 218, 218, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.button-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20rpx;
|
||||||
|
left: 0;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: #fff;
|
||||||
|
height: 8%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
BIN
src/static/bgp.png
Normal file
BIN
src/static/bgp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 487 KiB |
@ -24,6 +24,8 @@ const request = new Request({
|
|||||||
},
|
},
|
||||||
//实例的响应拦截器
|
//实例的响应拦截器
|
||||||
responseInterceptors: async (response) => {
|
responseInterceptors: async (response) => {
|
||||||
|
console.log(1231231,import.meta.env.VITE_API_URL)
|
||||||
|
|
||||||
if (response.data.status === 1) {
|
if (response.data.status === 1) {
|
||||||
showMessage({ type: "error", message: response.data.msg });
|
showMessage({ type: "error", message: response.data.msg });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user