更新记录
6.0.1(2025-12-02)
优化预览截图
6.0.0(2025-12-02)
组件初始化
平台兼容性
uni-app(4.85)
| Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
|---|---|---|---|---|---|---|---|---|
| √ | √ | √ | √ | √ | √ | √ | √ | √ |
| 微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
|---|---|---|---|---|---|---|---|---|---|---|
| √ | √ | √ | √ | √ | √ | √ | √ | √ | √ | √ |
uni-app x(4.85)
| Chrome | Safari | Android | iOS | 鸿蒙 | 微信小程序 |
|---|---|---|---|---|---|
| √ | √ | √ | √ | √ | √ |
cc-appleInPurchase 苹果AppStore内购插件,IOS内购支付购买虚拟商品,购买全程提供指导!可加下面交流群
我的技术公众号(私信可加前端技术交流群)
群内气氛颇为不错,应该可能算为数不多专门进行技术交流的前端群,同时也涵盖后端技术产品交流,偶尔成员们会聊天摸鱼。

使用方法
HTML代码实现部分
<template>
<view class="content">
<view>
<button @click="pauFun">唤起支付</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello',
}
},
onLoad() {
},
onUnload() {
},
methods: {
pauFun(){
let that = this
uni.getProvider({
service:'payment',
success: (paymentRes) => {
const iapChannel = paymentRes.providers.find((channel) => {
return (channel.id === 'appleiap')
})
let key = 'newOceanOneYear' //多选项直接替换字段
iapChannel.requestProduct([key],function(orderList){
console.log(orderList)
that.applePay(orderList[0])
},function(e){
console.log(e)
uni.showToast({
title:'暂不支持苹果支付',
icon:'none'
})
})
},
fail(err) {
console.log(err)
uni.showToast({
title:'支付调用失败',
icon:'none'
})
}
})
},
applePay(para){
console.log(para,123)
const that = this
uni.showLoading({
title: '充值中请勿离开',
mask: true
})
uni.requestPayment({
provider:'appleiap',
orderInfo:{
productid:"", //苹果后台配置的产品id
username:new Date().getTime(), //订单编号
optimize:true
},
success: (e) => {
// 成功后的其他逻辑
uni.hideLoading()
if(e.transactionState == 1){
uni.showToast({
title:'支付成功'
})
}
},
fail: (err) => {
uni.showToast({
icon:'none',
title:'支付失败'
})
}
})
}
}
}
</script>
<script lang="renderjs" module="xgPlayerModule">
// import Player from 'xgplayer';
// import 'xgplayer/dist/index.min.css';
// let player = new Player({
// id: 'mse',
// url: 'https://dz.sjzshx.cn/prod/profile/upload/2025/09/16/bec7a514e83a45e586492564dfee5c83.mp4',
// height: '100%',
// width: '100%',
// });
</script>
<style>
</style>

收藏人数:
购买源码授权版(
试用
使用 HBuilderX 导入示例项目
赞赏(0)
下载 6928
赞赏 46
下载 11620612
赞赏 1816
赞赏
京公网安备:11010802035340号