更新页面

This commit is contained in:
2023-07-02 00:52:42 +08:00
parent 95ea74f1d9
commit 4463b1fe02
3 changed files with 47 additions and 16 deletions

View File

@@ -241,7 +241,7 @@ export default {
}, },
rules: { rules: {
username: [ username: [
// required规则trigger:失去焦点触发 // required规则o:失去焦点触发
{required: true, message: "请输入用户名", trigger: "blur"}, {required: true, message: "请输入用户名", trigger: "blur"},
], ],
password: [{required: true, message: "请输入密码", trigger: "blur"}], password: [{required: true, message: "请输入密码", trigger: "blur"}],

View File

@@ -28,7 +28,7 @@
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="always" style="font-size: 18px; <el-card shadow="always" style="font-size: 18px;
text-align:left;background-color: #fddbb8; text-align:left;background-color: #f4ffed;
border-color: rgba(255,243,232,0.89);border-radius:10px"> border-color: rgba(255,243,232,0.89);border-radius:10px">
<span style="font-size:20px;font-weight:550">HelloGitHub 月刊</span> <span style="font-size:20px;font-weight:550">HelloGitHub 月刊</span>
分享 GitHub 上有趣入门级的开源项目每月 28 号发布最新一期内容包 分享 GitHub 上有趣入门级的开源项目每月 28 号发布最新一期内容包
@@ -44,7 +44,7 @@
<el-card shadow="always" class="card_style"> <el-card shadow="always" class="card_style">
<span style="font-size:25px;font-weight:540;color: #676767">已发布</span> <span style="font-size:25px;font-weight:540;color: #676767">已发布</span>
<br/><br/> <br/><br/>
<span style="font-size:55px;font-weight:650;color: #3d8bff">87</span> <span style="font-size:55px;font-weight:650;color: #3d8bff">{{ProjectNum}}</span>
<br/><br/> <br/><br/>
<span style="font-size:25px;font-weight:540;color: #676767"></span> <span style="font-size:25px;font-weight:540;color: #676767"></span>
<br/> <br/>
@@ -52,26 +52,27 @@
<div style="border-top:1.5px solid #ababab;border-bottom:1.5px solid #ababab;"> <div style="border-top:1.5px solid #ababab;border-bottom:1.5px solid #ababab;">
<br/> <br/>
<span style="font-size:18px;font-weight:540;color: #676767">选择期数: &nbsp;</span> <span style="font-size:18px;font-weight:540;color: #676767">选择期数: &nbsp;</span>
<el-select v-model="value" filterable placeholder="期数" style="width:80px;"> <el-select clearable v-model="selectProNum" filterable placeholder="期数" style="width:80px;">
<el-option <el-option
v-for="item in options" v-for="item in ProjectNum"
:key="item.value" :key="item"
:label="item.label" :label="item"
:value="item.value" :value="item"
> >
</el-option> </el-option>
</el-select> </el-select>
<br/><br/> <br/><br/>
</div> </div>
<br/> <br/>
<el-button type="info">阅读该期</el-button> <el-button type="info" @click="getProjectNum()">阅读该期</el-button>
<br/><br/>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-card shadow="always" class="card_style"> <el-card shadow="always" class="card_style">
<span style="font-size:25px;font-weight:540;color: #676767">共包含</span> <span style="font-size:25px;font-weight:540;color: #676767">共包含</span>
<br/><br/> <br/><br/>
<span style="font-size:55px;font-weight:650;color: #3d8bff">21</span> <span style="font-size:55px;font-weight:650;color: #3d8bff">17</span>
<br/><br/> <br/><br/>
<span style="font-size:25px;font-weight:540;color: #676767"></span> <span style="font-size:25px;font-weight:540;color: #676767"></span>
<br/> <br/>
@@ -92,13 +93,14 @@
</div> </div>
<br/> <br/>
<el-button type="info">查看分类</el-button> <el-button type="info">查看分类</el-button>
<br/><br/>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-card shadow="always" class="card_style" > <el-card shadow="always" class="card_style" >
<span style="font-size:25px;font-weight:540;color: #676767">项目数</span> <span style="font-size:25px;font-weight:540;color: #676767">项目数</span>
<br/><br/> <br/><br/>
<span style="font-size:55px;font-weight:650;color: #3d8bff">230</span> <span style="font-size:55px;font-weight:650;color: #3d8bff">{{ProjectNum}}</span>
<br/><br/> <br/><br/>
<span style="font-size:25px;font-weight:540;color: #676767"></span> <span style="font-size:25px;font-weight:540;color: #676767"></span>
<br/> <br/>
@@ -109,6 +111,7 @@
<br/><br/> <br/><br/>
</div> </div>
<el-button type="info" style="margin-top:37px">推荐项目</el-button> <el-button type="info" style="margin-top:37px">推荐项目</el-button>
<br/><br/>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
@@ -135,12 +138,38 @@
</template> </template>
<script> <script>
import axios from 'axios'
import Vue from "vue";
export default { export default {
name: "MonthlyComponent", name: "MonthlyComponent",
data(){
return{
// 项目总数
ProjectNum:null,
selectProNum:null,
};
},
// 初始化渲染页面
mounted(){
this.getProjectNum();
},
methods: { methods: {
goBack() { goBack() {
window.history.go(-1); window.history.go(-1);
},
getProjectNum(){
var that = this;
axios({
method: 'post',
url: 'http://localhost:8082/helloGithub_war_exploded/countNum',
params: {
} }
}).then((res)=>{
that.ProjectNum = parseInt(res.data);
that.selectProNum = that.ProjectNum;
// console.log(res.data);
})
},
} }
} }
</script> </script>
@@ -170,10 +199,10 @@ export default {
background-image: url("../../src/assets/images/美人.jpg"); background-image: url("../../src/assets/images/美人.jpg");
} }
.card_style{ .card_style{
height:385px; height:390px;
font-size: 18px; font-size: 18px;
background-color: #fde5da; background-color: #ffffff;
border-color: rgba(255,243,232,0.89); border-color: rgba(209, 225, 189, 0.89);
text-align: center; text-align: center;
border-radius:10px; border-radius:10px;
} }

View File

@@ -33,9 +33,11 @@ export default {
methods: { methods: {
goBack() { goBack() {
window.history.go(-1); window.history.go(-1);
},
} }
} }
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">