fix
This commit is contained in:
parent
d10f2b6c1d
commit
487f7f7e47
22
src/App.vue
22
src/App.vue
@ -12,16 +12,16 @@ const loading = ref(false);
|
|||||||
export default {
|
export default {
|
||||||
onLaunch: function () {},
|
onLaunch: function () {},
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
console.log('2222222')
|
console.log("2222222");
|
||||||
// const token = window?.plus?.storage.getItem("token");
|
// const token = window?.plus?.storage.getItem("token");
|
||||||
// uni.setStorageSync("token", token);
|
// uni.setStorageSync("token", token);
|
||||||
// console.log("App Show", uni.getStorageSync("token"));
|
// console.log("App Show", uni.getStorageSync("token"));
|
||||||
const params = new URLSearchParams(window.location.search); //属性包含当前 URL 的查询字符串部分
|
const params = new URLSearchParams(window.location.search); //属性包含当前 URL 的查询字符串部分
|
||||||
state.id = params.get("id");
|
state.id = params.get("id");
|
||||||
state.pid = params.get("pid");
|
state.pid = params.get("pid");
|
||||||
console.log(state)
|
console.log(state);
|
||||||
|
|
||||||
const paintingDetail = async () => {
|
const paintingDetail = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
console.log("state", state);
|
console.log("state", state);
|
||||||
const res = await pbDetail({
|
const res = await pbDetail({
|
||||||
@ -60,11 +60,16 @@ const paintingDetail = async () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.setStorageSync('data',res.data)
|
uni.setStorageSync("data", res.data);
|
||||||
console.log()
|
console.log();
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:
|
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: () => {
|
success: () => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
@ -77,9 +82,8 @@ const paintingDetail = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
paintingDetail()
|
paintingDetail();
|
||||||
|
|
||||||
},
|
},
|
||||||
onHide: function () {
|
onHide: function () {
|
||||||
console.log("App Hide");
|
console.log("App Hide");
|
||||||
|
@ -18,10 +18,12 @@ const request = new Request({
|
|||||||
? "application/x-www-form-urlencoded"
|
? "application/x-www-form-urlencoded"
|
||||||
: "application/json";
|
: "application/json";
|
||||||
|
|
||||||
const token =
|
const token = "";
|
||||||
window?.plus?.webview.getWebviewById("wv").tokenScan ||
|
try {
|
||||||
uni.getStorageSync("store-token") ||
|
token = plus?.webview.getWebviewById("wv").tokenScan;
|
||||||
"";
|
} catch (e) {
|
||||||
|
token = uni.getStorageSync("store-token");
|
||||||
|
}
|
||||||
console.log("tokenServer", token);
|
console.log("tokenServer", token);
|
||||||
if (config.isFormData) {
|
if (config.isFormData) {
|
||||||
config.headers["Content-Type"] = "multipart/form-data";
|
config.headers["Content-Type"] = "multipart/form-data";
|
||||||
|
Loading…
Reference in New Issue
Block a user