From 85f91fa5705b3af3a261158696bd5464a13f4dff Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 28 Aug 2023 21:03:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E7=AD=89=E7=BA=A7=EF=BC=9A?= =?UTF-8?q?=E6=8E=A5=E5=85=A5=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/member/level.js | 11 +++ pages/user/index.vue | 7 +- pages/users/login/index.vue | 3 +- pages/users/user_vip/index.vue | 141 ++++++++++++++++----------------- 4 files changed, 86 insertions(+), 76 deletions(-) create mode 100644 api/member/level.js diff --git a/api/member/level.js b/api/member/level.js new file mode 100644 index 00000000..2dc5d3af --- /dev/null +++ b/api/member/level.js @@ -0,0 +1,11 @@ +import request from "@/utils/request.js"; + +// 获得会员等级列表 +export function getLevelList() { + return request.get('app-api/member/level/list'); +} + +// 获得会员经验记录分页 +export function getExperienceRecordPage() { + return request.get('app-api/member/experience-record/page'); +} diff --git a/pages/user/index.vue b/pages/user/index.vue index d95d91da..bbf5f43e 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -14,10 +14,9 @@ 请点击登录 {{ userInfo.nickname }} - - - - {{userInfo.vipName || ''}} + + + {{ userInfo.level.name || ''}} diff --git a/pages/users/login/index.vue b/pages/users/login/index.vue index 0293fa7c..b9d4a8f2 100644 --- a/pages/users/login/index.vue +++ b/pages/users/login/index.vue @@ -301,7 +301,8 @@ password: this.password, spread: this.$Cache.get("spread") // TODO 芋艿:后续接入 }).then(({ data }) => { - debugger + // debugger + // TODO 芋艿:refreshToken 机制 this.$store.commit("LOGIN", { 'token': data.accessToken }); diff --git a/pages/users/user_vip/index.vue b/pages/users/user_vip/index.vue index 104c36fb..80503590 100644 --- a/pages/users/user_vip/index.vue +++ b/pages/users/user_vip/index.vue @@ -1,22 +1,24 @@