<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"
|
|
export default {
|
setup() {
|
const userStore = useBasicInfoStore()
|
const {proxy} = getCurrentInstance();
|
const state = reactive({
|
count: 100,
|
})
|
|
onMounted(() => {
|
Init();
|
});
|
|
onShow(() => {
|
|
})
|
|
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: 20 rpx;
|
padding: 20 rpx 0 rpx 60 rpx 0 rpx;
|
@extend .center;
|
|
.count {
|
width: calc(100% - 40rpx);
|
padding: 0 rpx 20 rpx;
|
height: 80 rpx;
|
border-bottom: 1px solid #f5f5f5;
|
line-height: 80 rpx;
|
display: flex;
|
justify-content: space-between;
|
}
|
|
.organization {
|
width: 80%;
|
overflow: auto;
|
|
.show {
|
height: 80 rpx;
|
line-height: 80 rpx;
|
|
.info {
|
color: gray;
|
}
|
}
|
|
}
|
}
|
|
|
.submit {
|
width: 80%;
|
overflow: auto;
|
margin-top: 60 rpx;
|
}
|
</style>
|