From df103e0b755a7e1f54092009594132040d5d9b2a Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Tue, 11 Jun 2024 00:00:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=8B=E6=9C=BA=E7=AB=AF?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/user/userApi.js | 27 +++++++++++++++++++++++++++ components/my/my-person.vue | 11 +++++++++-- constant/url.js | 2 +- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/api/user/userApi.js b/api/user/userApi.js index 8afc5ed..1d2102c 100644 --- a/api/user/userApi.js +++ b/api/user/userApi.js @@ -97,6 +97,33 @@ export function sendSmsCode(_link, _that) { }) } +/** + * 查询用户积分信息 + * @param {Object} _objData + */ +export function queryUserIntegral(_objData) { + return new Promise((resolve, reject) => { + request({ + url: url.queryAppUserIntegral, + method: "GET", + data: _objData, //动态数据 + success: function(res) { + let _json = res.data; + if (_json.code == 0) { + //成功情况下跳转 + let _integral = _json.data; + resolve(_integral); + return; + } + reject(); + }, + fail: function(e) { + reject(); + } + }); + }) +} + /** * 查询用户账户信息 * @param {Object} _objData diff --git a/components/my/my-person.vue b/components/my/my-person.vue index 1b876d9..1e81fdb 100644 --- a/components/my/my-person.vue +++ b/components/my/my-person.vue @@ -55,7 +55,7 @@ const factory = context.factory; //获取app实例 const constant = context.constant; import conf from '@/conf/config.js'; - import {queryOwnerAccount} from '@/api/user/userApi.js'; + import {queryOwnerAccount,queryUserIntegral} from '@/api/user/userApi.js'; import { getCouponUsers } from '../../api/fee/feeApi.js'; @@ -199,7 +199,14 @@ }); }, loadUserIntegral:function(){ - + let _that =this; + this.inter = 0; + queryUserIntegral({ + page:1, + row:1, + }).then(_data=>{ + _that.inter = _data.integral + }) }, showLongModel: function() { this.vc.navigateTo({ diff --git a/constant/url.js b/constant/url.js index 9c498e0..7f530c5 100644 --- a/constant/url.js +++ b/constant/url.js @@ -246,7 +246,7 @@ export default { appEditSelfCarNum: baseUrl+"app/owner.appEditSelfCarNum", appSaveMemberCar: baseUrl+"app/owner.appSaveMemberCar", appDeleteMemberCar: baseUrl+"app/owner.appDeleteMemberCar", - + queryAppUserIntegral: baseUrl+"app/integral.queryAppUserIntegral",