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