当前位置:网站首页>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>效果展示

边栏推荐
- [CPU Design Practice] Simple Pipeline CPU Design
- golang-gin-pprof-使用以及安全问题
- LeetCode·每日一题·1161.最大层内元素和·层次遍历
- FastAPI encapsulates a generic response
- Hard disk partition, expand disk C, no reshipment system, not heavy D dish of software full tutorial.
- C#使用ComboBox控件
- Selenium自动化测试之Selenium IDE
- 3.爬虫之Scrapy框架1安装与使用
- MATLAB | 我也做了一套绘图配色可视化模板
- EXCEL如何快速拆分合并单元格数据
猜你喜欢

Error IDEA Terminated with exit code 1

浏览器被hao360劫持解决办法

go使用makefile脚本编译应用

C#控件CheckBox的使用

C#高级--委托

ECCV2022: Recursion on Transformer without adding parameters and less computation!

Solution for browser hijacking by hao360

AI cocoa AI frontier introduction (7.31)

Network layer key protocol - IP protocol

C# 中的Async 和 Await 的用法详解
随机推荐
selenium被反爬了怎么办?
基于模糊预测与扩展卡尔曼滤波的野值剔除方法
深入浅出边缘云 | 4. 生命周期管理
STM32——软件SPI控制AD7705[通俗易懂]
Six Stones Programming: No matter which function you think is useless, people who can use it will not be able to leave, so at least 99%
CLion用于STM32开发
技能大赛训练题:交换机的远程管理
Batch大小不一定是2的n次幂!ML资深学者最新结论
ECCV2022:在Transformer上进行递归,不增参数,计算量还少!
mysql8, starttime的下一个值作为endtime的上一个值?
Error IDEA Terminated with exit code 1
爱可可AI前沿推介(7.31)
How to quickly split and merge cell data in Excel
IDEA找不到Database解决方法
页面整屏滚动效果
csdn发文助手问题
MATLAB | 我也做了一套绘图配色可视化模板
All-round visual monitoring of the Istio microservice governance grid (microservice architecture display, resource monitoring, traffic monitoring, link monitoring)
技能大赛训练题: 子网掩码划分案例
C#获得网卡信息 NetworkInterface IPInterfaceProperties