diff --git a/api/modules/user.ts b/api/modules/user.ts index a411c7c..838a0e8 100644 --- a/api/modules/user.ts +++ b/api/modules/user.ts @@ -194,11 +194,11 @@ export async function submitFeedback(data: IFeedbackForm) { * @param orderSn 订单号 * @param productId 产品ID */ -export async function verifyGooglePay(purchaseToken: string, orderSn: string, productId: string) { +export async function verifyGooglePay(productId: number, purchaseToken: string, orderSn: string) { const res = await mainClient.request({ url: 'pay/googlepay/googleVerify', method: 'POST', - data: { purchaseToken, orderSn, productId } + data: { productId, purchaseToken, orderSn } }) return res } @@ -256,13 +256,45 @@ export async function getActivityDescription() { } /** - * 获取充值列表 - */ -export async function getTransactionDetailsList(current: number, limit: number, userId: string,) { - const res = await mainClient.request({ - url: 'common/transactionDetails/getTransactionDetailsList', - method: 'POST', - data: { current, limit, userId, } - }) - return res + * 充值记录列表 + * @param current 当前页码 + * @param limit 每页数量 + * @param userId 用户id + * @return + */ +export async function getTransactionDetailsList(current : number, limit : number, userId : string) { + const res = await mainClient.request({ + url: 'common/transactionDetails/getTransactionDetailsList', + method: 'POST', + data: { current, limit, userId, } + }) + return res +} + +/** + * 获取订单编号 + * @return + */ +export async function getPlaceOrder(data: object) { + + const res = await mainClient.request({ + url: '/book/buyOrder/placeOrder', + method: 'POST', + data: data + }) + return res +} + +/** + * 获取积分数据 + * @return + */ +export async function getPointsData(current : number, limit : number, userId : string,) { + + const res = await mainClient.request({ + url: 'common/jfTransactionDetails/getJfTransactionDetailsList', + method: 'POST', + data: { current, limit, userId, } + }) + return res } \ No newline at end of file diff --git a/pages.json b/pages.json index c090a83..55a7973 100644 --- a/pages.json +++ b/pages.json @@ -79,6 +79,12 @@ "navigationBarTitleText": "%user.virtual%", "navigationStyle": "custom" } + },{ + "path": "pages/user/points/index", + "style": { + "navigationBarTitleText": "%user.points%", + "navigationStyle": "custom" + } }, { "path": "pages/user/myBook/index", "style": { diff --git a/pages/user/index.vue b/pages/user/index.vue index a2a5487..6435da8 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -26,18 +26,22 @@ {{ $t('user.vip') }} - {{ vipTypeDict[vip.type] }}(有效期到 {{ parseTime(vip.endTime, '{y}-{m}-{d}') }}) + {{ vipTypeDict[vip.type] }}(有效期到 + {{ parseTime(vip.endTime, '{y}-{m}-{d}') }}) 办理课程VIP,畅享更多权益 - {{ $t('vip.renewal') }} + {{ $t('vip.renewal') }} {{ $t('vip.openVip') }} - 电子书VIP{{ vipTypeDict[vip.type] }}(有效期到 {{ parseTime(vip.endTime, '{y}-{m}-{d}') }}) + 电子书VIP{{ vipTypeDict[vip.type] }}(有效期到 + {{ parseTime(vip.endTime, '{y}-{m}-{d}') }}) 办理电子书VIP,畅享更多权益 - {{ $t('vip.openVip') }} + {{ $t('vip.openVip') }} @@ -50,14 +54,14 @@ {{ t('global.coin') }} {{userInfo.peanutCoin ?? 1}} - + 积分 {{userInfo.jf ?? 1}} - + 充 值 + + + + + {{$t('order.recharge')}} + + + {{$t('order.rechargeConsumptionList')}} + + {{item.orderType}}{{item.changeAmount}} + {{item.createTime}} + + + + + + + + \ No newline at end of file diff --git a/pages/user/recharge/index.vue b/pages/user/recharge/index.vue index 398b07f..d36cce8 100644 --- a/pages/user/recharge/index.vue +++ b/pages/user/recharge/index.vue @@ -8,8 +8,8 @@ - ¥{{item.money}} - {{item.realMoney}}{{ t('global.coin') }} + ¥{{item.realMoney}} + {{item.money}}{{ t('global.coin') }} 618充值活动 @@ -23,25 +23,26 @@ {{$t('user.paymentMethod')}} - + {{ item.title }} - + - + - + - {{$t('order.readAgree')}}《{{$t('order.valueAddedServices')}}》 + {{$t('order.readAgree')}}《{{$t('order.valueAddedServices')}}》 @@ -61,10 +62,13 @@