From 593887ae2e3634a1ee8bd2d9903bfd6eeeafb9ea Mon Sep 17 00:00:00 2001 From: Ankkaya Date: Fri, 30 Aug 2024 17:06:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=A7=AF=E5=88=86)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- androidPrivacy.json | 6 +- manifest.json | 12 +- pages.json | 21 +- pages/index/login.vue | 11 +- pages/index/product.vue | 22 +- pages/user/point/buy.vue | 25 +- pages/user/point/result.vue | 226 ++++++++++++++++ pages/user/wallet/money.vue | 4 +- pages/user/wallet/withdraw.vue | 13 +- pages/user/wallet/withdrawLog.vue | 416 ++++++++++++++++++++++++++++++ peach/api/pay/point.js | 9 + peach/api/pay/wallet.js | 11 + peach/request/index.js | 2 +- 13 files changed, 759 insertions(+), 19 deletions(-) create mode 100644 pages/user/point/result.vue create mode 100644 pages/user/wallet/withdrawLog.vue diff --git a/androidPrivacy.json b/androidPrivacy.json index 1705916..0d726ca 100644 --- a/androidPrivacy.json +++ b/androidPrivacy.json @@ -1,3 +1,3 @@ -{ - "prompt": "template" -} +{ + "prompt" : "template" +} diff --git a/manifest.json b/manifest.json index fdfc1b2..ee0ec9a 100644 --- a/manifest.json +++ b/manifest.json @@ -22,7 +22,8 @@ /* 模块配置 */ "modules" : { "Barcode" : {}, - "Camera" : {} + "Camera" : {}, + "Payment" : {} }, /* 应用发布信息 */ "distribute" : { @@ -52,7 +53,14 @@ }, /* SDK配置 */ "sdkConfigs" : { - "ad" : {} + "ad" : {}, + "payment" : { + "weixin" : { + "__platform__" : [ "android" ], + "appid" : "", + "UniversalLinks" : "" + } + } }, "icons" : { "android" : { diff --git a/pages.json b/pages.json index ee3cce9..c8dc2d2 100644 --- a/pages.json +++ b/pages.json @@ -126,6 +126,15 @@ "auth": true } }, + { + "path": "wallet/withdrawLog", + "style": { + "navigationBarTitleText": "提现记录" + }, + "meta": { + "auth": true + } + }, { "path": "point/buy", "style": { @@ -153,6 +162,15 @@ "meta": { "auth": true } + }, + { + "path": "point/result", + "style": { + "navigationBarTitleText": "支付结果" + }, + "meta": { + "auth": true + } } ] }, @@ -162,7 +180,8 @@ { "path": "manageGoods", "style": { - "navigationBarTitleText": "商品管理" + "navigationBarTitleText": "商品管理", + "enablePullDownRefresh": true }, "meta": { "auth": false diff --git a/pages/index/login.vue b/pages/index/login.vue index fddd5cc..cf7e68f 100644 --- a/pages/index/login.vue +++ b/pages/index/login.vue @@ -76,8 +76,8 @@ const state = ref({ code: '', }, rules: { - mobile, code, + mobile, }, inputStyle: { backgroundColor: '#ECECEC', @@ -102,7 +102,7 @@ async function smsLoginSubmit() { setTimeout(() => { state.value.isShaking = false }, 1000) - peach.$helper.toast('请勾选同意') + peach.$helper.toast('请勾选同意商家入驻协议') return } @@ -117,12 +117,9 @@ async function smsLoginSubmit() { border-radius: 41rpx; padding: 0 10rpx; } - .is-focused { - ::v-deep .content-clear-icon { - .uniui-clear { - color: red !important; - } + .uniui-clear { + color: red !important; } } } diff --git a/pages/index/product.vue b/pages/index/product.vue index e934724..db7334f 100644 --- a/pages/index/product.vue +++ b/pages/index/product.vue @@ -9,7 +9,21 @@ color="black" :leftIcon="''" > - + + + + + + { // 下拉刷新 onPullDownRefresh(() => { resetPagination(state.value.pagination) + state.value.searchContent = '' getList() setTimeout(function () { uni.stopPullDownRefresh() @@ -136,6 +153,9 @@ onPullDownRefresh(() => { diff --git a/pages/user/wallet/money.vue b/pages/user/wallet/money.vue index 6c9f05a..977bf33 100644 --- a/pages/user/wallet/money.vue +++ b/pages/user/wallet/money.vue @@ -59,7 +59,7 @@ - {{ peach.$helper.timeFormat(state.createTime, 'yyyy-mm-dd hh:MM:ss') }} + {{ peach.$helper.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }} @@ -159,7 +159,7 @@ async function getLogList() { // 钱包统计 async function getStatistic() { - let res = await PayWalletApi.statistics({ + let { data, code } = await PayWalletApi.statistics({ createTime: [state.date[0] + ' 00:00:00', state.date[1] + ' 23:59:59'], }) diff --git a/pages/user/wallet/withdraw.vue b/pages/user/wallet/withdraw.vue index 48032ec..f4023c5 100644 --- a/pages/user/wallet/withdraw.vue +++ b/pages/user/wallet/withdraw.vue @@ -9,6 +9,7 @@ 极速到账 + @@ -26,7 +27,7 @@ 全部提现 - 最低提现金额¥{{ config?.takingRule }} + 最低提现金额¥{{ fen2yuan(config?.takingRule || 0) }} 余额¥{{ fen2yuan(remain) }} @@ -64,6 +65,10 @@ const formData = ref({ amount: 0, }) +function navLogTap() { + peach.$router.go('/pages/user/wallet/withdrawLog') +} + async function getWithdrawConfig() { let res = await WalletApi.withdrawConfig() config.value = res.data @@ -111,6 +116,12 @@ onLoad(() => { } } } + .draw-btn-log { + border-radius: 40rpx; + background: var(--ui-BG-Main); + width: 100px; + color: $white; + } } .detail { diff --git a/pages/user/wallet/withdrawLog.vue b/pages/user/wallet/withdrawLog.vue new file mode 100644 index 0000000..864fc75 --- /dev/null +++ b/pages/user/wallet/withdrawLog.vue @@ -0,0 +1,416 @@ + + + + + + diff --git a/peach/api/pay/point.js b/peach/api/pay/point.js index 902c739..01f60d5 100644 --- a/peach/api/pay/point.js +++ b/peach/api/pay/point.js @@ -27,6 +27,15 @@ const PointApi = { method: 'get', }) }, + + // 购买积分 + buyIntegral: (data) => { + return request({ + url: '/particulars/point/point-recharge', + method: 'post', + data, + }) + }, } export default PointApi diff --git a/peach/api/pay/wallet.js b/peach/api/pay/wallet.js index 1e37d45..779ed7c 100644 --- a/peach/api/pay/wallet.js +++ b/peach/api/pay/wallet.js @@ -41,6 +41,17 @@ const PayWalletApi = { method: 'get', }) }, + + // 提现记录 + withdrawList: (params) => { + const queryString = Object.keys(params) + .map((key) => encodeURIComponent(key) + '=' + params[key]) + .join('&') + return request({ + url: `/pay/withdraw/page?${queryString}`, + method: 'get', + }) + }, } export default PayWalletApi diff --git a/peach/request/index.js b/peach/request/index.js index 89e55a1..226e6b1 100644 --- a/peach/request/index.js +++ b/peach/request/index.js @@ -119,7 +119,7 @@ http.interceptors.response.use( // 自定义处理【error 错误提示】:如果需要显示错误提示,则显示错误提示 if (response.data.code !== 0) { // 特殊:如果 401 错误码,则跳转到登录页 or 刷新令牌 - if (response.data.code === 401) { + if (response.data.code === 401 || response.data.code === 1012001016) { return refreshToken(response.config) }