From 9de46713739d66677b0c17d59ca20e265d20e125 Mon Sep 17 00:00:00 2001 From: VK <370725567@qq.com> Date: Sat, 7 Jan 2023 21:58:55 +0800 Subject: [PATCH] update unipay.md --- docs/uniCloud/unipay.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/uniCloud/unipay.md b/docs/uniCloud/unipay.md index 4723a4153..85038f951 100644 --- a/docs/uniCloud/unipay.md +++ b/docs/uniCloud/unipay.md @@ -64,13 +64,15 @@ const unipay = require('@dcloudio/unipay') | timeout | Number | 否 | 5000 | 请求超时时间,单位:毫秒 | ```js +const path = require('path'); // 引入内置的path模块 + const unipayIns = unipay.initWeixinV3({ appId: 'your appId', mchId: 'your mchId', v3Key: 'you parterner key', - appCertPath: path.resolve('/path/to/you/cert'), + appCertPath: path.resolve(__dirname, 'your appCertPath'), // appCertContent: "", - appPrivateKeyPath: path.resolve('/path/to/you/privateKey'), + appPrivateKeyPath: path.resolve(__dirname, 'your appPrivateKeyPath'), // appPrivateKeyContent: "", }) ``` -- GitLab