lrf402788946 4 년 전
부모
커밋
3913eaf290
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      app/service/wxpay.js

+ 1 - 0
app/service/wxpay.js

@@ -32,6 +32,7 @@ class WxpayService extends CrudService {
   }
   }
 
 
   async cash({ id, money, points }) {
   async cash({ id, money, points }) {
+    money = parseInt(money);
     const token = await this.redis.get(id);
     const token = await this.redis.get(id);
     if (!token) throw new BusinessError(ErrorCode.SERVICE_FAULT, '未找到用户的openid,请重新登陆小程序!');
     if (!token) throw new BusinessError(ErrorCode.SERVICE_FAULT, '未找到用户的openid,请重新登陆小程序!');
     const { openid } = JSON.parse(token);
     const { openid } = JSON.parse(token);