<template>
|
<view class="content">
|
<view class="card">
|
<view class="count">
|
<text>学校信息设置</text>
|
<text style="color: gray;">剩余修改次数<text style="color:#3c9cff"> {{ count }} </text>次</text>
|
</view>
|
<view class="organization">
|
<view class="show" style="margin-top: 40rpx;">
|
<text>学校:</text><text class="info">{{ userStore.schoolName }}</text>
|
</view>
|
<view class="show">
|
<text>学院:</text><text class="info">{{ userStore.collegeName }}</text>
|
</view>
|
<view class="show">
|
<text>专业:</text><text class="info">{{ userStore.majorName }}</text>
|
</view>
|
</view>
|
<view class="submit" v-if="count > 0">
|
<u-button size="large" type="primary" shape="circle" @click="submit">修改</u-button>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
import { ref, reactive, toRefs, onMounted, getCurrentInstance } from "vue";
|
import { onLoad, onShow } from "@dcloudio/uni-app";
|
import { useBasicInfoStore } from "../../store/basicInfo"
|
import { GetVIPOrganization } from "../../apis/api"
|
export default {
|
setup() {
|
const userStore = useBasicInfoStore()
|
const { proxy } = getCurrentInstance();
|
const state = reactive({
|
count: 100,
|
})
|
|
onMounted(() => {
|
Init();
|
});
|
|
onShow(() => {
|
GetVIPOrganization(userStore.userinfo.id).then((res) => {
|
state.count = state.count - res.updatecount
|
})
|
})
|
|
const Init = () => {
|
|
}
|
|
|
const submit = () => {
|
userStore.school = null
|
userStore.college = null
|
userStore.major = null
|
uni.navigateTo({ url: '/pages/index/index' })
|
}
|
|
|
|
|
return { ...toRefs(state), userStore, submit }
|
}
|
}
|
|
|
|
</script>
|
|
<style scoped lang="scss">
|
.center {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
}
|
|
.content {
|
@extend .center;
|
height: 100vh;
|
width: 100%;
|
background-color: #f5f5f5;
|
}
|
|
.card {
|
width: 95%;
|
//height: 15vh;
|
overflow: auto;
|
border-radius: 10px;
|
background-color: #fff;
|
margin-top: 20rpx;
|
padding: 20rpx 0rpx 60rpx 0rpx;
|
@extend .center;
|
|
.count {
|
width: calc(100% - 40rpx);
|
padding: 0rpx 20rpx;
|
height: 80rpx;
|
border-bottom: 1px solid #f5f5f5;
|
line-height: 80rpx;
|
display: flex;
|
justify-content: space-between;
|
}
|
|
.organization {
|
width: 80%;
|
overflow: auto;
|
|
.show {
|
height: 80rpx;
|
line-height: 80rpx;
|
|
.info {
|
color: gray;
|
}
|
}
|
|
}
|
}
|
|
|
.submit {
|
width: 80%;
|
overflow: auto;
|
margin-top: 60rpx;
|
}
|
</style>
|