mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-27 16:40:50 +08:00
Compare commits
2 Commits
codex/add
...
codex/add-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b4c36c76a | ||
|
|
edfc81aeb0 |
@@ -2,6 +2,20 @@
|
|||||||
<div class="point-mall-page">
|
<div class="point-mall-page">
|
||||||
<p v-if="authState.loggedIn && point !== null">我的积分:{{ point }}</p>
|
<p v-if="authState.loggedIn && point !== null">我的积分:{{ point }}</p>
|
||||||
<p v-else>请先登录以查看积分</p>
|
<p v-else>请先登录以查看积分</p>
|
||||||
|
|
||||||
|
<section class="rules">
|
||||||
|
<h2>积分规则</h2>
|
||||||
|
<ul>
|
||||||
|
<li v-for="(rule, idx) in pointRules" :key="idx">{{ rule }}</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="goods">
|
||||||
|
<h2>积分兑换商品</h2>
|
||||||
|
<ul>
|
||||||
|
<li v-for="(good, idx) in goods" :key="idx">{{ good.name }} - {{ good.cost }} 积分</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -11,6 +25,18 @@ import { authState, fetchCurrentUser } from '~/utils/auth'
|
|||||||
|
|
||||||
const point = ref(null)
|
const point = ref(null)
|
||||||
|
|
||||||
|
const pointRules = [
|
||||||
|
'发帖:每天前两次,每次 30 积分',
|
||||||
|
'评论:每天前四条评论可获 10 积分,你的帖子被评论也可获 10 积分',
|
||||||
|
'帖子被点赞:每次 10 积分',
|
||||||
|
'评论被点赞:每次 10 积分',
|
||||||
|
]
|
||||||
|
|
||||||
|
const goods = [
|
||||||
|
{ name: 'GPT Plus for 1 month', cost: 20000 },
|
||||||
|
{ name: '奶茶', cost: 5000 },
|
||||||
|
]
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
if (authState.loggedIn) {
|
if (authState.loggedIn) {
|
||||||
const user = await fetchCurrentUser()
|
const user = await fetchCurrentUser()
|
||||||
@@ -26,4 +52,9 @@ onMounted(async () => {
|
|||||||
background-color: var(--background-color);
|
background-color: var(--background-color);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rules,
|
||||||
|
.goods {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user