博客列表 >tpshop小程序开发中遇到过的那些坑

tpshop小程序开发中遇到过的那些坑

Ting er
Ting er原创
2019年12月09日 22:02:061332浏览

先了解下配置js文件说明

  1. {
  2. "extEnable": false,
  3. "extAppid": "wx079ce57277d79069",
  4. "ext": {
  5. "store_name": "商城名称配置",
  6. "store_logo": "../../../images/logo.png",
  7. "request_url": "https://你的请求地址"
  8. }
  9. }

如果配置的正确 首页是即可显示出的,还有一个步骤(小程序端记得勾选 本地不效验业务域名。)

小程序微信登录获取调用方法更新

  1. /**
  2. * 获取用户信息(包括微信用户),有授权作用
  3. * cb:成功回调函数,入参:cb(userInfo,wechatUser)
  4. * force:是否强制更新数据(发出请求)
  5. */
  6. getUserInfo: function (cb, force, isShowLoading) {
  7. var that = this;
  8. if (auth.isAuth() && !force) {
  9. typeof cb == "function" && cb(that.globalData.userInfo, that.globalData.wechatUser);
  10. } else {
  11. if (!auth.isAuth()) {
  12. return auth.auth(cb); //授权操作
  13. }
  14. request.get('/api/user/userInfo', {
  15. isShowLoading: typeof isShowLoading == 'undefined' ? true : isShowLoading,
  16. success: function (res) {
  17. that.globalData.userInfo = res.data.result;
  18. that.globalData.userInfo.head_pic = common.getFullUrl(that.globalData.userInfo.head_pic);
  19. typeof cb == "function" && cb(that.globalData.userInfo, that.globalData.wechatUser);
  20. }
  21. });
  22. }
  23. },

tpshop

积分兑换中心的只要PHP端增加的商品,使用积分兑换的即可在这里显示!
同样这块的文件 可在pages/goods/integralMall/integralMall下这个文件里替换!

  1. {
  2. "navigationBarTitleText": "积分商城"
  3. }

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议