当前位置:网站首页>uniapp微信小程序引用标准版交易组件
uniapp微信小程序引用标准版交易组件
2022-07-31 13:26:00 【超爱学习芸】
跳过前期准备,具体可看官方文档: 标准版组件引用
1.引入组件
pages.json
"plugins": {
"mini-shop-plugin": {
"version": "latest", // 默认拉最新版本插件, 不要修改(复制时请去掉注释)
"provider": "wx34345ae5855f892d" // 必须填标准版交易组件appid,不要修改(复制时请去掉注释)
}
}
main.js
const miniShopPlugin = requirePlugin('mini-shop-plugin')
miniShopPlugin.initApp(getApp(), wx)
官方给的是
miniShopPlugin.initApp(this, wx);
但在uniapp中会报错
2.使用组件
使用 navigator 组件跳转进入商品详情页
准备好商品ID
index.vue
<navigator url="plugin-private://wx34345ae5855f892d/pages/productDetail/productDetail?productId={
{productId}}">
<button type="default">下单</button>
</navigator>
效果展示
边栏推荐
- Optimization of five data submission methods
- Spark学习:为Spark Sql添加自定义优化规则
- Centos7 install mysql5.7 steps (graphical version)
- SAP 电商云 Spartacus UI 和 Accelerator UI 里的 ASM 模块
- ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
- golang-gin-pprof-使用以及安全问题
- Install the latest pytorch gpu version
- 如何使用StarUML画类图[通俗易懂]
- C#高级--委托
- go中select语句
猜你喜欢
How IDEA runs web programs
ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
MATLAB | 我也做了一套绘图配色可视化模板
Introduction to using NPM
Edge Cloud Explained in Simple Depth | 4. Lifecycle Management
ICML2022 | Fully Granular Self-Semantic Propagation for Self-Supervised Graph Representation Learning
抓住金三银四的尾巴,解锁程序员面试《刷题神器》
网络层重点协议——IP协议
[Niu Ke brush questions - SQL big factory interview questions] NO3. E-commerce scene (some east mall)
报错:npm ERR code EPERM
随机推荐
20.nn.Module
自制的数据库安全攻防题,相关靶机自己制作
技能大赛训练题:域用户和组织单元的创建
基于高阶微分器的无模型滑模控制器及其在自动电压调节器中的应用
365-day challenge LeetCode1000 questions - Day 044 Maximum element in the layer and level traversal
PartImageNet物体部件分割(Semantic Part Segmentation)数据集介绍
matlab as(assert dominance)
Even if the image is missing in a large area, it can also be repaired realistically. The new model CM-GAN takes into account the global structure and texture details
最新完整代码:使用word2vec预训练模型进行增量训练(两种保存方式对应的两种加载方式)适用gensim各种版本
为什么 wireguard-go 高尚而 boringtun 孬种
操作符详解
ECCV 2022 | 机器人的交互感知与物体操作
分布式锁有哪些,怎么实现(分布式锁的三种实现的对比)
4.爬虫之Scrapy框架2数据解析&配置参数&数据持久化&提高Scrapy效率
技能大赛训练题:登录安全加固
代码随想录笔记_哈希_454四数相加II
csdn发文助手问题
sqlalchemy determines whether a field of type array has at least one consistent data with an array
全局平均池化层替代全连接层(最大池化和平均池化的区别)
百度网盘安装在c盘显示系统权限限制的解决方法