小程序开发学习

最近参与开发一个小程序项目,于是就把自己在开发过程中学习以及参考到的资料进行了汇总。

转发功能

//转发
  onShareAppMessage: function () {
    let users = wx.getStorageSync('user');
    if (res.from === 'button') { }
    return {
      title: '转发',
      path: '/pages/index/index',
      success: function (res) { }
    }
  }

表单提交:

formSubmit: function (e) {
    //console.log(e.detail.value.id);
    if (e.detail.value.reason.length == 0) {
      wx.showToast({
        title: '写明原因!',
        icon: 'loading',
        duration: 1500
      })
      setTimeout(function () {
        wx.hideToast()
      }, 2000)
    } else {
      wx.request({
        url: '***' + e.detail.value.id,
        header: {
          "Content-Type": "application/x-www-form-urlencoded"
        },
        method: "POST",
        data: { reason: e.detail.value.reason},
        success: function (res) {
          console.log(res.data);
          if (res.data.status == 0) {
            wx.showToast({
              title: '提交失败!!!',
              icon: 'loading',
              duration: 1500
            })
          } else {
            wx.showToast({
              title: '提交成功!!!',//这里打印出登录成功
              icon: 'success',
              duration: 1000
            })
          }
        }
      })
    }
  }

参考资料:

微信官方文档

https://developers.weixin.qq.com/miniprogram/dev/framework/

https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/JS-SDK.html

微信小程序学习资料:

https://www.jianshu.com/p/336131ea0044

https://www.cnblogs.com/yexiaochai/p/9346043.html

https://www.jianshu.com/p/c7b1925cd3c1

https://blog.csdn.net/onion_line/article/details/83036502

https://www.jianshu.com/p/93d7104be420

http://www.wxapp-union.com/forum.php?mod=viewthread&tid=4959

http://www.wxapp-union.com/article-2516-1.html

https://www.jianshu.com/p/5753a0e1754f

https://www.cnblogs.com/yaoyuqian/p/7967472.html

https://blog.csdn.net/qq_39424981/article/details/84581965

https://www.cnblogs.com/yuyangcoder/p/9841588.html

https://blog.csdn.net/qq_25252769/article/details/76049846

https://github.com/jianjiayi/WX_Cloud_development_pinche

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值