小程序评价发布组件-写评论开启指南,附详细代码

操作指引

0e8dc83a6ee64f1bb8ba576f7fa912bc.png

 

代码部分

首先在app.json里面引入「评价发布组件」

{  "plugins": {    "wxacommentplugin": {      "version": "latest",      "provider": "wx82e6ae1175f264fa"     }  }}注意:// 必须填该评价组件appid,该示例值即为评价组件appid(复制时请去掉注释)

在xxx.js页面代码中添加代码​​​​​​​

  // js代码:
  gopingjia: function () {    var plugin = requirePlugin("wxacommentplugin");    plugin.openComment({      success: (res) => {        console.log('plugin.openComment success', res)      },      fail: (res) => {        console.log('plugin.openComment fail', res)      }    })  },

 

在xxx.wxml页面代码中添加代码​​​​​​​

<button bindtap="gopingjia" style="margin-top: 50px;background-color: #ff4444;color: #fff;">用户评价</button>

 

完整源码包下载:

链接:https://pan.baidu.com/s/1OgrOJVMWSJn0G0J5ws3I_Q 
提取码:88io

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

津津有料

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值