mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-08 22:51:25 +08:00
经验等级调整
This commit is contained in:
parent
4b5309a21c
commit
338ee9a953
@ -7,6 +7,7 @@
|
||||
>
|
||||
<!-- 用户信息 -->
|
||||
<UserInfo
|
||||
ref="user"
|
||||
:allQuickCommandsLength="allQuickCommandsLength"
|
||||
:allFeaturesLength="allFeaturesLength"
|
||||
/>
|
||||
@ -221,13 +222,17 @@
|
||||
<q-item-section>个性化设置</q-item-section>
|
||||
<q-menu anchor="top end" self="top start">
|
||||
<q-list>
|
||||
<q-item clickable :disable="!isVIP">
|
||||
<q-item clickable :disable="!$refs.user.isVIP">
|
||||
<q-item-section side>
|
||||
<q-icon name="color_lens" />
|
||||
</q-item-section>
|
||||
<q-item-section>主颜色</q-item-section>
|
||||
<q-tooltip>你可以更改界面的主题色,会员限定</q-tooltip>
|
||||
<q-menu v-if="isVIP" nchor="top left" self="bottom end">
|
||||
<q-menu
|
||||
v-if="$refs.user.isVIP"
|
||||
nchor="top left"
|
||||
self="bottom end"
|
||||
>
|
||||
<q-card>
|
||||
<q-color
|
||||
no-header
|
||||
@ -244,7 +249,7 @@
|
||||
</q-card>
|
||||
</q-menu>
|
||||
</q-item>
|
||||
<q-item clickable :disable="!isVIP">
|
||||
<q-item clickable :disable="!$refs.user.isVIP">
|
||||
<q-item-section side>
|
||||
<q-icon name="image" />
|
||||
</q-item-section>
|
||||
@ -252,7 +257,11 @@
|
||||
<q-tooltip
|
||||
>为面板视图设置一张背景图片,会员限定<br />请不要选择尺寸太大的图片,将影响插件载入速度</q-tooltip
|
||||
>
|
||||
<q-menu v-if="isVIP" nchor="top left" self="bottom end">
|
||||
<q-menu
|
||||
v-if="$refs.user.isVIP"
|
||||
nchor="top left"
|
||||
self="bottom end"
|
||||
>
|
||||
<q-card>
|
||||
<q-file
|
||||
dense
|
||||
@ -356,9 +365,6 @@ export default {
|
||||
allFeaturesLength() {
|
||||
return this.configurationPage.activatedQuickCommandFeatureCodes.length;
|
||||
},
|
||||
isVIP() {
|
||||
return utools.getUser().type === "member";
|
||||
},
|
||||
},
|
||||
props: {
|
||||
isTagStared: Boolean,
|
||||
|
@ -49,6 +49,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import levelDetail from "../../js/options/levelDetail.js";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -60,33 +62,7 @@ export default {
|
||||
avatar: "",
|
||||
nickname: "",
|
||||
},
|
||||
levelDetail: [
|
||||
{
|
||||
lv: 1,
|
||||
minExp: 0,
|
||||
upExp: 100,
|
||||
},
|
||||
{
|
||||
lv: 2,
|
||||
minExp: 100,
|
||||
upExp: 200,
|
||||
},
|
||||
{
|
||||
lv: 3,
|
||||
minExp: 300,
|
||||
upExp: 300,
|
||||
},
|
||||
{
|
||||
lv: 4,
|
||||
minExp: 600,
|
||||
upExp: 600,
|
||||
},
|
||||
{
|
||||
lv: 5,
|
||||
minExp: 1200,
|
||||
upExp: 999999,
|
||||
},
|
||||
],
|
||||
levelDetail: levelDetail,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -114,12 +90,14 @@ export default {
|
||||
.filter((x) => this.userInfo.exp > x.minExp)
|
||||
.pop().lv;
|
||||
let currentLevelDetail = this.levelDetail[this.userInfo.level - 1];
|
||||
this.userInfo.process = parseFloat(
|
||||
(
|
||||
(this.userInfo.exp - currentLevelDetail.minExp) /
|
||||
currentLevelDetail.upExp
|
||||
).toFixed(2)
|
||||
);
|
||||
this.userInfo.process = currentLevelDetail.upExp
|
||||
? parseFloat(
|
||||
(
|
||||
(this.userInfo.exp - currentLevelDetail.minExp) /
|
||||
currentLevelDetail.upExp
|
||||
).toFixed(2)
|
||||
)
|
||||
: 1;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
53
src/js/options/levelDetail.js
Normal file
53
src/js/options/levelDetail.js
Normal file
@ -0,0 +1,53 @@
|
||||
const levelDetail = [{
|
||||
lv: 1,
|
||||
minExp: 0,
|
||||
upExp: 50,
|
||||
},
|
||||
{
|
||||
lv: 2,
|
||||
minExp: 50,
|
||||
upExp: 100,
|
||||
},
|
||||
{
|
||||
lv: 3,
|
||||
minExp: 150,
|
||||
upExp: 200,
|
||||
},
|
||||
{
|
||||
lv: 4,
|
||||
minExp: 350,
|
||||
upExp: 350,
|
||||
},
|
||||
{
|
||||
lv: 5,
|
||||
minExp: 700,
|
||||
upExp: 500,
|
||||
},
|
||||
{
|
||||
lv: 6,
|
||||
minExp: 1200,
|
||||
upExp: 700,
|
||||
},
|
||||
{
|
||||
lv: 7,
|
||||
minExp: 1900,
|
||||
upExp: 900,
|
||||
},
|
||||
{
|
||||
lv: 8,
|
||||
minExp: 2800,
|
||||
upExp: 1200,
|
||||
},
|
||||
{
|
||||
lv: 9,
|
||||
minExp: 4000,
|
||||
upExp: 1500,
|
||||
},
|
||||
{
|
||||
lv: 10,
|
||||
minExp: 5500,
|
||||
upExp: 0,
|
||||
}
|
||||
]
|
||||
|
||||
export default levelDetail
|
Loading…
x
Reference in New Issue
Block a user