第二版页面样式修改

This commit is contained in:
THK3121 2023-08-19 09:32:25 +08:00
commit 708122d222
3 changed files with 660 additions and 702 deletions

File diff suppressed because it is too large Load Diff

View File

@ -75,8 +75,10 @@
</view>
</block>
</view>
<view class="log_out" v-if="$store.state.app.token" @click="logout">退出登录</view>
<view class="log_out" v-if="$store.state.app.token" @click="modelShow=true">退出登录</view>
<view class="log_out" v-else @click="login">登录账号</view>
<u-modal :show="modelShow" title="警告" content='确定要退出登录吗' closeOnClickOverlay showCancelButton @close="modelShow=false" @cancel="modelShow=false" @confirm="logout"></u-modal>
<!-- <tabbar></tabbar> -->
</view>
</template>
@ -96,6 +98,7 @@
return {
myOaData: myOaData,
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
modelShow: false
}
},
onReady() {
@ -107,6 +110,9 @@
onShow() {
this.getOaUserInfo();
},
onHide() {
this.modelShow = false;
},
computed: {
eyeType() {
return this.$store.state.config.eyeType;
@ -124,19 +130,19 @@
},
logout() {
let that = this;
uni.showModal({
content: '确定要退出登录吗',
success: (e) => {
if (e.confirm) {
// uni.showModal({
// content: '退',
// success: (e) => {
// if (e.confirm) {
uni.navigateTo({
url: '/pages/oaLogin/oaLogin?clear='+true,
success() {
that.$store.commit('CLEAR');
}
})
}
}
})
// }
// }
// })
},
async getOaUserInfo() {
const res = await userInfo();

View File

@ -32,7 +32,10 @@
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
-->
<u-sticky bgColor="#0022C7" v-if="task_id>0&& !is_admin">
<u-tabs :list="tabLists" @click="changeCurrent" lineColor='white' :scrollable="false" lineWidth='40'
inactiveStyle='color:white' activeStyle="color:white"></u-tabs>
</u-sticky>
<view class="personnel_list">
<view class="card" v-for="(item, index) in list" :key="item.id">
<view class="card_head">
@ -120,7 +123,6 @@
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
<mybtn text="信息登记" v-if="showView" @click="navTo('/subpkg/newArchives/newArchives')"></mybtn>
</view>
</template>
@ -142,6 +144,12 @@
task_id: -1,
is_admin: false,
list: [],
current: 0,
tabLists: [{
name: '未更新',
}, {
name: '已更新'
}],
loadConfig: {
page: 1,
limit: 15,
@ -167,7 +175,7 @@
title: '任务:信息更新'
})
}
this.loadInformationList();
this.initLoad();
uni.$on('loadArchives', this.initLoad);
},
onShow() {
@ -201,7 +209,7 @@
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
this.is_admin ? null : await this.loadInformationList();
await this.loadInformationList();
uni.stopPullDownRefresh();
},
async loadInformationList() {
@ -209,14 +217,19 @@
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = {};
if (this.is_admin) res = await taskInformationgist({
id: this.task_id
});
else res = await informationList({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
user_id: that.user_id
})
if (this.is_admin) {
res = await taskInformationgist({
id: this.task_id
});
}
else {
res = await informationList({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
user_id: that.user_id,
is_update: this.current
})
}
this.loadConfig.status = "loadmore"
if (res.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
@ -224,7 +237,11 @@
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data];
}
},
changeCurrent(e) {
this.current = e.index;
this.initLoad();
}
},
onPullDownRefresh() {
this.initLoad();