This commit is contained in:
server
2025-08-15 10:57:26 +08:00
parent 84a12a6d83
commit 8ebcc96407
8 changed files with 57 additions and 21 deletions
@@ -261,9 +261,12 @@
<!--vuex-->
<script type="text/javascript">
console.log(${json(@auth.getPrincipalProperty('birthday'))})
window.sessionStorage.setItem("user",JSON.stringify(${json(@auth.getLogonUser())}))
$.get('/platform/auth/userInfo').then(res=>{
if(res.code===0){
// window.sessionStorage.setItem("user",JSON.stringify(${json(@auth.getLogonUser())}))
window.sessionStorage.setItem("user",JSON.stringify(res.data))
}
})
window.store = new Vuex.Store({
plugins: [
createPersistedState({
@@ -9,7 +9,7 @@ const activity = {
<div style="background-color: #fff; position: relative; margin-bottom: 10px">
<div style="display: flex; justify-content: center; align-items: center;border-bottom: 1px solid var(--border-color-lighter);padding-bottom: 8px">
<div
style="position: relative;flex-shrink: 1;width: 150px; height: 90px;margin-right: 10px; ">
style="position: relative;flex-shrink: 1;width: 150px; height: 90px;margin-right: 10px; ">
<el-image :src="item.cover" alt="" fit="cover"
style="width: 100%; height: 100%; border-radius: 8px;">
<div slot="error" class="image-slot">
@@ -47,11 +47,21 @@ const activity = {
</div>
<el-empty v-if="activityOptions.length === 0" description="暂无活动"></el-empty>
</el-card>
<el-dialog :title="dialogTitle" :visible.sync="visible" width="30%">
<h6>该活动只支持手机端,请扫描二维码!</h6>
<div style="width: 100%;text-align: center">
<qrcode :options="{ width: 400 }" :value="h5url"></qrcode>
</div>
</el-dialog>
</div>
`,
data() {
return {
activityOptions: []
activityOptions: [],
dialogTitle: false,
visible: false,
h5url: null
}
},
methods: {
@@ -63,7 +73,16 @@ const activity = {
})
},
enterActivity(item) {
this.$store.dispatch("pjaxRoute", item.url)
if (item.url) {
this.$store.dispatch("pjaxRoute", item.url)
return
}
this.visible = true
this.dialogTitle = item.name
this.h5url = location.origin + item.h5Url
}
},
created() {
@@ -82,8 +101,8 @@ const activity = {
.home-activity .el-empty {
padding: 40px 0 !important;
}
.home-activity .act-item-tag{
.home-activity .act-item-tag {
position: absolute;
right: 0;
bottom: 0;
@@ -5,7 +5,7 @@ layout("/layouts/platform.html"){
.dashboard-title {
font-size: 22px;
font-weight: 600;
color: #217050;
color: var(--color-primary);
}
.dashboard-cards {
@@ -29,7 +29,7 @@ layout("/layouts/platform.html"){
.statistic-card .statistic-value {
font-size: 30px;
font-weight: 600;
color: #217050;
color: var(--color-primary);
margin-bottom: 10px;
}
@@ -372,7 +372,7 @@ layout("/layouts/platform.html"){
},
legend: { position: "right" },
interactions: [{ type: "element-active" }],
color: ["#217050", "#5fad85"]
color: ["#006db9", "#006db9"]
})
} else {
this.charts.genderChart = new G2Plot.Column("genderChart", {
@@ -384,7 +384,7 @@ layout("/layouts/platform.html"){
},
color: ({ type }) => {
if (type === "男") return "#217050"
return "#5fad85"
return "#006db9"
},
columnWidthRatio: 0.4
})
@@ -412,7 +412,7 @@ layout("/layouts/platform.html"){
range: { alias: "年龄段" },
count: { alias: "人数" }
},
color: "#217050",
color: "#006db9",
xAxis: {
label: {
autoHide: false,
@@ -465,7 +465,7 @@ layout("/layouts/platform.html"){
},
interactions: [{ type: "element-active" }],
legend: { position: "right" },
color: ["#217050", "#5fad85", "#89d0af", "#c2e6d4", "#136343"]
color: ["#1a8cff", "#4da6ff", "#80c0ff", "#b3d9ff", "#006db9"]
})
} else {
this.charts.educationChart = new G2Plot.Column("educationChart", {
@@ -475,7 +475,7 @@ layout("/layouts/platform.html"){
label: {
position: "top"
},
color: "#217050",
color: "#006db9",
xAxis: {
label: {
autoHide: false,
@@ -511,7 +511,7 @@ layout("/layouts/platform.html"){
},
interactions: [{ type: "element-active" }],
legend: { position: "right" },
color: ["#217050", "#5fad85", "#89d0af", "#c2e6d4", "#136343"]
color: ["#1a8cff", "#4da6ff", "#80c0ff", "#b3d9ff", "#006db9"]
})
} else {
this.charts.incomeChart = new G2Plot.Column("incomeChart", {
@@ -555,7 +555,7 @@ layout("/layouts/platform.html"){
legend: {
position: "top-right"
},
color: ["#217050", "#5fad85", "#89d0af", "#c2e6d4", "#136343"],
color: ["#1a8cff", "#4da6ff", "#80c0ff", "#b3d9ff", "#006db9"],
label: {
position: "middle",
layout: [{ type: "interval-adjust-position" }]
@@ -567,7 +567,7 @@ layout("/layouts/platform.html"){
data: processedData,
colorField: "value",
legend: false,
color: ["#e8f5e9", "#c2e6d4", "#89d0af", "#5fad85", "#217050"]
color: ["#1a8cff", "#4da6ff", "#80c0ff", "#b3d9ff", "#006db9"]
})
}