This commit is contained in:
Aiden 2024-10-21 14:48:25 +08:00
parent 373f1a4f2b
commit 887c9087f1
4 changed files with 34 additions and 14 deletions

View File

@ -3,10 +3,6 @@ export default {
onLaunch: function () {}, onLaunch: function () {},
onShow: function () { onShow: function () {
console.log("App Show"); console.log("App Show");
const token = window?.plus?.storage.getItem("token");
if (token) {
document.querySelector(".uni-page-head-hd").style.display = "none";
}
}, },
onHide: function () { onHide: function () {
console.log("App Hide"); console.log("App Hide");

View File

@ -101,6 +101,10 @@ onShow(() => {
}); });
}); });
onLoad((options) => { onLoad((options) => {
const token = window?.plus?.storage.getItem("token");
if (token) {
document.querySelector(".uni-page-head-hd").style.display = "none";
}
state.id = options.id; state.id = options.id;
state.pid = options.pid; state.pid = options.pid;
state.boxRelBucketStatus = options.boxRelBucketStatus; state.boxRelBucketStatus = options.boxRelBucketStatus;

View File

@ -8,7 +8,7 @@
class="login-input" class="login-input"
placeholder="画家姓名/画作名称" placeholder="画家姓名/画作名称"
v-model="state.searchValue" v-model="state.searchValue"
style="flex: 1; margin-right: 10rpx;height: 80rpx;" style="flex: 1; margin-right: 10rpx; height: 80rpx"
clearable clearable
> >
</up-input> </up-input>
@ -28,18 +28,31 @@
> >
</view> </view>
<up-list @scrolltolower="scrolltolower" style="height: 1120rpx"> <up-list @scrolltolower="scrolltolower" style="height: 1120rpx">
<span > <span>
<up-image v-if="showNoResultImage" src="../../static/empty.png" width="100px" height="100px" <up-image
style="margin-left: 240rpx;margin-top: 200rpx;margin-bottom: 20px;"> v-if="showNoResultImage"
</up-image> src="../../static/empty.png"
<span v-if="showNoResultImage" style="font-weight: bold;color: #BABABA;margin-left: 280rpx;margin-top: 20rpx;">暂无画作</span> width="100px"
height="100px"
style="margin-left: 240rpx; margin-top: 200rpx; margin-bottom: 20px"
>
</up-image>
<span
v-if="showNoResultImage"
style="
font-weight: bold;
color: #bababa;
margin-left: 280rpx;
margin-top: 20rpx;
"
>暂无画作</span
>
</span> </span>
<up-list-item <up-list-item
class="painting-box" class="painting-box"
v-for="(painting, index) in state.tableData" v-for="(painting, index) in state.tableData"
:key="index" :key="index"
> >
<span style="display: flex; align-items: center; position: relative"> <span style="display: flex; align-items: center; position: relative">
<up-image <up-image
:show-loading="true" :show-loading="true"
@ -76,7 +89,6 @@
</span> </span>
</up-list-item> </up-list-item>
</up-list> </up-list>
</view> </view>
</view> </view>
<view class="button-container"> <view class="button-container">
@ -111,7 +123,7 @@ import { closeWebview, hasPermission } from "../../../utils/index";
const { showMessage } = useToast(); const { showMessage } = useToast();
const loading = ref(false); const loading = ref(false);
const showNoResultImage = ref(false) const showNoResultImage = ref(false);
const isButtonDisabled = ref(false); const isButtonDisabled = ref(false);
const buttonText = ref("确认"); const buttonText = ref("确认");
const state = reactive({ const state = reactive({
@ -124,6 +136,10 @@ const state = reactive({
searchValue: "", searchValue: "",
}); });
onLoad((options) => { onLoad((options) => {
const token = window?.plus?.storage.getItem("token");
if (token) {
document.querySelector(".uni-page-head-hd").style.display = "none";
}
state.id = options.id; state.id = options.id;
state.pid = options.pid; state.pid = options.pid;
paintingList(); paintingList();
@ -162,7 +178,7 @@ const paintingList = async (param) => {
showNoResultImage.value = false; showNoResultImage.value = false;
} else { } else {
state.tableData = []; state.tableData = [];
showNoResultImage.value = true; showNoResultImage.value = true;
showMessage({ type: "error", message: "查询失败,暂无画作!" }); showMessage({ type: "error", message: "查询失败,暂无画作!" });
} }
} else { } else {

View File

@ -69,6 +69,10 @@ const state = reactive({
containerUid: "", containerUid: "",
}); });
onLoad((options) => { onLoad((options) => {
const token = window?.plus?.storage.getItem("token");
if (token) {
document.querySelector(".uni-page-head-hd").style.display = "none";
}
state.id = options.id; state.id = options.id;
state.pid = options.pid; state.pid = options.pid;
bindShelfHole(); bindShelfHole();