feat:实现了微信小程序、H5、华为快应用三端适配微信 / 支付宝 / 华为官方支付规范的支付功能

This commit is contained in:
Zhukj
2025-12-09 08:50:51 +08:00
parent 86e43e3e6c
commit 5bd0881946
9 changed files with 1139 additions and 769 deletions

View File

@@ -39,7 +39,7 @@ export default {
},
fail: (res) => {
// #ifdef MP-WEIXIN
let scene = wx.getLaunchOptionsSync().scene;
let scene = uni.getLaunchOptionsSync().scene;
if ([1154, 1155].indexOf(scene) == -1) {
this.$util.showToast({
title: res.errMsg

View File

@@ -1,3 +1,9 @@
let site = null;
try {
site = require("../site.js"); // 适配发行模式的 site.js 导入
} catch (e) {
site = null; // 开发模式无 site.js 时赋值为 null
}
// 发行版本,配置说明
let releaseCfg = undefined;
try {

View File

@@ -206,6 +206,7 @@ export default {
* 获取订单结算数据
*/
payment() {
this.$api.sendRequest({
url: this.api.payment,
data: this.handleCreateData(),
@@ -214,7 +215,7 @@ export default {
let data = res.data;
// #ifdef MP-WEIXIN
var scene = uni.getStorageSync('is_test') ? 1175 : wx.getLaunchOptionsSync().scene;
var scene = uni.getStorageSync('is_test') ? 1175 : uni.getLaunchOptionsSync().scene;
if ([1175, 1176, 1177, 1191, 1195].indexOf(scene) != -1 && data.delivery.express_type) {
data.delivery.express_type = data.delivery.express_type.filter(item => item.name == 'express');
}

View File

@@ -137,7 +137,7 @@
this.isMatched = 1;
return;
}
let options = wx.getLaunchOptionsSync();
let options = uni.getLaunchOptionsSync();
this.$api.sendRequest({
url: '/shopcomponent/api/weapp/scenecheck',
data: {
@@ -357,7 +357,7 @@
out_trade_no: this.payInfo.out_trade_no,
pay_type: payType.type,
is_matched: this.isMatched,
scene: uni.getStorageSync('is_test') ? 1175 : wx.getLaunchOptionsSync().scene
scene: uni.getStorageSync('is_test') ? 1175 : uni.getLaunchOptionsSync().scene
},
success: res => {
uni.hideLoading();
@@ -365,7 +365,7 @@
var payData = res.data.data;
// #ifdef MP-WEIXIN
var scene = uni.getStorageSync('is_test') ? 1175 : wx.getLaunchOptionsSync()
var scene = uni.getStorageSync('is_test') ? 1175 : uni.getLaunchOptionsSync()
.scene;
if ([1175, 1176, 1177, 1191, 1195].indexOf(scene) != -1) {
uni.requestOrderPayment({

View File

@@ -4,7 +4,7 @@
<uni-popup ref="choosePaymentPopup" type="center" v-if="payInfo" :mask-click="false">
<view class="choose-payment-popup popup" @touchmove.prevent.stop>
<view class="popup-header">
<text class="tit">支付方式</text>
<text class="tit">支付方式-测试</text>
<text class="iconfont icon-close" @click="close()"></text>
</view>
<scroll-view scroll-y="true" class="popup-body">
@@ -51,13 +51,13 @@ import uniPopup from '@/components/uni-popup/uni-popup.vue';
import nsSwitch from '@/components/ns-switch/ns-switch.vue';
// #ifdef H5
import {
Weixin
} from 'common/js/wx-jssdk.js';
import { Weixin } from 'common/js/wx-jssdk.js';
// #endif
// 引入统一支付工具类
import { invokeWechatPay, invokeAlipay, invokeHuaweiPay } from '../../common/js/payCore.js';
// ========== 引入三端支付工具类(核心:适配官方规范) ==========
import { getWechatPay } from '@/utils/wechat-pay.js';
import { getAlipayPay } from '@/utils/alipay-pay.js';
import { getHuaweiPay } from '@/utils/huawei-pay.js';
export default {
name: 'payment',
@@ -76,27 +76,24 @@ export default {
return {
payIndex: 0,
payTypeList: [
// #ifdef H5 || MP-ALIPAY
{
name: '支付宝支付',
icon: 'icon-zhifubaozhifu-',
type: 'alipay'
},
// #endif
// #ifdef H5 || MP-WEIXIN
// 所有端都显示微信支付
{
name: '微信支付',
icon: 'icon-weixin1',
type: 'wechatpay'
},
// #endif
// #ifdef H5 || QUICKAPP-HUAWEI
// 所有端都显示支付宝支付
{
name: '支付宝支付',
icon: 'icon-zhifubaozhifu-',
type: 'alipay'
},
// 所有端都显示华为支付
{
name: '华为支付',
icon: 'icon-zhekou',
type: 'huaweipay'
},
// #endif
{
name: '线下支付',
icon: 'icondiy icon-yuezhifu',
@@ -115,11 +112,17 @@ export default {
//重置是否已完成没有完成不能调用api/pay/pay
resetPayComplete: true,
repeatFlag: false,
// ========== 支付工具类实例 ==========
wechatPay: null,
alipayPay: null,
huaweiPay: null
};
},
created(e) {
this.getPayType();
if (this.balanceUsable) this.getBalanceConfig();
// ========== 初始化三端支付工具类(填写官方申请的参数) ==========
this.initPayUtils();
},
computed: {
balanceDeduct() {
@@ -149,6 +152,34 @@ export default {
}
},
methods: {
// ========== 初始化支付工具类(核心:配置官方参数) ==========
initPayUtils() {
// 微信支付初始化(替换为你的微信官方参数)
this.wechatPay = getWechatPay({
appId: '你的微信小程序/AppID', // 微信开放平台/AppID
merchantId: '你的微信商户号', // 微信支付商户号
apiKey: '你的微信API密钥', // 微信支付API密钥商户平台获取
privateKey: '你的微信RSA私钥', // 商户私钥
publicKey: '微信支付公钥' // 微信支付公钥
});
// 支付宝支付初始化(替换为你的支付宝官方参数)
this.alipayPay = getAlipayPay({
appId: '你的支付宝AppID', // 支付宝开放平台/AppID
merchantId: '你的支付宝商户号', // 支付宝支付商户号
privateKey: '你的支付宝RSA2私钥', // RSA2私钥
alipayPublicKey: '支付宝公钥' // 支付宝公钥
});
// 华为支付初始化(替换为你的华为官方参数)
this.huaweiPay = getHuaweiPay({
appId: '你的华为AppID', // 华为开发者联盟AppID
merchantId: '你的华为商户号', // 华为支付商户号
publicKey: '华为支付公钥', // 华为支付公钥
privateKey: '你的华为商户私钥', // 华为商户私钥
env: 'sandbox' // 测试环境sandbox生产环境production
});
},
/**
* 父级页面onShow调用
*/
@@ -162,7 +193,6 @@ export default {
} else {
uni.removeStorageSync('offlinepay');
}
},
close() {
this.$emit('close');
@@ -264,86 +294,155 @@ export default {
// #ifdef H5
pay() {
var payType = this.payTypeList[this.payIndex];
if (!payType || payType.type === 'offlinepay') {
// 线下支付仍使用原有逻辑
this.payOffline();
var return_url = '';
if (this.payInfo.event == 'BlindboxGoodsOrderPayNotify') {
return_url = '/pages_promotion/blindbox/index?outTradeNo=';
} else {
return_url = '/pages_tool/pay/result?code=';
}
this.$api.sendRequest({
url: '/api/pay/pay',
data: {
out_trade_no: this.payInfo.out_trade_no,
pay_type: payType ? payType.type : '',
return_url: encodeURIComponent(this.$config.h5Domain + return_url + this.payInfo.out_trade_no),
is_balance: this.isBalance
},
success: async res => { // 新增async支持异步调用
uni.hideLoading();
if (res.code >= 0) {
if (res.data.pay_success) {
this.paySuccess();
return;
}
// 使用统一支付工具类进行支付
this.invokeUnifiedPay(payType.type);
},
/**
* 统一支付调用方法(使用新的支付工具类)
*/
async invokeUnifiedPay(payType) {
try {
let payResult;
const amount = this.payMoney;
const outTradeNo = this.payInfo.out_trade_no;
const subject = '订单支付';
// 根据支付类型调用对应的支付方法
switch (payType) {
case 'wechatpay':
payResult = await invokeWechatPay(outTradeNo, amount, subject);
break;
switch (payType.type) {
// ========== 支付宝支付H5端符合官方RSA2规范 ==========
case 'alipay':
payResult = await invokeAlipay(outTradeNo, amount, subject);
break;
case 'huaweipay':
payResult = await invokeHuaweiPay(outTradeNo, amount, subject);
break;
default:
throw new Error('不支持的支付方式');
try {
this.repeatFlag = false;
const orderInfo = {
outTradeNo: this.payInfo.out_trade_no,
productName: '订单支付',
price: this.payMoney,
returnUrl: this.$config.h5Domain + return_url + this.payInfo.out_trade_no,
notifyUrl: this.$config.h5Domain + '/api/pay/alipay/notify'
};
// 创建支付宝订单带RSA2签名
const alipayRes = await this.alipayPay.h5Pay(orderInfo);
// 验证支付宝签名(官方规范)
const isAlipaySignValid = this.alipayPay.verifyResult(alipayRes, alipayRes.sign);
if (!isAlipaySignValid) {
this.$util.showToast({ title: '支付宝订单签名验证失败' });
return;
}
// 处理H5支付跳转
if (payResult.code === 0 && payResult.data?.payUrl) {
// H5端直接跳转其他端需要在WebView中显示
const systemInfo = uni.getSystemInfoSync();
if (systemInfo.platform === 'web') {
window.location.href = payResult.data.payUrl;
// 区分微信浏览器/普通浏览器
if (this.$util.isWeiXin()) {
var wx_alipay = encodeURIComponent(alipayRes.payUrl);
this.$util.redirectTo('/pages_tool/pay/wx_pay', {
wx_alipay: wx_alipay,
out_trade_no: this.payInfo.out_trade_no
}, '', 'redirectTo');
} else {
location.href = alipayRes.payUrl;
this.checkPayStatus();
} else {
// 微信小程序/华为快应用中显示WebView
this.showPayWebView(payResult.data.payUrl);
}
} else if (payResult.code === 0) {
// 原生支付成功
this.paySuccess();
} else {
throw new Error(payResult.msg || '支付失败');
}
} catch (error) {
this.$util.showToast({ title: '支付宝支付失败:' + error.message });
this.repeatFlag = false;
this.$util.showToast({
title: error.message || '支付失败'
});
}
},
break;
/**
* 显示支付WebView用于微信小程序/华为快应用的H5支付
*/
showPayWebView(payUrl) {
// 这里可以打开一个新的WebView页面来显示支付
// 或者使用现有的跳转逻辑
this.$util.redirectTo('/pages/Pay/Pay', {
payUrl: payUrl,
outTradeNo: this.payInfo.out_trade_no
});
},
// ========== 微信支付H5端符合官方JSSDK+签名规范) ==========
case 'wechatpay':
try {
this.repeatFlag = false;
const orderInfo = {
outTradeNo: this.payInfo.out_trade_no,
productName: '订单支付',
price: this.payMoney,
openid: this.$store.state.openid,
notifyUrl: this.$config.h5Domain + '/api/pay/wechat/notify',
returnUrl: this.$config.h5Domain + return_url + this.payInfo.out_trade_no,
url: uni.getSystemInfoSync().platform == 'ios' ? uni.getStorageSync('initUrl') : location.href
};
// 微信浏览器内JSSDK支付
if (this.$util.isWeiXin()) {
// 初始化JSSDK官方规范
await this.wechatPay.initJSSDK(orderInfo.url);
// 创建微信订单带HMAC-SHA256签名
const wxPayRes = await this.wechatPay.mpPay(orderInfo);
// 验证签名(官方规范)
const isWxSignValid = this.wechatPay.verifyResult(wxPayRes, wxPayRes.paySign);
if (!isWxSignValid) {
this.$util.showToast({ title: '微信订单签名验证失败' });
return;
}
// 唤起JSSDK支付
await this.wechatPay.h5Pay(wxPayRes);
this.paySuccess();
} else {
// 普通浏览器H5支付链接
const wxH5Res = await this.wechatPay.h5Pay(orderInfo);
console.log('普通浏览器微信支付链接:', wxH5Res.mweb_url);
location.href = wxH5Res.mweb_url;
this.checkPayStatus();
}
} catch (error) {
this.$util.showToast({ title: '微信支付失败:' + error.message });
this.resetpay();
this.repeatFlag = false;
}
break;
/**
* 线下支付处理(保留原有逻辑)
*/
payOffline() {
// ========== 华为支付H5端符合官方RSA签名规范 ==========
case 'huaweipay':
try {
this.repeatFlag = false;
const orderInfo = {
productId: 'PROD_' + this.payInfo.out_trade_no,
productName: '订单支付',
price: this.payMoney
};
// 创建华为订单带RSA签名
const huaweiRes = await this.huaweiPay.h5Pay(orderInfo);
// 验证签名(官方规范)
const isHuaweiSignValid = this.huaweiPay.verifySignature(JSON.stringify(huaweiRes), huaweiRes.sign);
if (!isHuaweiSignValid) {
this.$util.showToast({ title: '华为订单签名验证失败' });
return;
}
console.log('华为支付跳转链接:', huaweiRes.payUrl);
location.href = huaweiRes.payUrl;
this.checkPayStatus();
} catch (error) {
this.$util.showToast({ title: '华为支付失败:' + error.message });
this.repeatFlag = false;
}
break;
// ========== 线下支付(保留原有逻辑) ==========
case 'offlinepay':
this.$util.redirectTo('/pages_tool/pay/offlinepay', {
outTradeNo: this.payInfo.out_trade_no
});
this.repeatFlag = false;
break;
}
} else {
this.$util.showToast({
title: res.message
});
this.repeatFlag = false;
}
},
fail: res => {
uni.hideLoading();
this.$util.showToast({
title: 'request:fail'
});
this.repeatFlag = false;
}
});
},
checkPayStatus() {
this.timer = setInterval(() => {
@@ -369,17 +468,142 @@ export default {
// #ifdef MP
pay() {
var payType = this.payTypeList[this.payIndex];
if (!payType || payType.type === 'offlinepay') {
// 线下支付仍使用原有逻辑
this.$api.sendRequest({
url: '/api/pay/pay',
data: {
out_trade_no: this.payInfo.out_trade_no,
pay_type: payType ? payType.type : '',
scene: uni.getStorageSync('is_test') ? 1175 : uni.getLaunchOptionsSync().scene,
is_balance: this.isBalance
},
success: async res => { // 新增async支持异步调用
uni.hideLoading();
if (res.code >= 0) {
if (res.data.pay_success) {
this.paySuccess();
this.repeatFlag = false;
return;
}
if (payType.type == 'offlinepay') {
this.$util.redirectTo('/pages_tool/pay/offlinepay', {
outTradeNo: this.payInfo.out_trade_no
});
this.repeatFlag = false;
} else {
try {
this.repeatFlag = false;
// ========== 华为支付小程序端跳转H5 ==========
if (payType.type == 'huaweipay') {
const orderInfo = {
productId: 'PROD_' + this.payInfo.out_trade_no,
productName: '订单支付',
price: this.payMoney
};
const huaweiRes = await this.huaweiPay.mpWeixinPay(orderInfo);
this.$util.redirectTo('/pages_tool/pay/wx_pay', {
wx_alipay: encodeURIComponent(huaweiRes.payUrl),
out_trade_no: this.payInfo.out_trade_no
});
} else {
// ========== 微信/支付宝小程序支付(符合官方验签规范) ==========
var payData = res.data.data;
// 验证支付参数签名(官方规范)
let isSignValid = false;
if (payType.type == 'wechatpay') {
isSignValid = this.wechatPay.verifyResult(payData, payData.paySign);
} else if (payType.type == 'alipay') {
isSignValid = this.alipayPay.verifyResult(payData, payData.sign);
}
if (!isSignValid) {
this.$util.showToast({ title: '支付参数签名验证失败' });
return;
}
// 小程序端也使用统一支付工具类
this.invokeUnifiedPay(payType.type);
// #ifdef MP-WEIXIN
var scene = uni.getStorageSync('is_test') ? 1175 : uni.getLaunchOptionsSync().scene;
if ([1175, 1176, 1177, 1191, 1195].indexOf(scene) != -1) {
uni.requestOrderPayment({
timeStamp: payData.timeStamp,
nonceStr: payData.nonceStr,
package: payData.package,
signType: payData.signType,
paySign: payData.paySign,
success: res => {
this.paySuccess();
this.repeatFlag = false;
},
fail: res => {
this.flag = false;
if (res.errMsg == 'requestOrderPayment:fail cancel') {
this.$util.showToast({
title: '您已取消支付'
});
this.resetpay();
this.repeatFlag = false;
} else {
uni.showModal({
content: '支付失败,失败原因: ' + res.errMsg,
showCancel: false
});
setTimeout(() => {
this.close();
this.repeatFlag = false;
}, 1500)
}
}
});
return
}
// #endif
uni.requestPayment({
provider: payType.provider,
...payData,
success: res => {
this.paySuccess();
this.repeatFlag = false;
},
fail: res => {
this.flag = false;
if (res.errMsg == 'requestPayment:fail cancel') {
this.$util.showToast({
title: '您已取消支付'
});
this.resetpay();
this.repeatFlag = false;
} else {
uni.showModal({
content: '支付失败,失败原因: ' + res.errMsg,
showCancel: false
});
setTimeout(() => {
this.close();
this.repeatFlag = false;
}, 1500)
}
}
});
}
} catch (error) {
this.$util.showToast({ title: '支付失败:' + error.message });
this.repeatFlag = false;
}
}
} else {
this.$util.showToast({
title: res.message
});
this.repeatFlag = false;
}
},
fail: res => {
uni.hideLoading();
this.$util.showToast({
title: 'request:fail'
});
this.repeatFlag = false;
}
});
},
// #endif
/**
@@ -528,8 +752,6 @@ export default {
color: #00a0e9;
}
.icon-checkboxblank {
font-size: 40rpx;
color: $color-line;

34
main.js
View File

@@ -27,7 +27,6 @@ Vue.prototype.$lang = Lang.lang; //解析语言包
Vue.prototype.$config = Config;
// #ifdef H5
EventBus.setDomBridge(DomEventBridge)
// #endif
@@ -57,8 +56,41 @@ import NsLogin from "@/components/ns-login/ns-login.vue"
Vue.component('ns-login', NsLogin);
import PrivacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
// 只保留一次组件注册(删除重复行)
Vue.component('privacy-popup', PrivacyPopup)
// 全局登录方法(替换成你的真实后端接口地址)
Vue.prototype.$doGlobalLogin = async function() {
return new Promise((resolve, reject) => {
uni.login({
success: async (loginRes) => {
if (!loginRes.code) {
reject("获取登录凭证失败,请重试");
return;
}
try {
// !!替换为你的真实后端登录接口地址!!
const res = await uni.request({
url: "https://dev.aigc-quickapp.com/api/user/login",
method: "POST",
data: { code: loginRes.code }
});
if (res.data?.success) {
uni.setStorageSync("token", res.data.token);
resolve(true);
} else {
reject(res.data?.msg || "登录失败");
}
} catch (err) {
reject("网络异常");
}
},
fail: () => reject("登录授权失败")
});
});
};
// 只创建一次Vue实例删除重复声明
const app = new Vue({
...App,
store

View File

@@ -5,7 +5,6 @@
"versionName":"1.0.0",
"versionCode":"100",
"transformPx":false,
/* 5+App */
"app-plus":{
"usingComponents":true,
"nvueCompiler":"uni-app",
@@ -15,11 +14,8 @@
"autoclose":true,
"delay":0
},
/* */
"modules":{},
/* */
"distribute":{
/* android */
"android":{
"permissions":[
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
@@ -46,17 +42,27 @@
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios":{},
/* SDK */
"sdkConfigs":{
"ad" : {}
"ad":{},
// App端支付SDK配置适配原生App支付
"payment":{
"weixin":{
"appid":"wx1234567890abcdef", // 替换微信开放平台AppID
"universalLink":"https://yourdomain.com/apple-app-site-association" // 替换iOS微信Universal Link
},
"alipay":{
"appid":"2024000000000000" // 替换支付宝开放平台AppID
},
"huawei":{
"appid":"12345678" // 替换华为开发者联盟AppID应用市场申请
}
}
}
}
},
/* */
"mp-weixin":{
"appid" : "wxa8f94045d9c2fc10",
"appid":"wxa8f94045d9c2fc10", // 你的微信小程序AppID已保留
"setting":{
"urlCheck":false,
"postcss":false,
@@ -72,15 +78,32 @@
"desc":"为了更好地为您提供服务"
}
},
"useDeprecatedAPI":{
"getSystemInfoSync":false
},
"requiredPrivateInfos":["chooseLocation","getLocation","chooseAddress"],
"__usePrivacyCheck__":true,
"optimization":{
"subPackages":true
},
// 微信小程序支付核心配置(官方规范)
"pay":{
"merchantId":"1688888888", // 替换:你的微信支付商户号(商户平台获取)
"keyPath":"cert/apiclient_key.p12" // 可选:微信支付证书路径(退款/分账等接口需用)
},
"sdkConfigs":{
"jssdk":{
"apis":["chooseWXPay"] // 必须开启微信JSSDK支付接口H5/小程序共用)
}
}
},
"mp-alipay":{
"usingComponents":true,
"appid" : ""
"appid":"2024000000000000", // 替换你的支付宝小程序AppID开放平台获取
// 支付宝小程序支付配置(官方规范)
"pay":{
"merchantId":"2088888888888888" // 替换:你的支付宝支付商户号
}
},
"mp-baidu":{
"usingComponents":true
@@ -92,17 +115,51 @@
"sdkConfigs":{
"maps":{
"qqmap":{
"key" : "TUHBZ-CNWKU-UHAVP-GZQ26-HNZFO-3YBF4"
"key":"TUHBZ-CNWKU-UHAVP-GZQ26-HNZFO-3YBF4" // 已保留
},
// H5端微信/华为支付JSSDK配置
"weixin":{
"appid":"wxa8f94045d9c2fc10" // 和微信小程序AppID一致无需修改
},
"huawei":{
"appid":"12345678" // 替换华为开发者联盟AppID
}
}
},
"router":{
"mode" : "history",
"mode":"hash", // 必须hash模式适配支付回调跳转
"base":"/hwapp/"
},
"title" : " ",
"title":"华为支付演示",
"devServer":{
"https" : false
"https":false,
// H5端支付接口跨域代理解决浏览器跨域限制
"proxy":{
// 华为支付接口代理
"/api/huawei":{
"target":"https://iap-api.cloud.huawei.com",
"changeOrigin":true,
"pathRewrite":{
"^/api/huawei":""
}
},
// 微信支付接口代理
"/api/wechat":{
"target":"https://api.mch.weixin.qq.com",
"changeOrigin":true,
"pathRewrite":{
"^/api/wechat":""
}
},
// 支付宝支付接口代理(沙箱/生产二选一)
"/api/alipay":{
"target":"https://openapi.alipaydev.com", // 沙箱环境生产https://openapi.alipay.com
"changeOrigin":true,
"pathRewrite":{
"^/api/alipay":""
}
}
}
},
"optimization":{
"treeShaking":{
@@ -125,11 +182,24 @@
"version":"2"
},
"sassImplementationName":"node-sass",
/** **/
"quickapp-webview":{
"package" : "com.jieganfsj.fivegshop",
"package":"com.jieganfsj.fivegshop", // 已保留:华为快应用包名
"minPlatformVersion":1070,
"versionName":"1.0.0",
"versionCode" : 0
"versionCode":0,
// 华为快应用支付核心配置(官方规范)
"sdkConfigs":{
"huawei":{
"appid":"12345678", // 替换华为开发者联盟AppID
"payment":{
"merchantId":"88888888" // 替换:华为支付商户号(商户平台获取)
}
}
},
// 华为快应用必须声明的支付权限(官方强制)
"features":[
{"name":"system.pay"},
{"name":"huawei.pay"}
]
}
}

38
package-lock.json generated
View File

@@ -1,11 +1,14 @@
{
"name": "frontend",
"name": "lucky_shop",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
"@dcloudio/uni-quickapp-webview": "^2.0.2-4080420251103001",
"crypto-js": "^4.1.1",
"js-base64": "^3.7.2",
"jsencrypt": "^3.2.1",
"jweixin-module": "^1.6.0"
},
"devDependencies": {
@@ -455,6 +458,12 @@
"dev": true,
"license": "MIT"
},
"node_modules/crypto-js": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==",
"license": "MIT"
},
"node_modules/electron-to-chromium": {
"version": "1.5.4",
"resolved": "https://repo.huaweicloud.com/repository/npm/electron-to-chromium/-/electron-to-chromium-1.5.4.tgz",
@@ -614,6 +623,18 @@
"node": ">= 10.13.0"
}
},
"node_modules/js-base64": {
"version": "3.7.8",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.8.tgz",
"integrity": "sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow==",
"license": "BSD-3-Clause"
},
"node_modules/jsencrypt": {
"version": "3.5.4",
"resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.5.4.tgz",
"integrity": "sha512-kNjfYEMNASxrDGsmcSQh/rUTmcoRfSUkxnAz+MMywM8jtGu+fFEZ3nJjHM58zscVnwR0fYmG9sGkTDjqUdpiwA==",
"license": "MIT"
},
"node_modules/json-parse-even-better-errors": {
"version": "2.3.1",
"resolved": "https://repo.huaweicloud.com/repository/npm/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
@@ -1345,6 +1366,11 @@
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true
},
"crypto-js": {
"version": "4.2.0",
"resolved": "https://registry.npmmirror.com/crypto-js/-/crypto-js-4.2.0.tgz",
"integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q=="
},
"electron-to-chromium": {
"version": "1.5.4",
"resolved": "https://repo.huaweicloud.com/repository/npm/electron-to-chromium/-/electron-to-chromium-1.5.4.tgz",
@@ -1464,6 +1490,16 @@
"supports-color": "^8.0.0"
}
},
"js-base64": {
"version": "3.7.8",
"resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.8.tgz",
"integrity": "sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow=="
},
"jsencrypt": {
"version": "3.5.4",
"resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.5.4.tgz",
"integrity": "sha512-kNjfYEMNASxrDGsmcSQh/rUTmcoRfSUkxnAz+MMywM8jtGu+fFEZ3nJjHM58zscVnwR0fYmG9sGkTDjqUdpiwA=="
},
"json-parse-even-better-errors": {
"version": "2.3.1",
"resolved": "https://repo.huaweicloud.com/repository/npm/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",

View File

@@ -7,6 +7,9 @@
},
"dependencies": {
"@dcloudio/uni-quickapp-webview": "^2.0.2-4080420251103001",
"jweixin-module": "^1.6.0"
"jweixin-module": "^1.6.0",
"js-base64": "^3.7.2",
"jsencrypt": "^3.2.1",
"crypto-js": "^4.1.1"
}
}