Explorar o código

适配后端接口修改

任一存 %!s(int64=2) %!d(string=hai) anos
pai
achega
34b30a9eff
Modificáronse 2 ficheiros con 3 adicións e 3 borrados
  1. 2 1
      game/src/api.js
  2. 1 2
      game/src/views/ShopView.vue

+ 2 - 1
game/src/api.js

@@ -194,11 +194,12 @@ export async function getScore() {
   }
 }
 export async function addScore(score) {
+  const scoreEncrypted = encodeStr(Base64.encode(score))
   const res = await axios({
     method: 'post',
     url: `${process.env.VUE_APP_DEPLOY_ORIGIN}/api/cms/game/point/add`,
     data: {
-      score,
+      score: scoreEncrypted,
       type: 'game',
       userId: store.state.userInfo.id,
     },

+ 1 - 2
game/src/views/ShopView.vue

@@ -163,8 +163,7 @@ function onClickPrizeItem(prizeItem) {
 
 const recordList = ref([])
 getBonusPointRecord().then((res) => {
-  recordList.value = res.reverse()
-  recordList.value = recordList.value.filter((item) => {
+  recordList.value = res.value.filter((item) => {
     return item.score !== 0 && item.score !== '0' && item.score !== '+0' && item.score !== '-0'
   })
 })