微信小程序
山有木兮*_*
每个不曾起舞的日子,都是对生命的辜负
展开
-
微信小程序封装post请求 调用后台接口
引入文件es6-promise.min.js!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ES6Promise=e()}(this,function(){"use strict";function t(t){var e=typeof t;return原创 2020-11-04 17:58:49 · 1668 阅读 · 0 评论 -
java 根据小程序传值code 返回openid
Controller类 @RequestMapping(value = "/getOpenId", method = RequestMethod.POST) @ResponseBody public ReturnDto loginApp(@RequestBody String code) { Map<String, Object> ret = new HashMap<String, Object>(); try { JSONObject json = WeCha原创 2020-11-04 17:54:01 · 468 阅读 · 0 评论 -
微信小程序 获取微信昵称头像 获取openid 封装请求post
//判断是否授权过登录 wx.getSetting({ //成功 success: function (res) { //判断是否是获取昵称 头像的权限 if (res.authSetting['scope.userInfo']) { } } })小程序获取登录用户的昵称,头像html<button class="wxBtn" style="background-image:url({原创 2020-11-04 17:31:04 · 1026 阅读 · 0 评论 -
微信小程序左侧竖形滑动菜单(淘宝京东)
1、category.js中data初始化的数据(模拟),如果是跟后台数据库挂钩,可以用wx.request请求返回相似的对象数组再绑定到cartItems中。data: { cateItems:[ { cate_id:1, cate_name:'洗护', children: [ { child_id: 1, name: '洁面皂', im.转载 2020-06-11 15:10:21 · 846 阅读 · 0 评论 -
微信小程序封装自定义表头
组件html<view class='nav-wrap' style='height: {{height*2 + 20}}px;'> <view class='nav-title' style='line-height: {{height*2 + 37}}px;'>{{navbarData.title}}</view> <view cla...原创 2020-03-23 16:02:36 · 773 阅读 · 0 评论 -
微信小程序封装可以遮住表头的组件(遮罩层)
组件 html<!-- 遮罩层 --><cover-view class="mask" catchtouchmove="preventTouchMove" hidden="{{maskFlag}}"><!-- 弹窗--><cover-view class="pop-main"> <cover-view class="modal-di...原创 2020-03-23 14:43:43 · 1423 阅读 · 2 评论 -
微信小程序前台 多个按钮 数据与后台关联的值
前台html代码 <view class='statlistname {{op4 || offPower?"disabled":""}}'>模式</view> <view class="control-panel-btn status-btn normal-btn m-l {{offPower?'disabled':''}} {...原创 2020-01-08 14:18:47 · 400 阅读 · 0 评论
分享