From d643abe7e1fc1145c6dc6cf61b673f5523494fc7 Mon Sep 17 00:00:00 2001 From: tsui110 Date: Mon, 23 Mar 2026 20:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8B=A5=E5=B9=B2=E5=AE=89?= =?UTF-8?q?=E5=8D=93=E7=AB=AF=E7=9A=84=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + App.vue | 1 + api/appUser.js | 4 +++ manifest.json | 26 +++++++++++++-- pages-shop/shop/detail.vue | 19 +++++++++-- pages.json | 4 +-- pages/cabinet/index.vue | 12 +++---- pages/index/index.vue | 38 ++++++++++++++-------- pages/login/index.vue | 2 +- pages/mine/index.vue | 18 +++++------ pages/shop/index.vue | 12 +++---- utils/payment.js | 66 ++++++++++++++++++++++++++++++++++++-- utils/request.js | 4 +-- 13 files changed, 161 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index f66ec21..668948d 100755 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ node_modules/ .claude/settings.local.json .hbuilderx/project.config.json clean-cache.bat +.hbuilderx/launch.json diff --git a/App.vue b/App.vue index 5d75b18..57e2c25 100755 --- a/App.vue +++ b/App.vue @@ -4,6 +4,7 @@ import { getPublicConfig } from '@/api/appUser' export default { onLaunch: function(options) { console.log('App Launch', options) + try { uni.setStorageSync('app_session_id', String(Date.now())) } catch (_) {} if (options && options.query && options.query.invite_code) { console.log('App Launch captured invite_code:', options.query.invite_code) diff --git a/api/appUser.js b/api/appUser.js index 84f0262..7c0c8ce 100755 --- a/api/appUser.js +++ b/api/appUser.js @@ -222,6 +222,10 @@ export function createWechatOrder(data) { return authRequest({ url: '/api/app/pay/wechat/jsapi/preorder', method: 'POST', data }) } +export function createWechatAppOrder(data) { + return authRequest({ url: '/api/app/pay/wechat/app/preorder', method: 'POST', data }) +} + export function getLotteryResult(order_no) { return authRequest({ url: '/api/app/lottery/result', method: 'GET', data: { order_no } }) } diff --git a/manifest.json b/manifest.json index c8288a2..915d024 100755 --- a/manifest.json +++ b/manifest.json @@ -17,7 +17,9 @@ "delay" : 0 }, /* 模块配置 */ - "modules" : {}, + "modules" : { + "Payment" : {} + }, /* 应用发布信息 */ "distribute" : { /* android打包配置 */ @@ -37,7 +39,10 @@ "", "", "", - "" + "", + "", + "", + "" ] }, /* ios打包配置 */ @@ -45,7 +50,22 @@ "dSYMs" : false }, /* SDK配置 */ - "sdkConfigs" : {} + "sdkConfigs" : { + "payment" : { + "weixin" : { + "__platform__" : ["android", "ios"], + "appid" : "wx26ad074017e1e63f", + "UniversalLinks" : "" + } + }, + "share" : {}, + "oauth" : { + "weixin" : { + "appid" : "wx26ad074017e1e63f", + "UniversalLinks" : "" + } + } + } } }, /* 快应用特有相关 */ diff --git a/pages-shop/shop/detail.vue b/pages-shop/shop/detail.vue index 4fed724..a681ba5 100755 --- a/pages-shop/shop/detail.vue +++ b/pages-shop/shop/detail.vue @@ -5,7 +5,7 @@ 商品库存不足,由于市场价格存在波动,请联系客服核实价格和补充库存 - + @@ -45,13 +45,15 @@