diff --git a/.env.dev b/.env.dev
index 516231d..cfbcf3b 100644
--- a/.env.dev
+++ b/.env.dev
@@ -1,2 +1,3 @@
VITE_APP_MODE = 'dev'
VITE_API_URL = http://114.218.158.24:9020
+VITE_API_OA_URL=http://114.218.158.24:9020
\ No newline at end of file
diff --git a/.env.prod b/.env.prod
index 490aa6a..83882ba 100644
--- a/.env.prod
+++ b/.env.prod
@@ -1,3 +1,4 @@
mode = prod
VITE_APP_MODE = 'prod'
VITE_API_URL = https://erpapi.fontree.cn/
+VITE_API_OA_URL=https://erp-out.szjixun.cn/
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index f9768a5..77e964a 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -5,6 +5,7 @@ export default {
},
onShow: function () {
console.log("App Show");
+ console.log(window.location.href);
},
onHide: function () {
console.log("App Hide");
diff --git a/src/api/login.js b/src/api/login.js
index 795f5ad..4619b90 100644
--- a/src/api/login.js
+++ b/src/api/login.js
@@ -1,36 +1,36 @@
import request from "../../utils/service/index";
//登录
export const userLogin = (data) => {
- return request({
- url: "/user/v2/login",
- method: "POST",
- data,
- });
- };
- //验证码
+ return request({
+ url: "/user/v2/login",
+ method: "POST",
+ data,
+ });
+};
+//验证码
export const userSend = (data) => {
- return request({
- url: "/user/send",
- method: "POST",
- data,
- });
- };
- //扫码查看画桶详情
- export const pbDetail = (data) => {
- return request({
- url: "/containeradm/v1/painting_bucket/get_by_id",
- method: "POST",
- data,
- });
- };
- //查询可放画桶的空闲货架孔
- export const freebox = (data) => {
- return request({
- url: "/containeradm/v1/box_rel_bucket/freebox",
- method: "POST",
- data,
- });
- };
+ return request({
+ url: "/user/send",
+ method: "POST",
+ data,
+ });
+};
+//扫码查看画桶详情
+export const pbDetail = (data) => {
+ return request({
+ url: "/containeradm/v1/painting_bucket/get_by_id",
+ method: "POST",
+ data,
+ });
+};
+//查询可放画桶的空闲货架孔
+export const freebox = (data) => {
+ return request({
+ url: "/containeradm/v1/box_rel_bucket/freebox",
+ method: "POST",
+ data,
+ });
+};
//出库
export const outbound = (data) => {
return request({
@@ -79,3 +79,10 @@ export const cancel = (data) => {
data,
});
};
+export const getRules = (data) => {
+ return request({
+ url: "/rule/rules",
+ method: "POST",
+ data,
+ });
+};
diff --git a/src/components/navBar/index.vue b/src/components/navBar/index.vue
index c8573a6..ef05cd6 100644
--- a/src/components/navBar/index.vue
+++ b/src/components/navBar/index.vue
@@ -39,10 +39,9 @@ const currentWebView = plus.webview.getWebviewById("wv");
const root = document.documentElement;
root.style.setProperty(
"--statusBarHeight",
- `${
- currentWebView.RunTime === "app"
- ? plus.navigator.getStatusbarHeight()
- : 0 ?? 0
+ `${currentWebView.RunTime === "app"
+ ? plus.navigator.getStatusbarHeight()
+ : 0 ?? 0
}px`
);
@@ -51,9 +50,11 @@ root.style.setProperty(
.status_bar {
height: var(--status-bar-height);
}
+
:deep(.u-status-bar) {
margin-top: var(--statusBarHeight);
}
+
@mixin flex($direction: row) {
/* #ifndef APP-NVUE */
display: flex;
diff --git a/src/main.js b/src/main.js
index 5b5fea5..82fd1fe 100644
--- a/src/main.js
+++ b/src/main.js
@@ -3,6 +3,7 @@ import App from "./App.vue";
import uviewPlus from "uview-plus";
import globalComponents from "./components";
import VConsole from "vconsole";
+
if (import.meta.env.VITE_APP_MODE === "dev") {
new VConsole();
}
diff --git a/src/pages.json b/src/pages.json
index b243e52..d814936 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -12,43 +12,35 @@
{
"path": "pages/login/index",
"style": {
- "navigationBarTitleText": "",
- "enablePullDownRefresh": false,
- "app-plus": {
- "titleNView": false // 禁用原生导航
- }
+ "navigationBarTitleText": "登录",
+ "enablePullDownRefresh": false
+
}
},
{
"path": "pages/index/index",
"style": {
- "navigationBarTitleText": "",
- "enablePullDownRefresh": false,
- "app-plus": {
- "titleNView": false // 禁用原生导航
- }
+ "navigationBarTitleText": "添加画作",
+ "enablePullDownRefresh": false
+
}
},
{
"path": "pages/painting/index",
"style": {
- "navigationBarTitleText": "",
- "enablePullDownRefresh": false,
- "app-plus": {
- "titleNView": false // 禁用原生导航
- }
+ "navigationBarTitleText": "入库",
+ "enablePullDownRefresh": false
+
}
},
{
"path": "pages/detail/index",
"style": {
"navigationBarTitleText": "",
- "enablePullDownRefresh": false,
- "app-plus": {
- "titleNView": false // 禁用原生导航
- }
+ "enablePullDownRefresh": false
+
}
- },
+ }
],
"globalStyle": {
"navigationBarTextStyle": "black",
diff --git a/src/pages/detail/index.vue b/src/pages/detail/index.vue
index be2efd0..be97fea 100644
--- a/src/pages/detail/index.vue
+++ b/src/pages/detail/index.vue
@@ -1,84 +1,113 @@
-
- 出库
- 画筒详情
-
-
- 确定要出库{{state.locateAddress}}的
-
- {{state.pid}}画筒吗?
- 画筒号:{{state.pid}}
- 所在位置:{{ state.locateAddress }}
-
- 画作名称:{{ state.drawName }}
- 画家:{{ state.drawerName }}
- 预览图:
-
-
+
+
+
+
+ 确定要出库{{ state.locateAddress }}的
+
+
+ {{ state.pid }}画筒吗?
+ 画筒号:{{ state.pid }}
+ 所在位置:{{ state.locateAddress }}
+
+ 画作名称:{{ state.drawName }}
+ 画家:{{ state.drawerName }}
+ 预览图:
+
+
-
-
-
-
+
+ 取消
- {{ buttonText }}
- 返回继续扫码
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+ .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;
+ height: auto;
+ }
+}
+
+.button-container {
+ display: flex;
+ justify-content: space-between;
+ width: 100%;
+ position: fixed;
+ bottom: 1rpx;
+ left: 0;
+ padding: 0 20rpx;
+ box-sizing: border-box;
+ background-color: #fff;
+ height: 8%;
+}
+
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 8552197..ce3285c 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -1,48 +1,74 @@
- 添加画作
+
-
- 已扫画筒号:{{state.pid }}
-
-
-
+ 已扫画筒号:{{ state.pid }}
+
+
- 搜索
+ 搜索
-
-
-
-
-
- {{painting.ArtworkName}}
- 画作编号:{{ painting.Tfnum }}
- 画家编号:{{ painting.Tnum }}
- 画家姓名:{{ painting.ArtistName }}
- 平尺(寸):{{ painting.Ruler }}
-
-
+
+
+
+
-
-
-
-
-
+ {{ painting.ArtworkName }}
+ 画作编号:{{ painting.Tfnum }}
+ 画家编号:{{ painting.Tnum }}
+ 画家姓名:{{ painting.ArtistName }}
+ 平尺(寸):{{ painting.Ruler }}
+
+
+
+
+
+
+
@@ -50,26 +76,31 @@
style="width: 336rpx; margin: auto; height: 80rpx"
color="#BABABA"
throttleTime="5"
+ @click="backScan"
+ v-if="runTimeEnv()"
>取消
- {{ buttonText }}
-
+
+ {{ buttonText }}
+
-
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index 595283d..7992d84 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -1,6 +1,6 @@
- 登录
+
登录
@@ -103,7 +103,7 @@
import { ref, reactive } from "vue";
import useToast from "@/hooks/toast/useToast.js";
import { onLoad } from "@dcloudio/uni-app";
-import { userLogin, userSend, pbDetail } from "@/api/login.js";
+import { userLogin, userSend, pbDetail, getRules } from "@/api/login.js";
const state = reactive({
TelNum: "",
Password: "",
@@ -120,20 +120,23 @@ onLoad((options) => {
console.log("options", options);
state.id = options.id;
state.pid = options.pid;
- const token = uni.getStorageSync("token");
+ const token =
+ window?.plus?.storage.getItem("token") || uni.getStorageSync("token");
const userInfo = uni.getStorageSync("userInfo");
+ console.log("token", token);
// 已经登录了
- if (token && userInfo) {
+ if (token) {
paintingDetail();
+ getBtngetRules();
}
}
- /*
+ /*
1.先调用options的对应接口
2.判断是是否有没有登录
3如果登录了判断状态去相应页面
4.没有登录让他登录,然后根据状态判断去相应页面
-
+
**/
});
const paintingDetail = async () => {
@@ -199,7 +202,7 @@ const paintingDetail = async () => {
// };
const toCode = () => {
isCode.value = true;
- state.Password= "";
+ state.Password = "";
};
//获取验证码
const obtainCode = async () => {
@@ -237,9 +240,19 @@ const logining = async () => {
uni.setStorageSync("token", res.data.Token);
uni.setStorageSync("userInfo", res.data.AccountInfo);
await paintingDetail();
+ await getBtngetRules();
}
loading.value = false;
};
+const getBtngetRules = async () => {
+ const res = await getRules({});
+ if (res.status === 0) {
+ const ruleBtn = res.data.MyButtonAuths?.map((button) => button.Url) || [];
+ uni.setStorageSync("ruleBtn", ruleBtn);
+ } else {
+ showMessage({ type: "error", message: res.msg });
+ }
+};