<!--miniprogram/pages/login/login.wxml--> <view class="userinfo"> <view class="userinfo-avatar"> <open-data type="userAvatarUrl"></open-data> </view> <open-data type="userNickName"></open-data> </view> <button wx:if="{{canIUse&&!wait}}" class="btn" type="primary" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 授权登录 </button> <view wx:elif="{{!canIUse}}">请升级微信版本</view> <view wx:elif="{{wait}}" class="tips">{{name}}请等待审核</view> <view class='toast-box' hidden='{{!inputname}}'> <view class='toastbg'></view> <view class='showToast'> <view class='toast-title'> <text>新建姓名</text> </view> <view class='toast-main'> <view class='toast-input'> <input placeholder='请输入姓名' bindinput='setValue' data-name='stuEidtName'></input> </view> </view> <view class='toast-button'> <view class='button1'> <button catchtap='cancel'>取消</button> </view> <view class='button2'> <button catchtap='confirm'>确定</button> </view> </view> </view> </view>
现在小程序做用户识别用什么api?之前用openid做识别,然后就让对应的用户使用自己的小程序, 现在无法获取openid的话,应该怎么识别具体用户? <!--miniprogram/pages/login/login.wxml--> <view class="userinfo"> <view class="userinfo-avatar"> <open-data type="userAvatarUrl"></open-data> </view> <open-data type="userNickName"></open-data> </view> <button wx:if="{{canIUse&&!wait}}" class="btn" type="primary" open-type="getUserInfo" bindgetuserinfo="getUserInfo"> 授权登录 </button> <view wx:elif="{{!canIUse}}">请升级微信版本</view> <view wx:elif="{{wait}}" class="tips">{{name}}请等待审核</view> <view class='toast-box' hidden='{{!inputname}}'> <view class='toastbg'></view> <view class='showToast'> <view class='toast-title'> <text>新建姓名</text> </view> <view class='toast-main'> <view class='toast-input'> <input placeholder='请输入姓名' bindinput='setValue' data-name='stuEidtName'></input> </view> </view> <view class='toast-button'> <view class='button1'> <button catchtap='cancel'>取消</button> </view> <view class='button2'> <button catchtap='confirm'>确定</button> </view> </view> </view> </view> // miniprogram/pages/login/login.js // miniprogram/pages/putin/putin.js import '../../utils/wxPromise.min.js' const app = getApp() Page({ data: { canIUse: wx.canIUse('button.open-type.getUserInfo'), openID: '', wait: false, inputname: false, name: '', }, onLoad: function () { this.getdb(); }, getdb: function () { /** * 赋值listTowsData,后续不用再读取*/ wx.pro.request({ url: 'https://hn2.api.XXX.com', data: { s: 'App.Table.FreeQuery', model_name: 'towsClass', where: '[["id", ">", "0"]]', app_key: 'XXXXXXXXXXX' }, method: 'GET', header: { 'content-type': 'application/json' } }).then(res => { app.listTowsData = res.data.data.list }).catch(err => { console.log(err) }).finally(() => { wx.hideLoading() }) }, })
2021-11-28有人协助一下吗?
模板消息能否设置后15天才推送到用户微信端- 需求的场景描述(希望解决的问题) 我的小程序是一个15天提醒一次用户签到,因此怎么设置模板消息? - 希望提供的能力
2018-05-23有人回答一下?
能否更换switch开关的颜色?- 需求的场景描述 能否更换switch开关的颜色? - 希望提供的能力 开是 绿色 关是 红色(现在默认是白色)
2018-05-20