diff --git a/src/App.vue b/src/App.vue
index 3352c54..0b72a76 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -16,74 +16,74 @@ export default {
// const token = window?.plus?.storage.getItem("token");
// uni.setStorageSync("token", token);
// console.log("App Show", uni.getStorageSync("token"));
- const params = new URLSearchParams(window.location.search); //属性包含当前 URL 的查询字符串部分
- state.id = params.get("id");
- state.pid = params.get("pid");
- console.log(state);
+ // const params = new URLSearchParams(window.location.search); //属性包含当前 URL 的查询字符串部分
+ // state.id = params.get("id");
+ // state.pid = params.get("pid");
+ // console.log(state);
- const paintingDetail = async () => {
- loading.value = true;
- console.log("state", state);
- const res = await pbDetail({
- id: state.id,
- pid: state.pid,
- });
- if (res.status === 0) {
- console.log("成功拉1");
- state.boxRelBucketStatus = res.data.boxRelBucketStatus;
- console.log("boxRelBucketStatus", state.boxRelBucketStatus);
- if (res.data.pbStatus == 1) {
- console.log("成功拉2");
- uni.navigateTo({
- url: "/pages/index/index?id=" + state.id + "&pid=" + state.pid,
- success: () => {
- loading.value = false;
- },
- fail: () => {
- loading.value = false;
- showMessage({ type: "default", message: "跳转失败" });
- },
- });
- } else {
- if (
- res.data.boxRelBucketStatus == 3 &&
- res.data.locateAddress == "公司内"
- ) {
- uni.navigateTo({
- url: "/pages/painting/index?id=" + state.id + "&pid=" + state.pid,
- success: () => {
- loading.value = false;
- },
- fail: () => {
- loading.value = false;
- showMessage({ type: "default", message: "跳转失败" });
- },
- });
- } else {
- uni.setStorageSync("data", res.data);
- console.log();
- uni.navigateTo({
- url:
- "/pages/detail/index?id=" +
- state.id +
- "&pid=" +
- state.pid +
- "&boxRelBucketStatus=" +
- state.boxRelBucketStatus,
+ // const paintingDetail = async () => {
+ // loading.value = true;
+ // console.log("state", state);
+ // const res = await pbDetail({
+ // id: state.id,
+ // pid: state.pid,
+ // });
+ // if (res.status === 0) {
+ // console.log("成功拉1");
+ // state.boxRelBucketStatus = res.data.boxRelBucketStatus;
+ // console.log("boxRelBucketStatus", state.boxRelBucketStatus);
+ // if (res.data.pbStatus == 1) {
+ // console.log("成功拉2");
+ // uni.navigateTo({
+ // url: "/pages/index/index?id=" + state.id + "&pid=" + state.pid,
+ // success: () => {
+ // loading.value = false;
+ // },
+ // fail: () => {
+ // loading.value = false;
+ // showMessage({ type: "default", message: "跳转失败" });
+ // },
+ // });
+ // } else {
+ // if (
+ // res.data.boxRelBucketStatus == 3 &&
+ // res.data.locateAddress == "公司内"
+ // ) {
+ // uni.navigateTo({
+ // url: "/pages/painting/index?id=" + state.id + "&pid=" + state.pid,
+ // success: () => {
+ // loading.value = false;
+ // },
+ // fail: () => {
+ // loading.value = false;
+ // showMessage({ type: "default", message: "跳转失败" });
+ // },
+ // });
+ // } else {
+ // uni.setStorageSync("data", res.data);
+ // console.log();
+ // uni.navigateTo({
+ // url:
+ // "/pages/detail/index?id=" +
+ // state.id +
+ // "&pid=" +
+ // state.pid +
+ // "&boxRelBucketStatus=" +
+ // state.boxRelBucketStatus,
- success: () => {
- loading.value = false;
- },
- fail: () => {
- loading.value = false;
- showMessage({ type: "default", message: "跳转失败" });
- },
- });
- }
- }
- }
- };
- paintingDetail();
+ // success: () => {
+ // loading.value = false;
+ // },
+ // fail: () => {
+ // loading.value = false;
+ // showMessage({ type: "default", message: "跳转失败" });
+ // },
+ // });
+ // }
+ // }
+ // }
+ // };
+ // paintingDetail();
},
onHide: function () {
console.log("App Hide");
diff --git a/src/pages/detail/index.vue b/src/pages/detail/index.vue
index 9b31f37..e36e18b 100644
--- a/src/pages/detail/index.vue
+++ b/src/pages/detail/index.vue
@@ -21,12 +21,18 @@
>
画筒号:{{ state.data.pid }}
所在位置:{{ state.data.locateAddress }}
@@ -34,7 +40,10 @@
画家:{{ state.data.drawerName }}
预览图:
-
+
@@ -64,7 +73,8 @@
throttleTime="5"
@click="backScan"
v-if="
- (state.data.boxRelBucketStatus == 2 || state.data.boxRelBucketStatus == 4) &&
+ (state.data.boxRelBucketStatus == 2 ||
+ state.data.boxRelBucketStatus == 4) &&
runTimeEnv()
"
>返回继续扫码 {
uni.setNavigationBarTitle({
@@ -106,28 +116,28 @@ onLoad((options) => {
if (token) {
document.querySelector(".uni-page-head-hd").style.display = "none";
}
- // state.id = options.id;
- // state.pid = options.pid;
- // state.boxRelBucketStatus = options.boxRelBucketStatus;
- // paintingDetail();
- state.data = uni.getStorageSync('data')
+ state.id = options.id;
+ state.pid = options.pid;
+ state.boxRelBucketStatus = options.boxRelBucketStatus;
+ paintingDetail();
+ state.data = uni.getStorageSync("data");
getBtngetRules();
- console.log('state.data',state.data)
-});
-// const paintingDetail = async () => {
-// loading.value = true;
-// const res = await pbDetail({
-// id: state.id,
-// pid: state.pid,
-// });
-// if (res.status === 0) {
-// state.drawName = res.data.drawName;
-// state.drawerName = res.data.drawerName;
-// state.drawThumbnail = res.data.drawThumbnail;
-// state.locateAddress = res.data.locateAddress;
-// state.boxUid = res.data.boxUid;
-// }
-// };
+ console.log("state.data", state.data);
+});
+const paintingDetail = async () => {
+ loading.value = true;
+ const res = await pbDetail({
+ id: state.id,
+ pid: state.pid,
+ });
+ if (res.status === 0) {
+ state.drawName = res.data.drawName;
+ state.drawerName = res.data.drawerName;
+ state.drawThumbnail = res.data.drawThumbnail;
+ state.locateAddress = res.data.locateAddress;
+ state.boxUid = res.data.boxUid;
+ }
+};
const doneSet = async () => {
loading.value = true;
const res = await outbound({
diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue
index 06ede8d..4a26403 100644
--- a/src/pages/login/index.vue
+++ b/src/pages/login/index.vue
@@ -117,7 +117,6 @@ const isCode = ref(false);
const haveCode = ref(false);
onLoad((options) => {
if (options.id && options.pid) {
-
state.id = options.id;
state.pid = options.pid;
// 已经登录了
@@ -148,12 +147,10 @@ const paintingDetail = async () => {
pid: state.pid,
});
if (res.status === 0) {
-
state.boxRelBucketStatus = res.data.boxRelBucketStatus;
console.log("boxRelBucketStatus", state.boxRelBucketStatus);
if (res.data.pbStatus == 1) {
-
- uni.navigateTo({
+ uni.redirectTo({
url: "/pages/index/index?id=" + state.id + "&pid=" + state.pid,
success: () => {
loading.value = false;
@@ -168,7 +165,7 @@ const paintingDetail = async () => {
res.data.boxRelBucketStatus == 3 &&
res.data.locateAddress == "公司内"
) {
- uni.navigateTo({
+ uni.redirectTo({
url: "/pages/painting/index?id=" + state.id + "&pid=" + state.pid,
success: () => {
loading.value = false;
@@ -179,10 +176,15 @@ const paintingDetail = async () => {
},
});
} else {
- uni.setStorageSync('data',res.data)
- uni.navigateTo({
+ uni.setStorageSync("data", res.data);
+ uni.redirectTo({
url:
- "/pages/detail/index?id="+ state.id + "&pid=" + state.pid+'&boxRelBucketStatus='+state.boxRelBucketStatus,
+ "/pages/detail/index?id=" +
+ state.id +
+ "&pid=" +
+ state.pid +
+ "&boxRelBucketStatus=" +
+ state.boxRelBucketStatus,
success: () => {
loading.value = false;
},